[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 |
---|
[9576] | 47 | # and links to nemo in ${CONFIG_NAME}/EXP00) |
---|
[9268] | 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) |
---|
[9602] | 129 | CONFIG_DIR0=${MAIN_DIR}/cfgs |
---|
[9605] | 130 | TOOLS_DIR=${MAIN_DIR}/tools |
---|
[9268] | 131 | |
---|
| 132 | CMP_NAM=${1:-$COMPILER} |
---|
| 133 | # Copy job_batch_COMPILER file for specific compiler into job_batch_template |
---|
| 134 | cd ${SETTE_DIR} |
---|
| 135 | cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit |
---|
| 136 | # Description of configuration tested: |
---|
| 137 | # OVERFLOW : 1 TEST s-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs |
---|
| 138 | # & (dynamics) advection schemes: flux form (ubs, centered), vector form (een) |
---|
| 139 | # zps-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs |
---|
| 140 | # & (dynamics) advection schemes: flux form (ubs, centered), vector form (een, and een + Hollingsworth correction) |
---|
| 141 | # LOCK_EXCHANGE : 2 |
---|
| 142 | # VORTEX : 3 |
---|
| 143 | # WAD : 4 |
---|
| 144 | # SAS_BIPER : 5 |
---|
[9518] | 145 | # ISOMIP : 6 |
---|
[9268] | 146 | |
---|
| 147 | |
---|
[9518] | 148 | for config in 1 2 3 4 5 6 |
---|
[9268] | 149 | do |
---|
| 150 | |
---|
[9524] | 151 | # --------- |
---|
| 152 | # OVERFLOW |
---|
| 153 | # --------- |
---|
[9268] | 154 | if [ ${config} -eq 1 ] ; then |
---|
| 155 | ## Restartability tests for OVERFLOW |
---|
| 156 | export TEST_NAME="LONG" |
---|
| 157 | cd ${CONFIG_DIR0} |
---|
[9606] | 158 | . ./makenemo -m ${CMP_NAM} -a test_cases -n OVERFLOW_ST -r OVERFLOW -j 8 del_key ${DEL_KEYS} |
---|
[9268] | 159 | cd ${SETTE_DIR} |
---|
| 160 | . ./param.cfg |
---|
| 161 | . ./all_functions.sh |
---|
| 162 | . ./prepare_exe_dir.sh |
---|
| 163 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 164 | NPROC=1 |
---|
| 165 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 166 | cd ${EXE_DIR} |
---|
| 167 | set_namelist namelist_cfg cn_exp \"OVF_LONG\" |
---|
| 168 | set_namelist namelist_cfg nn_it000 1 |
---|
| 169 | set_namelist namelist_cfg nn_itend 120 |
---|
| 170 | set_namelist namelist_cfg nn_stock 60 |
---|
| 171 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 172 | set_xio_using_server iodef.xml true |
---|
| 173 | else |
---|
| 174 | set_xio_using_server iodef.xml false |
---|
| 175 | fi |
---|
| 176 | cd ${SETTE_DIR} |
---|
| 177 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 178 | |
---|
| 179 | cd ${SETTE_DIR} |
---|
| 180 | export TEST_NAME="SHORT" |
---|
| 181 | . ./prepare_exe_dir.sh |
---|
| 182 | cd ${EXE_DIR} |
---|
| 183 | set_namelist namelist_cfg cn_exp \"OVF_SHORT\" |
---|
| 184 | set_namelist namelist_cfg nn_it000 61 |
---|
| 185 | set_namelist namelist_cfg nn_itend 120 |
---|
| 186 | set_namelist namelist_cfg nn_stock 60 |
---|
| 187 | set_namelist namelist_cfg ln_rstart .true. |
---|
| 188 | set_namelist namelist_cfg nn_rstctl 2 |
---|
| 189 | set_namelist namelist_cfg cn_ocerst_in \"OVF_LONG_00000060_restart\" |
---|
| 190 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 191 | set_xio_using_server iodef.xml true |
---|
| 192 | else |
---|
| 193 | set_xio_using_server iodef.xml false |
---|
| 194 | fi |
---|
| 195 | ln -sf ../LONG/OVF_LONG_00000060_restart.nc . |
---|
| 196 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 197 | set_xio_using_server iodef.xml true |
---|
| 198 | else |
---|
| 199 | set_xio_using_server iodef.xml false |
---|
| 200 | fi |
---|
| 201 | cd ${SETTE_DIR} |
---|
| 202 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 203 | cd ${SETTE_DIR} |
---|
| 204 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 205 | |
---|
| 206 | |
---|
| 207 | ## Test for all advection, vert. coordinates, vector form, flux form: test runability and complete all time steps |
---|
| 208 | ## Needed namelist-xxxx for every type of run tested |
---|
| 209 | cd ${CONFIG_DIR}/${NEW_CONF}/EXP00 |
---|
| 210 | |
---|
| 211 | for file in $(echo `ls namelist_*_cfg `) ; do |
---|
| 212 | TEST_NAME=`ls $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"` |
---|
| 213 | TEST_NAME="EXP-${TEST_NAME}" |
---|
| 214 | `mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}` |
---|
| 215 | export TEST_NAME="${TEST_NAME}" |
---|
| 216 | ## |
---|
| 217 | cd ${SETTE_DIR} |
---|
| 218 | . ./param.cfg |
---|
| 219 | . ./all_functions.sh |
---|
| 220 | . ./prepare_exe_dir.sh |
---|
| 221 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 222 | NPROC=1 |
---|
| 223 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 224 | cd ${EXE_DIR} |
---|
| 225 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 226 | set_xio_using_server iodef.xml true |
---|
| 227 | else |
---|
| 228 | set_xio_using_server iodef.xml false |
---|
| 229 | fi |
---|
| 230 | cd ${SETTE_DIR} |
---|
| 231 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 232 | cd ${SETTE_DIR} |
---|
| 233 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 234 | ## |
---|
| 235 | done |
---|
| 236 | fi |
---|
| 237 | |
---|
[9524] | 238 | # -------------- |
---|
| 239 | # LOCK_EXCHANGE |
---|
| 240 | # -------------- |
---|
[9268] | 241 | if [ ${config} -eq 2 ] ; then |
---|
| 242 | ## Restartability tests for LOCK_EXCHANGE |
---|
| 243 | export TEST_NAME="LONG" |
---|
| 244 | cd ${CONFIG_DIR0} |
---|
[9606] | 245 | . ./makenemo -m ${CMP_NAM} -a test_cases -n LOCK_EXCHANGE_ST -r OVERFLOW -j 8 del_key ${DEL_KEYS} |
---|
[9268] | 246 | cd ${SETTE_DIR} |
---|
| 247 | . ./param.cfg |
---|
| 248 | . ./all_functions.sh |
---|
| 249 | . ./prepare_exe_dir.sh |
---|
| 250 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 251 | NPROC=1 |
---|
| 252 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 253 | cd ${EXE_DIR} |
---|
| 254 | set_namelist namelist_cfg cn_exp \"LOCK_LONG\" |
---|
| 255 | set_namelist namelist_cfg nn_it000 1 |
---|
| 256 | set_namelist namelist_cfg nn_stock 60 |
---|
| 257 | set_namelist namelist_cfg nn_itend 120 |
---|
| 258 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 259 | set_xio_using_server iodef.xml true |
---|
| 260 | else |
---|
| 261 | set_xio_using_server iodef.xml false |
---|
| 262 | fi |
---|
| 263 | cd ${SETTE_DIR} |
---|
| 264 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 265 | |
---|
| 266 | cd ${SETTE_DIR} |
---|
| 267 | export TEST_NAME="SHORT" |
---|
| 268 | . ./prepare_exe_dir.sh |
---|
| 269 | cd ${EXE_DIR} |
---|
| 270 | set_namelist namelist_cfg cn_exp \"LOCK_SHORT\" |
---|
| 271 | set_namelist namelist_cfg nn_it000 61 |
---|
| 272 | set_namelist namelist_cfg nn_itend 120 |
---|
| 273 | set_namelist namelist_cfg nn_stock 60 |
---|
| 274 | set_namelist namelist_cfg ln_rstart .true. |
---|
| 275 | set_namelist namelist_cfg nn_rstctl 2 |
---|
| 276 | set_namelist namelist_cfg cn_ocerst_in \"LOCK_LONG_00000060_restart\" |
---|
| 277 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 278 | set_xio_using_server iodef.xml true |
---|
| 279 | else |
---|
| 280 | set_xio_using_server iodef.xml false |
---|
| 281 | fi |
---|
| 282 | ln -sf ../LONG/LOCK_LONG_00000060_restart.nc . |
---|
| 283 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 284 | set_xio_using_server iodef.xml true |
---|
| 285 | else |
---|
| 286 | set_xio_using_server iodef.xml false |
---|
| 287 | fi |
---|
| 288 | cd ${SETTE_DIR} |
---|
| 289 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 290 | cd ${SETTE_DIR} |
---|
| 291 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 292 | |
---|
| 293 | ## Test for all advection, vector form, flux form: test runability and complete all time steps |
---|
| 294 | ## Needed namelist-xxxx for every type of run tested |
---|
| 295 | cd ${CONFIG_DIR}/${NEW_CONF}/EXP00 |
---|
| 296 | |
---|
| 297 | for file in $(echo `ls namelist_*_cfg `) ; do |
---|
| 298 | TEST_NAME=`ls $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"` |
---|
| 299 | TEST_NAME="EXP-${TEST_NAME}" |
---|
| 300 | `mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}` |
---|
| 301 | export TEST_NAME="${TEST_NAME}" |
---|
| 302 | ## |
---|
| 303 | cd ${SETTE_DIR} |
---|
| 304 | . ./param.cfg |
---|
| 305 | . ./all_functions.sh |
---|
| 306 | . ./prepare_exe_dir.sh |
---|
| 307 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 308 | NPROC=1 |
---|
| 309 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 310 | cd ${EXE_DIR} |
---|
| 311 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 312 | set_xio_using_server iodef.xml true |
---|
| 313 | else |
---|
| 314 | set_xio_using_server iodef.xml false |
---|
| 315 | fi |
---|
| 316 | cd ${SETTE_DIR} |
---|
| 317 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 318 | cd ${SETTE_DIR} |
---|
| 319 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 320 | ## |
---|
| 321 | done |
---|
| 322 | fi |
---|
| 323 | |
---|
[9524] | 324 | # --------- |
---|
| 325 | # VORTEX |
---|
| 326 | # --------- |
---|
[9268] | 327 | if [ ${config} -eq 3 ] ; then |
---|
| 328 | ## Restartability tests for VORTEX |
---|
| 329 | export TEST_NAME="LONG" |
---|
| 330 | cd ${CONFIG_DIR0} |
---|
[9606] | 331 | . ./makenemo -m ${CMP_NAM} -a test_cases -n VORTEX_ST -r VORTEX -j 8 del_key ${DEL_KEYS} |
---|
[9268] | 332 | cd ${SETTE_DIR} |
---|
| 333 | . ./param.cfg |
---|
| 334 | . ./all_functions.sh |
---|
| 335 | . ./prepare_exe_dir.sh |
---|
| 336 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 337 | NPROC=1 |
---|
| 338 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 339 | cd ${EXE_DIR} |
---|
| 340 | set_namelist namelist_cfg cn_exp \"VORTEX_LONG\" |
---|
| 341 | set_namelist namelist_cfg nn_it000 1 |
---|
| 342 | set_namelist namelist_cfg nn_stock 60 |
---|
| 343 | set_namelist namelist_cfg nn_itend 120 |
---|
| 344 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 345 | set_xio_using_server iodef.xml true |
---|
| 346 | else |
---|
| 347 | set_xio_using_server iodef.xml false |
---|
| 348 | fi |
---|
| 349 | cd ${SETTE_DIR} |
---|
| 350 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 351 | |
---|
| 352 | cd ${SETTE_DIR} |
---|
| 353 | export TEST_NAME="SHORT" |
---|
| 354 | . ./prepare_exe_dir.sh |
---|
| 355 | cd ${EXE_DIR} |
---|
| 356 | set_namelist namelist_cfg cn_exp \"VORTEX_SHORT\" |
---|
| 357 | set_namelist namelist_cfg nn_it000 61 |
---|
| 358 | set_namelist namelist_cfg nn_itend 120 |
---|
| 359 | set_namelist namelist_cfg nn_stock 60 |
---|
| 360 | set_namelist namelist_cfg ln_rstart .true. |
---|
| 361 | set_namelist namelist_cfg nn_rstctl 2 |
---|
| 362 | set_namelist namelist_cfg cn_ocerst_in \"VORTEX_LONG_00000060_restart\" |
---|
| 363 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 364 | set_xio_using_server iodef.xml true |
---|
| 365 | else |
---|
| 366 | set_xio_using_server iodef.xml false |
---|
| 367 | fi |
---|
| 368 | ln -sf ../LONG/VORTEX_LONG_00000060_restart.nc . |
---|
| 369 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 370 | set_xio_using_server iodef.xml true |
---|
| 371 | else |
---|
| 372 | set_xio_using_server iodef.xml false |
---|
| 373 | fi |
---|
| 374 | cd ${SETTE_DIR} |
---|
| 375 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 376 | cd ${SETTE_DIR} |
---|
| 377 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 378 | |
---|
| 379 | |
---|
| 380 | ## Test for all advection, vert. coordinates, vector form, flux form: test runability and complete all time steps |
---|
| 381 | ## Needed namelist-xxxx for every type of run tested |
---|
| 382 | cd ${CONFIG_DIR}/${NEW_CONF}/EXP00 |
---|
| 383 | |
---|
| 384 | for file in $(echo `ls namelist_*_cfg `) ; do |
---|
| 385 | TEST_NAME=`ls $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"` |
---|
| 386 | TEST_NAME="EXP-${TEST_NAME}" |
---|
| 387 | `mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}` |
---|
| 388 | export TEST_NAME="${TEST_NAME}" |
---|
| 389 | ## |
---|
| 390 | cd ${SETTE_DIR} |
---|
| 391 | . ./param.cfg |
---|
| 392 | . ./all_functions.sh |
---|
| 393 | . ./prepare_exe_dir.sh |
---|
| 394 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 395 | NPROC=1 |
---|
| 396 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 397 | cd ${EXE_DIR} |
---|
| 398 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 399 | set_xio_using_server iodef.xml true |
---|
| 400 | else |
---|
| 401 | set_xio_using_server iodef.xml false |
---|
| 402 | fi |
---|
| 403 | cd ${SETTE_DIR} |
---|
| 404 | . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 405 | cd ${SETTE_DIR} |
---|
| 406 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 407 | ## |
---|
| 408 | done |
---|
| 409 | fi |
---|
| 410 | |
---|
[9458] | 411 | |
---|
[9524] | 412 | # --------- |
---|
| 413 | # SAS_BIPER |
---|
| 414 | # --------- |
---|
[9458] | 415 | if [ ${config} -eq 5 ] ; then |
---|
[9509] | 416 | ## Restartability tests for SAS_BIPER |
---|
[9458] | 417 | export TEST_NAME="LONG" |
---|
| 418 | cd ${CONFIG_DIR0} |
---|
[9606] | 419 | . ./makenemo -m ${CMP_NAM} -n SAS_BIPER_ST -r SAS_BIPER -a test_cases -j 8 del_key ${DEL_KEYS} |
---|
[9458] | 420 | cd ${SETTE_DIR} |
---|
| 421 | . ./param.cfg |
---|
| 422 | . ./all_functions.sh |
---|
| 423 | . ./prepare_exe_dir.sh |
---|
| 424 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 425 | NPROC=1 |
---|
| 426 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 427 | cd ${EXE_DIR} |
---|
| 428 | set_namelist namelist_cfg cn_exp \"SAS_BIPER_LONG\" |
---|
| 429 | set_namelist namelist_cfg nn_it000 1 |
---|
| 430 | set_namelist namelist_cfg nn_itend 200 |
---|
| 431 | set_namelist namelist_cfg nn_stock 100 |
---|
| 432 | |
---|
[9509] | 433 | #set_namelist namelist_ice_cfg ln_icethd .true. |
---|
[9458] | 434 | set_namelist namelist_ice_cfg ln_icedyn .true. |
---|
| 435 | set_namelist namelist_ice_cfg ln_dynFULL .true. |
---|
| 436 | set_namelist namelist_ice_cfg ln_dynRHGADV .false. |
---|
| 437 | set_namelist namelist_ice_cfg ln_dynADV .false. |
---|
| 438 | |
---|
| 439 | set_namelist 1_namelist_cfg cn_exp \"SAS_BIPER_LONG\" |
---|
| 440 | set_namelist 1_namelist_cfg nn_it000 1 |
---|
| 441 | set_namelist 1_namelist_cfg nn_itend 600 |
---|
| 442 | set_namelist 1_namelist_cfg nn_stock 300 |
---|
| 443 | |
---|
[9509] | 444 | #set_namelist 1_namelist_ice_cfg ln_icethd .true. |
---|
[9458] | 445 | set_namelist 1_namelist_ice_cfg ln_icedyn .true. |
---|
| 446 | set_namelist 1_namelist_ice_cfg ln_dynFULL .true. |
---|
| 447 | set_namelist 1_namelist_ice_cfg ln_dynRHGADV .false. |
---|
| 448 | set_namelist 1_namelist_ice_cfg ln_dynADV .false. |
---|
| 449 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 450 | set_xio_using_server iodef.xml true |
---|
| 451 | else |
---|
| 452 | set_xio_using_server iodef.xml false |
---|
| 453 | fi |
---|
| 454 | cd ${SETTE_DIR} |
---|
| 455 | . ./prepare_job.sh input_SASBIPER.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 456 | |
---|
| 457 | cd ${SETTE_DIR} |
---|
| 458 | export TEST_NAME="SHORT" |
---|
| 459 | . ./prepare_exe_dir.sh |
---|
| 460 | cd ${EXE_DIR} |
---|
| 461 | set_namelist namelist_cfg cn_exp \"SAS_BIPER_SHORT\" |
---|
| 462 | set_namelist namelist_cfg nn_it000 101 |
---|
| 463 | set_namelist namelist_cfg nn_itend 200 |
---|
| 464 | set_namelist namelist_cfg nn_stock 100 |
---|
| 465 | set_namelist namelist_cfg ln_rstart .true. |
---|
| 466 | set_namelist namelist_cfg nn_rstctl 2 |
---|
| 467 | |
---|
[9509] | 468 | #set_namelist namelist_ice_cfg ln_icethd .true. |
---|
[9458] | 469 | set_namelist namelist_ice_cfg ln_icedyn .true. |
---|
| 470 | set_namelist namelist_ice_cfg ln_dynFULL .true. |
---|
| 471 | set_namelist namelist_ice_cfg ln_dynRHGADV .false. |
---|
| 472 | set_namelist namelist_ice_cfg ln_dynADV .false. |
---|
| 473 | set_namelist namelist_cfg cn_ocerst_in \"SAS_BIPER_LONG_00000100_restart\" |
---|
| 474 | set_namelist namelist_ice_cfg cn_icerst_in \"SAS_BIPER_LONG_00000100_restart_ice\" |
---|
| 475 | |
---|
| 476 | set_namelist 1_namelist_cfg cn_exp \"SAS_BIPER_SHORT\" |
---|
| 477 | set_namelist 1_namelist_cfg nn_it000 301 |
---|
| 478 | set_namelist 1_namelist_cfg nn_itend 600 |
---|
| 479 | set_namelist 1_namelist_cfg nn_stock 300 |
---|
| 480 | set_namelist 1_namelist_cfg ln_rstart .true. |
---|
| 481 | set_namelist 1_namelist_cfg nn_rstctl 2 |
---|
| 482 | |
---|
[9509] | 483 | #set_namelist 1_namelist_ice_cfg ln_icethd .true. |
---|
[9458] | 484 | set_namelist 1_namelist_ice_cfg ln_icedyn .true. |
---|
| 485 | set_namelist 1_namelist_ice_cfg ln_dynFULL .true. |
---|
| 486 | set_namelist 1_namelist_ice_cfg ln_dynRHGADV .false. |
---|
| 487 | set_namelist 1_namelist_ice_cfg ln_dynADV .false. |
---|
| 488 | set_namelist 1_namelist_cfg cn_ocerst_in \"SAS_BIPER_LONG_00000300_restart\" |
---|
| 489 | set_namelist 1_namelist_ice_cfg cn_icerst_in \"SAS_BIPER_LONG_00000300_restart_ice\" |
---|
| 490 | |
---|
| 491 | |
---|
| 492 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 493 | set_xio_using_server iodef.xml true |
---|
| 494 | else |
---|
| 495 | set_xio_using_server iodef.xml false |
---|
| 496 | fi |
---|
| 497 | if [ $NPROC -eq 1 ] ; then |
---|
| 498 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart.nc . |
---|
| 499 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_ice.nc . |
---|
| 500 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart.nc . |
---|
| 501 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_ice.nc . |
---|
| 502 | else |
---|
| 503 | for (( i=1; i<=$NPROC; i++)) ; do |
---|
| 504 | L_NPROC=$(( $i - 1 )) |
---|
| 505 | L_NPROC=`printf "%04d\n" ${L_NPROC}` |
---|
| 506 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_${L_NPROC}.nc . |
---|
| 507 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_ice_${L_NPROC}.nc . |
---|
| 508 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_${L_NPROC}.nc . |
---|
| 509 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_ice_${L_NPROC}.nc . |
---|
| 510 | done |
---|
| 511 | fi |
---|
| 512 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 513 | set_xio_using_server iodef.xml true |
---|
| 514 | else |
---|
| 515 | set_xio_using_server iodef.xml false |
---|
| 516 | fi |
---|
| 517 | if [ $NPROC -eq 1 ] ; then |
---|
| 518 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart.nc . |
---|
| 519 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_ice.nc . |
---|
| 520 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart.nc . |
---|
| 521 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_ice.nc . |
---|
| 522 | else |
---|
| 523 | for (( i=1; i<=$NPROC; i++)) ; do |
---|
| 524 | L_NPROC=$(( $i - 1 )) |
---|
| 525 | L_NPROC=`printf "%04d\n" ${L_NPROC}` |
---|
| 526 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_${L_NPROC}.nc . |
---|
| 527 | ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_ice_${L_NPROC}.nc . |
---|
| 528 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_${L_NPROC}.nc . |
---|
| 529 | ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_ice_${L_NPROC}.nc . |
---|
| 530 | done |
---|
| 531 | fi |
---|
| 532 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 533 | set_xio_using_server iodef.xml true |
---|
| 534 | else |
---|
| 535 | set_xio_using_server iodef.xml false |
---|
| 536 | fi |
---|
| 537 | cd ${SETTE_DIR} |
---|
| 538 | . ./prepare_job.sh input_SASBIPER.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 539 | cd ${SETTE_DIR} |
---|
| 540 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 541 | |
---|
| 542 | fi |
---|
| 543 | |
---|
[9518] | 544 | # ------ |
---|
| 545 | # ISOMIP |
---|
| 546 | # ------ |
---|
| 547 | if [ ${config} -eq 6 ] ; then |
---|
| 548 | ## Restartability tests |
---|
| 549 | export TEST_NAME="LONG" |
---|
| 550 | cd ${CONFIG_DIR0} |
---|
[9606] | 551 | . ./makenemo -m ${CMP_NAM} -n ISOMIP_ST -r ISOMIP -a test_cases -j 8 del_key ${DEL_KEYS} |
---|
[9518] | 552 | cd ${SETTE_DIR} |
---|
| 553 | . ./param.cfg |
---|
| 554 | . ./all_functions.sh |
---|
| 555 | . ./prepare_exe_dir.sh |
---|
| 556 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 557 | NPROC=15 |
---|
| 558 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 559 | cd ${EXE_DIR} |
---|
| 560 | set_namelist namelist_cfg cn_exp \"ISOMIP_LONG\" |
---|
| 561 | set_namelist namelist_cfg nn_it000 1 |
---|
| 562 | set_namelist namelist_cfg nn_itend 96 |
---|
| 563 | set_namelist namelist_cfg nn_stock 48 |
---|
| 564 | set_namelist namelist_cfg jpni 5 |
---|
| 565 | set_namelist namelist_cfg jpnj 3 |
---|
| 566 | set_namelist namelist_cfg jpnij 15 |
---|
| 567 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 568 | set_xio_using_server iodef.xml true |
---|
| 569 | else |
---|
| 570 | set_xio_using_server iodef.xml false |
---|
| 571 | fi |
---|
| 572 | cd ${SETTE_DIR} |
---|
| 573 | . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 574 | |
---|
| 575 | cd ${SETTE_DIR} |
---|
| 576 | export TEST_NAME="SHORT" |
---|
| 577 | . ./prepare_exe_dir.sh |
---|
| 578 | cd ${EXE_DIR} |
---|
| 579 | set_namelist namelist_cfg cn_exp \"ISOMIP_SHORT\" |
---|
| 580 | set_namelist namelist_cfg nn_it000 49 |
---|
| 581 | set_namelist namelist_cfg nn_itend 96 |
---|
| 582 | set_namelist namelist_cfg nn_stock 48 |
---|
| 583 | set_namelist namelist_cfg ln_rstart .true. |
---|
| 584 | set_namelist namelist_cfg nn_rstctl 2 |
---|
| 585 | set_namelist namelist_cfg jpni 5 |
---|
| 586 | set_namelist namelist_cfg jpnj 3 |
---|
| 587 | set_namelist namelist_cfg jpnij 15 |
---|
| 588 | set_namelist namelist_cfg cn_ocerst_in \"ISOMIP_LONG_00000048_restart\" |
---|
| 589 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 590 | set_xio_using_server iodef.xml true |
---|
| 591 | else |
---|
| 592 | set_xio_using_server iodef.xml false |
---|
| 593 | fi |
---|
| 594 | for (( i=1; i<=$NPROC; i++)) ; do |
---|
| 595 | L_NPROC=$(( $i - 1 )) |
---|
| 596 | L_NPROC=`printf "%04d\n" ${L_NPROC}` |
---|
| 597 | ln -sf ../LONG/ISOMIP_LONG_00000048_restart_${L_NPROC}.nc . |
---|
| 598 | done |
---|
| 599 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 600 | set_xio_using_server iodef.xml true |
---|
| 601 | else |
---|
| 602 | set_xio_using_server iodef.xml false |
---|
| 603 | fi |
---|
| 604 | cd ${SETTE_DIR} |
---|
| 605 | . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 606 | cd ${SETTE_DIR} |
---|
| 607 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 608 | |
---|
| 609 | ## Reproducibility tests |
---|
| 610 | export TEST_NAME="REPRO_7_3" |
---|
| 611 | cd ${CONFIG_DIR0} |
---|
| 612 | cd ${SETTE_DIR} |
---|
| 613 | . ./param.cfg |
---|
| 614 | . ./all_functions.sh |
---|
| 615 | . ./prepare_exe_dir.sh |
---|
| 616 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 617 | NPROC=21 |
---|
| 618 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 619 | cd ${EXE_DIR} |
---|
| 620 | set_namelist namelist_cfg cn_exp \"ISOMIP_73\" |
---|
| 621 | set_namelist namelist_cfg nn_it000 1 |
---|
| 622 | set_namelist namelist_cfg nn_itend 48 |
---|
| 623 | set_namelist namelist_cfg jpni 7 |
---|
| 624 | set_namelist namelist_cfg jpnj 3 |
---|
| 625 | set_namelist namelist_cfg jpnij 21 |
---|
| 626 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 627 | set_xio_using_server iodef.xml true |
---|
| 628 | else |
---|
| 629 | set_xio_using_server iodef.xml false |
---|
| 630 | fi |
---|
| 631 | cd ${SETTE_DIR} |
---|
| 632 | . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 633 | cd ${SETTE_DIR} |
---|
| 634 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 635 | |
---|
| 636 | cd ${SETTE_DIR} |
---|
| 637 | export TEST_NAME="REPRO_8_4" |
---|
| 638 | . ./prepare_exe_dir.sh |
---|
| 639 | JOB_FILE=${EXE_DIR}/run_job.sh |
---|
| 640 | NPROC=32 |
---|
| 641 | if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi |
---|
| 642 | cd ${EXE_DIR} |
---|
| 643 | set_namelist namelist_cfg cn_exp \"ISOMIP_84\" |
---|
| 644 | set_namelist namelist_cfg nn_it000 1 |
---|
| 645 | set_namelist namelist_cfg nn_itend 48 |
---|
| 646 | set_namelist namelist_cfg jpni 8 |
---|
| 647 | set_namelist namelist_cfg jpnj 4 |
---|
| 648 | set_namelist namelist_cfg jpnij 32 |
---|
| 649 | if [ ${USING_MPMD} == "yes" ] ; then |
---|
| 650 | set_xio_using_server iodef.xml true |
---|
| 651 | else |
---|
| 652 | set_xio_using_server iodef.xml false |
---|
| 653 | fi |
---|
| 654 | cd ${SETTE_DIR} |
---|
| 655 | . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} |
---|
| 656 | cd ${SETTE_DIR} |
---|
| 657 | . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} |
---|
| 658 | |
---|
| 659 | fi |
---|
| 660 | |
---|
[9458] | 661 | #---- |
---|
[9268] | 662 | done |
---|