-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
87 lines (66 loc) · 2.45 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
CC=gcc
CFLAGS= -Wall -std=gnu99 -g
LIBS=src/lib/matrix.c
TUNE= -O0
OPEN_BLAS_DIR=/opt/OpenBLAS
OPEN_BLAS=-static -I$(OPEN_BLAS_DIR)/include/ -L$(OPEN_BLAS_DIR)/lib -lopenblas -lpthread
seq_ijk:
$(CC) $(TUNE) $(CFLAGS) -o bin/seq_ijk $(LIBS) src/seq_ijk.c
seq_kij:
$(CC) $(TUNE) $(CFLAGS) -DDEBUG -o bin/seq_kij $(LIBS) src/seq_kij.c
seq_blas:
$(CC) $(TUNE) $(CFLAGS) -o bin/seq_blas $(LIBS) src/seq_blas.c $(OPEN_BLAS)
debug_seq_blas:
$(CC) $(TUNE) $(CFLAGS) -DDEBUG -o bin/seq_blas $(LIBS) src/seq_blas.c $(OPEN_BLAS)
debug_seq_ijk:
$(CC) $(TUNE) $(CFLAGS) -DDEBUG -o bin/seq_ijk $(LIBS) src/seq_ijk.c
blk_seq_ijk:
$(CC) $(TUNE) $(CFLAGS) -o bin/blk_seq_ijk $(LIBS) src/blk_seq_ijk.c
debug_blk_seq_ijk:
$(CC) $(TUNE) $(CFLAGS) -DDEBUG -o bin/blk_seq_ijk $(LIBS) src/blk_seq_ijk.c
blk_seq_kij:
$(CC) $(TUNE) $(CFLAGS) -o bin/blk_seq_kij $(LIBS) src/blk_seq_kij.c
debug_blk_seq_kij:
$(CC) $(TUNE) $(CFLAGS) -DDEBUG -o bin/blk_seq_kij $(LIBS) src/blk_seq_kij.c
pthread:
$(CC) $(TUNE) $(CFLAGS) -pthread -o bin/pthread $(LIBS) src/pthread.c
debug_pthread:
$(CC) $(TUNE) $(CFLAGS) -DDEBUG -pthread -o bin/pthread $(LIBS) src/pthread.c
openmp:
$(CC) $(TUNE) $(CFLAGS) -fopenmp -o bin/openmp $(LIBS) src/openmp.c
debug_openmp:
$(CC) $(TUNE) $(CFLAGS) -DDEBUG -fopenmp -o bin/openmp $(LIBS) src/openmp.c
mpi:
mpicc $(tune) $(cflags) -o bin/mpi $(LIBS) src/mpi.c -lm
debug_mpi:
mpicc $(tune) $(cflags) -DDEBUG -o bin/mpi $(LIBS) src/mpi.c -lm
clean:
rm -f bin/*; rm -f data/*
cleanbin:
rm -f bin/*
cleandata:
rm -f data/*
PYTASK=python random_matrix.py
testdata:
$(PYTASK) 8 8 > data/8x8a.txt
$(PYTASK) 8 8 > data/8x8b.txt
$(PYTASK) 8 16 > data/8x16a.txt
$(PYTASK) 16 8 > data/16x8b.txt
$(PYTASK) 16 16 > data/16x16a.txt
$(PYTASK) 16 16 > data/16x16b.txt
$(PYTASK) 512 512 > data/512x512a.txt
$(PYTASK) 512 512 > data/512x512b.txt
$(PYTASK) 1024 1024 > data/1024x1024a.txt
$(PYTASK) 1024 1024 > data/1024x1024b.txt
$(PYTASK) 1536 1536 > data/1536x1536a.txt
$(PYTASK) 1536 1536 > data/1536x1536b.txt
$(PYTASK) 2048 2048 > data/2048x2048a.txt
$(PYTASK) 2048 2048 > data/2048x2048b.txt
$(PYTASK) 2560 2560 > data/2560x2560a.txt
$(PYTASK) 2560 2560 > data/2560x2560b.txt
$(PYTASK) 3072 3072 > data/3072x3072a.txt
$(PYTASK) 3072 3072 > data/3072x3072b.txt
$(PYTASK) 3584 3584 > data/3584x3584a.txt
$(PYTASK) 3584 3584 > data/3584x3584b.txt
$(PYTASK) 4096 4096 > data/4096x4096a.txt
$(PYTASK) 4096 4096 > data/4096x4096b.txt