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

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