New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 3608 for branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/fcm_job.sh – NEMO

Ignore:
Timestamp:
2012-11-19T16:40:55+01:00 (11 years ago)
Author:
acc
Message:

Branch dev_NOC_2012_r3555. #1006. Step 3: Merge in trunk changes between revision 3322 and 3337

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/fcm_job.sh

    r3294 r3608  
    66# fcm_job.sh   : simple job to run NEMO with fcm  
    77###################################################### 
    8 #set -x 
     8#set -vx 
    99set -o posix 
    1010#set -u 
     
    2323# ======== 
    2424# 
    25 # :: 
     25# :: lauches the script $JOB_FILE interactive or batch, one task or MPI 
    2626# 
    27 #  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG 
     27#  $ ./fcm_job.sh NUMBER_OF_PROCS JOB_FILE INTERACT MPI_FLAG 
    2828# 
    2929# 
     
    3333# Simple job for SET TESTS for NEMO (SETTE) 
    3434#  
    35 #   get input files (if needed) : tar file   
    36 #  (note this job needs to have an input_CONFIG.cfg in which can be found input tar file name) 
    37 # 
    38 #   runs job in interactive or batch mode : all jobs using 1 process are run interactive, and all MPP jobs are 
    39 # 
    40 #   run in batch (MPI_INTERACT="no") or interactive (MPI_INTERACT="yes") see sette.sh and BATCH_TEMPLATE directory 
    41 # 
    42 #   and call post_test_tidyup function (that moves in NEMO_VALIDATION_DIR solver.stat, tracer.stat (for LOBSTER & PISCES) & ocean.output) 
     35 
    4336# 
    4437# EXAMPLES 
     
    4740# :: 
    4841# 
    49 #  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG 
     42#  $ ./fcm_job.sh NUMBER_OF_PROCS JOB_FILE INTERACT MPI_FLAG 
    5043# 
    51 #  run a job of config GYRE with 1 processor SHORT test ( 5 days ) using an interactive run without mpirun 
    52 #  $ ./fcm_job.sh input_GYRE.cfg 1 SHORT yes no 
    53 # 
    54 #  run a job of config ORCA2_LIM_PISCES   with 8 processors test RESTARTABILITY submitting the job to the batch queue system and using mpirun 
    55 #  $ ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 LONG no yes 
     44#  run a  
    5645# 
    5746# 
     
    7463# 
    7564 
    76 usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg  NUMBER_OF_PROCS TEST_NAME INTERACT MPI_FLAG" 
    77 usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes no/yes" 
     65usage=" Usage : ./fcm_job.sh  NUMBER_OF_PROCS JOB_FILE INTERACT MPI_FLAG" 
     66usage=" example : ./fcm_job.sh 8 SHORT no/yes no/yes" 
    7867 
    7968 
    80 minargcount=2 
     69minargcount=4 
    8170        if [ ${#} -lt ${minargcount} ] 
    8271        then 
    83                 echo "not enought arguments for fcm_job.sh script" 
     72                echo "not enough arguments for fcm_job.sh script" 
    8473                echo "control number of argument of fcm_job.sh in sette.sh" 
    8574                echo "${usage}" 
     
    9483export NB_PROCS=$1 
    9584export JOB_FILE=$2 
     85export INTERACT=$3 
     86export MPI_FLAG=$4 
    9687################################################################ 
    9788# RUN OPA 
    9889cd ${EXE_DIR} 
    99  
     90if [ "$INTERACT" == "yes" ]; then 
     91        eval $JOB_FILE 
     92else if [ "$INTERACT" == "no" ]; then 
    10093# submit job to batch system  
    101         if [ ${NB_PROC} -eq 1 ]; then 
    102       eval ${BATCH_COMMAND_SEQ} $JOB_FILE  
     94        if [ "$NB_PROC" == "1" ]; then 
     95      eval ${BATCH_COMMAND_SEQ} $JOB_FILE ; echo  ${BATCH_COMMAND_SEQ} $JOB_FILE 
    10396        else 
    104       eval ${BATCH_COMMAND_PAR} $JOB_FILE 
     97      eval ${BATCH_COMMAND_PAR} $JOB_FILE ; echo ${BATCH_COMMAND_PAR} $JOB_FILE 
    10598        fi 
    106  
     99fi 
     100fi 
Note: See TracChangeset for help on using the changeset viewer.