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.
Changeset 14870 – NEMO

Changeset 14870


Ignore:
Timestamp:
2021-05-16T16:54:58+02:00 (3 years ago)
Author:
acc
Message:

Branch: sette_ticket2673. More tweaks. Added a few more features and aligned the utility scripts with the new directory structure. Each experiment directory in the NEMO_VALIDATION_DIR now gets a sette_config file recording the settings used to run the test. They now also get copies of the *namelist*_cfg files which can be useful for cross-checking. sette_list_avail_rev.sh now accepts the -v subdir option.

Location:
utils/CI/sette_ticket2673
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • utils/CI/sette_ticket2673/all_functions.sh

    r14869 r14870  
    379379    [ -f ${EXE_DIR}/run.stat ] && cp ${EXE_DIR}/*run.stat ${NEMO_VALIDATION_DIR}/. 
    380380    [ -f ${EXE_DIR}/output.namelist.dyn ] && cp ${EXE_DIR}/*output.nam* ${NEMO_VALIDATION_DIR}/. 
     381    [ -f ${EXE_DIR}/namelist_cfg ] && cp ${EXE_DIR}/*nam*_cfg ${NEMO_VALIDATION_DIR}/. 
    381382    [ -f ${EXE_DIR}/tracer.stat ] && cp ${EXE_DIR}/*tracer.stat ${NEMO_VALIDATION_DIR}/. 
    382383    [ -f ${EXE_DIR}/timing.output ] && cp ${EXE_DIR}/*timing.output ${NEMO_VALIDATION_DIR}/. 
     384    [ -f ${EXE_DIR}/sette_config ] && cp ${EXE_DIR}/sette_config ${NEMO_VALIDATION_DIR}/. 
    383385 
    384386    if [ -n "$(ls ${NEMO_VALIDATION_DIR}/*run*)" ] ; then 
  • utils/CI/sette_ticket2673/prepare_exe_dir.sh

    r11161 r14870  
    7575#cat ${SETTE_DIR}/iodef_sette.xml | sed -e"s;DEF_SHARED;${CONFIG_DIR0}/SHARED;" > ${EXE_DIR}/iodef.xml 
    7676cd ${EXE_DIR} 
     77# 
     78# Add summary of the sette.sh set-up used and the current list of keys added or deleted 
     79COMP_KEYS="`cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | sed -e 's/.*fppkeys *//'`" 
     80echo "Summary of sette environment"                                > ./sette_config 
     81echo "----------------------------"                               >> ./sette_config 
     82echo "requested by the command          : "$cmd $cmdargs          >> ./sette_config 
     83printf "%-33s : %s\n" USING_TIMING $USING_TIMING                  >> ./sette_config 
     84printf "%-33s : %s\n" USING_ICEBERGS $USING_ICEBERGS              >> ./sette_config 
     85printf "%-33s : %s\n" USING_EXTRA_HALO $USING_EXTRA_HALO          >> ./sette_config 
     86printf "%-33s : %s\n" USING_TILING $USING_TILING                  >> ./sette_config 
     87printf "%-33s : %s\n" USING_COLLECTIVES $USING_COLLECTIVES        >> ./sette_config 
     88printf "%-33s : %s\n" USING_NOSIGNED0 $USING_NOSIGNED0            >> ./sette_config 
     89printf "%-33s : %s\n" USING_QCO $USING_QCO                        >> ./sette_config 
     90printf "%-33s : %s\n" USING_LOOP_FUSION $USING_LOOP_FUSION        >> ./sette_config 
     91printf "%-33s : %s\n" USING_XIOS $USING_XIOS                      >> ./sette_config 
     92printf "%-33s : %s\n" USING_MPMD $USING_MPMD                      >> ./sette_config 
     93printf "%-33s : %s\n" USING_RK3 $USING_RK3                        >> ./sette_config 
     94printf "%-33s : %s\n" "Common compile keys added" "$ADD_KEYS"     >> ./sette_config 
     95printf "%-33s : %s\n" "Common compile keys deleted" "$DEL_KEYS"   >> ./sette_config 
     96printf "%-33s : %s\n" "Compile keys actually used" "${COMP_KEYS}" >> ./sette_config 
    7797 
    7898# Remove previously generated output files used for test evaluation 
  • utils/CI/sette_ticket2673/sette.sh

    r14867 r14870  
    11#!/bin/sh 
    22# initialise user dependent variable 
    3 cmd=$0 ; cmdargs=$@ 
     3export cmd=$0 ; export cmdargs=$@ 
    44SETTE_DIR=$(cd $(dirname "$0"); pwd) 
    55MAIN_DIR=$(dirname $SETTE_DIR) 
  • utils/CI/sette_ticket2673/sette_list_avail_cfg.sh

    r13382 r14870  
    1616printf "%-15s \n" VORTEX 
    1717printf "%-15s \n" ICE_AGRIF 
     18printf "%-15s \n" SWG 
    1819printf "%-15s \n" ISOMIP+ 
    1920echo '' 
  • utils/CI/sette_ticket2673/sette_list_avail_rev.sh

    r12569 r14870  
    88 
    99if [ $# -gt 0 ]; then 
    10   while getopts c:h option; do  
     10  while getopts c:v:h option; do  
    1111     case $option in 
    1212        c) COMPILER=$OPTARG;; 
     13        v) SETTE_SUB_VAL=$OPTARG;; 
    1314        h | *) echo '' 
    1415               echo 'sette_list_avail_rev.sh : '  
     
    1617               echo '-c COMPILER_name :' 
    1718               echo '     list all sette directory and available revisions created with the compiler specified' 
     19               echo ' -v sub_dir :' 
     20               echo '     validation sub-directory below NEMO_VALIDATION_DIR' 
    1821               echo '' 
    1922               exit 42;; 
     
    2225  shift $((OPTIND - 1)) 
    2326fi 
     27if [ ! -z $SETTE_SUB_VAL ] ; then 
     28 NEMO_VALIDATION_DIR=$NEMO_VALIDATION_DIR/$SETTE_SUB_VAL 
     29fi 
    2430 
    2531# 
    2632lst_rev () { 
    2733    # get the list of revision available for a configuration 
    28     if [ ! -d $1 ] ; then  
    29        CFGLST=-9999 
    30     else 
    31        CFGLST=`ls $1 | sort -u -r `  
    32     fi 
     34    # base directory 
     35    VALSUB=$1 
    3336    # config name 
    3437    CONFIG=$2 
    3538    # list of all revision available 
    3639    ALLLST=${@:3} 
    37     # number of revision total and for CONFIG 
    38     nrevall=`echo $ALLLST | wc -w` 
    39     nrevcfg=`echo $CFGLST | wc -w` 
    4040    # display 
    4141    echo "" 
    4242    printf "%-27s : " $CONFIG 
    43     irev=1 
    44     irevcfg=1 
    45     while [[ $irev -le $nrevall ]] ; do 
    46        rev=`echo $ALLLST | cut -d\  -f ${irev}` 
    47        cfgrev=`echo $CFGLST | cut -d\  -f ${irevcfg}` 
    48        if [ -z $cfgrev ] ; then cfgrev=-9999 ; fi 
    49        if [ $cfgrev == $rev ] ; then 
     43    for rev in $ALLLST 
     44    do 
     45       if [ -d ${VALSUB}/$rev/${CONFIG} ]  ; then 
    5046          printf "%-6s  " $rev 
    51           irevcfg=$((irevcfg+1)) 
    5247       else 
    53           printf "%-5s  " "***** "  
     48          printf "%-5s  " "----- "  
    5449       fi 
    55        irev=$((irev+1)) 
    5650    done 
    5751} 
     
    6155  
    6256 # list of all revision available 
    63  DIRLST=`find ${NEMO_VALID} -maxdepth 3 -mindepth 3 -type d -regex ".*\/W.*\/${COMPILER}\/.*" | sed -e "s/.*\/W.*\/${COMPILER}\///" | sort -u -r` 
     57 DIRLIST=`find ${NEMO_VALID}/${COMPILER} -maxdepth 1 -mindepth 1 -type d | sort -u -r` 
     58 DIRLIST=`basename -a $DIRLIST` 
    6459 
    6560 # display header 
     
    6863 echo "" 
    6964 printf " List of all avail. rev. is : " 
    70  for dir in `echo $DIRLST`; do printf "%-6s  " $dir ; done 
     65 for dir in `echo $DIRLIST`; do printf "%-6s  " $dir ; done 
    7166 printf "\n" 
    7267 
     
    7469 echo "" 
    7570 echo "   !---- check revision available for each configuration ----!   " 
    76  for CONFIG in WGYRE_PISCES_ST WORCA2_ICE_PISCES_ST WORCA2_OFF_PISCES_ST WAMM12_ST WORCA2_SAS_ICE_ST WAGRIF_DEMO_ST WSPITZ12_ST WISOMIP_ST WOVERFLOW_ST WLOCK_EXCHANGE_ST WVORTEX_ST WICE_AGRIF_ST  
     71 for CONFIG in GYRE_PISCES ORCA2_ICE_PISCES ORCA2_OFF_PISCES AMM12 ORCA2_SAS_ICE AGRIF_DEMO SWG ISOMIP+ OVERFLOW LOCK_EXCHANGE VORTEX ICE_AGRIF  
    7772 do 
    78     DIR=${NEMO_VALIDATION_DIR}/${CONFIG}/${COMPILER} 
    79     lst_rev $DIR $CONFIG $DIRLST 
     73    DIR=${NEMO_VALIDATION_DIR}/${COMPILER}/ 
     74    lst_rev $DIR $CONFIG $DIRLIST 
    8075 done 
    8176 printf "\n" 
  • utils/CI/sette_ticket2673/sette_reference-configurations.sh

    r14869 r14870  
    121121# ORCA2_OFF_PISCES  : 
    122122# AMM12             : 
    123 # SAS               : 
     123# SAS               : aka ORCA2_SAS_ICE 
    124124# ORCA2_ICE_OBS     : 
    125 # AGRIF             : test AGRIF in a double zoom configuration in the nordic seas + 1 zoom in the eq. Pacific (AGRIF_DEMO) 
    126 #                       and check that key_agrif without zoom = no key_agrif 
    127 # WED025           : regional configuration including sea-ice and tides (Spitzbergen) 
     125# AGRIF             : AGRIF_DEMO: test AGRIF in a double zoom configuration in the nordic seas + 1 zoom in the eq. Pacific and 
     126#                     AGRIF_DEMO_NOAGRIF: check that key_agrif without zoom = no key_agrif 
     127# WED025            : regional configuration including sea-ice and tides (Spitzbergen) 
    128128 
    129129for config in ${TEST_CONFIGS[@]} 
  • utils/CI/sette_ticket2673/sette_rpt.sh

    r14867 r14870  
    257257# 
    258258# check if reference directory is present 
    259   if [ ! -d $vdirref/$mach/$dorv/$namref ]; then 
     259  if [ ! -d $vdirref/$mach/$dorv/$nam ]; then 
    260260    printf "%-27s %s\n" $nam " REFERENCE directory at $dorvref is MISSING" 
    261261    return 
     
    270270    f1s=$vdir/$mach/$dorv/$nam/LONG/run.stat 
    271271    f1t=$vdir/$mach/$dorv/$nam/LONG/tracer.stat 
    272     f2s=$vdirref/$mach/$dorv/$namref/LONG/run.stat 
    273     f2t=$vdirref/$mach/$dorv/$namref/LONG/tracer.stat 
     272    f2s=$vdirref/$mach/$dorv/$nam/LONG/run.stat 
     273    f2t=$vdirref/$mach/$dorv/$nam/LONG/tracer.stat 
    274274    if  [ ! -f $f1s ] && [ ! -f $f1t ] ; then 
    275275      printf "%-20s %s\n" $nam " incomplete test"; 
     
    343343# 
    344344# check if reference directory is present 
    345   if [ ! -d $vdirref/$mach/$dorv/$namref ]; then 
     345  if [ ! -d $vdirref/$mach/$dorv/$nam ]; then 
    346346    return 
    347347  fi 
     
    353353  if [ -d $vdir/$mach/$dorv/$nam ]; then 
    354354    f1a=$vdir/$mach/$dorv/$nam/LONG/timing.output 
    355     f2a=$vdirref/$mach/$dorv/$namref/LONG/timing.output 
     355    f2a=$vdirref/$mach/$dorv/$nam/LONG/timing.output 
    356356# 
    357357# Report average CPU time differences (if available) 
     
    572572 echo "" 
    573573 echo "   !----agrif check----!   " 
    574  dir1=WAGRIF_DEMO_NOAGRIF_ST 
    575  dir2=WAGRIF_DEMO_ST 
     574 dir1=AGRIF_DEMO_NOAGRIF 
     575 dir2=AGRIF_DEMO 
    576576 identictest $NEMO_VALID $dir1 $dir2 $pass  
    577577# 
Note: See TracChangeset for help on using the changeset viewer.