Changeset 2877
- Timestamp:
- Jan 24, 2023, 1:37:51 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/launch
r2499 r2877 1 #! /bin/bash 1 #!/bin/bash 2 #SBATCH --partition=zen4 3 #SBATCH --ntasks=24 4 #SBATCH --time=02:00:00 5 6 # job information 7 cat << EOF 8 ------------------------------------------------------------------ 9 Job submit on $SLURM_SUBMIT_HOST by $SLURM_JOB_USER 10 JobID=$SLURM_JOBID Running_Node=$SLURM_NODELIST 11 Node=$SLURM_JOB_NUM_NODES Task=$SLURM_NTASKS 12 ------------------------------------------------------------------ 13 EOF 14 # Begin of section with executable commands 15 2 16 3 17 ######################################################## 4 #PBS -S /bin/bash 5 #PBS -j oe 18 ## standard run 121x121x61 nodes=1:ppn=4,mem=4gb,vmem=6gb 6 19 ######################################################## 7 ### available queues: 8 ### short std h12 day days3 week weeks2 infini 9 ### 2h 6h 12h 24h 72h 168h 340h 840h 20 ### large-domain run 321x321x61 (OK but slower) nodes=1:ppn=16,mem=16gb,vmem=24gb 10 21 ######################################################## 11 #PBS -q week 12 #PBS -N run 22 ### large-domain run 321x321x61 nodes=1:ppn=32,mem=32gb,vmem=48gb 13 23 ######################################################## 14 ### single processor (e.g. testing) 15 ##PBS -l nodes=1:ppn=1 16 ######################################################## 17 ## standard run 121x121x61 18 #PBS -l nodes=1:ppn=4,mem=4gb,vmem=6gb 19 ######################################################## 20 ### large-domain run 321x321x61 (OK but slower) 21 ##PBS -l nodes=1:ppn=16,mem=16gb,vmem=24gb 22 ######################################################## 23 ### large-domain run 321x321x61 24 ##PBS -l nodes=1:ppn=32,mem=32gb,vmem=48gb 25 ######################################################## 26 ### need for large memory 27 ##PBS -l mem=120gb 28 ##PBS -l vmem=120gb 29 ######################################################## 30 #PBS -v step=1 31 ## NB: "qsub -v step=XX launch" overrides value above 32 ######################################################## 24 25 26 27 step=1 28 fold=$PWD 33 29 34 30 #### PREAMBLE 35 31 ulimit -s unlimited 36 32 37 # This finds out the number of nodes we have38 NP=$(wc -l $PBS_NODEFILE | awk '{print $1}')39 echo "Total CPU count = $NP"40 41 33 #### STEP 1 42 34 if [[ ${step} -le 1 ]] ; then 43 cd $ PBS_O_WORKDIR/gcm35 cd $fold/gcm 44 36 # 45 37 ./get_startday_from_namelist.sh | ./launch_gcm 46 38 # 47 if [[ $ NP-gt 24 ]] ; then39 if [[ $SLURM_NTASKS -gt 24 ]] ; then 48 40 echo "--- Total CPU count is above 24" 49 41 echo "--- For the standard GCM resolution, this is too much" … … 54 46 fi 55 47 # 56 cd $ PBS_O_WORKDIR/prep48 cd $fold/prep 57 49 echo 1 | create_readmeteo.exe 58 50 readmeteo.exe < readmeteo.def 59 51 fi 60 52 53 stop 54 61 55 ##### STEP 2 62 56 if [[ ${step} -le 2 ]] ; then 63 cd $ PBS_O_WORKDIR/geogrid57 cd $fold/geogrid 64 58 \rm geo_em.* 65 59 geogrid.exe 66 60 # 67 cd $ PBS_O_WORKDIR/metgrid61 cd $fold/metgrid 68 62 \rm met_em.* 69 63 metgrid.exe … … 72 66 ##### STEP 3 73 67 if [[ ${step} -le 3 ]] ; then 74 cd $ PBS_O_WORKDIR/68 cd $fold/ 75 69 \rm wrfi* wrfb* 76 70 real.exe … … 79 73 ##### STEP 4 80 74 if [[ ${step} -le 4 ]] ; then 81 rm -rf $ PBS_O_WORKDIR/$PBS_JOBNAME82 mkdir $ PBS_O_WORKDIR/$PBS_JOBNAME83 mv rsl.error.0000 $ PBS_O_WORKDIR/$PBS_JOBNAME/real_rsl.error.000084 mv rsl.out.0000 $ PBS_O_WORKDIR/$PBS_JOBNAME/real_rsl.out.000085 cp -rfL $ PBS_O_WORKDIR/*.def $PBS_O_WORKDIR/$PBS_JOBNAME/86 cp -rfL $ PBS_O_WORKDIR/wrf.exe* $PBS_O_WORKDIR/$PBS_JOBNAME/87 cp -rfL $ PBS_O_WORKDIR/namelist.input $PBS_O_WORKDIR/$PBS_JOBNAME/88 cp -rfL $ PBS_O_WORKDIR/namelist.wps $PBS_O_WORKDIR/$PBS_JOBNAME/89 cp -rfL $ PBS_O_WORKDIR/wrfi* $PBS_O_WORKDIR/$PBS_JOBNAME/90 cp -rfL $ PBS_O_WORKDIR/wrfb* $PBS_O_WORKDIR/$PBS_JOBNAME/91 cd $ PBS_O_WORKDIR/$PBS_JOBNAME/92 ln -sf $ PBS_O_WORKDIR/data_physics ./75 rm -rf $fold/run_$SLURM_JOBID 76 mkdir $fold/run_$SLURM_JOBID 77 mv rsl.error.0000 $fold/run_$SLURM_JOBID/real_rsl.error.0000 78 mv rsl.out.0000 $fold/run_$SLURM_JOBID/real_rsl.out.0000 79 cp -rfL $fold/*.def $fold/run_$SLURM_JOBID/ 80 cp -rfL $fold/wrf.exe* $fold/run_$SLURM_JOBID/ 81 cp -rfL $fold/namelist.input $fold/run_$SLURM_JOBID/ 82 cp -rfL $fold/namelist.wps $fold/run_$SLURM_JOBID/ 83 cp -rfL $fold/wrfi* $fold/run_$SLURM_JOBID/ 84 cp -rfL $fold/wrfb* $fold/run_$SLURM_JOBID/ 85 cd $fold/run_$SLURM_JOBID/ 86 ln -sf $fold/data_physics ./ 93 87 $WHERE_MPI/mpirun wrf.exe 94 88 #gdb wrf.exe -ex=run
Note: See TracChangeset
for help on using the changeset viewer.