From 811ca4da4ad3d3c481f0a8b21331f745e51c04d5 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sun, 15 Mar 2020 19:30:22 -0600 Subject: [PATCH] Support for CCPP with hera.gnu --- ccpp/build_ccpp.sh | 8 +++++++- ccpp/set_compilers.sh | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ccpp/build_ccpp.sh b/ccpp/build_ccpp.sh index f6bec6ff9..b5b8c53d7 100755 --- a/ccpp/build_ccpp.sh +++ b/ccpp/build_ccpp.sh @@ -5,7 +5,7 @@ set -eu # List of valid/tested machines VALID_MACHINES=( wcoss_cray wcoss_dell_p3 gaea.intel jet.intel \ - hera.intel \ + hera.intel hera.gnu \ cheyenne.intel cheyenne.intel-impi cheyenne.gnu cheyenne.pgi endeavor.intel \ stampede.intel supermuc_phase2.intel macosx.gnu \ linux.intel linux.gnu linux.pgi ) @@ -128,6 +128,12 @@ fi if [[ "${MAKE_OPT}" == *"STATIC=Y"* ]]; then CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DSTATIC=ON" else + # hera.gnu uses the NCEPLIBS-external/NCEPLIBS umbrella build libraries, + # which cannot be linked dynamically at this point (missing -fPIC flag) + if [[ "${MACHINE_ID}" == "hera.gnu" ]]; then + echo "Dynamic CCPP build not supported on hera.gnu at this time." + exit 1 + fi # Dynamic builds require linking the NCEPlibs, provide path to them CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DSTATIC=OFF -DBACIO_LIB4=${BACIO_LIB4} -DSP_LIBd=${SP_LIBd} -DW3NCO_LIBd=${W3NCO_LIBd}" fi diff --git a/ccpp/set_compilers.sh b/ccpp/set_compilers.sh index 0f591d6c0..5d797a161 100755 --- a/ccpp/set_compilers.sh +++ b/ccpp/set_compilers.sh @@ -39,6 +39,13 @@ case "$MACHINE_ID" in export F77=mpiifort export F90=mpiifort ;; + hera.gnu) + export CC=mpicc + export CXX=mpicxx + export FC=mpif90 + export F77=mpif77 + export F90=mpif90 + ;; cheyenne.intel) export CC=mpicc export CXX=mpicxx