Changeset 5000
- Timestamp:
- Jul 1, 2024, 10:09:23 AM (5 months ago)
- Location:
- BOL/LMDZ_Setup_amaury
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/LMDZ_Setup_amaury/lmdz_env.sh
r4995 r5000 44 44 NB_MPI_MAX=2000 45 45 NB_OMP_MAX=20 46 RUNCMD="srun --label -n" 46 MPICMD="srun -n" 47 RUNBASHCMD="srun -A $account@cpu --label -n 1 -c" 47 48 SUBMITCMD="sbatch -A $account@cpu" 48 49 ;; … … 54 55 module load cdo/2.3.0 55 56 56 root_dir= ~/"LMDZ_SETUP_ROOT/LMDZ_Setup";57 root_dir="/data/abarral/LMDZ_SETUP_ROOT/LMDZ_Setup"; 57 58 ARCH="X64_MESOIPSL-GNU" 58 59 SIMRUNBASEDIR="$SCRATCH/" 59 60 LMDZD="$root_dir/LMDZD" 60 61 LMDZ_INIT="$root_dir/LMDZ_Init" 61 NB_MPI_MAX= 2062 NB_MPI_MAX=5 62 63 NB_OMP_MAX=1 63 RUNCMD="mpirun -n" # on spirit, we can't run MPI using srun from within sbatch 64 MPICMD="mpirun -np" # on spirit, we can't run MPI using srun from within sbatch 65 RUNBASHCMD="bash" 64 66 SUBMITCMD="sbatch" 65 67 ;; … … 94 96 NB_MPI_MAX=1 # TODO 2000 in JZ 95 97 NB_OMP_MAX=1 # TODO 20 in JZ 96 RUNCMD="srun --label --account=$account --constraint=GENOA -n" 98 MPICMD="srun -n" 99 RUNBASHCMD="srun --label --account=$account --constraint=GENOA --ntasks-per-node=1 -n 1 --time=00:10:00 -c" 97 100 SUBMITCMD="sbatch --constraint=GENOA --account=$account" 98 101 ;; … … 105 108 NB_MPI_MAX=2 # Max number of MPI cores (only for running simulations) 106 109 NB_OMP_MAX=1 # Max number of OMP threads (only for running simulations) 107 RUNCMD="mpirun -np" # command to run a job, as $runcmd <nprocs> <script> 110 MPICMD="mpirun -np" # command to run an mpi executable, as $MPICMD <nprocs> <script> 111 RUNBASHCMD="bash" # command to run a bash job, as $runbashcmd (nthreads) <script> [nthreads only supplied if =/="bash"] 108 112 SUBMITCMD="." # command to sumbit a job, as $submitcmd <script> 109 113 ;; -
BOL/LMDZ_Setup_amaury/script_SIMU
r4995 r5000 322 322 echo '##################################################################' 323 323 324 time $ RUNCMD $ntasks ./gcm.e > listing324 time $MPICMD $ntasks ./gcm.e > listing 325 325 if [ ! -f restartphy.nc ] ; then 326 326 echo PROBLEME PAS DE FICHIER RESTARTPHY -
BOL/LMDZ_Setup_amaury/setup.sh
r4995 r5000 222 222 chmod +x install_lmdz.sh 223 223 local make_j=8 224 echo "./install_lmdz.sh -noclean $optim -v $version $svnopt -d $resol -rad $rad -bench 0 -parallel mpi_omp $ins_cosp $ins_xios $ins_aero $ins_inlandsis -name $LMDZname -veget $veget -netcdf $netcdf -arch $ARCH -make_j $make_j" >> install_lmdz_options.$$.sh 224 # We launch using $MPICMD, except if it's using mpirun (no srun equivalent for bash script) => if supported, the compilation runs in a cluster job 225 jobcmd="\"$RUNBASHCMD $make_j\"" 226 if [[ ${hostname:0:5} = "jean-" ]]; then jobcmd="\"$RUNBASHCMD $make_j --partition=compil\""; fi # On JeanZay: compile on the <compil> partition 227 if [[ $(echo "$RUNBASHCMD" | cut -c -4) = "bash" ]]; then 228 jobcmd="bash" 229 fi 230 echo "./install_lmdz.sh -noclean $optim -v $version $svnopt -d $resol -rad $rad -bench 0 -parallel mpi_omp $ins_cosp $ins_xios $ins_aero $ins_inlandsis -name $LMDZname -veget $veget -netcdf $netcdf -arch $ARCH -make_j $make_j -jobcmd $jobcmd" >> install_lmdz_options.$$.sh 225 231 chmod +x install_lmdz_options.$$.sh 226 232 echo "Running install_lmdz_options.$$.sh" 227 233 set -o pipefail 228 # We launch using $RUNCMD, except if it's using mpirun (no srun equivalent for bash script) => if supported, the compilation runs in a cluster job 229 local install_cmd="$RUNCMD $make_j" 230 if [[ $(echo "$RUNCMD" | cut -c -6) = "mpirun" ]]; then 231 install_cmd="" 232 fi 233 gcm=$MODEL/$($install_cmd ./install_lmdz_options.$$.sh | tee /dev/tty | tail -n 1 | sed -n "s:.* executable is \(.*\.e\).*:\1:p") 234 # gcm=$MODEL/$(./install_lmdz_options.$$.sh | tee /dev/tty | tail -n 1 | sed -n "s:.* executable is \(.*\.e\).*:\1:p") 234 gcm=$MODEL/$(./install_lmdz_options.$$.sh | tee /dev/tty | tail -n 1 | sed -n "s:.* executable is \(.*\.e\).*:\1:p") 235 235 set +o pipefail 236 236 mv install_lmdz.sh install_lmdz.$$.sh … … 433 433 -e "s/nthreads=.*./nthreads=$omp/" \ 434 434 -e "s/MAINDIR=.*.$/MAINDIR=$(basename "$local")/" \ 435 -e "s:STORED=.*.*:STORED=$(dirname $local):" \435 -e "s:STORED=.*.*:STORED=$(dirname "$local"):" \ 436 436 -e "s:SCRATCHD=.*.*:SCRATCHD=$SIMRUNBASEDIR:" \ 437 437 -e "s/stopsim=.*.$/stopsim=$stopsim/" \ … … 640 640 sed -e 's/anneeref=.*.$/anneeref='\$yr'/' DEF/run.def >| run.def 641 641 echo Starting initialisation 642 OMP_NUM_THREADS=1 $ RUNCMD 1 $ce0l # ce0l requires MPI=OMP=1642 OMP_NUM_THREADS=1 $MPICMD 1 $ce0l # ce0l requires MPI=OMP=1 643 643 if [ $climato = 0 ]; then mv limit.nc limit.\$yr.nc; fi 644 644 done
Note: See TracChangeset
for help on using the changeset viewer.