Newer
Older
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
124
## P-Fkp Makefile ##
SHELL = /bin/bash
# Target Computer
ifndef SYSTYPE
SYSTYPE := $(shell hostname)
endif
#Std systype
CC = mpicc
OPTIMIZE = -O3 -m64
MPI_LIBS =
MPI_INCL =
GSL_INCL = -I/homes/gheller/Pleiadi/gsl-2.7.1/build/include/ -I/homes/gheller/Pleiadi/hdf5-1.12.1/build/include/
GSL_LIBS = -L/homes/gheller/Pleiadi/gsl-2.7.1/build/lib/
HDF5_LIBS = -L/homes/gheller/Pleiadi/hdf5-1.12.1/build/lib/
PGPLOT_INCL =
PGPLOT_LIBS =
ifeq ($(SYSTYPE),MSI)
CC = mpicc -cc=icc
OPTIMIZE = -O0 -Wall -g -xHost
MPI_LIBS = -lmpi -lrt -L$(LD_LIBRARY_PATH)
MPI_INCL = -I$(INCLUDE)
GSL_INCL =
GSL_LIBS =
PGPLOT_INCL =
PGPLOT_LIBS =
endif
ifeq ($(SYSTYPE),para33.strw.leidenuniv.nl)
CC = mpicc
OPTIMIZE = -O3 -m64 -g -march=native -flto -fwhole-program
MPI_LIBS = -lmpich -lrt
MPI_INCL =
GSL_INCL =
GSL_LIBS =
PGPLOT_INCL =
PGPLOT_LIBS =
endif
ifeq ($(SYSTYPE),mach64.ira.inaf.it)
CC = mpicc
OPTIMIZE = -O3 -m64 #-g -march=bdver1 -mtune=native -mprefer-avx128 -mieee-fp -minline-all-stringops -fprefetch-loop-arrays --param prefetch-latency=300 -funroll-all-loops -flto -fwhole-program
MPI_LIBS = #-lmpich
MPI_INCL =
GSL_INCL = -I/homes/gheller/Work/gsl-2.6/build/include -I/homes/gheller/mach64/hdf5-1.12.0/build/include
GSL_LIBS = -L/homes/gheller/Work/gsl-2.6/build/lib
HDF5_LIBS = -L/homes/gheller/mach64/hdf5-1.12.0/build/lib
PGPLOT_INCL =
PGPLOT_LIBS =
endif
ifeq ($(SYSTYPE),"DARWIN")
CC = mpicc
OPTIMIZE = -O3 -std=c99 -mtune=native -march=corei7
MPI_LIBS = -lmpich -L/Users/julius/Devel/lib
MPI_INCL = -I/Users/julius/Devel/include
GSL_INCL =
GSL_LIBS =
PGPLOT_INCL =
PGPLOT_LIBS =
endif
ifeq ($(SYSTYPE),"MPA")
CC = mpicc
OPTIMIZE = -O3 -Wall -g
MPI_LIBS = -mpi
MPI_INCL =
GSL_INCL = -I/afs/mpa/home/jdonnert/Libs/@sys/include
GSL_LIBS = -L/afs/mpa/home/jdonnert/Libs/@sys/lib
PGPLOT_INCL = -I/usr/local/include
PGPLOT_LIBS = -L/usr/common/pdsoft/appl/pgplot/ -L/usr/X11R6/lib
endif
ifeq ($(SYSTYPE),"RZG-ODIN")
CC = mpicc
OPTIMIZE = -O3 -Wall -g
MPI_LIBS =
MPI_INCL =
GSL_INCL = -I/u/jdonnert/Libs/include
GSL_LIBS = -L/u/jdonnert/Libs/lib
endif
# Target
EXEC = P-Fkp
# Sources
SRCDIR = src/
OBJFILES= io/io.o \
io/txt.o \
io/gadget.o \
io/hdf5_reader.o \
io/binary.o \
modules/zero.o \
modules/secondaries_brunetti.o \
modules/simple_secondaries.o \
modules/hard_sphere.o \
modules/brunetti_07.o \
modules/donnert_13.o \
modules/expansion.o \
modules/shock_primaries.o \
common.o main.o setup.o solver.o cosmo.o timestep.o sort.o \
sort_particles.o timing.o compress.o unit.o print_settings.o
OBJS = $(addprefix $(SRCDIR),$(OBJFILES))
INCLFILES = common.h cosmo.h compress.h unit.h constants.h config.h sort.h \
timing.h io/io.h \
io/gadget.h \
modules/modules.h \
../Makefile
INCL = $(addprefix $(SRCDIR),$(INCLFILES))
LIBS = -lm -lgsl -lgslcblas $(MPI_LIBS) $(GSL_LIBS) $(HDF5_LIBS) -lhdf5
CFLAGS = -std=c99 -fopenmp $(OPTIMIZE) $(GSL_INCL)
$(EXEC) : $(OBJS)
$(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $(EXEC)
$(OBJS) : $(INCL)
$(SRCDIR)config.h : Config
sed '/^#/d; /^$$/d; s/^/#define /g' Config > $(SRCDIR)config.h
.ONESHELL:
$(SRCDIR)print_settings.c : Config
echo '#include "common.h"' > $(SRCDIR)print_settings.c
echo 'void print_compile_time_settings(){' >> $(SRCDIR)print_settings.c
echo 'rprintf("Compiled with : \n"' >> $(SRCDIR)print_settings.c
sed '/^#/d; /^$$/d; s/^/" /g; s/$$/ \\n"/g;' Config >> $(SRCDIR)print_settings.c
echo ');}' >> $(SRCDIR)print_settings.c
clean :
rm -f $(OBJS) $(EXEC)