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