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