source: utils/CI/sette/BATCH_TEMPLATE/batch-X64_ZEUS @ 14561

Last change on this file since 14561 was 14561, checked in by lovato, 2 months ago

add sette batch script for CMCC cluster ZEUS (batch-X64_ZEUS)

File size: 2.5 KB
Line 
1#!/bin/bash
2#!
3#BSUB -q p_short
4#BSUB -n TOTAL_NPROCS
5#BSUB -J NEMO_SETTE
6#BSUB -o job_sette.out
7#BSUB -e job_sette.out
8#BSUB -P R000
9#BSUB -R "span[ptile=36]"
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 CMCC Skylake machine ZEUS
24#
25
26export I_MPI_HYDRA_BRANCH_COUNT=`cat $LSB_DJOB_HOSTFILE | uniq  | wc -l`
27export MPIRUN="mpiexec.hydra"
28
29# local xios setting for MPMD
30export LD_LIBRARY_PATH=${XIOS}/lib:${LD_LIBRARY_PATH}
31XIOS_SERVER_PATHNAME="${XIOS}/bin/xios_server.exe"
32
33echo "Start JOBID ${LSB_JOBID}"
34
35#
36# load sette functions (only post_test_tidyup needed)
37#
38  . ${SETTE_DIR}/all_functions.sh
39
40
41# Don't remove neither change the following line
42# BODY
43
44#
45# These variables are needed by post_test_tidyup function in all_functions.sh
46#
47  export EXE_DIR=DEF_EXE_DIR
48  export INPUT_DIR=DEF_INPUT_DIR
49  export CONFIG_DIR=DEF_CONFIG_DIR
50  export TOOLS_DIR=DEF_TOOLS_DIR
51  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
52  export NEW_CONF=DEF_NEW_CONF
53  export CMP_NAM=DEF_CMP_NAM
54  export TEST_NAME=DEF_TEST_NAME
55#
56# end of set up
57
58
59###############################################################
60#
61# change to the working directory
62#
63cd ${EXE_DIR}
64
65#
66  echo Running on host `hostname`
67  echo Time is `date`
68  echo Directory is `pwd`
69#
70#  Run the parallel MPI executable
71#
72  startTime=$(date +%s)
73  if [ MPI_FLAG == "yes" ]; then
74     if [ $USING_MPMD == "yes" ] && [ $XIOS_NUMPROCS -gt 0 ]; then
75        # XIOS detached mode
76        export MP_PGMMODEL=mpmd
77        export MP_CMDFILE=xioscmdfile
78        rm xioscmdfile &> /dev/null
79        touch xioscmdfile
80        k=0
81        while (( k < $OCEANCORES )) ; do
82           echo ./nemo >> xioscmdfile
83           k=`expr $k + 1`
84        done
85        k=0
86        while (( k < $XIOS_NUMPROCS )) ; do
87           echo $XIOS_SERVER_PATHNAME >> xioscmdfile
88           k=`expr $k + 1`
89        done
90
91        time ${MPIRUN}
92     else
93        # XIOS attached mode
94        time ${MPIRUN} ./nemo         
95     fi
96  else
97#  Run the serial executable
98     time ./nemo
99  fi
100  endTime=$(date +%s)
101  totalTime=$(($endTime-$startTime))
102  echo "Model finished after $totalTime seconds for test $TEST_NAME"
103#
104  post_test_tidyup
105
106# END_BODY
107# Don't remove neither change the previous line
108
109  exit
Note: See TracBrowser for help on using the repository browser.