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 | |
---|
28 | export 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 | # |
---|
58 | cd ${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 |
---|