source: lmdz_wrf/trunk/tools/Makefile.hydra.ifort @ 2653

Last change on this file since 2653 was 1729, checked in by lfita, 7 years ago

Adding compilation for hydra with ifort

File size: 4.4 KB
Line 
1# L. Fita, CIMA January 2017
2# Compilation of all required Fortran modules in `hydra' with ifort compilers
3# A following python 'library' creation is required
4# Diagnostics compilation _______
5# f2py -m module_ForDiag -h module_ForDiag.pyf module_generic.f90 module_ForDiagnosticsVars.f90 module_ForDiagnostics.f90 >& run_f2py_ForDiag_wrapper.log
6# make
7# f2py -m module_ForDiag -c --f90exec=/usr/bin/gfortran-6 module_ForDiag.pyf module_generic.f90 module_ForDiagnosticsVars.f90 module_ForDiagnostics.f90 >& run_f2py_ForDiag_compile.log
8# Interpolation compilation _______
9# f2py -m module_ForInt -h module_ForInt.pyf module_generic.f90 module_ForInterpolate.f90  >& run_f2py_ForInt_wrapper.log
10# f2py -m module_ForInt -c --f90exec=/usr/bin/gfortran-6 module_ForInt.pyf module_generic.f90 module_ForInterpolate.f90  >& run_f2py_ForInt_compile.log
11
12FC              = /opt/intel/composerxe-2011.3.174/bin/intel64/ifort
13FCF     = -c
14LIB_INC =
15RM              = rm -f
16F2PY            = /home/lluis.fita/bin/anaconda2/bin/f2py
17#F2PY           = /share/anaconda2/bin/f2py
18#DBGFLAGS = g -Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan
19NCLIBFOLD       = /home/lluis.fita/bin/anaconda2/lib
20NCINCFOLD       = /home/lluis.fita/bin/anaconda2/include
21#NCLIBFOLD      = /share/anaconda2/lib
22#NCINCFOLD      = /share/anaconda2/include
23LIB_NETCDF      = -L$(NCLIBFOLD) -lnetcdff -lnetcdf -I$(NCINCFOLD)
24
25FCFLAGS = $(FCF) $(DBGFLAGS)
26
27LD_LIBRARY_PATH := :/home/lluis.fita/bin/anaconda2/lib
28#LD_LIBRARY_PATH := :/share/anaconda2/lib
29
30# Sources for f2py
31srcs = module_definitions.f90 module_basic.f90 module_generic.f90 module_scientific.f90
32distrisrcs = $(srcs) module_DistriCorrection.f90
33diagsrcs = $(srcs) module_ForDiagnosticsVars.f90 module_ForDiagnostics.f90
34intsrcs = $(srcs) module_ForInterpolate.f90
35scisrcs = $(srcs)
36defsrcs = module_definitions.f90
37
38####### ###### ##### #### ### ## #
39
40MODULES = \
41        module_definitions.o \
42        module_basic.o \
43        module_generic.o \
44        module_NCgeneric.o \
45        module_scientific.o \
46        module_ForDiagnosticsVars.o \
47        module_ForDiagnostics.o \
48        module_DistriCorrection.o
49
50all : \
51        module_ForDiagnostics.o \
52        DistriCorrection.o \
53        interpolate.o \
54        pydistrimods.o \
55        pydiagmods.o \
56        pyintmods.o \
57        pyscimods.o \
58        pydefmods.o \
59        trajectories_overlap.o
60
61diags : \
62        module_ForDiagnostics.o
63
64clean :
65        $(RM) *.mod *.o interpolate module_ForDiag.so module_ForInt.so module_ForDistriCorrect.so module_ForSci.so module_ForDef.so
66
67########    #######
68##
69    ########
70
71module_definitions.o:
72        $(FC) $(FCFLAGS) module_definitions.f90
73
74module_basic.o: module_definitions.o
75        $(FC) $(FCFLAGS) module_basic.f90
76
77module_generic.o: module_definitions.o module_basic.o
78        $(FC) $(FCFLAGS) $(LIB_INC) module_generic.f90
79
80module_NCgeneric.o: module_definitions.o module_basic.o module_generic.o
81        $(FC) $(FCFLAGS) $(LIB_NETCDF) $(LIB_INC) module_NCgeneric.f90
82
83module_scientific.o: module_definitions.o module_basic.o module_generic.o
84        $(FC) $(FCFLAGS) module_scientific.f90
85
86module_ForDiagnosticsVars.o: module_definitions.o module_basic.o module_generic.o
87        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnosticsVars.f90
88
89module_ForDiagnostics.o: module_definitions.o module_basic.o module_generic.o module_ForDiagnosticsVars.o
90        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnostics.f90
91
92module_DistriCorrection.o: module_definitions.o module_basic.o module_generic.o module_scientific.o
93        $(FC) $(FCFLAGS) module_DistriCorrection.f90
94
95FCEXECFLAGS = $(MODULES) $(LIB_NETCDF) $(LIB_INC)
96
97interpolate.o: module_definitions.o module_basic.o module_generic.o module_scientific.o
98        $(FC) $(FCEXECFLAGS) interpolate.f90 -o interpolate
99
100DistriCorrection.o: module_definitions.o module_basic.o module_generic.o module_NCgeneric.o module_scientific.o module_DistriCorrection.o
101        $(FC) $(FCEXECFLAGS) DistriCorrection.f90 -o DistriCorrection
102
103pydistrimods.o:
104        $(F2PY) -c -I$(NCINCFOLD) -m module_ForDistriCorrect $(distrisrcs) -L$(NCLIBFOLD)
105
106pydiagmods.o:
107        $(F2PY) -c -I$(NCINCFOLD) -m module_ForDiag $(diagsrcs) -L$(NCLIBFOLD)
108
109pyintmods.o:
110        $(F2PY) -c -I$(NCINCFOLD) -m module_ForInt $(intsrcs) -L$(NCLIBFOLD)
111
112pyscimods.o:
113        $(F2PY) -c -I$(NCINCFOLD) -m module_ForSci $(scisrcs) -L$(NCLIBFOLD)
114
115pydefmods.o:
116        $(F2PY) -c -I$(NCINCFOLD) -m module_ForDef $(defsrcs) -L$(NCLIBFOLD)
117
118trajectories_overlap.o: module_definitions.o module_basic.o module_generic.o module_NCgeneric.o module_scientific.o
119        $(FC) $(FCEXECFLAGS) trajectories_overlap.f90 -o trajectories_overlap
120
Note: See TracBrowser for help on using the repository browser.