forked from CFD-GO/TCLB_docker
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (43 loc) · 2.89 KB
/
Copy pathMakefile
File metadata and controls
58 lines (43 loc) · 2.89 KB
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
localdir = .local
activate: $(localdir)/config_all
echo "#!/bin/bash" > "activate"
echo ENVDIR=$$(pwd) >> "activate"
cat ./activate.template >> "activate"
$(localdir)/config_all:
mkdir -p $(localdir)
echo "export TCLB_PATH=path_to_your_TCLB_dir" > "$(localdir)/config_all"
echo "export TCLB_TOOLS_PATH=path_to_your_TCLB_tools_dir" >> "$(localdir)/config_all"
$(localdir)/tclb_%:
singularity build $@ docker://mdzik/$$(echo $@ | sed 's/__/:/g' | sed 's/.*\///g')
$(localdir)/config_%: $(localdir)/config_all
echo ". config_all" > $@
echo export SIF=`pwd`"/$$(echo $@ | sed 's/config/tclb/g')" > $@
echo export TCLB_ENV="$$(echo $@ | sed 's/config/tclb/g' | sed 's/.*\///g')" >> $@
echo export CONFIGUREARGS="\"$(configureargs)\"" >> $@
build_and_configure_$(imname)__$(imtag):
export configureargs
$(MAKE) $(localdir)/tclb_$(imname)__$(imtag)
$(MAKE) configureargs="$(configureargs)" $(localdir)/config_$(imname)__$(imtag)
buildkit_gpu: imname = buildkit
buildkit_gpu: imtag = ubuntu_2004_cuda11_latest
buildkit_gpu: configureargs = --enable-cuda --with-cuda-arch=sm_60 --with-python --with-python-config=python3.8-config --enable-double --enable-keepcode --enable-rinside --enable-cpp11 --with-hdf5 --with-hdf5-lib=//usr/lib/x86_64-linux-gnu/hdf5/openmpi/ --with-hdf5-include=/usr/include/hdf5/openmpi
#buildkit_gpu: build_and_configure_$(imname)__$(imtag)
buildkit_graphics_gpu: imname = buildkit
buildkit_graphics_gpu: imtag = ubuntu_2004_cuda11_latest
buildkit_graphics_gpu: configureargs = --enable-cuda --with-cuda-arch=sm_60 --enable-graphics --with-python --with-python-config=python3.8-config --enable-double --enable-keepcode --enable-rinside --enable-cpp11 --with-hdf5 --with-hdf5-lib=//usr/lib/x86_64-linux-gnu/hdf5/openmpi/ --with-hdf5-include=/usr/include/hdf5/openmpi
#buildkit_gpu: build_and_configure_$(imname)__$(imtag)
buildkit_cpu: imname = buildkit
buildkit_cpu: imtag = ubuntu_2004_latest
buildkit_cpu: configureargs = --disable-cuda --with-python --with-python-config=python3.8-config --enable-double --enable-keepcode --enable-rinside --enable-cpp11 --with-openmp --with-hdf5 --with-hdf5-lib=//usr/lib/x86_64-linux-gnu/hdf5/openmpi/ --with-hdf5-include=/usr/include/hdf5/openmpi
#buildkit_cpu: build_and_configure_$(imname)__$(imtag)
workspace_cpu: imname = workspace
workspace_cpu: imtag = latest
workspace_cpu: configureargs = --disable-cuda --with-python --with-python-config=python3.8-config --enable-double --enable-keepcode --enable-rinside --enable-cpp11 --with-openmp --with-hdf5 --with-hdf5-lib=//usr/lib/x86_64-linux-gnu/hdf5/openmpi/ --with-hdf5-include=/usr/include/hdf5/openmpi
#workspace_cpu: build_and_configure_$(imname)__$(imtag)
%_gpu: build_and_configure_$(imname)__$(imtag)
ln -fs config_$(imname)__$(imtag) $(localdir)/config_$@
%_cpu: build_and_configure_$(imname)__$(imtag)
ln -fs config_$(imname)__$(imtag) $(localdir)/config_$@
clean:
rm -rf ./$(localdir)
rm -f activate