[1693] | 1 | # L. Fita, CIMA. October 2017 |
---|
| 2 | # Compilation of all required Fortran modules in `hydra' with gcc 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 | |
---|
| 12 | FC = /usr/bin/gfortran |
---|
| 13 | FCF = -c |
---|
| 14 | LIB_INC = |
---|
| 15 | RM = rm -f |
---|
| 16 | F2PY = /usr/bin/f2py2.7 |
---|
| 17 | #DBGFLAGS = g -Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan |
---|
| 18 | NCLIBFOLD = /usr/lib/x86_64-linux-gnu |
---|
| 19 | NCINCFOLD = /usr/include |
---|
| 20 | LIB_NETCDF = -L$(NCLIBFOLD) -lnetcdff -lnetcdf -I$(NCINCFOLD) |
---|
| 21 | |
---|
| 22 | FCFLAGS = $(FCF) $(DBGFLAGS) |
---|
| 23 | |
---|
| 24 | # Sources for f2py |
---|
| 25 | srcs = module_definitions.f90 module_basic.f90 module_generic.f90 module_scientific.f90 |
---|
| 26 | distrisrcs = $(srcs) module_DistriCorrection.f90 |
---|
| 27 | diagsrcs = $(srcs) module_ForDiagnosticsVars.f90 module_ForDiagnostics.f90 |
---|
| 28 | intsrcs = $(srcs) module_ForInterpolate.f90 |
---|
| 29 | scisrcs = $(srcs) |
---|
| 30 | defsrcs = module_definitions.f90 |
---|
| 31 | |
---|
| 32 | ####### ###### ##### #### ### ## # |
---|
| 33 | |
---|
| 34 | MODULES = \ |
---|
| 35 | module_definitions.o \ |
---|
| 36 | module_basic.o \ |
---|
| 37 | module_generic.o \ |
---|
| 38 | module_NCgeneric.o \ |
---|
| 39 | module_scientific.o \ |
---|
[1824] | 40 | module_ForInterpolate.o \ |
---|
[1693] | 41 | module_ForDiagnosticsVars.o \ |
---|
| 42 | module_ForDiagnostics.o \ |
---|
| 43 | module_DistriCorrection.o |
---|
| 44 | |
---|
[1824] | 45 | FINTMODULES = \ |
---|
| 46 | module_definitions.o \ |
---|
| 47 | module_basic.o \ |
---|
| 48 | module_generic.o \ |
---|
| 49 | module_scientific.o \ |
---|
| 50 | module_ForInterpolate.o |
---|
| 51 | |
---|
[1693] | 52 | all : \ |
---|
| 53 | module_ForDiagnostics.o \ |
---|
[1824] | 54 | interpolate.o \ |
---|
[1693] | 55 | DistriCorrection.o \ |
---|
| 56 | pydistrimods.o \ |
---|
| 57 | pydiagmods.o \ |
---|
| 58 | pyintmods.o \ |
---|
| 59 | pyscimods.o \ |
---|
| 60 | pydefmods.o \ |
---|
| 61 | trajectories_overlap.o |
---|
| 62 | |
---|
| 63 | diags : \ |
---|
| 64 | module_ForDiagnostics.o |
---|
| 65 | |
---|
| 66 | clean : |
---|
| 67 | $(RM) *.mod *.o interpolate module_ForDiag.so module_ForInt.so module_ForDistriCorrect.so module_ForSci.so module_ForDef.so |
---|
| 68 | |
---|
| 69 | ######## ####### |
---|
| 70 | ## |
---|
| 71 | ######## |
---|
| 72 | |
---|
| 73 | module_definitions.o: |
---|
| 74 | $(FC) $(FCFLAGS) module_definitions.f90 |
---|
| 75 | |
---|
| 76 | module_basic.o: module_definitions.o |
---|
| 77 | $(FC) $(FCFLAGS) module_basic.f90 |
---|
| 78 | |
---|
| 79 | module_generic.o: module_definitions.o module_basic.o |
---|
| 80 | $(FC) $(FCFLAGS) $(LIB_INC) module_generic.f90 |
---|
| 81 | |
---|
| 82 | module_NCgeneric.o: module_definitions.o module_basic.o module_generic.o |
---|
| 83 | $(FC) $(FCFLAGS) $(LIB_NETCDF) $(LIB_INC) module_NCgeneric.f90 |
---|
| 84 | |
---|
| 85 | module_scientific.o: module_definitions.o module_basic.o module_generic.o |
---|
| 86 | $(FC) $(FCFLAGS) module_scientific.f90 |
---|
| 87 | |
---|
[1824] | 88 | module_ForInterpolate.o: module_definitions.o module_generic.o |
---|
| 89 | $(FC) $(FCFLAGS) $(LIB_INC) module_ForInterpolate.f90 |
---|
| 90 | |
---|
[1693] | 91 | module_ForDiagnosticsVars.o: module_definitions.o module_basic.o module_generic.o |
---|
| 92 | $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnosticsVars.f90 |
---|
| 93 | |
---|
| 94 | module_ForDiagnostics.o: module_definitions.o module_basic.o module_generic.o module_ForDiagnosticsVars.o |
---|
| 95 | $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnostics.f90 |
---|
| 96 | |
---|
| 97 | module_DistriCorrection.o: module_definitions.o module_basic.o module_generic.o module_scientific.o |
---|
| 98 | $(FC) $(FCFLAGS) module_DistriCorrection.f90 |
---|
| 99 | |
---|
[1824] | 100 | FCEXEFINTCFLAGS = $(FINTMODULES) $(LIB_NETCDF) $(LIB_INC) |
---|
[1693] | 101 | FCEXECFLAGS = $(MODULES) $(LIB_NETCDF) $(LIB_INC) |
---|
| 102 | |
---|
[1824] | 103 | interpolate.o: module_definitions.o module_basic.o module_generic.o module_scientific.o module_ForInterpolate.o |
---|
| 104 | $(FC) $(FCEXEFINTCFLAGS) interpolate.f90 -o interpolate |
---|
[1693] | 105 | |
---|
| 106 | DistriCorrection.o: module_definitions.o module_basic.o module_generic.o module_NCgeneric.o module_scientific.o module_DistriCorrection.o |
---|
| 107 | $(FC) $(FCEXECFLAGS) DistriCorrection.f90 -o DistriCorrection |
---|
| 108 | |
---|
| 109 | pydistrimods.o: |
---|
| 110 | $(F2PY) -c -I$(NCINCFOLD) -m module_ForDistriCorrect $(distrisrcs) -L$(NCLIBFOLD) |
---|
| 111 | |
---|
| 112 | pydiagmods.o: |
---|
| 113 | $(F2PY) -c -I$(NCINCFOLD) -m module_ForDiag $(diagsrcs) -L$(NCLIBFOLD) |
---|
| 114 | |
---|
| 115 | pyintmods.o: |
---|
| 116 | $(F2PY) -c -I$(NCINCFOLD) -m module_ForInt $(intsrcs) -L$(NCLIBFOLD) |
---|
| 117 | |
---|
| 118 | pyscimods.o: |
---|
| 119 | $(F2PY) -c -I$(NCINCFOLD) -m module_ForSci $(scisrcs) -L$(NCLIBFOLD) |
---|
| 120 | |
---|
| 121 | pydefmods.o: |
---|
| 122 | $(F2PY) -c -I$(NCINCFOLD) -m module_ForDef $(defsrcs) -L$(NCLIBFOLD) |
---|
| 123 | |
---|
| 124 | trajectories_overlap.o: module_definitions.o module_basic.o module_generic.o module_NCgeneric.o module_scientific.o |
---|
| 125 | $(FC) $(FCEXECFLAGS) trajectories_overlap.f90 -o trajectories_overlap |
---|