Changeset 3922


Ignore:
Timestamp:
2013-06-14T12:37:08+02:00 (9 years ago)
Author:
smasson
Message:

trunk:compilation enhancements, see ticket #1117

Location:
trunk/NEMOGCM
Files:
4 added
5 deleted
4 edited
9 copied
20 moved

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/ARCH/OLD/CNRS/arch-X64_TITANE.fcm

    r3199 r3922  
    1414# USER_LIB    additional libraries to pass to the linker, e.g. -l<library> 
    1515 
    16 %NCDF_INC            -I$(NETCDF_INC_DIR) 
    17 %NCDF_LIB            -L$(NETCDF_LIB_DIR) -lnetcdff -lnetcdf 
     16%NCDF_INC            -I$NETCDF_INC_DIR 
     17%NCDF_LIB            -L$NETCDF_LIB_DIR -lnetcdff -lnetcdf 
    1818%FC                  mpif90 -c -cpp 
    1919%FCFLAGS             -i4 -r8 -DCPP_PARA -O3 -automatic -align all 
  • trunk/NEMOGCM/ARCH/OLD/arch-ifort_MERCATOR_CLUSTER.fcm

    r3917 r3922  
    1515# debug: -g  -check bounds -check uninit -check pointers -traceback  
    1616 
    17 %NCDF_INC            -I$(NETCDF_INC) 
    18 %NCDF_LIB            -L $(NETCDF_LIB) -lnetcdf 
     17%NCDF_INC            -I$NETCDF_INC 
     18%NCDF_LIB            -L $NETCDF_LIB -lnetcdf 
    1919%FC                  mpif90 
    2020%FCFLAGS             -assume byterecl  -convert big_endian -i4 -r8 -automatic -align all -O0 
  • trunk/NEMOGCM/ARCH/arch-ALTIX_NAUTILUS_MPT.fcm

    r3917 r3922  
    11# ifort compiler options for NOCS ALTIX cluster nautilus using NetCDF4 libraries 
     2# 
    23# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4 
    34# HDF5_HOME   root directory containing lib and include subdirectories for HDF5 
    45# XIOS_HOME   root directory containing lib for XIOS 
    5 # NCDF_INC    netcdf include file 
    6 # NCDF_LIB    netcdf library 
    7 # XIOS_LIB    XIOS library 
     6# OASIS_HOME  root directory containing lib for OASIS 
     7# 
     8# NCDF_INC    netcdf4 include file 
     9# NCDF_LIB    netcdf4 library 
     10# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated) 
     11# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated) 
     12# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated) 
     13# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated) 
     14# 
    815# FC          Fortran compiler command 
    916# FCFLAGS     Fortran compiler flags 
    1017# FFLAGS      Fortran 77 compiler flags 
    1118# LD          linker 
    12 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a 
     19# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries 
    1320# FPPFLAGS    pre-processing flags 
    1421# AR          assembler 
    1522# ARFLAGS     assembler flags 
    1623# MK          make 
    17 # USER_INC    additional include files for the compiler,  e.g. -I<include dir> 
    18 # USER_LIB    additional libraries to pass to the linker, e.g. -l<library> 
     24# USER_INC    complete list of include files 
     25# USER_LIB    complete list of libraries to pass to the linker 
     26# 
     27# Note that: 
     28#  - unix variables "$..." are accpeted and will be evaluated before calling fcm. 
     29#  - fcm variables are starting with a % (and not a $) 
     30# 
     31%HDF5_HOME           /fibre/omfman/NETCDF_PAR 
     32%NCDF_HOME           /fibre/omfman/NETCDF_PAR 
     33%XIOS_HOME           /fibre/omfman/XIOS 
     34%OASIS_HOME           
    1935 
    20  
    21 %NCDF_HOME           /fibre/omfman/NETCDF_PAR 
    22 %HDF5_HOME           /fibre/omfman/NETCDF_PAR 
    23 %XIOS_HOME           /fibre/omfman/XIOS 
    2436%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include 
     37# Note use of -Bstatic because the library root directories may not be accessible to the back-end compute nodes 
     38%NCDF_LIB            -L%HDF5_HOME/lib -L%NCDF_HOME/lib -Bstatic -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -Bdynamic -lz 
    2539%XIOS_INC            -I%XIOS_HOME/inc  
    2640%XIOS_LIB            -L%XIOS_HOME/lib -lxios 
    27 # Note use of -Bstatic because the library root directories may not be accessible to the back-end compute nodes 
    28 %NCDF_LIB            -L%HDF5_HOME/lib -L%NCDF_HOME/lib -Bstatic -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -Bdynamic -lz 
     41%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1 
     42%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip 
     43 
    2944%FC                  ifort 
    3045%FCFLAGS             -r8 -O3 -fp-model precise -xT -ip -vec-report0 
     
    3651%ARFLAGS             -r 
    3752%MK                  gmake 
    38 %USER_INC            %NCDF_INC %XIOS_INC 
    39 %USER_LIB            %XIOS_LIB %NCDF_LIB 
     53%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC 
     54%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB 
    4055 
    4156# - if debugging use these flags 
  • trunk/NEMOGCM/ARCH/arch-PW7_C2A_XIO.fcm

    r3917 r3922  
    11# POWER 6 at ECMWF 
    2 # NCDF_INC    netcdf include file 
    3 # NCDF_LIB    netcdf library 
     2# 
     3# NCDF_INC    netcdf4 include file 
     4# NCDF_LIB    netcdf4 library 
     5# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated) 
     6# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated) 
     7# 
    48# FC          Fortran compiler command 
    59# FCFLAGS     Fortran compiler flags 
     
    1115# ARFLAGS     assembler flags 
    1216# MK          make   
    13 # USER_INC    additional include files for the compiler,  e.g. -I<include dir>  
    14 # USER_LIB    additional libraries to pass to the linker, e.g. -l<library> 
     17# USER_INC    complete list of include files 
     18# USER_LIB    complete list of libraries to pass to the linker 
     19# 
     20# Note that: 
     21#  - unix variables "$..." are accpeted and will be evaluated before calling fcm. 
     22#  - fcm variables are starting with a % (and not a $) 
    1523# 
    1624#options: 
     
    2129#others  : -qmaxmem=-1 -qsave -qlargepage  
    2230# 
    23 %NCDF_INC            -I$(NETCDF_INC1) 
    24 %NCDF_LIB            -L$(NETCDF_LIB1) -lnetcdf -lnetcdff -L$(HDF5_LIB) -lhdf5_hl -lhdf5 -lz 
    25 %XIOS_INC            -I$(XIOS_INC) 
    26 %XIOS_LIB            -L$(XIOS_LIB)  -lxios 
     31%NCDF_INC            -I${NETCDF_INC1} 
     32%NCDF_LIB            -L${NETCDF_LIB1} -lnetcdff -lnetcdf -L${HDF5_LIB} -lhdf5_hl -lhdf5 -lz 
     33%XIOS_INC            -I${XIOS_INC} 
     34%XIOS_LIB            -L${XIOS_LIB} -lxios 
     35 
    2736%XLF90_LIB           -lxlf90_r 
    2837%FC                  mpxlf90_r 
  • trunk/NEMOGCM/ARCH/arch-X64_CURIE.fcm

    r3917 r3922  
    1 # Curie BULL at french TGCC, http://www-hpc.cea.fr/en/complexe/tgcc-curie.htm 
    2 # NCDF_INC    netcdf include file 
    3 # NCDF_LIB    netcdf library 
     1# Curie BULL at TGCC, http://www-hpc.cea.fr/en/complexe/tgcc-curie.htm 
     2# 
     3# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4 
     4# HDF5_HOME   root directory containing lib and include subdirectories for HDF5 
     5# XIOS_HOME   root directory containing lib for XIOS 
     6# OASIS_HOME  root directory containing lib for OASIS 
     7# 
     8# NCDF_INC    netcdf4 include file 
     9# NCDF_LIB    netcdf4 library 
     10# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated) 
     11# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated) 
     12# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated) 
     13# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated) 
     14# 
    415# FC          Fortran compiler command 
    516# FCFLAGS     Fortran compiler flags 
    617# FFLAGS      Fortran 77 compiler flags 
    718# LD          linker 
    8 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a 
     19# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries 
    920# FPPFLAGS    pre-processing flags 
    1021# AR          assembler 
    1122# ARFLAGS     assembler flags 
    1223# MK          make 
    13 # USER_INC    additional include files for the compiler,  e.g. -I<include dir> 
    14 # USER_LIB    additional libraries to pass to the linker, e.g. -l<library> 
     24# USER_INC    complete list of include files 
     25# USER_LIB    complete list of libraries to pass to the linker 
     26# 
     27# Note that: 
     28#  - unix variables "$..." are accpeted and will be evaluated before calling fcm. 
     29#  - fcm variables are starting with a % (and not a $) 
     30# 
     31%NCDF_HOME           /usr/local/netcdf-4.2_hdf5 
     32%HDF5_HOME           /usr/local/hdf5-1.8.8 
     33%XIOS_HOME           $WORKDIR/now/models/xios 
     34%OASIS_HOME          $WORKDIR/now/models/oa3mct 
    1535 
    16 %NCDF_INC            -I/usr/local/netcdf-4.2_hdf5/include 
    17 %NCDF_LIB            -L/usr/local/netcdf-4.2_hdf5/lib -L/usr/local/hdf5-1.8.8/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lhdf5 -lz -lcurl -lstdc++ 
    18 %XIOS_ROOT           /ccc/work/cont005/ra0542/massons/now/models/xios 
     36%NCDF_INC            -I%NCDF_HOME/include  
     37%NCDF_LIB            -L%NCDF_HOME/lib -lnetcdff -lnetcdf -L%HDF5_HOME/lib -lhdf5_hl -lhdf5 -lhdf5 
     38%XIOS_INC            -I%XIOS_HOME/inc  
     39%XIOS_LIB            -L%XIOS_HOME/lib -lxios 
     40%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1 
     41%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip 
     42 
    1943%FC                  mpif90 -c -cpp 
    2044# for Curie Fat Node 
     
    2650%FFLAGS              %FCFLAGS 
    2751%LD                  mpif90 
    28 %LDFLAGS 
     52%LDFLAGS             -lstdc++ 
    2953%FPPFLAGS            -P -C -traditional 
    3054%AR                  ar 
    3155%ARFLAGS             rs 
    3256%MK                  gmake 
    33 %USER_INC            -I%XIOS_ROOT/inc %NCDF_INC  
    34 %USER_LIB            -L%XIOS_ROOT/lib -lxios %NCDF_LIB -lstdc++ 
     57%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC 
     58%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB 
  • trunk/NEMOGCM/ARCH/arch-X64_VAYU.fcm

    r3917 r3922  
    11# Vayu Sun Constellation at Australian NCI, http://nf.nci.org.au/facilities/vayu/hardware.php 
    2 # NCDF_INC    netcdf include file 
    3 # NCDF_LIB    netcdf library 
     2# 
     3# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4 
     4# HDF5_HOME   root directory containing lib and include subdirectories for HDF5 
     5# XIOS_HOME   root directory containing lib for XIOS 
     6# OASIS_HOME  root directory containing lib for OASIS 
     7# 
     8# NCDF_INC    netcdf4 include file 
     9# NCDF_LIB    netcdf4 library 
     10# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated) 
     11# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated) 
     12# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated) 
     13# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated) 
     14# 
    415# FC          Fortran compiler command 
    516# FCFLAGS     Fortran compiler flags 
    617# FFLAGS      Fortran 77 compiler flags 
    718# LD          linker 
    8 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a 
     19# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries 
    920# FPPFLAGS    pre-processing flags 
    1021# AR          assembler 
    1122# ARFLAGS     assembler flags 
    1223# MK          make 
    13 # USER_INC    additional include files for the compiler,  e.g. -I<include dir> 
    14 # USER_LIB    additional libraries to pass to the linker, e.g. -l<library> 
     24# USER_INC    complete list of include files 
     25# USER_LIB    complete list of libraries to pass to the linker 
     26# 
     27# Note that: 
     28#  - unix variables "$..." are accpeted and will be evaluated before calling fcm. 
     29#  - fcm variables are starting with a % (and not a $) 
     30# 
     31%NCDF_HOME           /short/e14/$( whoami )/util 
     32%HDF5_HOME           /short/e14/$( whoami )/util 
     33%XIOS_HOME           /short/e14/$( whoami )/now/models/xios 
     34%OASIS_HOME          /short/e14/$( whoami )/now/models/oa3mct 
    1535 
    16 %NCDF_INC            -I/short/e14/szm552/util/include 
    17 %NCDF_LIB            -L/short/e14/szm552/util/lib -lnetcdff -lnetcdf  -lhdf5_hl -lhdf5 -lhdf5 -lz -lcurl -lstdc++ 
    18 %XIOS_ROOT           /short/e14/szm552/now/models/xios 
     36%NCDF_INC            -I%NCDF_HOME/include  
     37%NCDF_LIB            -L%NCDF_HOME/lib -lnetcdff -lnetcdf -L%HDF5_HOME/lib -lhdf5_hl -lhdf5 -lhdf5 -lz 
     38%XIOS_INC            -I%XIOS_HOME/inc  
     39%XIOS_LIB            -L%XIOS_HOME/lib -lxios 
     40%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1 
     41%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip 
     42 
    1943%FC                  mpif90 -c -cpp 
    2044%FCFLAGS             -i4 -r8 
    2145%FFLAGS              %FCFLAGS 
    2246%LD                  mpif90 
    23 %LDFLAGS              
     47%LDFLAGS             -lstdc++ 
    2448%FPPFLAGS            -P -C -traditional 
    2549%AR                  ar 
    2650%ARFLAGS             rs 
    2751%MK                  gmake 
    28 %USER_INC            %NCDF_INC -I%XIOS_ROOT/inc 
    29 %USER_LIB            -L%XIOS_ROOT/lib -lxios %NCDF_LIB  
     52%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC 
     53%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB 
  • trunk/NEMOGCM/ARCH/arch-macport_osx.fcm

    r3917 r3922  
    1 # generic gfortran compiler options for OSX installed with macport 
     1# generic gfortran compiler options for OSX installed with macport, http://www.macports.org/ 
    22# 
    33# port packages needed: 
    4 #    sudo port install openmpi +gcc45 
     4#    sudo port install openmpi +gcc48 
    55#    sudo port install hdf5-18 +cxx +fortran +openmpi (I'am not sure cxx is needed) 
    66#    sudo port install netcdf         +openmpi 
     
    1010# add to your PATH /opt/local/lib/openmpi/bin so that mpif90 is properly known 
    1111# 
    12 # NCDF_INC    netcdf include file 
    13 # NCDF_LIB    netcdf library 
     12# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4 
     13# HDF5_HOME   root directory containing lib and include subdirectories for HDF5 
     14# XIOS_HOME   root directory containing lib for XIOS 
     15# OASIS_HOME  root directory containing lib for OASIS 
     16# 
     17# NCDF_INC    netcdf4 include file 
     18# NCDF_LIB    netcdf4 library 
     19# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated) 
     20# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated) 
     21# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated) 
     22# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated) 
     23# 
    1424# FC          Fortran compiler command 
    1525# FCFLAGS     Fortran compiler flags 
    1626# FFLAGS      Fortran 77 compiler flags 
    1727# LD          linker 
    18 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a 
     28# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries 
    1929# FPPFLAGS    pre-processing flags 
    2030# AR          assembler 
    2131# ARFLAGS     assembler flags 
    2232# MK          make 
    23 # USER_INC    additional include files for the compiler,  e.g. -I<include dir> 
    24 # USER_LIB    additional libraries to pass to the linker, e.g. -l<library> 
     33# USER_INC    complete list of include files 
     34# USER_LIB    complete list of libraries to pass to the linker 
     35# 
     36# Note that: 
     37#  - unix variables "$..." are accpeted and will be evaluated before calling fcm. 
     38#  - fcm variables are starting with a % (and not a $) 
     39# 
     40%NCDF_HOME           /opt/local 
     41%HDF5_HOME           /opt/local 
     42%XIOS_HOME           /Users/$( whoami )/XIOS 
     43%OASIS_HOME          /not/defined 
    2544 
     45%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include 
     46%NCDF_LIB            -L%NCDF_HOME/lib -lnetcdff -lnetcdf 
     47%XIOS_INC            -I%XIOS_HOME/inc  
     48%XIOS_LIB            -L%XIOS_HOME/lib -lxios 
     49%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1 
     50%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip 
    2651 
    27 %NCDF_INC            -I/opt/local/include 
    28 %NCDF_LIB            -L/opt/local/lib -lnetcdf -lnetcdff 
    29 %XIOS_ROOT           /Users/cethe/XIOS 
    3052%FC                mpif90  
    3153%FCFLAGS             -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer  
     
    3759%ARFLAGS             rs 
    3860%MK                  make 
    39 %USER_INC            %NCDF_INC -I%XIOS_ROOT/inc 
    40 %USER_LIB            -L%XIOS_ROOT/lib -lxios %NCDF_LIB 
    41  
     61%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC 
     62%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB 
  • trunk/NEMOGCM/ARCH/arch-x3750_ADA.fcm

    r3917 r3922  
    11# Ada  IBM x3750 at french IDRIS, http://www.idris.fr/ada/ada-hw-ada.html 
    2 # NCDF_INC    netcdf include file 
    3 # NCDF_LIB    netcdf library 
     2# 
     3# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4 
     4# HDF5_HOME   root directory containing lib and include subdirectories for HDF5 
     5# XIOS_HOME   root directory containing lib for XIOS 
     6# OASIS_HOME  root directory containing lib for OASIS 
     7# 
     8# NCDF_INC    netcdf4 include file 
     9# NCDF_LIB    netcdf4 library 
     10# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated) 
     11# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated) 
     12# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated) 
     13# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated) 
     14# 
    415# FC          Fortran compiler command 
    516# FCFLAGS     Fortran compiler flags 
    617# FFLAGS      Fortran 77 compiler flags 
    718# LD          linker 
    8 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a 
     19# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries 
    920# FPPFLAGS    pre-processing flags 
    1021# AR          assembler 
    1122# ARFLAGS     assembler flags 
    1223# MK          make 
    13 # USER_INC    additional include files for the compiler,  e.g. -I<include dir> 
    14 # USER_LIB    additional libraries to pass to the linker, e.g. -l<library> 
     24# USER_INC    complete list of include files 
     25# USER_LIB    complete list of libraries to pass to the linker 
    1526# 
    16 %NCDF_INC            -I/smplocal/pub/NetCDF/4.1.3/mpi/include 
    17 %NCDF_LIB            -L/smplocal/pub/NetCDF/4.1.3/mpi/lib -L/smplocal/pub/HDF5/1.8.9/par/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lhdf5 -lz -lstdc++ 
    18 %XIOS_ROOT           /smphome/rech/fry/rfry154/XIOS 
     27# Note that: 
     28#  - unix variables "$..." are accpeted and will be evaluated before calling fcm. 
     29#  - fcm variables are starting with a % (and not a $) 
     30# 
     31%NCDF_HOME           /smplocal/pub/NetCDF/4.1.3/mpi 
     32%HDF5_HOME           /smplocal/pub/HDF5/1.8.9/par 
     33%XIOS_HOME           $WORKDIR/XIOS 
     34%OASIS_HOME          /not/yet/defined 
     35 
     36%NCDF_INC            -I%NCDF_HOME/include  
     37%NCDF_LIB            -L%NCDF_HOME/lib -Bstatic -lnetcdff -lnetcdf -Bdynamic -L%HDF5_HOME/lib -Bstatic -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -Bdynamic -lz  
     38%XIOS_INC            -I%XIOS_HOME/inc  
     39%XIOS_LIB            -L%XIOS_HOME/lib -lxios 
     40%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1 
     41%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip 
     42 
    1943%FC                  mpiifort -c -cpp 
    2044%FCFLAGS             -DCPP_PARA -i4 -r8 -O3 -xAVX -fp-model precise 
    2145%FFLAGS              %FCFLAGS 
    2246%LD                  mpiifort 
    23 %LDFLAGS 
     47%LDFLAGS             -lstdc++ 
    2448%FPPFLAGS            -P -C -traditional 
    2549%AR                  ar 
    2650%ARFLAGS             rs 
    2751%MK                  gmake 
    28 %USER_INC            -I%XIOS_ROOT/inc %NCDF_INC 
    29 %USER_LIB            -L%XIOS_ROOT/lib -lxios %NCDF_LIB -lstdc++ 
     52%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC 
     53%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB 
  • trunk/NEMOGCM/CONFIG/makenemo

    r3764 r3922  
    106106export AGRIFUSE=10 
    107107declare -a TAB 
     108list_key=0; 
    108109#- 
    109110#- FCM and functions location --- 
     
    142143   echo "./makenemo clean"; 
    143144   echo ""; 
     145   echo "Example to list the available keys of a CONFIG "; 
     146   echo "./makenemo list_key"; 
     147   echo ""; 
    144148   echo "Example to add and remove keys"; 
    145149   echo "./makenemo add_key \"key_iomput key_mpp_mpi\" del_key \"key_agrif\" "; 
     
    158162   (j)  x_j=${OPTARG};; 
    159163   (t)  x_t=${OPTARG};; 
    160     (e)  x_e=${OPTARG};; 
    161     (s)  x_s=${OPTARG};; 
    162     (v)  x_v=${OPTARG};; 
     164   (e)  x_e=${OPTARG};; 
     165   (s)  x_s=${OPTARG};; 
     166   (v)  x_v=${OPTARG};; 
    163167   (:)  echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; 
    164168   exit 2;; 
     
    188192       export ${list_del_key} 
    189193       shift 
     194       ;; 
     195   list_key) 
     196       list_key=1 
    190197       ;; 
    191198   *) 
     
    222229[ "${CMP_NAM}" ==  help ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit 
    223230 
    224 #- When used for the first time, choose a compiler --- 
    225 . ${COMPIL_DIR}/Fcheck_archfile.sh arch_nemo.fcm ${CMP_NAM} || exit 
    226  
    227231#- 
    228232#- Choose a default configuration if needed --- 
    229233#- ORCA2_LIM or last one used --- 
    230234. ${COMPIL_DIR}/Fcheck_config.sh cfg.txt ${NEW_CONF} || exit 
    231  
    232235 
    233236if [ ${#NEW_CONF} -eq 0 ] ; then 
     
    269272. ${COMPIL_DIR}/Fmake_bld.sh ${CONFIG_DIR} ${NEW_CONF}  ${NEMO_TDIR} || exit 
    270273 
     274# build the complete list of the cpp keys of this configuration 
     275for i in $( grep "^# .*key" GYRE/WORK/* )  
     276do 
     277    echo $i | grep key_ 
     278done | sort -d | uniq > ${COMPIL_DIR}/full_key_list.txt 
     279if [ $list_key -eq 1 ]; then 
     280    cat ${COMPIL_DIR}/full_key_list.txt 
     281    exit 0 
     282fi 
     283 
    271284#- At this stage new configuration has been added, 
    272285#- We add or remove keys 
     
    278291    . ${COMPIL_DIR}/Fdel_keys.sh ${NEW_CONF} del_key ${list_del_key} 
    279292fi 
     293 
     294for kk in $( cat ${NEW_CONF}/cpp_${NEW_CONF}.fcm ) 
     295do 
     296    if [ "$( echo $kk | cut -c 1-4 )" == "key_" ]; then 
     297   nb=$( grep -c $kk ${COMPIL_DIR}/full_key_list.txt ) 
     298   if [ $nb -eq 0 ]; then 
     299       echo 
     300       echo "E R R O R : key "$kk" is not found in ${NEW_CONF}/WORK routines..." 
     301       echo "we stop..." 
     302       echo 
     303       exit 1 
     304   fi 
     305    fi 
     306done 
     307 
     308#- At this stage cpp keys have been updated. we can check the arch file 
     309#- When used for the first time, choose a compiler --- 
     310. ${COMPIL_DIR}/Fcheck_archfile.sh arch_nemo.fcm cpp.fcm ${CMP_NAM} || exit 
    280311 
    281312#- At this stage the configuration has beeen chosen 
  • trunk/NEMOGCM/TOOLS/COMPILE/Fcheck_archfile.sh

    r3294 r3922  
    5959# 
    6060#- 
     61cpeval ()  
     62{ 
     63    cat > $2 << EOF 
    6164 
    62 if [ ${#2} -eq 0 ]; then 
    63    if [ ! -f ${COMPIL_DIR}/$1 ]; then 
    64    echo "Warning !!!" 
    65    echo "NO compiler chosen" 
    66    echo "Try makenemo -h for help" 
    67    echo "EXITING..." 
    68    exit 1  
    69    fi 
    70 else 
    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    
     65#========================================================== 
     66#    Automatically generated by Fcheck_archfile.sh from 
     67#    $1 
     68#========================================================== 
     69 
     70EOF 
     71    while read line   
     72    do   
     73   eval "echo \"$line\" >> $2" 
     74    done < $1 
     75} 
     76# cleaning related to the old version 
     77myarch=$( find ${MAIN_DIR}/ARCH -type l -name arch-${3}.fcm -print ) 
     78[ ${#myarch} -ne 0 ] && rm -f $myarch 
     79# 
     80if [ ${#3} -eq 0 ]; then # arch not specified 
     81    if [ ! -f ${COMPIL_DIR}/arch.history ]; then 
     82   echo "Warning !!!" 
     83   echo "NO compiler chosen" 
     84   echo "Try makenemo -h for help" 
     85   echo "EXITING..." 
     86   exit 1  
     87    else # use the arch file defined in arch.history 
     88   myarch=$( cat ${COMPIL_DIR}/arch.history )    
     89   if [ ! -f $myarch ]; then 
     90       echo "Warning !!!" 
     91       echo "previously used arch file no more found:" 
     92       echo $myarch 
     93       echo "EXITING..." 
     94       exit 1  
     95   else 
     96       if [ -f ${COMPIL_DIR}/$1 ]; then 
     97      myarchdir=$( dirname ${myarch} ) 
     98      myarchname=$( basename ${myarch} ) 
     99      # have the cpp keys been updated since we copy the arch file in ${COMPIL_DIR}? 
     100      mycpp=$( find -L ${COMPIL_DIR} -cnewer ${COMPIL_DIR}/$1 -name $2 -print ) 
     101      [ ${#mycpp} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1 
     102      # has myarch been updated since we copy it in ${COMPIL_DIR}? 
     103      myarch=$( find -L $myarchdir -cnewer ${COMPIL_DIR}/$1 -name $myarchname -print ) 
     104      [ ${#myarch} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1 
     105       else 
     106      cpeval ${myarch} ${COMPIL_DIR}/$1 
     107       fi 
     108   fi 
     109    fi 
     110else  
     111    myarch=$( find ${MAIN_DIR}/ARCH -name arch-${3}.fcm -print ) 
     112    if [ ${#myarch} -gt 0 ]; then # the arch file specified by the use exists 
     113   # we were already using this arch file 
     114   if [ "$myarch" == "$( cat ${COMPIL_DIR}/arch.history )" ]; then  
     115       if [ -f ${COMPIL_DIR}/$1 ]; then 
     116         # have the cpp keys been updated since we copy the arch file in ${COMPIL_DIR}? 
     117      mycpp=$( find -L ${COMPIL_DIR} -cnewer ${COMPIL_DIR}/$1 -name $2 -print ) 
     118      [ ${#mycpp} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1 
     119      # has myarch been updated since we copy it in ${COMPIL_DIR}? 
     120      myarch=$( find -L ${MAIN_DIR}/ARCH -cnewer ${COMPIL_DIR}/$1 -name arch-${3}.fcm -print ) 
     121      [ ${#myarch} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1 
     122       else 
     123      cpeval ${myarch} ${COMPIL_DIR}/$1 
     124       fi 
     125   else 
     126       echo ${myarch} > ${COMPIL_DIR}/arch.history 
     127       cpeval ${myarch} ${COMPIL_DIR}/$1 
     128   fi 
     129    else 
     130   echo "Warning !!!" 
     131   echo "Compiler not existing" 
     132   echo "Try makenemo -h for help" 
     133   echo "EXITING..." 
     134   exit 1        
     135    fi    
    81136fi 
     137 
     138#- do we need xios library? 
     139use_iom=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_iomput ) 
     140have_lxios=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-lxios" ) 
     141if [[ ( $use_iom -eq 0 ) && ( $have_lxios -ge 1 ) ]] 
     142then  
     143    sed -e "s/-lxios//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$ 
     144    mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1 
     145fi 
     146 
     147#- do we need oasis libraries? 
     148use_oasis=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_oasis3 ) 
     149for liboa in psmile.MPI1 mct mpeu scrip mpp_io 
     150do 
     151    have_liboa=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-l${liboa}" ) 
     152    if [[ ( $use_oasis -eq 0 ) && ( $have_liboa -ge 1 ) ]] 
     153    then  
     154   sed -e "s/-l${liboa}//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$ 
     155   mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1 
     156    fi 
     157done 
     158 
  • trunk/NEMOGCM/TOOLS/COMPILE/Flist_archfile.sh

    r3294 r3922  
    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-} 
     
    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-} 
     
    8484elif [ -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-} 
     
    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} 
Note: See TracChangeset for help on using the changeset viewer.