Changeset 5422 for BOL/LMDZ_Setup/lmdz_env.sh
- Timestamp:
- Dec 18, 2024, 9:29:49 AM (14 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/LMDZ_Setup/lmdz_env.sh
r5420 r5422 12 12 13 13 function get_hostname { 14 if grep -q "Adastra" /etc/motd ; then14 if grep -q "Adastra" /etc/motd 2>/dev/null ; then 15 15 hostname="adastra" 16 16 elif which idrquota &> /dev/null; then … … 23 23 function set_env { # Platform-specific 24 24 case ${hostname:0:5} in 25 jean-) 25 #------------------------------------------------------------------------- 26 jean-) # Jean-zay, Idris-CNRS super computer 27 #------------------------------------------------------------------------- 26 28 module purge 27 29 compilo=19.0.4 # available 2013.0, 2017.2 … … 51 53 MPICMD="srun -n" 52 54 RUNBASHCMD="srun -A $account@cpu --label -n 1 -c" 53 SUBMITCMD="sbatch -A $account@cpu" 55 #SUBMITCMD="sbatch -A $account@cpu" 56 submitcmd() { 57 sbatch -A $account@cpu $1 58 } 54 59 ;; 55 spiri) 60 #------------------------------------------------------------------------- 61 spiri) # Spirit : IPSL cluster 62 #------------------------------------------------------------------------- 56 63 module purge 57 64 module load subversion/1.13.0 … … 70 77 MPICMD="mpirun -np" # on spirit, we can't run MPI using srun from within sbatch 71 78 RUNBASHCMD="bash" 72 SUBMITCMD="sbatch" 79 #SUBMITCMD="sbatch" 80 submitcmd() { 81 sbatch $1 82 } 73 83 ;; 74 adast) 84 #------------------------------------------------------------------------- 85 adast) # Adastra, Cines computing center 86 #------------------------------------------------------------------------- 75 87 module purge 76 88 module load PrgEnv-gnu # we need to load the env because lmdz links some shared libraries … … 108 120 # RUNBASHCMD="srun --label --account=$account --constraint=GENOA --ntasks-per-node=1 -n 1 --time=00:15:00 -c" 109 121 RUNBASHCMD="bash" # On Adastra the docs says we can use login nodes for compilation 110 SUBMITCMD="env $(env | grep -E "SLURM_|SBATCH_|SRUN_" | cut -d= -f1 | awk '{print "-u " $0}' | tr '\n' ' ' ) sbatch --constraint=GENOA --account=$account" # we need to remove the existing SLURM variables otherwise they may be unexpectedly inherited by the submitted script 122 #SUBMITCMD="env $(env | grep -E "SLURM_|SBATCH_|SRUN_" | cut -d= -f1 | awk '{print "-u " $0}' | tr '\n' ' ' ) sbatch --constraint=GENOA --account=$account" # we need to remove the existing SLURM variables otherwise they may be unexpectedly inherited by the submitted script 123 submitcmd() { 124 env $(env | grep -E "SLURM_|SBATCH_|SRUN_" | cut -d= -f1 | awk '{print "-u " $0}' | tr '\n' ' ' ) sbatch --constraint=GENOA --account=$account 125 } # we need to remove the existing SLURM variables otherwise they may be unexpectedly inherited by the submitted script 111 126 ;; 112 *) echo "WARNING: RUNNING THIS SCRIPT ON A LOCAL COMPUTER IS DISCOURAGED (lackluster cpus and memory)" 127 #------------------------------------------------------------------------- 128 *) # Local machine. 129 #------------------------------------------------------------------------- 113 130 ARCH="local-gfortran-parallel" # The arch file to use 114 131 SIMRUNBASEDIR="$root_dir/SCRATCH/" # Where the simulations will be executed ($SIMRUNBASEDIR/LMDZ_Setup/...) … … 121 138 MPICMD="mpirun -np" # command to run an mpi executable, as $MPICMD <nprocs> <script> 122 139 RUNBASHCMD="bash" # command to run a bash job, as $runbashcmd (nthreads) <script> [nthreads only supplied if =/="bash"] 123 SUBMITCMD="." # command to sumbit a job, as $submitcmd <script> 140 #SUBMITCMD="." # command to sumbit a job, as $submitcmd <script> 141 submitcmd() { 142 nohup bash $1 > out.$$ 2>err.$$ & 143 } 124 144 ;; 125 145 esac
Note: See TracChangeset
for help on using the changeset viewer.