forked from ESCOMP/CTSM
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Functional CMake build scripts (PR #1)
Created CMake build scripts. Build succeeds on local dev machine (Ubuntu 20.04 LTS) and JUWELS (CentOS 8).
- Loading branch information
Showing
24 changed files
with
3,129 additions
and
44 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
outputs/* | ||
src/externals/mct/*/*.o | ||
src/externals/mct/*/*.mod | ||
src/externals/mct/*/*.a | ||
src/externals/mct/Makefile.conf | ||
src/externals/mct/config.h | ||
src/externals/mct/config.log | ||
src/externals/mct/config.status |
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,40 @@ | ||
#!/usr/bin/env bash | ||
|
||
# ------- User-specified variables ------------ | ||
ARCH="juwels-centos8" | ||
CLM5_TSMP_ROOT=$(git rev-parse --show-toplevel) | ||
BUILD_FOLDER="$CLM5_TSMP_ROOT/outputs/$ARCH/build" | ||
INSTALL_PATH="$CLM5_TSMP_ROOT/outputs/$ARCH/run" | ||
# --------------------------------------------- | ||
|
||
module purge | ||
module use $OTHERSTAGES | ||
module load Stages/2020 | ||
module load Intel | ||
module load ParaStationMPI | ||
module load ESMF | ||
module load NCO | ||
module load Perl | ||
module load CMake | ||
module load parallel-netcdf | ||
module load imkl | ||
module load NCL | ||
module load Python | ||
module li | ||
|
||
echo "NetCDF_C_PATH=$EBROOTNETCDF" | ||
echo "NetCDF_Fortran_PATH=$EBROOTNETCDFMINFORTRAN" | ||
echo "PnetCDF_C_PATH=$EBROOTPARALLELMINNETCDF" | ||
GENF90_PATH=$(pwd) | ||
rm -rf $BUILD_FOLDER | ||
cmake -S "$CLM5_TSMP_ROOT/src" \ | ||
-B "$BUILD_FOLDER" \ | ||
-DCMAKE_MODULE_PATH="$(pwd)/cmake" \ | ||
-DCMAKE_C_COMPILER=mpicc \ | ||
-DCMAKE_Fortran_COMPILER=mpifort \ | ||
-DGENF90_PATH=$GENF90_PATH \ | ||
-DNetCDF_C_PATH=$EBROOTNETCDF \ | ||
-DNetCDF_Fortran_PATH=$EBROOTNETCDFMINFORTRAN \ | ||
-DPnetCDF_PATH=$EBROOTPARALLELMINNETCDF | ||
cmake --build "$BUILD_FOLDER" --clean-first | ||
cmake --install "$BUILD_FOLDER" |
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,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
# ------- User-specified variables ------------ | ||
ARCH="ubuntu-20.04LTS" | ||
CLM5_TSMP_ROOT=$(git rev-parse --show-toplevel) | ||
BUILD_FOLDER="$CLM5_TSMP_ROOT/outputs/$ARCH/build" | ||
INSTALL_PATH="$CLM5_TSMP_ROOT/outputs/$ARCH/run" | ||
# --------------------------------------------- | ||
|
||
NetCDF_ROOT=/opt/custom | ||
GENF90_PATH=$(pwd) | ||
rm -rf $BUILD_FOLDER | ||
cmake -S "$CLM5_TSMP_ROOT/src" \ | ||
-B "$BUILD_FOLDER" \ | ||
-DCMAKE_INSTALL_PREFIX="$INSTALL_PATH" \ | ||
-DCMAKE_MODULE_PATH="$(pwd)/cmake" \ | ||
-DCMAKE_C_COMPILER=mpicc \ | ||
-DCMAKE_Fortran_COMPILER=mpifort \ | ||
-DGENF90_PATH=$GENF90_PATH \ | ||
-DNetCDF_PATH=$NetCDF_ROOT \ | ||
-DPnetCDF_PATH=$NetCDF_ROOT | ||
cmake --build "$BUILD_FOLDER" --clean-first | ||
cmake --install "$BUILD_FOLDER" |
Oops, something went wrong.