Skip to content
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

Combined PR: hpc-stack locations, Disable Fused Multiply Add, and Enable usage of shared pio #1645

Merged
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b577fd7
option to disable fma
SamuelTrahanNOAA Feb 3, 2023
f6160c9
Gaea system: change in hpc-stack location, miniconda3 (EPIC-managed)
Feb 17, 2023
56d00eb
Lmod 8.7.12 initialization for Gaea; use of modulefiles directory for…
Feb 17, 2023
d6b5d3e
move DISABLE_FMA to one if at the end
SamuelTrahanNOAA Feb 17, 2023
a0601af
only disable fma on wcoss if FASTER=ON
SamuelTrahanNOAA Feb 17, 2023
1d714f3
Merge remote-tracking branch 'upstream/develop' into disable-fma
SamuelTrahanNOAA Feb 17, 2023
e1e1f9f
Update CMakeModules to develop; remove STATIC requirement from PIO find.
ulmononian Mar 3, 2023
e23ee7d
Merge branch 'ufs-community:develop' into pio_cmake
ulmononian Mar 3, 2023
e134463
Merge remote-tracking branch 'ulmononian/pio_cmake' into disable-fma
SamuelTrahanNOAA Mar 7, 2023
2183d6c
Merge remote-tracking branch 'upstream/develop' into pio-cmake-disabl…
SamuelTrahanNOAA Mar 7, 2023
3e572d8
Merge remote-tracking branch 'natalie-perlin/develop_gaea' into pio-c…
SamuelTrahanNOAA Mar 8, 2023
7743e6c
modulefiles => $PWD/modulefiles
SamuelTrahanNOAA Mar 8, 2023
c776a8f
jet tests passed
SamuelTrahanNOAA Mar 8, 2023
a7820c4
Update rt.sh
zach1221 Mar 8, 2023
39e363d
add cheyenne intel.gnu RT logs: passed
jkbk2004 Mar 8, 2023
6d824f5
fix mistake in editing; the $PWD/ should be in the module use line on…
SamuelTrahanNOAA Mar 8, 2023
9b43bd0
Merge branch 'pio-cmake-disable-fma' of ssh://github.com/SamuelTrahan…
SamuelTrahanNOAA Mar 8, 2023
cd41c26
[AutoRT] hera.intel Job Completed.
jkbk2004 Mar 8, 2023
463ede8
add hera.gnu RT logs: passed
zach1221 Mar 8, 2023
11a1fc4
[AutoRT] orion.intel Job Completed.
jkbk2004 Mar 9, 2023
867add1
add gaea.intel RT logs: passed
zach1221 Mar 9, 2023
a9dfe49
Acorn Intel RT Log
BrianCurtis-NOAA Mar 9, 2023
c70d123
WCOSS2 Intel RT Log
BrianCurtis-NOAA Mar 9, 2023
1d3c2da
add jet.intel RT logs: passed
zach1221 Mar 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ set(AVX OFF CACHE BOOL "Enable AVX-I instruction set")
set(SIMDMULTIARCH OFF CACHE BOOL "Enable multi-target SIMD instruction sets")
set(DEBUG OFF CACHE BOOL "Enable DEBUG mode")
set(DEBUG_LINKMPI ON CACHE BOOL "Enable linkmpi option when DEBUG mode is on")
set(DISABLE_FMA OFF CACHE BOOL "Disable Fused Multiply-Add instructions (workaround needed for AMD EPYC)" FORCE)
set(INLINE_POST ON CACHE BOOL "Enable inline post")
set(MULTI_GASES OFF CACHE BOOL "Enable MULTI_GASES")
set(MOVING_NEST OFF CACHE BOOL "Enable moving nest code")
Expand Down Expand Up @@ -137,7 +138,7 @@ if(FMS)
endif()

if(CMEPS)
find_package(PIO 2.5.3 REQUIRED COMPONENTS C Fortran STATIC)
find_package(PIO 2.5.3 REQUIRED COMPONENTS C Fortran)
endif()

