~reducedmodelling/fluidity/ROM_Non-intrusive-ann

« back to all changes in this revision

Viewing changes to femtools/Makefile

  • Committer: fangf at ac
  • Date: 2012-11-06 12:21:31 UTC
  • mto: This revision was merged to the branch mainline in revision 3989.
  • Revision ID: fangf@imperial.ac.uk-20121106122131-u2zvt7fxc1r3zeou
updated

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#    Copyright (C) 2006 Imperial College London and others.
 
2
#
 
3
#    Please see the AUTHORS file in the main source directory for a full list
 
4
#    of copyright holders.
 
5
#
 
6
#    Prof. C Pain
 
7
#    Applied Modelling and Computation Group
 
8
#    Department of Earth Science and Engineering
 
9
#    Imperial College London
 
10
#
 
11
#    amcgsoftware@imperial.ac.uk
 
12
#
 
13
#    This library is free software; you can redistribute it and/or
 
14
#    modify it under the terms of the GNU Lesser General Public
 
15
#    License as published by the Free Software Foundation,
 
16
#    version 2.1 of the License.
 
17
#
 
18
#    This library is distributed in the hope that it will be useful,
 
19
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
21
#    Lesser General Public License for more details.
 
22
#
 
23
#    You should have received a copy of the GNU Lesser General Public
 
24
#    License along with this library; if not, write to the Free Software
 
25
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 
26
#    USA
 
27
 
 
28
SHELL = /bin/bash
 
29
 
 
30
PACKAGE_NAME = fluidity
 
31
FLUIDITY = $(PACKAGE_NAME)
 
32
 
 
33
FC      = mpif90
 
34
FCFLAGS = -I../include -J../include -I/usr/include/vtk-5.8  -I/usr/include/python2.7 -DHAVE_NUMPY -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/ -I/usr/local/include/  -I/include -I/include/libadjoint -I/usr/include/ -I/usr/local/include/ -I/usr/include/libadjoint -I/usr/local/include/libadjoint -I/usr/lib/petscdir/3.1/linux-gnu-c-opt/include -I/usr/lib/petscdir/3.1/include -I/usr/include -I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib -I/usr/include/spooles -I/usr/include/scotch -I/usr/lib -I/usr/include/suitesparse -DHAVE_PETSC -DHAVE_VTK=1 -fbounds-check -Wall -Wimplicit-interface -Wno-surprising -g -O0 -frecord-marker=4 -DHAVE_NUMPY -I/usr/lib/python2.7/dist-packages/numpy/core/include -ffree-line-length-none -ffixed-line-length-none -finit-integer=-66666 -finit-real=nan  -I/usr/lib/petscdir/3.1/linux-gnu-c-opt/include -I/usr/lib/petscdir/3.1/include -I/usr/include -I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib -I/usr/include/spooles -I/usr/include/scotch -I/usr/lib -I/usr/include/suitesparse -fdefault-real-8 -fdefault-double-8  -I../libwm -I/usr/local/include -I./
 
35
 
 
36
MPIF90  = mpif90
 
37
 
 
38
CC      = mpicc
 
39
CFLAGS  = -I/usr/include/vtk-5.8  -I/usr/include/python2.7 -DHAVE_NUMPY -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/ -I/usr/local/include/  -I/include -I/include/libadjoint -I/usr/include/ -I/usr/local/include/ -I/usr/include/libadjoint -I/usr/local/include/libadjoint -I/usr/lib/petscdir/3.1/linux-gnu-c-opt/include -I/usr/lib/petscdir/3.1/include -I/usr/include -I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib -I/usr/include/spooles -I/usr/include/scotch -I/usr/lib -I/usr/include/suitesparse -DHAVE_PETSC -DHAVE_VTK=1 -fbounds-check -Wall -g -O0 -I/usr/include/python2.7 -DHAVE_NUMPY -I/usr/lib/python2.7/dist-packages/numpy/core/include -I../include -I../libwm -I/usr/local/include
 
