Changeset 2136
- Timestamp:
- 2010-09-29T22:56:44+02:00 (14 years ago)
- 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 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 -
branches/DEV_r1879_FCM/NEMOGCM/EXTERNAL/IOIPSL/tools/rebuild
r1993 r2136 99 99 # Create the output file 100 100 #- 101 ${d_n}/flio_rbld < tmp.$$101 ${d_n}/flio_rbld.exe < tmp.$$ 102 102 r_c=$? 103 103 #- -
branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/Fcheck_archfile.sh
r2135 r2136 38 38 # :: 39 39 # 40 # $ ./Fcheck_archfile.sh COMPILER40 # $ ./Fcheck_archfile.sh ARCHFILE COMPILER 41 41 # 42 42 # … … 59 59 #- 60 60 61 if [ ${# 1} -eq 0 ]; then62 if [ ! -f ${ TOOLS_DIR}/arch.fcm]; then61 if [ ${#2} -eq 0 ]; then 62 if [ ! -f ${COMPIL_DIR}/$1 ]; then 63 63 echo "Warning !!!" 64 64 echo "NO compiler chosen" … … 68 68 fi 69 69 else 70 ln -sf ${MAIN_DIR}/ARCH/arch-${ 1}.fcm ${TOOLS_DIR}/arch.fcm70 ln -sf ${MAIN_DIR}/ARCH/arch-${2}.fcm ${COMPIL_DIR}/$1 71 71 fi -
branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/Fcheck_config.sh
r2135 r2136 67 67 declare -a ZTAB 68 68 if [ ${#1} -eq 0 ]; then 69 tail -1 ${ TOOLS_DIR}/cfg.txt > ${TOOLS_DIR}/cfg.tmp70 read -a ZTAB < ${ TOOLS_DIR}/cfg.tmp69 tail -1 ${COMPIL_DIR}/cfg.txt > ${COMPIL_DIR}/cfg.tmp 70 read -a ZTAB < ${COMPIL_DIR}/cfg.tmp 71 71 NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} ) 72 \rm ${ TOOLS_DIR}/cfg.tmp72 \rm ${COMPIL_DIR}/cfg.tmp 73 73 echo "Warning !!!" 74 74 echo "No configuration specified" … … 77 77 echo "Using defaut configuration : ${NEW_CONF}" 78 78 fi 79 cat ${ TOOLS_DIR}/cfg.txt | grep "${NEW_CONF} " > ${TOOLS_DIR}/cfg.tmp80 read -a ZTAB < ${ TOOLS_DIR}/cfg.tmp79 cat ${COMPIL_DIR}/cfg.txt | grep "${NEW_CONF} " > ${COMPIL_DIR}/cfg.tmp 80 read -a ZTAB < ${COMPIL_DIR}/cfg.tmp 81 81 NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} ) 82 \rm ${ TOOLS_DIR}/cfg.tmp82 \rm ${COMPIL_DIR}/cfg.tmp 83 83 84 84 unset -v ZTAB -
branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/Fclean_var.sh
r2135 r2136 65 65 unset -v CONFIG_DIR 66 66 unset -v TOOLS_DIR 67 unset -v COMPIL_DIR 67 68 unset -v NEMO_DIR -
branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/Fcopy_dir.sh
r2135 r2136 56 56 57 57 declare -a ZTAB 58 grep "$1 " ${ TOOLS_DIR}/cfg.txt > ${TOOLS_DIR}/cfg.tmp59 read -a ZTAB < ${ TOOLS_DIR}/cfg.tmp58 grep "$1 " ${COMPIL_DIR}/cfg.txt > ${COMPIL_DIR}/cfg.tmp 59 read -a ZTAB < ${COMPIL_DIR}/cfg.tmp 60 60 TAB=( ${ZTAB[@]:1} ) 61 \rm ${ TOOLS_DIR}/cfg.tmp61 \rm ${COMPIL_DIR}/cfg.tmp 62 62 63 63 unset -v ZTAB -
branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/Fmake_bld.sh
r2135 r2136 36 36 # :: 37 37 # 38 # $ ./Fmake_bld.sh CONFIG_ NAME TMP_DIR38 # $ ./Fmake_bld.sh CONFIG_DIR CONFIG_NAME TMP_DIR 39 39 # 40 40 # … … 56 56 # 57 57 #- 58 [ ! -d ${ 2}/${1} ] && \mkdir ${2}/${1}59 [ ! -d ${ 2}/${1}/BLD ] && \mkdir ${2}/${1}/BLD60 [ ! -d ${ CONFIG_DIR}/${1}/BLD ] && ln -sf ${2}/${1}/BLD ${CONFIG_DIR}/${1}/BLD61 ln -sf ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm ${TOOLS_DIR}/cpp.fcm62 rm -f ${ CONFIG_DIR}/${NEW_CONF}/BLD/fcm.bld.lock58 [ ! -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 62 rm -f ${1}/${NEW_CONF}/BLD/fcm.bld.lock -
branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/agrifpp.sh
r2135 r2136 6 6 #+ 7 7 # 8 #inc $MAIN_DIR/TOOLS/arch.fcm9 8 10 9 # ========== -
branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/bld.cfg
r2135 r2136 8 8 # ------------------------------------------------------------------------------ 9 9 10 inc $ MAIN_DIR/TOOLS/arch.fcm11 inc $ MAIN_DIR/TOOLS/cpp.fcm10 inc $COMPIL_DIR/arch_nemo.fcm 11 inc $COMPIL_DIR/cpp.fcm 12 12 13 13 search_src 1 … … 52 52 bld::pp::nemo 1 53 53 bld::pp::agrif 1 54 bld::tool::fpp $ TOOLS_DIR/agrifpp.sh54 bld::tool::fpp $COMPIL_DIR/agrifpp.sh 55 55 bld::tool::fppflags::nemo ${AGRIFUSE} %FPPFLAGS 56 56 bld::tool::fppflags::xmlio 0 %FPPFLAGS -
branches/DEV_r1879_FCM/NEMOGCM/TOOLS/COMPILE/conv.cfg
r2135 r2136 8 8 # Build information 9 9 # ------------------------------------------------------------------------------ 10 inc $ MAIN_DIR/TOOLS/arch.fcm10 inc $COMPIL_DIR/arch.fcm 11 11 12 12 bld::tool::make %MK
Note: See TracChangeset
for help on using the changeset viewer.