Changeset 1536


Ignore:
Timestamp:
07/03/20 15:16:53 (4 years ago)
Author:
rpennel
Message:

Add possibility to specify wall time with ins_job

Location:
trunk/libIGCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_job

    r1519 r1536  
    3636#-Q- irene #MSUB -x                    # exclusive node. To specify only for MPMD together with the one below 
    3737#-Q- irene #MSUB -E '--cpu_bind=none' 
    38 #-Q- irene #MSUB -T 86400              # Wall clock limit (seconds) 
     38#-Q- irene #MSUB -T ::WallTime::              # Wall clock limit (seconds) 
    3939#-Q- irene #MSUB -A ::default_project:: 
    4040#-Q- irene #MSUB -q skylake 
     
    5454#-Q- irene-amd #MSUB -c ::openMPthreads::  # Number of openMP threads. To specify only for SMPD 
    5555#-Q- irene-amd #MSUB -x                    # exclusive node. To specify only for MPMD together with the one below 
    56 #-Q- irene-amd #MSUB -T 86400              # Wall clock limit (seconds) 
     56#-Q- irene-amd #MSUB -T ::WallTime::              # Wall clock limit (seconds) 
    5757#-Q- irene-amd #MSUB -A ::default_project:: 
    5858#-Q- irene-amd #MSUB -q rome 
     
    7171#-Q- jeanzay #SBATCH --cpus-per-task=::openMPthreads::  # Number of openMP threads. 
    7272#-Q- jeanzay #SBATCH --hint=nomultithread         # 1 processus MPI par par physical core (no hyperthreading)  
    73 #-Q- jeanzay #SBATCH --time=00:30:00              # Wall clock limit (seconds) 
     73#-Q- jeanzay #SBATCH --time=::WallTime::             # Wall clock limit (minutes) 
    7474#-Q- jeanzay #SBATCH --account ::default_project::@cpu 
    7575#-Q- jeanzay 
  • trunk/libIGCM/ins_job

    r1533 r1536  
    4040on ada only : 
    4141  - m MPI environment : add default MPI environment (Intel MPI or IBM MPI) 
     42  -t wall time        : change default wall time 
    4243" 
    4344} 
     
    8384x_c=false; 
    8485x_m=false; 
    85 while getopts :hvefc:p:m:q:s: V ; do 
     86x_t=false; 
     87while getopts :hvefc:p:m:q:s:t: V ; do 
    8688  case $V in 
    8789  (h)  ins_job_Usage; exit 0;; 
     
    9799  (m)  x_m=true 
    98100       MPIEnvironment=${OPTARG} ;; 
     101  (t)  x_t=true 
     102       WallTime=${OPTARG} ;; 
    99103  (:)  echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; 
    100104       exit 2;; 
     
    239243  #- ProjectCore is set (option or answer) 
    240244 
     245  #- set WallTime if required 
     246  if ( ! ${x_t} ) ; then 
     247    #- default WallTime 1800 s  
     248    WallTime=1800 
     249    answer="" 
     250    print - "Hit Enter or give required wall time in seconds for computing job (default is \"${WallTime}\" seconds, maximum is 86400 seconds) " 
     251    read answer 
     252 
     253    if [ "X${answer}" != "X" ] ; then 
     254      WallTime=${answer} 
     255    fi 
     256 
     257  fi # if ( ! ${x_t} ) 
     258    
     259  echo Wall time limit is ${WallTime} minutes 
     260 
    241261elif [ X"${SYSTEM}" == "Xirene-amd" ] ; then 
    242262 
     
    315335  #- ProjectCore is set (option or answer) 
    316336 
     337  #- set WallTime if required 
     338  if ( ! ${x_t} ) ; then 
     339    #- default WallTime 1800 s  
     340    WallTime=1800 
     341    answer="" 
     342    print - "Hit Enter or give required wall time in seconds for computing job (default is \"${WallTime}\" seconds, maximum is 86400 seconds) " 
     343    read answer 
     344 
     345    if [ "X${answer}" != "X" ] ; then 
     346      WallTime=${answer} 
     347    fi 
     348 
     349  fi # if ( ! ${x_t} ) 
     350    
     351  echo Wall time limit is ${WallTime} minutes 
     352 
    317353elif [ X"${SYSTEM}" == "Xjeanzay" ] ; then 
    318354 
     
    332368  fi # if ( ! ${x_p} ) 
    333369 
    334   ProjectID=${ProjectID} 
    335370  echo  ProjectID is ${ProjectID} at Jean-Zay 
     371 
     372  #- set WallTime if required 
     373  if ( ! ${x_t} ) ; then 
     374    #- default WallTime 30 minutes 
     375    WallTime=30 
     376    answer="" 
     377    print - "Hit Enter or give required wall time in minutes for computing job (default is \"${WallTime}\" minutes, maximum is 1200 minutes) " 
     378    read answer 
     379 
     380    if [ "X${answer}" != "X" ] ; then 
     381      WallTime=${answer} 
     382    fi 
     383 
     384  fi # if ( ! ${x_t} ) 
     385    
     386  echo Wall time limit is ${WallTime} minutes 
    336387 
    337388elif [ X"${SYSTEM}" == "Xada" ] ; then 
     
    511562      -e "s/::Jobname::/${JobName}/" \ 
    512563      -e "s/::default_project::/${ProjectID}/" \ 
     564      -e "s/::WallTime::/${WallTime}/" \ 
    513565      ${F_JOB} > ${j}'/'${n_f} 
    514566  chmod u+x ${j}'/'${n_f} 
Note: See TracChangeset for help on using the changeset viewer.