40
 
 
41
CXX     = mpicxx
 
42
CXXFLAGS= -I/usr/include/vtk-5.8  -I/usr/include/python2.7 -DHAVE_NUMPY -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/ -I/usr/local/include/  -I/include -I/include/libadjoint -I/usr/include/ -I/usr/local/include/ -I/usr/include/libadjoint -I/usr/local/include/libadjoint -I/usr/lib/petscdir/3.1/linux-gnu-c-opt/include -I/usr/lib/petscdir/3.1/include -I/usr/include -I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib -I/usr/include/spooles -I/usr/include/scotch -I/usr/lib -I/usr/include/suitesparse -DHAVE_PETSC -DHAVE_VTK=1 -fbounds-check -Wall -g -O0 -I/usr/include/python2.7 -DHAVE_NUMPY -I/usr/lib/python2.7/dist-packages/numpy/core/include -I../include -I../libwm  -I../libvtkfortran/include -I/usr/local/include
 
43
 
 
44
LINKER  = mpicxx -rdynamic   
 
45
 
 
46
MAKE    = make
 
47
 
 
48
AR = ar
 
49
ARFLAGS = cr
 
50
 
 
51
UNROLL_LOOPS = -funroll-loops
 
52
 
 
53
LIB = ../lib/lib$(FLUIDITY).a
 
54
 
 
55
F90LIB = libfemtools.a
 
56
 
 
57
LIBS    = -L../lib -l$(FLUIDITY) -lmba2d -lvtkIO -lvtkGraphics -lvtkFiltering -lvtkCommon -lvtksys -ldl -larpack -lnetcdff -lnetcdf -llapack -lblas -ludunits2 -lpthread -lm -lstdc++ -L/usr/lib -lpython2.7 -Xlinker -export-dynamic -Wl,-O0 -Wl,-Bsymbolic-functions -lssl -lcrypto -lssl -lcrypto -L/usr/lib -lz -lpthread -ldl -lutil -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lgfortran -lm -lquadmath -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lgfortran -lm -lquadmath -lnetcdf -lnetcdff -L/lib -lparmetis -lmetis -L/usr/lib -L/usr/local/lib/ -lzoltan -lparmetis -lmetis -L/lib -L/usr/lib -L/usr/local/lib/ -ladjoint -L/usr/lib/petscdir/3.1/linux-gnu-c-opt/lib -L/usr/lib/petscdir/3.1/linux-gnu-c-opt/lib -L/usr/lib/petscdir/3.1/linux-gnu-c-opt/lib -lpetsc -lX11 -L/usr/lib -ldmumps -lzmumps -lsmumps -lcmumps -lmumps_common -lpord -lscalapack-openmpi -lblacsCinit-openmpi -lblacs-openmpi -lspooles -lHYPRE -lHYPRE_utilities -lHYPRE_multivector -lHYPRE_krylov -lHYPRE_struct_mv -lHYPRE_struct_ls -lHYPRE_sstruct_mv -lHYPRE_sstruct_ls -lHYPRE_seq_mv -lHYPRE_parcsr_mv -lHYPRE_parcsr_block_mv -lHYPRE_DistributedMatrix -lHYPRE_MatrixMatrix -lHYPRE_IJ_mv -lHYPRE_Euclid -lHYPRE_ParaSails -lHYPRE_DistributedMatrixPilutSolver -lHYPRE_parcsr_ls -lHYPRE_FEI_fgmres -lHYPRE_mli -lHYPRE_FEI -lscotch -lhdf5_fortran -lhdf5 -lz -lumfpack -lamd -llapack -lblas -L/usr/lib/openmpi/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -ldl -lmpi -lopen-rte -lopen-pal -lnsl -lutil -lgcc_s -lpthread -lmpi_f90 -lmpi_f77 -lgfortran -lm -lgfortran -lm -lgfortran -lm -lm -lquadmath -lm -lmpi_cxx -lstdc++ -ldl -lmpi -lopen-rte -lopen-pal -lnsl -lutil -lgcc_s -lpthread -ldl -L./lib  -lblas  -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lgfortran -lm -lquadmath
 
