New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
sette.sh in utils/CI/sette_ticket2673 – NEMO

source: utils/CI/sette_ticket2673/sette.sh @ 14860

Last change on this file since 14860 was 14826, checked in by acc, 3 years ago

Added command-line support for switching on/off tiling, extended halo and icebergs.
These changes only set the shell variables previously set in sette_reference_configurations.sh;
developers will still need to add the relevant logic to those configurations that may wish
to toggle these options. Also added an option for the future to support RK3 timestepping.

Options are now:

sette.sh with no arguments (in this case all configuration will be tested)
-n "CFG1_to_test CFG2_to_test ..." to test some specific configurations
-x "TEST_type TEST_type ..." to specify particular types of test (RESTART is mandatory)
-T to set ln_timing true for all non-AGRIF configurations
-c to clean each configuration
-q run without qco environment
-Q run with key_qco AND key_RK3
-t activate ln_tile in all tests that support it; also forces nn_hls=2 (default: off)
-e activate extended halo (nn_hls=2) in all tests that support it (default: nn_hls=1)
-i run without icebergs even in tests that support them (default: on)
-s to synchronise the sette MY_SRC and EXP00 with the reference MY_SRC and EXPREF

  • Property svn:executable set to *
File size: 4.7 KB
Line 
1#!/bin/sh
2# initialise user dependent variable
3SETTE_DIR=$(cd $(dirname "$0"); pwd)
4MAIN_DIR=$(dirname $SETTE_DIR)
5export SETTE_TIMING='no'
6export NOT_USING_QCO='no'
7export USING_RK3='no'
8export USING_ICEBERGS='yes'
9export USING_EXTRA_HALO='no'
10export USING_TILING='no'
11
12# Parse command-line arguments
13if [ $# -gt 0 ]; then
14  while getopts n:x:cshTqQtei option; do
15     case $option in
16        c) export SETTE_CLEAN_CONFIGS='yes'
17           export SETTE_SYNC_CONFIGS='yes'
18           echo ""
19           echo "Configuration $SETTE_TEST_CONFIGS will be cleaned; this option enforces also synchronisation"
20           echo "";;
21        s) export SETTE_SYNC_CONFIGS='yes'
22           echo ""
23           echo "MY_SRC and EXP00 in $SETTE_TEST_CONFIGS will be synchronised with the MY_SRC and EXPREF from the reference configuration"
24           echo "";;
25        n) export SETTE_TEST_CONFIGS=($OPTARG)
26           echo ""
27           if [ ${#SETTE_TEST_CONFIGS[@]} -gt 1 ]; then
28             echo "Configurations ${SETTE_TEST_CONFIGS[@]} will be tested if they are available"
29           else
30             echo "Configuration ${SETTE_TEST_CONFIGS[@]} will be tested if it is available"
31           fi
32           echo "" ;;
33        x) export SETTE_TEST_TYPES=($OPTARG)
34           ;;
35        T) export SETTE_TIMING='yes'
36           echo ""
37           echo "ln_timing will be set to true"
38           echo "";;
39   q) export NOT_USING_QCO='yes'
40           echo ""
41           echo "key_qco and key_linssh will NOT be activated"
42           echo "";;
43   Q) export USING_RK3='no'
44           echo ""
45           echo "key_qco and key_RK3 will be activated"
46           echo "..when they are ready; disabled for now: USING_RK3='no'"
47           echo "";;
48        t) export USING_TILING='yes'
49           echo ""
50           echo "ln_tile will be set to true AND nn_hls will be set to 2"
51           echo "";;
52        e) export USING_EXTRA_HALO='yes'
53           echo ""
54           echo "nn_hls will be set to 2"
55           echo "";;
56        i) export USING_ICEBERGS='no'
57           echo ""
58           echo "ln_icebergs will be set to false"
59           echo "";;
60        h | *) echo 'sette.sh with no arguments (in this case all configuration will be tested)'
61               echo '-n "CFG1_to_test CFG2_to_test ..." to test some specific configurations'
62               echo '-x "TEST_type TEST_type ..." to specify particular types of test (RESTART is mandatory)'
63               echo '-T to set ln_timing true for all non-AGRIF configurations'
64               echo '-c to clean each configuration'
65               echo '-q run without qco environment'
66               echo '-Q run with key_qco AND key_RK3 (currently disabled)'
67               echo '-t activate ln_tile in all tests that support it; also forces nn_hls=2 (default: off)'
68               echo '-e activate extended halo (nn_hls=2) in all tests that support it (default: nn_hls=1)'
69               echo '-i run without icebergs even in tests that support them (default: on)'
70               echo '-s to synchronise the sette MY_SRC and EXP00 with the reference MY_SRC and EXPREF'; exit 42 ;;
71     esac
72  done
73  shift $((OPTIND - 1))
74fi
75
76. ./param.cfg
77
78if [ ${#SETTE_TEST_CONFIGS[@]} -eq 0 ]; then
79   echo ""
80   echo "Configurations $TEST_CONFIGS will be tested if they are available"
81   echo ""
82fi
83echo ""
84echo "Carrying out the following tests: ${TEST_TYPES[@]}"
85echo ""
86
87# run sette on reference configuration
88. ./sette_reference-configurations.sh
89if [[ $? != 0 ]]; then
90   echo ""
91   echo "--------------------------------------------------------------"
92   echo "./sette_cfg-ref.sh didn't finish properly, need investigations"
93   echo "--------------------------------------------------------------"
94   echo ""
95   exit 42
96fi
97
98# run sette on test cases
99. ./sette_test-cases.sh
100if [[ $? != 0 ]]; then
101   echo ""
102   echo "-----------------------------------------------------------------"
103   echo "./sette_test-cases.sh didn't finish properly, need investigations"
104   echo "-----------------------------------------------------------------"
105   echo ""
106   exit 42
107fi
108
109# run sette report
110echo ""
111echo "-------------------------------------------------------------"
112echo "./sette_rpt.sh (script will wait all nemo_sette run are done)"
113echo "-------------------------------------------------------------"
114echo ""
115NRUN=999
116NIT=0
117while [[ $NRUN -ne 0 && $nit -le 1080 ]]; do
118   nit=$((nit+1))
119   NRUN=$( ${BATCH_STAT} | grep ${BATCH_NAME} | wc -l ) 
120   if [[ $NRUN -ne 0 ]]; then
121      printf "%-3d %s\r" $NRUN 'nemo_sette runs still in queue or running ...';
122   else
123      printf "%-50s\n" " "
124      . ./sette_rpt.sh
125      exit
126   fi
127   sleep 10
128done
129printf "\n"
130echo ""
131echo "Something wrong happened, it tooks more than 3 hours to run all the sette tests"
132echo ""
Note: See TracBrowser for help on using the repository browser.