Ignore:
Timestamp:
2012-11-16T18:42:50+01:00 (8 years ago)
Author:
cbricaud
Message:

add modification from dev_r3342_MERCATOR7_SST in dev_MERCATOR_2012_rev3555

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_MERCATOR_2012_rev3555/NEMOGCM/SETTE/prepare_job.sh

    r3583 r3586  
    1111# prepare_job.sh   : creates the job script for running job  
    1212###################################################### 
    13 #set -vx 
     13#set -x 
    1414set -o posix 
    1515#set -u 
    1616#set -e 
    17 #+ 
     17# 
    1818# 
    1919# ================ 
     
    3030# :: 
    3131# 
    32 #  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE 
     32#  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG 
    3333# 
    3434# 
     
    3636# =========== 
    3737# 
    38 # Part of the SETTE package to run tests for NEMO 
     38# Simple job for SET TESTS for NEMO (SETTE) 
    3939#  
    40 # prepare the script $JOB_FILE to run the tests  
     40#   get input files (if needed) : tar file   
     41#  (note this job needs to have an input_CONFIG.cfg in which can be found input tar file name) 
     42# 
     43#   runs job in interactive or batch mode : all jobs using 1 process are run interactive, and all MPP jobs are 
     44# 
     45#   run in batch (MPI_INTERACT="no") or interactive (MPI_INTERACT="yes") see sette.sh and BATCH_TEMPLATE directory 
     46# 
     47#   and call post_test_tidyup function (that moves in NEMO_VALIDATION_DIR solver.stat, tracer.stat (for LOBSTER & PISCES) & ocean.output) 
    4148# 
    4249# EXAMPLES 
     
    4552# :: 
    4653# 
    47 #  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG $JOB_FILE 
    48 # 
    49 # prepare the $JOB_FILE for execution  
     54#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG 
     55# 
     56#  run a job of config GYRE with 1 processor SHORT test ( 5 days ) using an interactive run without mpirun 
     57#  $ ./fcm_job.sh input_GYRE.cfg 1 SHORT yes no 
     58# 
     59#  run a job of config ORCA2_LIM_PISCES   with 8 processors test RESTARTABILITY submitting the job to the batch queue system and using mpirun 
     60#  $ ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 LONG no yes 
    5061# 
    5162# 
     
    5970# ========== 
    6071# 
    61 # $Id: prepare_job.sh 3050 2011-11-07 14:11:34Z acc $ 
     72# $Id: fcm_job.sh 3050 2011-11-07 14:11:34Z acc $ 
    6273# 
    6374# 
     
    6879# 
    6980 
    70 usage=" Usage : ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE" 
    71 usage=" example : ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes $JOB_FILE" 
     81usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg  NUMBER_OF_PROCS TEST_NAME INTERACT MPI_FLAG" 
     82usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes no/yes" 
    7283 
    7384 
     
    7586        if [ ${#} -lt ${minargcount} ] 
    7687        then 
    77                 echo "not enough arguments for prepare_job.sh script" 
    78                 echo "control number of argument of prepare_job.sh in sette.sh" 
     88                echo "not enought arguments for fcm_job.sh script" 
     89                echo "control number of argument of fcm_job.sh in sette.sh" 
    7990                echo "${usage}" 
    8091        exit 1 
     
    159170    exit 1 
    160171fi 
    161  
     172#if [ ${NB_PROC} == 1 ] ; then 
     173#    echo "running opa" >> ${SETTE_DIR}/output.sette 
     174#    echo "            " >> ${SETTE_DIR}/output.sette 
     175#    ./opa 
     176# 
     177# Tidy out output from this test and populate the NEMO_VALIDATION_DIR tree 
     178# 
     179#    post_test_tidyup 
     180#else 
     181#    echo "running opa in MPI" >> ${SETTE_DIR}/output.sette 
     182#    echo "            " >> ${SETTE_DIR}/output.sette 
     183 
     184#    if [ ${MPI_INTERACT} == "yes" ] ; then 
     185#  # 
     186#  # example for brodie (NEC SX8) machine 
     187#  #  mpirun -np ${NB_PROC} opa 
     188#  # example for dedale machine 
     189#  #  mpirun --mca btl self,tcp -np ${NB_PROC} opa 
     190#  # example for vargas (IBM Power6) machine 
     191#  mpiexec -n ${NB_PROC} opa 
     192#  # 
     193#  post_test_tidyup 
     194#    fi 
     195# 
    162196# example for NOCS Altix system using PBS batch submission (requires ${SETTE_DIR}/sette_batch_template file) 
    163197# 
    164   #  if [ ${MPI_FLAG} == "no" ] ; then 
     198  #  if [ ${MPI_INTERACT} == "no" ] ; then 
    165199      case ${COMPILER} in  
    166200         ALTIX_NAUTILUS_MPT) 
     
    214248             -e"s/NPROCS/${NB_PROC}/" \ 
    215249             -e"s/QUEUE/${QUEUE}/" -e"s/MEM/${mem}/" \ 
     250             -e"s/QUEUE/${QUEUE}/" -e"s/MEM/${mem}/" \ 
    216251             -e"s:DEF_SETTE_DIR:${SETTE_DIR}:" -e"s:DEF_INPUT_DIR:${INPUT_DIR}:" \ 
    217252             -e"s:DEF_EXE_DIR:${EXE_DIR}:" \ 
     
    237272   fi 
    238273    
    239    chmod a+x $JOB_FILE ; echo "$JOB_FILE is ready" 
     274   chmod a+x $JOB_FILE 
    240275 
    241276#fi 
Note: See TracChangeset for help on using the changeset viewer.