-
Notifications
You must be signed in to change notification settings - Fork 5
/
makefile_core
125 lines (91 loc) · 4.9 KB
/
makefile_core
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Makefile for C2Ray_3D.
#
# Author: Garrelt Mellema
# This partial Makefile is used to make different versions of C2Ray_3D.
# These versions differ in their parallelization and/or
# in their connection to specific N-body results.
#
# Note 1: Parallelization
# The parallelization intended is specified in the name
# of the executable: _omp means OpenMP (shared memory),
# _mpi means MPI (distributed memory). Both can also be
# used at the same time (if your architecture supports
# it.
#
# Note 2: N-body module
# Different versions exist with different Nbody interfaces:
# pmfast - interface to older pmfast simulations
# cubep3m - interface to cubep3m simulations
# LG - interface to Local Group simulations (GADGET)
# Gadget - interface to LOFAR EoR GADGET simulations (not working)
#
#-------------------------------------------------------
UTILS=mrgrnk.o ctrper.o romberg.o report_memory.o file_admin.o read_sm3d.o
CONSTANTS = mathconstants.o cgsconstants.o cgsastroconstants.o c2ray_parameters.o cgsphotoconstants.o cosmoparms.o abundances.o atomic.o sed_parameters.o
RADIATION = radiation_sizes.o radiation_sed_parameters.o radiation_tables.o sourceprops.o radiation_photoionrates.o
EVOLVE = evolve_data.o column_density.o evolve_point.o evolve_source.o master_slave.o evolve.o
MATERIAL = density_module.o clumping_module.o LLS.o temperature_module.o ionfractions_module.o material.o
MPI_PREAMBLE = precision.o $(CONSTANTS) $(UTILS) sizes.o mpi.o
NO_MPI_PREAMBLE = precision.o $(CONSTANTS) $(UTILS) sizes.o no_mpi.o
#--------TEST----------------------------------------------------------------
TEST_SET = clocks.o nbody_test.o grid.o tped.o $(MATERIAL) cosmology.o cooling.o $(RADIATION) thermal.o time_module.o doric.o photonstatistics.o $(EVOLVE) output.o C2Ray.o
C2Ray_3D_test_periodic: F90=$(FC)
C2Ray_3D_test_periodic: F90FLAGS = $(F90FLAGS1)
C2Ray_3D_test_periodic: $(NO_MPI_PREAMBLE) $(TEST_SET)
$(F90) $(F90FLAGS) -o $@ $(NO_MPI_PREAMBLE) $(TEST_SET)
C2Ray_3D_test_periodic_mpi: F90=$(MPIFC)
C2Ray_3D_test_periodic_mpi: F90FLAGS = $(F90FLAGS1) $(MPI_FLAGS)
C2Ray_3D_test_periodic_mpi: $(MPI_PREAMBLE) $(TEST_SET)
$(F90) $(F90FLAGS) -o $@ $(MPI_PREAMBLE) $(TEST_SET)
C2Ray_3D_test_periodic_omp: F90=$(FC)
C2Ray_3D_test_periodic_omp: F90FLAGS = $(F90FLAGS1) $(OPENMP_FLAGS)
C2Ray_3D_test_periodic_omp: $(NO_MPI_PREAMBLE) $(TEST_SET)
$(F90) $(F90FLAGS) -o $@ $(NO_MPI_PREAMBLE) $(TEST_SET)
#--------CUBEP3M-------------------------------------------------------------
CUBEP3M_SET = clocks.o nbody_cubep3m.o grid.o tped.o $(MATERIAL) cosmology.o cooling.o $(RADIATION) thermal.o time_module.o doric.o photonstatistics.o $(EVOLVE) output.o C2Ray.o
C2Ray_3D_cubep3m_periodic: F90=$(FC)
C2Ray_3D_cubep3m_periodic: F90FLAGS = $(F90FLAGS1)
C2Ray_3D_cubep3m_periodic: $(NO_MPI_PREAMBLE) $(CUBEP3M_SET)
$(F90) $(F90FLAGS) -o $@ $(NO_MPI_PREAMBLE) $(CUBEP3M_SET)
C2Ray_3D_cubep3m_periodic_mpi: F90=$(MPIFC)
C2Ray_3D_cubep3m_periodic_mpi: F90FLAGS = $(F90FLAGS1) $(MPI_FLAGS)
C2Ray_3D_cubep3m_periodic_mpi: $(MPI_PREAMBLE) $(CUBEP3M_SET)
$(F90) $(F90FLAGS) -o $@ $(MPI_PREAMBLE) $(CUBEP3M_SET)
C2Ray_3D_cubep3m_periodic_omp: F90=$(FC)
C2Ray_3D_cubep3m_periodic_omp: F90FLAGS = $(F90FLAGS1) $(OPENMP_FLAGS)
C2Ray_3D_cubep3m_periodic_omp: $(NO_MPI_PREAMBLE) $(CUBEP3M_SET)
$(F90) $(F90FLAGS) -o $@ $(NO_MPI_PREAMBLE) $(CUBEP3M_SET)
C2Ray_3D_cubep3m_periodic_omp_mpi: F90=$(MPIFC)
C2Ray_3D_cubep3m_periodic_omp_mpi: F90FLAGS = $(F90FLAGS1) $(OPENMP_FLAGS) $(MPI_FLAGS)
C2Ray_3D_cubep3m_periodic_omp_mpi: $(MPI_PREAMBLE) $(CUBEP3M_SET)
$(F90) $(F90FLAGS) -o $@ $(MPI_PREAMBLE) $(CUBEP3M_SET)
#--------LG------------------------------------------------------------------
LG_SET = clocks.o nbody_LG.o grid.o tped.o $(MATERIAL) cosmology.o cooling.o $(RADIATION) thermal.o time_module.o doric.o photonstatistics.o $(EVOLVE) output.o C2Ray.o
C2Ray_3D_LG_periodic: F90=$(FC)
C2Ray_3D_LG_periodic: F90FLAGS = $(F90FLAGS1)
C2Ray_3D_LG_periodic: $(NO_MPI_PREAMBLE) $(LG_SET)
$(F90) $(F90FLAGS) -o $@ $(NO_MPI_PREAMBLE) $(LG_SET)
C2Ray_3D_LG_periodic_mpi: F90=$(MPIFC)
C2Ray_3D_LG_periodic_mpi: F90FLAGS = $(F90FLAGS1) $(MPI_FLAGS)
C2Ray_3D_LG_periodic_mpi: $(MPI_PREAMBLE) $(LG_SET)
$(F90) $(F90FLAGS) -o $@ $(MPI_PREAMBLE) $(LG_SET)
C2Ray_3D_LG_periodic_omp: F90=$(FC)
C2Ray_3D_LG_periodic_omp: F90FLAGS = $(F90FLAGS1) $(OPENMP_FLAGS)
C2Ray_3D_LG_periodic_omp: $(NO_MPI_PREAMBLE) $(LG_SET)
$(F90) $(F90FLAGS) -o $@ $(NO_MPI_PREAMBLE) $(LG_SET)
C2Ray_3D_LG_periodic_omp_mpi: F90=$(MPIFC)
C2Ray_3D_LG_periodic_omp_mpi: F90FLAGS = $(F90FLAGS1) $(OPENMP_FLAGS) $(MPI_FLAGS)
C2Ray_3D_LG_periodic_omp_mpi: $(MPI_PREAMBLE) $(LG_SET)
$(F90) $(F90FLAGS) -o $@ $(MPI_PREAMBLE) $(LG_SET)
#--------GADGET-------------------------------------------------------------------------------
clean :
rm -f *.o *.mod *.l *.il *.lst
.f.o:
$(F90) -c $(F90FLAGS) $<
.f90.o:
$(F90) -c $(F90FLAGS) $<
.F90.o:
$(F90) -c $(F90FLAGS) $<
f.mod:
$(F90) -c $(F90FLAGS) $<
.SUFFIXES: .f90 .F90 .mod .o