[4687] | 1 | #!/bin/bash |
---|
| 2 | #SBATCH -N NODES |
---|
[10632] | 3 | #SBATCH --time=00:59:00 |
---|
[4687] | 4 | |
---|
| 5 | module purge |
---|
| 6 | module load shared |
---|
[10632] | 7 | module use /home/acc/MyMods |
---|
| 8 | # set programming environment and XIO_HOME |
---|
| 9 | module load nemo-PrgEnv/4.0 |
---|
[4687] | 10 | |
---|
| 11 | # |
---|
| 12 | export OMP_NUM_THREADS=1 |
---|
| 13 | export OCORES=NPROCS |
---|
[4692] | 14 | export XCORES=NXIOPROCS |
---|
[4687] | 15 | export SETTE_DIR=DEF_SETTE_DIR |
---|
| 16 | # |
---|
| 17 | # load sette functions (only post_test_tidyup needed) |
---|
| 18 | # |
---|
| 19 | . ${SETTE_DIR}/all_functions.sh |
---|
| 20 | ############################################################### |
---|
| 21 | # |
---|
| 22 | # set up mpp computing environment |
---|
| 23 | # |
---|
| 24 | # |
---|
| 25 | # Local settings. These settings are for a particular machine (the MOBILIS ClusterVision |
---|
| 26 | # system at NOCS) at a particular stage of that machine's evolution. This template file |
---|
| 27 | # is provided for illustration purposes only and will not work on any other machine. There |
---|
| 28 | # should, however, be sufficient similarity with other MPP platforms and batch systems |
---|
| 29 | # for this example to provide a useful guide for experienced users |
---|
| 30 | # |
---|
| 31 | # Don't remove neither change the following line |
---|
| 32 | # BODY |
---|
| 33 | # |
---|
| 34 | # Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these |
---|
| 35 | # (via sed operating on this template job file). Note that the number of compute nodes required |
---|
| 36 | # is also set by the fcm_job.sh on the PBS select header line above. |
---|
| 37 | # |
---|
| 38 | # These variables are needed by post_test_tidyup function in all_functions.sh |
---|
| 39 | # |
---|
| 40 | export INPUT_DIR=DEF_INPUT_DIR |
---|
| 41 | export CONFIG_DIR=DEF_CONFIG_DIR |
---|
[8468] | 42 | export TOOLS_DIR=DEF_TOOLS_DIR |
---|
[4687] | 43 | export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION |
---|
| 44 | export NEW_CONF=DEF_NEW_CONF |
---|
| 45 | export CMP_NAM=DEF_CMP_NAM |
---|
| 46 | export TEST_NAME=DEF_TEST_NAME |
---|
| 47 | export EXE_DIR=DEF_EXE_DIR |
---|
| 48 | # |
---|
| 49 | # end of set up |
---|
| 50 | ############################################################### |
---|
| 51 | # |
---|
| 52 | # change to the working directory |
---|
| 53 | # |
---|
| 54 | cd $EXE_DIR |
---|
| 55 | echo Directory is `pwd` |
---|
[4692] | 56 | if [ $XCORES -eq 0 ]; then |
---|
[4687] | 57 | # |
---|
[4692] | 58 | # Run SPMD case |
---|
[4687] | 59 | # |
---|
[4692] | 60 | echo time `which mpirun` --report-bindings -x MALLOC_MMAP_MAX_=-1 \ |
---|
| 61 | -x MALLOC_TRIM_THRESHOLD_=33554432 -np $OCORES --bynode \ |
---|
[9576] | 62 | --mca mpi_paffinity_alone 1 ./nemo |
---|
[4692] | 63 | time `which mpirun` --report-bindings -x MALLOC_MMAP_MAX_=-1 \ |
---|
| 64 | -x MALLOC_TRIM_THRESHOLD_=33554432 -np $OCORES --bynode \ |
---|
[9576] | 65 | --mca mpi_paffinity_alone 1 ./nemo |
---|
[4692] | 66 | else |
---|
| 67 | if [ ! -f ./xios_server.exe ] && [ -f ${XIO_HOME}/bin/xios_server.exe ]; then |
---|
| 68 | cp ${XIO_HOME}/bin/xios_server.exe . |
---|
| 69 | fi |
---|
| 70 | if [ ! -f ./xios_server.exe ]; then |
---|
| 71 | echo "./xios_server.exe not found" |
---|
| 72 | echo "run aborted" |
---|
| 73 | exit |
---|
| 74 | fi |
---|
[4687] | 75 | # |
---|
[4692] | 76 | # Run MPMD case |
---|
[4687] | 77 | # |
---|
[4692] | 78 | echo time `which mpirun` --report-bindings -x MALLOC_MMAP_MAX_=-1 \ |
---|
| 79 | -x MALLOC_TRIM_THRESHOLD_=33554432 \ |
---|
| 80 | -np $XCORES ./xios_server.exe \ |
---|
[9576] | 81 | : -np $OCORES --bynode --mca mpi_paffinity_alone 1 ./nemo |
---|
[4687] | 82 | # |
---|
[4692] | 83 | time `which mpirun` --report-bindings -x MALLOC_MMAP_MAX_=-1 \ |
---|
| 84 | -x MALLOC_TRIM_THRESHOLD_=33554432 \ |
---|
| 85 | -np $XCORES ./xios_server.exe \ |
---|
[9576] | 86 | : -np $OCORES --bynode --mca mpi_paffinity_alone 1 ./nemo |
---|
[4687] | 87 | # |
---|
[4692] | 88 | fi |
---|
| 89 | # |
---|
[4687] | 90 | post_test_tidyup |
---|
| 91 | # END_BODY |
---|
| 92 | # Don't remove neither change the previous line |
---|
| 93 | exit |
---|