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.
batch-X64_IRENE in NEMO/branches/2019/fix_sette_ticket2239/BATCH_TEMPLATE – NEMO

source: NEMO/branches/2019/fix_sette_ticket2239/BATCH_TEMPLATE/batch-X64_IRENE @ 10698

Last change on this file since 10698 was 10698, checked in by mathiot, 5 years ago

check exit code from NEMO (do not copy anything if it failed on exit code other than 0/123456/999) + rename run.stat/tracer.stat/ocean.output to *_old in the current validation dir (ticket #2239)

File size: 2.0 KB
Line 
1#!/bin/bash
2#MSUB -T 3600                # elapsed time limit in seconds   (60 minutes)
3#MSUB -r SETTE_JOB           # Job name
4#MSUB -o sette.jobid_%I.txt  # standard output
5#MSUB -e sette.jobid_%I.txt  # standard error
6#MSUB -n NPROCS              # Total number of mpi task to use
7#MSUB -A   gen6895          # project name
8#MSUB -q   skylake          # (queue name) only for thin nodes
9##########################################################################
10#
11# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
12# (via sed operating on this template job file).
13#
14  OCEANCORES=NPROCS
15  export SETTE_DIR=DEF_SETTE_DIR
16#
17# set up mpp computing environment
18#
19# Local settings for machine BULL (TITANE at CCRT France)
20#
21export MPIRUN="ccc_mprun -n $OCEANCORES"
22
23#
24# load sette functions (only post_test_tidyup needed)
25#
26  . ${SETTE_DIR}/all_functions.sh
27#
28
29# modules to load
30
31# Don't remove neither change the following line
32# BODY
33
34#
35# These variables are needed by post_test_tidyup function in all_functions.sh
36#
37  export EXE_DIR=DEF_EXE_DIR
38  export INPUT_DIR=DEF_INPUT_DIR
39  export CONFIG_DIR=DEF_CONFIG_DIR
40  export TOOLS_DIR=DEF_TOOLS_DIR
41  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
42  export NEW_CONF=DEF_NEW_CONF
43  export CMP_NAM=DEF_CMP_NAM
44  export TEST_NAME=DEF_TEST_NAME
45#
46# end of set up
47###############################################################
48#
49# change to the working directory
50#
51cd ${EXE_DIR}
52
53  echo Running on host `hostname`
54  echo Time is `date`
55  echo Directory is `pwd`
56#
57#  Run the parallel MPI executable
58#
59  echo "Running time ${MPIRUN} ./nemo"
60#
61  if [ MPI_FLAG == "yes" ]; then
62     time ${MPIRUN} ./nemo
63  else
64     time ./nemo
65  fi
66
67#
68#
69# run post processing of sette only is run normally or expected error
70  NEMOEXIT=$?
71  case $NEMOEXIT in
72      0|123456|999) echo " NEMO finished with exit code $NEMOEXIT " ; post_test_tidyup ;;
73      *) echo " NEMO abort on an unexpected error (segmentation fault or whatever) $NEMOEXIT "
74  esac
75
76# END_BODY
77# Don't remove neither change the previous line
78
79
80  exit
81
Note: See TracBrowser for help on using the repository browser.