generated from Sister20/kit-tucil-sister-2024
-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
32 lines (22 loc) · 804 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
MPI_CC = mpicc
THREADS = 2
OUTPUT_FOLDER = output
BIN_FOLDER = bin
all: serial parallel
parallel: mpi mp
mpi:
mpic++ src/open-mpi/mpi.cc -o $(BIN_FOLDER)/mpi.exe
mp:
g++ src/open-mp/mp.cc --openmp -o $(BIN_FOLDER)/mp
cuda:
nvcc src/cuda/inverse-matrix.cu src/cuda/cuda.cu -o $(BIN_FOLDER)/cuda.exe
serial:
g++ src/serial/serial.cpp -o $(BIN_FOLDER)/serial.exe
run:
time ./bin/serial.exe < test_cases/2048.txt > $(OUTPUT_FOLDER)/output_serial.txt
time mpiexec -n $(N) ./bin/mpi.exe < test_cases/2048.txt > $(OUTPUT_FOLDER)/output_mpi.txt
time ./bin/mp < test_cases/1024.txt > $(OUTPUT_FOLDER)/output_mp.txt
run-serial:
time ./bin/serial.exe < test_cases/512.txt > $(OUTPUT_FOLDER)/output_serial.txt
run-cuda:
time ./bin/cuda.exe < test_cases/2048.txt > $(OUTPUT_FOLDER)/output_cuda.txt