Makefile.am 4.74 KB
Newer Older
1
# This file is part of SWIFT.
2
# Copyright (c) 2012 Pedro Gonnet (pedro.gonnet@durham.ac.uk),
3
#                    Matthieu Schaller (matthieu.schaller@durham.ac.uk).
4
#
Pedro Gonnet's avatar
Pedro Gonnet committed
5
6
7
8
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
9
#
Pedro Gonnet's avatar
Pedro Gonnet committed
10
11
12
13
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
14
#
Pedro Gonnet's avatar
Pedro Gonnet committed
15
16
17
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

Pedro Gonnet's avatar
Pedro Gonnet committed
18
19
20
# Common flags
MYFLAGS = -DTIMER

Pedro Gonnet's avatar
Pedro Gonnet committed
21
# Add the source directory and debug to CFLAGS
22
AM_CFLAGS = -I$(top_srcdir)/src $(HDF5_CPPFLAGS)
Pedro Gonnet's avatar
Pedro Gonnet committed
23

24
AM_LDFLAGS = $(HDF5_LDFLAGS)
25

26
# Extra libraries.
Peter W. Draper's avatar
Peter W. Draper committed
27
EXTRA_LIBS = $(HDF5_LIBS) $(FFTW_LIBS) $(PROFILER_LIBS) $(TCMALLOC_LIBS) $(JEMALLOC_LIBS)
28

29
# MPI libraries.
30
MPI_LIBS = $(METIS_LIBS) $(MPI_THREAD_LIBS)
31
MPI_FLAGS = -DWITH_MPI $(METIS_INCS)
32

33
# Programs.
34
bin_PROGRAMS = swift
Pedro Gonnet's avatar
Pedro Gonnet committed
35

36
37
# Build MPI versions as well?
if HAVEMPI
38
bin_PROGRAMS += swift_mpi
39
40
endif

41
42
43
44
45
# engine_policy_setaffinity is available?
if HAVESETAFFINITY
ENGINE_POLICY_SETAFFINITY=| engine_policy_setaffinity
else
ENGINE_POLICY_SETAFFINITY=
46
47
endif

48
49
# Sources for swift
swift_SOURCES = main.c
50
swift_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) -DENGINE_POLICY="engine_policy_keep $(ENGINE_POLICY_SETAFFINITY)"
51
swift_LDADD =  ../src/.libs/libswiftsim.a $(EXTRA_LIBS)
Pedro Gonnet's avatar
Pedro Gonnet committed
52

53
# Sources for swift_mpi, do we need an affinity policy for MPI?
54
swift_mpi_SOURCES = main.c
55
swift_mpi_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) $(MPI_FLAGS) -DENGINE_POLICY="engine_policy_keep $(ENGINE_POLICY_SETAFFINITY)"
56
swift_mpi_LDADD =  ../src/.libs/libswiftsim_mpi.a $(MPI_LIBS) $(EXTRA_LIBS)
57

58
# Scripts to generate ICs
59
EXTRA_DIST = BigCosmoVolume/makeIC.py \
60
	     BigPerturbedBox/makeIC_fcc.py \
61
	     CosmoVolume/cosmoVolume.yml CosmoVolume/getIC.sh CosmoVolume/run.sh \
62
	     CoolingBox/coolingBox.yml CoolingBox/energy_plot.py CoolingBox/makeIC.py CoolingBox/run.sh \
63
64
65
	     EAGLE_12/eagle_12.yml EAGLE_12/getIC.sh EAGLE_12/README EAGLE_12/run.sh \
	     EAGLE_25/eagle_25.yml EAGLE_25/getIC.sh EAGLE_25/README EAGLE_25/run.sh \
	     EAGLE_50/eagle_50.yml EAGLE_50/getIC.sh EAGLE_50/README EAGLE_50/run.sh \
66
	     ExternalPointMass/externalPointMass.yml ExternalPointMass/makeIC.py ExternalPointMass/run.sh ExternalPointMass/energy_plot.py \
67
	     GreshoVortex_2D/getGlass.sh GreshoVortex_2D/gresho.yml GreshoVortex_2D/makeIC.py GreshoVortex_2D/plotSolution.py GreshoVortex_2D/run.sh \
68
	     HydrostaticHalo/README HydrostaticHalo/hydrostatic.yml HydrostaticHalo/makeIC.py HydrostaticHalo/run.sh \
69
	     HydrostaticHalo/density_profile.py HydrostaticHalo/velocity_profile.py HydrostaticHalo/internal_energy_profile.py HydrostaticHalo/test_energy_conservation.py \
70
	     IsothermalPotential/README IsothermalPotential/run.sh IsothermalPotential/energy_plot.py IsothermalPotential/isothermal.yml IsothermalPotential/makeIC.py \
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
	     KelvinHelmholtz_2D/kelvinHelmholtz.yml KelvinHelmholtz_2D/makeIC.py KelvinHelmholtz_2D/plotSolution.py KelvinHelmholtz_2D/run.sh \
	     MultiTypes/makeIC.py  MultiTypes/multiTypes.yml MultiTypes/run.sh \
	     PerturbedBox_2D/makeIC.py PerturbedBox_2D/perturbedPlane.yml \
	     PerturbedBox_3D/makeIC.py PerturbedBox_3D/perturbedBox.yml PerturbedBox_3D/run.sh \
	     SedovBlast_1D/makeIC.py SedovBlast_1D/plotSolution.py SedovBlast_1D/run.sh SedovBlast_1D/sedov.yml \
	     SedovBlast_2D/getGlass.sh SedovBlast_2D/makeIC.py SedovBlast_2D/plotSolution.py SedovBlast_2D/run.sh SedovBlast_2D/sedov.yml \
	     SedovBlast_3D/getGlass.sh SedovBlast_3D/makeIC.py SedovBlast_3D/plotSolution.py SedovBlast_3D/run.sh SedovBlast_3D/sedov.yml \
	     SodShock_1D/makeIC.py SodShock_1D/plotSolution.py SodShock_1D/run.sh SodShock_1D/sodShock.yml \
	     SodShock_2D/getGlass.sh SodShock_2D/makeIC.py SodShock_2D/plotSolution.py SodShock_2D/run.sh SodShock_2D/sodShock.yml \
	     SodShock_3D/getGlass.sh SodShock_3D/makeIC.py SodShock_3D/plotSolution.py SodShock_3D/run.sh SodShock_3D/sodShock.yml \
	     SquareTest_2D/makeIC.py SquareTest_2D/plotSolution.py SquareTest_2D/run.sh SquareTest_2D/square.yml \
	     UniformBox_2D/makeIC.py UniformBox_2D/run.sh UniformBox_2D/uniformPlane.yml \
	     UniformBox_3D/makeICbig.py UniformBox_3D/makeIC.py UniformBox_3D/run.sh UniformBox_3D/uniformBox.yml \
	     UniformDMBox/makeIC.py

# Default parameter file
EXTRA_DIST += parameter_example.yml
88
89
90
91

# Scripts to plot task graphs
EXTRA_DIST += plot_tasks_MPI.py plot_tasks.py \
	      process_plot_tasks_MPI process_plot_tasks
92

93
94
95
# Script for scaling plot
EXTRA_DIST += plot_scaling_results.py