Skip to content

Commit

Permalink
Use modulefiles of component instead of top-level modulefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielabdi-noaa committed Aug 29, 2022
1 parent c781c66 commit 0a937e7
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions devbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,35 @@ source ${SRW_DIR}/etc/lmod-setup.sh $MACHINE

# source the module file for this platform/compiler combination, then build the code
printf "... Load MODULE_FILE and create BUILD directory ...\n"
module use ${SRW_DIR}/modulefiles
module load ${MODULE_FILE}
if [ $BUILD_UFS = "on" ]; then
module use ${SRW_DIR}/sorc/ufs-weather-model/modulefiles
MODULE_FILE="ufs_${PLATFORM}.${COMPILER}"
if [ $BUILD_TYPE != "RELEASE" ]; then
MODULE_FILE="${MODULE_FILE}.debug"
fi
module load ${MODULE_FILE}
fi
if [ $BUILD_UFS_UTILS = "on" ]; then
module use ${SRW_DIR}/sorc/UFS_UTILS/modulefiles
MODULE_FILE="build.${PLATFORM}.${COMPILER}"
module load ${MODULE_FILE}
fi
if [ $BUILD_UPP = "on" ]; then
module use ${SRW_DIR}/sorc/UPP/modulefiles
MODULE_FILE="${PLATFORM}"
module load ${MODULE_FILE}
fi
if [ $BUILD_GSI = "on" ]; then
module use ${SRW_DIR}/sorc/gsi/modulefiles
MODULE_FILE="gsi_${PLATFORM}.${COMPILER}"
module load ${MODULE_FILE}
fi
if [ $BUILD_RRFS_UTILS = "on" ] || [ $DEFAULT_BUILD = true ]; then
module use ${SRW_DIR}/modulefiles
module load ${MODULE_FILE}
fi
module list

mkdir -p ${BUILD_DIR}
cd ${BUILD_DIR}

Expand Down

0 comments on commit 0a937e7

Please sign in to comment.