-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
36 lines (26 loc) · 916 Bytes
/
makefile
File metadata and controls
36 lines (26 loc) · 916 Bytes
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
SRCDIR=src
BINDIR=bin
INDATADIR=input_data
SOLDATADIR=solution_data
PYTHONENGINE=python3
all: $(SRCDIR)/mpi_sort $(SRCDIR)/seq_sort $(SRCDIR)/mp_sort $(SRCDIR)/hybrid_sort
$(SRCDIR)/mpi_sort:
mpicc $(SRCDIR)/mpi_sort.c -o $(BINDIR)/mpi_sort
$(SRCDIR)/seq_sort:
gcc -fopenmp $(SRCDIR)/sequential_sort.c -o $(BINDIR)/seq_sort
$(SRCDIR)/mp_sort:
gcc -fopenmp $(SRCDIR)/Main_mp_sort.c -o $(BINDIR)/mp_sort
$(SRCDIR)/hybrid_sort:
mpicc -fopenmp $(SRCDIR)/hybrid_sort.c -o $(BINDIR)/hybrid_sort -Wall
test: $(SRCDIR)/seq_sort $(SRCDIR)/mp_sort $(SRCDIR)/mpi_sort $(SRCDIR)/hybrid_sort
bin/seq_sort random_1048576
bin/mp_sort 8 random_1048576
mpiexec -n 8 bin/mpi_sort random_1048576
mpiexec -n 4 bin/hybrid_sort 2 random_1048576
clean:
rm -f $(BINDIR)/*
clean-data:
rm -f $(INDATADIR)/*
rm -f $(SOLDATADIR)/*
data: clean-data
$(PYTHONENGINE) src/generate_data.py