forked from dalesteam/dales
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bash scripts for runing Dales on JUWELS and yamo
- Loading branch information
Showing
23 changed files
with
1,028 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,82 @@ | ||
#!/bin/bash | ||
# | ||
# on which CPU to run | ||
export ICPU="2,3,4,5" # as tested by Niklas | ||
#---------------------------------------------------------------------- | ||
# Script for running DALES# | ||
#---------------------------------------------------------------------- | ||
# | ||
# - requires following variables: | ||
# $USERN :: username | ||
# $DAYC :: current day of model of code adjustment/compilation | ||
# | ||
# ---------------------------------------- | ||
# based on tcshell scritps from prof Roel Neggers | ||
# scripted and checked by Jan Chylik, August 2016 | ||
# inquiries and error reports: [email protected] | ||
# | ||
# last update: 21 September 2016, 11 January 2017 | ||
|
||
# === setting ================================================ | ||
# if the script is run from dales_prepare.sh, the setting does not require any changes | ||
|
||
# ---- directory setting --------------------------------- | ||
# directroy in which to run | ||
export rundir=./ | ||
# # export rundir=/work/${USERN}/dales/dales4/experiments/Juelich/juelich20130605_imicro2_16x16 | ||
# busy file | ||
export busyfile="runDALES_busy.txt" | ||
# runlog | ||
export RUNLOG="runlog.txt" | ||
# setting | ||
export N_MPI=4 | ||
# 1 | ||
export DALES="dales4" | ||
# === script ============================================== | ||
|
||
#------------- important directories ---------------------- | ||
|
||
|
||
|
||
# -------- run itself ------------------------------------ | ||
|
||
if [ ! -e $busyfile ]; then | ||
|
||
#--- create file indicating that job is ongoing --- | ||
echo "runDALES job is busy ... don't interfere!" > $busyfile | ||
|
||
cd ${rundir} | ||
|
||
#echo "test" > test.txt | ||
|
||
# running dales | ||
echo "Starting dales run, you can view the run log ${rundir}$RUNLOG " | ||
echo "You can view it in other terminal." | ||
echo "Do not close this terminal until the job is finished." | ||
#./dales_roel4_20140423 | ||
# mpirun -np $N_MPI ./${DALES_VERSION}_${USERN}_${DAYC}_${MACHINE_TYPE}>$RUNLOG | ||
mpirun -np $N_MPI --report-bindings --cpu-list ${ICPU} ${DALES}>$RUNLOG | ||
# mpirun -np $N_MPI ${DALES}>$RUNLOG | ||
# note: it keeps the name of the original executable so we can have more different dales executables possibly used alongside each other if needed | ||
|
||
#--- cleanup --- | ||
rm $busyfile | ||
|
||
echo " " | ||
echo "Dales run has ended." | ||
exit 0 | ||
|
||
else | ||
|
||
echo " " | ||
echo "A runDALES job is already in progress ... aborting" | ||
echo "Exitting with exit status 3" | ||
exit 3 | ||
|
||
fi | ||
|
||
|
||
|
||
# =========================================================== | ||
|
||
|
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,82 @@ | ||
#!/bin/bash | ||
# | ||
# on which CPU to run | ||
export ICPU="17,18,19,20" # as tested by Niklas | ||
#---------------------------------------------------------------------- | ||
# Script for running DALES# | ||
#---------------------------------------------------------------------- | ||
# | ||
# - requires following variables: | ||
# $USERN :: username | ||
# $DAYC :: current day of model of code adjustment/compilation | ||
# | ||
# ---------------------------------------- | ||
# based on tcshell scritps from prof Roel Neggers | ||
# scripted and checked by Jan Chylik, August 2016 | ||
# inquiries and error reports: [email protected] | ||
# | ||
# last update: 21 September 2016, 11 January 2017 | ||
|
||
# === setting ================================================ | ||
# if the script is run from dales_prepare.sh, the setting does not require any changes | ||
|
||
# ---- directory setting --------------------------------- | ||
# directroy in which to run | ||
export rundir=./ | ||
# # export rundir=/work/${USERN}/dales/dales4/experiments/Juelich/juelich20130605_imicro2_16x16 | ||
# busy file | ||
export busyfile="runDALES_busy.txt" | ||
# runlog | ||
export RUNLOG="runlog.txt" | ||
# setting | ||
export N_MPI=4 | ||
# 1 | ||
export DALES="dales4" | ||
# === script ============================================== | ||
|
||
#------------- important directories ---------------------- | ||
|
||
|
||
|
||
# -------- run itself ------------------------------------ | ||
|
||
if [ ! -e $busyfile ]; then | ||
|
||
#--- create file indicating that job is ongoing --- | ||
echo "runDALES job is busy ... don't interfere!" > $busyfile | ||
|
||
cd ${rundir} | ||
|
||
#echo "test" > test.txt | ||
|
||
# running dales | ||
echo "Starting dales run, you can view the run log ${rundir}$RUNLOG " | ||
echo "You can view it in other terminal." | ||
echo "Do not close this terminal until the job is finished." | ||
#./dales_roel4_20140423 | ||
# mpirun -np $N_MPI ./${DALES_VERSION}_${USERN}_${DAYC}_${MACHINE_TYPE}>$RUNLOG | ||
mpirun -np $N_MPI --report-bindings --cpu-list ${ICPU} --bind-to cpu-list:ordered ${DALES}>$RUNLOG | ||
# mpirun -np $N_MPI ${DALES}>$RUNLOG | ||
# note: it keeps the name of the original executable so we can have more different dales executables possibly used alongside each other if needed | ||
|
||
#--- cleanup --- | ||
rm $busyfile | ||
|
||
echo " " | ||
echo "Dales run has ended." | ||
exit 0 | ||
|
||
else | ||
|
||
echo " " | ||
echo "A runDALES job is already in progress ... aborting" | ||
echo "Exitting with exit status 3" | ||
exit 3 | ||
|
||
fi | ||
|
||
|
||
|
||
# =========================================================== | ||
|
||
|
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 @@ | ||
runDALES_n8nod1_cheops2023_gcc_openmpi.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,29 @@ | ||
#!/bin/bash -l | ||
#SBATCH --partition=devel-rh7 | ||
#SBATCH --ntasks=8 | ||
#SBATCH --nodes=2 | ||
#SBATCH --ntasks-per-node=4 | ||
#SBATCH --mem=40gb # --mem-per-cpu=20gb | ||
#SBATCH --time=1:00:00 | ||
#SBATCH --account=UniKoeln | ||
|
||
# number of nodes in $SLURM_NNODES (default: 1) | ||
# number of tasks in $SLURM_NTASKS (default: 1) | ||
# number of tasks per node in $SLURM_NTASKS_PER_NODE (default: 1) | ||
# number of threads per task in $SLURM_CPUS_PER_TASK (default: 1) | ||
|
||
|
||
# load modules | ||
module load netcdf/4.9.0_gnu gnu/7.4.0 # !! these versions agree (2023) | ||
module load openmpi | ||
module load cmake | ||
|
||
|
||
echo "# of nodes, tasks:" $SLURM_NNODES $SLURM_NTASKS | ||
|
||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/rrzk/lib/netcdf/f_4.6.0_gnu_7.4.0/lib/" | ||
|
||
srun -n $SLURM_NTASKS dales4 | ||
|
||
|
||
|
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 @@ | ||
runDALES_n32nod2_juwels2023_gcc_parastation.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 @@ | ||
runDALES_n32nod2_levante2023_gcc_openmpi.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,77 @@ | ||
#!/bin/bash | ||
#---------------------------------------------------------------------- | ||
# Script for running DALES# | ||
#---------------------------------------------------------------------- | ||
# | ||
# - requires following variables: | ||
# $USERN :: username | ||
# $DAYC :: current day of model of code adjustment/compilation | ||
# | ||
# ---------------------------------------- | ||
# based on tcshell scritps from prof Roel Neggers | ||
# scripted and checked by Jan Chylik, August 2016 | ||
# inquiries and error reports: [email protected] | ||
# | ||
# last update: 21 September 2016, 11 January 2017 | ||
|
||
# === setting ================================================ | ||
# if the script is run from dales_prepare.sh, the setting does not require any changes | ||
|
||
# ---- directory setting --------------------------------- | ||
# directroy in which to run | ||
export rundir=./ | ||
# # export rundir=/work/${USERN}/dales/dales4/experiments/Juelich/juelich20130605_imicro2_16x16 | ||
# busy file | ||
export busyfile="runDALES_busy.txt" | ||
# runlog | ||
export RUNLOG="runlog.txt" | ||
# setting | ||
export N_MPI=1 | ||
export DALES="dales4" | ||
# === script ============================================== | ||
|
||
#------------- important directories ---------------------- | ||
|
||
|
||
|
||
# -------- run itself ------------------------------------ | ||
|
||
if [ ! -e $busyfile ]; then | ||
|
||
#--- create file indicating that job is ongoing --- | ||
echo "runDALES job is busy ... don't interfere!" > $busyfile | ||
|
||
cd ${rundir} | ||
|
||
#echo "test" > test.txt | ||
|
||
# running dales | ||
echo "Starting dales run, you can view the run log ${rundir}$RUNLOG " | ||
echo "You can view it in other terminal." | ||
echo "Do not close this terminal until the job is finished." | ||
#./dales_roel4_20140423 | ||
# mpirun -np $N_MPI ./${DALES_VERSION}_${USERN}_${DAYC}_${MACHINE_TYPE}>$RUNLOG | ||
mpirun -np $N_MPI ${DALES}>$RUNLOG | ||
# note: it keeps the name of the original executable so we can have more different dales executables possibly used alongside each other if needed | ||
|
||
#--- cleanup --- | ||
rm $busyfile | ||
|
||
echo " " | ||
echo "Dales run has ended." | ||
exit 0 | ||
|
||
else | ||
|
||
echo " " | ||
echo "A runDALES job is already in progress ... aborting" | ||
echo "Exitting with exit status 3" | ||
exit 3 | ||
|
||
fi | ||
|
||
|
||
|
||
# =========================================================== | ||
|
||
|
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,81 @@ | ||
#!/bin/bash | ||
#---------------------------------------------------------------------- | ||
# Script for running DALES# | ||
#---------------------------------------------------------------------- | ||
# | ||
# - requires following variables: | ||
# $USERN :: username | ||
# $DAYC :: current day of model of code adjustment/compilation | ||
# | ||
# ---------------------------------------- | ||
# based on tcshell scritps from prof Roel Neggers | ||
# scripted and checked by Jan Chylik, August 2016 | ||
# inquiries and error reports: [email protected] | ||
# | ||
# last update: 21 September 2016, 11 January 2017 | ||
|
||
# === setting ================================================ | ||
# if the script is run from dales_prepare.sh, the setting does not require any changes | ||
|
||
# ---- directory setting --------------------------------- | ||
# directroy in which to run | ||
export rundir=./ | ||
# # export rundir=/work/${USERN}/dales/dales4/experiments/Juelich/juelich20130605_imicro2_16x16 | ||
# busy file | ||
export busyfile='runDALES_busy.txt' | ||
# runlog | ||
export RUNLOG='runlog.txt' | ||
# message file | ||
export MSGFILE='dales_mosaic_ayil.txt' | ||
# setting | ||
export N_MPI=1 | ||
export DALES='dales4' | ||
# === script ============================================== | ||
|
||
#------------- important directories ---------------------- | ||
|
||
|
||
|
||
# -------- run itself ------------------------------------ | ||
|
||
if [ ! -e $busyfile ]; then | ||
|
||
#--- create file indicating that job is ongoing --- | ||
echo "runDALES job is busy ... don't interfere!" > $busyfile | ||
|
||
cd ${rundir} | ||
|
||
#echo "test" > test.txt | ||
|
||
# running dales | ||
echo "Starting dales run, you can view the run log ${rundir}$RUNLOG " | ||
echo "You can view it in other terminal." | ||
echo "Do not close this terminal until the job is finished." | ||
#./dales_roel4_20140423 | ||
# mpirun -np $N_MPI ./${DALES_VERSION}_${USERN}_${DAYC}_${MACHINE_TYPE}>$RUNLOG | ||
mpirun -np $N_MPI ${DALES}>$RUNLOG | ||
# note: it keeps the name of the original executable so we can have more different dales executables possibly used alongside each other if needed | ||
|
||
echo "finished local job" > $MSGFILE | ||
|
||
#--- cleanup --- | ||
rm $busyfile | ||
|
||
echo " " | ||
echo "Dales run has ended." | ||
exit 0 | ||
|
||
else | ||
|
||
echo " " | ||
echo "A runDALES job is already in progress ... aborting" | ||
echo "Exitting with exit status 3" | ||
exit 3 | ||
|
||
fi | ||
|
||
|
||
|
||
# =========================================================== | ||
|
||
|
30 changes: 30 additions & 0 deletions
30
rundales/runDALES_n128nod4bind_juwels2024_gcc_parastation.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,30 @@ | ||
#!/bin/bash -x | ||
#SBATCH --account=rcongm | ||
#SBATCH --nodes=4 | ||
#SBATCH --ntasks=128 | ||
#SBATCH --ntasks-per-node=32 | ||
#SBATCH --cpus-per-task=1 | ||
#SBATCH --threads-per-core=1 | ||
#SBATCH --time=24:00:00 | ||
#SBATCH --partition=batch | ||
#SBATCH --output=./slurm_dales-%j.out | ||
#SBATCH --error=./slurm_error-%j.out | ||
|
||
# *** start of job script *** | ||
# Note: The current working directory at this point is | ||
# the directory where sbatch was executed. | ||
|
||
module load Stages/2024 | ||
module load GCC/12.3.0 ParaStationMPI/5.9.2-1 | ||
module load netCDF-Fortran/4.6.1 | ||
# module load CMake # not needed in rundales | ||
# module load HDF5/1.14.2 # implicitly loaded | ||
# module load netCDF/4.9.2 # implicitly loaded | ||
|
||
|
||
|
||
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK} | ||
|
||
srun --cpu-bind=map_cpu:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39 ./dales4 > runlog.txt | ||
###srun ./dales4 > stdlog.txt | ||
###python3 ./change_nml.py |
Oops, something went wrong.