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.
fcm_job.sh in branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE – NEMO

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

Last change on this file since 3608 was 3608, checked in by acc, 12 years ago

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

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.9 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 MPI_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 MPI_FLAG
43#
44#  run a
45#
46#
47# TODO
48# ====
49#
50# option debug
51#
52#
53# EVOLUTIONS
54# ==========
55#
56# $Id$
57#
58#
59#
60#   * creation
61#
62#-
63#
64
65usage=" Usage : ./fcm_job.sh  NUMBER_OF_PROCS JOB_FILE INTERACT MPI_FLAG"
66usage=" example : ./fcm_job.sh 8 SHORT no/yes no/yes"
67
68
69minargcount=4
70        if [ ${#} -lt ${minargcount} ]
71        then
72                echo "not enough arguments for fcm_job.sh script"
73                echo "control number of argument of fcm_job.sh in sette.sh"
74                echo "${usage}"
75        exit 1
76        fi
77        unset minargcount
78   if [ ! -f ${SETTE_DIR}/output.sette ] ; then
79           touch ${SETTE_DIR}/output.sette
80   fi
81       
82
83export NB_PROCS=$1
84export JOB_FILE=$2
85export INTERACT=$3
86export MPI_FLAG=$4
87################################################################
88# RUN OPA
89cd ${EXE_DIR}
90if [ "$INTERACT" == "yes" ]; then
91        eval $JOB_FILE
92else if [ "$INTERACT" == "no" ]; then
93# submit job to batch system
94        if [ "$NB_PROC" == "1" ]; then
95      eval ${BATCH_COMMAND_SEQ} $JOB_FILE ; echo  ${BATCH_COMMAND_SEQ} $JOB_FILE
96        else
97      eval ${BATCH_COMMAND_PAR} $JOB_FILE ; echo ${BATCH_COMMAND_PAR} $JOB_FILE
98        fi
99fi
100fi
Note: See TracBrowser for help on using the repository browser.