58
 
 
59
TESTLIBS = $(shell echo -lmba2d -lvtkIO -lvtkGraphics -lvtkFiltering -lvtkCommon -lvtksys -ldl -larpack -lnetcdff -lnetcdf -llapack -lblas -ludunits2 -lpthread -lm -lstdc++ -L/usr/lib -lpython2.7 -Xlinker -export-dynamic -Wl,-O0 -Wl,-Bsymbolic-functions -lssl -lcrypto -lssl -lcrypto -L/usr/lib -lz -lpthread -ldl -lutil -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lgfortran -lm -lquadmath -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lgfortran -lm -lquadmath -lnetcdf -lnetcdff -L/lib -lparmetis -lmetis -L/usr/lib -L/usr/local/lib/ -lzoltan -lparmetis -lmetis -L/lib -L/usr/lib -L/usr/local/lib/ -ladjoint -L/usr/lib/petscdir/3.1/linux-gnu-c-opt/lib -L/usr/lib/petscdir/3.1/linux-gnu-c-opt/lib -L/usr/lib/petscdir/3.1/linux-gnu-c-opt/lib -lpetsc -lX11 -L/usr/lib -ldmumps -lzmumps -lsmumps -lcmumps -lmumps_common -lpord -lscalapack-openmpi -lblacsCinit-openmpi -lblacs-openmpi -lspooles -lHYPRE -lHYPRE_utilities -lHYPRE_multivector -lHYPRE_krylov -lHYPRE_struct_mv -lHYPRE_struct_ls -lHYPRE_sstruct_mv -lHYPRE_sstruct_ls -lHYPRE_seq_mv -lHYPRE_parcsr_mv -lHYPRE_parcsr_block_mv -lHYPRE_DistributedMatrix -lHYPRE_MatrixMatrix -lHYPRE_IJ_mv -lHYPRE_Euclid -lHYPRE_ParaSails -lHYPRE_DistributedMatrixPilutSolver -lHYPRE_parcsr_ls -lHYPRE_FEI_fgmres -lHYPRE_mli -lHYPRE_FEI -lscotch -lhdf5_fortran -lhdf5 -lz -lumfpack -lamd -llapack -lblas -L/usr/lib/openmpi/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -ldl -lmpi -lopen-rte -lopen-pal -lnsl -lutil -lgcc_s -lpthread -lmpi_f90 -lmpi_f77 -lgfortran -lm -lgfortran -lm -lgfortran -lm -lm -lquadmath -lm -lmpi_cxx -lstdc++ -ldl -lmpi -lopen-rte -lopen-pal -lnsl -lutil -lgcc_s -lpthread -ldl -L./lib  | sed 's@./lib/lib\([a-z]*\)\.a@-l\1@g')
 
60
 
 
61
OBJS = Dgtools.o Coordinates.o EventCounter.o \
 
62
  Elements.o Sparse_Tools.o Quadrature.o Quadrature_Test.o Futils.o             \
 
63
  Polynomials.o Adjacency_Lists.o Element_Numbering.o Global_Numbering.o \
 
64
  Shape_Functions.o Shape_Functions_Test.o Signals.o Signal_Vars.o signal_handlers.o            \
 
65
  Global_Parameters.o Timers.o Transform_elements.o VTK_interfaces.o \
 
66
  Fields.o FETools.o FEFields.o Vector_Tools.o Read_Triangle.o \
 
67
  Timers.o Transform_elements.o Petsc_Tools.o Solvers.o Linked_Lists.o  \
 
68
  Sparsity_Patterns.o Sparsity_Patterns_Meshes.o State.o Tensors.o \
 
