-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (33 loc) · 1.26 KB
/
Makefile
File metadata and controls
40 lines (33 loc) · 1.26 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
##
# Loki Age Analyzer
#
# @file
# @version 0.1
# end
MPI_COMPILE_FLAGS=
NVCC_COMPILE_FLAGS=
MPI_LINK_FLAGS=
NVCC_O_NAME=loki_library.o
MPI_RUN_ARGS= --mca pml ob1 --mca btl self,sm
# defo eventually want to make these inputs or otherwise have a better solution for its configuration
MPI_N_PROCS=-np 2
MPI_HOSTS=--host bankerz-tower:1,casper:1
FINAL_EXECUTABLE_NAME=loki
MPI_DOCKER_COMMAND=mpicc -c main.c -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -I/opt/openmpi/include/ -L /opt/openmpi/lib/ -lcudart
NVCC_DOCKER_COMMAND=mpicc -c main.c -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcudart
build:
mpicc -c main.c
nvcc -c lib.cu -Xcompiler -fPIC
mpicc -o $(FINAL_EXECUTABLE_NAME) lib.o main.o -lcudart
run: build
mpirun $(MPI_RUN_ARGS) $(MPI_N_PROCS) $(MPI_HOSTS) loki
docker_compile:
$(MPI_DOCKER_COMMAND)
nvcc -c lib.cu -Xcompiler -fPIC
mpicc -o $(FINAL_EXECUTABLE_NAME) lib.o main.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcudart -I/opt/openmpi/include/ -L /opt/openmpi/lib/ -lstdc++
compile_test_handler:
g++ -g -o test_data_handling test_data_handling.cpp -lparquet -larrow
build_data_handler:
g++ -fPIC -shared data_handler.cpp -larrow -lparquet -o libdata_handler.so
gaussian_process:
nvcc -g -o guassian_process_model gp_lib.cu -lcublas