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 | |
---|
26 | export I_MPI_HYDRA_BRANCH_COUNT=`cat $LSB_DJOB_HOSTFILE | uniq | wc -l` |
---|
27 | export MPIRUN="mpiexec.hydra" |
---|
28 | |
---|
29 | # local xios setting for MPMD |
---|
30 | export LD_LIBRARY_PATH=${XIOS}/lib:${LD_LIBRARY_PATH} |
---|
31 | XIOS_SERVER_PATHNAME="${XIOS}/bin/xios_server.exe" |
---|
32 | |
---|
33 | echo "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 | # |
---|
63 | cd ${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 | xioscmdfile="xioscmdfile" |
---|
77 | # FIX for IMPI and XIOS execution |
---|
78 | export I_MPI_LIBRARY_KIND="release_mt" |
---|
79 | source ${I_MPI_ROOT}/intel64/bin/mpivars.sh ${I_MPI_LIBRARY_KIND} |
---|
80 | # |
---|
81 | echo "# Configuration file for mpiexec.hydra" > $xioscmdfile |
---|
82 | echo "-n ${OCEANCORES} ./nemo" >> $xioscmdfile |
---|
83 | echo "-n ${XIOS_NUMPROCS} ${XIOS_SERVER_PATHNAME}" >> $xioscmdfile |
---|
84 | |
---|
85 | time ${MPIRUN} -configfile $xioscmdfile |
---|
86 | |
---|
87 | else |
---|
88 | # XIOS attached mode |
---|
89 | time ${MPIRUN} ./nemo |
---|
90 | fi |
---|
91 | else |
---|
92 | # Run the serial executable |
---|
93 | time ./nemo |
---|
94 | fi |
---|
95 | endTime=$(date +%s) |
---|
96 | totalTime=$(($endTime-$startTime)) |
---|
97 | echo "Model finished after $totalTime seconds for test $TEST_NAME" |
---|
98 | # |
---|
99 | post_test_tidyup |
---|
100 | |
---|
101 | # END_BODY |
---|
102 | # Don't remove neither change the previous line |
---|
103 | |
---|
104 | exit |
---|