69
  Superconvergence.o Unittest_tools.o Fields_Data_Types.o Multigrid.o   \
 
70
  ieee_arithmetic_dummy.o ieee_arithmetic_C99.o Diagnostic_variables.o  \
 
71
  Diagnostic_Fields.o SampleNetCDF_fortran.o \
 
72
  AuxilaryOptions.o MeshDiagnostics.o VTK_interfaces.o Surface_Labels.o \
 
73
  ISCopyIndices.o Colouring.o \
 
74
  Field_derivatives.o Node_boundary.o Parallel_fields.o \
 
75
  Vector_set.o Element_set.o vecset.o intvecset.o eleset.o \
 
76
  Matrix_Norms.o embed_python.o Embed_Python_Fortran.o \
 
77
  external_function.o Reference_Counting.o \
 
78
  Tokenize.o Boundary_Conditions.o Write_Triangle.o \
 
79
  tictoc.o \
 
80
  CVTools.o CV_Fields.o CV_Face_Values.o CV_Upwind_Values.o CV_Shape_Functions.o CV_Faces.o \
 
81
  CV_Options.o Metric_tools.o \
 
82
  Merge_tensors.o Write_State.o Field_Options.o \
 
83
  Fields_Base.o Fields_Allocates.o Fields_Calculations.o Fields_Manipulation.o \
 
84
  Sparse_Matrices_Fields.o Unittest_Tools_Cpp.o Adaptive_Timestepping.o \
 
85
  Checkpoint.o Surface_Integrals.o\
 
86
  python_state.o python_statec.o Dynamic_Bin_Sort.o \
 
87
  Supermesh.o Supermesh_Assembly.o Conservative_interpolation.o \
 
88
  Interpolation.o Pseudo_Consistent_Interpolation.o Pseudo_2D.o DG_interpolation.o \
 
89
  Halo_Data_Types.o Halos.o Halos_Allocates.o Halos_Base.o \
 
90
  Halos_Communications.o Halos_Debug.o Halos_Derivation.o Halos_IO.o \
 
91
  Halos_Numbering.o Halos_Ownership.o Halos_Registration.o Halos_Repair.o \
 
92
  qsortd.o Element_Intersection.o Intersection_finder.o tri_predicate.o \
 
93
  tet_predicate.o Lagrangian_Remap.o Weak_BCs.o \
 
94
  Detector_Data_Types.o Detector_Tools.o \
 
95
  Detector_Parallel.o Detector_Move_Lagrangian.o \
 
96
  Picker_Data_Types.o Pickers.o Pickers_Allocates.o \
 
97
  Pickers_Base.o Pickers_Deallocates.o Pickers_Inquire.o Smoothing_module.o \
 
98
  vtk_read_files.o State_Fields.o Unify_meshes.o Adaptive_interpolation.o \
 
99
  Wandzura_Quadrature.o Grundmann_Moeller_Quadrature.o Bound_field.o \
 
100
  Halos_Diagnostics.o Mixing_Statistics.o projections.o Memory_Diagnostics.o \
 
101
  Sparse_Tools_Petsc.o C_Interfaces.o C_Interfaces_Fortran.o Tetrahedron_intersection.o \
 
102
  Node_Owner_Finder.o Node_Owner_Finder_Fortran.o Node_Ownership.o \
 
103
  Data_structures.o Data_structures_C.o Integer_set.o Integer_hash_table.o \
 
104
  CGAL_Tools_C.o CGAL_Tools.o \
 
105
  Rotated_Boundary_Conditions.o MPI_Interfaces.o Parallel_Tools.o \
 
106
  Fields_Halos.o Profiler.o Profiler_Fortran.o Streamfunction.o \
 
107
  GMSH_Common.o Read_GMSH.o Write_GMSH.o Mesh_Files.o
 
108
 
 
109
 
 
110
# objects to be included in libfemtools:
 
