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 8818 for branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc/trusting.env – NEMO

Ignore:
Timestamp:
2017-11-27T14:10:49+01:00 (6 years ago)
Author:
nicolasmartin
Message:

Continuation of global refactoring of the tool, set cfg files mime property and modify trusting.env trying to handle default settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc/trusting.env

    r8808 r8818  
    22 
    33 
     4## Defaults 
     5##-------------------------------------------------------------------------------- 
     6 
     7[ -z "${TRUST_SVN_BRANCH}" ] && TRUST_SVN_BRANCH='trunk' 
     8 
     9## Ref. cfg. unset or empty (mandatory) 
     10if [[ -z "${TRUST_CFG_REF}" ]]; then 
     11 
     12    ## Default cfg from trunk excepting last stable 
     13    TRUST_CFG_REF='ORCA2_LIM3_PISCES' 
     14 
     15    if [[ ${TRUST_SVN_BRANCH} && ${TRUST_SVN_BRANCH} == 'nemo_v3_6_STABLE' ]]; then 
     16   TRUST_CFG_REF='ORCA2_LIM_PISCES' 
     17    fi 
     18 
     19fi 
     20 
     21## Forcing archive unset 
     22#if [[ ! ${TRUST_IO_FORC_TAR} && ${TRUST_IO_FORC_TAR-_} ]]; then 
     23 
     24    ## Forcing directory set 
     25#    if [ ${TRUST_IO_FORC_PATH} ]; then 
     26 
     27   ## Default forcing archive from trunk 
     28#  TRUST_IO_FORC_TAR='ORCA2_LIM_nemo_v3.7.tar INPUTS_PISCES_v3.6st.tar' 
     29 
     30#  [ ${TRUST_CFG_REF} == 'AMM12' ] && TRUST_IO_FORC_TAR='AMM12_v3.7.tar' 
     31 
     32#  if [ ${TRUST_SVN_BRANCH} == 'nemo_v3_6_STABLE' ]; then 
     33 
     34#      TRUST_IO_FORC_TAR='ORCA2_LIM_nemo_v3.6.tar' 
     35 
     36#      if   [ ${TRUST_CFG_REF} == 'ORCA1_LIM3_PISCES' ]; then 
     37#     TRUST_IO_FORC_TAR='INPUTS_ORCA1_LIM3_PISCES_V10.tar' 
     38#      elif [ ${TRUST_CFG_REF} == 'AMM12'             ]; then 
     39#     TRUST_IO_FORC_TAR='AMM12_v3.6.tar' 
     40#      fi 
     41 
     42#  fi 
     43 
     44#    fi 
     45 
     46#fi 
     47 
     48 
    449## Source user & (super)computer configurations 
    5 ##--------------------------------------------------- 
     50##-------------------------------------------------------------------------------- 
    651. ./cfg/${TRUST_MAIN_USER}.cfg 
    752. ./cfg/${TRUST_MAIN_HPCC}.cfg 
    853 
    9 ## Global environment variables per realm 
    10 ##--------------------------------------- 
    1154 
    12 ## Installation and 1^st^ branch checkout (./install_new_branch.sh) 
     55## Checking and export environment variables 
     56##-------------------------------------------------------------------------------- 
     57 
     58## Trusting installation 
     59## --------------------- 
     60 
     61[ -z "${TRUST_DIR_WORK}"    ] &&    TRUST_DIR_WORK=${TRUST_MAIN_DIR}/../CONFIG 
     62[ -z "${TRUST_DIR_SCRATCH}" ] && TRUST_DIR_SCRATCH=${TRUST_MAIN_DIR} 
     63 
    1364export TRUST_DIR_WORK TRUST_DIR_SCRATCH TRUST_DIR_STORE 
     65 
     66 
     67## Branch checkout (./install_new_branch.sh) 
     68##------------------------------------------ 
     69 
    1470export TRUST_SVN_REPO='https://forge.ipsl.jussieu.fr/nemo/svn' 
     71 
     72export TRUST_SVN_CO=( 'ARCH           CONFIG          NEMO               \ 
     73                       EXTERNAL/AGRIF EXTERNAL/fcm    EXTERNAL/IOIPSL    \ 
     74                       TOOLS/COMPILE  TOOLS/maketools TOOLS/REBUILD_NEMO \ 
     75                       TRUST                                              ' ) 
     76 
    1577export TRUST_SVN_BRANCH 
    16 export TRUST_DIR_NEMOGCM=${TRUST_DIR_WORK}/${TRUST_SVN_BRANCH}/NEMOGCM 
    1778 
    18 ## Configuration  
    19 export TRUST_CFG_REF TRUST_CFG_NEW TRUST_CFG_KEY_ADD TRUST_CFG_KEY_DEL 
    20 export TRUST_DIR_XIOS TRUST_DIR_FORC TRUST_CFG_FORC 
     79export TRUST_SVN_NEMOGCM=${TRUST_DIR_WORK}/${TRUST_SVN_BRANCH}/NEMOGCM 
     80 
     81 
     82## NEMO Configuration 
     83##------------------- 
     84 
     85## Ref. cfg. unset or empty (mandatory) 
     86#if [[ -z "${TRUST_CFG_REF}" ]]; then 
     87 
     88    ## Default cfg from trunk excepting last stable 
     89#    TRUST_CFG_REF='ORCA2_LIM3_PISCES' 
     90 
     91#    if [ ${TRUST_SVN_BRANCH} == 'nemo_v3_6_STABLE' ]; then 
     92#  TRUST_CFG_REF='ORCA2_LIM_PISCES' 
     93#    fi 
     94 
     95#fi 
     96 
     97## Forcing archive unset 
     98if [[ ! ${TRUST_IO_FORC_TAR} && ${TRUST_IO_FORC_TAR-_} ]]; then 
     99 
     100    ## Forcing directory set 
     101    if [ ${TRUST_IO_FORC_PATH} ]; then 
     102 
     103   ## Default forcing archive from trunk 
     104   TRUST_IO_FORC_TAR='ORCA2_LIM_nemo_v3.7.tar INPUTS_PISCES_v3.6st.tar' 
     105 
     106   [ ${TRUST_CFG_REF} == 'AMM12' ] && TRUST_IO_FORC_TAR='AMM12_v3.7.tar' 
     107 
     108   if [ ${TRUST_SVN_BRANCH} == 'nemo_v3_6_STABLE' ]; then 
     109 
     110       TRUST_IO_FORC_TAR='ORCA2_LIM_nemo_v3.6.tar' 
     111 
     112       if   [ ${TRUST_CFG_REF} == 'ORCA1_LIM3_PISCES' ]; then 
     113      TRUST_IO_FORC_TAR='INPUTS_ORCA1_LIM3_PISCES_V10.tar' 
     114       elif [ ${TRUST_CFG_REF} == 'AMM12'             ]; then 
     115      TRUST_IO_FORC_TAR='AMM12_v3.6.tar' 
     116       fi 
     117 
     118   fi 
     119 
     120    fi 
     121 
     122fi 
     123 
     124[ -z "${TRUST_CFG_NEW}" ] && TRUST_CFG_NEW=${TRUST_CFG_REF}'_trust' 
     125 
     126export TRUST_CFG_NEW TRUST_CFG_REF 
     127export TRUST_IO_FORC_TAR 
     128 
     129export TRUST_CFG_KEY_ADD TRUST_CFG_KEY_DEL 
     130 
     131 
     132## Inputs/Outputs 
     133## -------------- 
     134 
     135[ -z "${TRUST_IO_XIOS}" ] && get_out X 
     136export TRUST_IO_XIOS TRUST_IO_FORC_PATH 
     137export TRUST_IO_CDO 
     138 
    21139 
    22140## Compilation & Running 
     141##---------------------- 
     142 
    23143export TRUST_JOB_ENV 
    24144export TRUST_COMPILE_FORTRAN TRUST_COMPILE_NPROC 
     
    27147export TRUST_JOB_STATE  TRUST_JOB_KILL   TRUST_JOB_TIMEOUT 
    28148export TRUST_JOB_INFO   TRUST_JOB_TIME   TRUST_JOB_RAM_P   TRUST_JOB_RAM_V 
    29 export TRUST_CDO 
     149 
    30150 
    31151## Trusting test 
     152##-------------- 
     153 
    32154export TRUST_TEST_NAME=${TRUST_MAIN_USER}'_'${TRUST_MAIN_HPCC} 
    33155export TRUST_TEST_DATE=$( date -u +"%Y%m%d%Z%H%M" ) 
     156 
    34157export TRUST_TEST_SUMMARY=trusting_${TRUST_TEST_DATE}_${TRUST_TEST_NAME}.txt 
    35 export TRUST_TEST_BACKUP=trusting_${TRUST_TEST_DATE}_${TRUST_TEST_NAME}.tgz 
    36 export TRUST_TEST_LOG=${TRUST_DIR_STORE}/trusting_${TRUST_TEST_NAME}.txt 
     158export  TRUST_TEST_BACKUP=trusting_${TRUST_TEST_DATE}_${TRUST_TEST_NAME}.tgz 
     159 
     160##       TRUST_TEST_DIR unset 
     161if [[ ! ${TRUST_TEST_DIR}       && ${TRUST_TEST_DIR-_}       ]]; then 
     162        TRUST_TEST_DIR=${TRUST_DIR_SCRATCH}/${TRUST_CFG_REF}/${TRUST_SVN_BRANCH}/${TRUST_TEST_DATE} 
     163    export TRUST_TEST_DIR 
     164fi 
     165 
     166## TRUST_TEST_BENCHMARK unset 
     167if [[ ! ${TRUST_TEST_BENCHMARK} && ${TRUST_TEST_BENCHMARK-_} ]]; then 
     168    TRUST_TEST_BENCHMARK=${TRUST_DIR_STORE}/${TRUST_CFG_REF}/${TRUST_SVN_BRANCH} 
     169    export TRUST_TEST_BENCHMARK 
     170fi 
     171 
     172export TRUST_TEST_LOG=${TRUST_DIR_BENCHMARK}/trusting_${TRUST_TEST_NAME}.txt 
     173 
    37174export TRUST_TEST_MAILING 
Note: See TracChangeset for help on using the changeset viewer.