Browse Source

Fixed restart legs for Genius

klein 5 years ago
parent
commit
572c997794
3 changed files with 12 additions and 9 deletions
  1. 1 1
      templates/genius/job.cfg
  2. 2 2
      templates/genius/programs.cfg
  3. 9 6
      templates/scripts/skeleton.sh

+ 1 - 1
templates/genius/job.cfg

@@ -3,7 +3,7 @@ PBS -N ${exp_name}
 PBS -q qdef
 PBS -r y
 PBS -l walltime=10:00:00
-PBS -l nodes=1:ppn=11,pmem=5gb
+PBS -l nodes=1:ppn=36,pmem=5gb
 #PBS -M ${email}
 
 exec > ${PBS_O_WORKDIR-$PWD}/${PBS_JOBNAME-"local"}_${PBS_JOBID-"id"}.log

+ 2 - 2
templates/genius/programs.cfg

@@ -9,12 +9,12 @@ extralibs_list=""
 nemo_src_dir=${HOME}/modeles/nemo/NEMO_DEV
 shared_dir=${nemo_src_dir}/CONFIG/SHARED
 nem_exe_file=${nemo_src_dir}/CONFIG/${nem_config_name}/BLD/bin/nemo.exe
-nem_numproc=10
+nem_numproc=32
 
 # -----------------------------------------------------------------------------
 # *** XIOS configuration
 # -----------------------------------------------------------------------------
 
 xio_exe_file=${nemo_src_dir}/EXTERNAL/xios-1.0/bin/xios_server.exe
-xio_numproc=1
+xio_numproc=4
 

+ 9 - 6
templates/scripts/skeleton.sh

@@ -270,12 +270,14 @@ if (( leg_end_epoch < run_end_epoch )) ; then
         sbatch $0 $@ | awk '{print $4}' >> ${run_dir}/.coral_jobs
     elif [[ $USER == "vsc"* ]]; then
         # Retrieve credits
-        logfiletmp=`echo ${PBS_O_WORKDIR-$PWD} | rev | cut -d'/' -f1 | rev`
-        logfiletmp2=`echo $logfiletmp | cut -d'_' -f1`
-        logfile=`ls ${PBS_O_WORKDIR-$PWD}"/"$logfiletmp2*.o*`
-        credits=`grep "account string:" $logfile | sed 's/^.*: //'`
-        if [ -z "$credits" ]; then
-            credits="laerocloud"
+        if [ -f ${PBS_O_WORKDIR-$PWD}"/"credits_file ]; then
+            credits=`cat ${PBS_O_WORKDIR-$PWD}"/"credits_file`
+        else
+            logfiletmp=`echo ${PBS_O_WORKDIR-$PWD} | rev | cut -d'/' -f1 | rev`
+            logfiletmp2=`echo $logfiletmp | cut -d'_' -f1`
+            logfile=`ls ${PBS_O_WORKDIR-$PWD}"/"$logfiletmp2*.o*`
+            credits=`grep "account string:" $logfile | sed 's/^.*: //'`
+            echo ${credits} > credits_file
         fi
         script_name=`cat ${PBS_O_WORKDIR-$PWD}"/"script_name`
         run_path=`cat ${PBS_O_WORKDIR-$PWD}"/"address`
@@ -298,6 +300,7 @@ else
         run_path=`cat ${PBS_O_WORKDIR-$PWD}"/"address`
         rm -f $run_path/script_name
         rm -f $run_path/address
+	rm -f $run_path/credits_file
     fi
 
     echo "Nothing left to do. Cleaning and exiting." # FIXME Factorize this (we have two exit points)