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

Ignore:
Timestamp:
2010-10-04T14:49:55+02:00 (14 years ago)
Author:
rblod
Message:

Improvement of FCM branch

File:
1 edited

Legend:

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

    • Property svn:keywords set to Id
    r2136 r2143  
    7272# 
    7373# 
    74 # - rblod 2010-06-20T16:11:47Z 
    7574# 
    7675#   * creation 
     
    9897x_m=""; 
    9998x_t=""; 
     99x_c=""; 
    100100x_j=1; 
    101 while getopts :hld:n:r:m:j:t: V 
     101while getopts :hd:n:r:m:j:t: V 
    102102  do 
    103103    case $V in 
    104104      (h)  echo "Usage   : "${b_n} \ 
    105                 " [-h] [-l] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-j No]"; 
     105                " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-j No]"; 
    106106           echo " -h  : help"; 
    107            echo " -l  : list existing configurations"; 
    108            echo " -n name : config name"; 
    109            echo " -m arch : choose machine"; 
     107           echo " -n name : config name, [-n help] to list existing configurations"; 
     108           echo " -m arch : choose compiler, [-m help] to list exiting compilers"; 
    110109           echo " -d dir  : choose NEMO sub-directories"; 
    111110           echo " -r conf : choose reference configuration"; 
     
    117116           echo "makenemo -n MY_CONFIG -d \"OPA_SRC LIM_SRC_2\""; 
    118117           echo ""; 
    119            echo "Defaults    : "; 
     118                          echo "Available configurations :"; cat ${COMPIL_DIR}/cfg.txt;  
    120119           echo ""; 
     120                          . ${COMPIL_DIR}/Flist_archfile.sh  ; 
     121                          echo ""; 
     122                          echo "Default : previous configuration and compiler"; 
    121123           exit 0;; 
    122124      (d)  x_d=${OPTARG};; 
     
    126128      (j)  x_j=${OPTARG};; 
    127129      (t)  x_t=${OPTARG};; 
    128       (l)  echo "Available configurations :"; cat ${COMPIL_DIR}/cfg.txt; exit;; 
    129130      (:)  echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; 
    130131           exit 2;; 
     
    134135  done 
    135136shift $(($OPTIND-1)); 
     137 
     138#- 
     139#- Get the clean option 
     140[[ "${#@}" -ne 0 && "${@}" != clean ]] && echo "Invalid option "$@" " && exit 
     141[ "${#@}" -ne 0 ] && x_c="--$@" 
    136142 
    137143#- 
     
    148154NEMO_TDIR=${x_t:-$NEMO_TDIR} 
    149155export NEMO_TDIR=${NEMO_TDIR:-$CONFIG_DIR} 
     156 
     157#- Check if the tool or the compiler exist or list it 
     158if [ "${NEW_CONF}" == help ] ; then 
     159 echo "Available configurations :"  
     160 cat ${COMPIL_DIR}/cfg.txt 
     161exit 
     162fi 
     163[ "${CMP_NAM}" ==  help ] && . ${COMPIL_DIR}/Flist_archfile.sh && exit 
    150164 
    151165#- When used for the first time, choose a compiler --- 
     
    212226 
    213227#if AGRIF we do a first preprocessing 
     228if [ ${#x_c} -eq 0 ]; then 
    214229[ "$AGRIFUSE" == 1 ] && fcm build --ignore-lock -s 2 ${COMPIL_DIR}/bld.cfg  
    215230[ "$AGRIFUSE" == 1 ] && rm -rf  ${NEMO_TDIR}/${NEW_CONF}/BLD/* 
    216 fcm build --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld.cfg || cd - 
     231fi 
     232fcm build ${x_c} --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld.cfg || cd - 
    217233[ -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 
    218234[ -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.