[3736] | 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 | OCEANCORES=NPROCS |
---|
| 12 | XIOCORES=NXIOPROCS |
---|
| 13 | export SETTE_DIR=DEF_SETTE_DIR |
---|
| 14 | # |
---|
| 15 | # load sette functions (only post_test_tidyup needed) |
---|
| 16 | # |
---|
| 17 | . ${SETTE_DIR}/all_functions.sh |
---|
| 18 | ############################################################### |
---|
| 19 | # |
---|
| 20 | # set up mpp computing environment |
---|
| 21 | # |
---|
| 22 | # |
---|
| 23 | # Local settings. These settings are for a particular machine (the ALTIX ICE system at NOCS) |
---|
| 24 | # at a particular stage of that machine's evolution. This template file is provided for |
---|
| 25 | # illustration purposes only and will not work on any other machine. There should, however, |
---|
| 26 | # be sufficient similarity with other MPP platforms and batch systems for this example to provide |
---|
| 27 | # a useful guide for experienced users |
---|
| 28 | # |
---|
| 29 | module load mpt/2.03 |
---|
| 30 | export MPT_HOME=/opt/sgi/mpt/mpt-2.03 |
---|
| 31 | export NC4_HOME=/fibre/omfman/NETCDF_PAR |
---|
| 32 | export HD5_HOME=/fibre/omfman/NETCDF_PAR |
---|
| 33 | export XIO_HOME=/fibre/omfman/XIOS |
---|
| 34 | export SVN_HOME=/nerc/packages/subversion/v1.7.2 |
---|
| 35 | export FTN_LIB=/sw/Intel/fce/11.1.072/lib/intel64 |
---|
| 36 | export ICC_LIB=/sw/Intel/cce/11.1.072/lib/intel64 |
---|
| 37 | # |
---|
| 38 | echo Running on host `hostname` |
---|
| 39 | echo Time is `date` |
---|
| 40 | echo PBS job ID is $PBS_JOBID |
---|
| 41 | echo This jobs runs on the following machines: |
---|
| 42 | echo `cat $PBS_NODEFILE | uniq` |
---|
| 43 | # |
---|
| 44 | # Create a machine file for MPI |
---|
| 45 | cat $PBS_NODEFILE | uniq > host.file.$PBS_JOBID |
---|
| 46 | # |
---|
| 47 | echo export LD_LIBRARY_PATH=${MPT_HOME}/lib:${ICC_LIB}:${FTN_LIB}:${NC4_HOME}/lib:${HD5_HOME}/lib:${SVN_HOME}/lib:${LD_LIBRARY_PATH} |
---|
| 48 | export LD_LIBRARY_PATH=${MPT_HOME}/lib:${ICC_LIB}:${FTN_LIB}:${NC4_HOME}/lib:${HD5_HOME}/lib:${SVN_HOME}/lib:${LD_LIBRARY_PATH} |
---|
| 49 | # |
---|
| 50 | echo export PATH=${MPT_HOME}/bin:${SVN_HOME}/bin:$PATH |
---|
| 51 | export PATH=${MPT_HOME}/bin:${SVN_HOME}/bin:$PATH |
---|
| 52 | # |
---|
| 53 | export PSM_SHAREDPORTS=1 |
---|
| 54 | echo export MPI_PPN=4 |
---|
| 55 | echo export MPI_PPN_CLIST="2-3-6-7-0-1-4-5" |
---|
| 56 | echo export OMP_NUM_THREADS=1 |
---|
| 57 | # |
---|
| 58 | # Don't remove neither change the following line |
---|
| 59 | # BODY |
---|
| 60 | # |
---|
| 61 | # Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these |
---|
| 62 | # (via sed operating on this template job file). Note that the number of compute nodes required |
---|
| 63 | # (half-populated on the NOCS ALTIX system) is also set by the fcm_job.sh on the PBS select |
---|
| 64 | # header line above. |
---|
| 65 | # |
---|
| 66 | # These variables are needed by post_test_tidyup function in all_functions.sh |
---|
| 67 | # |
---|
| 68 | export INPUT_DIR=DEF_INPUT_DIR |
---|
| 69 | export CONFIG_DIR=DEF_CONFIG_DIR |
---|
| 70 | export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION |
---|
| 71 | export NEW_CONF=DEF_NEW_CONF |
---|
| 72 | export CMP_NAM=DEF_CMP_NAM |
---|
| 73 | export TEST_NAME=DEF_TEST_NAME |
---|
| 74 | export EXE_DIR=DEF_EXE_DIR |
---|
| 75 | # |
---|
| 76 | # end of set up |
---|
| 77 | ############################################################### |
---|
| 78 | # |
---|
| 79 | # change to the working directory |
---|
| 80 | # |
---|
| 81 | # cd $PBS_O_WORKDIR |
---|
| 82 | cd $EXE_DIR |
---|
| 83 | echo Directory is `pwd` |
---|
| 84 | if [ ! -f ./xios_server.exe ] && [ -f ${XIO_HOME}/bin/xios_server.exe ] |
---|
| 85 | then |
---|
| 86 | cp ${XIO_HOME}/bin/xios_server.exe . |
---|
| 87 | fi |
---|
| 88 | if [ ! -f ./xios_server.exe ] |
---|
| 89 | then |
---|
| 90 | echo "./xios_server.exe not found" |
---|
| 91 | echo "run aborted" |
---|
| 92 | exit |
---|
| 93 | fi |
---|
| 94 | # |
---|
| 95 | # |
---|
| 96 | # Run the parallel MPI executable |
---|
| 97 | # |
---|
| 98 | echo "Running time ${MPT_HOME}/bin/mpiexec_mpt -np " $XIOCORES " ./xios_server.exe : -np " $OCEANCORES " ./opa" |
---|
| 99 | # |
---|
| 100 | time ${MPT_HOME}/bin/mpiexec_mpt -np $XIOCORES ./xios_server.exe : -np $OCEANCORES ./opa |
---|
| 101 | # |
---|
| 102 | post_test_tidyup |
---|
| 103 | # END_BODY |
---|
| 104 | # Don't remove neither change the previous line |
---|
| 105 | exit |
---|