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 2158 for branches/DEV_r1879_FCM – NEMO

Ignore:
Timestamp:
2010-10-05T15:30:03+02:00 (14 years ago)
Author:
rblod
Message:

FCM branch, improve clean option

Location:
branches/DEV_r1879_FCM/NEMOGCM
Files:
1 added
3 edited

Legend:

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

    r2143 r2158  
    169169#- Choose a default configuration if needed --- 
    170170#- ORCA2_LIM or last one used --- 
    171 . ${COMPIL_DIR}/Fcheck_config.sh ${NEW_CONF} || exit  
     171. ${COMPIL_DIR}/Fcheck_config.sh cfg.txt ${NEW_CONF} || exit  
    172172 
    173173if [ ${#NEW_CONF} -eq 0 ] ; then 
     
    223223 
    224224if [ "${NBR_PRC}" -gt 0 ]; then 
    225 cd ${NEMO_TDIR}/${NEW_CONF} || cd - 
    226  
    227 #if AGRIF we do a first preprocessing 
    228 if [ ${#x_c} -eq 0 ]; then 
    229 [ "$AGRIFUSE" == 1 ] && fcm build --ignore-lock -s 2 ${COMPIL_DIR}/bld.cfg  
    230 [ "$AGRIFUSE" == 1 ] && rm -rf  ${NEMO_TDIR}/${NEW_CONF}/BLD/* 
    231 fi 
    232 fcm build ${x_c} --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld.cfg || cd - 
    233 [ -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 
    234 [ -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 
     225   cd ${NEMO_TDIR}/${NEW_CONF} || cd - 
     226 
     227   #if AGRIF we do a first preprocessing 
     228   if [ ${#x_c} -eq 0 ]; then 
     229      [ "$AGRIFUSE" == 1 ] && fcm build --ignore-lock -s 2 ${COMPIL_DIR}/bld.cfg  
     230      [ "$AGRIFUSE" == 1 ] && rm -rf  ${NEMO_TDIR}/${NEW_CONF}/BLD/* 
     231   fi 
     232   fcm build ${x_c} --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld.cfg || cd - 
     233   [ -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 
     234   [ -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 
    235235fi 
    236236 
  • branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/Fcheck_config.sh

    r2143 r2158  
    2626# :: 
    2727# 
    28 #  $ Fcheck_config.sh 
     28#  $ Fcheck_config.sh FILENAME CONFNAME 
    2929# 
    3030# 
     
    3737# - Two cases 
    3838# - One is explicitely set 
    39 # - Nothing set, use the previous in use (default ORA2_LIM) 
     39# - Nothing set, use the previous in use  
    4040# 
    4141# EXAMPLES 
     
    6565 
    6666declare -a ZTAB 
    67 if [ ${#1} -eq 0 ]; then 
    68    tail -1  ${COMPIL_DIR}/cfg.txt   > ${COMPIL_DIR}/cfg.tmp 
     67if [ ${#2} -eq 0 ]; then 
     68   tail -1  ${COMPIL_DIR}/$1  > ${COMPIL_DIR}/cfg.tmp 
    6969   read -a ZTAB < ${COMPIL_DIR}/cfg.tmp 
    7070   NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} ) 
     
    7676   echo "Using defaut configuration : ${NEW_CONF}" 
    7777fi 
    78 cat ${COMPIL_DIR}/cfg.txt | grep "${NEW_CONF} " > ${COMPIL_DIR}/cfg.tmp 
    79 read -a ZTAB < ${COMPIL_DIR}/cfg.tmp 
    80 NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} ) 
    81 \rm ${COMPIL_DIR}/cfg.tmp 
     78if [ "$1" == cfg.txt ]; then 
     79   cat ${COMPIL_DIR}/$1 | grep "${NEW_CONF} " > ${COMPIL_DIR}/cfg.tmp 
     80   read -a ZTAB < ${COMPIL_DIR}/cfg.tmp 
     81   NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} ) 
     82   \rm ${COMPIL_DIR}/cfg.tmp 
     83fi 
    8284 
    8385unset -v ZTAB 
  • branches/DEV_r1879_FCM/NEMOGCM/TOOLS/maketools

    r2143 r2158  
    145145. ${COMPIL_DIR}/Fcheck_archfile.sh arch_tools.fcm ${CMP_NAM} || exit 
    146146 
    147 #- Mak the building directory 
     147#- Choose a default tool if needed --- 
     148#- REBUILD or last one used --- 
     149. ${COMPIL_DIR}/Fcheck_config.sh tools.txt ${NEW_CONF} || exit 
     150 
     151#- Save new configuration --- 
     152echo "${NEW_CONF} "  > ${COMPIL_DIR}/tools.txt 
     153 
     154#- Make the building directory 
    148155. ${COMPIL_DIR}/Fmake_bld.sh ${TOOLS_DIR} ${NEW_CONF} ${NEMO_TDIR} || exit 
    149156 
     
    159166 
    160167fcm build ${x_c} --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld_tools.cfg || cd - 
     168if [ -f ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/*.exe ]; then 
    161169for i in `ls ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/*.exe` 
    162170   do 
    163    ln -sf ${i}  ${TOOLS_DIR}/${NEW_CONF}/. 
     171      ln -sf ${i}  ${TOOLS_DIR}/${NEW_CONF}/. 
    164172   done 
    165173fi 
    166  
     174fi 
    167175#- 
    168176#- Come back to original directory --- 
Note: See TracChangeset for help on using the changeset viewer.