-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.frontera
67 lines (49 loc) · 3.13 KB
/
Makefile.frontera
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
CC=oshcc
CXX=oshcxx
FLAGS=-g -O3 -Isrc/shmem_ml -Wall -Wextra -std=c++11 -Isrc/shmem_ml/dlmalloc -Isrc/shmem_ml/crc \
-I$(ARROW_HOME)/include $(shell python3-config --includes) \
-DMSPACES=1 -DONLY_MSPACES=1 -DHAVE_MORECORE=0 -DUSE_LOCKS=0 -DFOOTERS=1 -I$(OPENSHMEM_HOME)/include \
-I$(shell python -c 'import numpy; print(numpy.get_include())')
LINK_FLAGS=-lshmem_ml -larrow -larrow_python -lshmem -Lbin -L$(ARROW_HOME)/lib -L$(SHMEM_HOME)/lib -lstdc++ -lzstd -lbz2 -lutf8proc -lbrotlienc -lbrotlidec -lbrotlicommon -llz4 $(shell python3-config --ldflags)
tests: bin/save_load_get_set bin/shmem_ml_1d bin/shmem_replicated_1d bin/shmem_ml_2d
libs: bin/libshmem_ml.so
python: libs bin/shmem_ml_client_server
python setup.py build_ext --inplace --force
bin/libshmem_ml.so: bin/dlmalloc.o bin/shmem_ml.o bin/ShmemMemoryPool.o bin/mailbox.o bin/mailbox_buffer.o
$(CC) -shared $^ -o $@
bin/libshmem_ml.a: bin/dlmalloc.o bin/shmem_ml.o bin/ShmemMemoryPool.o bin/mailbox.o bin/mailbox_buffer.o
ar rcs $@ $^
bin/shmem_ml_client_server.o: src/shmem_ml/shmem_ml_client_server.cpp
$(CXX) $(FLAGS) -fPIC -c -o $@ $^
bin/shmem_ml_client_server: bin/shmem_ml_client_server.o python
$(CC) $(FLAGS) bin/shmem_ml_client_server.o -o $@ $(LINK_FLAGS)
bin/dlmalloc.o: src/shmem_ml/dlmalloc/dlmalloc.c
$(CXX) $(FLAGS) -fPIC -c -o $@ $^
bin/shmem_ml.o: src/shmem_ml/shmem_ml.cpp
$(CXX) $(FLAGS) -fPIC -c -o $@ $^
bin/ShmemMemoryPool.o: src/shmem_ml/ShmemMemoryPool.cpp
$(CXX) $(FLAGS) -fPIC -c -o $@ $^
bin/mailbox.o: src/shmem_ml/mailbox.cpp
$(CXX) $(FLAGS) -fPIC -c -o $@ $^
bin/mailbox_buffer.o: src/shmem_ml/mailbox_buffer.cpp
$(CXX) $(FLAGS) -fPIC -c -o $@ $^
bin/bfs: example/bfs.cpp \
example/graph500-graph500-3.0.0/generator/splittable_mrg.c \
example/graph500-graph500-3.0.0/generator/graph_generator.c \
bin/libshmem_ml.so
$(CC) $(FLAGS) -Iexample/graph500-graph500-3.0.0 -c -fPIC example/graph500-graph500-3.0.0/generator/splittable_mrg.c -o bin/splittable_mrg.o
$(CC) $(FLAGS) -Iexample/graph500-graph500-3.0.0 -c -fPIC example/graph500-graph500-3.0.0/generator/graph_generator.c -o bin/graph_generator.o
$(CC) $(FLAGS) -Iexample/graph500-graph500-3.0.0 -c -fPIC example/graph500-graph500-3.0.0/generator/utils.c -o bin/utils.o
$(CC) $(FLAGS) -Iexample/graph500-graph500-3.0.0 -c -fPIC example/graph500-graph500-3.0.0/generator/make_graph.c -o bin/make_graph.o
$(CXX) $(FLAGS) -Iexample/graph500-graph500-3.0.0 -c -fPIC example/bfs.cpp -o bin/bfs.o
$(CXX) $(FLAGS) bin/splittable_mrg.o bin/graph_generator.o bin/utils.o bin/make_graph.o bin/bfs.o $(LINK_FLAGS) -o $@
bin/save_load_get_set: test/save_load_get_set.cpp bin/libshmem_ml.so
$(CXX) $(FLAGS) -o $@ test/save_load_get_set.cpp $(LINK_FLAGS)
bin/shmem_ml_1d: test/shmem_ml_1d.cpp bin/libshmem_ml.so
$(CXX) $(FLAGS) -o $@ test/shmem_ml_1d.cpp $(LINK_FLAGS)
bin/shmem_replicated_1d: test/shmem_replicated_1d.cpp bin/libshmem_ml.so
$(CXX) $(FLAGS) -o $@ test/shmem_replicated_1d.cpp $(LINK_FLAGS)
bin/shmem_ml_2d: test/shmem_ml_2d.cpp bin/libshmem_ml.so
$(CXX) $(FLAGS) -o $@ test/shmem_ml_2d.cpp $(LINK_FLAGS)
clean:
rm -f bin/* PyShmemML.cpython-37m-x86_64-linux-gnu.so src/shmem_ml/PyShmemML.cpp