diff --git a/package/bundle/arch/eurohpc/lumi/cray-gpu/17.0.1/env.sh b/package/bundle/arch/eurohpc/lumi/cray-gpu/17.0.1/env.sh new file mode 100644 index 00000000..0144363a --- /dev/null +++ b/package/bundle/arch/eurohpc/lumi/cray-gpu/17.0.1/env.sh @@ -0,0 +1,72 @@ +# (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 LUMI/24.03 +module_load partition/G +module_load PrgEnv-cray/8.4.0 +module_load cce/17.0.1 +# module_load cray-mpich/8.1.27 +module_load cray-mpich/8.1.29 +module_load craype-network-ofi +module_load rocm/6.0.3 +module_load buildtools/24.03 +# module_load Boost/1.82.0-cpeCray-23.09 +module_load cray-libsci/24.03.0 +module_load Boost/1.83.0-cpeCray-24.03 +module_load cray-python/3.10.10 +module_load craype-x86-trento +module_load craype-accel-amd-gfx90a +module_load libaec/1.0.6-cpeCray-24.03 + +### Handling of "magic" cray modules +# 1) Load the cray modules +# module_load cray-hdf5/1.12.2.7 +module_load cray-hdf5/1.12.2.11 +# 2) Store variables to locate the packages +_HDF5_ROOT=${CRAY_HDF5_PREFIX} +# 3) Unload the cray modules in reverse order, removing all the magic +module_unload cray-hdf5 +# 4) Define variables that CMake introspects +export HDF5_ROOT=${_HDF5_ROOT} + +# Export environment variable3s +export MPI_HOME=${MPICH_DIR} +export CC=cc +export CXX=CC +export FC=ftn +export HIPCXX=$(hipconfig --hipclangpath)/clang++ + +module list + +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" +path=$BASH_SOURCE +DIR_PATH=$(dirname $path) +export ECBUILD_TOOLCHAIN=$DIR_PATH/toolchain.cmake diff --git a/package/bundle/arch/eurohpc/lumi/cray-gpu/17.0.1/toolchain.cmake b/package/bundle/arch/eurohpc/lumi/cray-gpu/17.0.1/toolchain.cmake new file mode 100644 index 00000000..2b775719 --- /dev/null +++ b/package/bundle/arch/eurohpc/lumi/cray-gpu/17.0.1/toolchain.cmake @@ -0,0 +1,59 @@ +# (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 OFF ) +set( ENABLE_USE_STMT_FUNC ON CACHE STRING "" ) + +#################################################################### +# OpenMP FLAGS +#################################################################### + +set( OpenMP_C_FLAGS "-fopenmp" CACHE STRING "" ) +set( OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "" ) +set( OpenMP_Fortran_FLAGS "-homp -hlist=aimd" CACHE STRING "" ) +set( OpenMP_C_LIB_NAMES "craymp" CACHE STRING "" ) +set( OpenMP_CXX_LIB_NAMES "craymp" CACHE STRING "" ) +set( OpenMP_Fortran_LIB_NAMES "craymp" CACHE STRING "" ) +set( OpenMP_craymp_LIBRARY "/opt/cray/pe/cce/17.0.1/cce/x86_64/lib/libcraymp.so" CACHE STRING "" ) + +#################################################################### +# OpenACC FLAGS +#################################################################### + +set( OpenACC_C_FLAGS "-hacc" CACHE STRING "" ) +# set( OpenACC_CXX_FLAGS "-hacc" CACHE STRING "" ) +# set( OpenACC_Fortran_FLAGS "-hacc" CACHE STRING "" ) + +#################################################################### +# Compiler FLAGS +#################################################################### + +# General Flags (add to default) +# set(ECBUILD_Fortran_FLAGS "-hcontiguous") # -dh +# set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -hbyteswapio") +# set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Wl, --as-needed") +# set(ECBUILD_Fortran_FLAGS_BIT "-O3 -hfp1 -hscalar3 -hvector3 -G2 -haggress -DNDEBUG") + +# seems like this flag doesn't work with CCE17 ... +# set(ECBUILD_Fortran_FLAGS "-hsystem_alloc") +set(ECBUILD_Fortran_FLAGS "") +set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -hbyteswapio") +set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -h acc_model=auto_async_none") +set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Wl, --as-needed") +set(ECBUILD_Fortran_FLAGS_BIT "-O3 -hfp1 -hscalar3 -hvector3 -G2 -haggress -DNDEBUG") + +if(NOT DEFINED CMAKE_HIP_ARCHITECTURES) + set(CMAKE_HIP_ARCHITECTURES gfx90a) +endif() + +# select OpenMP pragma to be used +# set( HAVE_OMP_TARGET_LOOP_CONSTRUCT_BIND_PARALLEL OFF CACHE BOOL "" ) diff --git a/package/bundle/bundle.yml b/package/bundle/bundle.yml index 078773c8..2a97a178 100644 --- a/package/bundle/bundle.yml +++ b/package/bundle/bundle.yml @@ -25,11 +25,11 @@ projects : - fiat : git : https://github.com/ecmwf-ifs/fiat - version : main + version : nams-lumi-cce17 - field_api : git : https://github.com/ecmwf-ifs/field_api.git - version : naan-lumi + version : nams-naan-lumi-cce17 cmake : > ENABLE_SINGLE_PRECISION=OFF