Changeset 5422 for BOL/LMDZ_Setup
- Timestamp:
- Dec 18, 2024, 9:29:49 AM (11 hours ago)
- Location:
- BOL/LMDZ_Setup
- Files:
-
- 4 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 -
BOL/LMDZ_Setup/reb.sh
r5415 r5422 54 54 ulimit -s unlimited 55 55 if [[ -f ${type}_0000.nc ]]; then 56 $ rebuild -o ${type}.$ym.nc ${type}_[0-9][0-9][0-9][0-9].nc56 $RUNBASHCMD $rebuild -o ${type}.$ym.nc ${type}_[0-9][0-9][0-9][0-9].nc 57 57 else 58 58 echo "${type}_0000.nc absent" … … 66 66 eod 67 67 68 echo "Submitting the rebuild job $job using <$SUBMITCMD \"$job\">" 69 $SUBMITCMD "$job" 68 #echo "Submitting the rebuild job $job using <$SUBMITCMD \"$job\">" 69 #$SUBMITCMD "$job" 70 echo "Submitting the rebuild job $job using <submitcmd \"$job\">" 71 submitcmd "$job" 70 72 done -
BOL/LMDZ_Setup/script_SIMU
r5421 r5422 172 172 else 173 173 nday=360 ; ndayh=30 174 # nday=3 ; ndayh=1 # Pratique pour des tests rapides 174 175 fi 175 176 fi … … 403 404 if [ $num -le 250 ] ; then 404 405 sed -e 's/^simul=.*.$/simul='$simul_new'/' -e 's/^\# @ job_nam.*.=.*.$/\# @ job_name = '$simul_new'/' tmp_$simul >| tmp_$simul_new 405 $SUBMITCMDtmp_$simul_new406 submitcmd tmp_$simul_new 406 407 fi 407 408 fi … … 417 418 418 419 cd $SCRIPTDIR 419 $SUBMITCMD tmp_$simul 420 submitcmd tmp_$simul 421 #$SUBMITCMD tmp_$simul -
BOL/LMDZ_Setup/setup.sh
r5420 r5422 17 17 # Radiative code: "oldrad" / "rrtm" / "ecrad" 18 18 rad="rrtm" 19 rad="oldrad" 19 20 20 21 # !!! STRONG recommendation : experiments with DIFFERENT Orchidee or aerosol options should be performed in DIFFERENT LMDZ_Setup folders … … 26 27 # in order to re-run the initialisation job, which downloads the aerosol files and interpolates them) 27 28 aerosols="clim" 29 aerosols="n" 28 30 29 31 # SURFACE/VEGETATION SCHEME … … 38 40 # netcdf: 0 (use existing library) / 1 (recompile netcdf, slow) 39 41 netcdf=0 42 netcdf=1 40 43 41 44 # --->>> ALSO PAY ATTENTION TO OUTPUT files, frequency, level ------------- … … 692 695 cat << ...eod >> tmp 693 696 echo "Submitting job tmp_$SIM" 694 echo "\$SUBMITCMD tmp_$SIM" 695 \$SUBMITCMD tmp_$SIM 697 #echo "\$SUBMITCMD tmp_$SIM" 698 #\$SUBMITCMD tmp_$SIM 699 echo submitcmd tmp_$SIM" 700 submitcmd tmp_$SIM 696 701 ...eod 697 702 fi … … 701 706 enable_platform tmp 702 707 echo "###############################################################################" 703 echo "Submitting initialisation job <$SUBMITCMD tmp> from $(pwd)" 708 #echo "Submitting initialisation job <$SUBMITCMD tmp> from $(pwd)" 709 echo "Submitting initialisation job <submitcmd tmp> from $(pwd)" 704 710 chmod +x tmp 705 $SUBMITCMD tmp 711 #$SUBMITCMD tmp 712 submitcmd tmp 706 713 echo "###############################################################################" 707 714 … … 710 717 echo "###############################################################################" 711 718 echo "Submitting job tmp_$SIM" 712 echo "$SUBMITCMD tmp_$SIM" 713 $SUBMITCMD "tmp_$SIM" 719 #echo "$SUBMITCMD tmp_$SIM" 720 #$SUBMITCMD "tmp_$SIM" 721 echo "submitcmd tmp_$SIM" 722 submitcmd "tmp_$SIM" 714 723 echo '###############################################################################' 715 724 fi
Note: See TracChangeset
for help on using the changeset viewer.