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

source: NEMO/branches/2019/fix_sette_ticket2239/BATCH_TEMPLATE/batch-IBM_EKMAN_INGV @ 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.2 KB
Line 
1#!/bin/bash
2#!
3#BSUB -q long
4#BSUB -n TOTAL_NPROCS
5#BSUB -J MPI_config
6#BSUB -o stdout.%J
7#BSUB -e stderr.%J
8
9 
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  XIOS_NUMPROCS=NXIOPROCS
17  export SETTE_DIR=DEF_SETTE_DIR
18
19###############################################################
20#
21# set up mpp computing environment
22#
23# Local settings for machine IBM (EKMAN at INGV)
24#
25
26 MPIPROGINF=detail
27 export MPIPROGINF
28 export LSF_PJL_TYPE="intelmpi"
29 export MP_PGMMODEL=mpmd
30 export MP_SHARED_MEMORY=yes
31 export MPIRUN="mpirun -n $OCEANCORES"
32 export MPIRUN_MPMD="mpirun -np $OCEANCORES ./nemo : -np $XIOS_NUMPROCS /home/delrosso/XIOS_1.0/xios-1.0/bin/xios_server.exe"
33
34#
35# load sette functions (only post_test_tidyup needed)
36#
37  . ${SETTE_DIR}/all_functions.sh
38
39
40# Don't remove neither change the following line
41# BODY
42
43#
44# These variables are needed by post_test_tidyup function in all_functions.sh
45#
46  export EXE_DIR=DEF_EXE_DIR
47  export INPUT_DIR=DEF_INPUT_DIR
48  export CONFIG_DIR=DEF_CONFIG_DIR
49  export TOOLS_DIR=DEF_TOOLS_DIR
50  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
51  export NEW_CONF=DEF_NEW_CONF
52  export CMP_NAM=DEF_CMP_NAM
53  export TEST_NAME=DEF_TEST_NAME
54#
55# end of set up
56
57
58###############################################################
59#
60# change to the working directory
61#
62cd ${EXE_DIR}
63
64#
65  echo Running on host `hostname`
66  echo Time is `date`
67  echo Directory is `pwd`
68#
69#  Run the parallel MPI executable
70#
71#  echo "Running time ${MPIRUN} " $OCEANCORES " ./nemo"
72#
73
74  if [ MPI_FLAG == "yes" ]; then
75     if [ $XIOS_NUMPROCS -eq 0 ]; then
76       time ${MPIRUN} ./nemo
77     else
78       time ${MPIRUN_MPMD}
79     fi
80  else
81       time ./nemo
82  fi
83#
84#
85# run post processing of sette only is run normally or expected error
86  NEMOEXIT=$?
87  case $NEMOEXIT in
88      0|123456|999) echo " NEMO finished with exit code $NEMOEXIT " ; post_test_tidyup ;;
89      *) echo " NEMO abort on an unexpected error (segmentation fault or whatever) $NEMOEXIT "
90  esac
91
92# END_BODY
93# Don't remove neither change the previous line
94
95  exit
Note: See TracBrowser for help on using the repository browser.