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

source: NEMO/branches/2019/fix_sette_ticket2239/BATCH_TEMPLATE/batch-X64_ADA @ 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)

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