find_package(bacio 2.4.0 REQUIRED)
Expand Down
6 changes: 6 additions & 0 deletions cmake/Intel.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ if(APPLE)
# Passing the -c flag includes them and fixes an error with undefined symbols
set(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> -c <TARGET>")
endif()

# This must be last, to override all other optimization settings.
if(DISABLE_FMA)
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -no-fma")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -no-fma")
endif()
4 changes: 4 additions & 0 deletions cmake/configure_acorn.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
set(PARALLEL_NETCDF ON CACHE BOOL "Enable parallel NetCDF" FORCE)
set(DEBUG_LINKMPI OFF CACHE BOOL "Enable linkmpi option when DEBUG mode is on" FORCE)
set(AVX2 OFF CACHE BOOL "Enable AVX2 instruction set" FORCE)

if(FASTER)
set(DISABLE_FMA ON CACHE BOOL "Disable Fused Multiply-Add instructions (workaround needed for AMD EPYC)" FORCE)
endif()
4 changes: 4 additions & 0 deletions cmake/configure_wcoss2.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
set(PARALLEL_NETCDF ON CACHE BOOL "Enable parallel NetCDF" FORCE)
set(DEBUG_LINKMPI OFF CACHE BOOL "Enable linkmpi option when DEBUG mode is on" FORCE)
set(AVX2 OFF CACHE BOOL "Enable AVX2 instruction set" FORCE)

if(FASTER)
set(DISABLE_FMA ON CACHE BOOL "Disable Fused Multiply-Add instructions (workaround needed for AMD EPYC)" FORCE)
endif()
56 changes: 0 additions & 56 deletions modulefiles/ufs_gaea.intel

This file was deleted.

35 changes: 35 additions & 0 deletions modulefiles/ufs_gaea.intel.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
help([[
This module loads libraries required for building and running UFS Weather Model
on the NOAA RDHPC machine Gaea using Intel-2022.1.2
]])

whatis([===[Loads libraries needed for building the UFS Weather Model on Gaea ]===])

prepend_path("MODULEPATH", "/lustre/f2/dev/role.epic/contrib/modulefiles")
load(pathJoin("miniconda3",os.getenv("miniconda_ver") or "4.12.0"))

load(pathJoin("cmake", os.getenv("cmake_ver") or "3.20.1"))

prepend_path("MODULEPATH","/lustre/f2/dev/role.epic/contrib/hpc-stack/intel-2021.3.0_noarch/modulefiles/stack")
load(pathJoin("hpc", os.getenv("hpc_ver") or "1.2.0"))
load(pathJoin("intel", os.getenv("intel_ver") or "2021.3.0"))
load(pathJoin("hpc-intel", os.getenv("hpc_intel_ver") or "2021.3.0"))
load(pathJoin("hpc-cray-mpich", os.getenv("hpc_cray_mpich_ver") or "7.7.11"))
load(pathJoin("gcc", os.getenv("gcc_ver") or "8.3.0"))
load(pathJoin("libpng", os.getenv("libpng_ver") or "1.6.37"))

-- needed for WW3 build
load(pathJoin("gcc", os.getenv("gcc_ver") or "8.3.0"))
-- Needed at runtime:
load("alps")
load("rocoto")

load("ufs_common")

setenv("CC","cc")
setenv("FC","ftn")
setenv("CXX","CC")
setenv("CMAKE_C_COMPILER","cc")
setenv("CMAKE_CXX_COMPILER","CC")
setenv("CMAKE_Fortran_COMPILER","ftn")
setenv("CMAKE_Platform","gaea.intel")
53 changes: 0 additions & 53 deletions modulefiles/ufs_gaea.intel_debug

This file was deleted.

35 changes: 35 additions & 0 deletions modulefiles/ufs_gaea.intel_debug.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
help([[
This module loads libraries required for building and running UFS Weather Model
on the NOAA RDHPC machine Gaea using Intel-2022.1.2
]])

whatis([===[Loads libraries needed for building the UFS Weather Model and debug on Gaea ]===])

prepend_path("MODULEPATH", "/lustre/f2/dev/role.epic/contrib/modulefiles")
load(pathJoin("miniconda3",os.getenv("miniconda_ver") or "4.12.0"))

load(pathJoin("cmake", os.getenv("cmake_ver") or "3.20.1"))

prepend_path("MODULEPATH","/lustre/f2/dev/role.epic/contrib/hpc-stack/intel-2021.3.0_noarch/modulefiles/stack")
load(pathJoin("hpc", os.getenv("hpc_ver") or "1.2.0"))
load(pathJoin("intel", os.getenv("intel_ver") or "2021.3.0"))
load(pathJoin("hpc-intel", os.getenv("hpc_intel_ver") or "2021.3.0"))
load(pathJoin("hpc-cray-mpich", os.getenv("hpc_cray_mpich_ver") or "7.7.11"))
load(pathJoin("gcc", os.getenv("gcc_ver") or "8.3.0"))
load(pathJoin("libpng", os.getenv("libpng_ver") or "1.6.37"))

