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

source: NEMO/branches/2019/fix_sette_ticket2239/BATCH_TEMPLATE/batch-openmpi_KARA_MERCATOR_XIOS @ 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: 1.9 KB
Line 
1#!/bin/sh
2#SBATCH -J sette
3#SBATCH -o sette.%j.out
4#SBATCH -e sette.%j.err
5#SBATCH -N NODES
6#SBATCH --ntasks-per-node=NPROC_NODE
7#SBATCH -p multi
8#SBATCH --time=02:00:00
9#SBATCH --exclusive
10
11#
12# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
13# (via sed operating on this template job file).
14#
15  OCEANCORES=NPROCS
16  export SETTE_DIR=DEF_SETTE_DIR
17
18###############################################################
19#
20# set up mpp computing environment
21#
22# Local settings for machine IBM Power6 (VARGAS at IDRIS France)
23#
24#cbr export MPIRUN="mpiexec -n $OCEANCORES"
25export MPIRUN="mpirun -np $OCEANCORES"
26
27#
28# load sette functions (only post_test_tidyup needed)
29#
30  . ${SETTE_DIR}/all_functions.sh
31#
32
33# Don't remove neither change the following line
34# BODY
35
36#
37# These variables are needed by post_test_tidyup function in all_functions.sh
38#
39  export EXE_DIR=DEF_EXE_DIR
40  export INPUT_DIR=DEF_INPUT_DIR
41  export CONFIG_DIR=DEF_CONFIG_DIR
42  export TOOLS_DIR=DEF_TOOLS_DIR
43  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
44  export NEW_CONF=DEF_NEW_CONF
45  export CMP_NAM=DEF_CMP_NAM
46  export TEST_NAME=DEF_TEST_NAME
47#
48# end of set up
49###############################################################
50#
51# change to the working directory
52#
53cd ${EXE_DIR}
54  echo Running on host `hostname`
55  echo Time is `date`
56  echo Directory is `pwd`
57#
58#  Run the parallel MPI executable
59#
60  echo "Running time ${MPIRUN} ./nemo"
61#
62  if [ MPI_FLAG == "yes" ]; then
63     mpirun -np $OCEANCORES ./nemo
64  else
65     time ./nemo
66  fi
67
68#
69#
70# run post processing of sette only is run normally or expected error
71  NEMOEXIT=$?
72  case $NEMOEXIT in
73      0|123456|999) echo " NEMO finished with exit code $NEMOEXIT " ; post_test_tidyup ;;
74      *) echo " NEMO abort on an unexpected error (segmentation fault or whatever) $NEMOEXIT "
75  esac
76
77# END_BODY
78# Don't remove neither change the previous line
79
80
81  exit
Note: See TracBrowser for help on using the repository browser.