source: branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/fcm_job.sh @ 3635

Last change on this file since 3635 was 3635, checked in by acc, 8 years ago

Branch dev_NOC_2012_r3555. #1006. Step 13: Merge in trunk changes between revision 3452 and 3555. NOC merge complete subject to final SETTE testing.

  • Property svn:executable set to *
File size: 2.1 KB
Line 
1#####################################################
2# Author : Simona Flavoni for NEMO
3# Contact : sflod@locean-ipsl.upmc.fr
4#
5# Some scripts called by sette.sh
6# fcm_job.sh   : simple job to run NEMO with fcm
7######################################################
8#set -vx
9set -o posix
10#set -u
11#set -e
12#+
13#
14# ================
15# fcm_job.sh
16# ================
17#
18# --------------------------
19# Simple job for NEMO tests
20# --------------------------
21#
22# SYNOPSIS
23# ========
24#
25# :: lauches the script $JOB_FILE interactive or batch, one task or MPI
26#
27#  $ ./fcm_job.sh NUMBER_OF_PROCS JOB_FILE INTERACT_FLAG MPIRUN_FLAG
28#
29#
30# DESCRIPTION
31# ===========
32#
33# Simple job for SET TESTS for NEMO (SETTE)
34#
35
36#
37# EXAMPLES
38# ========
39#
40# ::
41#
42#  $ ./fcm_job.sh NUMBER_OF_PROCS JOB_FILE INTERACT_FLAG MPIRUN_FLAG
43#
44#  run a job with 1 processor SHORT test ( 5 days )
45#  using an interactive run without mpirun
46#
47#  ./fcm_job.sh        1           SHORT        yes          no
48#
49#
50# TODO
51# ====
52#
53# option debug
54#
55#
56# EVOLUTIONS
57# ==========
58#
59# $Id: $
60#
61#
62#
63#   * creation
64#
65#-
66#
67
68usage=" Usage : ./fcm_job.sh  NUMBER_OF_PROCS JOB_FILE INTERACT_FLAG MPIRUN_FLAG"
69usage=" example : ./fcm_job.sh       8          SHORT      no/yes       no/yes"
70
71
72minargcount=4
73        if [ ${#} -lt ${minargcount} ]
74        then
75                echo "not enough arguments for fcm_job.sh script"
76                echo "control number of argument of fcm_job.sh in sette.sh"
77                echo "${usage}"
78        exit 1
79        fi
80        unset minargcount
81   if [ ! -f ${SETTE_DIR}/output.sette ] ; then
82           touch ${SETTE_DIR}/output.sette
83   fi
84       
85
86export NB_PROCS=$1
87export JOB_FILE=$2
88export INTERACT_FLAG=$3
89export MPIRUN_FLAG=$4
90################################################################
91# RUN OPA
92cd ${EXE_DIR}
93if [ "${INTERACT_FLAG}" == "yes" ]; then
94   eval ${JOB_FILE}
95else if [ "${INTERACT_FLAG}" == "no" ]; then
96   # submit job to batch system
97        if [ "${NB_PROC}" == "1" ]; then
98      eval ${BATCH_COMMAND_SEQ} ${JOB_FILE} ; echo  ${BATCH_COMMAND_SEQ} ${JOB_FILE}
99        else
100      eval ${BATCH_COMMAND_PAR} ${JOB_FILE} ; echo ${BATCH_COMMAND_PAR} ${JOB_FILE}
101        fi
102fi
103fi
Note: See TracBrowser for help on using the repository browser.