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

source: branches/UKMO/CO5_package_branch/trunk/NEMOGCM/SETTE/fcm_job.sh @ 15390

Last change on this file since 15390 was 7363, checked in by deazer, 8 years ago

Removed Keywords

  • Property svn:executable set to *
File size: 2.6 KB
RevLine 
[2562]1#####################################################
[2354]2# Author : Simona Flavoni for NEMO
3# Contact : sflod@locean-ipsl.upmc.fr
4#
[2359]5# Some scripts called by sette.sh
6# fcm_job.sh   : simple job to run NEMO with fcm
[2354]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#
[3294]27#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG
[2354]28#
29#
30# DESCRIPTION
31# ===========
32#
33# Simple job for SET TESTS for NEMO (SETTE)
[2665]34#
[3294]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)
[2665]37#
[3294]38#   runs job in interactive or batch mode : all jobs using 1 process are run interactive, and all MPP jobs are
[2665]39#
[3294]40#   run in batch (MPI_INTERACT="no") or interactive (MPI_INTERACT="yes") see sette.sh and BATCH_TEMPLATE directory
[2665]41#
[3294]42#   and call post_test_tidyup function (that moves in NEMO_VALIDATION_DIR solver.stat, tracer.stat (for LOBSTER & PISCES) & ocean.output)
[2665]43#
[2354]44# EXAMPLES
45# ========
46#
47# ::
48#
[3294]49#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG
[2354]50#
[3294]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
[2354]53#
[3294]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
[2507]56#
57#
[2354]58# TODO
59# ====
60#
61# option debug
62#
63#
64# EVOLUTIONS
65# ==========
66#
[7363]67# $Id: fcm_job.sh 3294 2012-01-28 16:44:18Z rblod $
[2354]68#
69#
70#
71#   * creation
72#
73#-
74#
[2545]75
[3294]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"
[2545]78
79
[3294]80minargcount=2
[2545]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
[2656]89   if [ ! -f ${SETTE_DIR}/output.sette ] ; then
[2545]90           touch ${SETTE_DIR}/output.sette
91   fi
[2562]92       
[2545]93
[3294]94export NB_PROCS=$1
95export JOB_FILE=$2
[2562]96################################################################
[2354]97# RUN OPA
[3294]98cd ${EXE_DIR}
[2354]99
[3294]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
[2354]106
Note: See TracBrowser for help on using the repository browser.