- Timestamp:
- 2012-11-26T11:46:39+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2012/dev_NOC_MERCATOR_2012/NEMOGCM/SETTE/prepare_job.sh
r3635 r3651 11 11 # prepare_job.sh : creates the job script for running job 12 12 ###################################################### 13 #set - vx13 #set -x 14 14 set -o posix 15 15 #set -u 16 16 #set -e 17 # +17 # 18 18 # 19 19 # ================ … … 30 30 # :: 31 31 # 32 # $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_ FLAG JOB_FILE32 # $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG 33 33 # 34 34 # … … 36 36 # =========== 37 37 # 38 # Part of the SETTE package to run tests for NEMO38 # Simple job for SET TESTS for NEMO (SETTE) 39 39 # 40 # prepare the script $JOB_FILE to run the tests 40 # get input files (if needed) : tar file 41 # (note this job needs to have an input_CONFIG.cfg in which can be found input tar file name) 42 # 43 # runs job in interactive or batch mode : all jobs using 1 process are run interactive, and all MPP jobs are 44 # 45 # run in batch (MPI_INTERACT="no") or interactive (MPI_INTERACT="yes") see sette.sh and BATCH_TEMPLATE directory 46 # 47 # and call post_test_tidyup function (that moves in NEMO_VALIDATION_DIR solver.stat, tracer.stat (for LOBSTER & PISCES) & ocean.output) 41 48 # 42 49 # EXAMPLES … … 45 52 # :: 46 53 # 47 # $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG $JOB_FILE 48 # 49 # prepare the $JOB_FILE for execution 54 # $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG 55 # 56 # run a job of config GYRE with 1 processor SHORT test ( 5 days ) using an interactive run without mpirun 57 # $ ./fcm_job.sh input_GYRE.cfg 1 SHORT yes no 58 # 59 # run a job of config ORCA2_LIM_PISCES with 8 processors test RESTARTABILITY submitting the job to the batch queue system and using mpirun 60 # $ ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 LONG no yes 50 61 # 51 62 # … … 59 70 # ========== 60 71 # 61 # $Id: prepare_job.sh 3050 2011-11-07 14:11:34Z acc $72 # $Id: fcm_job.sh 3050 2011-11-07 14:11:34Z acc $ 62 73 # 63 74 # … … 68 79 # 69 80 70 usage=" Usage : ./ prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE"71 usage=" example : ./ prepare_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes $JOB_FILE"81 usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg NUMBER_OF_PROCS TEST_NAME INTERACT MPI_FLAG" 82 usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes no/yes" 72 83 73 84 … … 75 86 if [ ${#} -lt ${minargcount} ] 76 87 then 77 echo "not enough arguments for prepare_job.sh script"78 echo "control number of argument of prepare_job.sh in sette.sh"88 echo "not enought arguments for fcm_job.sh script" 89 echo "control number of argument of fcm_job.sh in sette.sh" 79 90 echo "${usage}" 80 91 exit 1 … … 159 170 exit 1 160 171 fi 161 172 #if [ ${NB_PROC} == 1 ] ; then 173 # echo "running opa" >> ${SETTE_DIR}/output.sette 174 # echo " " >> ${SETTE_DIR}/output.sette 175 # ./opa 176 # 177 # Tidy out output from this test and populate the NEMO_VALIDATION_DIR tree 178 # 179 # post_test_tidyup 180 #else 181 # echo "running opa in MPI" >> ${SETTE_DIR}/output.sette 182 # echo " " >> ${SETTE_DIR}/output.sette 183 184 # if [ ${MPI_INTERACT} == "yes" ] ; then 185 # # 186 # # example for brodie (NEC SX8) machine 187 # # mpirun -np ${NB_PROC} opa 188 # # example for dedale machine 189 # # mpirun --mca btl self,tcp -np ${NB_PROC} opa 190 # # example for vargas (IBM Power6) machine 191 # mpiexec -n ${NB_PROC} opa 192 # # 193 # post_test_tidyup 194 # fi 195 # 162 196 # example for NOCS Altix system using PBS batch submission (requires ${SETTE_DIR}/sette_batch_template file) 163 197 # 164 # if [ ${MPI_ FLAG} == "no" ] ; then198 # if [ ${MPI_INTERACT} == "no" ] ; then 165 199 case ${COMPILER} in 166 200 ALTIX_NAUTILUS_MPT) … … 169 203 # number of processes required is an integer multiple of 4 170 204 # 171 NB_NODES=$( echo $NB_PROC | awk '{print $1 / 4}')205 NB_NODES=$( echo $NB_PROC | awk '{print $1 $1 / 4}') 172 206 else 173 207 # … … 178 212 fi 179 213 ;; 214 ifort_MERCATOR_CLUSTER) 215 echo NB_PROCS ${NB_PROC} 216 echo NB_NODES ${NB_NODES} 217 echo NB_PROC ${NB_PROC} 218 if [ ${NB_PROC} -eq 1 ] ; then 219 NB_NODES=1 220 QUEUE=monoproc 221 NB_PROC_NODE=${NB_PROC} 222 else 223 if [ ${NB_PROC} -le 8 ] ; then 224 NB_NODES=1 225 QUEUE=mono 226 NB_PROC_NODE=${NB_PROC} 227 else 228 NB_NODES=$( echo $NB_PROC | awk '{print $1 - $1 % 8}' | awk '{print $1 / 8 }') 229 QUEUE=multi 230 NB_PROC_NODE=8 231 fi 232 fi 233 echo NB_PROCS ${NB_PROC} 234 echo NB_NODES ${NB_NODES} 235 echo NB_PROC_NODE ${NB_PROC_NODE} 236 ;; 180 237 *) 181 238 NB_NODES=${NB_PROC} … … 186 243 # Pass settings into job file by using sed to edit predefined strings 187 244 # 188 cat ${SETTE_DIR}/job_batch_template | sed -e"s/NODES/${NB_NODES}/" -e"s/NPROCS/${NB_PROC}/" \ 245 ((mem=5*NB_PROC)) 246 echo NB_NODES NB_PROC QUEUE ${NB_NODES} ${NB_PROC} ${QUEUE} 247 cat ${SETTE_DIR}/job_batch_template | sed -e"s/NODES/${NB_NODES}/" -e"s/NPROCSNODE/${NB_PROC_NODE}/" \ 248 -e"s/NPROCS/${NB_PROC}/" \ 249 -e"s/QUEUE/${QUEUE}/" -e"s/MEM/${mem}/" \ 250 -e"s/QUEUE/${QUEUE}/" -e"s/MEM/${mem}/" \ 189 251 -e"s:DEF_SETTE_DIR:${SETTE_DIR}:" -e"s:DEF_INPUT_DIR:${INPUT_DIR}:" \ 190 252 -e"s:DEF_EXE_DIR:${EXE_DIR}:" \ … … 210 272 fi 211 273 212 chmod a+x $JOB_FILE ; echo "$JOB_FILE is ready"274 chmod a+x $JOB_FILE 213 275 214 276 #fi
Note: See TracChangeset
for help on using the changeset viewer.