Changeset 9598 for NEMO/trunk/mk


Ignore:
Timestamp:
2018-05-16T00:47:16+02:00 (3 years ago)
Author:
nicolasmartin
Message:

Reorganisation plan for NEMO repository: changes to make compilation succeed with new structure
Juste one issue left with AGRIF_NORDIC with AGRIF preprocessing
Standardisation of routines header with version 4.0 and year 2018
Fix for some broken symlinks

Location:
NEMO/trunk/mk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/mk

    • Property svn:ignore set to
      *.history
      *.fcm
      *.txt
  • NEMO/trunk/mk/Fcheck_archfile.sh

    r7646 r9598  
    117117    fi 
    118118else  
    119     nb=$( find ${MAIN_DIR}/ARCH -name arch-${3}.fcm -print | wc -l ) 
     119    nb=$( find ${MAIN_DIR}/arch -name arch-${3}.fcm -print | wc -l ) 
    120120    if [ $nb -eq 0 ]; then # no arch file found 
    121121   echo "Warning !!!" 
     
    128128   echo "Warning !!!" 
    129129   echo "more than 1 arch file for the same compiler have been found" 
    130    find ${MAIN_DIR}/ARCH -name arch-${3}.fcm -print 
     130   find ${MAIN_DIR}/arch -name arch-${3}.fcm -print 
    131131   echo "keep only 1" 
    132132   echo "EXITING..." 
    133133   exit 1        
    134134    fi 
    135     myarch=$( find ${MAIN_DIR}/ARCH -name arch-${3}.fcm -print ) 
     135    myarch=$( find ${MAIN_DIR}/arch -name arch-${3}.fcm -print ) 
    136136    # we were already using this arch file ? 
    137137    if [ "$myarch" == "$( cat ${COMPIL_DIR}/arch.history )" ]; then  
     
    150150       fi 
    151151       # has myarch file been updated since we copied it in ${COMPIL_DIR}? 
    152        myarch=$( find -L ${MAIN_DIR}/ARCH -cnewer ${COMPIL_DIR}/$1 -name arch-${3}.fcm -print ) 
     152       myarch=$( find -L ${MAIN_DIR}/arch -cnewer ${COMPIL_DIR}/$1 -name arch-${3}.fcm -print ) 
    153153       [ ${#myarch} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1 
    154154   else 
  • NEMO/trunk/mk/Fcheck_config.sh

    r4990 r9598  
    3939# - Nothing set, use the previous in use  
    4040# 
    41 # We use TOOLS/CONFIG_DIR/cfg.txt to check if the configuration exists. 
     41# We use TOOLS/cfgs_DIR/cfg.txt to check if the configuration exists. 
    4242# 
    4343# EXAMPLES 
  • NEMO/trunk/mk/Fclean_config.sh

    r3294 r9598  
    3737# - remove CONFIG_NAME/WORK 
    3838# - remove CONFIG_NAME/BLD 
    39 # - remove CONFIG_NAME from TOOLS/TOOLS/COMPILE/cfg.txt  
     39# - remove CONFIG_NAME from TOOLS/mk/cfg.txt  
    4040#  
    4141# EXAMPLES 
  • NEMO/trunk/mk/Fcopy_dir.sh

    r9573 r9598  
    2727# 
    2828# When a reference configuration is set,  
    29 # Copy NEMO sub-directories needed (OCE_SRC, TOP_SRC ...) 
     29# Copy NEMO sub-directories needed (OCE, TOP ...) 
    3030# 
    3131# EXAMPLES 
  • NEMO/trunk/mk/Fcopy_extdir.sh

    r9573 r9598  
    1818# =========== 
    1919# When an unsupported configuration is requested,  
    20 # Prepare sources for the NEMO sub-directories needed (OCE_SRC, TOP_SRC ...) 
     20# Prepare sources for the NEMO sub-directories needed (OCE, TOP ...) 
    2121# EXAMPLES 
    2222# ======== 
  • NEMO/trunk/mk/Fgo_to_TOOLS.sh

    r3294 r9598  
    5353#- 
    5454 
    55 cd ${MAIN_DIR}/TOOLS 
     55cd ${MAIN_DIR}/tools 
  • NEMO/trunk/mk/Flist_archfile.sh

    r4148 r9598  
    2727# 
    2828# List arch file available. 
    29 # The first line of each file in NEMO/ARCH directory is echoed.   
     29# The first line of each file in NEMO/arch directory is echoed.   
    3030# 
    3131# 
     
    6161 
    6262echo "Available compilers for -m option :" 
    63 for file in  $(ls ${MAIN_DIR}/ARCH | grep "fcm$" ) 
     63for file in  $(ls ${MAIN_DIR}/arch | grep "fcm$" ) 
    6464do 
    6565zvar1=${file#arch-} 
    66 zvar2=$(head -1 ${MAIN_DIR}/ARCH/$file) 
     66zvar2=$(head -1 ${MAIN_DIR}/arch/$file) 
    6767#echo "${zvar1%.fcm} : ${zvar2#\#}" 
    6868printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}" 
     
    7171 
    7272if [ "$1" == "all" ]; then 
    73    for dir  in  $(ls ${MAIN_DIR}/ARCH | grep -v "fcm$" ) 
     73   for dir  in  $(ls ${MAIN_DIR}/arch | grep -v "fcm$" ) 
    7474   do  
    7575      echo "Available compilers at ${dir} :" 
    76       for file in  $(ls ${MAIN_DIR}/ARCH/${dir} | grep "fcm$" ) 
     76      for file in  $(ls ${MAIN_DIR}/arch/${dir} | grep "fcm$" ) 
    7777      do 
    7878      zvar1=${file#arch-} 
    79       zvar2=$(head -1 ${MAIN_DIR}/ARCH/${dir}/$file) 
     79      zvar2=$(head -1 ${MAIN_DIR}/arch/${dir}/$file) 
    8080      #echo "${zvar1%.fcm} : ${zvar2#\#}" 
    8181      printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}" 
    8282      done 
    8383   done 
    84 elif [ -d ${MAIN_DIR}/ARCH/${1} ]; then 
     84elif [ -d ${MAIN_DIR}/arch/${1} ]; then 
    8585      echo "Available compilers at $1 :" 
    86       for file in  $(ls ${MAIN_DIR}/ARCH/$1 | grep "fcm$" ) 
     86      for file in  $(ls ${MAIN_DIR}/arch/$1 | grep "fcm$" ) 
    8787      do 
    8888      zvar1=${file#arch-} 
    89       zvar2=$(head -1 ${MAIN_DIR}/ARCH/${1}/$file) 
     89      zvar2=$(head -1 ${MAIN_DIR}/arch/${1}/$file) 
    9090      #echo "${zvar1%.fcm} : ${zvar2#\#}" 
    9191      printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}" 
     
    9393else 
    9494      echo "Available consortium member sub-directories :" 
    95       for dir  in  $(ls ${MAIN_DIR}/ARCH | grep -v "fcm$" ) 
     95      for dir  in  $(ls ${MAIN_DIR}/arch | grep -v "fcm$" ) 
    9696      do 
    9797         echo ${dir} 
  • NEMO/trunk/mk/Fmake_WORK.sh

    r9573 r9598  
    77# Fmake_WORK      : create links in the WORK 
    88###################################################### 
    9 #set -x 
     9#set -vx 
    1010set -o posix 
    1111#set -u 
     
    4545# :: 
    4646# 
    47 #  $ ./Fmake_WORK.sh ORCA2_LIM OCE_SRC ICE_SRC 
     47#  $ ./Fmake_WORK.sh ORCA2_LIM OCE ICE 
    4848# 
    4949# 
     
    8989while [ $i -lt $NDIR ] 
    9090do 
    91    [ "${ZTAB[i]}" = "OCE_SRC" ] && ln -sf ${NEMO_DIR}/OCE_SRC/*.[Ffh]90 ${ZCONF}/WORK 
    92    [ "${ZTAB[i]}" = "OCE_SRC" ] && ln -sf ${NEMO_DIR}/OCE_SRC/*/*.[Ffh]90 ${ZCONF}/WORK && break 
     91   [ "${ZTAB[i]}" = "OCE" ] && ln -sf ${NEMO_DIR}/OCE/*.[Ffh]90 ${ZCONF}/WORK 
     92   [ "${ZTAB[i]}" = "OCE" ] && ln -sf ${NEMO_DIR}/OCE/*/*.[Ffh]90 ${ZCONF}/WORK && break 
    9393   let i=$i+1 
    9494done 
     
    9797while [ $i -lt $NDIR ] 
    9898do 
    99    if [ "${ZTAB[i]}" != "OCE_SRC" ]; then 
     99   if [ "${ZTAB[i]}" != "OCE" ]; then 
    100100      ln -sf ${NEMO_DIR}/${ZTAB[i]}/*.[Ffh]90 ${ZCONF}/WORK 
    101101      ln -sf ${NEMO_DIR}/${ZTAB[i]}/*/*.[Ffh]90 ${ZCONF}/WORK  
  • NEMO/trunk/mk/Fmake_bld.sh

    r3294 r9598  
    3939# :: 
    4040# 
    41 #  $ ./Fmake_bld.sh NEMOGCM/CONFIG GYRE  /usr/tmp 
     41#  $ ./Fmake_bld.sh NEMOGCM/cfgs GYRE  /usr/tmp 
    4242# 
    4343# 
  • NEMO/trunk/mk/Fprep_agrif.sh

    r9573 r9598  
    5858if [ "$AGRIFUSE" == 1 ]; then 
    5959#-MPI for AGRIF 
    60 if [ ! -f ${MAIN_DIR}/EXTERNAL/AGRIF/nemo_mpi.h ];then 
    61    echo '#if defined key_mpp_mpi' > ${MAIN_DIR}/EXTERNAL/AGRIF/nemo_mpi.h 
    62    echo '#define AGRIF_MPI'      >> ${MAIN_DIR}/EXTERNAL/AGRIF/nemo_mpi.h 
    63    echo '#endif'                 >> ${MAIN_DIR}/EXTERNAL/AGRIF/nemo_mpi.h 
     60if [ ! -f ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h ];then 
     61   echo '#if defined key_mpp_mpi' > ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h 
     62   echo '#define AGRIF_MPI'      >> ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h 
     63   echo '#endif'                 >> ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h 
    6464fi 
    6565 
     
    6767fcm build ${COMPIL_DIR}/conv.cfg || exit 1 
    6868#C_COMPILER=${CC-cc} 
    69 #gmake CC=${C_COMPILER} -C ${MAIN_DIR}/EXTERNAL/AGRIF/LIB 
     69#gmake CC=${C_COMPILER} -C ${MAIN_DIR}/ext/AGRIF/LIB 
    7070 
    7171#- AGRIF sources 
     
    7373[ ! -d $2/$1/NEMOFILES/AGRIF_INC ] && mkdir  $2/$1/NEMOFILES/AGRIF_INC 
    7474[ ! -d $2/$1/NEMOFILES/AGRIF_MODELFILES ] && mkdir  $2/$1/NEMOFILES/AGRIF_MODELFILES 
    75 cp -f -r ${MAIN_DIR}/EXTERNAL/AGRIF/agrif_oce.in  $2/$1/NEMOFILES/ 
    76 #cp -f -r ${MAIN_DIR}/EXTERNAL/AGRIF/conv  $2/$1/NEMOFILES/ 
     75cp -f -r ${MAIN_DIR}/ext/AGRIF/agrif_oce.in  $2/$1/NEMOFILES/ 
     76#cp -f -r ${MAIN_DIR}/ext/AGRIF/conv  $2/$1/NEMOFILES/ 
    7777cp -f -r $2/$1/AGRIFLIB/bin/conv  $2/$1/NEMOFILES/ 
    7878 
  • NEMO/trunk/mk/bld.cfg

    r9573 r9598  
    1313search_src           1 
    1414 
    15 src::ioipsl               $MAIN_DIR/EXTERNAL/IOIPSL/src 
    16 src::agrif                $MAIN_DIR/EXTERNAL/AGRIF/AGRIF_FILES 
     15src::ioipsl               $MAIN_DIR/ext/IOIPSL/src 
     16src::agrif                $MAIN_DIR/ext/AGRIF/AGRIF_FILES 
    1717src::nemo                 $CONFIG_DIR/$NEW_CONF/NEMOFILES/obj 
    1818 
     
    4141bld::tool::fppflags::nemo      %FPPFLAGS -I$CONFIG_DIR/$NEW_CONF/NEMOFILES/inc 
    4242bld::tool::fppflags::ioipsl    %FPPFLAGS 
    43 bld::tool::fppflags::agrif     %FPPFLAGS -include ${MAIN_DIR}/EXTERNAL/AGRIF/nemo_mpi.h 
     43bld::tool::fppflags::agrif     %FPPFLAGS -include ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h 
    4444 
    4545# Ignore the following dependencies 
  • NEMO/trunk/mk/bldxag.cfg

    r4990 r9598  
    1313search_src           1 
    1414 
    15 src::ioipsl               $MAIN_DIR/EXTERNAL/IOIPSL/src 
     15src::ioipsl               $MAIN_DIR/ext/IOIPSL/src 
    1616src::nemo                 $CONFIG_DIR/$NEW_CONF/WORK 
    1717 
  • NEMO/trunk/mk/conv.cfg

    r5656 r9598  
    1414bld::tool::make      %MK 
    1515 
    16 src::convsrc   $MAIN_DIR/EXTERNAL/AGRIF/LIB 
     16src::convsrc   $MAIN_DIR/ext/AGRIF/LIB 
    1717 
    1818 #---------------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.