Changeset 3294 for trunk/NEMOGCM/TOOLS
- Timestamp:
- 2012-01-28T17:44:18+01:00 (13 years ago)
- Location:
- trunk/NEMOGCM/TOOLS
- Files:
-
- 1 deleted
- 8 edited
- 6 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/TOOLS/COMPILE/Fcheck_archfile.sh
r2520 r3294 69 69 fi 70 70 else 71 ln -sf ${MAIN_DIR}/ARCH/arch-${2}.fcm ${COMPIL_DIR}/$1 71 myfile=$( find ${MAIN_DIR}/ARCH -name arch-${2}.fcm -print ) 72 if [ ${#myfile} -gt 0 ]; then 73 ln -sf ${myfile} ${COMPIL_DIR}/$1 74 else 75 echo "Warning !!!" 76 echo "Compiler not existing" 77 echo "Try makenemo -h for help" 78 echo "EXITING..." 79 exit 1 80 fi 72 81 fi -
trunk/NEMOGCM/TOOLS/COMPILE/Fcheck_config.sh
r2520 r3294 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 -
trunk/NEMOGCM/TOOLS/COMPILE/Fclean_config.sh
r2520 r3294 64 64 #- 65 65 NEW_CONF=${x_n} 66 echo "Are you sure that you want to remove this directory ? [y/n] " 67 read answer 68 answer=`echo $answer | sed 's/^[y].*$/y/'` 69 if [ -z "$answer" -o "x$answer" = "xy" ]; then 70 # testing if configuration exists 71 if [ "$(cat ${COMPIL_DIR}/cfg.txt | grep "${NEW_CONF} ")" == "" ] ; then 72 echo "The configuration ${NEW_CONF} does not exist in file cfg.txt" 73 echo "No removing configuration" 74 echo " " 66 if [ ${#NEW_CONF} -eq 0 ] ; then 67 echo " " 68 echo "No configuration specified, please use makenemo -n CONFIG clean_config " 69 else 70 echo "Are you sure that you want to remove this directory $NEW_CONF? [y/n] " 71 read answer 72 answer=`echo $answer | sed 's/^[y].*$/y/'` 73 if [ -z "$answer" -o "x$answer" = "xy" ]; then 74 # testing if configuration exists 75 if [ "$(cat ${CONFIG_DIR}/cfg.txt | grep "${NEW_CONF} ")" == "" ] ; then 76 echo "The configuration ${NEW_CONF} does not exist in file cfg.txt" 77 echo "No removing configuration" 78 echo " " 75 79 else 76 rm -rf ${CONFIG_DIR}/${NEW_CONF}77 sed -e "/${NEW_CONF} /d" ${COMPIL_DIR}/cfg.txt > ${COMPIL_DIR}/cfg.tmp78 mv ${COMPIL_DIR}/cfg.tmp ${COMPIL_DIR}/cfg.txt79 echo "${NEW_CONF} configuration REMOVED"80 rm -rf ${CONFIG_DIR}/${NEW_CONF} 81 sed -e "/${NEW_CONF} /d" ${CONFIG_DIR}/cfg.txt > ${CONFIG_DIR}/cfg.tmp 82 mv ${CONFIG_DIR}/cfg.tmp ${CONFIG_DIR}/cfg.txt 83 echo "${NEW_CONF} configuration REMOVED" 80 84 fi 81 else82 echo " "83 echo "nothing to remove"84 fi85 85 else 86 echo " " 87 echo "nothing to remove" 88 fi 89 fi 86 90 unset -v answer -
trunk/NEMOGCM/TOOLS/COMPILE/Fcopy_dir.sh
r2520 r3294 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 -
trunk/NEMOGCM/TOOLS/COMPILE/Flist_archfile.sh
r2520 r3294 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 elif [ -d ${MAIN_DIR}/ARCH/${1} ]; then 85 echo "Available compilers at $1 :" 86 for file in $(ls ${MAIN_DIR}/ARCH/$1 | grep fcm ) 87 do 88 zvar1=${file#arch-} 89 zvar2=$(head -1 ${MAIN_DIR}/ARCH/${1}/$file) 90 #echo "${zvar1%.fcm} : ${zvar2#\#}" 91 printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}" 92 done 93 else 94 echo "Available consortium member sub-directories :" 95 for dir in $(ls ${MAIN_DIR}/ARCH | grep -v fcm ) 96 do 97 echo ${dir} 98 done 99 echo "use \"makenemo -h all\" or \"makenemo -m help\" to see compilers available in member's sub-directories" 100 fi -
trunk/NEMOGCM/TOOLS/COMPILE/Fmake_WORK.sh
r2520 r3294 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/* -
trunk/NEMOGCM/TOOLS/SECTIONS_DIADCT/src/compute_sections.f90
r2951 r3294 370 370 DO WHILE ( ( sec%listPoint(jseg)%I .NE. endingPoint%I & 371 371 .OR. sec%listPoint(jseg)%J .NE. endingPoint%J ) & 372 .AND. jseg .LT. 500.AND. sec%listPoint(jseg)%I .GT. 0 )372 .AND. jseg .LT. nb_inmesh + 1 .AND. sec%listPoint(jseg)%I .GT. 0 ) 373 373 374 374 ! a. find the 4 adjacent points (North, South, East, West) -
trunk/NEMOGCM/TOOLS/maketools
r2331 r3294 84 84 #- 85 85 #- Choice of the options --- 86 x_h=""; 86 87 x_n=""; 87 88 x_m=""; … … 92 93 do 93 94 case $V in 94 (h) echo "Usage : "${b_n} \ 95 (h) x_h=${OPTARG}; 96 echo "Usage : "${b_n} \ 95 97 " [-h] [-n name] [-m arch] [-j No] [-t tmpdir]"; 96 98 echo " -h : help"; 99 echo " -h institute : specific help for consortium members"; 97 100 echo " -n name : tool name, [-n help] to list existing tools"; 98 101 echo " -m arch : choose compiler, [-m help] to list exiting compilers"; … … 105 108 printf "%s\n" "Available tools :" `ls ${TOOLS_DIR}|grep -v COMPILE | grep -v maketools`; 106 109 echo ""; 107 . ${COMPIL_DIR}/Flist_archfile.sh ;110 . ${COMPIL_DIR}/Flist_archfile.sh ${x_h}; 108 111 echo ""; 109 112 echo "Default : previous tool and compiler"; … … 140 143 #- Check if the tool or the compiler exist or list it 141 144 [ "${NEW_CONF}" == help ] && printf "%s\n" "Available tools :" `ls ${TOOLS_DIR}|grep -v COMPILE | grep -v maketools` && exit 142 [ "${CMP_NAM}" == help ] && . ${COMPIL_DIR}/Flist_archfile.sh && exit145 [ "${CMP_NAM}" == help ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit 143 146 144 147 #- When used for the first time, choose a compiler ---
Note: See TracChangeset
for help on using the changeset viewer.