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 2136 for branches/DEV_r1879_FCM/NEMOGCM/CONFIG – NEMO

Ignore:
Timestamp:
2010-09-29T22:56:44+02:00 (14 years ago)
Author:
rblod
Message:

add compilation of tools like rebuild or nesting tools

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_r1879_FCM/NEMOGCM/CONFIG/makenemo

    r2020 r2136  
    77# 
    88# =============== 
    9 # makenemo_fcm.sh 
     9# makenemo 
    1010# =============== 
    1111# 
     
    1919# :: 
    2020# 
    21 #  $ makenemo_fcm.sh 
     21#  $ makenemo 
    2222# 
    2323# 
     
    5757# :: 
    5858# 
    59 #  $ ./makenemo_fcm -t ifort_osx - j3 -n ORCA2_LIM 
     59#  $ ./makenemo -t ifort_osx - j3 -n ORCA2_LIM 
    6060# 
    6161# 
     
    8383export CONFIG_DIR=${MAIN_DIR}/CONFIG 
    8484export TOOLS_DIR=${MAIN_DIR}/TOOLS 
     85export COMPIL_DIR=${MAIN_DIR}/TOOLS/COMPILE 
    8586export NEMO_DIR=${MAIN_DIR}/NEMO 
    8687export AGRIFUSE=10 
     
    103104      (h)  echo "Usage   : "${b_n} \ 
    104105                " [-h] [-l] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-j No]"; 
    105            echo " -h    : help"; 
    106            echo " -l    : list existing configurations"; 
     106           echo " -h  : help"; 
     107           echo " -l  : list existing configurations"; 
    107108           echo " -n name : config name"; 
    108109           echo " -m arch : choose machine"; 
     
    114115           echo "Example to install a new configuration MY_CONFIG"; 
    115116           echo "with OPA_SRC and LIM_SRC_2 "; 
    116            echo "makenemo_fcm -n MY_CONFIG -d \"OPA_SRC LIM_SRC_2\""; 
     117           echo "makenemo -n MY_CONFIG -d \"OPA_SRC LIM_SRC_2\""; 
    117118           echo ""; 
    118119           echo "Defaults    : "; 
     
    125126      (j)  x_j=${OPTARG};; 
    126127      (t)  x_t=${OPTARG};; 
    127       (l)  echo "Available configurations :"; cat ${TOOLS_DIR}/cfg.txt; exit;; 
     128      (l)  echo "Available configurations :"; cat ${COMPIL_DIR}/cfg.txt; exit;; 
    128129      (:)  echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; 
    129130           exit 2;; 
     
    149150 
    150151#- When used for the first time, choose a compiler --- 
    151 . ${TOOLS_DIR}/Fcheck_archfile.sh ${CMP_NAM} || exit 
     152. ${COMPIL_DIR}/Fcheck_archfile.sh arch_nemo.fcm ${CMP_NAM} || exit 
    152153 
    153154#- 
    154155#- Choose a default configuration if needed --- 
    155156#- ORCA2_LIM or last one used --- 
    156 . ${TOOLS_DIR}/Fcheck_config.sh ${NEW_CONF} || exit  
     157. ${COMPIL_DIR}/Fcheck_config.sh ${NEW_CONF} || exit  
    157158 
    158159if [ ${#NEW_CONF} -eq 0 ] ; then 
     
    160161      echo "You are  installing a new configuration" 
    161162      ind=0 
    162       . ${TOOLS_DIR}/Fread_dir.sh OPA_SRC YES  
    163       . ${TOOLS_DIR}/Fread_dir.sh LIM_SRC_2   YES  
    164       . ${TOOLS_DIR}/Fread_dir.sh LIM_SRC_3    NO   
    165       . ${TOOLS_DIR}/Fread_dir.sh TOP_SRC  NO   
    166       . ${TOOLS_DIR}/Fread_dir.sh C1D_SRC YES  
    167       . ${TOOLS_DIR}/Fread_dir.sh NST_SRC YES  
    168       . ${TOOLS_DIR}/Fread_dir.sh OFF_SRC  NO   
     163      . ${COMPIL_DIR}/Fread_dir.sh OPA_SRC   YES  
     164      . ${COMPIL_DIR}/Fread_dir.sh LIM_SRC_2   YES  
     165      . ${COMPIL_DIR}/Fread_dir.sh LIM_SRC_3    NO   
     166      . ${COMPIL_DIR}/Fread_dir.sh TOP_SRC    NO   
     167      . ${COMPIL_DIR}/Fread_dir.sh C1D_SRC   YES  
     168      . ${COMPIL_DIR}/Fread_dir.sh NST_SRC   YES  
     169      . ${COMPIL_DIR}/Fread_dir.sh OFF_SRC    NO   
    169170      REF_CONF=ORCA2_LIM 
    170171   elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -eq 0 ]; then 
     
    174175   elif [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#REF_CONF} -gt 0 ]; then 
    175176      echo "You are  installing a new configuration based on ${REF_CONF}" 
    176       . ${TOOLS_DIR}/Fcopy_dir.sh ${REF_CONF}   
     177      . ${COMPIL_DIR}/Fcopy_dir.sh ${REF_CONF}   
    177178   fi 
    178179   NEW_CONF=${x_n} 
    179     . ${TOOLS_DIR}/Fmake_config.sh ${NEW_CONF} ${REF_CONF} 
     180    . ${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${REF_CONF} 
    180181else 
    181    sed -e "/${NEW_CONF} /d"  ${TOOLS_DIR}/cfg.txt >  ${TOOLS_DIR}/cfg.tmp 
    182    \mv  ${TOOLS_DIR}/cfg.tmp  ${TOOLS_DIR}/cfg.txt 
     182   sed -e "/${NEW_CONF} /d"  ${COMPIL_DIR}/cfg.txt >  ${COMPIL_DIR}/cfg.tmp 
     183   \mv  ${COMPIL_DIR}/cfg.tmp  ${COMPIL_DIR}/cfg.txt 
    183184fi 
    184185 
    185186#- 
    186187#- Save new configuration and directories names --- 
    187 echo ${NEW_CONF} ${TAB[*]} >> ${TOOLS_DIR}/cfg.txt 
     188echo ${NEW_CONF} ${TAB[*]} >> ${COMPIL_DIR}/cfg.txt 
    188189 
    189190#- 
     
    191192#- Clean links and librairies --- 
    192193#- Creating the good links, at first on OPA_SRC --- 
    193 . ${TOOLS_DIR}/Fmake_WORK.sh ${NEW_CONF} ${TAB[*]} || exit 
    194  
    195 . ${TOOLS_DIR}/Fmake_bld.sh ${NEW_CONF}  ${NEMO_TDIR} || exit 
     194. ${COMPIL_DIR}/Fmake_WORK.sh ${NEW_CONF} ${TAB[*]} || exit 
     195 
     196. ${COMPIL_DIR}/Fmake_bld.sh ${CONFIG_DIR} ${NEW_CONF}  ${NEMO_TDIR} || exit 
    196197 
    197198#- At this stage the configuration has beeen chosen 
    198199#- We look after agrif 
    199 grep key_agrif ${TOOLS_DIR}/cpp.fcm && export AGRIFUSE=1 
    200 . ${TOOLS_DIR}/Fprep_agrif.sh ${NEW_CONF} ${NEMO_TDIR} || exit 
     200grep key_agrif ${COMPIL_DIR}/cpp.fcm && export AGRIFUSE=1 
     201. ${COMPIL_DIR}/Fprep_agrif.sh ${NEW_CONF} ${NEMO_TDIR} || exit 
    201202 
    202203#- 
     
    211212 
    212213#if AGRIF we do a first preprocessing 
    213 [ "$AGRIFUSE" == 1 ] && fcm build --ignore-lock -s 2 ${TOOLS_DIR}/bld.cfg  
     214[ "$AGRIFUSE" == 1 ] && fcm build --ignore-lock -s 2 ${COMPIL_DIR}/bld.cfg  
    214215[ "$AGRIFUSE" == 1 ] && rm -rf  ${NEMO_TDIR}/${NEW_CONF}/BLD/* 
    215 fcm build --ignore-lock -v 1 -j ${NBR_PRC} ${TOOLS_DIR}/bld.cfg || cd - 
     216fcm build --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld.cfg || cd - 
    216217[ -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 
    217218[ -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 
     
    224225#- 
    225226#- Unset variables 
    226 ${TOOLS_DIR}/Fclean_var.sh 
     227${COMPIL_DIR}/Fclean_var.sh 
    227228 
    228229 
Note: See TracChangeset for help on using the changeset viewer.