1 | #!/bin/bash |
---|
2 | #SBATCH -N NODES |
---|
3 | #SBATCH --time=03:59:00 |
---|
4 | |
---|
5 | module purge |
---|
6 | module load shared |
---|
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 |
---|
12 | |
---|
13 | # |
---|
14 | export OMP_NUM_THREADS=1 |
---|
15 | export OCORES=NPROCS |
---|
16 | export XCORES=NXIOPROCS |
---|
17 | export SETTE_DIR=DEF_SETTE_DIR |
---|
18 | export XIO_HOME=/hpcdata/working/smueller/xios-2.5 |
---|
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 |
---|
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 | 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` |
---|
59 | if [ $XCORES -eq 0 ]; then |
---|
60 | # |
---|
61 | # Run SPMD case |
---|
62 | # |
---|
63 | echo time `which mpirun` --report-bindings -x MALLOC_MMAP_MAX_=-1 \ |
---|
64 | -x MALLOC_TRIM_THRESHOLD_=33554432 -np $OCORES --bynode \ |
---|
65 | --mca mpi_paffinity_alone 1 ./nemo |
---|
66 | time `which mpirun` --report-bindings -x MALLOC_MMAP_MAX_=-1 \ |
---|
67 | -x MALLOC_TRIM_THRESHOLD_=33554432 -np $OCORES --bynode \ |
---|
68 | --mca mpi_paffinity_alone 1 ./nemo |
---|
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 |
---|
78 | # |
---|
79 | # Run MPMD case |
---|
80 | # |
---|
81 | echo time `which mpirun` --report-bindings -x MALLOC_MMAP_MAX_=-1 \ |
---|
82 | -x MALLOC_TRIM_THRESHOLD_=33554432 \ |
---|
83 | -np $XCORES ./xios_server.exe \ |
---|
84 | : -np $OCORES --bynode --mca mpi_paffinity_alone 1 ./nemo |
---|
85 | # |
---|
86 | time `which mpirun` --report-bindings -x MALLOC_MMAP_MAX_=-1 \ |
---|
87 | -x MALLOC_TRIM_THRESHOLD_=33554432 \ |
---|
88 | -np $XCORES ./xios_server.exe \ |
---|
89 | : -np $OCORES --bynode --mca mpi_paffinity_alone 1 ./nemo |
---|
90 | # |
---|
91 | fi |
---|
92 | # |
---|
93 | post_test_tidyup |
---|
94 | # END_BODY |
---|
95 | # Don't remove neither change the previous line |
---|
96 | exit |
---|