1 | #!/bin/bash |
---|
2 | #! |
---|
3 | #PBS -N NEMO |
---|
4 | #PBS -l select=NODES:ncpus=8:mpiprocs=4 |
---|
5 | #PBS -l place=scatter:excl |
---|
6 | #PBS -l walltime=00:59:00 |
---|
7 | #PBS -q nemo |
---|
8 | #PBS -W group_list=nemo |
---|
9 | #PBS -j oe |
---|
10 | |
---|
11 | ############################################################### |
---|
12 | # |
---|
13 | # set up mpp computing environment |
---|
14 | # |
---|
15 | # |
---|
16 | # Local settings. These settings are for a particular machine (the ALTIX ICE system at NOCS) |
---|
17 | # at a particular stage of that machine's evolution. This template file is provided for |
---|
18 | # illustration purposes only and will not work on any other machine. There should, however, |
---|
19 | # be sufficient similarity with other MPP platforms and batch systems for this example to provide |
---|
20 | # a useful guide for experienced users |
---|
21 | # |
---|
22 | module load mpt/2.03 |
---|
23 | export MPT_HOME=/opt/sgi/mpt/mpt-2.03 |
---|
24 | export NC4_HOME=/sata/working/jeff/packages/netcdf4/netcdf-4.1.1/altix/intel10.1 |
---|
25 | export HD5_HOME=/sata/working/jeff/packages/hdf5/hdf5-1.8.4-patch1/altix/intel10.1 |
---|
26 | export IFT_HOME=/sw/Intel/fce/10.1.021 |
---|
27 | export SVN_HOME=/fibre/acc/UTILS/svn/v1.5/svn |
---|
28 | # |
---|
29 | # |
---|
30 | # Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these |
---|
31 | # (via sed operating on this template job file). Note that the number of compute nodes required |
---|
32 | # (half-populated on the NOCS ALTIX system) is also set by the fcm_job.sh on the PBS select |
---|
33 | # header line above. |
---|
34 | # |
---|
35 | OCEANCORES=NPROCS |
---|
36 | export SETTE_DIR=DEF_SETTE_DIR |
---|
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 OUTPUT_DIR=DEF_OUTPUT_DIR |
---|
42 | export CONFIG_DIR=DEF_CONFIG_DIR |
---|
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 $PBS_O_WORKDIR |
---|
55 | # |
---|
56 | # load sette functions (only post_test_tidyup needed) |
---|
57 | # |
---|
58 | . ${SETTE_DIR}/all_functions.sh |
---|
59 | # |
---|
60 | echo Running on host `hostname` |
---|
61 | echo Time is `date` |
---|
62 | echo Directory is `pwd` |
---|
63 | echo PBS job ID is $PBS_JOBID |
---|
64 | echo This jobs runs on the following machines: |
---|
65 | echo `cat $PBS_NODEFILE | uniq` |
---|
66 | # |
---|
67 | # Create a machine file for MPI |
---|
68 | cat $PBS_NODEFILE | uniq > host.file.$PBS_JOBID |
---|
69 | # |
---|
70 | echo export LD_LIBRARY_PATH=${MPT_HOME}/lib:${IFT_HOME}/lib:${NC4_HOME}/lib:${HD5_HOME}/lib:${SVN_HOME}/lib |
---|
71 | export LD_LIBRARY_PATH=${MPT_HOME}/lib:${IFT_HOME}/lib:${NC4_HOME}/lib:${HD5_HOME}/lib:${SVN_HOME}/lib |
---|
72 | # |
---|
73 | echo export PATH=${MPT_HOME}/bin:${SVN_HOME}/bin:$PATH |
---|
74 | export PATH=${MPT_HOME}/bin:${SVN_HOME}/bin:$PATH |
---|
75 | # |
---|
76 | export PSM_SHAREDPORTS=1 |
---|
77 | echo export MPI_PPN=4 |
---|
78 | echo export MPI_PPN_CLIST="2-3-6-7-0-1-4-5" |
---|
79 | echo export OMP_NUM_THREADS=1 |
---|
80 | # |
---|
81 | # Run the parallel MPI executable |
---|
82 | # |
---|
83 | echo "Running time ${MPT_HOME}/bin/mpiexec_mpt -np " $OCEANCORES " ./opa" |
---|
84 | # |
---|
85 | time ${MPT_HOME}/bin/mpiexec_mpt -np $OCEANCORES ./opa |
---|
86 | # |
---|
87 | post_test_tidyup |
---|
88 | exit |
---|