Ignore:
Timestamp:
Apr 17, 2021, 8:03:44 PM (4 years ago)
Author:
aslmd
Message:

MESOSCALE workflow. better header for submission to ciclad. added solution to run everything-in-a-row (GCM to MESOSCALE) even when using number of processors above limit for 64x48 standard GCM runs (that is: 24 processors). call to script get_startday_from_namelist.sh instead of lines of bash code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/launch

    r2493 r2499  
    11#! /bin/bash
    22
     3########################################################
    34#PBS -S  /bin/bash
    45#PBS -j  oe
    5 ##PBS -q  week
    6 #PBS -q day
     6########################################################
     7### available queues:
     8### short std h12 day days3 week weeks2 infini
     9### 2h    6h  12h 24h 72h   168h 340h   840h
     10########################################################
     11#PBS -q  week
    712#PBS -N  run
    8 #PBS -l  nodes=1:ppn=8
     13########################################################
     14### single processor (e.g. testing)
    915##PBS -l  nodes=1:ppn=1
    10 #PBS -l  mem=64gb
    11 #PBS -l  vmem=64gb
     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########################################################
    1230#PBS -v  step=1
    13 
    14 #### NB: "qsub -v step=XX launch" overrides value above
     31## NB: "qsub -v step=XX launch" overrides value above
     32########################################################
    1533
    1634#### PREAMBLE
    1735ulimit -s unlimited
     36
     37# This finds out the number of nodes we have
     38NP=$(wc -l $PBS_NODEFILE | awk '{print $1}')
     39echo "Total CPU count = $NP"
    1840
    1941#### STEP 1
     
    2143  cd $PBS_O_WORKDIR/gcm
    2244  #
    23   year=$(more namelist.input | grep start_year | awk '{print $3}' | sed s+','+''+g)
    24   month=$(more namelist.input | grep start_month | awk '{print $3}' | sed s+','+''+g)
    25   day=$(more namelist.input | grep start_day | awk '{print $3}' | sed s+','+''+g)
    26   hour=$(more namelist.input | grep start_hour | awk '{print $3}' | sed s+','+''+g)
    27   wrf_date=${year}'-'${month}'-'${day}'_00:00:00'
    28   daygcm=$(more calendar | grep ${wrf_date} | awk '{print $2}')
    29   echo ${daygcm} | ./launch_gcm
     45  ./get_startday_from_namelist.sh | ./launch_gcm
    3046  #
    31   $WHERE_MPI/mpirun gcm.e > log_gcm
     47  if [[ $NP -gt 24 ]] ; then
     48    echo "--- Total CPU count is above 24"
     49    echo "--- For the standard GCM resolution, this is too much"
     50    echo "--- So we run the GCM only with 24 processors"
     51    $WHERE_MPI/mpirun -np 24 gcm.e > log_gcm
     52  else
     53    $WHERE_MPI/mpirun gcm.e > log_gcm
     54  fi
    3255  #
    3356  cd $PBS_O_WORKDIR/prep
Note: See TracChangeset for help on using the changeset viewer.