-- needed for WW3 build
load(pathJoin("gcc", os.getenv("gcc_ver") or "8.3.0"))
-- Needed at runtime:
load("alps")
load("rocoto")

load("ufs_common_debug")

setenv("CC","cc")
setenv("FC","ftn")
setenv("CXX","CC")
setenv("CMAKE_C_COMPILER","cc")
setenv("CMAKE_CXX_COMPILER","CC")
setenv("CMAKE_Fortran_COMPILER","ftn")
setenv("CMAKE_Platform","gaea.intel")
6 changes: 3 additions & 3 deletions tests/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if [[ $MACHINE_ID == macosx.* ]] || [[ $MACHINE_ID == linux.* ]]; then
else
# Activate lua environment for gaea
if [[ $MACHINE_ID == gaea.* ]] ; then
source /lustre/f2/pdata/esrl/gsd/contrib/lua-5.1.4.9/init/init_lmod.sh
source /lustre/f2/dev/role.epic/contrib/Lmod_init.sh
fi
# Load fv3 module
module use $PATHTR/modulefiles
Expand Down Expand Up @@ -132,13 +132,13 @@ bash -x ${PATHTR}/build.sh

mv ${BUILD_DIR}/ufs_model ${PATHTR}/tests/${BUILD_NAME}.exe
if [[ "${MAKE_OPT}" == "-DDEBUG=ON" ]]; then
if [[ $MACHINE_ID == gaea.* ]] || [[ $MACHINE_ID == linux.* ]]; then
if [[ $MACHINE_ID == linux.* ]]; then
cp ${PATHTR}/modulefiles/ufs_${MACHINE_ID}_debug ${PATHTR}/tests/modules.${BUILD_NAME}
else
cp ${PATHTR}/modulefiles/ufs_${MACHINE_ID}_debug.lua ${PATHTR}/tests/modules.${BUILD_NAME}.lua
fi
else
if [[ $MACHINE_ID == gaea.* ]] || [[ $MACHINE_ID == linux.* ]]; then
if [[ $MACHINE_ID == linux.* ]]; then
cp ${PATHTR}/modulefiles/ufs_${MACHINE_ID} ${PATHTR}/tests/modules.${BUILD_NAME}
else
cp ${PATHTR}/modulefiles/ufs_${MACHINE_ID}.lua ${PATHTR}/tests/modules.${BUILD_NAME}.lua
Expand Down
2 changes: 1 addition & 1 deletion tests/fv3_conf/fv3_qsub.IN_cheyenne
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [[ ! -d modulefiles ]]; then
mkdir modulefiles
mv *.lua modulefiles
fi
module use modulefiles
module use $PWD/modulefiles
module load modules.fv3
module list
set -x
Expand Down
4 changes: 2 additions & 2 deletions tests/fv3_conf/fv3_qsub.IN_wcoss2
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ echo -n " $( date +%s )," > job_timestamp.txt
cd $PBS_O_WORKDIR

