Changeset 8808


Ignore:
Timestamp:
2017-11-24T15:03:07+01:00 (3 years ago)
Author:
nicolasmartin
Message:

Continuation of global refactoring of the tool, in particular a intelligible variables namelist

Location:
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/X64_ADA.cfg

    r5934 r8808  
    55## Default settings 
    66##--------------------------------------------------- 
    7 TRUS_ENVI=${TRUS_XIOS}/arch/arch-${TRUS_HPCC} 
     7TRUST_JOB_ENV=${TRUST_DIR_XIOS}/arch/arch-${TRUST_MAIN_HPCC} 
    88 
    9 TRUS_CDOD='cdo diffn' 
     9='cdo diffn' 
    1010 
    11 [ -z "${TRUS_NPRO}" ] && TRUS_NPRO='16' 
    12 [ -z "${TRUS_TOUT}" ] && TRUS_TOUT='10800' 
     11[ -z "${TRUST_COMPILE_NPROC}" ] && TRUST_COMPILE_NPROC='16' 
     12[ -z "${TRUST_JOB_TIMEOUT}" ] && TRUST_JOB_TIMEOUT='10800' 
    1313 
    1414 
    1515## (Super)computer environment 
    1616##--------------------------------------------------- 
    17 TRUS_JSPT=${TRUS_HPCC}.sh 
    18 TRUS_JSUB="llsubmit ${TRUS_JSPT} | grep -oe '\<[0-9]*\>'" 
    19 TRUS_JINF="llq -x \${TRUS_JIDN}" 
    20 TRUS_JSTA="llq      | grep \${TRUS_JIDN}" 
    21 TRUS_JKIL="llcancel        \${TRUS_JIDN}" 
     17TRUST_JOB_SCRIPT=${TRUST_MAIN_HPCC}.sh 
     18TRUST_JOB_SUBMIT="llsubmit ${TRUST_JOB_SCRIPT} | grep -oe '\<[0-9]*\>'" 
     19TRUST_JOB_INFO="llq -x \${TRUST_JOB_ID}" 
     20TRUST_JOB_STATE="llq      | grep \${TRUST_JOB_ID}" 
     21TRUST_JOB_KILL="llcancel        \${TRUST_JOB_ID}" 
    2222 
    23 TRUS_JTIM="grep IdrisMemMPI NEMO_CI_\${TRUS_JIDN} | cut -d, -f1 | awk '{print \$(NF-1),\$NF}'" 
    24 TRUS_JPME="grep IdrisMemMPI NEMO_CI_\${TRUS_JIDN} | cut -d, -f3 | awk '{print \$3     ,\$4 }'" 
    25 TRUS_JVME="grep IdrisMemMPI NEMO_CI_\${TRUS_JIDN} | cut -d, -f2 | awk '{print \$3     ,\$4 }'" 
     23TRUST_JOB_TIME="grep IdrisMemMPI NEMO_CI_\${TRUST_JOB_ID} | cut -d, -f1 | awk '{print \$(NF-1),\$NF}'" 
     24TRUST_JOB_RAM_P="grep IdrisMemMPI NEMO_CI_\${TRUST_JOB_ID} | cut -d, -f3 | awk '{print \$3     ,\$4 }'" 
     25TRUST_JOB_RAM_V="grep IdrisMemMPI NEMO_CI_\${TRUST_JOB_ID} | cut -d, -f2 | awk '{print \$3     ,\$4 }'" 
    2626 
    27 TRUS_CMPV='ifort' 
    28 TRUS_CDOR='cdo/' 
    29 TRUS_MPIR='intel/impi/' 
    30 TRUS_CDFR='netcdf/' 
     27TRUST_COMPILE_FORTRAN='ifort' 
     28TRUST_CDO='cdo/' 
     29TRUST_COMPILE_MPI='intel/impi/' 
     30TRUST_COMPILE_NETCDF='netcdf/' 
    3131 
    3232PATH='/smplocal/pub/cdo/1.5.9/bin':$PATH 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/X64_CURIE.cfg

    r8780 r8808  
    55## Default settings 
    66##--------------------------------------------------- 
    7 TRUS_ENVI=${TRUS_XIOS}/arch/arch-${TRUS_HPCC} 
     7TRUST_JOB_ENV=${TRUST_DIR_XIOS}/arch/arch-${TRUST_MAIN_HPCC} 
    88 
    9 TRUS_CDOD='cdo diffn' 
     9='cdo diffn' 
    1010 
    11 [ -z "${TRUS_NPRO}" ] && TRUS_NPRO='4' 
    12 [ -z "${TRUS_TOUT}" ] && TRUS_TOUT='10800' 
     11[ -z "${TRUST_COMPILE_NPROC}" ] && TRUST_COMPILE_NPROC='4' 
     12[ -z "${TRUST_JOB_TIMEOUT}" ] && TRUST_JOB_TIMEOUT='10800' 
    1313 
    1414 
    1515## (Super)computer environment 
    1616##--------------------------------------------------- 
    17 TRUS_JSPT=${TRUS_HPCC}.sh 
    18 TRUS_JSUB="ccc_msub ${TRUS_JSPT} | grep -oe '\<[0-9]*\>'" 
    19 TRUS_JINF="ccc_macct \${TRUS_JIDN}" 
    20 TRUS_JSTA="ccc_mpp  | grep \${TRUS_JIDN}" 
    21 TRUS_JKIL="ccc_mdel        \${TRUS_JIDN}" 
     17TRUST_JOB_SCRIPT=${TRUST_MAIN_HPCC}.sh 
     18TRUST_JOB_SUBMIT="ccc_msub ${TRUST_JOB_SCRIPT} | grep -oe '\<[0-9]*\>'" 
     19TRUST_JOB_INFO="ccc_macct \${TRUST_JOB_ID}" 
     20TRUST_JOB_STATE="ccc_mpp  | grep \${TRUST_JOB_ID}" 
     21TRUST_JOB_KILL="ccc_mdel        \${TRUST_JOB_ID}" 
    2222 
    23 TRUS_JTIM="ccc_macct \${TRUS_JIDN} | grep     \"\${TRUS_JIDN}.0 *opa\" | awk '{print               \$9      }'" 
    24 TRUS_JPME="ccc_macct \${TRUS_JIDN} | grep -m1 \"\${TRUS_JIDN}.0\"      | awk '{printf \"%d Mo\n\", \$2; exit}'" 
    25 TRUS_JVME="ccc_macct \${TRUS_JIDN} | grep -m1 \"\${TRUS_JIDN}.0\"      | awk '{printf \"%d Go\n\", \$7; exit}'" 
     23TRUST_JOB_TIME="ccc_macct \${TRUST_JOB_ID} | grep     \"\${TRUST_JOB_ID}.0 *opa\" | awk '{print               \$9      }'" 
     24TRUST_JOB_RAM_P="ccc_macct \${TRUST_JOB_ID} | grep -m1 \"\${TRUST_JOB_ID}.0\"      | awk '{printf \"%d Mo\n\", \$2; exit}'" 
     25TRUST_JOB_RAM_V="ccc_macct \${TRUST_JOB_ID} | grep -m1 \"\${TRUST_JOB_ID}.0\"      | awk '{printf \"%d Go\n\", \$7; exit}'" 
    2626 
    27 TRUS_CMPV='ifort' 
    28 TRUS_CDOR='netcdf-utils-' 
    29 TRUS_MPIR='bullxmpi/' 
    30 TRUS_CDFR='netcdf-' 
     27TRUST_COMPILE_FORTRAN='ifort' 
     28TRUST_CDO='netcdf-utils-' 
     29TRUST_COMPILE_MPI='bullxmpi/' 
     30TRUST_COMPILE_NETCDF='netcdf-' 
    3131 
    3232PATH='/usr/local/netcdf-utils-4.3.3.1_hdf5/bin':$PATH 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/X64_CURIE_cron.cfg

    r8780 r8808  
    55## Default settings 
    66##--------------------------------------------------- 
    7 TRUS_ENVI=${TRUS_XIOS}/arch/arch-${TRUS_HPCC} 
     7TRUST_JOB_ENV=${TRUST_DIR_XIOS}/arch/arch-${TRUST_MAIN_HPCC}.env 
    88 
    9 TRUS_CDOD='cdo diffn' 
     9TRUST_COMPILE_FORTRAN='ifort' 
    1010 
    11 [ -z "${TRUS_NPRO}" ] && TRUS_NPRO='4' 
    12 [ -z "${TRUS_TOUT}" ] && TRUS_TOUT='10800' 
     11TRUST_COMPILE_MPI='bullxmpi/' 
     12TRUST_COMPILE_NETCDF='netcdf-[0-9]' 
    1313 
     14TRUST_CDO='cdo' 
    1415 
    15 ## (Super)computer environment 
    16 ##--------------------------------------------------- 
    17 TRUS_JSPT=${TRUS_HPCC}.sh 
    18 TRUS_JSUB="ccc_msub ${TRUS_JSPT} | grep -oe '\<[0-9]*\>'" 
    19 TRUS_JINF="ccc_macct \${TRUS_JIDN}" 
    20 TRUS_JSTA="ccc_mpp  | grep \${TRUS_JIDN}" 
    21 TRUS_JKIL="ccc_mdel        \${TRUS_JIDN}" 
     16[ -z "${TRUST_COMPILE_NPROC}" ] && TRUST_COMPILE_NPROC='4' 
    2217 
    23 TRUS_JTIM="ccc_macct \${TRUS_JIDN} | grep     \"\${TRUS_JIDN}.0 *opa\" | awk '{print               \$9      }'" 
    24 TRUS_JPME="ccc_macct \${TRUS_JIDN} | grep -m1 \"\${TRUS_JIDN}.0\"      | awk '{printf \"%d Mo\n\", \$2; exit}'" 
    25 TRUS_JVME="ccc_macct \${TRUS_JIDN} | grep -m1 \"\${TRUS_JIDN}.0\"      | awk '{printf \"%d Go\n\", \$7; exit}'" 
     18TRUST_JOB_SCRIPT=${TRUST_MAIN_DIR}/batch/${TRUST_MAIN_HPCC}.sh 
     19TRUST_JOB_SUBMIT="ccc_msub ${TRUST_JOB_SCRIPT} | grep -oe '\<[0-9]*\>'" 
    2620 
    27 TRUS_CMPV='ifort' 
    28 TRUS_CDOR='netcdf-utils-' 
    29 TRUS_MPIR='bullxmpi/' 
    30 TRUS_CDFR='netcdf-' 
     21TRUST_JOB_STATE="ccc_mpp   | grep \${TRUST_JOB_ID}" 
     22TRUST_JOB_INFO="ccc_macct        \${TRUST_JOB_ID}" 
     23TRUST_JOB_KILL="ccc_mdel         \${TRUST_JOB_ID}" 
    3124 
    32 PATH='/usr/local/netcdf-utils-4.3.3.1_hdf5/bin':$PATH 
     25[ -z "${TRUST_JOB_TIMEOUT}" ] && TRUST_JOB_TIMEOUT='10800' 
     26 
     27TRUST_JOB_TIME=" 
     28ccc_macct \${TRUST_JOB_ID} | grep     \"\${TRUST_JOB_ID}.0 *opa\" \ 
     29    | awk '{print               \$9      }'                 \ 
     30" 
     31TRUST_JOB_RAM_P=" 
     32ccc_macct \${TRUST_JOB_ID} | grep -m1 \"\${TRUST_JOB_ID}.0\"      \ 
     33    | awk '{printf \"%d Mo\n\", \$2; exit}'                 \ 
     34" 
     35TRUST_JOB_RAM_V=" 
     36ccc_macct \${TRUST_JOB_ID} | grep -m1 \"\${TRUST_JOB_ID}.0\"      \ 
     37    | awk '{printf \"%d Go\n\", \$7; exit}'                 \ 
     38" 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/arch_template.cfg

    r5929 r8808  
    99## Default settings 
    1010##--------------------------------------------------- 
    11 # (Super)Computer environment (${TRUS_XIOS} is already defined in the user configuration file) 
    12 TRUS_ENVI=${TRUS_XIOS}/arch/arch-${TRUS_HPCC} 
    13 ## If `module` is available, ${TRUS_ENVI}.env will be sourced 
    14 ## If not (scheduled jobs), it will be ${TRUS_ENVI}.path or finally ${TRUS_ENVI} 
     11# (Super)Computer environment (${TRUST_DIR_XIOS} is already defined in the user configuration file) 
     12TRUST_JOB_ENV=${TRUST_DIR_XIOS}/arch/arch-${TRUST_MAIN_HPCC} 
     13## If `module` is available, ${TRUST_JOB_ENV}.env will be sourced 
     14## If not (scheduled jobs), it will be ${TRUST_JOB_ENV}.path or finally ${TRUST_JOB_ENV} 
    1515 
    1616## Comparison command with restart files as argument (think to append $PATH by any way) 
    17 TRUS_CDOD='cdo diffn' 
     17='cdo diffn' 
    1818 
    19 [ -z "${TRUS_NPRO}" ] && TRUS_NPRO=     ## Number of compiling processes 
    20 [ -z "${TRUS_TOUT}" ] && TRUS_TOUT=     ## Timeout for computation (s) 
     19[ -z "${TRUST_COMPILE_NPROC}" ] && TRUST_COMPILE_NPROC=     ## Number of compiling processes 
     20[ -z "${TRUST_JOB_TIMEOUT}" ] && TRUST_JOB_TIMEOUT=     ## Timeout for computation (s) 
    2121 
    2222 
    2323## (Super)computer environment 
    2424##--------------------------------------------------- 
    25 ## Job commands will almost always be used with `eval ${TRUS_JXXX}` because 
     25## Job commands will almost always be used with `eval ${TRUST_JOB_XXX}` because 
    2626## they will certainly need job ID number as argument for working 
    27 TRUS_JSPT=       ## Submission script contained ./batch folder, will be copied to testing folder 
    28 TRUS_JSUB=   ## Submit a job and get his ID on the fly (assigned to ${TRUS_JIDN}) 
    29             ## ex: `llsubmit ${TRUS_JSPT} | grep -oe '\<[0-9]*\>'` 
    30 TRUS_JSTA=      ## Test state of the submitted job (true -> pending/running or false -> completed/crashed) 
    31                    ## ex: "llq | grep \${TRUS_JIDN}" 
    32 TRUS_JKIL=      ## Kill the submitted job 
    33                    ## ex: "llcancel   \${TRUS_JIDN}" 
     27TRUST_JOB_SCRIPT=       ## Submission script contained ./batch folder, will be copied to testing folder 
     28TRUST_JOB_SUBMIT=  ## Submit a job and get his ID on the fly (assigned to ${TRUST_JOB_ID}) 
     29            ## ex: `llsubmit ${TRUST_JOB_SCRIPT} | grep -oe '\<[0-9]*\>'` 
     30TRUST_JOB_STATE=      ## Test state of the submitted job (true -> pending/running or false -> completed/crashed) 
     31                   ## ex: "llq | grep \${TRUST_JOB_ID}" 
     32TRUST_JOB_KILL=       ## Kill the submitted job 
     33                   ## ex: "llcancel   \${TRUST_JOB_ID}" 
    3434 
    3535## Computational performances of job (respectively elapsed time, max physical & virtual memory) 
    36 TRUS_JTIM=''       ## ex: "grep IdrisMemMPI NEMO_CI_\${TRUS_JIDN} | cut -d, -f1 | awk '{print \$(NF-1),\$NF}" 
    37 TRUS_JPME=''       ## ex: "grep IdrisMemMPI NEMO_CI_\${TRUS_JIDN} | cut -d, -f3 | awk '{print \$3     ,\$4 }" 
    38 TRUS_JVME=''       ## ex: "grep IdrisMemMPI NEMO_CI_\${TRUS_JIDN} | cut -d, -f2 | awk '{print \$3     ,\$4 }" 
     36TRUST_JOB_TIME=''       ## ex: "grep IdrisMemMPI NEMO_CI_\${TRUST_JOB_ID} | cut -d, -f1 | awk '{print \$(NF-1),\$NF}" 
     37TRUST_JOB_RAM_P=''       ## ex: "grep IdrisMemMPI NEMO_CI_\${TRUST_JOB_ID} | cut -d, -f3 | awk '{print \$3     ,\$4 }" 
     38TRUST_JOB_RAM_V=''       ## ex: "grep IdrisMemMPI NEMO_CI_\${TRUST_JOB_ID} | cut -d, -f2 | awk '{print \$3     ,\$4 }" 
    3939 
    40 TRUS_JINF=''       ## Get job informations to fill in a logfile during computation 
    41                    ## ex: "llq -x \${TRUS_JIDN}" 
     40TRUST_JOB_INFO=''     ## Get job informations to fill in a logfile during computation 
     41                   ## ex: "llq -x \${TRUST_JOB_ID}" 
    4242 
    43 ## Compiler (use with `${TRUS_CMPV} --version`) 
    44 TRUS_CMPV=''       ## ex: 'ifort'|'gfortran'|'pgfortran'|... 
     43## Compiler (use with `${TRUST_COMPILE_FORTRAN} --version`) 
     44TRUST_COMPILE_FORTRAN=''       ## ex: 'ifort'|'gfortran'|'pgfortran'|... 
    4545 
    4646## Software/libraries (string pattern to match just before the release number in $PATH) 
    4747## Respectively CDO (Climate Data Operators) / MPI libraries / NetCDF libraries 
    48 TRUS_CDOR=''       ## ex: 'cdo/'|'netcdf-utils-' 
    49 TRUS_MPIR=''       ## ex: 'intel/impi/'|'bullxmpi/' 
    50 TRUS_CDFR=''       ## ex: 'netcdf/'|'netcdf-' 
     48TRUST_CDO=''       ## ex: 'cdo/'|'netcdf-utils-' 
     49TRUST_COMPILE_MPI=''       ## ex: 'intel/impi/'|'bullxmpi/' 
     50TRUST_COMPILE_NETCDF=''       ## ex: 'netcdf/'|'netcdf-' 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/martin.cfg

    r8797 r8808  
    55## Default settings 
    66##--------------------------------------------------- 
    7 TRUS_CKOT=( 'ARCH           CONFIG          NEMO 
    8              EXTERNAL/AGRIF EXTERNAL/fcm    EXTERNAL/IOIPSL 
    9              TOOLS/COMPILE  TOOLS/maketools TOOLS/REBUILD_NEMO' ) 
     7TRUST_SVN_CO=( 'ARCH           CONFIG          NEMO               \ 
     8                EXTERNAL/AGRIF EXTERNAL/fcm    EXTERNAL/IOIPSL    \ 
     9                TOOLS/COMPILE  TOOLS/maketools TOOLS/REBUILD_NEMO  ' ) 
    1010 
    11 TRUS_CONF=${TRUS_REFE}'_trust' 
     11TRUST_CFG_NEW=${TRUST_CFG_REF}'_trust' 
    1212 
    13 if   [ -z "${TRUS_BRAN}"                      ]; then 
    14     TRUS_BRAN='trunk' 
     13if   [ -z "${TRUST_SVN_BRANCH}"                      ]; then 
     14    TRUST_SVN_BRANCH='trunk' 
    1515 
    16     if   [ -z ${TRUS_REFE}            ]; then 
    17    TRUS_REFE='ORCA2_LIM3_PISCES' 
    18     elif [    ${TRUS_REFE} == 'AMM12' ]; then 
    19    TRUS_TARF='AMM12_v3.7.tar' 
     16    if   [ -z "${TRUST_CFG_REF}"           ]; then 
     17   TRUST_CFG_REF='ORCA2_LIM3_PISCES' 
     18    elif [     ${TRUST_CFG_REF} == 'AMM12' ]; then 
     19   TRUST_CFG_FORC='AMM12_v3.7.tar' 
    2020    fi 
    2121 
    22     [ -z ${TRUS_TARF} ] && TRUS_TARF='ORCA2_LIM_nemo_v3.7.tar 
    23                                       INPUTS_PISCES_v3.6st.tar' 
    24 elif [     ${TRUS_BRAN} == 'nemo_v3_6_STABLE' ]; then 
     22    [ -z "${TRUST_CFG_FORC}" ] && TRUST_CFG_FORC='ORCA2_LIM_nemo_v3.7.tar  \ 
     23                                                  INPUTS_PISCES_v3.6st.tar  ' 
     24elif [     ${TRUST_SVN_BRANCH} == 'nemo_v3_6_STABLE' ]; then 
    2525 
    26     if   [ -z "${TRUS_REFE}"                       ]; then 
    27    TRUS_REFE='ORCA2_LIM_PISCES' 
    28     elif [     ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ]; then 
    29    TRUS_TARF='INPUTS_ORCA1_LIM3_PISCES_V10.tar' 
    30     elif [     ${TRUS_REFE} == 'AMM12'             ]; then 
    31    TRUS_TARF='AMM12_v3.6.tar' 
     26    if   [ -z "${TRUST_CFG_REF}"                       ]; then 
     27   TRUST_CFG_REF='ORCA2_LIM_PISCES' 
     28    elif [     ${TRUST_CFG_REF} == 'ORCA1_LIM3_PISCES' ]; then 
     29   TRUST_CFG_FORC='INPUTS_ORCA1_LIM3_PISCES_V10.tar' 
     30    elif [     ${TRUST_CFG_REF} == 'AMM12'             ]; then 
     31   TRUST_CFG_FORC='AMM12_v3.6.tar' 
    3232    fi 
    3333 
    3434fi 
    3535 
    36 TRUS_KEYA=''; TRUS_KEYD='' 
     36TRUST_CFG_KEY_ADD=''; TRUST_CFG_KEY_DEL='' 
    3737 
    38 [ -z "${TRUS_TARF}" ] && TRUS_TARF='ORCA2_LIM_nemo_v3.6.tar' 
     38[ -z "${TRUST_CFG_FORC}" ] && TRUST_CFG_FORC='ORCA2_LIM_nemo_v3.6.tar' 
    3939 
    4040## User environment 
    4141##--------------------------------------------------- 
    42 TRUS_WORK=$CCCWORKDIR/NEMO 
    43 TRUS_SCRA=$CCCSCRATCHDIR/NEMO/trusting/${TRUS_REFE}/${TRUS_BRAN}/${TRUS_DATE} 
    44 TRUS_STOR=$CCCSTOREDIR/NEMO/trusting_sav/${TRUS_REFE}/${TRUS_BRAN} 
    45 TRUS_FORC=$CCCWORKDIR/NEMO/FORC 
    46 TRUS_XIOS=$CCCWORKDIR/XIOS/xios-1.0 
     42TRUST_DIR_WORK=$CCCWORKDIR/NEMO 
     43TRUST_DIR_SCRATCH=$CCCSCRATCHDIR/NEMO/trusting/${TRUST_CFG_REF}/${TRUST_SVN_BRANCH}/${TRUST_TEST_DATE} 
     44TRUST_DIR_STORE=$CCCSTOREDIR/NEMO/trusting_sav/${TRUST_CFG_REF}/${TRUST_SVN_BRANCH} 
     45TRUST_DIR_FORC=$CCCWORKDIR/NEMO/FORC 
     46TRUST_DIR_XIOS=$CCCWORKDIR/XIOS/xios-1.0 
    4747 
    48 if   [ ${TRUS_REFE} == 'ORCA2_LIM_PISCES'  ]; then 
    49     TRUS_CONF='O2LP_trust' 
    50 elif [ ${TRUS_REFE} == 'ORCA2_LIM3_PISCES' ]; then 
    51     TRUS_CONF='O2L3P_trust' 
    52 elif [ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ]; then 
    53     TRUS_CONF='O1L3P_trust' 
    54     TRUS_XIOS=$CCCWORKDIR/XIOS/XIOS_DEV_CMIP6 
     48if   [ ${TRUST_CFG_REF} == 'ORCA2_LIM_PISCES'  ]; then 
     49    TRUST_CFG_NEW='O2LP_trust' 
     50elif [ ${TRUST_CFG_REF} == 'ORCA2_LIM3_PISCES' ]; then 
     51    TRUST_CFG_NEW='O2L3P_trust' 
     52elif [ ${TRUST_CFG_REF} == 'ORCA1_LIM3_PISCES' ]; then 
     53    TRUST_CFG_NEW='O1L3P_trust' 
     54    TRUST_DIR_XIOS=$CCCWORKDIR/XIOS/XIOS_DEV_CMIP6 
    5555fi 
    5656 
    57 [ ${TRUS_BRAN} == 'trunk' ] && TRUS_XIOS=$CCCWORKDIR/XIOS/trunk 
     57[ ${TRUST_SVN_BRANCH} == 'trunk' ] && TRUST_DIR_XIOS=$CCCWORKDIR/XIOS/trunk 
    5858 
    59 [ -z "${TRUS_MAIL}" ] && TRUS_MAIL='nicolas.martin@upmc.fr 
     59[ -z "${TRUST_TEST_MAILING}" ] && TRUST_TEST_MAILING='nicolas.martin@upmc.fr 
    6060                                    claire.levy@locean-ipsl.upmc.fr 
    6161                                    officers@nemo-ocean.eu' 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/romr005.cfg

    r8780 r8808  
    55## Default settings 
    66##--------------------------------------------------- 
    7 [ -z "${TRUS_BRAN}" ] && TRUS_BRAN='trunk' 
    8 TRUS_CKOT=( 'ARCH           CONFIG          NEMO               \ 
     7[ -z "${TRUST_SVN_BRANCH}" ] && TRUST_SVN_BRANCH='trunk' 
     8TRUST_SVN_CO=( 'ARCH           CONFIG          NEMO               \ 
    99             EXTERNAL/AGRIF EXTERNAL/fcm    EXTERNAL/IOIPSL    \ 
    1010             TOOLS/COMPILE  TOOLS/maketools TOOLS/REBUILD_NEMO  ' ) 
    1111 
    12 [ -z "${TRUS_REFE}" ] && TRUS_REFE='ORCA2_LIM_PISCES' 
    13 TRUS_CONF=${TRUS_REFE}'_trust' 
     12[ -z "${TRUST_CFG_REF}" ] && TRUST_CFG_REF='ORCA2_LIM_PISCES' 
     13TRUST_CFG_NEW=${TRUST_CFG_REF}'_trust' 
    1414 
    15 [ -z "${TRUS_TARF}" ] && TRUS_TARF='ORCA2_LIM_nemo_v3.6.tar' 
    16 [ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_TARF='INPUTS_ORCA1_LIM3_PISCES_V6.tar' 
    17 [ ${TRUS_REFE} == 'AMM12'             ] && TRUS_TARF='AMM12_v3.6.tar' 
     15[ -z "${TRUST_CFG_FORC}" ] && TRUST_CFG_FORC='ORCA2_LIM_nemo_v3.6.tar' 
     16[ ${TRUST_CFG_REF} == 'ORCA1_LIM3_PISCES' ] && TRUST_CFG_FORC='INPUTS_ORCA1_LIM3_PISCES_V6.tar' 
     17[ ${TRUST_CFG_REF} == 'AMM12'             ] && TRUST_CFG_FORC='AMM12_v3.6.tar' 
    1818 
    19 TRUS_KEYA=''; TRUS_KEYD='' 
    20 [ ${TRUS_REFE} == 'ORCA2_LIM' ] && TRUS_KEYA='key_add key_agrif' && TRUS_KEYD='key_del key_zdftmx' 
     19TRUST_CFG_KEY_ADD=''; TRUST_CFG_KEY_DEL='' 
     20[ ${TRUST_CFG_REF} == 'ORCA2_LIM' ] && TRUST_CFG_KEY_ADD='key_add key_agrif' && TRUST_CFG_KEY_DEL='key_del key_zdftmx' 
    2121 
    2222 
    2323## User environment 
    2424##--------------------------------------------------- 
    25 TRUS_WORK=$WORKDIR/NEMO 
    26 TRUS_SCRA=$WORKDIR/NEMO/trusting/${TRUS_REFE}/${TRUS_BRAN}/${TRUS_DATE} 
    27 TRUS_STOR=$WORKDIR/NEMO/trusting_sav/${TRUS_REFE}/${TRUS_BRAN} 
    28 TRUS_FORC=$WORKDIR/NEMO/FORC 
    29 TRUS_XIOS=$WORKDIR/XIOS/xios-1.0 
     25TRUST_DIR_WORK=$WORKDIR/NEMO 
     26TRUST_DIR_SCRATCH=$WORKDIR/NEMO/trusting/${TRUST_CFG_REF}/${TRUST_SVN_BRANCH}/${TRUST_TEST_DATE} 
     27TRUST_DIR_STORE=$WORKDIR/NEMO/trusting_sav/${TRUST_CFG_REF}/${TRUST_SVN_BRANCH} 
     28TRUST_DIR_FORC=$WORKDIR/NEMO/FORC 
     29TRUST_DIR_XIOS=$WORKDIR/XIOS/xios-1.0 
    3030 
    31 [ ${TRUS_REFE} == 'ORCA2_LIM_PISCES'  ] && TRUS_CONF='O2LP_trust' 
    32 [ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_CONF='O1L3P_trust' 
    33 [ ${TRUS_REFE} == 'ORCA2_LIM'         ] && TRUS_CONF='O2LA_trust' 
     31[ ${TRUST_CFG_REF} == 'ORCA2_LIM_PISCES'  ] && TRUST_CFG_NEW='O2LP_trust' 
     32[ ${TRUST_CFG_REF} == 'ORCA1_LIM3_PISCES' ] && TRUST_CFG_NEW='O1L3P_trust' 
     33[ ${TRUST_CFG_REF} == 'ORCA2_LIM'         ] && TRUST_CFG_NEW='O2LA_trust' 
    3434 
    35 [ -z "${TRUS_MAIL}" ] && TRUS_MAIL='ntmlod@locean-ipsl.upmc.fr' 
     35[ -z "${TRUST_TEST_MAILING}" ] && TRUST_TEST_MAILING='ntmlod@locean-ipsl.upmc.fr' 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/user_template.cfg

    r8797 r8808  
    1313 
    1414## SVN branch name ('trunk', 'nemo_v3_6_STABLE', development branches) 
    15 [ -z "${TRUS_BRAN}" ] && TRUS_BRAN='trunk' 
     15[ -z "${TRUST_SVN_BRANCH}" ] && TRUST_SVN_BRANCH='trunk' 
    1616 
    1717## Minimal content for code checkout/update 
    18 TRUS_CKOT=( 'ARCH           CONFIG          NEMO                
     18TRUST_SVN_CO=( 'ARCH           CONFIG          NEMO                
    1919             EXTERNAL/AGRIF EXTERNAL/fcm    EXTERNAL/IOIPSL     
    2020             TOOLS/COMPILE  TOOLS/maketools TOOLS/REBUILD_NEMO  ' ) 
    2121 
    22 [ -z "${TRUS_REFE}" ] && TRUS_REFE='ORCA2_LIM_PISCES'     ## Reference configuration to test 
    23 TRUS_CONF=${TRUS_REFE}'_trust'                            ## Testing configuration name 
     22[ -z "${TRUST_CFG_REF}" ] && TRUST_CFG_REF='ORCA2_LIM_PISCES'     ## Reference configuration to test 
     23TRUST_CFG_NEW=${TRUST_CFG_REF}'_trust'                            ## Testing configuration name 
    2424 
    25 ## Forcing archive, let void if just need to copy the files inside ${TRUS_FORC} 
    26 [ -z "${TRUS_TARF}" ] && TRUS_TARF='ORCA2_LIM_nemo_v3.6.tar' 
    27 [ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_TARF='INPUTS_ORCA1_LIM3_PISCES_V6.tar' 
    28 [ ${TRUS_REFE} == 'AMM12'             ] && TRUS_TARF='AMM12_v3.6.tar' 
     25## Forcing archive, let void if just need to copy the files inside ${TRUST_DIR_FORC} 
     26[ -z "${TRUST_CFG_FORC}" ] && TRUST_CFG_FORC='ORCA2_LIM_nemo_v3.6.tar' 
     27[ ${TRUST_CFG_REF} == 'ORCA1_LIM3_PISCES' ] && TRUST_CFG_FORC='INPUTS_ORCA1_LIM3_PISCES_V6.tar' 
     28[ ${TRUST_CFG_REF} == 'AMM12'             ] && TRUST_CFG_FORC='AMM12_v3.6.tar' 
    2929 
    3030## CPP keys to add or remove from reference configuration 
    31 TRUS_KEYA=''; TRUS_KEYD='' 
    32 [ ${TRUS_REFE} == 'ORCA2_LIM' ] && TRUS_KEYA='key_add key_agrif' && TRUS_KEYD='key_del key_zdftmx' 
     31TRUST_CFG_KEY_ADD=''; TRUST_CFG_KEY_DEL='' 
     32[ ${TRUST_CFG_REF} == 'ORCA2_LIM' ] && TRUST_CFG_KEY_ADD='key_add key_agrif' && TRUST_CFG_KEY_DEL='key_del key_zdftmx' 
    3333 
    3434 
    3535## User environment 
    3636##--------------------------------------------------- 
    37 TRUS_WORK=     ## Testing folder for compilation (branches checkouts & configuration compilation) 
    38 TRUS_SCRA=     ##   " "     ""   " " computation 
    39                  ## ...../${TRUS_REFE}/${TRUS_BRAN}/${TRUS_DATE} recommended 
    40 TRUS_STOR=     ## Benchmark folder where target files for comparison have been stored, ie: 
     37TRUST_DIR_WORK=     ## Testing folder for compilation (branches checkouts & configuration compilation) 
     38TRUST_DIR_SCRATCH=     ##   " "     ""   " " computation 
     39                 ## ...../${TRUST_CFG_REF}/${TRUST_SVN_BRANCH}/${TRUST_TEST_DATE} recommended 
     40TRUST_DIR_STORE=     ## Benchmark folder where target files for comparison have been stored, ie: 
    4141               ## Inputs  (all) : cpp_*, namelist_*, *.xml et inputs_list.txt (created by initial test) 
    4242               ## Outputs (any) : *.stat, ocean.output, restarts 
    43                  ## ...../${TRUS_REFE}/${TRUS_BRAN} recommended (same layout as ${TRUS_SCRA}) 
    44 TRUS_FORC=     ## Path to the forcing archive to extract (usage combined with ${TRUS_TARF}) or 
    45                ##    ""   all inputs files who will be copied into ${TRUS_SCRA} 
    46 TRUS_XIOS=     ## XIOS installation 
     43                 ## ...../${TRUST_CFG_REF}/${TRUST_SVN_BRANCH} recommended (same layout as ${TRUST_DIR_SCRATCH}) 
     44TRUST_DIR_FORC=     ## Path to the forcing archive to extract (usage combined with ${TRUST_CFG_FORC}) or 
     45               ##    ""   all inputs files who will be copied into ${TRUST_DIR_SCRATCH} 
     46TRUST_DIR_XIOS=     ## XIOS installation 
    4747 
    4848## Mailing list to notify on failure (-p|--prod option required) 
    49 [ -z "${TRUS_MAIL}" ] && TRUS_MAIL='' 
     49[ -z "${TRUST_TEST_MAILING}" ] && TRUST_TEST_MAILING='' 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc/trusting.env

    r8797 r8808  
    22 
    33 
    4 ## Global environment variables 
    5 ##-------------------------------------- 
    6 dat=$( date ) 
    7 export TRUS_DATE=$( date -ud "$dat" +"%Y%m%d%Z%H%M" ) 
    8 export TRUS_NAME=${TRUS_USER}'_'${TRUS_HPCC} 
    9 export TRUS_SVNR='https://forge.ipsl.jussieu.fr/nemo/svn' 
     4## Source user & (super)computer configurations 
     5##--------------------------------------------------- 
     6. ./cfg/${TRUST_MAIN_USER}.cfg 
     7. ./cfg/${TRUST_MAIN_HPCC}.cfg 
    108 
     9## Global environment variables per realm 
     10##--------------------------------------- 
    1111 
    12 ## Source user configuration 
    13 ##--------------------------------------------------- 
    14 . ./cfg/${TRUS_USER}.cfg 
    15 export TRUS_WORK TRUS_SCRA TRUS_STOR TRUS_XIOS TRUS_FORC 
    16 export TRUS_BRAN TRUS_REFE 
    17 export TRUS_CONF TRUS_TARF TRUS_KEYA TRUS_KEYD 
    18 export TRUS_MAIL 
     12## Installation and 1^st^ branch checkout (./install_new_branch.sh) 
     13export TRUST_DIR_WORK TRUST_DIR_SCRATCH TRUST_DIR_STORE 
     14export TRUST_SVN_REPO='https://forge.ipsl.jussieu.fr/nemo/svn' 
     15export TRUST_SVN_BRANCH 
     16export TRUST_DIR_NEMOGCM=${TRUST_DIR_WORK}/${TRUST_SVN_BRANCH}/NEMOGCM 
    1917 
     18## Configuration  
     19export TRUST_CFG_REF TRUST_CFG_NEW TRUST_CFG_KEY_ADD TRUST_CFG_KEY_DEL 
     20export TRUST_DIR_XIOS TRUST_DIR_FORC TRUST_CFG_FORC 
    2021 
    21 ## Source (super)computer configuration 
    22 ##--------------------------------------------------- 
    23 . ./cfg/${TRUS_HPCC}.cfg 
    24 export TRUS_ENVI TRUS_CDOD TRUS_NPRO TRUS_TOUT 
    25 export TRUS_JSPT TRUS_JSUB TRUS_JSTA TRUS_JKIL 
    26 export TRUS_JPME TRUS_JTIM TRUS_JVME TRUS_JINF 
    27 export TRUS_CMPV TRUS_CDOR TRUS_MPIR TRUS_CDFR 
     22## Compilation & Running 
     23export TRUST_JOB_ENV 
     24export TRUST_COMPILE_FORTRAN TRUST_COMPILE_NPROC 
     25export TRUST_COMPILE_MPI     TRUST_COMPILE_NETCDF 
     26export TRUST_JOB_SCRIPT TRUST_JOB_SUBMIT  
     27export TRUST_JOB_STATE  TRUST_JOB_KILL   TRUST_JOB_TIMEOUT 
     28export TRUST_JOB_INFO   TRUST_JOB_TIME   TRUST_JOB_RAM_P   TRUST_JOB_RAM_V 
     29export TRUST_CDO 
    2830 
    29  
    30 ##  
    31 ##--------------------------------------------------- 
    32 export TRUS_NGCM=${TRUS_WORK}/${TRUS_BRAN}/NEMOGCM 
    33 export TRUS_HIST=${TRUS_STOR}/trusting_${TRUS_NAME}.txt 
    34 export TRUS_ARCH=trusting_${TRUS_DATE}_${TRUS_NAME}.tgz 
     31## Trusting test 
     32export TRUST_TEST_NAME=${TRUST_MAIN_USER}'_'${TRUST_MAIN_HPCC} 
     33export TRUST_TEST_DATE=$( date -u +"%Y%m%d%Z%H%M" ) 
     34export TRUST_TEST_SUMMARY=trusting_${TRUST_TEST_DATE}_${TRUST_TEST_NAME}.txt 
     35export TRUST_TEST_BACKUP=trusting_${TRUST_TEST_DATE}_${TRUST_TEST_NAME}.tgz 
     36export TRUST_TEST_LOG=${TRUST_DIR_STORE}/trusting_${TRUST_TEST_NAME}.txt 
     37export TRUST_TEST_MAILING 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc/trusting_func.sh

    r8797 r8808  
    2020 
    2121init_files() { 
    22     echo 'Date'               > ${file_date}; echo 'Result'           > ${file_rslt} 
    23     echo 'Status'             > ${file_stat}; echo 'NEMOGCM rev.'     > ${file_nemo} 
    24     echo 'XIOS rev.'          > ${file_xios}; echo 'Fortran compiler' > ${file_cmpf} 
    25     echo 'MPI libs'           > ${file_lmpi}; echo 'NetCDF libs'      > ${file_ncdf} 
    26     echo 'Input files'        > ${file_inpt}; echo 'Elapsed time'     > ${file_time} 
    27     echo 'Memory usage (P/V)' > ${file_memy}; echo 'Comments'         > ${file_note} 
     22    echo 'Date'                > ${file_date} 
     23    echo 'Result'              > ${file_rslt} 
     24    echo 'Status'              > ${file_stat} 
     25    echo 'NEMOGCM rev.'        > ${file_nemo} 
     26    echo 'XIOS rev.'           > ${file_xios} 
     27    echo 'Fortran compiler'    > ${file_cmpf} 
     28    echo 'MPI libs'            > ${file_lmpi} 
     29    echo 'NetCDF libs'         > ${file_ncdf} 
     30    echo 'Input files'         > ${file_inpt} 
     31    echo 'Elapsed time'        > ${file_time} 
     32    echo 'Memory (Phy./Virt.)' > ${file_memy} 
     33    echo 'Comments'            > ${file_note} 
    2834 
    2935    ## 'Failed' status with 'Unknown error' by default 
    30     echo ${TRUS_RSLT}      \ 
     36    echo ${TRUST_FLAG_RESULT} \ 
    3137   >> ${file_rslt} 
    3238    echo 'Unknown error' \ 
     
    3642get_date() { 
    3743    ## UTC time zone for timestamping 
    38     local dat=$( date -ud "${TRUS_DATE}" +"%F %R %Z" ) 
     44    local dat=$( date -ud "${TRUST_TEST_DATE}" +"%F %R %Z" ) 
    3945 
    4046    echo $dat           \ 
     
    4753 
    4854    ## Loop on essential NEMO directories 
    49     for dir in ${TRUS_CKOT} ${TRUS_XIOS}; do 
     55    for dir in ${TRUST_SVN_CO} ${TRUST_DIR_XIOS}; do 
    5056 
    5157   ## For time being, just get revision from XIOS with no action on directory 
    52    if [ $dir == ${TRUS_XIOS} ]; then 
     58   if [ $dir == ${TRUST_DIR_XIOS} ]; then 
    5359       rev_loc=$( svn info $dir | awk '/Last Changed Rev/ {print $NF}' ) 
    5460       echo 'XIOS '${rev_loc} \ 
    5561      >> model.log 
    56        echo "<a href=\"https://forge.ipsl.jussieu.fr/ioserver/changeset/${rev_loc}\" target=\"_blank\">${rev_loc}</a>" \ 
     62       echo "<a href=\"https://forge.ipsl.jussieu.fr/ioserver/changeset/${rev_loc}\" target=\"_blank\"> \ 
     63        ${rev_loc}                                                                                 \ 
     64        </a>"                                                                                      \ 
    5765      >> ${file_xios} 
    5866       continue 
    5967   fi 
    6068 
    61    echo $dir && ${TRUS_SVNA} ${TRUS_NGCM}/$dir 
    62    rev_loc=$( svn info ${TRUS_NGCM}/$dir | awk '/Last Changed Rev/ {print $NF}' ) 
     69   echo $dir && ${TRUST_SVN_ACTION} ${TRUST_DIR_NEMOGCM}/$dir 
     70   rev_loc=$( svn info ${TRUST_DIR_NEMOGCM}/$dir  \ 
     71              | awk '/Last Changed Rev/ {print $NF}'   ) 
    6372 
    6473   ## Keep last rev. nb 
     
    6877    echo 'NEMOGCM '$rev \ 
    6978   >> model.log 
    70     echo "<a href=\"https://forge.ipsl.jussieu.fr/nemo/changeset/$rev\" target=\"_blank\">$rev</a>" \ 
     79    echo "<a href=\"https://forge.ipsl.jussieu.fr/nemo/changeset/$rev\" target=\"_blank\"> \ 
     80     $rev                                                                             \ 
     81     </a> "                                                                           \ 
    7182   >> ${file_nemo} 
    7283} 
    7384 
    7485get_soft_rel() { 
    75     local soft_rel str 
     86    local ver str 
    7687 
    7788    ## Sourcing environment 
    78     if [ -n "${TRUS_ENVI}" ]; then 
    79    if [[  -e ${TRUS_ENVI}.env && $( declare -F | grep ' module' ) ]]; then 
    80             ## .env file if module function is available 
    81        . ${TRUS_ENVI}.env 
    82    else 
    83             ## .path file if existing, if not the given file 
    84        [ -e ${TRUS_ENVI}.path ] && . ${TRUS_ENVI}.path || . ${TRUS_ENVI} 
    85    fi 
    86     fi 
    87  
    88     ## Problem with `prepend-path` of modulefile that use ':' instead of ' ' as delimiter 
    89     [ $TRUS_HPCC == 'X64_ADA' ] && WRAPPER_LDFLAGS='-L/smplocal/pub/IdrMemMPI/1.4/lib -lidrmem '${WRAPPER_LDFLAGS} 
    90  
    91     for str in ${TRUS_CMPV} ${TRUS_MPIR} ${TRUS_CDFR} ${TRUS_CDOR}; do 
     89    . ${TRUST_JOB_ENV} 
     90 
     91    for str in ${TRUST_COMPILE_FORTRAN}                         \ 
     92          ${TRUST_COMPILE_MPI}     ${TRUST_COMPILE_NETCDF} \ 
     93          ${TRUST_CDO}                                      ; do 
    9294   [ -z "$str" ] && continue 
    93    soft_rel='' 
    94  
    95    ## Software release: next word after "$soft" in $PATH (case-insensitive) 
    96    soft_rel=$( echo $PATH | sed "s#.*$str\([0-9.a-z_]*\).*#\1#i" ) 
    97  
    98    ## option --version would work for main compilers (gfortran, intel, pgfortran, ...) 
    99    [ $str == ${TRUS_CMPV} ] && soft_rel=$( $str --version | grep -m1 -oe '\<[0-9. ]*\>' ) 
     95   ver='' 
     96 
     97   ## Extract version number after searching pattern in PATH env. variable 
     98   ver=$( echo $PATH | sed "s|.*\($str[0-9.]*\).*|\1|" ) 
     99 
     100   ## option --version would work for main Fortran compilers and CDO 
     101   if [[ $str =~ ${TRUST_COMPILE_FORTRAN}|${TRUST_CDO} ]]; then 
     102       ver=$( $str --version 2>&1 | grep -m1 -oe '\<[0-9. ]*\>' \ 
     103         | xargs echo $str                                   ) 
     104   fi 
    100105 
    101106   ## Cleaning characters string to display proper soft name 
    102    str=$( echo $str | sed 's#\\##g; s#[/-]$##' ) 
    103  
    104    echo $str ${soft_rel} \ 
     107   #str=$( echo $str | sed 's|[/-]||g'  ) 
     108   ver=$( echo $ver | sed 's|[/-]| |g' ) 
     109 
     110   echo $ver \ 
    105111       >> model.log 
    106112    done 
     
    116122get_inputs() { 
    117123    # List archive content & extract it by default 
    118     local get_iol=$( eval " 
    119    for archive in ${TRUS_TARF}; do 
    120        tar -tvf ${TRUS_FORC}/\$archive >> inputs_list.txt; 
     124    local inputs_list=$( eval " 
     125   for archive in ${TRUST_CFG_FORC}; do 
     126       tar -tvf ${TRUST_DIR_FORC}/\$archive >> inputs_list.txt; 
    121127   done 
    122128   " ) 
    123     local get_iof=$( eval " 
    124    for archive in ${TRUS_TARF}; do 
    125        tar -vxf ${TRUS_FORC}/\$archive > /dev/null; 
     129    local inputs_get=$( eval " 
     130   for archive in ${TRUST_CFG_FORC}; do 
     131       tar -vxf ${TRUST_DIR_FORC}/\$archive  >      /dev/null; 
    126132   done 
    127133   " ) 
    128134 
    129     ## List & copy files in case of personal inputs 
    130     if [ -z "${TRUS_TARF}" ]; then 
    131    get_iol="ls ${TRUS_FORC}/*" 
    132    get_iof="\cp ${TRUS_FORC}/* ." 
    133     fi 
    134  
    135     ${get_iol}; ${get_iof} 
    136  
    137     if [ `find -name '*.gz' -print -quit` ]; then 
     135    ## List & copy files without archive 
     136    if [ -z "${TRUST_CFG_FORC}" ]; then 
     137   inputs_list=" ls -lh ${TRUST_DIR_FORC}/* >> inputs_list.txt" 
     138   inputs_get=" \cp     ${TRUST_DIR_FORC}/* .                 " 
     139    fi 
     140 
     141    ${inputs_list}; ${inputs_get} 
     142 
     143    if [ $( find -name '*.gz' -print -quit ) ]; then 
    138144   find . -name '*.gz' -exec gzip -d {} \; 
    139145    fi 
     
    149155 
    150156   ## Continue even if input file is not in here (see after) 
    151    if [ -e ${TRUS_STOR}/$file ]; then dif=$( diff -q $file ${TRUS_STOR}/$file ); else dif=0; fi 
     157   if [ -e ${TRUST_DIR_STORE}/$file ]; then 
     158       dif=$( diff -q $file ${TRUST_DIR_STORE}/$file ) 
     159   else  
     160       dif=0 
     161   fi 
    152162 
    153163   ## Pass over useless file omission in benckmark directory 
    154    [[ -n "$dif" && "$dif" != '0' ]] && { mesg='Different'; echo $dif; files_list+=$file' '; } 
     164   if [[ -n "$dif" && "$dif" != '0' ]]; then 
     165       mesg='Different' 
     166       echo $dif 
     167       files_list+=$file' ' 
     168   fi 
     169 
    155170    done 
    156171 
     
    170185 
    171186    ## Append a log file while pending 
    172     while [[ $( eval ${TRUS_JSTA} ) && ${time_elapsed} -lt ${TRUS_TOUT} ]]; do 
    173    printf "\n%s\n" ${outline// /#}          \ 
     187    while [[ $( eval ${TRUST_JOB_STATE} )                \ 
     188        && ${time_elapsed} -lt ${TRUST_JOB_TIMEOUT}   ]]; do 
     189   printf "\n%s\n" ${outline// /#} \ 
    174190       >> computation.log 
    175    [ -n "${TRUS_JINF}" ] && eval ${TRUS_JINF} \ 
     191   [ -n "${TRUST_JOB_INFO}" ] && eval ${TRUST_JOB_INFO} \ 
    176192       >> computation.log 
    177193   sleep ${time_increment} 
     
    182198 
    183199    ## Kill remaining job & stop the test if it's too long 
    184     [ ${time_elapsed} -eq ${TRUS_TOUT} ] && { eval ${TRUS_JKIL} &> /dev/null; get_out 6; } 
     200    if [ ${time_elapsed} -eq ${TRUST_JOB_TIMEOUT} ]; then 
     201   eval ${TRUST_JOB_KILL} &> /dev/null 
     202   get_out 6 
     203    fi 
     204 
    185205} 
    186206 
     
    191211    ## Simple diff 
    192212    for file in 'ocean.output' *.stat; do 
    193    ## Stop if no benchmark files (ocean.output, eventual stat files) 
    194    [ ! -e ${TRUS_STOR}/$file ] && { TRUS_RSLT='FAILED'; get_out 7; } 
    195  
    196    diff -q $file ${TRUS_STOR}/$file 
     213   ## Stop if no minimal benchmark files (ocean.output, eventual stat files) 
     214   if [ ! -e ${TRUST_DIR_STORE}/$file ]; then 
     215       TRUST_FLAG_RESULT='FAILED' 
     216       get_out 7 
     217   fi 
     218 
     219   diff -q $file ${TRUST_DIR_STORE}/$file 
    197220 
    198221   ## Continue even if it differs 
    199    [ $? -ne 0 ] && { TRUS_RSLT='FAILED'; mesg='Different'; files_list+=$file' '; } 
     222   if [ $? -ne 0 ]; then 
     223       TRUST_FLAG_RESULT='FAILED' 
     224       mesg='Different' 
     225       files_list+=$file' ' 
     226   fi 
     227 
    200228    done 
    201229 
     
    207235} 
    208236 
    209 diff_restart() { 
     237diff_restarts() { 
    210238    local dif filebase filebases ndomain out 
    211     local files_list='' dif_sum='undef' 
     239    local files_list='' dif_sum='0' #bcmk='false' 
    212240 
    213241    ## Find all restart files to rebuild 
    214242    if [ $( find -regex ".*_restart.*[0-9]\.nc" -print -quit ) ]; then 
    215    filebases=$( find -regextype sed -regex ".*_[0-9]\{4\}\.nc" \ 
    216                 | sed 's/\(.*\)_.*/\1/' | sort -u                ) 
    217  
    218    for filebase in ${filebases}; do 
    219  
    220        ndomain=$( find -regex ".*${name}_[0-9]*.nc" | wc -l | awk '{print $1}' ) 
    221  
    222        [ ${ndomain} -eq 0 ] && TRUS_RSLT='FAILED' && get_out 8 
    223  
    224        ${TRUS_NGCM}/TOOLS/REBUILD_NEMO/rebuild_nemo \ 
    225       -t ${TRUS_NPRO} $filebase ${ndomain}     \ 
     243        ################################################################ 
     244   ## Think to set the confgiguration name in the 'namelist_cfg' ## 
     245   ################################################################ 
     246   filebases=$( find -regextype sed -regex ".*${TRUST_CFG_NEW}.*_[0-9]\{4\}\.nc" \ 
     247                | sed 's/\(.*\)_.*/\1/' | sort -u                                  ) 
     248 
     249   for filebase in $filebases; do 
     250 
     251       ndomain=$( find -regex ".*${filebase}_[0-9]*.nc" \ 
     252             | wc -l | awk '{print $1}'              ) 
     253 
     254       [ $ndomain -eq 0 ] && TRUST_FLAG_RESULT='FAILED' && get_out 8 
     255 
     256       ${TRUST_DIR_NEMOGCM}/TOOLS/REBUILD_NEMO/rebuild_nemo \ 
     257      -t ${TRUST_COMPILE_NPROC} $filebase $ndomain       \ 
    226258      > /dev/null 
    227259 
    228260       ## Possibility of remaining decomposed restarts (even after rebuild) 
    229        [ $? -eq 0 ] && rm -f ${file}_[0-9]*.nc \ 
     261       [ $? -eq 0 ] && rm -f ${filebase}_[0-9]*.nc \ 
    230262                > /dev/null 
    231263 
    232        dif='' 
    233  
    234264            ## Stop if no benchmark files (restart file) 
    235        if [ -e ${TRUS_STOR}/$file.nc ]; then 
    236  
    237       out=$( $TRUS_CDOD $name.nc ${TRUS_STOR}/$name.nc 2>&1 ) 
    238       dif=$( echo $out | grep -o "[0-9]* of [0-9]* records" ) 
    239  
    240       ## Fix for cdo aborting on restarts with different inputs 
    241       if [[ $out =~ 'Abort' ]]; then 
    242           dif=$( echo $out | awk -F: '{print $NF}' ) 
     265       if [ -e ${TRUST_DIR_STORE}/$filebase.nc ]; then 
     266 
     267      #bcmk='true' 
     268      cdo diffn $filebase.nc ${TRUST_DIR_STORE}/$filebase.nc \ 
     269          > cdo_diff.out 2> /dev/null 
     270 
     271      ## Identical if cdo_diff.out is zero size 
     272      [ ! -s cdo_diff.out ] && continue 
     273 
     274      dif=$( grep -om1 '[0-9]* of [0-9]* records' cdo_diff.out ) 
     275 
     276      if [ -n "$dif" ]; then 
     277          export TRUST_FLAG_RESULT='FAILED' 
     278          files_list+=$filebase' ' && echo $filebase'.nc: '$dif 
     279          let dif_sum+=$( echo $dif | sed '|^\([0-9]*\).*|\1|' ) 
    243280      fi 
    244281 
    245       if [ -n "$dif" ]; then 
    246           export TRUS_RSLT='FAILED' 
    247           files_list+=$name' ' && echo $name'.nc: '$dif 
    248           let dif_sum+=$( echo $dif | awk '{print $1}' ) 
    249       fi 
     282       fi 
    250283 
    251284   done 
    252285 
    253     ## Stop if no benchmark files (ie time.step) 
    254    if   [ ${dif_sum} == 'undef' ]; then 
    255        TRUS_RSLT='FAILED' 
    256        get_out 7 
    257         ## List different files for web comment with sum of different records 
    258    elif [ ${dif_sum} -ne 0      ]; then 
     286        ## No benchmark files 
     287   #if   [ $bcmk == 'false' ]; then 
     288   #    TRUST_FLAG_RESULT='FAILED' 
     289   #    get_out 7 
     290   #fi 
     291 
     292        ## List modified restart(s) for web comment with sum of differences 
     293   if [ ${dif_sum} -ne 0 ]; then 
    259294       echo 'Restarts: '${files_list}${dif_sum}' record(s) differ<br>' \ 
    260295      >> temp_${file_note} 
     
    263298   fi 
    264299 
    265     else 
    266    TRUS_RSLT='FAILED' 
    267300    fi 
    268301 
     
    270303 
    271304get_time() { 
    272     [ -z "${TRUS_JTIM}" ] && return 
     305    [ -z "${TRUST_JOB_TIME}" ] && return 
    273306 
    274307    ## Interest for checking unusual time computation 
    275     local time_cpu=$( eval ${TRUS_JTIM} ) 
     308    local time_cpu=$( eval ${TRUST_JOB_TIME} ) 
    276309 
    277310    printf "Elapsed time: " 
     
    280313 
    281314get_memy() { 
    282     [[ -z "${TRUS_JPME}" && -z "${TRUS_JVME}" ]] && return 
     315    [[ -z "${TRUST_JOB_RAM_P}" && -z "${TRUST_JOB_RAM_V}" ]] && return 
    283316 
    284317    ## Interest for checking unusual memory usage 
    285     local memory_pmax=$( eval ${TRUS_JPME} ) memory_vmax=$( eval ${TRUS_JVME} ) 
     318    local memory_pmax=$( eval ${TRUST_JOB_RAM_P} ) 
     319    local memory_vmax=$( eval ${TRUST_JOB_RAM_V} ) 
    286320 
    287321    printf "Memory max usage (physical/virtual): " 
     
    308342log_make() { 
    309343    ## Format comments for web 
    310     [ -e temp_${file_note} ] && cat temp_${file_note} | tr -d '\n' | sed 's/<br>$//' \ 
    311    >> ${file_note} 
     344    if [ -e temp_${file_note} ]; then 
     345   cat temp_${file_note} | tr -d '\n' | sed 's/<br>$//' \ 
     346       >> ${file_note} 
     347    fi 
    312348 
    313349    ## Construct txt file with all messenger files 
    314     paste -d ';' mesg_*.txt | tee ${TRUS_FILE} 
     350    paste -d ';' mesg_*.txt | tee ${TRUST_TEST_SUMMARY} 
    315351} 
    316352 
     
    320356 
    321357    ## Production mode (-p|--prod) 
    322     if [ ${TRUS_PROD} -eq 1 ]; then 
     358    if [ ${TRUST_FLAG_PROD} -eq 1 ]; then 
    323359 
    324360   ## Create or append trusting logfile 
    325    if [ -f ${TRUS_HIST} ]; then cmd='tail -1'; else cmd='cat'; fi 
    326  
    327    $cmd ${TRUS_FILE}   \ 
    328        >> ${TRUS_HIST} 
     361   if [ -f ${TRUST_TEST_LOG} ]; then cmd='tail -1'; else cmd='cat'; fi 
     362 
     363   $cmd ${TRUST_TEST_SUMMARY}      \ 
     364       >> ${TRUST_TEST_LOG} 
    329365 
    330366        ## Send mail only when FAILED 
    331    if [[ ! -z "${TRUS_MAIL}" && ${TRUS_RSLT} == 'FAILED' ]]; then 
     367   if [[ ! -z "${TRUST_TEST_MAILING}" \ 
     368         && ${TRUST_FLAG_RESULT} == 'FAILED'   ]]; then 
    332369 
    333370       ## Content 
     
    337374 
    338375 
    339 The trusting sequence has not completed successfully on new configuration ${TRUS_CONF} based on ${TRUS_REFE}. 
    340  
    341 Here is the model summary: 
     376The following trusting sequence has not completed successfully: 
     377 
     378Testing configuration ${TRUST_CFG_NEW} based on ${TRUST_CFG_REF}. 
     379User installation ${TRUST_MAIN_USER} 
     380HPC environment ${TRUST_MAIN_HPCC} 
     381 
     382Here is the running environment summary: 
    342383`cat model.log` 
    343384 
    344 First checking would be on the trusting environment files: 
    345 ${TRUS_USER}.cfg & ${TRUS_HPCC}.cfg 
    346  
    347385For more details, look into the testing folder at: 
    348 ${TRUS_SCRA} 
    349  
    350 An archive has been created to share the questionable configuration for further studies: 
    351 ${TRUS_STOR}/${TRUS_ARCH} 
     386${TRUST_DIR_SCRATCH} 
     387An archive is also available to share the questionable configuration: 
     388${TRUST_DIR_STORE}/${TRUST_TEST_BACKUP} 
    352389 
    353390END_MAIL 
    354391 
    355392       ## Send with detailed subject 
    356        mail -s "[NEMO Trusting][$rev][${TRUS_BRAN}][${TRUS_REFE}] ${TRUS_RSLT} ${TRUS_RORR}" ${TRUS_MAIL} \ 
     393       mail -s "[NEMO Trusting][${TRUST_CFG_REF}][${TRUST_SVN_BRANCH}] \ 
     394           ${TRUST_FLAG_RESULT} ${TRUST_FLAG_ERROR}"               \ 
     395       ${TRUST_TEST_MAILING}                                \ 
    357396      <  trusting.mail 
    358397   fi 
     
    364403    local time_step=0 
    365404 
    366     TRUS_RORR=$1 
     405    TRUST_FLAG_ERROR=$1 
    367406 
    368407    printf "\n\nEnd of test\n" 
    369408 
    370409    ## In case of compilation error 
    371     cd ${TRUS_SCRA} 
    372  
    373     if [ ${TRUS_RSLT} == 'FAILED' ]; then 
     410    cd ${TRUST_DIR_SCRATCH} 
     411 
     412    if [ ${TRUST_FLAG_RESULT} == 'FAILED' ]; then 
    374413   echo 'Failure' 
    375414 
    376415        ## Error identification 
    377    case ${TRUS_RORR} in 
     416   case ${TRUST_FLAG_ERROR} in 
    378417            ## Compilation 
    379        '1') TRUS_RORR='XIOS compilation failed' ;; '2') TRUS_RORR='NEMO compilation failed';; 
     418       '1') TRUST_FLAG_ERROR='XIOS compilation failed' ;; 
     419       '2') TRUST_FLAG_ERROR='NEMO compilation failed' ;; 
    380420       ## Submission 
    381        '3') TRUS_RORR='Missing input files'     ;; '4') TRUS_RORR='Job submission error'   ;; 
    382        ## Computation 
    383        '5') TRUS_RORR='Crashed at time step'    ;; '6') TRUS_RORR='Exceeded time limit'    ;; 
     421       '3') TRUST_FLAG_ERROR='Missing input files'     ;; 
     422       '4') TRUST_FLAG_ERROR='Job submission error'    ;; 
     423       ## Computing 
     424       '5') TRUST_FLAG_ERROR='Crashed at time step'    ;; 
     425       '6') TRUST_FLAG_ERROR='Exceeded time limit'     ;; 
    384426       ## Results 
    385        '7') TRUS_RORR='Missing previous outputs';; '8') TRUS_RORR='New outputs differ'     ;; 
     427       '7') TRUST_FLAG_ERROR='Missing previous outputs';; 
     428       '8') TRUST_FLAG_ERROR='New outputs differ'      ;; 
    386429       ## Other 
    387        '*') TRUS_RORR='Unknown error'           ;; 
     430       '*') TRUST_FLAG_ERROR='Unknown error'           ;; 
    388431   esac 
    389432 
    390433    else 
    391    echo 'Success' && TRUS_RORR='Code is reliable' 
     434   echo 'Success' && TRUST_FLAG_ERROR='Code is reliable' 
    392435    fi 
    393436 
    394437    ## Eventual comments from ocean.output 
    395     if [ "${TRUS_RORR}" == 'Crashed at time step' ]; then 
     438    if [ "${TRUST_FLAG_ERROR}" == 'Crashed at time step' ]; then 
    396439   comments 'E R R O R' 
    397    [ -e time.step ] && time_step=$( grep -o [0-9]* time.step ) 
    398    TRUS_RORR+=' '$time_step 
     440   [ -e time.step ] && time_step=$( cat time.step ) 
     441   TRUST_FLAG_ERROR+=' '$time_step 
    399442    else 
    400443   comments 'W A R N I N G' 
    401    [ "${TRUS_RORR}" == 'Exceeded time limit' ] && TRUS_RORR+=' '$(( ${TRUS_TOUT}/3600 ))'h' 
     444 
     445   if [ "${TRUST_FLAG_ERROR}" == 'Exceeded time limit' ]; then 
     446       TRUST_FLAG_ERROR+=' '$(( ${TRUST_JOB_TIMEOUT}/3600 ))'h' 
     447   fi 
     448 
    402449    fi 
    403450 
    404451    ## Last messenger files 
    405     #export TRUS_RORR 
    406     sed -i "2 s/.*/$TRUS_RSLT/" ${file_rslt}; sed -i "2 s/.*/$TRUS_RORR/" ${file_stat} 
     452    sed -i "2 s/.*/$TRUST_RESULT/"     ${file_rslt} 
     453    sed -i "2 s/.*/$TRUST_FLAG_ERROR/" ${file_stat} 
    407454 
    408455    ## Save tested configuration if trusting failed in production mode (-p|--prod) 
    409     if [[ ${TRUS_RSLT} == 'FAILED' && ${TRUS_PROD} -eq 1 ]]; then 
    410    echo 'Creating archive '${TRUS_ARCH}' under '${TRUS_STOR} 
    411    tar -czf ${TRUS_STOR}/${TRUS_ARCH}               *                    \ 
    412        -C   ${TRUS_NGCM}/CONFIG/${TRUS_CONF}/MY_SRC .                    \ 
    413        -C   ${TRUS_NGCM}/CONFIG/${TRUS_CONF}        cpp_${TRUS_CONF}.fcm 
     456    if [[ ${TRUST_FLAG_RESULT} == 'FAILED' && ${TRUST_FLAG_PROD} -eq 1 ]]; then 
     457   echo 'Creating archive '${TRUST_TEST_BACKUP}' under '${TRUST_DIR_STORE} 
     458   tar -czf ${TRUST_DIR_STORE}/${TRUST_TEST_BACKUP}                 * \ 
     459       -C   ${TRUST_DIR_NEMOGCM}/CONFIG/${TRUST_CFG_NEW}/MY_SRC . \ 
     460       -C   ${TRUST_DIR_NEMOGCM}/CONFIG/${TRUST_CFG_NEW}          \ 
     461            cpp_${TRUST_CFG_NEW}.fcm 
    414462    fi 
    415463 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/install_new_branch.sh

    r8797 r8808  
    66## Set defaults 
    77##--------------------------------------------------- 
    8 TRUS_DBUG=0; TRUS_PROD=0; TRUS_HELP=0 
     8TRUST_FLAG_DEBUG=0; TRUST_FLAG_PROD=0; TRUST_FLAG_HELP=0 
    99 
    1010 
     
    1313while [ $# -ne 0 ]; do 
    1414    case $1 in 
    15    '-d'|'--debug'  ) TRUS_DBUG=1 ; shift  ;; '-j'|'--job'     ) TRUS_NPRO=$2; shift 2;; 
    16    '-m'|'--machine') TRUS_HPCC=$2; shift 2;; '-h'|'--help'    ) TRUS_HELP=1 ; shift  ;; 
    17    '-u'|'--user'   ) TRUS_USER=$2; shift 2;; "*"             ) TRUS_HELP=1 ; shift  ;; 
     15   '-d'|'--debug'  ) TRUST_FLAG_DEBUG=1 ; shift  ;; '-j'|'--job'    ) TRUST_COMPILE_NPROC=$2; shift 2;; 
     16   '-m'|'--machine') TRUST_MAIN_HPCC=$2; shift 2;; '-h'|'--help'    ) TRUST_FLAG_HELP=1 ; shift  ;; 
     17   '-u'|'--user'   ) TRUST_MAIN_USER=$2; shift 2;; "*"             ) TRUST_FLAG_HELP=1 ; shift  ;; 
    1818    esac 
    1919done 
     
    2222## Initialization (HPC & user environment) 
    2323##--------------------------------------------------- 
    24 if [[ ! -e cfg/${TRUS_USER}.cfg || ! -e cfg/${TRUS_HPCC}.cfg || ${TRUS_HELP} -eq 1 ]]; then 
     24if [[ ! -e cfg/${TRUST_MAIN_USER}.cfg || ! -e cfg/${TRUST_MAIN_HPCC}.cfg || ${TRUST_FLAG_HELP} -eq 1 ]]; then 
    2525    cat ./inc/trusting_help.txt 
    2626 
    27     if [ ${TRUS_HELP} -eq 0 ]; then 
     27    if [ ${TRUST_FLAG_HELP} -eq 0 ]; then 
    2828   printf "\n\n\033[0;33m" 
    2929   printf "At least one configuration (arch or user) file is missing or misspelled:" 
    30    printf "\t'%s'.cfg\t'%s'.cfg" ${TRUS_USER} ${TRUS_HPCC} 
     30   printf "\t'%s'.cfg\t'%s'.cfg" ${TRUST_MAIN_USER} ${TRUST_MAIN_HPCC} 
    3131   printf "\033[0m" 
    3232    fi 
     
    3838else 
    3939    . ./inc/trusting.env 
    40     [ ${TRUS_DBUG} -eq 1 ] && set -vx 
     40    [ ${TRUST_FLAG_DEBUG} -eq 1 ] && set -vx 
    4141fi 
    4242 
     
    4444## List last branches from NEMO Forge 
    4545##--------------------------------------------------- 
    46 printf "\nWhat branch do you want to install in "${TRUS_WORK}" for trusting test ? " 
     46printf "\nWhat branch do you want to install in "${TRUST_DIR_WORK}" for trusting test ? " 
    4747echo 'Enter 0 to abort' 
    48 select branch in 'trunk' $( svn ls ${TRUS_SVNR}/branches/2015 | tr -d / | sort -r ); do 
     48select branch in 'trunk' $( svn ls ${TRUST_SVN_REPO}/branches/2015 | tr -d / | sort -r ); do 
    4949 
    50     if [ $REPLY -eq 0 ]; then exit 1; else export TRUS_BRAN=$branch; fi 
     50    if [ $REPLY -eq 0 ]; then exit 1; else export TRUST_SVN_BRANCH=$branch; fi 
    5151 
    52     printf "\nInstallation of a working copy of '%s' branch in '%s'? " ${TRUS_BRAN} ${TRUS_WORK} 
     52    printf "\nInstallation of a working copy of '%s' branch in '%s'? " ${TRUST_SVN_BRANCH} ${TRUST_DIR_WORK} 
    5353    printf "\nType [Y|y|yes] to confirm, if not back to branches list number\n" 
    5454    read answer 
     
    6262## First checkout of selected branch 
    6363##--------------------------------------------------- 
    64 echo 'Initial checkout of '${TRUS_BRAN}' branch' 
    65 mkdir -p ${TRUS_WORK}/${TRUS_BRAN}/NEMOGCM 
    66 cd       ${TRUS_WORK}/${TRUS_BRAN}/NEMOGCM 
     64echo 'Initial checkout of '${TRUST_SVN_BRANCH}' branch' 
     65mkdir -p ${TRUST_DIR_WORK}/${TRUST_SVN_BRANCH}/NEMOGCM 
     66cd       ${TRUST_DIR_WORK}/${TRUST_SVN_BRANCH}/NEMOGCM 
    6767 
    68 svn_bran=branches/2015/${TRUS_BRAN} 
    69 [ ${TRUS_BRAN} == 'trunk' ] && svn_bran=${TRUS_BRAN} 
     68svn_bran=branches/2015/${TRUST_SVN_BRANCH} 
     69[ ${TRUST_SVN_BRANCH} == 'trunk' ] && svn_bran=${TRUST_SVN_BRANCH} 
    7070 
    71 for elmt in ${TRUS_CKOT}; do 
     71for elmt in ${TRUST_SVN_CO}; do 
    7272    [ $elmt == '\' ] && continue 
    7373    printf "%s " $elmt 
    7474 
    7575    if [ $elmt == 'TOOLS/maketools' ]; then 
    76    svn co -q ${TRUS_SVNR}/${svn_bran}/NEMOGCM/TOOLS --depth empty 
     76   svn co -q ${TRUST_SVN_REPO}/${svn_bran}/NEMOGCM/TOOLS --depth empty 
    7777   svn up -q $elmt 
    7878    else 
    79    svn co -q ${TRUS_SVNR}/${svn_bran}/NEMOGCM/$elmt $elmt 
     79   svn co -q ${TRUST_SVN_REPO}/${svn_bran}/NEMOGCM/$elmt $elmt 
    8080    fi 
    8181 
     
    8787## Compile rebuild_nemo.exe in anticipation 
    8888##--------------------------------------------------- 
    89 if [ $( find ARCH -name arch-${TRUS_HPCC}.fcm ) ]; then 
     89if [ $( find ARCH -name arch-${TRUST_MAIN_HPCC}.fcm ) ]; then 
    9090    echo 'Compile NEMO rebuild tool' 
    91     cd TOOLS && ./maketools -n REBUILD_NEMO -m ${TRUS_HPCC} -j ${TRUS_NPRO} >& /dev/null 
     91    cd TOOLS && ./maketools -n REBUILD_NEMO -m ${TRUST_MAIN_HPCC} -j ${TRUST_COMPILE_NPROC} >& /dev/null 
    9292    [ -e REBUILD_NEMO/rebuild_nemo.exe ] && printf "\033[0;32mOK\033[0m" || printf "\033[0;31mKO\033[0m" 
    9393    printf "\n\n" 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/trusting.sh

    r8797 r8808  
    66## Set defaults 
    77##--------------------------------------------------- 
    8 TRUS_DIRE=$PWD 
    9 TRUS_DBUG=0; TRUS_PROD=0; TRUS_HELP=0 
     8TRUST_MAIN_DIR=$PWD 
     9TRUST_FLAG_DEBUG=0; TRUST_FLAG_PROD=0; TRUST_FLAG_HELP=0 
    1010## No update on SVN directories & 'FAILED' result for 'Unknown error' ) 
    11 TRUS_SVNA='svn status'; TRUS_RSLT='FAILED'; TRUS_RORR=0 
     11TRUST_SVN_ACTION='svn status' 
     12TRUST_FLAG_RESULT='FAILED'; TRUST_FLAG_ERROR=0 
     13 
    1214xios_mode='--full'; stdout_redir='>&' 
    1315rev=$( svn info | awk '(NR == 9) {print $NF}' ) 
     
    1719##--------------------------------------------------- 
    1820while [ $# -ne 0 ]; do 
     21 
    1922    case $1 in 
    20    '-a'|'--archive') TRUS_TARF=$2; shift 2;; '-b'|'--branch' ) TRUS_BRAN=$2; shift 2;; 
    21    '-d'|'--debug'  ) TRUS_DBUG=1 ; shift  ;; '-e'|'--email'  ) TRUS_MAIL=$2; shift 2;; 
    22    '-f'|'--forcdir') TRUS_FORC=$2; shift 2;; '-j'|'--job'    ) TRUS_NPRO=$2; shift 2;; 
    23    '-h'|'--help'   ) TRUS_HELP=1 ; shift  ;; '-m'|'--machine') TRUS_HPCC=$2; shift 2;; 
    24    '-n'|'--newconf') TRUS_CONF=$2; shift 2;; '-r'|'--refconf') TRUS_REFE=$2; shift 2;; 
    25    '-t'|'--time'   ) TRUS_TOUT=$2; shift 2;; '-p'|'--prod'   ) TRUS_PROD=1 ; shift  ;; 
    26    '-u'|'--user'   ) TRUS_USER=$2; shift 2;; '-v'|'--version') TRUS_SVNV=$2; shift 2;; 
    27    '-w'|'--workdir') TRUS_WORK=$2; shift 2;; "*"             ) TRUS_HELP=1 ; shift  ;; 
     23   '-a'|'--archive') TRUST_CFG_FORC=$2; shift 2;; '-b'|'--branch' ) TRUST_SVN_BRANCH=$2; shift 2;; 
     24   '-d'|'--debug'  ) TRUST_FLAG_DEBUG=1 ; shift  ;; '-e'|'--email'  ) TRUST_TEST_MAILING=$2; shift 2;; 
     25   '-f'|'--forcdir') TRUST_DIR_FORC=$2; shift 2;; '-j'|'--job'    ) TRUST_COMPILE_NPROC=$2; shift 2;; 
     26   '-h'|'--help'   ) TRUST_FLAG_HELP=1 ; shift  ;; '-m'|'--machine') TRUST_MAIN_HPCC=$2; shift 2;; 
     27   '-n'|'--newconf') TRUST_CFG_NEW=$2; shift 2;; '-r'|'--refconf') TRUST_CFG_REF=$2; shift 2;; 
     28   '-t'|'--time'   ) TRUST_JOB_TIMEOUT=$2; shift 2;; '-p'|'--prod'   ) TRUST_FLAG_PROD=1 ; shift  ;; 
     29   '-u'|'--user'   ) TRUST_MAIN_USER=$2; shift 2;; '-v'|'--version') TRUST_SVN_REV=$2; shift 2;; 
     30   '-w'|'--workdir') TRUST_DIR_WORK=$2; shift 2;; "*"             ) TRUST_FLAG_HELP=1 ; shift  ;; 
    2831    esac 
     32 
    2933done 
    3034 
     
    3236## Initialization (HPC & user environment) 
    3337##--------------------------------------------------- 
    34 if [[ ! -e cfg/${TRUS_USER}.cfg || ! -e cfg/${TRUS_HPCC}.cfg || ${TRUS_HELP} -eq 1 ]]; then 
     38if [[ ! -e cfg/${TRUST_MAIN_USER}.cfg || ! -e cfg/${TRUST_MAIN_HPCC}.cfg || ${TRUST_FLAG_HELP} -eq 1 ]]; then 
    3539    cat ./inc/trusting_help.txt 
    3640 
    37     if [ ${TRUS_HELP} -eq 0 ]; then 
     41    if [ ${TRUST_FLAG_HELP} -eq 0 ]; then 
    3842   printf "\n\n\033[0;33m" 
    3943   printf "At least one configuration (arch or user) file is missing or misspelled:" 
    40    printf "\t'%s'.cfg\t'%s'.cfg" ${TRUS_USER} ${TRUS_HPCC} 
     44   printf "\t'%s'.cfg\t'%s'.cfg" ${TRUST_MAIN_USER} ${TRUST_MAIN_HPCC} 
    4145   printf "\033[0m" 
    4246    fi 
     
    5054 
    5155    ## DEBUG option to speed up & expand verbosity of compilation 
    52     [ ${TRUS_DBUG} -eq 1 ] && { set -vx; xios_mode=''; stdout_redir='>'; } 
     56    [ ${TRUST_FLAG_DEBUG} -eq 1 ] && { set -vx; xios_mode=''; stdout_redir='>'; } 
    5357 
    5458    ## If -v|--version option has been set, modify default SVN action on directories 
    55     if   [ $( echo ${TRUS_SVNV} | grep  "HEAD\|up\|update"                     ) ]; then 
    56    TRUS_SVNA='svn update -r HEAD' 
    57     elif [ $( echo ${TRUS_SVNV} | grep -o '{[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}}' ) ]; then 
    58    TRUS_SVNA='svn update -r     '$( echo ${TRUS_SVNV} | grep -o '{[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}}' ) 
    59     elif [ $( echo ${TRUS_SVNV} | grep -o '[0-9]*'                             ) ]; then 
    60    TRUS_SVNA='svn update -r     '$( echo ${TRUS_SVNV} | grep -o '[0-9]*' ) 
     59    if   [ $( echo ${TRUST_SVN_REV} | grep  "HEAD\|up\|update"                     ) ]; then 
     60   TRUST_SVN_ACTION='svn update -r HEAD' 
     61    elif [ $( echo ${TRUST_SVN_REV} | grep -o '{[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}}' ) ]; then 
     62   TRUST_SVN_ACTION='svn update -r     '$( echo ${TRUST_SVN_REV} | grep -o '{[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}}' ) 
     63    elif [ $( echo ${TRUST_SVN_REV} | grep -o '[0-9]*'                             ) ]; then 
     64   TRUST_SVN_ACTION='svn update -r     '$( echo ${TRUST_SVN_REV} | grep -o '[0-9]*' ) 
    6165    fi 
    6266 
     
    6771##--------------------------------------------------- 
    6872echo 
     73 
    6974if [ -t 0 ]; then cat ./inc/banner.txt; else cat ./inc/banner.html; fi 
     75 
    7076echo 
    7177echo '****************************************************************************************************' 
     
    7682echo '****************************************************************************************************' 
    7783echo 
    78 printf "\t§ Testing configuration\t\t%s based on %s\n" ${TRUS_CONF} ${TRUS_REFE} 
    79 printf "\t§ SVN working copy\t\t%s/%s\n"               ${TRUS_WORK} ${TRUS_BRAN} 
    80 printf "\t§ Benchmark folder\t\t%s\n"               ${TRUS_STOR} 
    81 printf "\t§ (Super)Computer\t\t%s\n"             ${TRUS_HPCC} 
    82 printf "\t§ User installation\t\t%s\n\n"         ${TRUS_USER} 
     84printf "\t§ Testing configuration\t\t%s based on %s\n" ${TRUST_CFG_NEW} ${TRUST_CFG_REF} 
     85printf "\t§ SVN working copy\t\t%s/%s\n"               ${TRUST_DIR_WORK} ${TRUST_SVN_BRANCH} 
     86printf "\t§ Benchmark folder\t\t%s\n"               ${TRUST_DIR_STORE} 
     87printf "\t§ (Super)Computer\t\t%s\n"             ${TRUST_MAIN_HPCC} 
     88printf "\t§ User installation\t\t%s\n\n"         ${TRUST_MAIN_USER} 
    8389 
    8490 
     
    8692##--------------------------------------------------- 
    8793print_step 'Timestamped testing directory' 
    88 mkdir -p ${TRUS_SCRA} ${TRUS_STOR} 
    89 cd       ${TRUS_SCRA} 
    90 echo     ${TRUS_SCRA} 
     94 
     95mkdir -p ${TRUST_DIR_SCRATCH} ${TRUST_DIR_STORE} 
     96cd       ${TRUST_DIR_SCRATCH} 
     97echo     ${TRUST_DIR_SCRATCH} 
     98 
    9199init_files 
     100 
    92101get_date 
    93102 
     
    95104## Get SVN revision on XIOS & NEMO essentials directories 
    96105##--------------------------------------------------- 
    97 print_step "SVN action on NEMO directories: ${TRUS_SVNA}" 
     106print_step "SVN action on NEMO directories: ${TRUST_SVN_ACTION}" 
     107 
    98108get_nemo_rev 
    99109 
     
    102112##--------------------------------------------------- 
    103113print_step 'Get testing environement' 
     114 
    104115get_soft_rel 
     116 
    105117cat model.log | awk '{printf "%-20s %s %s\n", $1, $2, $3}' 
    106118env | sort > env.log 
     
    110122##--------------------------------------------------- 
    111123print_step 'Compile XIOS' 
    112 cd ${TRUS_XIOS} 
    113 eval ./make_xios ${xios_mode} --arch ${TRUS_HPCC} --job ${TRUS_NPRO} \ 
     124 
     125cd ${TRUST_DIR_XIOS} 
     126 
     127eval ./make_xios ${xios_mode} --arch ${TRUST_MAIN_HPCC} --job ${TRUST_COMPILE_NPROC} \ 
    114128    ${stdout_redir} /dev/null 
     129 
    115130[ ! -e lib/libxios.a ] && get_out 1 || echo 'Success' 
    116131 
     
    118133## NEMO compilation from scratch 
    119134##--------------------------------------------------- 
    120 print_step "Compile ${TRUS_REFE} configuration" 
    121 cd ${TRUS_NGCM}/CONFIG 
    122 [[ -d ${TRUS_CONF} && ${TRUS_DBUG} -eq 0 ]] && ./makenemo -n ${TRUS_CONF} clean_config \ 
    123     > /dev/null <<EOF 
     135print_step "Compile ${TRUST_CFG_REF} configuration" 
     136 
     137cd ${TRUST_DIR_NEMOGCM}/CONFIG 
     138 
     139if [[ -d ${TRUST_CFG_NEW} && ${TRUST_FLAG_DEBUG} -eq 0 ]]; then 
     140    ./makenemo -n ${TRUST_CFG_NEW} clean_config \ 
     141   > /dev/null <<EOF 
    124142y 
    125143EOF 
    126  
    127 eval ./makenemo -n ${TRUS_CONF} -r ${TRUS_REFE} -m ${TRUS_HPCC} -j ${TRUS_NPRO} \ 
    128                 ${TRUS_KEYA} ${TRUS_KEYD}                                       \ 
     144fi 
     145 
     146eval ./makenemo -n ${TRUST_CFG_NEW} -r ${TRUST_CFG_REF} \ 
     147                -m ${TRUST_MAIN_HPCC} -j ${TRUST_COMPILE_NPROC} \ 
     148                   ${TRUST_CFG_KEY_ADD} ${TRUST_CFG_KEY_DEL}    \ 
    129149    ${stdout_redir} /dev/null 
    130 [ ! -e ${TRUS_CONF}/BLD/bin/nemo.exe ] && get_out 2 || echo 'Success' 
     150 
     151[ ! -e ${TRUST_CFG_NEW}/BLD/bin/nemo.exe ] && get_out 2 || echo 'Success' 
    131152 
    132153 
     
    134155##--------------------------------------------------- 
    135156print_step 'Set job (copying or extracting inputs)' 
    136 cd ${TRUS_SCRA} 
     157 
     158cd ${TRUST_DIR_SCRATCH} 
     159 
    137160get_inputs 
    138 cp   ${TRUS_NGCM}/CONFIG/${TRUS_CONF}/cpp_* . 
    139 find ${TRUS_NGCM}/CONFIG/${TRUS_CONF}/EXP00 -regex '.*\(_cfg\|.in\|opa\|_ref\|.xml\)' \ 
    140                                             -exec  cp {} . \; 
     161 
     162cp   ${TRUST_DIR_NEMOGCM}/CONFIG/${TRUST_CFG_NEW}/cpp_* . 
     163find ${TRUST_DIR_NEMOGCM}/CONFIG/${TRUST_CFG_NEW}/EXP00   \ 
     164    -regex '.*\(_cfg\|.in\|opa\|_ref\|.xml\)' \ 
     165    -exec  cp {} . \; 
    141166 
    142167 
     
    144169##--------------------------------------------------- 
    145170print_step 'Compare inputs' 
     171 
    146172diff_inputs 
    147173 
     
    150176##--------------------------------------------------- 
    151177print_step 'Submit job' 
    152 cp ${TRUS_DIRE}/batch/${TRUS_JSPT} ${TRUS_SCRA} ## Copy the submitting script to testing folder 
    153 TRUS_JIDN=$( eval ${TRUS_JSUB} ) 
    154 [ $? -ne 0 ] && get_out 4 || printf "Success (job ID %s)\n" ${TRUS_JIDN} 
     178 
     179## Copy the submitting script to testing folder 
     180cp ${TRUST_JOB_SCRIPT} ${TRUST_DIR_SCRATCH} 
     181TRUST_JOB_ID=$( eval ${TRUST_JOB_SUBMIT} ) 
     182 
     183[ $? -ne 0 ] && get_out 4 || printf "Success (job ID %s)\n" ${TRUST_JOB_ID} 
     184 
    155185print_step 'Pending job' 
     186 
    156187job_pending 
     188 
    157189print_step 'Job finished' 
    158190 
     
    161193##--------------------------------------------------- 
    162194print_step 'Test job state' 
    163 [[ ! -e time.step || $( grep 'E R R O R' ocean.output ) ]] && get_out 5 || echo 'Success' ## Must be reviewed 
     195 
     196if [[ ! -e time.step || $( grep 'E R R O R' ocean.output ) ]]; then 
     197    get_out 5 
     198else 
     199    echo 'Success' ## Must be reviewed 
     200fi 
     201 
    164202print_step 'Get job performances' 
     203 
    165204get_time 
     205 
    166206get_memy 
    167207 
     
    169209## Check outputs 
    170210##--------------------------------------------------- 
    171 TRUS_RSLT='OK' ## 'OK' by default 
     211TRUST_FLAG_RESULT='OK' ## 'OK' by default 
     212 
    172213print_step 'Compare outputs' 
     214 
    173215diff_results 
     216 
    174217print_step 'Compare restarts' 
    175 diff_restart 
    176 [ $TRUS_RSLT == 'FAILED' ] && get_out 8 
    177  
    178  
    179 ## End, at least nothing has changed ;-) 
     218 
     219diff_restarts 
     220 
     221[ $TRUST_RESULT == 'FAILED' ] && get_out 8 
     222 
     223 
     224## End, at least nothing major has changed ;-) 
    180225##--------------------------------------------------- 
    181226get_out 0 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/web/index.html

    r5933 r8808  
    3131       ini_set('display_errors', 'Off'); error_reporting(E_ALL); 
    3232       include 'read_trusting.php'; 
    33        $DODS_TGCC="http://dods.extra.cea.fr/store/martin/trusting"; $DODS_IDRIS="http://dodsp.idris.fr/romr005/trusting"; 
    34        $file_headers=get_headers("${DODS_TGCC}/ORCA2_LIM_PISCES/nemo_v3_6_STABLE/trusting_info.html"); 
    35        if ($file_headers[0] == '' ) { $LOCATION="./src/martin"; } else { $LOCATION="${DODS_TGCC}"; } 
     33       $TRUST_URL_TGCC="http://dods.extra.cea.fr/store/martin/trusting"; $TRUST_URL_IDRIS="http://dodsp.idris.fr/romr005/trusting"; 
     34       $file_headers=get_headers("${TRUST_URL_TGCC}/ORCA2_LIM_PISCES/nemo_v3_6_STABLE/trusting_info.html"); 
     35       if ($file_headers[0] == '' ) { $LOCATION="./src/martin"; } else { $LOCATION="${TRUST_URL_TGCC}"; } 
    3636    ?> 
    3737 
    3838       <!--$ctx=stream_context_create(array('http'=>array('timeout'=>1))); 
    39        $test=file_get_contents("${DODS_TGCC}/ORCA2_LIM_PISCES/nemo_v3_6_STABLE/trusting_info.html", 0, $ctx); 
    40        if ($test == FALSE ) { $LOCATION="./src/martin"; } else { $LOCATION="${DODS_TGCC}"; }--> 
     39       $test=file_get_contents("${TRUST_URL_TGCC}/ORCA2_LIM_PISCES/nemo_v3_6_STABLE/trusting_info.html", 0, $ctx); 
     40       if ($test == FALSE ) { $LOCATION="./src/martin"; } else { $LOCATION="${TRUST_URL_TGCC}"; }--> 
    4141 
    4242    <!-----Begin NEMO trust-----> 
     
    6969         <div class="dhtmlgoodies_aTab"> 
    7070      <table class="sort-table" id="table-2" cellspacing="1"> 
    71         <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?> 
     71        <?php read_trusting("${TRUST_URL_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?> 
    7272      </table> 
    7373      <script type="text/javascript"> 
     
    104104         <div class="dhtmlgoodies_aTab"> 
    105105      <table class="sort-table" id="table-4" cellspacing="1"> 
    106         <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?> 
     106        <?php read_trusting("${TRUST_URL_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?> 
    107107      </table> 
    108108      <script type="text/javascript"> 
     
    139139         <div class="dhtmlgoodies_aTab"> 
    140140      <table class="sort-table" id="table-6" cellspacing="1"> 
    141         <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?> 
     141        <?php read_trusting("${TRUST_URL_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?> 
    142142      </table> 
    143143      <script type="text/javascript"> 
     
    184184         <div class="dhtmlgoodies_aTab"> 
    185185      <table class="sort-table" id="table-8" cellspacing="1"> 
    186         <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?> 
     186        <?php read_trusting("${TRUST_URL_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?> 
    187187      </table> 
    188188      <script type="text/javascript"> 
     
    219219         <div class="dhtmlgoodies_aTab"> 
    220220      <table class="sort-table" id="table-10" cellspacing="1"> 
    221         <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?> 
     221        <?php read_trusting("${TRUST_URL_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?> 
    222222      </table> 
    223223      <script type="text/javascript"> 
     
    254254         <div class="dhtmlgoodies_aTab"> 
    255255      <table class="sort-table" id="table-12" cellspacing="1"> 
    256         <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?> 
     256        <?php read_trusting("${TRUST_URL_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?> 
    257257      </table> 
    258258      <script type="text/javascript"> 
Note: See TracChangeset for help on using the changeset viewer.