Changeset 1584 for trunk


Ignore:
Timestamp:
04/19/23 12:56:02 (11 months ago)
Author:
jgipsl
Message:

Added question if the user wants to overwrite existing jobs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/ins_job

    r1574 r1584  
    1717{ 
    1818print - " 
    19 ins_job installs the jobs in the directories 
    20 which contain a file config.card 
    21  
    22 ins_job must be launched on the host 
    23 on which the job will be submitted 
     19ins_job installs the jobs in the directories which contain a file config.card 
     20 
     21ins_job also installs the jobs for post-processing in libIGCM folder. 
     22 
     23ins_job must be launched on the host on which the job will be submitted. 
    2424 
    2525Usage : 
     
    2727  or on irene/TGCC : 
    2828  ${b_n} [-h] [-v] [-e] [-p project] [-q type_of_node] [-c number of cores] 
    29   or on ada /IDRIS 
    30   ${b_n} [-h] [-v] [-e] [-m MPI environment] 
     29  or on jean-zay /IDRIS 
     30  ${b_n} [-h] [-v] [-e] [-p project] [-m MPI environment] 
    3131Options : 
    3232  -h                  : help 
    3333  -v                  : verbose mode 
    3434  -e                  : turn on ensemble mode (hindcast/forecast or date restart) 
    35   -f                  : ins_job is force to create jobs even if they already exist 
    36 on irene only :  
     35  -f                  : ins_job force overwrite jobs if they already exist 
     36 
     37More options on irene only :  
    3738  -p project          : add default project on irene 
    3839  -q type_of_node     : add default type of nodes for postprocessing on irene skylake/xlarge  
    3940  -c number of cores  : add default number of cores for postprocessing on irene 1-112 
    40 on ada only : 
    41   - m MPI environment : add default MPI environment (Intel MPI or IBM MPI) 
     41 
     42More options on jean-zay only : 
     43  -p project          : add default project on irene 
     44  -m MPI environment  : add default MPI environment (Intel MPI or IBM MPI) 
    4245  -t wall time        : change default wall time 
    4346" 
     
    124127F_RCI=${libIGCM}'/run.card.init'; 
    125128[[ ! -f ${F_RCI} ]] && { print - "${F_RCI} unreachable"; exit 3; } 
     129 
     130 
     131print "Start ins_job\n" 
     132print "Create job in current folder and post-treatment jobs in libIGCM folder.\n" 
     133 
     134if [ ${x_f} = 'false' ] ; then 
     135    answer="" 
     136    print "Do you want to overwrite existing jobs? Answer yes/no: (or hit enter for no) " 
     137    read answer 
     138    if ( [ X${answer} == Xyes ] || [ X${answer} == Xy ] ) ; then 
     139        x_f=true 
     140    fi 
     141fi 
     142 
     143if [ ${x_f} == 'false' ] ; then 
     144    print "The jobs will only be created if they don't already exist. No jobs will be overwritten.\n" 
     145else 
     146    print "All existing jobs will be overwritten.\n" 
     147fi 
     148 
     149 
    126150#- 
    127151# Accessing to functions (without stack) 
     
    136160TaskType=computing 
    137161# Source libIGCM 
     162print "Source modules and functions from libIGCM:" 
    138163. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh 
    139164. ${libIGCM}/libIGCM_card/libIGCM_card.ksh 
     
    144169  . ${libIGCM}/libIGCM_ensemble/libIGCM_ensemble.ksh 
    145170fi 
     171 
    146172 
    147173#- 
Note: See TracChangeset for help on using the changeset viewer.