-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (28 loc) · 1.42 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
.PHONY: help init ipynb devrepl jupyter-lab clean distclean
.DEFAULT_GOAL := help
NOTEBOOKFILES = \
B01_01_Cheby_InPlace_Dense.ipynb \
B02_01_Cheby_NotInPlace_Dense.ipynb \
B03_01_ExpProp_InPlace_Dense.ipynb
JULIA = julia
help: ## Show this help
@grep -E '^([a-zA-Z_-]+):.*## ' $(MAKEFILE_LIST) | awk -F ':.*## ' '{printf "%-20s %s\n", $$1, $$2}'
%.ipynb : | %.jl
JULIA_NUM_THREADS=1 NUMEXPR_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 MKL_NUM_THREADS=1 VECLIB_MAXIMUM_THREADS=1 time jupytext --to notebook --execute "$(*).jl"
jupyter trust "$(*).ipynb"
Manifest.toml: Project.toml
$(JULIA) --project=. -e 'using Pkg; Pkg.instantiate()'
touch $@
$(JULIA) --project=. -e 'using PropagationBenchmarks; PropagationBenchmarks.info()'
init: Manifest.toml ## Initialize the environment
ipynb: Manifest.toml $(NOTEBOOKFILES) ## Create all missing .ipynb files
devrepl: Manifest.toml
JULIA_NUM_THREADS=1 NUMEXPR_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 MKL_NUM_THREADS=1 VECLIB_MAXIMUM_THREADS=1 $(JULIA) --project=.
jupyter-lab: Manifest.toml ## Run a Jupyter lab server
JULIA_NUM_THREADS=1 NUMEXPR_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 MKL_NUM_THREADS=1 VECLIB_MAXIMUM_THREADS=1 jupyter lab --no-browser
clean: ## Remove generated files
rm -f $(NOTEBOOKFILES)
distclean: clean ## Restore clean repository state
rm -rf .ipynb_checkpoints
rm -rf data/*
rm -f Manifest.toml