set +x
module use $( pwd -P )
module load modules.fv3
module use modulefiles
junwang-noaa marked this conversation as resolved.
Show resolved Hide resolved
module load $PWD/modules.fv3
module load cray-pals
module list
set -x
Expand Down
2 changes: 1 addition & 1 deletion tests/fv3_conf/fv3_slurm.IN_expanse
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ echo -n " $( date +%s )," > job_timestamp.txt
set +x
MACHINE_ID=expanse
source ./module-setup.sh
module use $( pwd -P )
module use $PWD/modulefiles
module load modules.fv3
module list
set -x
Expand Down
3 changes: 1 addition & 2 deletions tests/fv3_conf/fv3_slurm.IN_gaea
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ echo -n " $( date +%s )," > job_timestamp.txt
set +x
MACHINE_ID=gaea
source ./module-setup.sh
source /lustre/f2/pdata/esrl/gsd/contrib/lua-5.1.4.9/init/init_lmod.sh
module use $( pwd -P )
module use --prepend $PWD/modulefiles
module load modules.fv3
module list
set -x
Expand Down
2 changes: 1 addition & 1 deletion tests/fv3_conf/fv3_slurm.IN_hera
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ echo -n " $( date +%s )," > job_timestamp.txt
set +x
MACHINE_ID=hera
source ./module-setup.sh
module use $( pwd -P )
module use $PWD/modulefiles
module load modules.fv3
module list
set -x
Expand Down
2 changes: 1 addition & 1 deletion tests/fv3_conf/fv3_slurm.IN_jet
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ echo -n " $( date +%s )," > job_timestamp.txt
set +x
MACHINE_ID=jet
source ./module-setup.sh
module use $( pwd -P )
module use $PWD/modulefiles
module load modules.fv3
module list
set -x
Expand Down
2 changes: 1 addition & 1 deletion tests/fv3_conf/fv3_slurm.IN_orion
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ echo -n " $( date +%s )," > job_timestamp.txt
set +x
MACHINE_ID=orion
source ./module-setup.sh
module use $( pwd -P )
module use $PWD/modulefiles
module load modules.fv3
module list
set -x
Expand Down
2 changes: 1 addition & 1 deletion tests/fv3_conf/fv3_slurm.IN_s4
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ echo -n " $( date +%s )," > job_timestamp.txt
set +x
MACHINE_ID=s4
source ./module-setup.sh
module use $( pwd -P )
module use $PWD/modulefiles
module load modules.fv3
module list
set -x
Expand Down
2 changes: 1 addition & 1 deletion tests/fv3_conf/fv3_slurm.IN_stampede
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ echo -n " $( date +%s )," > job_timestamp.txt
set +x
MACHINE_ID=stampede
source ./module-setup.sh
module use $( pwd -P )
module use $PWD/modulefiles
module load modules.fv3
module list
set -x
Expand Down
27 changes: 1 addition & 26 deletions tests/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,33 +60,8 @@ elif [[ $MACHINE_ID = gaea* ]] ; then
# the module command fails. Hence we actually have to source
# /etc/profile here.
source /etc/profile
__ms_source_etc_profile=yes
else
__ms_source_etc_profile=no
fi
module purge
# clean up after purge
unset _LMFILES_
unset _LMFILES_000
unset _LMFILES_001
unset LOADEDMODULES
module load modules
if [[ -d /opt/cray/ari/modulefiles ]] ; then
module use -a /opt/cray/ari/modulefiles
fi
if [[ -d /opt/cray/pe/ari/modulefiles ]] ; then
module use -a /opt/cray/pe/ari/modulefiles
fi
if [[ -d /opt/cray/pe/craype/default/modulefiles ]] ; then
module use -a /opt/cray/pe/craype/default/modulefiles
fi
if [[ -s /etc/opt/cray/pe/admin-pe/site-config ]] ; then
source /etc/opt/cray/pe/admin-pe/site-config
fi
if [[ "$__ms_source_etc_profile" == yes ]] ; then
source /etc/profile
unset __ms_source_etc_profile
fi
source /lustre/f2/dev/role.epic/contrib/Lmod_init.sh

elif [[ $MACHINE_ID = expanse* ]]; then
# We are on SDSC Expanse
Expand Down
4 changes: 2 additions & 2 deletions tests/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ if [[ $TESTS_FILE =~ '35d' ]] || [[ $TESTS_FILE =~ 'weekly' ]]; then
fi


BL_DATE=20230227
BL_DATE=20230308

RTPWD=${RTPWD:-$DISKNM/NEMSfv3gfs/develop-${BL_DATE}/${RT_COMPILER^^}}

Expand Down Expand Up @@ -821,7 +821,7 @@ else
echo ; echo REGRESSION TEST WAS SUCCESSFUL
(echo ; echo REGRESSION TEST WAS SUCCESSFUL) >> ${REGRESSIONTEST_LOG}

rm -f fv3_*.x fv3_*.exe modules.fv3_* keep_tests.tmp
rm -f fv3_*.x fv3_*.exe modules.fv3_* modulefiles/modules.fv3_* keep_tests.tmp
[[ ${KEEP_RUNDIR} == false ]] && rm -rf ${RUNDIR_ROOT}
[[ ${ROCOTO} == true ]] && rm -f ${ROCOTO_XML} ${ROCOTO_DB} ${ROCOTO_STATE} *_lock.db
[[ ${TEST_35D} == true ]] && rm -f tests/cpld_bmark*_20*
Expand Down
Loading