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 10713 for NEMO – NEMO

Changeset 10713 for NEMO


Ignore:
Timestamp:
2019-02-21T21:29:46+01:00 (5 years ago)
Author:
mathiot
Message:

changes related to Simon comments (ticket #2239)

Location:
NEMO/branches/2019/fix_sette_ticket2239
Files:
1 added
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/fix_sette_ticket2239/README

    r10708 r10713  
    6969 in sette_rpt.sh : if no argument are given, the report will be generated on the last changed revision. 
    7070                   if an argument is given (revision number) the report will be generated for this revision 
     71                   if 'old' is given as argument the former behavior is applied (the latest revision is check whatever the current revision 
    7172 
    7273NOTE: 
  • NEMO/branches/2019/fix_sette_ticket2239/param.cfg

    r10699 r10713  
    22# 
    33# Compiler among those in NEMOGCM/ARCH 
    4 COMPILER=X64_ADA 
     4COMPILER=XC40_METO_perso 
    55# 
    66# BATCH command 
    7 BATCH_CMD=llsubmit 
     7# command to submit a job 
     8BATCH_CMD=qsub 
     9# command to check job status 
     10BATCH_STAT=qstat 
    811# 
    912#- FORCING files storing 
    10 FORCING_DIR=$WORKDIR/FORCING 
     13FORCING_DIR=/projects/jomp/pmathiot/SETTE_FORCING/v4.0 
    1114# 
    1215#- INPUT files storing 
     
    1417# 
    1518#- VALIDATION files storing 
    16 NEMO_VALIDATION_DIR=$WORKDIR/NEMO_VALIDATION 
     19NEMO_VALIDATION_DIR=/projects/jomp/pmathiot/NEMO/NEMO_dev/NEMO/trunk/sette_ticket2239/NEMO_VALIDATION 
    1720# 
    1821# REFERENCE run.stat tracer.stat you want to compare with 
    1922# (if no change to the default, no check on result change will be done) 
    20 NEMO_VALIDATION_REF=/path/to/reference/sette/results 
    21 NEMO_REV_REF=0000 
     23NEMO_VALIDATION_REF=/projects/jomp/pmathiot/NEMO/NEMO_dev/NEMO/trunk/sette/NEMO_VALIDATION 
     24NEMO_REV_REF=10508 
    2225# 
    2326# CMD for svn (some people use git svn)  
  • NEMO/branches/2019/fix_sette_ticket2239/sette.sh

    r10690 r10713  
    11#!/bin/sh 
     2# initialise user dependent variable 
     3. ./param.cfg 
    24 
    35# run sette on reference configuration 
    4 ./sette_cfg-ref.sh 
     6./sette_reference-configurations.sh 
    57if [[ $? != 0 ]]; then 
    68   echo "" 
     
    2426 
    2527# run sette report 
    26 ./sette_rpt.sh 
    27  
     28echo "" 
     29echo "-------------------------------------------------------------" 
     30echo "./sette_rpt.sh (script will wait all nemo_sette run are done)" 
     31echo "-------------------------------------------------------------" 
     32echo "" 
     33NRUN=999 
     34NIT=0 
     35while [[ $NRUN -ne 0 && $nit -le 1080 ]]; do 
     36   nit=$((nit+1)) 
     37   NRUN=$( ${BATCH_STAT} | grep nemo_sette | wc -l )  
     38   if [[ $NRUN -ne 0 ]]; then  
     39      printf "%-3d %s\r" $NRUN 'nemo_sette run still in queue or running ...'; 
     40   else 
     41      printf "%s\n" " " 
     42      ./sette_rpt.sh 
     43      exit 
     44   fi 
     45   sleep 10 
     46done 
     47printf "\n" 
     48echo "" 
     49echo "Something wrong happened, it tooks more than 3 hours to run all the sette tests" 
     50echo "" 
  • NEMO/branches/2019/fix_sette_ticket2239/sette_reference-configurations.sh

    r10700 r10713  
    325325    set_namelist namelist_cfg ln_stcor .true. 
    326326    set_namelist namelist_cfg ln_tauwoc .true. 
    327     set_namelist namelist_cfg nn_fsbc 5 
    328327    # 
    329328    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 
     
    377376    set_namelist namelist_cfg ln_stcor .true. 
    378377    set_namelist namelist_cfg ln_tauwoc .true. 
    379     set_namelist namelist_cfg nn_fsbc 5 
    380378    # 
    381379    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 
     
    450448    set_namelist namelist_cfg ln_stcor .true. 
    451449    set_namelist namelist_cfg ln_tauwoc .true. 
    452     set_namelist namelist_cfg nn_fsbc 5 
    453450 
    454451    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 
     
    502499    set_namelist namelist_cfg ln_stcor .true. 
    503500    set_namelist namelist_cfg ln_tauwoc .true. 
    504     set_namelist namelist_cfg nn_fsbc 5 
    505501 
    506502    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 
     
    860856    set_namelist namelist_cfg cn_exp \"SAS\" 
    861857    set_namelist namelist_cfg nn_it000 1 
    862     set_namelist namelist_cfg nn_itend 240 
    863     set_namelist namelist_cfg nn_stock 120 
     858    set_namelist namelist_cfg nn_itend 256 
     859    set_namelist namelist_cfg nn_stock 128 
    864860    set_namelist namelist_cfg jpni 4 
    865861    set_namelist namelist_cfg jpnj 8 
     
    882878    cd ${EXE_DIR} 
    883879    set_namelist namelist_cfg cn_exp \"SAS\" 
    884     set_namelist namelist_cfg nn_it000 121 
    885     set_namelist namelist_cfg nn_itend 240 
     880    set_namelist namelist_cfg nn_it000 129 
     881    set_namelist namelist_cfg nn_itend 256 
    886882    set_namelist namelist_cfg jpni 4 
    887883    set_namelist namelist_cfg jpnj 8 
     
    892888    set_namelist namelist_cfg nn_rstctl 2 
    893889    set_namelist namelist_cfg nn_date0 010109 
    894     set_namelist namelist_cfg cn_ocerst_in \"SAS_00000120_restart\" 
    895     set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000120_restart_ice\" 
     890    set_namelist namelist_cfg cn_ocerst_in \"SAS_00000128_restart\" 
     891    set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000128_restart_ice\" 
    896892    if [ ${USING_MPMD} == "yes" ] ; then 
    897893       set_xio_using_server iodef.xml true 
     
    902898        L_NPROC=$(( $i - 1 )) 
    903899        L_NPROC=`printf "%04d\n" ${L_NPROC}` 
    904         ln -sf ../LONG/SAS_00000120_restart_${L_NPROC}.nc . 
    905         ln -sf ../LONG/SAS_00000120_restart_ice_${L_NPROC}.nc . 
     900        ln -sf ../LONG/SAS_00000128_restart_${L_NPROC}.nc . 
     901        ln -sf ../LONG/SAS_00000128_restart_ice_${L_NPROC}.nc . 
    906902    done 
    907903    cd ${SETTE_DIR} 
     
    924920    set_namelist namelist_cfg cn_exp \"SAS_48\" 
    925921    set_namelist namelist_cfg nn_it000 1 
    926     set_namelist namelist_cfg nn_itend 75 
     922    set_namelist namelist_cfg nn_itend 80 
    927923    set_namelist namelist_cfg jpni 4 
    928924    set_namelist namelist_cfg jpnj 8 
     
    950946    set_namelist namelist_cfg cn_exp \"SAS_84\" 
    951947    set_namelist namelist_cfg nn_it000 1 
    952     set_namelist namelist_cfg nn_itend 75 
     948    set_namelist namelist_cfg nn_itend 80 
    953949    set_namelist namelist_cfg jpni 8 
    954950    set_namelist namelist_cfg jpnj 4 
     
    990986    set_namelist namelist_cfg cn_exp \"O2L3OBS_48\" 
    991987    set_namelist namelist_cfg nn_it000 1 
    992     set_namelist namelist_cfg nn_itend 75 
     988    set_namelist namelist_cfg nn_itend 80 
    993989    set_namelist namelist_cfg ln_read_cfg .true. 
    994990    set_namelist namelist_cfg jpni 4 
     
    10431039    set_namelist namelist_cfg cn_exp \"O2L3OBS_84\" 
    10441040    set_namelist namelist_cfg nn_it000 1 
    1045     set_namelist namelist_cfg nn_itend 75 
     1041    set_namelist namelist_cfg nn_itend 80 
    10461042    set_namelist namelist_cfg ln_read_cfg .true. 
    10471043    set_namelist namelist_cfg jpni 8 
  • NEMO/branches/2019/fix_sette_ticket2239/sette_rpt.sh

    r10709 r10713  
    1010######################### Start of function definitions ################################# 
    1111## 
     12 
     13function get_dorv() { 
     14  if [ $lastchange == 'old' ] ; then  
     15    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
     16    dorv=`echo $dorv | sed -e 's:.*/::'` 
     17  else 
     18    dorv=$lastchange 
     19  fi 
     20} 
    1221 
    1322function restfile() { 
     
    2332  pass=$3 
    2433 
    25 # 
     34# get $dorv 
     35  get_dorv 
    2636# 
    2737# check if directory is here 
    2838  if [ ! -d $vdir/$nam/$mach/$dorv ]; then 
    29     printf "%-27s %s %s %s\n" $nam  " directory                  MISSING : " $dorv " ( run did not start / finish correctly ) " 
     39    printf "%-27s %s %s\n" $nam  " directory                  MISSING : " $dorv 
    3040    return 
    3141  fi 
     
    108118  pass=$3 
    109119# 
     120# get $dorv 
     121  get_dorv 
    110122# 
    111123# check if directory is here 
    112124  if [ ! -d $vdir/$nam/$mach/$dorv ]; then 
    113     printf "%-27s %s %s %s\n" $nam  " directory                  MISSING : " $dorv " ( run did not start / finish correctly ) " 
     125    printf "%-27s %s %s\n" $nam  " directory                  MISSING : " $dorv 
    114126    return 
    115127  fi 
    116128 
    117129  if [ -d $vdir/$nam/$mach/$dorv ]; then 
     130    # check ocean output 
     131    runtest $vdir $nam $pass RST 
     132    # 
     133    # run restartibility test 
    118134    f1o=$vdir/$nam/$mach/$dorv/LONG/ocean.output 
    119135    f1s=$vdir/$nam/$mach/$dorv/LONG/run.stat 
     
    206222  pass=$3 
    207223# 
     224# get $dorv 
     225  get_dorv 
     226# 
    208227# check if directory is here 
    209228  if [ ! -d $vdir/$nam/$mach/$dorv ]; then 
    210     printf "%-27s %s %s %s\n" $nam  " directory                  MISSING : " $dorv " ( run did not start / finish correctly ) " 
     229    printf "%-27s %s %s\n" $nam  " directory                  MISSING : " $dorv 
    211230    return 
    212231  fi 
    213232# 
    214233  if [ -d $vdir/$nam/$mach/$dorv ]; then 
     234    # check ocean output 
     235    runtest $vdir $nam $pass REPRO 
     236    # 
     237    # check reproducibility 
    215238    rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | tail -2l | head -1 ` 
    216239    rep2=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | tail -1l` 
     
    301324  pass=$5 
    302325# 
     326# get $dorv 
     327  get_dorv 
     328# 
    303329# check if reference directory is present 
    304330  if [ ! -d $vdirref/$nam/$mach/$dorvref ]; then 
     
    332358      if [ $? == 0 ]; then 
    333359        if [ $pass == 0 ]; then 
    334           printf "%-20s %s %s\n" $nam  " run.stat    before/after are similar " 
     360          printf "%-20s %s %s\n" $nam  " run.stat    files are identical " 
    335361        fi 
    336362      else 
    337         printf "%-20s %s %s\n" $nam  " run.stat    before/after are DIFFERENT " 
     363        printf "%-20s %s %s\n" $nam  " run.stat    files are DIFFERENT " 
    338364# 
    339365# Offer view of differences on the second pass 
     
    342368          echo "<return> to view run.stat differences" 
    343369          read y 
    344           sdiff f1.tmp$$ $f2s 
     370          sdiff $f1s $f2s 
    345371          done_oce=1 
    346372          echo "<return> to continue" 
     
    355381      if [ $? == 0 ]; then 
    356382        if [ $pass == 0 ]; then           
    357           printf "%-20s %s %s\n" $nam  " tracer.stat before/after are similar " 
     383          printf "%-20s %s %s\n" $nam  " tracer.stat files are identical " 
    358384        fi 
    359385      else 
    360         printf "%-20s %s %s\n" $nam  " tracer.stat before/after are DIFFERENT " 
     386        printf "%-20s %s %s\n" $nam  " tracer.stat files are DIFFERENT " 
    361387# 
    362388# Offer view of differences on the second pass 
     
    380406  nam=$2 
    381407  pass=$3 
     408  ttype=$4 
     409  [[ $ttype == 'RST' ]] && ttype="LONG|SHORT" 
     410# 
     411# get $dorv 
     412  get_dorv 
    382413# 
    383414# no print needed if the repository is not here (already catch before) 
    384415# 
    385416  if [ -d $vdir/$nam/$mach/$dorv/ ]; then 
    386     rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep LONG | head -1 ` 
    387     if  [  -z $rep1 ] ; then 
    388       # Not all configurations test restartability (LONG/SHORT);  
    389       # check for a reproducibility directory instead (REPRO) 
    390       rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | head -1 ` 
    391     fi 
    392     f1o=$vdir/$nam/$mach/$dorv/$rep1/ocean.output 
    393     if  [ ! -f $f1o ] ; then 
    394       if [ $pass == 0 ]; then printf "%-27s %s %s %s\n" $nam " ocean.output               MISSING : " $dorv " ( run did not start / finish correctly ) " ; fi 
    395       return; 
    396     else  
    397       nerr=`grep 'E R R O R' $f1o | wc -l` 
    398       if [[ $nerr > 0 ]]; then 
    399         printf "%-27s %s %s %s\n" $nam " run                         FAILED : " $dorv " ( E R R O R in ocean.output) "  
    400         if [ $pass == 1 ]; then 
    401           echo "<return> to view end of ocean.output" 
    402           read y 
    403           tail -100 $f1o 
    404           echo '' 
    405           echo "full ocean.output available here: $f1o" 
    406         fi 
    407       fi 
    408     fi 
     417    # 
     418    # apply check for all ttype directory 
     419    rep1=$(ls -rt $vdir/$nam/$mach/$dorv/ | grep -E $ttype) 
     420    for tdir in $rep1 ; do 
     421       f1o=$vdir/$nam/$mach/$dorv/$tdir/ocean.output 
     422       if  [ ! -f $f1o ] ; then 
     423          if [ $pass == 0 ]; then printf "%-27s %s %s\n" $nam " ocean.output               MISSING : " $dorv ; fi 
     424          return; 
     425       else  
     426          nerr=`grep 'E R R O R' $f1o | wc -l` 
     427          if [[ $nerr > 0 ]]; then 
     428             printf "%-27s %s %s %s\n" $nam " run                         FAILED : " $dorv " ( E R R O R in ocean.output) "  
     429             if [ $pass == 1 ]; then 
     430                echo "<return> to view end of ocean.output" 
     431                read y 
     432                tail -100 $f1o 
     433                echo '' 
     434                echo "full ocean.output available here: $f1o" 
     435             fi 
     436             return; 
     437          fi 
     438       fi 
     439    done 
    409440  else 
    410     if [ $pass == 0 ]; then printf "%-27s %s %s %s\n" $nam  " directory                  MISSING : " $dorv " ( run did not start / finish correctly ) "; fi 
     441    if [ $pass == 0 ]; then printf "%-27s %s %s\n" $nam  " directory                  MISSING : " $dorv ; fi 
    411442  fi 
    412443} 
     
    502533 
    503534# overwrite revision is argument 1 present 
    504 [[ $# -eq 1 ]] && revision=$1 
     535[[ $# -eq 1 ]] && lastchange=$1 
    505536 
    506537echo "" 
    507 echo "SETTE validation report generated for : $branchname @ r$revision" 
     538echo "SETTE validation report generated for : $branchname @ r$lastchange (last changed revision)" 
    508539echo "" 
    509  
    510 dorv=$revision 
    511540 
    512541# 
     
    539568 do 
    540569   resttest $NEMO_VALID $restart_test $pass 
    541    runtest $NEMO_VALID $restart_test $pass 
    542570 done 
    543571# 
     
    548576 do 
    549577   reprotest $NEMO_VALID $repro_test $pass 
    550    runtest $NEMO_VALID $repro_test $pass 
    551578 done 
    552579 
     
    559586# 
    560587# before/after tests 
    561  echo "" 
    562  echo "   !----result comparison check----!   " 
    563  if [ $NEMO_VALID_REF != "/path/to/reference/sette/results" ]; then 
    564    echo '' 
    565    echo 'check result differences between :' 
    566    echo "VALID directory : $NEMO_VALID at rev $revision" 
    567    echo 'and' 
    568    echo "REFERENCE directory : $NEMO_VALID_REF at rev $NEMO_REV_REF" 
    569    echo '' 
    570    for repro_test in WGYRE_PISCES_ST WORCA2_ICE_PISCES_ST WORCA2_OFF_PISCES_ST WAMM12_ST WISOMIP_ST WORCA2_SAS_ICE_ST WAGRIF_DEMO_ST WSPITZ12_ST WISOMIP_ST WVORTEX_ST WICE_AGRIF_ST 
    571    do 
    572      runcmpres $NEMO_VALID $repro_test $NEMO_VALID_REF $NEMO_REV_REF $pass 
    573    done 
     588 if [ $lastchange == 'old' ] ; then 
     589    echo "" 
     590    echo "   !---- 'old' specified as revision => no comparison with reference results ----!   " 
     591    echo "" 
    574592 else 
    575    echo '' 
    576    echo ' No path for comparison specified. Result are not compare with any other revision. ' 
    577    echo ' To do it please fill NEMO_VALID_REF and NEMO_REV_REF in param.cfg. ' 
    578    echo '' 
     593   echo "" 
     594   echo "   !----result comparison check----!   " 
     595   if [ $NEMO_VALID_REF != "/path/to/reference/sette/results" ]; then 
     596     echo '' 
     597     echo 'check result differences between :' 
     598     echo "VALID directory : $NEMO_VALID at rev $lastchange" 
     599     echo 'and' 
     600     echo "REFERENCE directory : $NEMO_VALID_REF at rev $NEMO_REV_REF" 
     601     echo '' 
     602     for repro_test in WGYRE_PISCES_ST WORCA2_ICE_PISCES_ST WORCA2_OFF_PISCES_ST WAMM12_ST WISOMIP_ST WORCA2_SAS_ICE_ST WAGRIF_DEMO_ST WSPITZ12_ST WISOMIP_ST WVORTEX_ST WICE_AGRIF_ST 
     603     do 
     604       runcmpres $NEMO_VALID $repro_test $NEMO_VALID_REF $NEMO_REV_REF $pass 
     605     done 
     606   else 
     607     echo '' 
     608     echo ' No path for comparison specified. Result are not compare with any other revision. ' 
     609     echo ' To do it please fill NEMO_VALID_REF and NEMO_REV_REF in param.cfg. ' 
     610     echo '' 
     611   fi 
    579612 fi 
    580  
    581613done 
    582614# 
Note: See TracChangeset for help on using the changeset viewer.