111
F90LIB_OBJS := ../debug/*.o ../libwm/*.o  \
 
112
  $(OBJS)
 
113
ifeq (,yes)
 
114
F90LIB_OBJS := $(F90LIB_OBJS) ../libalgencan/*.o
 
115
endif
 
116
 
 
117
.SUFFIXES: .F90 .cpp .c .o .a
 
118
 
 
119
.PHONY: ../include/version.h
 
120
 
 
121
# cancel implicit rule that tries to make .o from .mod with m2c:
 
122
%.o: %.mod
 
123
 
 
124
.F90.o:
 
125
        @echo "        FC $<"
 
126
        $(FC) $(FCFLAGS)  $(GENFLAGS) -c $< 
 
127
.c.o:
 
128
        @echo "        CC $<"
 
129
        $(CC) $(CFLAGS) -c $<
 
130
.cpp.o:
 
131
        @echo "        CXX $<"
 
132
        $(CXX) $(CXXFLAGS) -c $<
 
133
 
 
134
$(LIB): $(OBJS)
 
135
        @mkdir -p ../lib
 
136
 
 
137
default: $(LIB)
 
138
 
 
139
$(F90LIB): $(F90LIB_OBJS)
 
140
        @mkdir -p ../lib
 
141
        $(AR) $(ARFLAGS) $@ $(F90LIB_OBJS)
 
142
 
 
143
libfemtools: $(F90LIB)
 
144
 
 
145
clean:
 
146
        rm -f *.o *.d *.mod Reference_count_*.F90 $(F90LIB)
 
147
 
 
148
../include/version.h:
 
149
        @$(MAKE) -C ../ include/version.h
 
150
 
 
151
Reference_count_%.F90: Reference_count_interface_%.F90
 
152
        @true
 
153
 
 
154
Reference_count_interface_%.F90: Refcount_templates.F90 Refcount_interface_templates.F90
 
155
        @sed 's/REFCOUNT_TYPE/$*/' Refcount_templates.F90 > Reference_count_$*.F90
 
156
        @sed 's/REFCOUNT_TYPE/$*/' Refcount_interface_templates.F90 > Reference_count_interface_$*.F90
 
157
 
 
158
test_projections: projections.cpp
 
159
        $(CXX) $(CXXFLAGS) -DPROJECTIONS_UNIT_TEST -o $@ $^ $(LIBS)
 
160
 
 
161
Conservative_interpolation.o: Conservative_interpolation.F90 
 
162
        @echo "        FC $<"
 
163
        $(FC) $(FCFLAGS) $(UNROLL_LOOPS) $(GENFLAGS) -c $< || (rm $(LIB) && false)
 
164
 
 
165
FETools.o: FETools.F90 
 
166
        @echo "        FC $<"
 
167
        $(FC) $(FCFLAGS) $(UNROLL_LOOPS) $(GENFLAGS) -c $< || (rm $(LIB) && false)
 
168
 
 
169
# The refcount template dependencies are not actually needed for
 
170
# Reference_counting.o but they are needed by everything which depends on
 
171
# Reference_counting.o
 
172
Reference_Counting.o: \
 
173
  Refcount_templates.F90 Refcount_interface_templates.F90
 
174
 
 
175
test_element_numbering:test_element_numbering.F90 
 
176
        $(FC) $(FCFLAGS) -o $@ $^
 
177
 
 
178
testshapefunctions:testshapefunctions.F90 
 
179
        $(FC) $(FCFLAGS) -o $@ $^
 
180
 
 
181
testvectortools:testvectortools.F90 
 
182
        $(FC) $(FCFLAGS) -o $@ $^ $(LIBS)
 
183
 
 
184
test_laplacian:test_laplacian.F90 
 
185
        $(FC) $(FCFLAGS) -o $@ $^ $(LIBS)
 
186
 
 
187
include Makefile.dependencies