New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 9651 for utils/build/mk/Flist_archfile.sh – NEMO

Ignore:
Timestamp:
2018-05-28T08:47:14+02:00 (6 years ago)
Author:
nicolasmartin
Message:

Reorganisation plan for NEMO repository: add missing modifications from previous commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • utils/build/mk/Flist_archfile.sh

    r9598 r9651  
    5656#- 
    5757 
    58 if [ -n "$2" ]; then 
    59 shift 
    60 fi 
     58archfile_loop() { 
    6159 
    62 echo "Available compilers for -m option :" 
    63 for file in  $(ls ${MAIN_DIR}/arch | grep "fcm$" ) 
    64 do 
    65 zvar1=${file#arch-} 
    66 zvar2=$(head -1 ${MAIN_DIR}/arch/$file) 
    67 #echo "${zvar1%.fcm} : ${zvar2#\#}" 
    68 printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}" 
     60   for file in $( ls $1/*.fcm ); do 
     61      zvar1=$( basename $file | sed 's/arch-\(.*\).fcm/\1/' ) 
     62      zvar2=$( head -1  $file | tr -d '#'                   ) 
     63      printf "%-30s %-s\n" ${zvar1} "${zvar2}" 
     64   done 
     65 
     66} 
     67 
     68echo -e "\n  ¤ Generic computing architectures" 
     69 
     70archfile_loop ${MAIN_DIR}/arch 
     71 
     72for dir in $( ls ${MAIN_DIR}/arch | grep -v "fcm$" ); do 
     73   echo -e "\n  ¤ Specific HPC architectures for "${dir} 
     74   archfile_loop ${MAIN_DIR}/arch/$dir 
    6975done 
    7076 
    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 
     77echo 
Note: See TracChangeset for help on using the changeset viewer.