-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
58 lines (39 loc) · 1.84 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
# Makefile for parallel scan
#
# Jordan Kremer
# Dalton Bohning
ARRAY_SIZE = 2048
SECTION_SIZE = 2048
NUM_THREADS = 8
#NVCC = nvcc -I. -lcuda -lcudart -lm
NVCC = nvcc -I.
NVCC_DEBUG = $(NVCC) -g -G
GCC = gcc -fopenmp -I.
GCC_DEBUG = $(GCC) -g
#Default, compile with debug flags and print and verify the results
brent: brent-kung.cu
$(NVCC_DEBUG) -DPRINT_RESULTS -DVERIFY_RESULTS -DARRAY_SIZE=$(ARRAY_SIZE) -DSECTION_SIZE=$(SECTION_SIZE) -o brent-kung brent-kung.cu
#No debug flags, don't print, but do verify the results
brent_test: brent-kung.cu
$(NVCC) -DVERIFY_RESULTS -DARRAY_SIZE=$(ARRAY_SIZE) -DSECTION_SIZE=$(SECTION_SIZE) -o brent-kung brent-kung.cu
#No debug flags, don't print, don't verify. Just give times
brent_release: brent-kung.cu
$(NVCC) -DARRAY_SIZE=$(ARRAY_SIZE) -DSECTION_SIZE=$(SECTION_SIZE) -o brent-kung brent-kung.cu
#Default, compile with debug flags and print and verify the results
openmp: openmp_inclusiveScan.c
$(GCC_DEBUG) -DPRINT_RESULTS -DVERIFY_RESULTS -DARRAY_SIZE=$(ARRAY_SIZE) -DNUM_THREADS=$(NUM_THREADS) -o openmp_inclusiveScan openmp_inclusiveScan.c
#No debug flags, don't print, but do verify the results
openmp_test: openmp_inclusiveScan.c
$(GCC) -DVERIFY_RESULTS -DARRAY_SIZE=$(ARRAY_SIZE) -DNUM_THREADS=$(NUM_THREADS) -o openmp_inclusiveScan openmp_inclusiveScan.c
#No debug flags, don't print, don't verify. Just give times
openmp_release: openmp_inclusiveScan.c
$(GCC) -DARRAY_SIZE=$(ARRAY_SIZE) -DNUM_THREADS=$(NUM_THREADS) -o openmp_inclusiveScan openmp_inclusiveScan.c
iterative: iterative.c
$(GCC) -DARRAY_SIZE=$(ARRAY_SIZE) -o iterative iterative.c
benchmarks: runBenchmarks.py
./runBenchmarks.py $(VERSION)
tests: runTests.py
./runTests.py $(VERSION)
clean:
rm -f brent-kung openmp_inclusiveScan
.PHONY: clean brent brent_test brent_release openmp openmp_test openmp_release iterative benchmarks tests