Changeset 13568
- Timestamp:
- 2020-10-05T17:22:12+02:00 (4 years ago)
- Location:
- utils/CI/sette
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
utils/CI/sette/param.cfg
r13382 r13568 74 74 # LIST OF CONFIGURATIONS 75 75 # to be updated if you added an new configuration in sette_test-cases.sh or sette_reference-configuration.sh 76 TEST_CONFIGS=${SETTE_TEST_CONFIGS:-"ORCA2_ICE_PISCES ORCA2_OFF_PISCES AMM12 AGRIF WED025 GYRE_PISCES SAS ORCA2_ICE_OBS ICE_AGRIF OVERFLOW LOCK_EXCHANGE VORTEX ISOMIP+"} 76 if [ -z "${TEST_CONFIGS}" ]; then 77 export TEST_CONFIGS=(${SETTE_TEST_CONFIGS[@]:-"ORCA2_ICE_PISCES ORCA2_OFF_PISCES AMM12 AGRIF WED025 GYRE_PISCES SAS ORCA2_ICE_OBS ICE_AGRIF OVERFLOW LOCK_EXCHANGE VORTEX ISOMIP+"}) 78 fi 79 # 80 # TYPES OF TESTS TO PERFORM 81 export DO_RESTART=1 # The restart test is always needed because this compiles the code 82 export DO_REPRO=0 83 export DO_CORRUPT=0 84 export DO_PHYOPTS=0 85 TEST_TYPES=(${SETTE_TEST_TYPES[@]:-"RESTART REPRO PHYOPTS CORRUPT"}) 86 if [[ ! ${TEST_TYPES[*]} =~ .*RESTART.* ]]; then export TEST_TYPES=("RESTART" ${TEST_TYPES[@]}) ;fi 87 if [[ ${TEST_TYPES[*]} =~ .*REPRO.* ]]; then export DO_REPRO=1 ;fi 88 if [[ ${TEST_TYPES[*]} =~ .*CORRUPT.* ]]; then export DO_CORRUPT=1 ;fi 89 if [[ ${TEST_TYPES[*]} =~ .*PHYOPTS.* ]]; then export DO_PHYOPTS=1 ;fi 77 90 # ------------------------------------------------------------------------------------------ 78 91 # -
utils/CI/sette/prepare_job.sh
r13329 r13568 185 185 # if [ ${MPI_FLAG} == "no" ] ; then 186 186 case ${COMPILER} in 187 X64_MOBILIS )187 X64_MOBILIS*) 188 188 NB_REM=$( echo $NB_PROC $NXIO_PROC | awk '{print ( $1 + $2 ) % 16}') 189 189 if [ ${NB_REM} == 0 ] ; then -
utils/CI/sette/sette.sh
r12569 r13568 6 6 # Parse command-line arguments 7 7 if [ $# -gt 0 ]; then 8 while getopts t: csh option; do8 while getopts t:x:csh option; do 9 9 case $option in 10 10 c) export SETTE_CLEAN_CONFIGS='yes' … … 17 17 echo "MY_SRC and EXP00 in $SETTE_TEST_CONFIGS will be synchronised with the MY_SRC and EXPREF from the reference configuration" 18 18 echo "";; 19 t) export SETTE_TEST_CONFIGS= $OPTARG19 t) export SETTE_TEST_CONFIGS=($OPTARG) 20 20 echo "" 21 echo "Configuration $SETTE_TEST_CONFIGS will be tested if they are available" 21 if [ ${#SETTE_TEST_CONFIGS[@]} -gt 1 ]; then 22 echo "Configurations ${SETTE_TEST_CONFIGS[@]} will be tested if they are available" 23 else 24 echo "Configuration ${SETTE_TEST_CONFIGS[@]} will be tested if it is available" 25 fi 22 26 echo "" ;; 23 h | *) echo 'sette.sh allows no arguments (in this case all configuration will be tested)' 27 x) export SETTE_TEST_TYPES=($OPTARG) 28 ;; 29 h | *) echo 'sette.sh with no arguments (in this case all configuration will be tested)' 24 30 echo '-t "CFG1_to_test CFG2_to_test ..." to test some specific configurations' 31 echo '-x "TEST_type TEST_type ..." to specify particular types of test (RESTART is mandatory)' 25 32 echo '-c to clean each configuration' 26 33 echo '-s to synchronise the sette MY_SRC and EXP00 with the reference MY_SRC and EXPREF'; exit 42 ;; … … 32 39 . ./param.cfg 33 40 41 if [ ${#SETTE_TEST_CONFIGS[@]} -eq 0 ]; then 42 echo "" 43 echo "Configurations $TEST_CONFIGS will be tested if they are available" 44 echo "" 45 fi 46 echo "" 47 echo "Carrying out the following tests: ${TEST_TYPES[@]}" 48 echo "" 49 34 50 # run sette on reference configuration 35 . /sette_reference-configurations.sh51 . ./sette_reference-configurations.sh 36 52 if [[ $? != 0 ]]; then 37 53 echo "" … … 44 60 45 61 # run sette on test cases 46 . /sette_test-cases.sh62 . ./sette_test-cases.sh 47 63 if [[ $? != 0 ]]; then 48 64 echo "" … … 69 85 else 70 86 printf "%-50s\n" " " 71 . /sette_rpt.sh87 . ./sette_rpt.sh 72 88 exit 73 89 fi -
utils/CI/sette/sette_reference-configurations.sh
r13559 r13568 45 45 # 46 46 # param.cfg : sets and loads following directories: 47 # This will have been run by the parent sette.sh and values exported here 47 48 # 48 49 # FORCING_DIR : is the directory for forcing files (tarfile) … … 95 96 SETTE_DIR=$(cd $(dirname "$0"); pwd) 96 97 MAIN_DIR=$(dirname $SETTE_DIR) 97 . ./param.cfg98 98 99 99 export BATCH_COMMAND_PAR=${BATCH_CMD} … … 102 102 export MPIRUN_FLAG="yes" 103 103 export USING_ICEBERGS="yes" 104 export USING_EXTRA_HALO="no" 104 105 # 105 106 export DEL_KEYS="key_iomput" … … 152 153 # WED025 : regional configuration including sea-ice and tides (Spitzbergen) 153 154 154 for config in ${TEST_CONFIGS }155 for config in ${TEST_CONFIGS[@]} 155 156 do 156 157 … … 158 159 # GYRE_PISCES 159 160 # ----------- 160 if [ ${config} == "GYRE_PISCES" ] ; then161 if [ ${config} == "GYRE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then 161 162 ## Restartability tests for GYRE_PISCES 162 163 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 240 241 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 241 242 243 fi 244 245 if [ ${config} == "GYRE_PISCES" ] && [ ${DO_REPRO} == "1" ] ; then 242 246 ## Reproducibility tests for GYRE_PISCES 243 247 export TEST_NAME="REPRO_2_4" … … 303 307 # ORCA2_ICE_PISCES 304 308 # ----------------- 305 if [ ${config} == "ORCA2_ICE_PISCES" ] ; then309 if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then 306 310 ## Restartability tests for ORCA2_ICE_PISCES 307 311 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 347 351 set_namelist namelist_cfg ln_tauwoc .true. 348 352 # 349 if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 353 if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 354 if [ ${USING_ICEBERGS} == "yes" ] ; then set_namelist namelist_cfg ln_icebergs .true. ; fi 355 if [ ${USING_EXTRA_HALO} == "no" ] ; then set_namelist namelist_cfg nn_hls 1 ; fi 356 if [ ${USING_EXTRA_HALO} == "yes" ] ; then set_namelist namelist_cfg nn_hls 2 ; fi 350 357 # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0 351 358 # … … 393 400 set_namelist namelist_cfg ln_tauwoc .true. 394 401 # 395 if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 402 if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 403 if [ ${USING_ICEBERGS} == "yes" ] ; then set_namelist namelist_cfg ln_icebergs .true. ; fi 404 if [ ${USING_EXTRA_HALO} == "no" ] ; then set_namelist namelist_cfg nn_hls 1 ; fi 405 if [ ${USING_EXTRA_HALO} == "yes" ] ; then set_namelist namelist_cfg nn_hls 2 ; fi 396 406 # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0 397 407 # … … 433 443 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 434 444 445 fi 446 447 if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_REPRO} == "1" ] ; then 435 448 ## Reproducibility tests for ORCA2_ICE_PISCES 436 449 export TEST_NAME="REPRO_4_8" … … 460 473 set_namelist namelist_cfg ln_tauwoc .true. 461 474 462 if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 475 if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 476 if [ ${USING_ICEBERGS} == "yes" ] ; then set_namelist namelist_cfg ln_icebergs .true. ; fi 477 if [ ${USING_EXTRA_HALO} == "no" ] ; then set_namelist namelist_cfg nn_hls 1 ; fi 478 if [ ${USING_EXTRA_HALO} == "yes" ] ; then set_namelist namelist_cfg nn_hls 2 ; fi 463 479 # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0 464 480 … … 506 522 set_namelist namelist_cfg ln_tauwoc .true. 507 523 508 if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 524 if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 525 if [ ${USING_ICEBERGS} == "yes" ] ; then set_namelist namelist_cfg ln_icebergs .true. ; fi 526 if [ ${USING_EXTRA_HALO} == "no" ] ; then set_namelist namelist_cfg nn_hls 1 ; fi 527 if [ ${USING_EXTRA_HALO} == "yes" ] ; then set_namelist namelist_cfg nn_hls 2 ; fi 509 528 # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0 510 529 … … 533 552 # ORCA2_OFF_PISCES 534 553 # ---------------- 535 if [ ${config} == "ORCA2_OFF_PISCES" ] ; then554 if [ ${config} == "ORCA2_OFF_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then 536 555 ## Restartability tests for ORCA2_OFF_PISCES 537 556 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 630 649 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 631 650 651 fi 652 653 if [ ${config} == "ORCA2_OFF_PISCES" ] && [ ${DO_REPRO} == "1" ] ; then 632 654 ## Reproducibility tests for ORCA2_OFF_PISCES 633 655 export TEST_NAME="REPRO_4_8" … … 712 734 # AMM12 713 735 # ----- 714 if [ ${config} == "AMM12" ] ; then736 if [ ${config} == "AMM12" ] && [ ${DO_RESTART} == "1" ] ; then 715 737 ## Restartability tests for AMM12 716 738 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 787 809 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 788 810 811 fi 812 813 if [ ${config} == "AMM12" ] && [ ${DO_REPRO} == "1" ] ; then 789 814 ## Reproducibility tests for AMM12 790 815 export TEST_NAME="REPRO_8_4" … … 845 870 # ORCA2_SAS 846 871 # --------- 847 if [ ${config} == "SAS" ] ; then872 if [ ${config} == "SAS" ] && [ ${DO_RESTART} == "1" ] ; then 848 873 ## Restartability tests 849 874 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 923 948 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 924 949 950 fi 951 952 if [ ${config} == "SAS" ] && [ ${DO_REPRO} == "1" ] ; then 925 953 ## Reproducibility tests 926 954 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 991 1019 ## Test assimilation interface code, OBS and ASM for reproducibility 992 1020 ## Restartability not tested (ASM code not restartable while increments are being applied) 993 if [ ${config} == "ORCA2_ICE_OBS" ] ;then1021 if [ ${config} == "ORCA2_ICE_OBS" ] && [ ${DO_RESTART} == "1" ] ; then 994 1022 ## Reproducibility tests 995 1023 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 1109 1137 # AGRIF ICE 1110 1138 # ----------- 1111 if [ ${config} == "AGRIF" ] ; then1139 if [ ${config} == "AGRIF" ] && [ ${DO_RESTART} == "1" ] ; then 1112 1140 ## Restartability tests 1113 1141 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 1234 1262 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 1235 1263 1264 fi 1265 1266 if [ ${config} == "AGRIF" ] && [ ${DO_REPRO} == "1" ] ; then 1236 1267 ## Reproducibility tests 1237 1268 export TEST_NAME="REPRO_2_8" … … 1326 1357 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 1327 1358 1359 fi 1360 1361 if [ ${config} == "AGRIF" ] && [ ${DO_CORRUPT} == "1" ] ; then 1328 1362 ## test code corruption with AGRIF (phase 1) ==> Compile with key_agrif but run with no zoom 1329 1363 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 1367 1401 1368 1402 ## test code corruption with AGRIF (phase 2) ==> Compile without key_agrif (to be compared with AGRIF_DEMO_ST/ORCA2) 1369 if [ ${config} == "AGRIF" ] ; then1403 if [ ${config} == "AGRIF" ] && [ ${DO_CORRUPT} == "1" ] ; then 1370 1404 export TEST_NAME="ORCA2" 1371 1405 cd ${MAIN_DIR} … … 1407 1441 # WED025 1408 1442 # ------- 1409 if [ ${config} == "WED025" ] ; then1443 if [ ${config} == "WED025" ] && [ ${DO_RESTART} == "1" ] ; then 1410 1444 ## Restartability tests 1411 1445 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 1485 1519 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 1486 1520 1521 fi 1522 1523 if [ ${config} == "WED025" ] && [ ${DO_REPRO} == "1" ] ; then 1487 1524 ## Reproducibility tests 1488 1525 export TEST_NAME="REPRO_5_6" … … 1544 1581 1545 1582 done 1583 # 1584 # Return to SETTE_DIR (last fcm_job.sh will have moved to EXE_DIR) 1585 cd ${SETTE_DIR} -
utils/CI/sette/sette_test-cases.sh
r13559 r13568 47 47 # 48 48 # param.cfg : sets and loads following directories: 49 # This will have been run by the parent sette.sh and values exported here 49 50 # 50 51 # FORCING_DIR : is the directory for forcing files (tarfile) … … 97 98 SETTE_DIR=$(cd $(dirname "$0"); pwd) 98 99 MAIN_DIR=$(dirname $SETTE_DIR) 99 . ./param.cfg100 100 101 101 export BATCH_COMMAND_PAR=${BATCH_CMD} … … 153 153 # WAD 154 154 155 156 for config in ${TEST_CONFIGS} 155 for config in ${TEST_CONFIGS[@]} 157 156 do 158 157 … … 160 159 # OVERFLOW 161 160 # --------- 162 if [ ${config} == "OVERFLOW" ] ; then161 if [ ${config} == "OVERFLOW" ] && [ ${DO_RESTART} == "1" ] ; then 163 162 ## Restartability tests for OVERFLOW 164 163 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 229 228 230 229 230 fi 231 232 if [ ${config} == "OVERFLOW" ] && [ ${DO_PHYOPTS} == "1" ] ; then 231 233 ## Test for all advection, vert. coordinates, vector form, flux form: test runability and complete all time steps 232 234 ## Needed namelist-xxxx for every type of run tested … … 275 277 # LOCK_EXCHANGE 276 278 # -------------- 277 if [ ${config} == "LOCK_EXCHANGE" ] ; then279 if [ ${config} == "LOCK_EXCHANGE" ] && [ ${DO_RESTART} == "1" ] ; then 278 280 ## Restartability tests for LOCK_EXCHANGE 279 281 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 344 346 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 345 347 348 fi 349 350 if [ ${config} == "LOCK_EXCHANGE" ] && [ ${DO_PHYOPTS} == "1" ] ; then 346 351 ## Test for all advection, vector form, flux form: test runability and complete all time steps 347 352 ## Needed namelist-xxxx for every type of run tested 353 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] 354 then 355 ITEND=12 356 else 357 ITEND=61200 358 fi 348 359 cd ${CONFIG_DIR}/${NEW_CONF}/EXP00 349 360 … … 367 378 rm namelist_*_*_*_* 368 379 cp -pL ${CONFIG_DIR}/${NEW_CONF}/EXP00/$file namelist_cfg 380 set_namelist namelist_cfg nn_it000 1 381 set_namelist namelist_cfg nn_itend ${ITEND} 369 382 if [ ${USING_MPMD} == "yes" ] ; then 370 383 set_xio_using_server iodef.xml true … … 384 397 # VORTEX 385 398 # --------- 386 if [ ${config} == "VORTEX" ] ; then399 if [ ${config} == "VORTEX" ] && [ ${DO_RESTART} == "1" ] ; then 387 400 ## Restartability tests for VORTEX 388 401 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 479 492 cd ${SETTE_DIR} 480 493 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 494 fi 495 496 if [ ${config} == "VORTEX" ] && [ ${DO_REPRO} == "1" ] ; then 481 497 482 498 ## Reproducibility tests for VORTEX … … 561 577 # ICE_AGRIF 562 578 # --------- 563 if [ ${config} == "ICE_AGRIF" ] ; then579 if [ ${config} == "ICE_AGRIF" ] && [ ${DO_RESTART} == "1" ] ; then 564 580 ## Restartability tests for ICE_AGRIF 565 581 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 665 681 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 666 682 683 fi 684 685 if [ ${config} == "ICE_AGRIF" ] && [ ${DO_REPRO} == "1" ] ; then 667 686 668 687 ## Reproducibility tests for ICE_AGRIF … … 746 765 # ISOMIP+ 747 766 # ------ 748 if [ ${config} == "ISOMIP+" ] ; then767 if [ ${config} == "ISOMIP+" ] && [ ${DO_RESTART} == "1" ] ; then 749 768 ## Restartability tests 750 769 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 823 842 . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 824 843 844 fi 845 846 if [ ${config} == "ISOMIP+" ] && [ ${DO_REPRO} == "1" ] ; then 825 847 ## Reproducibility tests 826 848 if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] … … 887 909 #---- 888 910 done 911 # 912 # Return to SETTE_DIR (last fcm_job.sh will have moved to EXE_DIR) 913 cd ${SETTE_DIR}
Note: See TracChangeset
for help on using the changeset viewer.