[4237] | 1 | #!/bin/bash |
---|
| 2 | #! |
---|
| 3 | #BSUB -q poe_short |
---|
[4373] | 4 | #BSUB -n TOTAL_NPROCS |
---|
[4237] | 5 | #BSUB -a poe |
---|
[8026] | 6 | #BSUB -J NEMO_SETTE |
---|
[4237] | 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 |
---|
[4373] | 17 | XIOS_NUMPROCS=NXIOPROCS |
---|
[4237] | 18 | export SETTE_DIR=DEF_SETTE_DIR |
---|
| 19 | |
---|
| 20 | ############################################################### |
---|
| 21 | # |
---|
| 22 | # set up mpp computing environment |
---|
| 23 | # |
---|
| 24 | # Local settings for machine IBM Power6 (VARGAS at IDRIS France) |
---|
| 25 | # |
---|
| 26 | |
---|
| 27 | # export MPIRUN="mpirun -n $OCEANCORES" |
---|
| 28 | |
---|
[6408] | 29 | module load INTEL/intel_xe_2013 NETCDF/netcdf-4.3_parallel NETCDF/parallel-netcdf-1.3.1 HDF5/hdf5-1.8.11_parallel |
---|
[4237] | 30 | export MPIRUN="mpirun.lsf" |
---|
| 31 | |
---|
[6408] | 32 | export LD_LIBRARY_PATH=${XIOS}/lib:${LD_LIBRARY_PATH} |
---|
[4373] | 33 | |
---|
[6408] | 34 | XIOS_SERVER_PATHNAME="${XIOS}/bin/xios_server.exe" |
---|
[4373] | 35 | |
---|
[4237] | 36 | # |
---|
| 37 | # load sette functions (only post_test_tidyup needed) |
---|
| 38 | # |
---|
| 39 | . ${SETTE_DIR}/all_functions.sh |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | # Don't remove neither change the following line |
---|
| 43 | # BODY |
---|
| 44 | |
---|
| 45 | # |
---|
| 46 | # These variables are needed by post_test_tidyup function in all_functions.sh |
---|
| 47 | # |
---|
| 48 | export EXE_DIR=DEF_EXE_DIR |
---|
| 49 | export INPUT_DIR=DEF_INPUT_DIR |
---|
| 50 | export CONFIG_DIR=DEF_CONFIG_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 | # echo "Running time ${MPIRUN} " $OCEANCORES " ./opa" |
---|
| 73 | # |
---|
| 74 | |
---|
| 75 | if [ MPI_FLAG == "yes" ]; then |
---|
[4373] | 76 | if [ $XIOS_NUMPROCS -eq 0 ]; then |
---|
| 77 | time ${MPIRUN} ./opa |
---|
| 78 | else |
---|
| 79 | |
---|
| 80 | export MP_PGMMODEL=mpmd |
---|
| 81 | export MP_CMDFILE=xioscmdfile |
---|
| 82 | rm xioscmdfile &> /dev/null |
---|
| 83 | touch xioscmdfile |
---|
| 84 | k=0 |
---|
| 85 | while (( k < $OCEANCORES )) ; do |
---|
| 86 | echo ./opa >> xioscmdfile |
---|
| 87 | k=`expr $k + 1` |
---|
| 88 | done |
---|
| 89 | k=0 |
---|
| 90 | while (( k < $XIOS_NUMPROCS )) ; do |
---|
| 91 | echo $XIOS_SERVER_PATHNAME >> xioscmdfile |
---|
| 92 | k=`expr $k + 1` |
---|
| 93 | done |
---|
| 94 | |
---|
| 95 | time ${MPIRUN} |
---|
| 96 | fi |
---|
[4237] | 97 | else |
---|
| 98 | time ./opa |
---|
| 99 | fi |
---|
| 100 | # |
---|
| 101 | post_test_tidyup |
---|
| 102 | |
---|
| 103 | # END_BODY |
---|
| 104 | # Don't remove neither change the previous line |
---|
| 105 | |
---|
| 106 | exit |
---|