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

Changeset 2136


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

add compilation of tools like rebuild or nesting tools

Location:
branches/DEV_r1879_FCM/NEMOGCM
Files:
60 added
2 edited
18 moved

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 
  • branches/DEV_r1879_FCM/NEMOGCM/EXTERNAL/IOIPSL/tools/rebuild

    r1993 r2136  
    9999# Create the output file 
    100100#- 
    101 ${d_n}/flio_rbld < tmp.$$ 
     101${d_n}/flio_rbld.exe < tmp.$$ 
    102102r_c=$? 
    103103#- 
  • branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/Fcheck_archfile.sh

    r2135 r2136  
    3838# :: 
    3939# 
    40 #  $ ./Fcheck_archfile.sh COMPILER 
     40#  $ ./Fcheck_archfile.sh ARCHFILE COMPILER 
    4141# 
    4242# 
     
    5959#- 
    6060 
    61 if [ ${#1} -eq 0 ]; then 
    62    if [ ! -f ${TOOLS_DIR}/arch.fcm ]; then 
     61if [ ${#2} -eq 0 ]; then 
     62   if [ ! -f ${COMPIL_DIR}/$1 ]; then 
    6363   echo "Warning !!!" 
    6464   echo "NO compiler chosen" 
     
    6868   fi 
    6969else 
    70    ln -sf ${MAIN_DIR}/ARCH/arch-${1}.fcm ${TOOLS_DIR}/arch.fcm 
     70   ln -sf ${MAIN_DIR}/ARCH/arch-${2}.fcm ${COMPIL_DIR}/$1 
    7171fi 
  • branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/Fcheck_config.sh

    r2135 r2136  
    6767declare -a ZTAB 
    6868if [ ${#1} -eq 0 ]; then 
    69    tail -1  ${TOOLS_DIR}/cfg.txt > ${TOOLS_DIR}/cfg.tmp 
    70    read -a ZTAB < ${TOOLS_DIR}/cfg.tmp 
     69   tail -1  ${COMPIL_DIR}/cfg.txt   > ${COMPIL_DIR}/cfg.tmp 
     70   read -a ZTAB < ${COMPIL_DIR}/cfg.tmp 
    7171   NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} ) 
    72    \rm ${TOOLS_DIR}/cfg.tmp 
     72   \rm ${COMPIL_DIR}/cfg.tmp 
    7373   echo "Warning !!!" 
    7474   echo "No configuration specified" 
     
    7777   echo "Using defaut configuration : ${NEW_CONF}" 
    7878fi 
    79 cat ${TOOLS_DIR}/cfg.txt | grep "${NEW_CONF} " > ${TOOLS_DIR}/cfg.tmp 
    80 read -a ZTAB < ${TOOLS_DIR}/cfg.tmp 
     79cat ${COMPIL_DIR}/cfg.txt | grep "${NEW_CONF} " > ${COMPIL_DIR}/cfg.tmp 
     80read -a ZTAB < ${COMPIL_DIR}/cfg.tmp 
    8181NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} ) 
    82 \rm ${TOOLS_DIR}/cfg.tmp 
     82\rm ${COMPIL_DIR}/cfg.tmp 
    8383 
    8484unset -v ZTAB 
  • branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/Fclean_var.sh

    r2135 r2136  
    6565unset -v CONFIG_DIR 
    6666unset -v TOOLS_DIR 
     67unset -v COMPIL_DIR 
    6768unset -v NEMO_DIR 
  • branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/Fcopy_dir.sh

    r2135 r2136  
    5656 
    5757declare -a ZTAB 
    58 grep "$1 " ${TOOLS_DIR}/cfg.txt > ${TOOLS_DIR}/cfg.tmp 
    59 read -a ZTAB < ${TOOLS_DIR}/cfg.tmp 
     58grep "$1 " ${COMPIL_DIR}/cfg.txt > ${COMPIL_DIR}/cfg.tmp 
     59read -a ZTAB < ${COMPIL_DIR}/cfg.tmp 
    6060TAB=( ${ZTAB[@]:1} ) 
    61 \rm ${TOOLS_DIR}/cfg.tmp 
     61\rm ${COMPIL_DIR}/cfg.tmp 
    6262 
    6363unset -v ZTAB 
  • branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/Fmake_bld.sh

    r2135 r2136  
    3636# :: 
    3737# 
    38 #  $ ./Fmake_bld.sh CONFIG_NAME  TMP_DIR 
     38#  $ ./Fmake_bld.sh CONFIG_DIR CONFIG_NAME  TMP_DIR 
    3939# 
    4040# 
     
    5656# 
    5757#- 
    58 [ ! -d ${2}/${1} ] && \mkdir   ${2}/${1} 
    59 [ ! -d ${2}/${1}/BLD ] && \mkdir  ${2}/${1}/BLD 
    60 [ ! -d ${CONFIG_DIR}/${1}/BLD ]   && ln -sf ${2}/${1}/BLD ${CONFIG_DIR}/${1}/BLD 
    61 ln -sf ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm ${TOOLS_DIR}/cpp.fcm 
    62 rm -f  ${CONFIG_DIR}/${NEW_CONF}/BLD/fcm.bld.lock 
     58[ ! -d ${3}/${2} ] && \mkdir   ${3}/${2} 
     59[ ! -d ${3}/${2}/BLD ] && \mkdir  ${3}/${2}/BLD 
     60[ ! -d ${1}/${2}/BLD ]   && ln -sf ${3}/${2}/BLD ${1}/${2}/BLD 
     61[ -f ${1}/${NEW_CONF}/cpp_${NEW_CONF}.fcm ] && ln -sf ${1}/${NEW_CONF}/cpp_${NEW_CONF}.fcm ${COMPIL_DIR}/cpp.fcm 
     62rm -f  ${1}/${NEW_CONF}/BLD/fcm.bld.lock 
  • branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/agrifpp.sh

    r2135 r2136  
    66#+ 
    77# 
    8 #inc $MAIN_DIR/TOOLS/arch.fcm 
    98 
    109# ========== 
  • branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/bld.cfg

    r2135 r2136  
    88# ------------------------------------------------------------------------------ 
    99 
    10 inc $MAIN_DIR/TOOLS/arch.fcm 
    11 inc $MAIN_DIR/TOOLS/cpp.fcm 
     10inc $COMPIL_DIR/arch_nemo.fcm 
     11inc $COMPIL_DIR/cpp.fcm 
    1212 
    1313search_src           1 
     
    5252bld::pp::nemo     1 
    5353bld::pp::agrif    1 
    54 bld::tool::fpp       $TOOLS_DIR/agrifpp.sh 
     54bld::tool::fpp       $COMPIL_DIR/agrifpp.sh 
    5555bld::tool::fppflags::nemo ${AGRIFUSE} %FPPFLAGS 
    5656bld::tool::fppflags::xmlio    0 %FPPFLAGS 
  • branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/conv.cfg

    r2135 r2136  
    88# Build information 
    99# ------------------------------------------------------------------------------ 
    10 inc $MAIN_DIR/TOOLS/arch.fcm 
     10inc $COMPIL_DIR/arch.fcm 
    1111 
    1212bld::tool::make      %MK 
Note: See TracChangeset for help on using the changeset viewer.