blob: 32449deec4ae51700d334aca382f7d4991973ac2 (
plain)
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
|
GCC=gfortran
oneAPI=ifx
all:
mkdir -p bin/
$(GCC) matrixproduct.f90 -o bin/$(GCC).serial.out -O3 -fexternal-blas -lopenblas -march=native
$(oneAPI) matrixproduct.f90 -o bin/$(oneAPI).serial.out -qmkl=sequential -O3 -heap-arrays -xHost
$(GCC) matrixproduct.f90 -o bin/$(GCC).parallel.out -O3 -fexternal-blas -lopenblas -march=native -fopenmp
$(oneAPI) matrixproduct.f90 -o bin/$(oneAPI).parallel.out -qmkl=parallel -O3 -heap-arrays -xHost -fopenmp
tests: clean all
mkdir -p results/
# Serial runs
export OMP_NUM_THREADS=1
./bin/$(GCC).serial.out 100 3500 100 yes > results/$(GCC)_short_serial
./bin/$(oneAPI).serial.out 100 3500 100 yes > results/$(oneAPI)_short_serial
./bin/$(GCC).serial.out 3500 20000 500 no > results/$(GCC)_long_serial
./bin/$(oneAPI).serial.out 3500 20000 500 no > results/$(oneAPI)_long_serial
# Parallel runs
export OMP_NUM_THREADS=8
./bin/$(GCC).parallel.out 100 3500 100 yes > results/$(GCC)_short_parallel
./bin/$(oneAPI).parallel.out 100 3500 100 yes > results/$(oneAPI)_short_parallel
./bin/$(GCC).parallel.out 3500 20000 500 no > results/$(GCC)_long_parallel
./bin/$(oneAPI).parallel.out 3500 20000 500 no > results/$(oneAPI)_long_parallel
plots:
gnuplot -p plots.gnu
clean:
rm -rf bin/
rm -rf results/
|