-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
637 lines (473 loc) · 25.2 KB
/
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
#### PREAMBLE ####
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
# This doesn't seem to work in Make 4 or above. Use the command-line option
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
ifeq ($(origin .RECIPEPREFIX), undefined)
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
endif
.RECIPEPREFIX = >
##################
SEED = $(shell od -An -N2 -i /dev/random | tr -d ' ')
all: figures
.PHONY: all
#### Executables ####
# A sentinel to build the haskell executable we use to realise the experiments, generated by the command
# `stack build` from the directory `formulas`.
haskfile := sentinel/haskfile
#### Setup ####
$(haskfile):
> mkdir -p $(@D)
> pushd formulas
> stack build
> popd
> touch $@
# Build the container used in the openmole script `openmole/lhs.oms`.
openmole/formulas.container.tgz: $(haskfile)
> docker build -t formulas formulas/
> docker save formulas:latest | gzip -c > $@
#### Definitions ####
## Simulations Run ##
# Don't use the sentinel pattern here. This is just a shorter way to write one
# rule per target file. Use static pattern rules rather than implicit pattern
# rules because implicit pattern rules are only triggered when the prerequisite
# exists and silent otherwise. I prefer to get an error that the prerequisite
# doesn't exist.
output/formulas/run/%: $(haskfile)
> mkdir -p $(@D)
> stack exec -- haskfile run $(SEED) `basename $@` $@
## Simulation Steps ##
output/formulas/steps/%: $(haskfile)
> mkdir -p $(@D)
> stack exec -- haskfile steps $(SEED) `basename $@` $@
## Simulation Repli Run ##
output/formulas/repli/50/run/%: $(haskfile)
> mkdir -p $(@D)
> stack exec -- haskfile repli-run $(SEED) 50 `basename $@` $@
output/formulas/repli/10/steps/%: $(haskfile)
> mkdir -p $(@D)
> stack exec -- haskfile repli-steps $(SEED) 10 `basename $@` $@
## Simulation Run Comp LHS ##
run_comp_lhs_input := openmole/lhs.oms openmole/formulas.container.tgz
run_comp_lhs_output := output/formulas/run_comp_lhs
run_comp_lhs_sentinel := sentinel/run_comp_lhs
$(run_comp_lhs_sentinel): $(run_comp_lhs_input)
> mkdir -p output/formulas/run_comp_lhs/
> openmole --script openmole/lhs.oms
> mkdir -p $(@D)
> touch $@
## Simulation Repli Comp ##
output/formulas/repli/50/comp/%: $(haskfile)
> mkdir -p $(@D)
> stack exec -- haskfile repli-comp $(SEED) 50 `basename $@` $@
## Stats histo run ##
output/formulas/figure_data/histo_run/% : output/formulas/run/% $(haskfile)
> mkdir -p $(@D)
> stack exec -- haskfile histo-run --run $< --histo $@
## Stats histo steps ##
# No sentinel.
output/formulas/figure_data/histo_steps/% : output/formulas/steps/% $(haskfile)
> mkdir -p $(@D)
> stack exec -- haskfile histo-steps --steps $< --histo $@
## Stats mean std l2 vs nsimus ##
mean_std_l2_vs_nsimus_simus := \
apmc_nGen1_nAlpha500_pAccMin0.01_parallel1_modelToy_stepMax100 \
apmc_nGen55_nAlpha500_pAccMin0.01_parallel1_modelToy_stepMax100 \
apmc_nGen25_nAlpha500_pAccMin0.01_parallel1_modelToy_stepMax100 \
apmc_nGen500_nAlpha500_pAccMin0.01_parallel1_modelToy_stepMax100 \
apmc_nGen4500_nAlpha500_pAccMin0.01_parallel1_modelToy_stepMax100 \
apmc_nGen1_nAlpha500_pAccMin0.05_parallel1_modelToy_stepMax100 \
apmc_nGen55_nAlpha500_pAccMin0.05_parallel1_modelToy_stepMax100 \
apmc_nGen25_nAlpha500_pAccMin0.05_parallel1_modelToy_stepMax100 \
apmc_nGen500_nAlpha500_pAccMin0.05_parallel1_modelToy_stepMax100 \
apmc_nGen4500_nAlpha500_pAccMin0.05_parallel1_modelToy_stepMax100 \
apmc_nGen1_nAlpha500_pAccMin0.1_parallel1_modelToy_stepMax100 \
apmc_nGen55_nAlpha500_pAccMin0.1_parallel1_modelToy_stepMax100 \
apmc_nGen25_nAlpha500_pAccMin0.1_parallel1_modelToy_stepMax100 \
apmc_nGen500_nAlpha500_pAccMin0.1_parallel1_modelToy_stepMax100 \
apmc_nGen4500_nAlpha500_pAccMin0.1_parallel1_modelToy_stepMax100 \
apmc_nGen1_nAlpha500_pAccMin0.2_parallel1_modelToy_stepMax100 \
apmc_nGen55_nAlpha500_pAccMin0.2_parallel1_modelToy_stepMax100 \
apmc_nGen25_nAlpha500_pAccMin0.2_parallel1_modelToy_stepMax100 \
apmc_nGen500_nAlpha500_pAccMin0.2_parallel1_modelToy_stepMax100 \
apmc_nGen4500_nAlpha500_pAccMin0.2_parallel1_modelToy_stepMax100 \
mon-apmc_nGen1_nAlpha500_pAccMin0.01_stepSize1_parallel1_stopSampleSize1_modelToy_stepMax100 \
mon-apmc_nGen55_nAlpha500_pAccMin0.01_stepSize1_parallel1_stopSampleSize55_modelToy_stepMax100 \
mon-apmc_nGen25_nAlpha500_pAccMin0.01_stepSize1_parallel1_stopSampleSize125_modelToy_stepMax100 \
mon-apmc_nGen500_nAlpha500_pAccMin0.01_stepSize1_parallel1_stopSampleSize500_modelToy_stepMax100 \
mon-apmc_nGen4500_nAlpha500_pAccMin0.01_stepSize1_parallel1_stopSampleSize4500_modelToy_stepMax100 \
mon-apmc_nGen1_nAlpha500_pAccMin0.05_stepSize1_parallel1_stopSampleSize1_modelToy_stepMax100 \
mon-apmc_nGen55_nAlpha500_pAccMin0.05_stepSize1_parallel1_stopSampleSize55_modelToy_stepMax100 \
mon-apmc_nGen25_nAlpha500_pAccMin0.05_stepSize1_parallel1_stopSampleSize125_modelToy_stepMax100 \
mon-apmc_nGen500_nAlpha500_pAccMin0.05_stepSize1_parallel1_stopSampleSize500_modelToy_stepMax100 \
mon-apmc_nGen4500_nAlpha500_pAccMin0.05_stepSize1_parallel1_stopSampleSize4500_modelToy_stepMax100 \
mon-apmc_nGen1_nAlpha500_pAccMin0.1_stepSize1_parallel1_stopSampleSize1_modelToy_stepMax100 \
mon-apmc_nGen55_nAlpha500_pAccMin0.1_stepSize1_parallel1_stopSampleSize55_modelToy_stepMax100 \
mon-apmc_nGen25_nAlpha500_pAccMin0.1_stepSize1_parallel1_stopSampleSize125_modelToy_stepMax100 \
mon-apmc_nGen500_nAlpha500_pAccMin0.1_stepSize1_parallel1_stopSampleSize500_modelToy_stepMax100 \
mon-apmc_nGen4500_nAlpha500_pAccMin0.1_stepSize1_parallel1_stopSampleSize4500_modelToy_stepMax100 \
mon-apmc_nGen1_nAlpha500_pAccMin0.2_stepSize1_parallel1_stopSampleSize1_modelToy_stepMax100 \
mon-apmc_nGen55_nAlpha500_pAccMin0.2_stepSize1_parallel1_stopSampleSize55_modelToy_stepMax100 \
mon-apmc_nGen25_nAlpha500_pAccMin0.2_stepSize1_parallel1_stopSampleSize125_modelToy_stepMax100 \
mon-apmc_nGen500_nAlpha500_pAccMin0.2_stepSize1_parallel1_stopSampleSize500_modelToy_stepMax100 \
mon-apmc_nGen4500_nAlpha500_pAccMin0.2_stepSize1_parallel1_stopSampleSize4500_modelToy_stepMax100
mean_std_l2_vs_nsimus_input := \
$(foreach simu, $(mean_std_l2_vs_nsimus_simus), output/formulas/repli/50/run/$(simu))
mean_std_l2_vs_nsimus_output := output/formulas/figure_data/mean_std_l2_vs_nsimus
mean_std_l2_vs_nsimus_sentinel := sentinel/stat_mean_std_l2_vs_nsimus
$(mean_std_l2_vs_nsimus_output): $(mean_std_l2_vs_nsimus_sentinel) ;
$(mean_std_l2_vs_nsimus_sentinel): $(mean_std_l2_vs_nsimus_input) $(haskfile)
> mkdir -p output/formulas/figure_data/
> stack exec -- haskfile mean-std-l2-vs-nsimus \
> $(foreach simu, $(mean_std_l2_vs_nsimus_simus), --run output/formulas/repli/50/run/$(simu)) \
> --out $(mean_std_l2_vs_nsimus_output)
> mkdir -p $(@D)
> touch $@
## Stat L2 vs time ##
# No sentinel here.
output/formulas/figure_data/l2_vs_time/%: output/formulas/repli/10/steps/% $(haskfile)
> mkdir -p $(@D)
> stack exec -- haskfile l2-vs-time $< $@
## Stats Comp Lhs ##
stats_comp_lhs_input := $(run_comp_lhs_output)
stats_comp_lhs_output := output/formulas/figure_data/stats_comp_lhs
stats_comp_lhs_sentinel := sentinel/stats_comp_lhs
$(stats_comp_lhs_output): $(stats_comp_lhs_sentinel) ;
$(stats_comp_lhs_sentinel): $(run_comp_lhs_sentinel) $(haskfile)
> mkdir -p output/formulas/figure_data/
> stack exec -- haskfile stats-comp-lhs output/formulas/run_comp_lhs/ $(stats_comp_lhs_output)
> mkdir -p $(@D)
> touch $@
## Stats Comp Test Cases ##
stats_comp_test_cases_simus := \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel8_stepMax100_biasFactor1_meanRunTime1_varRunTime0.01 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel8_stepMax100_biasFactor1_meanRunTime1_varRunTime0.25 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel8_stepMax100_biasFactor1_meanRunTime1_varRunTime1 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel8_stepMax100_biasFactor1_meanRunTime1_varRunTime4 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel8_stepMax100_biasFactor1_meanRunTime1_varRunTime9 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel8_stepMax100_biasFactor1_meanRunTime1_varRunTime16 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel80_stepMax100_biasFactor1_meanRunTime60_varRunTime36 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel80_stepMax100_biasFactor1_meanRunTime60_varRunTime900 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel80_stepMax100_biasFactor1_meanRunTime60_varRunTime3600 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel80_stepMax100_biasFactor1_meanRunTime60_varRunTime14400 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel80_stepMax100_biasFactor1_meanRunTime60_varRunTime32400 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel80_stepMax100_biasFactor1_meanRunTime60_varRunTime57600 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel1000_stepMax100_biasFactor1_meanRunTime3600_varRunTime1.29e6 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel1000_stepMax100_biasFactor1_meanRunTime3600_varRunTime3.24e6 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel1000_stepMax100_biasFactor1_meanRunTime3600_varRunTime12.96e6 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel1000_stepMax100_biasFactor1_meanRunTime3600_varRunTime38.88e6 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel1000_stepMax100_biasFactor1_meanRunTime3600_varRunTime116.64e6 \
comp_nGen4000_nAlpha500_pAccMin0.01_parallel1000_stepMax100_biasFactor1_meanRunTime3600_varRunTime207.36e6
stats_comp_test_cases_input := \
$(foreach simu, $(stats_comp_test_cases_simus), output/formulas/repli/50/comp/$(simu))
stats_comp_test_cases_output := output/formulas/figure_data/stats_comp_test_cases
stats_comp_test_cases_sentinel := sentinel/stats_comp_test_cases
$(stats_comp_test_cases_output): $(stats_comp_test_cases_sentinel) ;
$(stats_comp_test_cases_sentinel): $(stats_comp_test_cases_input) $(haskfile)
> mkdir -p output/formulas/figure_data/
> stack exec -- haskfile stats-comp-test-cases \
> $(foreach simu, $(stats_comp_test_cases_simus), --comp output/formulas/repli/50/comp/$(simu)) \
> --out $(stats_comp_test_cases_output)
> mkdir -p $(@D)
> touch $@
## Figure Steps ##
steps_simus := \
apmc_nGen4000_nAlpha500_pAccMin0.01_parallel1_modelToyTimeBias_1_0_1_1_stepMax100 \
mon-apmc_nGen4500_nAlpha500_pAccMin0.01_stepSize1_parallel1_stopSampleSize4500_modelToyTimeBias_1_0_1_1_stepMax100
steps_gnuplot_script := report/fig_steps.gnuplot
steps_data := $(foreach simu,$(steps_simus),output/formulas/figure_data/histo_steps/$(simu))
steps_output_png := output/report/png/fig_steps.png
steps_input := $(steps_gnuplot_script) $(steps_data)
steps_output := $(steps_output_png)
steps_sentinel := sentinel/figure_steps
$(steps_output) : $(steps_sentinel) ;
$(steps_sentinel): $(steps_input)
> mkdir -p output/report/png
> gnuplot \
> -e 'dpi=300.0' \
> -e 'width_cm=12.0' \
> -e 'height_cm=7.0' \
> -e 'font_pt=10.0' \
> -e 'set terminal pngcairo truecolor size (width_cm * dpi / 2.54),(height_cm * dpi / 2.54) font sprintf("XITS Math,%f", font_pt) fontscale (72.0/96.0 * dpi / 72.0) linewidth (0.5 * dpi / 72.0)'\
> -c $(steps_gnuplot_script) $(steps_output_png) $(steps_data)
> mkdir -p $(@D)
> touch $@
figures: $(steps_output)
## Figure L2 vs nsimus ##
l2_vs_nsimus_gnuplot_script := report/fig_l2_vs_nsimus.gnuplot
l2_vs_nsimus_data := output/formulas/figure_data/mean_std_l2_vs_nsimus
l2_vs_nsimus_output := output/report/png/fig_l2_vs_nsimus.png
l2_vs_nsimus_input := $(l2_vs_nsimus_gnuplot_script) $(l2_vs_nsimus_data)
l2_vs_nsimus_sentinel := sentinel/figure_l2_vs_nsimus
$(l2_vs_nsimus_output) : $(l2_vs_nsimus_sentinel) ;
$(l2_vs_nsimus_sentinel): $(l2_vs_nsimus_input)
> mkdir -p output/report/png
> gnuplot -c $(l2_vs_nsimus_gnuplot_script) $(l2_vs_nsimus_output) $(l2_vs_nsimus_data)
> mkdir -p $(@D)
> touch $@
figures: $(l2_vs_nsimus_output)
## Figure L2 vs Time K ##
l2_vs_time_k_gnuplot_script := report/fig_l2_vs_time_k.gnuplot
l2_vs_time_k_simus := \
apmc_nGen4000_nAlpha500_pAccMin0.01_parallel1_modelToy_stepMax100 \
apmc_nGen4000_nAlpha500_pAccMin0.01_parallel4_modelToy_stepMax100 \
apmc_nGen4000_nAlpha500_pAccMin0.01_parallel100_modelToy_stepMax100 \
mon-apmc_nGen4000_nAlpha500_pAccMin0.01_stepSize1_parallel1_stopSampleSize4500_modelToy_stepMax100 \
mon-apmc_nGen1000_nAlpha500_pAccMin0.01_stepSize1_parallel4_stopSampleSize4500_modelToy_stepMax400 \
mon-apmc_nGen40_nAlpha500_pAccMin0.01_stepSize1_parallel100_stopSampleSize4500_modelToy_stepMax10000
l2_vs_time_k_data := $(foreach simu,$(l2_vs_time_k_simus),output/formulas/figure_data/l2_vs_time/$(simu))
l2_vs_time_k_output_png := output/report/png/fig_l2_vs_time_k.png
l2_vs_time_k_output := $(l2_vs_time_k_output_png)
l2_vs_time_k_input := $(l2_vs_time_k_gnuplot_script) $(l2_vs_time_k_data)
l2_vs_time_k_sentinel := sentinel/figure_l2_vs_time_k
$(l2_vs_time_k_output) : $(l2_vs_time_k_sentinel) ;
$(l2_vs_time_k_sentinel): $(l2_vs_time_k_input)
> mkdir -p output/report/png
> echo -e "set terminal pngcairo truecolor size 1000,300 font ',12'\n"\
> "output_path=\"$(l2_vs_time_k_output_png)\"\n" \
> "apmc_k_low=\"$(word 1, $(l2_vs_time_k_data))\"\n" \
> "apmc_k_med=\"$(word 2, $(l2_vs_time_k_data))\"\n" \
> "apmc_k_high=\"$(word 3, $(l2_vs_time_k_data))\"\n" \
> "monApmc_k_low=\"$(word 4, $(l2_vs_time_k_data))\"\n" \
> "monApmc_k_med=\"$(word 5, $(l2_vs_time_k_data))\"\n" \
> "monApmc_k_high=\"$(word 6, $(l2_vs_time_k_data))\"\n" \
> | gnuplot - $(l2_vs_time_k_gnuplot_script)
> mkdir -p $(@D)
> touch $@
figures: $(l2_vs_time_k_output)
## Figure L2 vs Time K V ##
l2_vs_time_k_v_simus := \
apmc_nGen4000_nAlpha500_pAccMin0.01_parallel4_modelToyTimeVar_1_0.1_stepMax100 \
apmc_nGen4000_nAlpha500_pAccMin0.01_parallel4_modelToyTimeVar_1_1_stepMax100 \
apmc_nGen4000_nAlpha500_pAccMin0.01_parallel4_modelToyTimeVar_1_10_stepMax100 \
apmc_nGen4000_nAlpha500_pAccMin0.01_parallel100_modelToyTimeVar_1_0.1_stepMax100 \
apmc_nGen4000_nAlpha500_pAccMin0.01_parallel100_modelToyTimeVar_1_1_stepMax100 \
apmc_nGen4000_nAlpha500_pAccMin0.01_parallel100_modelToyTimeVar_1_10_stepMax100 \
mon-apmc_nGen1000_nAlpha500_pAccMin0.01_stepSize1_parallel4_stopSampleSize4500_modelToyTimeVar_1_0.1_stepMax400 \
mon-apmc_nGen1000_nAlpha500_pAccMin0.01_stepSize1_parallel4_stopSampleSize4500_modelToyTimeVar_1_1_stepMax400 \
mon-apmc_nGen1000_nAlpha500_pAccMin0.01_stepSize1_parallel4_stopSampleSize4500_modelToyTimeVar_1_10_stepMax400 \
mon-apmc_nGen40_nAlpha500_pAccMin0.01_stepSize1_parallel100_stopSampleSize4500_modelToyTimeVar_1_0.1_stepMax10000 \
mon-apmc_nGen40_nAlpha500_pAccMin0.01_stepSize1_parallel100_stopSampleSize4500_modelToyTimeVar_1_1_stepMax10000 \
mon-apmc_nGen40_nAlpha500_pAccMin0.01_stepSize1_parallel100_stopSampleSize4500_modelToyTimeVar_1_10_stepMax10000
l2_vs_time_k_v_gnuplot_script := report/fig_l2_vs_time_k_v.gnuplot
l2_vs_time_k_v_data := $(foreach simu,$(l2_vs_time_k_v_simus),output/formulas/figure_data/l2_vs_time/$(simu))
l2_vs_time_k_v_output_png := output/report/png/fig_l2_vs_time_k_v.png
l2_vs_time_k_v_output := $(l2_vs_time_k_v_output_png)
l2_vs_time_k_v_input := $(l2_vs_time_k_v_gnuplot_script) $(l2_vs_time_k_v_data)
l2_vs_time_k_v_sentinel := sentinel/figure_l2_vs_time_k_v
$(l2_vs_time_k_v_output) : $(l2_vs_time_k_v_sentinel) ;
$(l2_vs_time_k_v_sentinel): $(l2_vs_time_k_v_input)
> mkdir -p output/report/png
> gnuplot \
> -e 'dpi=300.0' \
> -e 'width_cm=12.0' \
> -e 'height_cm=10.0' \
> -e 'font_pt=10.0' \
> -e 'set terminal pngcairo truecolor size (width_cm * dpi / 2.54),(height_cm * dpi / 2.54) font sprintf("XITS Math,%f", font_pt) fontscale (72.0/96.0 * dpi / 72.0) linewidth (0.5 * dpi / 72.0)'\
> -e 'output_path="'$(l2_vs_time_k_v_output_png)'"' \
> -e 'apmc_kLow_vLow="'$(word 1, $(l2_vs_time_k_v_data))'"' \
> -e 'apmc_kLow_vHigh="'$(word 2, $(l2_vs_time_k_v_data))'"' \
> -e 'apmc_kLow_vBias="'$(word 3, $(l2_vs_time_k_v_data))'"' \
> -e 'apmc_kHigh_vLow="'$(word 4, $(l2_vs_time_k_v_data))'"' \
> -e 'apmc_kHigh_vHigh="'$(word 5, $(l2_vs_time_k_v_data))'"' \
> -e 'apmc_kHigh_vBias="'$(word 6, $(l2_vs_time_k_v_data))'"' \
> -e 'monApmc_kLow_vLow="'$(word 7, $(l2_vs_time_k_v_data))'"' \
> -e 'monApmc_kLow_vHigh="'$(word 8, $(l2_vs_time_k_v_data))'"' \
> -e 'monApmc_kLow_vBias="'$(word 9, $(l2_vs_time_k_v_data))'"' \
> -e 'monApmc_kHigh_vLow="'$(word 10, $(l2_vs_time_k_v_data))'"' \
> -e 'monApmc_kHigh_vHigh="'$(word 11, $(l2_vs_time_k_v_data))'"' \
> -e 'monApmc_kHigh_vBias="'$(word 12, $(l2_vs_time_k_v_data))'"' \
> -c $(l2_vs_time_k_v_gnuplot_script)
> mkdir -p $(@D)
> touch $@
figures: $(l2_vs_time_k_v_output)
## Figure Time Bias ##
time_bias_gnuplot_script := report/fig_time_bias.gnuplot
time_bias_simus := \
apmc_nGen4000_nAlpha500_pAccMin0.01_parallel100_modelToyTimeBias_100_0_1_100_stepMax100 \
mon-apmc_nGen40_nAlpha500_pAccMin0.01_stepSize1_parallel100_stopSampleSize4000_modelToyTimeBias_100_0_1_100_stepMax10000 \
time_bias_data := $(foreach simu,$(time_bias_simus),output/formulas/figure_data/histo_run/$(simu))
time_bias_input := $(time_bias_gnuplot_script) $(time_bias_data)
time_bias_output := output/report/png/fig_time_bias.png
time_bias_sentinel := sentinel/figure_time_bias
$(time_bias_output) : $(time_bias_sentinel) ;
$(time_bias_sentinel): $(time_bias_input)
> mkdir -p output/report/png
> gnuplot -c $(time_bias_gnuplot_script) $(time_bias_output) $(time_bias_data)
> mkdir -p $(@D)
> touch $@
figures: $(time_bias_output)
## Figure L2 vs Bias Factor ##
l2_vs_bias_factor_script := report/fig_l2_vs_bias_factor.gnuplot
l2_vs_bias_factor_data := output/formulas/figure_data/stats_comp_lhs
l2_vs_bias_factor_input := $(l2_vs_bias_factor_script) $(l2_vs_bias_factor_data)
l2_vs_bias_factor_output := output/report/png/fig_l2_vs_bias_factor.png
l2_vs_bias_factor_sentinel := sentinel/figure_l2_vs_bias_factor
$(l2_vs_bias_factor_output) : $(l2_vs_bias_factor_sentinel) ;
$(l2_vs_bias_factor_sentinel): $(l2_vs_bias_factor_input)
> mkdir -p output/report/png
> gnuplot \
> -e 'dpi=300.0' \
> -e 'width_cm=8.0' \
> -e 'height_cm=6.0' \
> -e 'font_pt=10.0' \
> -e 'set terminal pngcairo truecolor size (width_cm * dpi / 2.54),(height_cm * dpi / 2.54) font sprintf("XITS Math,%f", font_pt) fontscale (72.0/96.0 * dpi / 72.0) linewidth (0.5 * dpi / 72.0)'\
> -c $(l2_vs_bias_factor_script) $(l2_vs_bias_factor_output) $(l2_vs_bias_factor_data)
> mkdir -p $(@D)
> touch $@
figures: $(l2_vs_bias_factor_output)
## Figure Scatter L2 Time LHS ##
scatter_l2_time_lhs_script := report/fig_scatter_l2_time_lhs.gnuplot
scatter_l2_time_lhs_data := output/formulas/figure_data/stats_comp_lhs
scatter_l2_time_lhs_input := $(scatter_l2_time_lhs_script) $(scatter_l2_time_lhs_data)
scatter_l2_time_lhs_output := output/report/png/fig_scatter_l2_time_lhs.png
scatter_l2_time_lhs_sentinel := sentinel/figure_scatter_l2_time_lhs
$(scatter_l2_time_lhs_output) : $(scatter_l2_time_lhs_sentinel) ;
$(scatter_l2_time_lhs_sentinel): $(scatter_l2_time_lhs_input)
> mkdir -p output/report/png
> gnuplot \
> -e 'dpi=300.0' \
> -e 'width_cm=10.0' \
> -e 'height_cm=4.5' \
> -e 'font_pt=10.0' \
> -e 'set terminal pngcairo truecolor size (width_cm * dpi / 2.54),(height_cm * dpi / 2.54) font sprintf("XITS Math,%f", font_pt) fontscale (72.0/96.0 * dpi / 72.0) linewidth (0.5 * dpi / 72.0)'\
> -c $(scatter_l2_time_lhs_script) $(scatter_l2_time_lhs_output) $(scatter_l2_time_lhs_data)
> mkdir -p $(@D)
> touch $@
figures: $(scatter_l2_time_lhs_output)
## Figure L2 Effects LHS ##
l2_effects_lhs_script := report/fig_l2_effects_lhs.gnuplot
l2_effects_lhs_data := output/formulas/figure_data/stats_comp_lhs
l2_effects_lhs_input := $(l2_effects_lhs_script) $(l2_effects_lhs_data)
l2_effects_lhs_output := output/report/png/fig_l2_effects_lhs.png
l2_effects_lhs_sentinel := sentinel/figure_l2_effects_lhs
$(l2_effects_lhs_output) : $(l2_effects_lhs_sentinel) ;
$(l2_effects_lhs_sentinel): $(l2_effects_lhs_input)
> mkdir -p output/report/png
> gnuplot \
> -e 'dpi=300.0' \
> -e 'width_cm=12.0' \
> -e 'height_cm=18.0' \
> -e 'font_pt=10.0' \
> -e 'set terminal pngcairo truecolor size (width_cm * dpi / 2.54),(height_cm * dpi / 2.54) font sprintf("XITS Math,%f", font_pt) fontscale (72.0/96.0 * dpi / 72.0) linewidth (0.5 * dpi / 72.0)'\
> -c $(l2_effects_lhs_script) $(l2_effects_lhs_output) $(l2_effects_lhs_data)
> mkdir -p $(@D)
> touch $@
figures: $(l2_effects_lhs_output)
## Figure L2 Ratio Effects LHS ##
l2_ratio_effects_lhs_script := report/fig_l2_ratio_effects_lhs.gnuplot
l2_ratio_effects_lhs_data := output/formulas/figure_data/stats_comp_lhs
l2_ratio_effects_lhs_input := $(l2_ratio_effects_lhs_script) $(l2_ratio_effects_lhs_data)
l2_ratio_effects_lhs_output := output/report/png/fig_l2_ratio_effects_lhs.png
l2_ratio_effects_lhs_sentinel := sentinel/figure_l2_ratio_effects_lhs
$(l2_ratio_effects_lhs_output) : $(l2_ratio_effects_lhs_sentinel) ;
$(l2_ratio_effects_lhs_sentinel): $(l2_ratio_effects_lhs_input)
> mkdir -p output/report/png
> gnuplot \
> -e 'dpi=300.0' \
> -e 'width_cm=12.0' \
> -e 'height_cm=18.0' \
> -e 'font_pt=10.0' \
> -e 'set terminal pngcairo truecolor size (width_cm * dpi / 2.54),(height_cm * dpi / 2.54) font sprintf("XITS Math,%f", font_pt) fontscale (72.0/96.0 * dpi / 72.0) linewidth (0.5 * dpi / 72.0)'\
> -c $(l2_ratio_effects_lhs_script) $(l2_ratio_effects_lhs_output) $(l2_ratio_effects_lhs_data)
> mkdir -p $(@D)
> touch $@
figures: $(l2_ratio_effects_lhs_output)
## Figure Time Effects LHS ##
time_effects_lhs_script := report/fig_time_effects_lhs.gnuplot
time_effects_lhs_data := output/formulas/figure_data/stats_comp_lhs
time_effects_lhs_input := $(time_effects_lhs_script) $(time_effects_lhs_data)
time_effects_lhs_output := output/report/png/fig_time_effects_lhs.png
time_effects_lhs_sentinel := sentinel/figure_time_effects_lhs
$(time_effects_lhs_output) : $(time_effects_lhs_sentinel) ;
$(time_effects_lhs_sentinel): $(time_effects_lhs_input)
> mkdir -p output/report/png
> gnuplot \
> -e 'dpi=300.0' \
> -e 'width_cm=12.0' \
> -e 'height_cm=18.0' \
> -e 'font_pt=10.0' \
> -e 'set terminal pngcairo truecolor size (width_cm * dpi / 2.54),(height_cm * dpi / 2.54) font sprintf("XITS Math,%f", font_pt) fontscale (72.0/96.0 * dpi / 72.0) linewidth (0.5 * dpi / 72.0)'\
> -c $(time_effects_lhs_script) $(time_effects_lhs_output) $(time_effects_lhs_data)
> mkdir -p $(@D)
> touch $@
figures: $(time_effects_lhs_output)
## Figure Time Ratio Effects LHS ##
time_ratio_effects_lhs_script := report/fig_time_ratio_effects_lhs.gnuplot
time_ratio_effects_lhs_data := output/formulas/figure_data/stats_comp_lhs
time_ratio_effects_lhs_input := $(time_ratio_effects_lhs_script) $(time_ratio_effects_lhs_data)
time_ratio_effects_lhs_output := output/report/png/fig_time_ratio_effects_lhs.png
time_ratio_effects_lhs_sentinel := sentinel/figure_time_ratio_effects_lhs
$(time_ratio_effects_lhs_output) : $(time_ratio_effects_lhs_sentinel) ;
$(time_ratio_effects_lhs_sentinel): $(time_ratio_effects_lhs_input)
> mkdir -p output/report/png
> gnuplot \
> -e 'dpi=300.0' \
> -e 'width_cm=12.0' \
> -e 'height_cm=18.0' \
> -e 'font_pt=10.0' \
> -e 'set terminal pngcairo truecolor size (width_cm * dpi / 2.54),(height_cm * dpi / 2.54) font sprintf("XITS Math,%f", font_pt) fontscale (72.0/96.0 * dpi / 72.0) linewidth (0.5 * dpi / 72.0)'\
> -c $(time_ratio_effects_lhs_script) $(time_ratio_effects_lhs_output) $(time_ratio_effects_lhs_data)
> mkdir -p $(@D)
> touch $@
figures: $(time_ratio_effects_lhs_output)
## Figure Comp Test Cases ##
comp_test_cases_script := report/fig_comp_test_cases.gnuplot
comp_test_cases_data := output/formulas/figure_data/stats_comp_test_cases
comp_test_cases_input := $(comp_test_cases_script) $(comp_test_cases_data)
comp_test_cases_output := output/report/png/fig_comp_test_cases.png
comp_test_cases_sentinel := sentinel/figure_comp_test_case
$(comp_test_cases_output) : $(comp_test_cases_sentinel) ;
$(comp_test_cases_sentinel): $(comp_test_cases_input)
> mkdir -p output/report/png
> gnuplot \
> -e 'dpi=300.0' \
> -e 'width_cm=8.0' \
> -e 'height_cm=6.0' \
> -e 'font_pt=10.0' \
> -e 'set terminal pngcairo truecolor size (width_cm * dpi / 2.54),(height_cm * dpi / 2.54) font sprintf("XITS Math,%f", font_pt) fontscale (72.0/96.0 * dpi / 72.0) linewidth (0.5 * dpi / 72.0)'\
> -c $(comp_test_cases_script) $(comp_test_cases_output) $(comp_test_cases_data)
> mkdir -p $(@D)
> touch $@
figures: $(comp_test_cases_output)
## Figure Model Run Time vs Theta Bias ##
model_run_time_vs_theta_bias_script := report/fig_model_run_time_vs_theta_bias.gnuplot
model_run_time_vs_theta_bias_input := $(model_run_time_vs_theta_bias_script)
model_run_time_vs_theta_bias_output := output/report/png/fig_model_run_time_vs_theta_bias.png
model_run_time_vs_theta_bias_sentinel := sentinel/figure_model_run_time_vs_theta_bias
$(model_run_time_vs_theta_bias_output) : $(model_run_time_vs_theta_bias_sentinel) ;
$(model_run_time_vs_theta_bias_sentinel): $(model_run_time_vs_theta_bias_input)
> mkdir -p output/report/png
> gnuplot \
> -e 'dpi=300.0' \
> -e 'width_cm=12.0' \
> -e 'height_cm=5.0' \
> -e 'font_pt=10.0' \
> -e 'set terminal pngcairo truecolor size (width_cm * dpi / 2.54),(height_cm * dpi / 2.54) font sprintf("XITS Math,%f", font_pt) fontscale (72.0/96.0 * dpi / 72.0) linewidth (0.5 * dpi / 72.0)'\
> -c $(model_run_time_vs_theta_bias_script) $(model_run_time_vs_theta_bias_output)
> mkdir -p $(@D)
> touch $@
figures: $(model_run_time_vs_theta_bias_output)
#### Helper rules ####
setup: $(haskfile)
.PHONY: setup
memo: a b c a
> @echo $@: $+
> @echo '$$@' = $@
> @echo '$$<' = $<
> @echo '$$^' = $^
> @echo '$$+' = $+
.PHONY: memo
a b c:
.PHONY: a b c
test-seed:
> @echo $(SEED)
> @echo $(SEED)
.PHONY: test-seed
clean:
> rm -Rf output/formulas/*
> rm -Rf sentinel
.PHONY: clean