-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Miscellaneous of updates and adaptations #13
Open
stubbiali
wants to merge
15
commits into
ecmwf-ifs:develop
Choose a base branch
from
stubbiali:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ece834c
Add arch files for Daint, MLux and LUMI.
stubbiali 091eb3d
Enable single precision.
stubbiali 7a10aa8
Fix git repo.
stubbiali d33cd54
Disable validation for benchmarking.
stubbiali b21807f
Upgrade to ecbuild 3.8.0.
stubbiali 39ed4f2
Add build scripts for Daint, MLux and LUMI.
stubbiali c8b30ac
Remove -noacc from OpenMP flags.
stubbiali 11c938a
Remove build scripts from repo.
stubbiali 3cb556d
Update Loki config files.
stubbiali 8f70745
Add directive openacc.
stubbiali 885c2d7
Fix VALIDATE_TAYLOR_TEST.
stubbiali 25064be
Use loki_transform() in CMake files.
stubbiali ba9a923
Remove arch files which have not been tested.
stubbiali 1cbfac9
Remove arch files which have not been tested.
stubbiali 572095b
Uncomment code.
stubbiali File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# (C) Copyright 1988- ECMWF. | ||
# | ||
# This software is licensed under the terms of the Apache Licence Version 2.0 | ||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
# In applying this licence, ECMWF does not waive the privileges and immunities | ||
# granted to it by virtue of its status as an intergovernmental organisation | ||
# nor does it submit to any jurisdiction. | ||
|
||
# Source me to get the correct configure/build/run environment | ||
|
||
# Store tracing and disable (module is *way* too verbose) | ||
{ tracing_=${-//[^x]/}; set +x; } 2>/dev/null | ||
|
||
module_load() { | ||
echo "+ module load $1" | ||
module load $1 | ||
} | ||
module_unload() { | ||
echo "+ module unload $1" | ||
module unload $1 | ||
} | ||
|
||
# Unload all modules to be certain | ||
module purge -f | ||
|
||
# Load modules | ||
module load daint-gpu | ||
module load PrgEnv-intel/6.0.10 | ||
module swap intel/2021.3.0 intel-classic/2022.1.0 | ||
#module load Boost | ||
module load CMake | ||
module load cudatoolkit/11.2.0_3.39-2.1__gf93aa1c # needed for cmake to find hdf5 | ||
module load cray-hdf5-parallel | ||
module load cray-python | ||
|
||
set -x | ||
|
||
# Restore tracing to stored setting | ||
{ if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null | ||
|
||
export ECBUILD_TOOLCHAIN="./toolchain.cmake" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
# (C) Copyright 1988- ECMWF. | ||
# | ||
# This software is licensed under the terms of the Apache Licence Version 2.0 | ||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
# In applying this licence, ECMWF does not waive the privileges and immunities | ||
# granted to it by virtue of its status as an intergovernmental organisation | ||
# nor does it submit to any jurisdiction. | ||
|
||
#################################################################### | ||
# ARCHITECTURE | ||
#################################################################### | ||
|
||
set( EC_HAVE_C_INLINE 1 ) | ||
set( EC_HAVE_FUNCTION_DEF 1 ) | ||
set( EC_HAVE_CXXABI_H 1 ) | ||
set( EC_HAVE_CXX_BOOL 1 ) | ||
set( EC_HAVE_CXX_SSTREAM 1 ) | ||
set( EC_HAVE_CXX_INT_128 0 ) | ||
set( CMAKE_SIZEOF_VOID_P 8 ) | ||
set( EC_SIZEOF_PTR 8 ) | ||
set( EC_SIZEOF_CHAR 1 ) | ||
set( EC_SIZEOF_SHORT 2 ) | ||
set( EC_SIZEOF_INT 4 ) | ||
set( EC_SIZEOF_LONG 8 ) | ||
set( EC_SIZEOF_LONG_LONG 8 ) | ||
set( EC_SIZEOF_FLOAT 4 ) | ||
set( EC_SIZEOF_DOUBLE 8 ) | ||
set( EC_SIZEOF_LONG_DOUBLE 8 ) | ||
set( EC_SIZEOF_SIZE_T 8 ) | ||
set( EC_SIZEOF_SSIZE_T 8 ) | ||
set( EC_SIZEOF_OFF_T 8 ) | ||
set( EC_BIG_ENDIAN 0 ) | ||
set( EC_LITTLE_ENDIAN 1 ) | ||
set( IEEE_BE 0 ) | ||
set( IEEE_LE 1 ) | ||
set( EC_HAVE_FSEEK 1 ) | ||
set( EC_HAVE_FSEEKO 1 ) | ||
set( EC_HAVE_FTELLO 1 ) | ||
set( EC_HAVE_LSEEK 0 ) | ||
set( EC_HAVE_FTRUNCATE 0 ) | ||
set( EC_HAVE_OPEN 0 ) | ||
set( EC_HAVE_FOPEN 1 ) | ||
set( EC_HAVE_FMEMOPEN 1 ) | ||
set( EC_HAVE_FUNOPEN 0 ) | ||
set( EC_HAVE_FLOCK 1 ) | ||
set( EC_HAVE_MMAP 1 ) | ||
set( EC_HAVE_POSIX_MEMALIGN 1 ) | ||
set( EC_HAVE_F_GETLK 1 ) | ||
set( EC_HAVE_F_SETLK 1 ) | ||
set( EC_HAVE_F_SETLKW 1 ) | ||
set( EC_HAVE_F_GETLK64 1 ) | ||
set( EC_HAVE_F_SETLK64 1 ) | ||
set( EC_HAVE_F_SETLKW64 1 ) | ||
set( EC_HAVE_MAP_ANONYMOUS 1 ) | ||
set( EC_HAVE_MAP_ANON 1 ) | ||
set( EC_HAVE_ASSERT_H 1 ) | ||
set( EC_HAVE_STDLIB_H 1 ) | ||
set( EC_HAVE_UNISTD_H 1 ) | ||
set( EC_HAVE_STRING_H 1 ) | ||
set( EC_HAVE_STRINGS_H 1 ) | ||
set( EC_HAVE_SYS_STAT_H 1 ) | ||
set( EC_HAVE_SYS_TIME_H 1 ) | ||
set( EC_HAVE_SYS_TYPES_H 1 ) | ||
set( EC_HAVE_MALLOC_H 1 ) | ||
set( EC_HAVE_SYS_MALLOC_H 0 ) | ||
set( EC_HAVE_SYS_PARAM_H 1 ) | ||
set( EC_HAVE_SYS_MOUNT_H 1 ) | ||
set( EC_HAVE_SYS_VFS_H 1 ) | ||
set( EC_HAVE_OFFT 1 ) | ||
set( EC_HAVE_OFF64T 1 ) | ||
set( EC_HAVE_STRUCT_STAT 1 ) | ||
set( EC_HAVE_STRUCT_STAT64 1 ) | ||
set( EC_HAVE_STAT 1 ) | ||
set( EC_HAVE_STAT64 1 ) | ||
set( EC_HAVE_FSTAT 1 ) | ||
set( EC_HAVE_FSTAT64 1 ) | ||
set( EC_HAVE_FSEEKO64 1 ) | ||
set( EC_HAVE_FTELLO64 1 ) | ||
set( EC_HAVE_LSEEK64 1 ) | ||
set( EC_HAVE_OPEN64 1 ) | ||
set( EC_HAVE_FOPEN64 1 ) | ||
set( EC_HAVE_FTRUNCATE64 1 ) | ||
set( EC_HAVE_FLOCK64 1 ) | ||
set( EC_HAVE_MMAP64 1 ) | ||
set( EC_HAVE_STRUCT_STATVFS 1 ) | ||
set( EC_HAVE_STRUCT_STATVFS64 1 ) | ||
set( EC_HAVE_FOPENCOOKIE 1 ) | ||
set( EC_HAVE_FSYNC 1 ) | ||
set( EC_HAVE_FDATASYNC 1 ) | ||
set( EC_HAVE_DIRFD 1 ) | ||
set( EC_HAVE_SYSPROC 0 ) | ||
set( EC_HAVE_SYSPROCFS 1 ) | ||
set( EC_HAVE_EXECINFO_BACKTRACE 1 ) | ||
set( EC_HAVE_GMTIME_R 1 ) | ||
set( EC_HAVE_GETPWUID_R 1 ) | ||
set( EC_HAVE_GETPWNAM_R 1 ) | ||
set( EC_HAVE_READDIR_R 1 ) | ||
set( EC_HAVE_DIRENT_D_TYPE 1 ) | ||
set( EC_HAVE_GETHOSTBYNAME_R 1 ) | ||
set( EC_HAVE_ATTRIBUTE_CONSTRUCTOR 1 ) | ||
set( EC_ATTRIBUTE_CONSTRUCTOR_INITS_ARGV 0 ) | ||
set( EC_HAVE_PROCFS 1 ) | ||
set( EC_HAVE_DLFCN_H 1 ) | ||
set( EC_HAVE_DLADDR 1 ) | ||
set( EC_HAVE_AIOCB 1 ) | ||
set( EC_HAVE_AIOCB64 1 ) | ||
|
||
# Disable relative rpaths as aprun does not respect it | ||
set( ENABLE_RELATIVE_RPATHS OFF CACHE STRING "Disable relative rpaths" FORCE ) | ||
|
||
#################################################################### | ||
# COMPILER | ||
#################################################################### | ||
|
||
set( ECBUILD_FIND_MPI ON ) | ||
set( ECBUILD_TRUST_FLAGS ON ) | ||
|
||
#################################################################### | ||
# Compiler FLAGS | ||
#################################################################### | ||
|
||
# General Flags (add to default) | ||
|
||
set(ECBUILD_Fortran_FLAGS "-g") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -qopenmp-threadprivate compat") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -assume byterecl") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -convert big_endian") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -traceback") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -align array64byte") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -warn nounused,nouncalled") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -march=core-avx2") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -finline-functions") | ||
#set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -finline-limit=1500") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Winline") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -no-fma") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -assume realloc_lhs") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fp-model precise") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -ftz") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fp-speculation=safe") | ||
#set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fast-transcendentals") | ||
|
||
#################################################################### | ||
# LINK FLAGS | ||
#################################################################### | ||
|
||
set( ECBUILD_SHARED_LINKER_FLAGS "-Wl,--eh-frame-hdr -Ktrap=fp" ) | ||
set( ECBUILD_MODULE_LINKER_FLAGS "-Wl,--eh-frame-hdr -Ktrap=fp -Wl,-Map,loadmap" ) | ||
set( ECBUILD_EXE_LINKER_FLAGS "-Wl,--eh-frame-hdr -Ktrap=fp -Wl,-Map,loadmap -Wl,--as-needed" ) | ||
set( ECBUILD_CXX_IMPLICIT_LINK_LIBRARIES "${LIBCRAY_CXX_RTS}" CACHE STRING "" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# (C) Copyright 1988- ECMWF. | ||
# | ||
# This software is licensed under the terms of the Apache Licence Version 2.0 | ||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
# In applying this licence, ECMWF does not waive the privileges and immunities | ||
# granted to it by virtue of its status as an intergovernmental organisation | ||
# nor does it submit to any jurisdiction. | ||
|
||
# Source me to get the correct configure/build/run environment | ||
|
||
# Store tracing and disable (module is *way* too verbose) | ||
{ tracing_=${-//[^x]/}; set +x; } 2>/dev/null | ||
|
||
module_load() { | ||
echo "+ module load $1" | ||
module load $1 | ||
} | ||
module_unload() { | ||
echo "+ module unload $1" | ||
module unload $1 | ||
} | ||
|
||
# Unload all modules to be certain | ||
module purge -f | ||
|
||
# Load modules | ||
module load daint-gpu | ||
module load PrgEnv-nvidia/6.0.10 | ||
module swap nvidia/21.3 nvidia/22.5 | ||
#module load Boost | ||
module load CMake | ||
module load cudatoolkit/11.2.0_3.39-2.1__gf93aa1c # needed for cmake to find hdf5 | ||
module load cray-hdf5-parallel | ||
module load cray-python | ||
|
||
# Increase stack size to maximum | ||
ulimit -S -s unlimited | ||
|
||
set -x | ||
|
||
# Restore tracing to stored setting | ||
{ if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null | ||
|
||
export ECBUILD_TOOLCHAIN="./toolchain.cmake" | ||
export BOOST_ROOT=/users/subbiali/boost/1.82.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# (C) Copyright 1988- ECMWF. | ||
# | ||
# This software is licensed under the terms of the Apache Licence Version 2.0 | ||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
# In applying this licence, ECMWF does not waive the privileges and immunities | ||
# granted to it by virtue of its status as an intergovernmental organisation | ||
# nor does it submit to any jurisdiction. | ||
|
||
#################################################################### | ||
# COMPILER | ||
#################################################################### | ||
|
||
set( ECBUILD_FIND_MPI ON ) | ||
|
||
#################################################################### | ||
# OpenAcc FLAGS | ||
#################################################################### | ||
|
||
# NB: We have to add `-mp` again to avoid undefined symbols during linking | ||
# (smells like an Nvidia bug) | ||
set( OpenACC_Fortran_FLAGS "-acc=gpu -gpu=cc60,lineinfo,fastmath" CACHE STRING "" ) | ||
# Enable this to get more detailed compiler output | ||
# set( OpenACC_Fortran_FLAGS "${OpenACC_Fortran_FLAGS} -Minfo" ) | ||
|
||
#################################################################### | ||
# CUDA FLAGS | ||
#################################################################### | ||
|
||
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES) | ||
set(CMAKE_CUDA_ARCHITECTURES 60) | ||
endif() | ||
if(NOT DEFINED CMAKE_CUDA_COMPILER) | ||
set(CMAKE_CUDA_COMPILER /opt/nvidia/hpc_sdk/Linux_x86_64/21.3/compilers/bin/nvcc) | ||
endif() | ||
|
||
#################################################################### | ||
# COMMON FLAGS | ||
#################################################################### | ||
|
||
set(ECBUILD_Fortran_FLAGS "-fpic") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Mframe") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Mbyteswapio") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Mstack_arrays") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Mrecursive") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Ktrap=fp") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Kieee") | ||
set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Mdaz") | ||
|
||
set( ECBUILD_Fortran_FLAGS_BIT "-O2 -gopt" ) | ||
|
||
set( ECBUILD_C_FLAGS "-O2 -gopt -traceback" ) | ||
|
||
set( ECBUILD_CXX_FLAGS "-O2 -gopt" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# (C) Copyright 1988- ECMWF. | ||
# | ||
# This software is licensed under the terms of the Apache Licence Version 2.0 | ||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
# In applying this licence, ECMWF does not waive the privileges and immunities | ||
# granted to it by virtue of its status as an intergovernmental organisation | ||
# nor does it submit to any jurisdiction. | ||
|
||
# Source me to get the correct configure/build/run environment | ||
|
||
# Store tracing and disable (module is *way* too verbose) | ||
{ tracing_=${-//[^x]/}; set +x; } 2>/dev/null | ||
|
||
module_load() { | ||
echo "+ module load $1" | ||
module load $1 | ||
} | ||
module_unload() { | ||
echo "+ module unload $1" | ||
module unload $1 | ||
} | ||
|
||
# Unload to be certain | ||
module reset | ||
|
||
# Load modules | ||
module_load PrgEnv-cray/8.3.3 | ||
module_load LUMI/22.08 | ||
# module_load partition/G | ||
module_load rocm/5.0.2 | ||
module_load cce/14.0.2 | ||
module_load cray-libsci/22.08.1.1 | ||
module_load cray-mpich/8.1.18 | ||
module_load craype/2.7.17 | ||
module_load craype-accel-amd-gfx90a | ||
module_load buildtools/22.08 | ||
module_load cray-hdf5/1.12.1.5 | ||
module_load cray-python/3.9.12.1 | ||
|
||
module list | ||
|
||
set -x | ||
|
||
export CC=cc CXX=CC FC=ftn | ||
|
||
# Restore tracing to stored setting | ||
{ if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null | ||
|
||
export ECBUILD_TOOLCHAIN="./toolchain.cmake" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be packed in with a general housekeeping PR, as single-precision is effectively not working for the Fortran variants. In my quick and easy experimentation I got floating point errors with Nvidia compiler on host side. Would you mind taking this to a separate PR for proper due diligence?