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 4837 – NEMO

Changeset 4837


Ignore:
Timestamp:
2014-11-07T12:42:21+01:00 (9 years ago)
Author:
acc
Message:

Branch 2014/dev_r4743_NOC2_ZTS. Added makenemo changes and associated COMPILE scripts to provide options for unsupported (external) configurations. This is not yet widely tested but should not interfer with existing options. See ticket #1367.

Location:
branches/2014/dev_r4743_NOC2_ZTS/NEMOGCM
Files:
4 added
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4743_NOC2_ZTS/NEMOGCM/CONFIG/makenemo

    r4148 r4837  
    4141# - CMP_NAM     : compiler name 
    4242# - NBR_PRC     : number of processes used to compile 
     43# - USP_CONF    : unsupported (external) configuration to build the new one  
    4344# - NEM_SUBDIR  : NEMO subdirectory used (specified) 
    4445# 
     
    5152# - TOOLS_DIR   :   "    "    " 
    5253# - NEMO_DIR    :   "    "    " 
     54# - REMOTE_CTL  : URL link to a remote resource list for an external configuration which is not part of the reference suite 
     55# - LOCAL_REF   : Nearest reference confoiguration to an external configuration which is not part of the reference suite 
     56#                 (used to populate work directories if remote access is not available) 
    5357# 
    5458# EXAMPLES 
     
    8387x_n=""; 
    8488x_r=""; 
     89x_u=""; 
    8590x_m=""; 
    8691x_t=""; 
     
    106111export AGRIFUSE=10 
    107112declare -a TAB 
     113declare -a REMOTE_CTL 
     114declare -a LOCAL_REF 
    108115list_key=0 
    109116chk_key=1 
     
    114121#- 
    115122#- Choice of the options --- 
    116 while getopts :hd:n:r:m:j:e:s:v:t:k: V 
     123while getopts :hd:n:r:u:m:j:e:s:v:t:k: V 
    117124do 
    118125    case $V in 
    119126   (h) x_h=${OPTARG}; 
    120127        echo "Usage   : "${b_n} \ 
    121        " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-s Path] [-e Path] [-j No] [-v No] [-k 0/1]"; 
     128       " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-u conf] [-s Path] [-e Path] [-j No] [-v No] [-k 0/1]"; 
    122129   echo " -h           : help"; 
    123130   echo " -h institute : specific help for consortium members"; 
     
    126133   echo " -d dir       : choose NEMO sub-directories"; 
    127134   echo " -r conf      : choose reference configuration"; 
     135   echo " -u conf      : choose an unsupported (external) configuration"; 
    128136        echo " -s Path      : choose alternative location for NEMO main directory"; 
    129137        echo " -e Path      : choose alternative location for MY_SRC directory"; 
     
    139147   echo "Available configurations :"; cat ${CONFIG_DIR}/cfg.txt; 
    140148   echo ""; 
     149        echo "Available unsupported (external) configurations :"; cat ${CONFIG_DIR}/uspcfg.txt; 
     150   echo ""; 
    141151   echo "Example to remove bad configuration "; 
    142152   echo "./makenemo -n MY_CONFIG clean_config"; 
     
    161171   (n)  x_n=${OPTARG};; 
    162172   (r)  x_r=${OPTARG};; 
     173   (u)  x_u=${OPTARG};; 
    163174   (m)  x_m=${OPTARG};; 
    164175   (j)  x_j=${OPTARG};; 
     
    220231NEM_SUBDIR=${x_d} 
    221232REF_CONF=${x_r} 
     233USP_CONF=${x_u} 
    222234NEMO_TDIR=${x_t:-$NEMO_TDIR} 
    223235export NEMO_TDIR=${NEMO_TDIR:-$CONFIG_DIR} 
     
    228240    echo "Available configurations :" 
    229241    cat ${CONFIG_DIR}/cfg.txt 
     242    echo 
     243    echo "Available unsupported (external) configurations :"  
     244    cat ${CONFIG_DIR}/uspcfg.txt 
    230245    exit 
    231246fi 
     
    238253 
    239254if [ ${#NEW_CONF} -eq 0 ] ; then 
    240     if [ ${#NEM_SUBDIR} -eq 0 -a ${#REF_CONF} -eq 0 ]; then 
    241    echo "You are  installing a new configuration" 
     255    if [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#REF_CONF} -eq 0 ] && [ ${#USP_CONF} -eq 0 ] ; then 
     256   echo "You are installing a new default (ORCA2_LIM) configuration" 
    242257   ind=0 
    243258   . ${COMPIL_DIR}/Fread_dir.sh OPA_SRC    YES 
     
    248263   . ${COMPIL_DIR}/Fread_dir.sh OFF_SRC    NO 
    249264   REF_CONF=ORCA2_LIM 
    250     elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -eq 0 ]; then 
    251    echo "You are  installing a new configuration" 
     265    elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -eq 0 ] && [ ${#USP_CONF} -eq 0 ] ; then 
     266   echo "You are  installing a new configuration based on ORCA2_LIM" 
    252267   TAB=( ${NEM_SUBDIR} ) 
    253268   REF_CONF=ORCA2_LIM 
     
    255270   echo "You are  installing a new configuration based on ${REF_CONF}" 
    256271   . ${COMPIL_DIR}/Fcopy_dir.sh ${REF_CONF} 
     272    elif [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#USP_CONF} -gt 0 ]; then 
     273   echo "You are  installing a new configuration based on the unsupported (external) ${USP_CONF}" 
     274   . ${COMPIL_DIR}/Fcopy_extdir.sh ${USP_CONF}   
     275        #echo "TTT " ${TAB} 
     276        #echo "RRR " ${REMOTE_CTL} 
     277        #echo "LLL " ${LOCAL_REF} 
    257278    fi 
    258279    NEW_CONF=${x_n} 
    259     . ${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${REF_CONF} 
     280 
     281    if [ ${#USP_CONF} -gt 0 ]; then 
     282      . ${COMPIL_DIR}/Fmake_extconfig.sh ${NEW_CONF} ${LOCAL_REF} 
     283      . ${COMPIL_DIR}/Ffetch_extdir.sh ${NEW_CONF} ${REMOTE_CTL}   
     284    else 
     285      . ${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${REF_CONF} 
     286    fi 
    260287else 
    261288    sed -e "/${NEW_CONF} /d"  ${CONFIG_DIR}/cfg.txt >  ${COMPIL_DIR}/cfg.tmp 
Note: See TracChangeset for help on using the changeset viewer.