-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (32 loc) · 1014 Bytes
/
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
# GNU Makefile for PFHub BM1
# Recommended for use with a Conda environment for Singularity with Python 3
# Cluster Settings
MPI = mpirun
PY3 = python3
RANKS = 4
# Container Settings
IMAGE = dolfinx/dolfinx
NAME = fenicsx
# Make Targets
all: dolfinx-bm-1b.xdmf
.PHONY: all clean instance list shell spinodal stop watch
dolfinx-bm-1b.xdmf: spinodal.py
make instance
make spinodal
make stop
clean:
rm -vf *spinodal.h5 *spinodal.xdmf *spinodal.log dolfinx*.csv
instance:
singularity instance start -H $(PWD) docker://$(IMAGE) $(NAME)
list:
singularity instance list
shell:
singularity exec instance://$(NAME) bash --init-file .singular-prompt
spinodal: spinodal.py
singularity exec instance://$(NAME) $(MPI) -np $(RANKS) $(PY3) -u spinodal.py
stop:
singularity instance stop $(NAME)
watch:
singularity exec instance://$(NAME) bash -c "watch cat dolfinx-bm-1b.csv"
#docker:
# docker run --name $(NAME) --rm -ti -v $(PWD):/root/shared -w /root/shared $(IMAGE) bash --init-file .singular-prompt