Changeset 3173


Ignore:
Timestamp:
2011-11-22T19:45:40+01:00 (9 years ago)
Author:
rblod
Message:

continue test on arch files

Location:
branches/2011/dev_LOCEAN_2011/NEMOGCM
Files:
2 added
2 edited
13 moved

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_LOCEAN_2011/NEMOGCM/CONFIG/makenemo

    r2731 r3173  
    100100#- Choice of the options --- 
    101101x_d=""; 
     102x_h=""; 
    102103x_n=""; 
    103104x_r=""; 
     
    109110do 
    110111    case $V in 
    111    (h)  echo "Usage   : "${b_n} \ 
     112   (h) x_h=${OPTARG}; 
     113        echo "Usage   : "${b_n} \ 
    112114       " [-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   echo " -h      : help"; 
     116   echo " -h institute : specific help for consortium members"; 
     117   echo " -n name      : config name, [-n help] to list existing configurations"; 
     118   echo " -m arch      : choose compiler, [-m help] to list existing compilers"; 
     119   echo " -d dir       : choose NEMO sub-directories"; 
     120   echo " -r conf      : choose reference configuration"; 
     121   echo " -j No       : number of processes used to compile (0=nocompilation)"; 
     122   echo " -t dir       : temporary directory for compilation" 
    120123   echo ""; 
    121124   echo "Example to install a new configuration MY_CONFIG"; 
     
    137140   echo "./makenemo -n MY_CONFIG -j0 add_key \"key_iomput key_mpp_mpi\" del_key \"key_agrif\" "; 
    138141   echo ""; 
    139    . ${COMPIL_DIR}/Flist_archfile.sh ; 
     142   . ${COMPIL_DIR}/Flist_archfile.sh ${x_h} ; 
    140143   echo ""; 
    141144   echo "Default : previous configuration and compiler"; 
     
    205208    exit 
    206209fi 
    207 [ "${CMP_NAM}" ==  help ] && . ${COMPIL_DIR}/Flist_archfile.sh && exit 
     210[ "${CMP_NAM}" ==  help ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit 
    208211 
    209212#- When used for the first time, choose a compiler --- 
  • branches/2011/dev_LOCEAN_2011/NEMOGCM/TOOLS/COMPILE/Flist_archfile.sh

    r3165 r3173  
    1919# :: 
    2020# 
    21 #  $ Flist_archfile.sh 
     21#  $ Flist_archfile.sh Institute 
    2222# 
    2323# 
     
    3737#  $ ./Flist_archfile.sh  
    3838# 
     39#  $ ./Flist_archfile.sh CNRS 
    3940# 
    4041# TODO 
     
    5455# 
    5556#- 
     57 
     58if [ -n "$2" ]; then 
     59shift 
     60fi 
     61 
    5662echo "Available compilers for -m option :" 
    57 for file in  $(ls ${MAIN_DIR}/ARCH ${MAIN_DIR}/ARCH/LOCAL | grep fcm ) 
     63for file in  $(ls ${MAIN_DIR}/ARCH | grep fcm ) 
    5864do 
    5965zvar1=${file#arch-} 
    60 if [ -f ${MAIN_DIR}/ARCH/$file ]; then 
    6166zvar2=$(head -1 ${MAIN_DIR}/ARCH/$file) 
    62 else 
    63 zvar2=$(head -1 ${MAIN_DIR}/ARCH/LOCAL/$file) 
    64 fi 
    6567#echo "${zvar1%.fcm} : ${zvar2#\#}" 
    6668printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}" 
    6769done 
     70 
     71 
     72if [ "$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 
     84else 
     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 
     95fi 
Note: See TracChangeset for help on using the changeset viewer.