Changeset 5292


Ignore:
Timestamp:
2015-05-22T18:49:31+02:00 (5 years ago)
Author:
nicolasmartin
Message:

dev_r5092_CNRS_SETTE Standalone TRUST directory for regular NEMO configuration testing

Location:
branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST
Files:
1 added
7 copied

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/cfg/user_template.cfg

    r5286 r5292  
    1313[ -z "${CONF_REFE}" ] && CONF_REFE=''     # ORCA2_LIM_PISCES, GYRE, ... 
    1414[ -z "${CONF_TEST}" ] && CONF_TEST=''     # ${CONF_REFE}_trust, ... 
    15 NEMO_HOME=''                              # NEMOGCM equivalent root directory 
     15NEMO_HOME=''                              # NEMOGCM equivalent root directory to find ./ARCH,./CONFIG, ... 
    1616                                          # (${DIR_WORK}/NEMO/${NEMO_BRAN}/NEMOGCM, ...) 
    1717 
     
    2525 
    2626# NEMO inputs (fill in if necessary) 
    27 NEMO_FORC=''                              # Directory synchronized with DODS server of IDRIS 
     27NEMO_FORC=''                              # Directory synchronized with DODS server 
    2828                                          # (${DIR_WORK}/NEMO/FORC, ...) 
    2929FORC_TARF=''                              # Archive name (ORCA2_LIM_nemo_v3.6.tar, ...) 
  • branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.env

    r5286 r5292  
    77 
    88# Sourcing user configuration 
    9 . cfg/user.cfg 
     9[ ! find ./cfg        -name ${CFG_USER}.cfg ] && { echo 'No configuration file in ./cfg for '${CFG_USER}; exit; } 
     10. cfg/${CFG_USER}.cfg 
    1011export DIR_WORK  DIR_SCRA  DIR_STOR 
    1112export NEMO_HOME NEMO_BRAN CONF_REFE CONF_TEST 
     
    1516 
    1617NEMO_ARCH=${NEMO_HOME}/ARCH         ; NEMO_CONF=${NEMO_HOME}/CONFIG         ; NEMO_ENGI=${NEMO_HOME}/NEMO 
    17 NEMO_EFCM=${NEMO_HOME}/EXTERNAL/fcm ; NEMO_IPSL=${NEMO_HOME}/EXTERNAL/IOIPSL; NEMO_SETT=${NEMO_HOME}/SETTE 
     18NEMO_EFCM=${NEMO_HOME}/EXTERNAL/fcm ; NEMO_IPSL=${NEMO_HOME}/EXTERNAL/IOIPSL; NEMO_TRUS=${NEMO_HOME}/SETTE 
    1819NEMO_TCMP=${NEMO_HOME}/TOOLS/COMPILE 
    1920export NEMO_ARCH NEMO_CONF NEMO_EFCM 
    20 export NEMO_ENGI NEMO_IPSL NEMO_SETT 
     21export NEMO_ENGI NEMO_IPSL NEMO_TRUS 
    2122export NEMO_TCMP 
    2223 
    2324# Sourcing super-computer configuration 
    24 . cfg/$ARCH.cfg 
     25[ ! find ./cfg        -name ${CFG_ARCH}.cfg ] && { echo 'No configuration file in ./cfg for '${CFG_ARCH}; exit; } 
     26. cfg/${CFG_ARCH}.cfg 
    2527export CDO      COMPILER  MPI      NETCDF 
    2628export JOB_SUBM JOB_LIST  JOB_VIEW JOB_DELE 
     
    2830export ARCH_ENV 
    2931 
    30 [ ! find ${NEMO_ARCH} -name arch-$ARCH.fcm ] && exit 
     32[ ! find ${NEMO_ARCH} -name arch-$ARCH.fcm  ] && { echo 'No fcm file in '${NEMO_ARCH}' for '$ARCH       ; exit; } 
  • branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh

    r5286 r5292  
    1111DEBUG=0; PUBLISH=0; status='OK' 
    1212 
    13 # Get options && replace some initials settings 
     13# Get options to replace some initials settings 
    1414while [ $# -ne 0 ]; do 
    1515    case $1 in 
    1616        -b|--branch ) NEMO_BRAN=$2         ; shift 2;; -d|--debug  ) set -vx; DEBUG=1     ; shift  ;; 
    1717   -e|--email  ) MAIL=$2              ; shift 2;; -j|--job    ) NPROC=$2             ; shift 2;; 
    18    -h|--help   ) cat trusting_help.txt; exit   ;; -m|--machine) ARCH=$2              ; shift 2;; 
     18   -h|--help   ) cat trusting_help.txt; exit   ;; -m|--machine) CFG_ARCH=$2          ; shift 2;; 
    1919   -n|--newconf) CONF_TEST=$2         ; shift 2;; -r|--refconf) CONF_REFE=$2         ; shift 2;; 
    2020   -t|--time   ) TIME_LIMI=$2         ; shift 2;; -p|--publish) PUBLISH=1            ; shift  ;; 
     21        -u|--user   ) CFG_USER=$2          ; shift 2;; -v|--version) NEMO_REVI=$2         ; shift 2;; 
    2122                   *) cat trusting_help.txt; exit   ;; 
    2223    esac 
     
    2425 
    2526# Set super-computer & user environment 
    26 [[ ! -z "$ARCH" && . trusting.env ]] || { ./trusting.sh -h && exit; } 
     27[[ ! -z "${CFG_ARCH}" && ! -z "${CFG_USER}" ]] && . trusting.env || { ./trusting.sh -h && exit; } 
    2728export DEBUG PUBLISH 
    2829 
     
    3435cd ${DIR_TEST} 
    3536datestr1=$( LC_ALL=C date -d"$DATE_STR" +%Y-%m-%dT%H:%M ) 
    36 printf "Date\n%s\n"       $datestr1 > mesg_01_date.txt 
     37printf "Date\n%s\n"       $datestr1 > mesg_01_date_${CFG_USER}_${CFG_ARCH}.txt 
    3738 
    38 printf "Status\nFAILED\n"           > mesg_02_status.txt # Only at end status will change to OK 
     39printf "Status\nFAILED\n"           > mesg_02_status_${CFG_USER}_${CFG_ARCH}.txt # Only at end status will change to OK 
    3940 
    4041. trusting_func.sh 
     
    4546#============================================= 
    4647for rel in $CDO $COMPILER $MPI $NETCDF; do 
    47     printf "Step......................\nGet $rel release\n" > mesg_03_step.txt 
     48    printf "Step......................\nGet $rel release\n" > mesg_03_step_${CFG_USER}_${CFG_ARCH}.txt 
    4849                             arch_rel=$( echo $LOADEDMODULES | sed "s#.*:$rel/\([^:]*\).*#\1#" ) 
    4950    [ -z "${arch_rel}"  ] && arch_rel=$( echo $PATH          | sed "s#.*$rel/\([^/]*\).*#\1#"  ) 
     
    5253done 
    5354 
    54 sed -n 1p model.log | sed 'i\Fortran compiler' > mesg_04_curiec.txt 
    55 sed -n 2p model.log | sed 'i\MPI libraries   ' > mesg_05_mpicurie.txt 
    56 sed -n 3p model.log | sed 'i\NetCDF libraries' > mesg_06_netcdf_curie.txt 
     55sed -n 1p model.log | sed 'i\Fortran compiler' > mesg_04_compiler_${CFG_USER}_${CFG_ARCH}.txt 
     56sed -n 2p model.log | sed 'i\MPI libraries   ' > mesg_05_mpi_${CFG_USER}_${CFG_ARCH}.txt 
     57sed -n 3p model.log | sed 'i\NetCDF libraries' > mesg_06_netcdf_${CFG_USER}_${CFG_ARCH}.txt 
    5758 
    5859 
    5960#--------------------------------------------- 
    60 printf "Step......................\nCheckout XIOS, FCM-make(/EXTERNAL/fcm), NEMO engines (/NEMO) & configuration (/CONFIG)\n" > mesg_03_step.txt 
     61printf "Step......................\nCheckout XIOS, FCM-make(/EXTERNAL/fcm), NEMO engines (/NEMO) & configuration (/CONFIG)\n" > mesg_03_step_${CFG_USER}_${CFG_ARCH}.txt 
     62svn_cmd='svn status' 
     63 
     64# If -v|--version option has been set, modify svn command 
     65[ $( echo ${NEMO_VERS} | grep  "up\|update"         ) ] && svn_cmd='svn update' 
     66[ $( echo ${NEMO_VERS} | tr -d '[:alpha:][:punct:]' ) ] && svn_cmd='svn update -r '$( echo ${NEMO_VERS} | tr -d '[:alpha:][:punct:]' ) 
     67 
    6168rev=0 
    62 for dir in ${DIR_XIOS} ${NEMO_ARCH} ${NEMO_CONF} ${NEMO_EFCM} ${NEMO_ENGI} ${NEMO_IPSL} ${NEMO_SETT} ${NEMO_TCMP}; do 
    63     svn up $dir 
     69for dir in ${DIR_XIOS} ${NEMO_ARCH} ${NEMO_CONF} ${NEMO_EFCM} ${NEMO_ENGI} ${NEMO_IPSL} ${NEMO_TRUS} ${NEMO_TCMP}; do 
     70    [ $dir == ${DIR_XIOS} ] && echo 'XIOS '$( svn info $dir | awk '(NR == 9) {print $NF}' ) >> model.log && continue 
     71    ${svn_cmd} $dir 
    6472    rev_loc=$( svn info $dir | awk '(NR == 9) {print $NF}' ) 
    65     [ $dir == ${DIR_XIOS} ] && echo 'XIOS '${rev_loc} >> model.log && continue 
    6673    (( ${rev_loc} >= $rev )) && rev=${rev_loc} 
    6774done 
     
    7077 
    7178#--------------------------------------------- 
    72 printf "Step......................\nCompilation NEMO configuration %s\n" ${CONF_REF} > mesg_03_step.txt 
     79printf "Step......................\nCompilation NEMO configuration %s\n" ${CONF_REF} > mesg_03_step_${CFG_USER}_${CFG_ARCH}.txt 
    7380cd ${NEMO_CONF} 
    7481. ${ARCH_ENV}     # Sourcing architecture environment 
     
    7986 
    8087#--------------------------------------------- 
    81 printf "Step......................\nPreparing job\n" > mesg_03_step.txt 
     88printf "Step......................\nPreparing job\n" > mesg_03_step_${CFG_USER}_${CFG_ARCH}.txt 
    8289cd ${DIR_TEST} 
    8390find ${NEMO_CONF}/${CONF_TEST}/EXP00 -regex '.*\(cfg\|opa\|ref\|xml\)' -exec cp {} . \; 
     
    94101 
    95102#--------------------------------------------- 
    96 printf "Step......................\nRunning\n"       > mesg_03_step.txt 
     103printf "Step......................\nRunning\n"       > mesg_03_step_${CFG_USER}_${CFG_ARCH}.txt 
    97104#${JOB_SUB} ${DIR_TEST}/../../batch.sh 
    98105job_num=$( ${JOB_SUB} ${DIR_TEST}/../../batch.sh | awk '{print $NF}') 
     
    110117 
    111118#--------------------------------------------- 
    112 printf "Step......................\nTest if ASCII output files exist\n"   > mesg_03_step.txt 
     119printf "Step......................\nTest if ASCII output files exist\n"   > mesg_03_step_${CFG_USER}_${CFG_ARCH}.txt 
    113120if      [ ! -f ${output_test} ]; then 
    114121 
     
    116123else if [  ] 
    117124 
    118     grep 'E R R O R' ocean.output    >> mesg_11_comments.txt 
    119     sed 's/^/Time step :/' time.step >> mesg_11_comments.txt 
     125    grep 'E R R O R' ocean.output    >> mesg_11_comments_${CFG_USER}_${CFG_ARCH}.txt 
     126    sed 's/^/Time step :/' time.step >> mesg_11_comments_${CFG_USER}_${CFG_ARCH}.txt 
    120127fi 
    121128 
    122129 
    123130#--------------------------------------------- 
    124 printf "Step......................\nTest ASCII output files difference\n" > mesg_03_step.txt 
     131printf "Step......................\nTest ASCII output files difference\n" > mesg_03_step_${CFG_USER}_${CFG_ARCH}.txt 
    125132for file in ocean.output solver.stat tracer.stat; do 
    126133    diff $file ${DIR_REFE}/$file 
     
    130137 
    131138#--------------------------------------------- 
    132 printf "Step......................\nTest last restart files difference\n" > mesg_03_step.txt 
     139printf "Step......................\nTest last restart files difference\n" > mesg_03_step_${CFG_USER}_${CFG_ARCH}.txt 
    133140diff_trusting 2>/dev/null 
    134141[ $? -ne 0 ] && status='FAILED' 
     
    136143 
    137144#--------------------------------------------- 
    138 echo 'Comments'                    >  mesg_11_comments.txt 
    139 grep 'W A R N I N G:' ocean.output >> mesg_11_comments.txt 
     145echo 'Comments'                    >  mesg_11_comments_${CFG_USER}_${CFG_ARCH}.txt 
     146grep 'W A R N I N G:' ocean.output >> mesg_11_comments_${CFG_USER}_${CFG_ARCH}.txt 
    140147 
    141148 
    142149#--------------------------------------------- 
    143150if [ $status != 'FAILED' ]; then 
    144     printf "Step......................\nGet Real CPU time\n" > mesg_03_step.txt 
     151    printf "Step......................\nGet Real CPU time\n" > mesg_03_step_${CFG_USER}_${CFG_ARCH}.txt 
    145152    real_cpu_time=$( ${JOB_VIEW} $job_num | awk 'END{print $9}') 
    146     printf "Real CPU time\n%s\n" ${real_cpu_time} > mesg_08_realcputime.txt 
     153    printf "Real CPU time\n%s\n" ${real_cpu_time} > mesg_08_realcputime_${CFG_USER}_${CFG_ARCH}.txt 
    147154else 
    148     printf "Step......................\nTest InputFiles difference\n" > mesg_03_step.txt 
     155    printf "Step......................\nTest InputFiles difference\n" > mesg_03_step_${CFG_USER}_${CFG_ARCH}.txt 
    149156    diff inputs_list.txt ${DIR_REFE}/inputs_list.txt 
    150157    [ $? -ne 0 ] && getout 
    151     [[ $? -ne 0 && printf "InputFiles\n%s\n" "Different" > mesg_09_inputfiles.txt ]] || printf "InputFiles\n%s\n" "Same" > mesg_09_inputfiles.txt 
     158    [[ $? -ne 0 && printf "InputFiles\n%s\n" "Different" > mesg_09_inputfiles_${CFG_USER}_${CFG_ARCH}.txt ]] || printf "InputFiles\n%s\n" "Same" > mesg_09_inputfiles_${CFG_USER}_${CFG_ARCH}.txt 
    152159fi 
    153160 
    154161 
    155162#--------------------------------------------- 
    156 printf "Status\nOK\n" > mesg_02_status.txt 
    157 printf "Step......................\nCode is reliable\n" > mesg_03_step.txt 
     163printf "Status\nOK\n" > mesg_02_status_${CFG_USER}_${CFG_ARCH}.txt 
     164printf "Step......................\nCode is reliable\n" > mesg_03_step_${CFG_USER}_${CFG_ARCH}.txt 
    158165 
    159166#--------------------------------------------- 
  • branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh

    r5286 r5292  
    22 
    33function mesg_make {  
    4     paste -d ';' mesg_*.txt > trusting_${DATE_STR}.txt 
    5     cat trusting_${DATE_STR}.txt 
     4    paste -d ';' mesg_*_${CFG_USER}_${CFG_ARCH}.txt > trusting_${DATE_STR}_${CFG_USER}_${CFG_ARCH}.txt 
     5    cat trusting_${DATE_STR}_${CFG_USER}_${CFG_ARCH}.txt 
    66} 
    77 
     
    1111if [ $PUBLISH -eq 1 ]; then 
    1212 
    13   if [ -f ${DIR_TEST}/trusting.txt ] ; then 
    14       tail -1 trusting_${DATE_STR}.txt >> ${DIR_TEST}/trusting.txt 
     13  if [ -f ${DIR_TEST}/trusting_${CFG_USER}_${CFG_ARCH}.txt ] ; then 
     14      tail -1 trusting_${DATE_STR}_${CFG_USER}_${CFG_ARCH}.txt >> ${DIR_TEST}/trusting_${CFG_USER}_${CFG_ARCH}.txt 
    1515  else 
    16       cp      trusting_${DATE_STR}.txt    ${DIR_TEST}/trusting.txt 
     16      cp      trusting_${DATE_STR}_${CFG_USER}_${CFG_ARCH}.txt    ${DIR_TEST}/trusting_${CFG_USER}_${CFG_ARCH}.txt 
    1717  fi 
    1818 
    19   cp trusting_${DATE_STR}.txt ${DIR_TEST} 
    20 #  chmod o+r ${DIR_TEST}/trusting_${DATE_STR}.txt 
     19  cp trusting_${DATE_STR}_${CFG_USER}_${CFG_ARCH}.txt ${DIR_TEST} 
     20#  chmod o+r ${DIR_TEST}/trusting_${DATE_STR}_${CFG_USER}_${CFG_ARCH}.txt 
    2121   
    2222#  rm -rf              ${DIR_WORK}/../../dods/public/${LOGNAME}/trusting/${CONF_REF} 
     
    2525   
    2626  # Send mail only when FAILED 
    27   if [[ grep 'FAILED' mesg_02_status.txt && ! -z $MAIL ]]; then 
     27  if [[ grep 'FAILED' mesg_02_status_${CFG_USER}_${CFG_ARCH}.txt && ! -z $MAIL ]]; then 
    2828      cat << END_MAIL > ${DIR_TEST}/trusting.mail 
    29 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
     29XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
    3030Dear $USER, 
    3131 
     
    3333Please consult http://webservices.ipsl.fr/trusting/ 
    3434 
    35 Failed at step: `tail -n 1 mesg_03_step.txt` 
     35Failed at step: `tail -n 1 mesg_03_step_${CFG_USER}_${CFG_ARCH}.txt` 
    3636Directory : ${DIR_TEST} 
    3737 
    38 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
     38XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
    3939 
    4040END_MAIL 
Note: See TracChangeset for help on using the changeset viewer.