Changeset 2763 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Nov 16, 2019, 6:24:42 PM (5 years ago)
Author:
lfita
Message:

Updating Makefile for ypy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/Makefile.ypy.gcc

    r1824 r2763  
    33# A following python 'library' creation is required
    44## Compilation
     5# Prior to compilation, a copy of the file __test_Fmods.f90__ has to be done
     6#  $ cp __test_Fmods.f90__ test_Fmods.f90
    57# make >& run_make.log
     8#   NOTE: One will not be able to compile all the set of programs within an anaconda environment
     9#     due to problems with anaconda. Installation of netcdf4 colides with installed libnetcdff
     10#   - netcdf4
     11# The following packages will be downloaded:
     12#
     13#    package                    |            build
     14#    ---------------------------|-----------------
     15#    libnetcdf-4.6.1            |       h10edf3e_2         1.3 MB
     16#
     17# The following NEW packages will be INSTALLED:
     18#
     19#    netcdf4:    1.4.2-py27h4b4f87f_0               
     20#
     21# The following packages will be REMOVED:
     22#
     23#    libnetcdff: 4.4.4-0              matthewharrison
     24#
     25# The following packages will be UPDATED:
     26#
     27#    libnetcdf:  4.4.0-hf6ef953_0     matthewharrison --> 4.6.1-h10edf3e_2
     28#####
     29# Because of that, Makefile is splitted in two compilation sub-sets
     30##
     31#  $ make pymods: compilation of Fortran modules used in the python scripts
     32#  $ make NCfortran: compiation of Fortran modules and main programs which require
     33#     netCDF-fortran interface: (for: DistriCorrection and trajectories_overlap)
     34#  $ make: compiles all components
     35##
    636
    737FC              = gfortran
     
    1343NCLIBFOLD       = /home/lluis.fita/bin/netcdf/4.5.0/gcc/lib
    1444NCINCFOLD       = /home/lluis.fita/bin/netcdf/4.5.0/gcc/include
    15 LIB_NETCDF      = -L$(NCLIBFOLD) -lnetcdff -lnetcdf -I$(NCINCFOLD)
     45NCLIBFFOLD      = /home/lluis.fita/bin/netcdf/4.5.0/gcc/lib
     46NCINCFFOLD      = /home/lluis.fita/bin/netcdf/4.5.0/gcc/include
     47LIB_NETCDF      = -L$(NCLIBFOLD) -L$(NCLIBFFOLD) -lnetcdff -lnetcdf -I$(NCINCFOLD) -I$(NCINCFFOLD)
    1648
    1749FCFLAGS = $(FCF) $(DBGFLAGS)
     
    2355intsrcs = $(srcs) module_ForInterpolate.f90
    2456scisrcs = $(srcs)
     57gensrcs = module_definitions.f90 module_basic.f90 module_generic.f90
    2558defsrcs = module_definitions.f90
    2659
     
    3568        module_ForInterpolate.o \
    3669        module_ForDiagnosticsVars.o \
    37         module_ForDiagnostics.o \
    38         module_DistriCorrection.o
     70        module_ForDiagnostics.o
    3971
    4072FINTMODULES = \
     
    4476        module_scientific.o \
    4577        module_ForInterpolate.o
     78
     79FEXECMODULES = \
     80        module_definitions.o \
     81        module_basic.o \
     82        module_generic.o \
     83        module_scientific.o \
     84        module_NCgeneric.o \
     85        module_ForInterpolate.o \
     86        module_DistriCorrection.o
     87
     88FTESTMODULES = \
     89        module_definitions.o \
     90        module_basic.o \
     91        module_generic.o \
     92        module_NCgeneric.o \
     93        module_scientific.o \
     94        module_ForDiagnosticsVars.o \
     95        module_ForDiagnostics.o
    4696
    4797all : \
     
    53103        pyintmods.o \
    54104        pyscimods.o \
     105        pygenmods.o \
    55106        pydefmods.o \
     107        trajectories_overlap.o \
     108        test_Fmods.o
     109
     110pymods : \
     111        module_ForDiagnostics.o \
     112        pydistrimods.o \
     113        pydiagmods.o \
     114        pyintmods.o \
     115        pyscimods.o \
     116        pygenmods.o \
     117        pydefmods.o
     118
     119NCfortran : \
     120        module_definitions.o \
     121        module_basic.o \
     122        module_generic.o \
     123        module_NCgeneric.o \
     124        module_ForInterpolate.o \
     125        DistriCorrection.o \
    56126        trajectories_overlap.o
    57127
     
    60130
    61131clean :
    62         $(RM) *.mod *.o interpolate module_ForDiag.so module_ForInt.so module_ForDistriCorrect.so module_ForSci.so module_ForDef.so
     132        $(RM) *.mod *.o interpolate test_Fmods module_ForDiag.so module_ForInt.so module_ForDistriCorrect.so module_ForSci.so module_ForGen.so module_ForDef.so
    63133
    64134########    #######
     
    84154        $(FC) $(FCFLAGS) $(LIB_INC) module_ForInterpolate.f90
    85155
    86 module_ForDiagnosticsVars.o: module_definitions.o module_basic.o module_generic.o
     156module_ForDiagnosticsVars.o: module_definitions.o module_basic.o module_generic.o module_scientific.o
    87157        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnosticsVars.f90
    88158
     
    94164
    95165FCEXEFINTCFLAGS = $(FINTMODULES) $(LIB_NETCDF) $(LIB_INC)
    96 FCEXECFLAGS = $(MODULES) $(LIB_NETCDF) $(LIB_INC)
     166FCEXECFLAGS = $(FEXECMODULES) $(LIB_NETCDF) $(LIB_INC)
     167FCEXECTESTFLAGS = $(FTESTMODULES) $(LIB_NETCDF) $(LIB_INC)
    97168
    98169interpolate.o: module_definitions.o module_basic.o module_generic.o module_scientific.o module_ForInterpolate.o
     
    102173        $(FC) $(FCEXECFLAGS) DistriCorrection.f90 -o DistriCorrection
    103174
     175test_Fmods.o: module_definitions.o module_basic.o module_generic.o module_scientific.o module_ForDiagnostics.o module_ForDiagnosticsVars.o
     176        $(FC) $(FCEXECTESTFLAGS) test_Fmods.f90 -o test_Fmods
     177
    104178pydistrimods.o:
    105         $(F2PY) -c -I$(NCINCFOLD) -m module_ForDistriCorrect $(distrisrcs) -L$(NCLIBFOLD)
     179        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForDistriCorrect $(distrisrcs) -L$(NCLIBFOLD)
    106180
    107181pydiagmods.o:
    108         $(F2PY) -c -I$(NCINCFOLD) -m module_ForDiag $(diagsrcs) -L$(NCLIBFOLD)
     182        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForDiag $(diagsrcs) -L$(NCLIBFOLD)
    109183
    110184pyintmods.o:
    111         $(F2PY) -c -I$(NCINCFOLD) -m module_ForInt $(intsrcs) -L$(NCLIBFOLD)
     185        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForInt $(intsrcs) -L$(NCLIBFOLD)
    112186
    113187pyscimods.o:
    114         $(F2PY) -c -I$(NCINCFOLD) -m module_ForSci $(scisrcs) -L$(NCLIBFOLD)
     188        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForSci $(scisrcs) -L$(NCLIBFOLD)
     189
     190pygenmods.o:
     191        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForGen $(gensrcs) -L$(NCLIBFOLD)
    115192
    116193pydefmods.o:
    117         $(F2PY) -c -I$(NCINCFOLD) -m module_ForDef $(defsrcs) -L$(NCLIBFOLD)
     194        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForDef $(defsrcs) -L$(NCLIBFOLD)
    118195
    119196trajectories_overlap.o: module_definitions.o module_basic.o module_generic.o module_NCgeneric.o module_scientific.o
Note: See TracChangeset for help on using the changeset viewer.