generated from GEOS-ESM/geos-template-repo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic scripts for building and running GEOS on Discover
- Loading branch information
1 parent
2f2d7c2
commit 4633320
Showing
7 changed files
with
99 additions
and
0 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 @@ | ||
Adapat the `basics.sh` to your local needs. It has been written for Discover and a specific user. |
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,20 @@ | ||
#!/bin/bash | ||
|
||
# Setup tech stack | ||
module use -a /discover/nobackup/projects/geosongpu/sw_sles15/live/modulefiles | ||
module load SMTStack/2024.04.00 | ||
# < load virtual environment to get local NDSL/GT4Py/DaCe > | ||
|
||
# GEOS Build directory | ||
export GEOS_BASEDIR="/discover/nobackup/fgdeconi/work/git/fp" | ||
export GEOS_BUILDIR="$GEOS_BASEDIR/geos/build_SERIALIZE" | ||
export GEOS_INSTALLDIR="$GEOS_BASEDIR/geos/install_SERIALIZE" | ||
|
||
# Experiments | ||
export XP_BASEDIR="/discover/nobackup/fgdeconi/work/git/fp/experiments" | ||
export XP_C24_NAME="TBC_C24_L72" | ||
export XP_C24="$XP_BASEDIR/$XP_C24_NAME" | ||
export TBC_SCRIPTS ="/home/mad/work/TinyBCs-GitV10/scripts/" | ||
|
||
# Build details | ||
$BUILD_CORES=48 #how many cores to build |
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,25 @@ | ||
#!/bin/bash | ||
|
||
source ./basics.sh | ||
|
||
rm -rf $GEOS_BUILDIR | ||
mkdir -p $GEOS_BUILDIR | ||
cd $GEOS_BUILDIR | ||
export TMP="$GEOS_BUILDIR/tmp" | ||
export TMPDIR=$TMP | ||
export TEMP=$TMP | ||
mkdir -p $TMP | ||
|
||
export FC=mpif90 | ||
export CC=mpicc | ||
export CXX=mpic++ | ||
|
||
cmake .. -DBASEDIR=$BASEDIR/Linux \ | ||
-DCMAKE_Fortran_COMPILER=mpif90 \ | ||
-DBUILD_PYFV3_INTERFACE=OFF \ | ||
-DBUILD_PYMOIST_INTERFACE=OFF \ | ||
-DCMAKE_INSTALL_PREFIX=$GEOS_INSTALLDIR \ | ||
-DPython3_EXECUTABLE=`which python3` \ | ||
-DBUILD_SERIALBOX_SER=ON \ | ||
-DSERIALBOX_ROOT=$SERIALBOX_ROOT \ | ||
-DCMAKE_BUILD_TYPE=Debug |
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,12 @@ | ||
#!/bin/bash | ||
|
||
source ./basics.sh | ||
|
||
|
||
cd $GEOS_BUILDIR | ||
|
||
export TMP="$GEOS_BUILDIR/tmp" | ||
export TMPDIR=$TMP | ||
export TEMP=$TMP | ||
|
||
make -j$BUILD_CORES install |
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,6 @@ | ||
#!/bin/bash | ||
|
||
source ./basics.sh | ||
|
||
./make.sh | ||
./xp_C24_run.sh |
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,27 @@ | ||
#!/bin/bash | ||
|
||
source ./basics.sh | ||
|
||
rm -rf $XP_C24 | ||
mkdir -p $XP_C24 | ||
|
||
cd $GEOS_INSTALLDIR/bin | ||
$TBC_SCRIPTS/create_expt.py \ | ||
--horz c24 --vert 72 \ | ||
--nonhydro --nooserver \ | ||
--moist GFDL \ | ||
--link \ | ||
--expdir $XP_BASEDIR \ | ||
$XP_C24_NAME | ||
|
||
# Make one day - pre-written script - | ||
cd $XP_C24 | ||
$TBC_SCRIPTS/makeoneday.bash | ||
|
||
# Make 1x1 layout | ||
sed -e "/^ *NX:/ s/\([0-9]\+\)/1/" AGCM.rc | ||
sed -e "/^ *NY:/ s/\([0-9][0-9]\+\)/6/" AGCM.rc | ||
|
||
# Make 1ts for serialization | ||
sed -e '/^JOB_SGMT:/s/000000[0-9][0-9] 000000/00000000 003001/' CAP.rc | ||
|
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 @@ | ||
#!/bin/bash | ||
|
||
# On discover `salloc` first wih ntasks=6 | ||
|
||
source ./basics.sh | ||
|
||
cd $XP_C24 | ||
./gcm_run.j |