Changeset 2136 for branches/DEV_r1879_FCM/NEMOGCM/CONFIG
- Timestamp:
- 2010-09-29T22:56:44+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DEV_r1879_FCM/NEMOGCM/CONFIG/makenemo
r2020 r2136 7 7 # 8 8 # =============== 9 # makenemo _fcm.sh9 # makenemo 10 10 # =============== 11 11 # … … 19 19 # :: 20 20 # 21 # $ makenemo _fcm.sh21 # $ makenemo 22 22 # 23 23 # … … 57 57 # :: 58 58 # 59 # $ ./makenemo _fcm-t ifort_osx - j3 -n ORCA2_LIM59 # $ ./makenemo -t ifort_osx - j3 -n ORCA2_LIM 60 60 # 61 61 # … … 83 83 export CONFIG_DIR=${MAIN_DIR}/CONFIG 84 84 export TOOLS_DIR=${MAIN_DIR}/TOOLS 85 export COMPIL_DIR=${MAIN_DIR}/TOOLS/COMPILE 85 86 export NEMO_DIR=${MAIN_DIR}/NEMO 86 87 export AGRIFUSE=10 … … 103 104 (h) echo "Usage : "${b_n} \ 104 105 " [-h] [-l] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-j No]"; 105 echo " -h 106 echo " -l 106 echo " -h : help"; 107 echo " -l : list existing configurations"; 107 108 echo " -n name : config name"; 108 109 echo " -m arch : choose machine"; … … 114 115 echo "Example to install a new configuration MY_CONFIG"; 115 116 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\""; 117 118 echo ""; 118 119 echo "Defaults : "; … … 125 126 (j) x_j=${OPTARG};; 126 127 (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;; 128 129 (:) echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; 129 130 exit 2;; … … 149 150 150 151 #- When used for the first time, choose a compiler --- 151 . ${ TOOLS_DIR}/Fcheck_archfile.sh${CMP_NAM} || exit152 . ${COMPIL_DIR}/Fcheck_archfile.sh arch_nemo.fcm ${CMP_NAM} || exit 152 153 153 154 #- 154 155 #- Choose a default configuration if needed --- 155 156 #- ORCA2_LIM or last one used --- 156 . ${ TOOLS_DIR}/Fcheck_config.sh ${NEW_CONF} || exit157 . ${COMPIL_DIR}/Fcheck_config.sh ${NEW_CONF} || exit 157 158 158 159 if [ ${#NEW_CONF} -eq 0 ] ; then … … 160 161 echo "You are installing a new configuration" 161 162 ind=0 162 . ${ TOOLS_DIR}/Fread_dir.sh OPA_SRC YES163 . ${ TOOLS_DIR}/Fread_dir.sh LIM_SRC_2 YES164 . ${ TOOLS_DIR}/Fread_dir.sh LIM_SRC_3 NO165 . ${ TOOLS_DIR}/Fread_dir.sh TOP_SRC NO166 . ${ TOOLS_DIR}/Fread_dir.sh C1D_SRC YES167 . ${ TOOLS_DIR}/Fread_dir.sh NST_SRC YES168 . ${ TOOLS_DIR}/Fread_dir.sh OFF_SRC NO163 . ${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 169 170 REF_CONF=ORCA2_LIM 170 171 elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -eq 0 ]; then … … 174 175 elif [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#REF_CONF} -gt 0 ]; then 175 176 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} 177 178 fi 178 179 NEW_CONF=${x_n} 179 . ${ TOOLS_DIR}/Fmake_config.sh ${NEW_CONF} ${REF_CONF}180 . ${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${REF_CONF} 180 181 else 181 sed -e "/${NEW_CONF} /d" ${ TOOLS_DIR}/cfg.txt > ${TOOLS_DIR}/cfg.tmp182 \mv ${ TOOLS_DIR}/cfg.tmp ${TOOLS_DIR}/cfg.txt182 sed -e "/${NEW_CONF} /d" ${COMPIL_DIR}/cfg.txt > ${COMPIL_DIR}/cfg.tmp 183 \mv ${COMPIL_DIR}/cfg.tmp ${COMPIL_DIR}/cfg.txt 183 184 fi 184 185 185 186 #- 186 187 #- Save new configuration and directories names --- 187 echo ${NEW_CONF} ${TAB[*]} >> ${ TOOLS_DIR}/cfg.txt188 echo ${NEW_CONF} ${TAB[*]} >> ${COMPIL_DIR}/cfg.txt 188 189 189 190 #- … … 191 192 #- Clean links and librairies --- 192 193 #- Creating the good links, at first on OPA_SRC --- 193 . ${ TOOLS_DIR}/Fmake_WORK.sh ${NEW_CONF} ${TAB[*]} || exit194 195 . ${ TOOLS_DIR}/Fmake_bld.sh${NEW_CONF} ${NEMO_TDIR} || exit194 . ${COMPIL_DIR}/Fmake_WORK.sh ${NEW_CONF} ${TAB[*]} || exit 195 196 . ${COMPIL_DIR}/Fmake_bld.sh ${CONFIG_DIR} ${NEW_CONF} ${NEMO_TDIR} || exit 196 197 197 198 #- At this stage the configuration has beeen chosen 198 199 #- We look after agrif 199 grep key_agrif ${ TOOLS_DIR}/cpp.fcm && export AGRIFUSE=1200 . ${ TOOLS_DIR}/Fprep_agrif.sh ${NEW_CONF} ${NEMO_TDIR} || exit200 grep key_agrif ${COMPIL_DIR}/cpp.fcm && export AGRIFUSE=1 201 . ${COMPIL_DIR}/Fprep_agrif.sh ${NEW_CONF} ${NEMO_TDIR} || exit 201 202 202 203 #- … … 211 212 212 213 #if AGRIF we do a first preprocessing 213 [ "$AGRIFUSE" == 1 ] && fcm build --ignore-lock -s 2 ${ TOOLS_DIR}/bld.cfg214 [ "$AGRIFUSE" == 1 ] && fcm build --ignore-lock -s 2 ${COMPIL_DIR}/bld.cfg 214 215 [ "$AGRIFUSE" == 1 ] && rm -rf ${NEMO_TDIR}/${NEW_CONF}/BLD/* 215 fcm build --ignore-lock -v 1 -j ${NBR_PRC} ${ TOOLS_DIR}/bld.cfg || cd -216 fcm build --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld.cfg || cd - 216 217 [ -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 217 218 [ -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 … … 224 225 #- 225 226 #- Unset variables 226 ${ TOOLS_DIR}/Fclean_var.sh227 ${COMPIL_DIR}/Fclean_var.sh 227 228 228 229
Note: See TracChangeset
for help on using the changeset viewer.