Changeset 3198 for branches/2011/dev_NEMO_MERGE_2011
- Timestamp:
- 2011-12-07T15:53:38+01:00 (13 years ago)
- Location:
- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/ARCH/arch-gfortran_osx.fcm
r2490 r3198 15 15 16 16 17 %NCDF_INC -I/usr/local/ netcdf/include18 %NCDF_LIB -L/usr/local/ netcdf/lib -lnetcdf19 %FC gfortran17 %NCDF_INC -I/usr/local/pub/netcdf/4.0.1-gfortran/include 18 %NCDF_LIB -L/usr/local/pub/netcdf/4.0.1-gfortran/lib -lnetcdf 19 %FC mpif90 20 20 %FCFLAGS -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer 21 21 %FFLAGS %FCFLAGS 22 %LD gfortran22 %LD mpif90 23 23 %LDFLAGS 24 24 %FPPFLAGS -P -C -traditional -
branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/ARCH/arch-ifort_osx.fcm
r2370 r3198 15 15 16 16 17 %NCDF_INC -I/usr/local/ include18 %NCDF_LIB -L /usr/local/ lib -lnetcdf17 %NCDF_INC -I/usr/local/pub/netcdf/4.0.1-ifort/include 18 %NCDF_LIB -L /usr/local/pub/netcdf/4.0.1-ifort/lib -lnetcdf 19 19 %FC mpif90 20 20 %FCFLAGS -r8 -O3 -traceback -
branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/CONFIG/makenemo
r2731 r3198 89 89 export TOOLS_DIR=${MAIN_DIR}/TOOLS 90 90 export COMPIL_DIR=${MAIN_DIR}/TOOLS/COMPILE 91 export NEMO_DIR=${MAIN_DIR}/ NEMO91 export NEMO_DIR=${MAIN_DIR}/${x_s} 92 92 export AGRIFUSE=10 93 93 … … 100 100 #- Choice of the options --- 101 101 x_d=""; 102 x_h=""; 102 103 x_n=""; 103 104 x_r=""; … … 106 107 x_c=""; 107 108 x_j=1; 108 while getopts :hd:n:r:m:j:t: V 109 x_e="none"; 110 x_s=NEMO; 111 x_v=1; 112 while getopts :hd:n:r:m:j:e:s:v:t: V 109 113 do 110 114 case $V in 111 (h) echo "Usage : "${b_n} \ 112 " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-j No]"; 113 echo " -h : help"; 114 echo " -n name : config name, [-n help] to list existing configurations"; 115 echo " -m arch : choose compiler, [-m help] to list existing compilers"; 116 echo " -d dir : choose NEMO sub-directories"; 117 echo " -r conf : choose reference configuration"; 118 echo " -j No : number of processes used to compile (0=nocompilation)"; 119 echo " -t dir : temporary directory for compilation" 115 (h) x_h=${OPTARG}; 116 echo "Usage : "${b_n} \ 117 " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-s Path] [-e Path] [-j No] [-v No]"; 118 echo " -h : help"; 119 echo " -h institute : specific help for consortium members"; 120 echo " -n name : config name, [-n help] to list existing configurations"; 121 echo " -m arch : choose compiler, [-m help] to list existing compilers"; 122 echo " -d dir : choose NEMO sub-directories"; 123 echo " -r conf : choose reference configuration"; 124 echo " -s Path : choose alternative location for NEMO main directory"; 125 echo " -e Path : choose alternative location for MY_SRC directory"; 126 echo " -j No : number of processes used to compile (0=nocompilation)"; 127 echo " -v No : set verbosity level for compilation [0-3]"; 128 echo " -t dir : temporary directory for compilation" 120 129 echo ""; 121 130 echo "Example to install a new configuration MY_CONFIG"; … … 137 146 echo "./makenemo -n MY_CONFIG -j0 add_key \"key_iomput key_mpp_mpi\" del_key \"key_agrif\" "; 138 147 echo ""; 139 . ${COMPIL_DIR}/Flist_archfile.sh ;148 . ${COMPIL_DIR}/Flist_archfile.sh ${x_h} ; 140 149 echo ""; 141 150 echo "Default : previous configuration and compiler"; … … 147 156 (j) x_j=${OPTARG};; 148 157 (t) x_t=${OPTARG};; 158 (e) x_e=${OPTARG};; 159 (s) x_s=${OPTARG};; 160 (v) x_v=${OPTARG};; 149 161 (:) echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; 150 162 exit 2;; … … 205 217 exit 206 218 fi 207 [ "${CMP_NAM}" == help ] && . ${COMPIL_DIR}/Flist_archfile.sh && exit219 [ "${CMP_NAM}" == help ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit 208 220 209 221 #- When used for the first time, choose a compiler --- … … 250 262 #- Clean links and librairies --- 251 263 #- Creating the good links, at first on OPA_SRC --- 252 . ${COMPIL_DIR}/Fmake_WORK.sh ${ NEW_CONF} ${TAB[*]} || exit264 . ${COMPIL_DIR}/Fmake_WORK.sh ${x_e} ${NEW_CONF} ${TAB[*]} || exit 253 265 254 266 . ${COMPIL_DIR}/Fmake_bld.sh ${CONFIG_DIR} ${NEW_CONF} ${NEMO_TDIR} || exit … … 290 302 [ "$AGRIFUSE" == 1 ] && rm -rf ${NEMO_TDIR}/${NEW_CONF}/BLD/* 291 303 fi 292 fcm build ${x_c} --ignore-lock -v 1-j ${NBR_PRC} ${COMPIL_DIR}/$USEBLD || cd -304 fcm build ${x_c} --ignore-lock -v ${x_v} -j ${NBR_PRC} ${COMPIL_DIR}/$USEBLD || cd - 293 305 [ -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 294 306 [ -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 -
branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/TOOLS/COMPILE/Fcheck_archfile.sh
r2520 r3198 69 69 fi 70 70 else 71 ln -sf ${MAIN_DIR}/ARCH/arch-${2}.fcm ${COMPIL_DIR}/$1 71 if [ -f ${MAIN_DIR}/ARCH/arch-${2}.fcm ]; then 72 ln -sf ${MAIN_DIR}/ARCH/arch-${2}.fcm ${COMPIL_DIR}/$1 73 else 74 ln -sf ${MAIN_DIR}/ARCH/LOCAL/arch-${2}.fcm ${COMPIL_DIR}/$1 75 fi 72 76 fi -
branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/TOOLS/COMPILE/Fcheck_config.sh
r2520 r3198 39 39 # - Nothing set, use the previous in use 40 40 # 41 # We use TOOLS/CO MPILE/cfg.txt to check if the onfiguration exists.41 # We use TOOLS/CONFIG_DIR/cfg.txt to check if the onfiguration exists. 42 42 # 43 43 # EXAMPLES … … 68 68 declare -a ZTAB 69 69 if [ ${#2} -eq 0 ]; then 70 tail -1 ${CO MPIL_DIR}/$1 > ${COMPIL_DIR}/cfg.tmp71 read -a ZTAB < ${CO MPIL_DIR}/cfg.tmp70 tail -1 ${CONFIG_DIR}/$1 > ${CONFIG_DIR}/cfg.tmp 71 read -a ZTAB < ${CONFIG_DIR}/cfg.tmp 72 72 NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} ) 73 \rm ${CO MPIL_DIR}/cfg.tmp73 \rm ${CONFIG_DIR}/cfg.tmp 74 74 echo "Warning !!!" 75 75 echo "No configuration specified" … … 79 79 fi 80 80 if [ "$1" == cfg.txt ]; then 81 cat ${CO MPIL_DIR}/$1 | grep "${NEW_CONF} " > ${COMPIL_DIR}/cfg.tmp82 read -a ZTAB < ${CO MPIL_DIR}/cfg.tmp81 cat ${CONFIG_DIR}/$1 | grep "${NEW_CONF} " > ${CONFIG_DIR}/cfg.tmp 82 read -a ZTAB < ${CONFIG_DIR}/cfg.tmp 83 83 NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} ) 84 \rm ${CO MPIL_DIR}/cfg.tmp84 \rm ${CONFIG_DIR}/cfg.tmp 85 85 fi 86 86 -
branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/TOOLS/COMPILE/Fclean_config.sh
r2520 r3198 69 69 if [ -z "$answer" -o "x$answer" = "xy" ]; then 70 70 # testing if configuration exists 71 if [ "$(cat ${CO MPIL_DIR}/cfg.txt | grep "${NEW_CONF} ")" == "" ] ; then71 if [ "$(cat ${CONFIG_DIR}/cfg.txt | grep "${NEW_CONF} ")" == "" ] ; then 72 72 echo "The configuration ${NEW_CONF} does not exist in file cfg.txt" 73 73 echo "No removing configuration" … … 75 75 else 76 76 rm -rf ${CONFIG_DIR}/${NEW_CONF} 77 sed -e "/${NEW_CONF} /d" ${CO MPIL_DIR}/cfg.txt > ${COMPIL_DIR}/cfg.tmp78 mv ${CO MPIL_DIR}/cfg.tmp ${COMPIL_DIR}/cfg.txt77 sed -e "/${NEW_CONF} /d" ${CONFIG_DIR}/cfg.txt > ${CONFIG_DIR}/cfg.tmp 78 mv ${CONFIG_DIR}/cfg.tmp ${CONFIG_DIR}/cfg.txt 79 79 echo "${NEW_CONF} configuration REMOVED" 80 80 fi -
branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/TOOLS/COMPILE/Fcopy_dir.sh
r2520 r3198 55 55 56 56 declare -a ZTAB 57 grep "$1 " ${CO MPIL_DIR}/cfg.txt > ${COMPIL_DIR}/cfg.tmp58 read -a ZTAB < ${CO MPIL_DIR}/cfg.tmp57 grep "$1 " ${CONFIG_DIR}/cfg.txt > ${CONFIG_DIR}/cfg.tmp 58 read -a ZTAB < ${CONFIG_DIR}/cfg.tmp 59 59 TAB=( ${ZTAB[@]:1} ) 60 \rm ${CO MPIL_DIR}/cfg.tmp60 \rm ${CONFIG_DIR}/cfg.tmp 61 61 62 62 unset -v ZTAB -
branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/TOOLS/COMPILE/Flist_archfile.sh
r2520 r3198 19 19 # :: 20 20 # 21 # $ Flist_archfile.sh 21 # $ Flist_archfile.sh Institute 22 22 # 23 23 # … … 37 37 # $ ./Flist_archfile.sh 38 38 # 39 # $ ./Flist_archfile.sh CNRS 39 40 # 40 41 # TODO … … 54 55 # 55 56 #- 57 58 if [ -n "$2" ]; then 59 shift 60 fi 61 56 62 echo "Available compilers for -m option :" 57 for file in `ls ${MAIN_DIR}/ARCH`63 for file in $(ls ${MAIN_DIR}/ARCH | grep fcm ) 58 64 do 59 65 zvar1=${file#arch-} … … 62 68 printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}" 63 69 done 70 71 72 if [ "$1" == "all" ]; then 73 for dir in $(ls ${MAIN_DIR}/ARCH | grep -v fcm ) 74 do 75 echo "Available compilers at ${dir} :" 76 for file in $(ls ${MAIN_DIR}/ARCH/${dir} | grep fcm ) 77 do 78 zvar1=${file#arch-} 79 zvar2=$(head -1 ${MAIN_DIR}/ARCH/${dir}/$file) 80 #echo "${zvar1%.fcm} : ${zvar2#\#}" 81 printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}" 82 done 83 done 84 else 85 if [ -d ${MAIN_DIR}/ARCH/${1} ]; then 86 echo "Available compilers at $1 :" 87 for file in $(ls ${MAIN_DIR}/ARCH/$1 | grep fcm ) 88 do 89 zvar1=${file#arch-} 90 zvar2=$(head -1 ${MAIN_DIR}/ARCH/${1}/$file) 91 #echo "${zvar1%.fcm} : ${zvar2#\#}" 92 printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}" 93 done 94 fi 95 fi -
branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/TOOLS/COMPILE/Fmake_WORK.sh
r2520 r3198 64 64 # 65 65 #- 66 declare ZCONF=$1 ; shift 66 declare ZSRC=$1 ; shift 67 declare ZCONF=$1 ; shift 67 68 ZTAB=( $@ ) 68 69 declare i=0 ; declare NDIR=${#ZTAB[@]} 69 70 70 71 echo "Creating ${ZCONF}/WORK = ${ZTAB[*]} for ${ZCONF}" 71 echo ""72 72 73 73 [ ! -d ${ZCONF}/MY_SRC ] && \mkdir ${ZCONF}/MY_SRC 74 74 [ -d ${ZCONF}/WORK ] || \mkdir ${ZCONF}/WORK 75 76 if [ "${ZSRC}" != "none" ] ; then 77 if [ -d ${ZSRC} ] ; then 78 ln -sf ${ZSRC}/*.[Ffh]90 ${ZCONF}/MY_SRC/. 79 echo "MY_SRC content is linked to ${ZSRC}" 80 else 81 echo "External directory for MY_SRC does not exist. Using default." 82 fi 83 else 84 echo "MY_SRC directory is : ${ZCONF}/MY_SRC" 85 fi 75 86 76 87 \rm -f ../${1}/WORK/*
Note: See TracChangeset
for help on using the changeset viewer.