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 trunk/NEMOGCM/SETTE – NEMO

source: trunk/NEMOGCM/SETTE/fcm_job.sh @ 3294

Last change on this file since 3294 was 3294, checked in by rblod, 12 years ago

Merge of 3.4beta into the trunk

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 2.6 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 -x
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# ::
26#
27#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG
28#
29#
30# DESCRIPTION
31# ===========
32#
33# Simple job for SET TESTS for NEMO (SETTE)
34#
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)
43#
44# EXAMPLES
45# ========
46#
47# ::
48#
49#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG
50#
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
56#
57#
58# TODO
59# ====
60#
61# option debug
62#
63#
64# EVOLUTIONS
65# ==========
66#
67# $Id$
68#
69#
70#
71#   * creation
72#
73#-
74#
75
76usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg  NUMBER_OF_PROCS TEST_NAME INTERACT MPI_FLAG"
77usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes no/yes"
78
79
80minargcount=2
81        if [ ${#} -lt ${minargcount} ]
82        then
83                echo "not enought arguments for fcm_job.sh script"
84                echo "control number of argument of fcm_job.sh in sette.sh"
85                echo "${usage}"
86        exit 1
87        fi
88        unset minargcount
89   if [ ! -f ${SETTE_DIR}/output.sette ] ; then
90           touch ${SETTE_DIR}/output.sette
91   fi
92       
93
94export NB_PROCS=$1
95export JOB_FILE=$2
96################################################################
97# RUN OPA
98cd ${EXE_DIR}
99
100# submit job to batch system
101        if [ ${NB_PROC} -eq 1 ]; then
102      eval ${BATCH_COMMAND_SEQ} $JOB_FILE 
103        else
104      eval ${BATCH_COMMAND_PAR} $JOB_FILE
105        fi
106
Note: See TracBrowser for help on using the repository browser.