-
Notifications
You must be signed in to change notification settings - Fork 4
/
irf.makefile
104 lines (76 loc) · 3.16 KB
/
irf.makefile
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
THIS ?= particlefilterRollingstoneELBIRFchol
FCmode ?= debug
# getarguments(Nparticles, Nsim, doIRFunitscale, doIRFactualObserver, ordercode, p, datalabel, parameterlabel)
doIRFunitscale ?= 1
doIRFactualObserver ?= 0
orderCode ?= 123456
p ?= 2
datalabel ?= spectreTB3MSGS020510OutputGapHeadline2018Q4
Nparticles ?= 1000
Nsim ?= 100
# Nparticles
toolboxes=vslbox.o embox.o blaspackbox.o timerbox.o gibbsbox.o statespacebox.o densitybox.o
UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
# mac
FCdebugseq=ifort -mkl -warn all -WB -check all -check noarg_temp_created -static-intel -Wl,-stack_size,0x20000000 -Wl,-rpath,$(MKLROOT)/../compiler/lib/
FCdebug=ifort -mkl -warn all -WB -check all -check noarg_temp_created -static-intel -Wl,-stack_size,0x20000000 -qopenmp -Wl,-rpath,$(MKLROOT)/../compiler/lib/
FCprod=ifort -O3 -mkl -nocheck -qopenmp -static-intel -xHost -Wl,-stack_size,0x80000000 -Wl,-rpath,$(MKLROOT)/../compiler/lib/
FCprofile=ifort -O3 -mkl -nocheck -qopenmp -static-intel -xHost -qopt-report-file=foo.out -Wl,-stack_size,0x80000000 -Wl,-rpath,$(MKLROOT)/../compiler/lib/
else
# linux
FCdebugseq=ifort -mkl -warn all -WB -check all -check noarg_temp_created -shared-intel
FCdebug=ifort -mkl -warn all -WB -check all -check noarg_temp_created -shared-intel -qopenmp
FCprod=ifort -O3 -mkl -nocheck -qopenmp -shared-intel -xHost
FCprofile=ifort -O3 -mkl -nocheck -qopenmp -shared-intel -xHost -qopt-report-file=foo.out
endif
# FC=ifort -mkl -warn all -WB -check all -check bounds -check noarg_temp_created
# FC=ifort -mkl -warn all -WB -check all -check bounds -check noarg_temp_created -qopenmp
# FC=ifort -mkl -O3 -nocheck -qopenmp -inline-level=2 -static-intel -xHost -Wl,-stack_size,0x80000000 -Wl,-rpath,$(MKLROOT)/../compiler/lib/
ifeq ($(FCmode),debug)
FC=$(FCdebug)
else ifeq ($(FCmode),debugseq)
FC=$(FCdebugseq)
else ifeq ($(FCmode),profile)
FC=$(FCprofile)
else
FC=$(FCprod)
endif
toolboxdir=toolbox/
vslbox=INTELvslbox
timerbox=OMPtimerbox
main : $(THIS)
toolboxes : $(toolboxes)
$(THIS) : $(THIS).f90 $(toolboxes)
$(FC) $(THIS).f90 -o $(THIS) $(toolboxes)
statespacebox.o :: $(toolboxdir)statespacebox.f90 blaspackbox.o embox.o vslbox.o
$(FC) -c $(toolboxdir)statespacebox.f90
embox.o : $(toolboxdir)embox.f90 vslbox.o
$(FC) -c $(toolboxdir)embox.f90
densitybox.o : $(toolboxdir)densitybox.f90 embox.o blaspackbox.o vslbox.o statespacebox.o
$(FC) -c $(toolboxdir)densitybox.f90
blaspackbox.o : $(toolboxdir)blaspackbox.f90 embox.o
$(FC) -c $(toolboxdir)blaspackbox.f90
timerbox.o : $(toolboxdir)$(timerbox).f90 embox.o
$(FC) -c $(toolboxdir)$(timerbox).f90 -o timerbox.o
gibbsbox.o : $(toolboxdir)gibbsbox.f90 timerbox.o blaspackbox.o statespacebox.o
$(FC) -c $(toolboxdir)gibbsbox.f90
vslbox.o : $(toolboxdir)$(vslbox).f90
$(FC) -c $(toolboxdir)$(vslbox).f90 -o vslbox.o
compile : $(THIS)
run : $(THIS)
rm -f *.debug
time -p ./$(THIS) $(Nparticles) $(Nsim) $(doIRFunitscale) $(doIRFactualObserver) $(orderCode) $(p) $(datalabel)
edit :
aquamacs $(THIS).f90
clean :
rm -f $(THIS)
rm -f *.debug
rm -f *_genmod.f90
rm -f *.log
rm -f *.mod
rm -f *.o
rm -f *~
cleanall :
rm -f *.dat
$(MAKE) clean