[9268] | 1 | #!/bin/bash |
---|
| 2 | ############################################################ |
---|
| 3 | # Author : Simona Flavoni for NEMO |
---|
| 4 | # Contact: sflod@locean-ipsl.upmc.fr |
---|
| 5 | # |
---|
| 6 | # sette_test-cases.sh : principal script of SET TEsts for NEMO (SETTE) |
---|
| 7 | # : this script : compiles, run and tests TEST_CASES |
---|
| 8 | # |
---|
| 9 | # : TO DO: test if nitend is equal to end of run.stat |
---|
| 10 | # ---------------------------------------------------------------------- |
---|
| 11 | # NEMO/SETTE , NEMO Consortium (2018) |
---|
| 12 | # Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 13 | # ---------------------------------------------------------------------- |
---|
| 14 | # |
---|
| 15 | # |
---|
| 16 | ############################################################# |
---|
| 17 | #set -vx |
---|
| 18 | set -o posix |
---|
| 19 | #set -u |
---|
| 20 | #set -e |
---|
| 21 | # =========== |
---|
| 22 | # DESCRIPTION |
---|
| 23 | # =========== |
---|
| 24 | # |
---|
| 25 | # Variables to be checked by user: |
---|
| 26 | # |
---|
| 27 | # COMPILER : name of compiler as defined in NEMOGCM/ARCH directory |
---|
| 28 | # BATCH_COMMAND_PAR : name of the command for submitting parallel batch jobs |
---|
| 29 | # BATCH_COMMAND_SEQ : name of the command for submitting sequential batch jobs |
---|
| 30 | # INTERACT_FLAG : flag to run in interactive mode "yes" |
---|
| 31 | # to run in batch mode "no" |
---|
| 32 | # MPIRUN_FLAG : flag to run in parallel (MPI) "yes" |
---|
| 33 | # to run in sequential mode (NB_PROC = 1) "no" |
---|
| 34 | # USING_XIOS : flag to control the activation of key_iomput |
---|
| 35 | # "yes" to compile using key_iomput and link to the external XIOS library |
---|
| 36 | # "no" to compile without key_iomput and link to the old IOIPSL library |
---|
| 37 | # USING_MPMD : flag to control the use of stand-alone IO servers |
---|
| 38 | # requires USING_XIOS="yes" |
---|
| 39 | # "yes" to run in MPMD (detached) mode with stand-alone IO servers |
---|
| 40 | # "no" to run in SPMD (attached) mode without separate IO servers |
---|
| 41 | # NUM_XIOSERVERS : number of stand-alone IO servers to employ |
---|
| 42 | # set to zero if USING_MPMD="no" |
---|
| 43 | # |
---|
| 44 | # Principal script is sette_test-cases.sh, that calls |
---|
| 45 | # |
---|
| 46 | # makenemo : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe |
---|
| 47 | # and links to opa in ${CONFIG_NAME}/EXP00) |
---|
| 48 | # |
---|
| 49 | # param.cfg : sets and loads following directories: |
---|
| 50 | # |
---|
| 51 | # FORCING_DIR : is the directory for forcing files (tarfile) |
---|
| 52 | # INPUT_DIR : is the directory for input files storing |
---|
| 53 | # TMPDIR : is the temporary directory (if needed) |
---|
| 54 | # NEMO_VALIDATION_DIR : is the validation directory |
---|
| 55 | # |
---|
| 56 | # (NOTE: this file is the same for all configrations to be tested with sette_test-cases.sh) |
---|
| 57 | # |
---|
| 58 | # all_functions.sh : loads functions used by sette (note: new functions can be added here) |
---|
| 59 | # set_namelist : function declared in all_functions that sets namelist parameters |
---|
| 60 | # post_test_tidyup : creates validation storage directory and copies required output files |
---|
| 61 | # (run.stat and ocean.output) in it after execution of test. |
---|
| 62 | # |
---|
| 63 | # VALIDATION tree is: |
---|
| 64 | # |
---|
| 65 | # NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) |
---|
| 66 | # |
---|
| 67 | # prepare_exe_dir.sh : defines and creates directory where the test is executed |
---|
| 68 | # execution directory takes name of TEST_NAME defined for every test |
---|
| 69 | # in sette_test-cases.sh. (each test in executed in its own directory) |
---|
| 70 | # |
---|
| 71 | # prepare_job.sh : to generate the script run_job.sh |
---|
| 72 | # |
---|
| 73 | # fcm_job.sh : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes") |
---|
| 74 | # see sette_test-cases.sh and BATCH_TEMPLATE directory |
---|
| 75 | # |
---|
| 76 | # NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which |
---|
| 77 | # can be found paths to the input tar file) |
---|
| 78 | # NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR} |
---|
| 79 | # directory |
---|
| 80 | # NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists |
---|
| 81 | # remain in ${NEW_CONF}/EXP00 |
---|
| 82 | # |
---|
| 83 | # NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of |
---|
| 84 | # executed commands |
---|
| 85 | # |
---|
| 86 | # NOTE: if sette_test-cases.sh is stopped in output.sette there is written the last command |
---|
| 87 | # executed by sette_test-cases.sh |
---|
| 88 | # |
---|
| 89 | # example use: ./sette_test-cases.sh |
---|
| 90 | ######################################################################################### |
---|
| 91 | # |
---|
| 92 | # Compiler among those in NEMOGCM/ARCH |
---|
| 93 | COMPILER=X64_ADA |
---|
| 94 | |
---|
| 95 | export BATCH_COMMAND_PAR="llsubmit" |
---|
| 96 | export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR |
---|
| 97 | export INTERACT_FLAG="no" |
---|
| 98 | export MPIRUN_FLAG="yes" |
---|
| 99 | export USING_XIOS="yes" |
---|
| 100 | # |
---|
| 101 | export DEL_KEYS="key_iomput" |
---|
| 102 | if [ ${USING_XIOS} == "yes" ] |
---|
| 103 | then |
---|
| 104 | export DEL_KEYS="" |
---|
| 105 | fi |
---|
| 106 | # |
---|
| 107 | # Settings which control the use of stand alone servers (only relevant if using xios) |
---|
| 108 | # |
---|
| 109 | export USING_MPMD="no" |
---|
| 110 | export NUM_XIOSERVERS=4 |
---|
| 111 | export JOB_PREFIX=batch-mpmd |
---|
| 112 | # |
---|
| 113 | if [ ${USING_MPMD} == "no" ] |
---|
| 114 | then |
---|
| 115 | export NUM_XIOSERVERS=0 |
---|
| 116 | export JOB_PREFIX=batch |
---|
| 117 | fi |
---|
| 118 | # |
---|
| 119 | # |
---|
| 120 | if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no"] |
---|
| 121 | then |
---|
| 122 | echo "Incompatible choices. MPMD mode requires the XIOS server" |
---|
| 123 | exit |
---|
| 124 | fi |
---|
| 125 | |
---|
| 126 | # Directory to run the tests |
---|
| 127 | SETTE_DIR=$(cd $(dirname "$0"); pwd) |
---|
| 128 | MAIN_DIR=$(dirname $SETTE_DIR) |
---|
| 129 | CONFIG_DIR0=${MAIN_DIR}/CONFIG |
---|
| 130 | TOOLS_DIR=${MAIN_DIR}/TOOLS |
---|
| 131 | COMPIL_DIR=${TOOLS_DIR}/COMPILE |
---|
| 132 | |
---|
| 133 | CMP_NAM=${1:-$COMPILER} |
---|
| 134 | # Copy job_batch_COMPILER file for specific compiler into job_batch_template |
---|
| 135 | cd ${SETTE_DIR} |
---|
| 136 | cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit |
---|
| 137 | # Description of configuration tested: |
---|
| 138 | # OVERFLOW : 1 TEST s-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs |
---|
| 139 | # & (dynamics) advection schemes: flux form (ubs, centered), vector form (een) |
---|
| 140 | # zps-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs |
---|
| 141 | # & (dynamics) advection schemes: flux form (ubs, centered), vector form (een, and een + Hollingsworth correction) |
---|
| 142 | # LOCK_EXCHANGE : 2 |
---|
| 143 | # VORTEX : 3 |
---|
| 144 | # WAD : 4 |
---|
| 145 | # SAS_BIPER : 5 |
---|
[9518] | 146 | # ISOMIP : 6 |
---|
[9268] | 147 | |
---|
| 148 | |
---|
[9518] | 149 | for config in 1 2 3 4 5 6 |
---|
[9268] | 150 | do |
---|
| 151 | |
---|
| 152 | # TESTS FOR OVERFLOW CONFIGURATION |
---|
| 153 | if [ ${config} -eq 1 ] ; then |
---|
| 154 | ## Restartability tests for OVERFLOW |
---|
| 155 | export TEST_NAME="LONG" |
---|
| 156 | cd ${CONFIG_DIR0} |
---|
[9518] | 157 | . ./makenemo -m ${CMP_NAM} -a TEST_CASES -n OVERFLOW_ST -r OVERFLOW -j 8 del_key ${DEL_KEYS} |
---|
[9268] | 158 | cd ${SETTE_DIR} |
---|
| 159 | . ./param.cfg |
---|
| 160 | . ./all_functions.sh |
---|
| 161 | . ./prepare_exe_dir.sh |
---|
| 162 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 163 | NPROC=1 |
---|
| 164 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 165 | cd ${EXE_DIR} |
---|
| 166 | set_namelist namelist_cfg cn_exp \"OVF_LONG\" |
---|
| 167 | set_namelist namelist_cfg nn_it000 1 |
---|
| 168 | set_namelist namelist_cfg nn_itend 120 |
---|
| 169 | set_namelist namelist_cfg nn_stock 60 |
---|
| 170 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 171 | set_xio_using_server iodef.xml true |
---|
| 172 | else |
---|
| 173 | set_xio_using_server iodef.xml false |
---|
| 174 | fi |
---|
| 175 | cd ${SETTE_DIR} |
---|
| 176 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 177 | |
---|
| 178 | cd ${SETTE_DIR} |
---|
| 179 | export TEST_NAME="SHORT" |
---|
| 180 | . ./prepare_exe_dir.sh |
---|
| 181 | cd ${EXE_DIR} |
---|
| 182 | set_namelist namelist_cfg cn_exp \"OVF_SHORT\" |
---|
| 183 | set_namelist namelist_cfg nn_it000 61 |
---|
| 184 | set_namelist namelist_cfg nn_itend 120 |
---|
| 185 | set_namelist namelist_cfg nn_stock 60 |
---|
| 186 | set_namelist namelist_cfg ln_rstart .true. |
---|
| 187 | set_namelist namelist_cfg nn_rstctl 2 |
---|
| 188 | set_namelist namelist_cfg cn_ocerst_in \"OVF_LONG_00000060_restart\" |
---|
| 189 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 190 | set_xio_using_server iodef.xml true |
---|
| 191 | else |
---|
| 192 | set_xio_using_server iodef.xml false |
---|
| 193 | fi |
---|
| 194 | ln -sf ../LONG/OVF_LONG_00000060_restart.nc . |
---|
| 195 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 196 | set_xio_using_server iodef.xml true |
---|
| 197 | else |
---|
| 198 | set_xio_using_server iodef.xml false |
---|
| 199 | fi |
---|
| 200 | cd ${SETTE_DIR} |
---|
| 201 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 202 | cd ${SETTE_DIR} |
---|
| 203 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 204 | |
---|
| 205 | |
---|
| 206 | ## Test for all advection, vert. coordinates, vector form, flux form: test runability and complete all time steps |
---|
| 207 | ## Needed namelist-xxxx for every type of run tested |
---|
| 208 | cd ${CONFIG_DIR}/${NEW_CONF}/EXP00 |
---|
| 209 | |
---|
| 210 | for file in $(echo `ls namelist_*_cfg `) ; do |
---|
| 211 | TEST_NAME=`ls $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"` |
---|
| 212 | TEST_NAME="EXP-${TEST_NAME}" |
---|
| 213 | `mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}` |
---|
| 214 | export TEST_NAME="${TEST_NAME}" |
---|
| 215 | ## |
---|
| 216 | cd ${SETTE_DIR} |
---|
| 217 | . ./param.cfg |
---|
| 218 | . ./all_functions.sh |
---|
| 219 | . ./prepare_exe_dir.sh |
---|
| 220 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 221 | NPROC=1 |
---|
| 222 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 223 | cd ${EXE_DIR} |
---|
| 224 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 225 | set_xio_using_server iodef.xml true |
---|
| 226 | else |
---|
| 227 | set_xio_using_server iodef.xml false |
---|
| 228 | fi |
---|
| 229 | cd ${SETTE_DIR} |
---|
| 230 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 231 | cd ${SETTE_DIR} |
---|
| 232 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 233 | ## |
---|
| 234 | done |
---|
| 235 | fi |
---|
| 236 | |
---|
| 237 | # TESTS FOR LOCK_EXCHANGE CONFIGURATION |
---|
| 238 | if [ ${config} -eq 2 ] ; then |
---|
| 239 | ## Restartability tests for LOCK_EXCHANGE |
---|
| 240 | export TEST_NAME="LONG" |
---|
| 241 | cd ${CONFIG_DIR0} |
---|
[9518] | 242 | . ./makenemo -m ${CMP_NAM} -a TEST_CASES -n LOCK_EXCHANGE_ST -r OVERFLOW -j 8 del_key ${DEL_KEYS} |
---|
[9268] | 243 | cd ${SETTE_DIR} |
---|
| 244 | . ./param.cfg |
---|
| 245 | . ./all_functions.sh |
---|
| 246 | . ./prepare_exe_dir.sh |
---|
| 247 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 248 | NPROC=1 |
---|
| 249 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 250 | cd ${EXE_DIR} |
---|
| 251 | set_namelist namelist_cfg cn_exp \"LOCK_LONG\" |
---|
| 252 | set_namelist namelist_cfg nn_it000 1 |
---|
| 253 | set_namelist namelist_cfg nn_stock 60 |
---|
| 254 | set_namelist namelist_cfg nn_itend 120 |
---|
| 255 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 256 | set_xio_using_server iodef.xml true |
---|
| 257 | else |
---|
| 258 | set_xio_using_server iodef.xml false |
---|
| 259 | fi |
---|
| 260 | cd ${SETTE_DIR} |
---|
| 261 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 262 | |
---|
| 263 | cd ${SETTE_DIR} |
---|
| 264 | export TEST_NAME="SHORT" |
---|
| 265 | . ./prepare_exe_dir.sh |
---|
| 266 | cd ${EXE_DIR} |
---|
| 267 | set_namelist namelist_cfg cn_exp \"LOCK_SHORT\" |
---|
| 268 | set_namelist namelist_cfg nn_it000 61 |
---|
| 269 | set_namelist namelist_cfg nn_itend 120 |
---|
| 270 | set_namelist namelist_cfg nn_stock 60 |
---|
| 271 | set_namelist namelist_cfg ln_rstart .true. |
---|
| 272 | set_namelist namelist_cfg nn_rstctl 2 |
---|
| 273 | set_namelist namelist_cfg cn_ocerst_in \"LOCK_LONG_00000060_restart\" |
---|
| 274 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 275 | set_xio_using_server iodef.xml true |
---|
| 276 | else |
---|
| 277 | set_xio_using_server iodef.xml false |
---|
| 278 | fi |
---|
| 279 | ln -sf ../LONG/LOCK_LONG_00000060_restart.nc . |
---|
| 280 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 281 | set_xio_using_server iodef.xml true |
---|
| 282 | else |
---|
| 283 | set_xio_using_server iodef.xml false |
---|
| 284 | fi |
---|
| 285 | cd ${SETTE_DIR} |
---|
| 286 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 287 | cd ${SETTE_DIR} |
---|
| 288 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 289 | |
---|
| 290 | ## Test for all advection, vector form, flux form: test runability and complete all time steps |
---|
| 291 | ## Needed namelist-xxxx for every type of run tested |
---|
| 292 | cd ${CONFIG_DIR}/${NEW_CONF}/EXP00 |
---|
| 293 | |
---|
| 294 | for file in $(echo `ls namelist_*_cfg `) ; do |
---|
| 295 | TEST_NAME=`ls $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"` |
---|
| 296 | TEST_NAME="EXP-${TEST_NAME}" |
---|
| 297 | `mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}` |
---|
| 298 | export TEST_NAME="${TEST_NAME}" |
---|
| 299 | ## |
---|
| 300 | cd ${SETTE_DIR} |
---|
| 301 | . ./param.cfg |
---|
| 302 | . ./all_functions.sh |
---|
| 303 | . ./prepare_exe_dir.sh |
---|
| 304 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 305 | NPROC=1 |
---|
| 306 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 307 | cd ${EXE_DIR} |
---|
| 308 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 309 | set_xio_using_server iodef.xml true |
---|
| 310 | else |
---|
| 311 | set_xio_using_server iodef.xml false |
---|
| 312 | fi |
---|
| 313 | cd ${SETTE_DIR} |
---|
| 314 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 315 | cd ${SETTE_DIR} |
---|
| 316 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 317 | ## |
---|
| 318 | done |
---|
| 319 | fi |
---|
| 320 | |
---|
| 321 | # TESTS FOR VORTEX CONFIGURATION |
---|
| 322 | if [ ${config} -eq 3 ] ; then |
---|
| 323 | ## Restartability tests for VORTEX |
---|
| 324 | export TEST_NAME="LONG" |
---|
| 325 | cd ${CONFIG_DIR0} |
---|
[9518] | 326 | . ./makenemo -m ${CMP_NAM} -a TEST_CASES -n VORTEX_ST -r VORTEX -j 8 del_key ${DEL_KEYS} |
---|
[9268] | 327 | cd ${SETTE_DIR} |
---|
| 328 | . ./param.cfg |
---|
| 329 | . ./all_functions.sh |
---|
| 330 | . ./prepare_exe_dir.sh |
---|
| 331 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 332 | NPROC=1 |
---|
| 333 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 334 | cd ${EXE_DIR} |
---|
| 335 | set_namelist namelist_cfg cn_exp \"VORTEX_LONG\" |
---|
| 336 | set_namelist namelist_cfg nn_it000 1 |
---|
| 337 | set_namelist namelist_cfg nn_stock 60 |
---|
| 338 | set_namelist namelist_cfg nn_itend 120 |
---|
| 339 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 340 | set_xio_using_server iodef.xml true |
---|
| 341 | else |
---|
| 342 | set_xio_using_server iodef.xml false |
---|
| 343 | fi |
---|
| 344 | cd ${SETTE_DIR} |
---|
| 345 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 346 | |
---|
| 347 | cd ${SETTE_DIR} |
---|
| 348 | export TEST_NAME="SHORT" |
---|
| 349 | . ./prepare_exe_dir.sh |
---|
| 350 | cd ${EXE_DIR} |
---|
| 351 | set_namelist namelist_cfg cn_exp \"VORTEX_SHORT\" |
---|
| 352 | set_namelist namelist_cfg nn_it000 61 |
---|
| 353 | set_namelist namelist_cfg nn_itend 120 |
---|
| 354 | set_namelist namelist_cfg nn_stock 60 |
---|
| 355 | set_namelist namelist_cfg ln_rstart .true. |
---|
| 356 | set_namelist namelist_cfg nn_rstctl 2 |
---|
| 357 | set_namelist namelist_cfg cn_ocerst_in \"VORTEX_LONG_00000060_restart\" |
---|
| 358 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 359 | set_xio_using_server iodef.xml true |
---|
| 360 | else |
---|
| 361 | set_xio_using_server iodef.xml false |
---|
| 362 | fi |
---|
| 363 | ln -sf ../LONG/VORTEX_LONG_00000060_restart.nc . |
---|
| 364 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 365 | set_xio_using_server iodef.xml true |
---|
| 366 | else |
---|
| 367 | set_xio_using_server iodef.xml false |
---|
| 368 | fi |
---|
| 369 | cd ${SETTE_DIR} |
---|
| 370 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 371 | cd ${SETTE_DIR} |
---|
| 372 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 373 | |
---|
| 374 | |
---|
| 375 | ## Test for all advection, vert. coordinates, vector form, flux form: test runability and complete all time steps |
---|
| 376 | ## Needed namelist-xxxx for every type of run tested |
---|
| 377 | cd ${CONFIG_DIR}/${NEW_CONF}/EXP00 |
---|
| 378 | |
---|
| 379 | for file in $(echo `ls namelist_*_cfg `) ; do |
---|
| 380 | TEST_NAME=`ls $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"` |
---|
| 381 | TEST_NAME="EXP-${TEST_NAME}" |
---|
| 382 | `mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}` |
---|
| 383 | export TEST_NAME="${TEST_NAME}" |
---|
| 384 | ## |
---|
| 385 | cd ${SETTE_DIR} |
---|
| 386 | . ./param.cfg |
---|
| 387 | . ./all_functions.sh |
---|
| 388 | . ./prepare_exe_dir.sh |
---|
| 389 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 390 | NPROC=1 |
---|
| 391 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 392 | cd ${EXE_DIR} |
---|
| 393 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 394 | set_xio_using_server iodef.xml true |
---|
| 395 | else |
---|
| 396 | set_xio_using_server iodef.xml false |
---|
| 397 | fi |
---|
| 398 | cd ${SETTE_DIR} |
---|
| 399 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 400 | cd ${SETTE_DIR} |
---|
| 401 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 402 | ## |
---|
| 403 | done |
---|
| 404 | fi |
---|
| 405 | |
---|
[9458] | 406 | |
---|
| 407 | # TESTS FOR SAS_BIPER CONFIGURATION |
---|
| 408 | if [ ${config} -eq 5 ] ; then |
---|
[9509] | 409 | ## Restartability tests for SAS_BIPER |
---|
[9458] | 410 | export TEST_NAME="LONG" |
---|
| 411 | cd ${CONFIG_DIR0} |
---|
| 412 | . ./makenemo -m ${CMP_NAM} -n SAS_BIPER_ST -r SAS_BIPER -a TEST_CASES -j 8 del_key ${DEL_KEYS} |
---|
| 413 | cd ${SETTE_DIR} |
---|
| 414 | . ./param.cfg |
---|
| 415 | . ./all_functions.sh |
---|
| 416 | . ./prepare_exe_dir.sh |
---|
| 417 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 418 | NPROC=1 |
---|
| 419 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 420 | cd ${EXE_DIR} |
---|
| 421 | set_namelist namelist_cfg cn_exp \"SAS_BIPER_LONG\" |
---|
| 422 | set_namelist namelist_cfg nn_it000 1 |
---|
| 423 | set_namelist namelist_cfg nn_itend 200 |
---|
| 424 | set_namelist namelist_cfg nn_stock 100 |
---|
| 425 | |
---|
[9509] | 426 | #set_namelist namelist_ice_cfg ln_icethd .true. |
---|
[9458] | 427 | set_namelist namelist_ice_cfg ln_icedyn .true. |
---|
| 428 | set_namelist namelist_ice_cfg ln_dynFULL .true. |
---|
| 429 | set_namelist namelist_ice_cfg ln_dynRHGADV .false. |
---|
| 430 | set_namelist namelist_ice_cfg ln_dynADV .false. |
---|
| 431 | |
---|
| 432 | set_namelist 1_namelist_cfg cn_exp \"SAS_BIPER_LONG\" |
---|
| 433 | set_namelist 1_namelist_cfg nn_it000 1 |
---|
| 434 | set_namelist 1_namelist_cfg nn_itend 600 |
---|
| 435 | set_namelist 1_namelist_cfg nn_stock 300 |
---|
| 436 | |
---|
[9509] | 437 | #set_namelist 1_namelist_ice_cfg ln_icethd .true. |
---|
[9458] | 438 | set_namelist 1_namelist_ice_cfg ln_icedyn .true. |
---|
| 439 | set_namelist 1_namelist_ice_cfg ln_dynFULL .true. |
---|
| 440 | set_namelist 1_namelist_ice_cfg ln_dynRHGADV .false. |
---|
| 441 | set_namelist 1_namelist_ice_cfg ln_dynADV .false. |
---|
| 442 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 443 | set_xio_using_server iodef.xml true |
---|
| 444 | else |
---|
| 445 | set_xio_using_server iodef.xml false |
---|
| 446 | fi |
---|
| 447 | cd ${SETTE_DIR} |
---|
| 448 | . ./prepare_job.sh input_SASBIPER.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 449 | |
---|
| 450 | cd ${SETTE_DIR} |
---|
| 451 | export TEST_NAME="SHORT" |
---|
| 452 | . ./prepare_exe_dir.sh |
---|
| 453 | cd ${EXE_DIR} |
---|
| 454 | set_namelist namelist_cfg cn_exp \"SAS_BIPER_SHORT\" |
---|
| 455 | set_namelist namelist_cfg nn_it000 101 |
---|
| 456 | set_namelist namelist_cfg nn_itend 200 |
---|
| 457 | set_namelist namelist_cfg nn_stock 100 |
---|
| 458 | set_namelist namelist_cfg ln_rstart .true. |
---|
| 459 | set_namelist namelist_cfg nn_rstctl 2 |
---|
| 460 | |
---|
[9509] | 461 | #set_namelist namelist_ice_cfg ln_icethd .true. |
---|
[9458] | 462 | set_namelist namelist_ice_cfg ln_icedyn .true. |
---|
| 463 | set_namelist namelist_ice_cfg ln_dynFULL .true. |
---|
| 464 | set_namelist namelist_ice_cfg ln_dynRHGADV .false. |
---|
| 465 | set_namelist namelist_ice_cfg ln_dynADV .false. |
---|
| 466 | set_namelist namelist_cfg cn_ocerst_in \"SAS_BIPER_LONG_00000100_restart\" |
---|
| 467 | set_namelist namelist_ice_cfg cn_icerst_in \"SAS_BIPER_LONG_00000100_restart_ice\" |
---|
| 468 | |
---|
| 469 | set_namelist 1_namelist_cfg cn_exp \"SAS_BIPER_SHORT\" |
---|
| 470 | set_namelist 1_namelist_cfg nn_it000 301 |
---|
| 471 | set_namelist 1_namelist_cfg nn_itend 600 |
---|
| 472 | set_namelist 1_namelist_cfg nn_stock 300 |
---|
| 473 | set_namelist 1_namelist_cfg ln_rstart .true. |
---|
| 474 | set_namelist 1_namelist_cfg nn_rstctl 2 |
---|
| 475 | |
---|
[9509] | 476 | #set_namelist 1_namelist_ice_cfg ln_icethd .true. |
---|
[9458] | 477 | set_namelist 1_namelist_ice_cfg ln_icedyn .true. |
---|
| 478 | set_namelist 1_namelist_ice_cfg ln_dynFULL .true. |
---|
| 479 | set_namelist 1_namelist_ice_cfg ln_dynRHGADV .false. |
---|
| 480 | set_namelist 1_namelist_ice_cfg ln_dynADV .false. |
---|
| 481 | set_namelist 1_namelist_cfg cn_ocerst_in \"SAS_BIPER_LONG_00000300_restart\" |
---|
| 482 | set_namelist 1_namelist_ice_cfg cn_icerst_in \"SAS_BIPER_LONG_00000300_restart_ice\" |
---|
| 483 | |
---|
| 484 | |
---|
| 485 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 486 | set_xio_using_server iodef.xml true |
---|
| 487 | else |
---|
| 488 | set_xio_using_server iodef.xml false |
---|
| 489 | fi |
---|
| 490 | if [ $NPROC -eq 1 ] ; then |
---|
| 491 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart.nc . |
---|
| 492 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_ice.nc . |
---|
| 493 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart.nc . |
---|
| 494 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_ice.nc . |
---|
| 495 | else |
---|
| 496 | for (( i=1; i<=$NPROC; i++)) ; do |
---|
| 497 | L_NPROC=$(( $i - 1 )) |
---|
| 498 | L_NPROC=`printf "%04d\n" ${L_NPROC}` |
---|
| 499 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_${L_NPROC}.nc . |
---|
| 500 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_ice_${L_NPROC}.nc . |
---|
| 501 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_${L_NPROC}.nc . |
---|
| 502 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_ice_${L_NPROC}.nc . |
---|
| 503 | done |
---|
| 504 | fi |
---|
| 505 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 506 | set_xio_using_server iodef.xml true |
---|
| 507 | else |
---|
| 508 | set_xio_using_server iodef.xml false |
---|
| 509 | fi |
---|
| 510 | if [ $NPROC -eq 1 ] ; then |
---|
| 511 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart.nc . |
---|
| 512 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_ice.nc . |
---|
| 513 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart.nc . |
---|
| 514 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_ice.nc . |
---|
| 515 | else |
---|
| 516 | for (( i=1; i<=$NPROC; i++)) ; do |
---|
| 517 | L_NPROC=$(( $i - 1 )) |
---|
| 518 | L_NPROC=`printf "%04d\n" ${L_NPROC}` |
---|
| 519 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_${L_NPROC}.nc . |
---|
| 520 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_ice_${L_NPROC}.nc . |
---|
| 521 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_${L_NPROC}.nc . |
---|
| 522 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_ice_${L_NPROC}.nc . |
---|
| 523 | done |
---|
| 524 | fi |
---|
| 525 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 526 | set_xio_using_server iodef.xml true |
---|
| 527 | else |
---|
| 528 | set_xio_using_server iodef.xml false |
---|
| 529 | fi |
---|
| 530 | cd ${SETTE_DIR} |
---|
| 531 | . ./prepare_job.sh input_SASBIPER.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 532 | cd ${SETTE_DIR} |
---|
| 533 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 534 | |
---|
| 535 | fi |
---|
| 536 | |
---|
[9518] | 537 | # ------ |
---|
| 538 | # ISOMIP |
---|
| 539 | # ------ |
---|
| 540 | if [ ${config} -eq 6 ] ; then |
---|
| 541 | ## Restartability tests |
---|
| 542 | export TEST_NAME="LONG" |
---|
| 543 | cd ${CONFIG_DIR0} |
---|
| 544 | . ./makenemo -m ${CMP_NAM} -n ISOMIP_ST -r ISOMIP -a TEST_CASES -j 8 del_key ${DEL_KEYS} |
---|
| 545 | cd ${SETTE_DIR} |
---|
| 546 | . ./param.cfg |
---|
| 547 | . ./all_functions.sh |
---|
| 548 | . ./prepare_exe_dir.sh |
---|
| 549 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 550 | NPROC=15 |
---|
| 551 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 552 | cd ${EXE_DIR} |
---|
| 553 | set_namelist namelist_cfg cn_exp \"ISOMIP_LONG\" |
---|
| 554 | set_namelist namelist_cfg nn_it000 1 |
---|
| 555 | set_namelist namelist_cfg nn_itend 96 |
---|
| 556 | set_namelist namelist_cfg nn_stock 48 |
---|
| 557 | set_namelist namelist_cfg jpni 5 |
---|
| 558 | set_namelist namelist_cfg jpnj 3 |
---|
| 559 | set_namelist namelist_cfg jpnij 15 |
---|
| 560 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 561 | set_xio_using_server iodef.xml true |
---|
| 562 | else |
---|
| 563 | set_xio_using_server iodef.xml false |
---|
| 564 | fi |
---|
| 565 | cd ${SETTE_DIR} |
---|
| 566 | . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 567 | |
---|
| 568 | cd ${SETTE_DIR} |
---|
| 569 | export TEST_NAME="SHORT" |
---|
| 570 | . ./prepare_exe_dir.sh |
---|
| 571 | cd ${EXE_DIR} |
---|
| 572 | set_namelist namelist_cfg cn_exp \"ISOMIP_SHORT\" |
---|
| 573 | set_namelist namelist_cfg nn_it000 49 |
---|
| 574 | set_namelist namelist_cfg nn_itend 96 |
---|
| 575 | set_namelist namelist_cfg nn_stock 48 |
---|
| 576 | set_namelist namelist_cfg ln_rstart .true. |
---|
| 577 | set_namelist namelist_cfg nn_rstctl 2 |
---|
| 578 | set_namelist namelist_cfg jpni 5 |
---|
| 579 | set_namelist namelist_cfg jpnj 3 |
---|
| 580 | set_namelist namelist_cfg jpnij 15 |
---|
| 581 | set_namelist namelist_cfg cn_ocerst_in \"ISOMIP_LONG_00000048_restart\" |
---|
| 582 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 583 | set_xio_using_server iodef.xml true |
---|
| 584 | else |
---|
| 585 | set_xio_using_server iodef.xml false |
---|
| 586 | fi |
---|
| 587 | for (( i=1; i<=$NPROC; i++)) ; do |
---|
| 588 | L_NPROC=$(( $i - 1 )) |
---|
| 589 | L_NPROC=`printf "%04d\n" ${L_NPROC}` |
---|
| 590 | ln -sf ../LONG/ISOMIP_LONG_00000048_restart_${L_NPROC}.nc . |
---|
| 591 | done |
---|
| 592 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 593 | set_xio_using_server iodef.xml true |
---|
| 594 | else |
---|
| 595 | set_xio_using_server iodef.xml false |
---|
| 596 | fi |
---|
| 597 | cd ${SETTE_DIR} |
---|
| 598 | . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 599 | cd ${SETTE_DIR} |
---|
| 600 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 601 | |
---|
| 602 | ## Reproducibility tests |
---|
| 603 | export TEST_NAME="REPRO_7_3" |
---|
| 604 | cd ${CONFIG_DIR0} |
---|
| 605 | cd ${SETTE_DIR} |
---|
| 606 | . ./param.cfg |
---|
| 607 | . ./all_functions.sh |
---|
| 608 | . ./prepare_exe_dir.sh |
---|
| 609 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 610 | NPROC=21 |
---|
| 611 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 612 | cd ${EXE_DIR} |
---|
| 613 | set_namelist namelist_cfg cn_exp \"ISOMIP_73\" |
---|
| 614 | set_namelist namelist_cfg nn_it000 1 |
---|
| 615 | set_namelist namelist_cfg nn_itend 48 |
---|
| 616 | set_namelist namelist_cfg jpni 7 |
---|
| 617 | set_namelist namelist_cfg jpnj 3 |
---|
| 618 | set_namelist namelist_cfg jpnij 21 |
---|
| 619 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 620 | set_xio_using_server iodef.xml true |
---|
| 621 | else |
---|
| 622 | set_xio_using_server iodef.xml false |
---|
| 623 | fi |
---|
| 624 | cd ${SETTE_DIR} |
---|
| 625 | . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 626 | cd ${SETTE_DIR} |
---|
| 627 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 628 | |
---|
| 629 | cd ${SETTE_DIR} |
---|
| 630 | export TEST_NAME="REPRO_8_4" |
---|
| 631 | . ./prepare_exe_dir.sh |
---|
| 632 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 633 | NPROC=32 |
---|
| 634 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 635 | cd ${EXE_DIR} |
---|
| 636 | set_namelist namelist_cfg cn_exp \"ISOMIP_84\" |
---|
| 637 | set_namelist namelist_cfg nn_it000 1 |
---|
| 638 | set_namelist namelist_cfg nn_itend 48 |
---|
| 639 | set_namelist namelist_cfg jpni 8 |
---|
| 640 | set_namelist namelist_cfg jpnj 4 |
---|
| 641 | set_namelist namelist_cfg jpnij 32 |
---|
| 642 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 643 | set_xio_using_server iodef.xml true |
---|
| 644 | else |
---|
| 645 | set_xio_using_server iodef.xml false |
---|
| 646 | fi |
---|
| 647 | cd ${SETTE_DIR} |
---|
| 648 | . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 649 | cd ${SETTE_DIR} |
---|
| 650 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 651 | |
---|
| 652 | fi |
---|
| 653 | |
---|
[9458] | 654 | #---- |
---|
[9268] | 655 | done |
---|