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 3198 for branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/CONFIG – NEMO

Ignore:
Timestamp:
2011-12-07T15:53:38+01:00 (12 years ago)
Author:
rblod
Message:

Add new functionalities to makenemo, see ticket #894

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/CONFIG/makenemo

    r2731 r3198  
    8989export TOOLS_DIR=${MAIN_DIR}/TOOLS 
    9090export COMPIL_DIR=${MAIN_DIR}/TOOLS/COMPILE 
    91 export NEMO_DIR=${MAIN_DIR}/NEMO 
     91export NEMO_DIR=${MAIN_DIR}/${x_s} 
    9292export AGRIFUSE=10 
    9393 
     
    100100#- Choice of the options --- 
    101101x_d=""; 
     102x_h=""; 
    102103x_n=""; 
    103104x_r=""; 
     
    106107x_c=""; 
    107108x_j=1; 
    108 while getopts :hd:n:r:m:j:t: V 
     109x_e="none"; 
     110x_s=NEMO; 
     111x_v=1; 
     112while getopts :hd:n:r:m:j:e:s:v:t: V 
    109113do 
    110114    case $V in 
    111    (h)  echo "Usage   : "${b_n} \ 
    112        " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-j No]"; 
    113    echo " -h    : help"; 
    114    echo " -n name : config name, [-n help] to list existing configurations"; 
    115    echo " -m arch : choose compiler, [-m help] to list existing compilers"; 
    116    echo " -d dir  : choose NEMO sub-directories"; 
    117    echo " -r conf : choose reference configuration"; 
    118    echo " -j No    : number of processes used to compile (0=nocompilation)"; 
    119    echo " -t dir  : temporary directory for compilation" 
     115   (h) x_h=${OPTARG}; 
     116        echo "Usage   : "${b_n} \ 
     117       " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-s Path] [-e Path] [-j No] [-v No]"; 
     118   echo " -h           : help"; 
     119   echo " -h institute : specific help for consortium members"; 
     120   echo " -n name      : config name, [-n help] to list existing configurations"; 
     121   echo " -m arch      : choose compiler, [-m help] to list existing compilers"; 
     122   echo " -d dir       : choose NEMO sub-directories"; 
     123   echo " -r conf      : choose reference configuration"; 
     124    echo " -s Path      : choose alternative location for NEMO main directory"; 
     125    echo " -e Path      : choose alternative location for MY_SRC directory"; 
     126    echo " -j No        : number of processes used to compile (0=nocompilation)"; 
     127    echo " -v No        : set verbosity level for compilation [0-3]"; 
     128   echo " -t dir       : temporary directory for compilation" 
    120129   echo ""; 
    121130   echo "Example to install a new configuration MY_CONFIG"; 
     
    137146   echo "./makenemo -n MY_CONFIG -j0 add_key \"key_iomput key_mpp_mpi\" del_key \"key_agrif\" "; 
    138147   echo ""; 
    139    . ${COMPIL_DIR}/Flist_archfile.sh ; 
     148   . ${COMPIL_DIR}/Flist_archfile.sh ${x_h} ; 
    140149   echo ""; 
    141150   echo "Default : previous configuration and compiler"; 
     
    147156   (j)  x_j=${OPTARG};; 
    148157   (t)  x_t=${OPTARG};; 
     158    (e)  x_e=${OPTARG};; 
     159    (s)  x_s=${OPTARG};; 
     160    (v)  x_v=${OPTARG};; 
    149161   (:)  echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; 
    150162   exit 2;; 
     
    205217    exit 
    206218fi 
    207 [ "${CMP_NAM}" ==  help ] && . ${COMPIL_DIR}/Flist_archfile.sh && exit 
     219[ "${CMP_NAM}" ==  help ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit 
    208220 
    209221#- When used for the first time, choose a compiler --- 
     
    250262#- Clean links and librairies --- 
    251263#- Creating the good links, at first on OPA_SRC --- 
    252 . ${COMPIL_DIR}/Fmake_WORK.sh ${NEW_CONF} ${TAB[*]} || exit 
     264. ${COMPIL_DIR}/Fmake_WORK.sh ${x_e} ${NEW_CONF} ${TAB[*]} || exit 
    253265 
    254266. ${COMPIL_DIR}/Fmake_bld.sh ${CONFIG_DIR} ${NEW_CONF}  ${NEMO_TDIR} || exit 
     
    290302        [ "$AGRIFUSE" == 1 ] && rm -rf  ${NEMO_TDIR}/${NEW_CONF}/BLD/* 
    291303    fi 
    292     fcm build ${x_c} --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/$USEBLD || cd - 
     304    fcm build ${x_c} --ignore-lock -v ${x_v} -j ${NBR_PRC} ${COMPIL_DIR}/$USEBLD || cd - 
    293305    [ -f ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe ] && ln -sf ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe  ${CONFIG_DIR}/${NEW_CONF}/EXP00/opa 
    294306    [ -f ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/server.exe ] && ln -sf ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/server.exe  ${CONFIG_DIR}/${NEW_CONF}/EXP00/server.exe 
Note: See TracChangeset for help on using the changeset viewer.