-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathMakefile
More file actions
94 lines (72 loc) · 2.16 KB
/
Makefile
File metadata and controls
94 lines (72 loc) · 2.16 KB
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
88
89
90
91
92
93
# Home directory
HOMET=/home/davidza/
# Ask the number of cores to be used in the parallelization:
CORES := $(shell bash -c 'read -p "Enter the number of cores for parallelization: " pwd; echo $$pwd')
# Execute the code for each language
cpp:
g++ Cpp_main_OpenMP.cpp -fopenmp -o Cpp_main
export OMP_NUM_THREADS=$(CORES); ./Cpp_main;
rm Cpp_main
cpp1:
g++ Cpp_main_OpenMP.cpp -fopenmp -o Cpp_main -O1
export OMP_NUM_THREADS=$(CORES); ./Cpp_main;
rm Cpp_main
cpp2:
g++ Cpp_main_OpenMP.cpp -fopenmp -o Cpp_main -O2
export OMP_NUM_THREADS=$(CORES); ./Cpp_main;
rm Cpp_main
cpp3:
g++ Cpp_main_OpenMP.cpp -fopenmp -o Cpp_main -O3
export OMP_NUM_THREADS=$(CORES); ./Cpp_main;
rm Cpp_main
pgi2:
pgc++ Cpp_main_OpenMP.cpp -o Cpp_main -mp -Minfo=accel -O
export OMP_NUM_THREADS=$(CORES); ./Cpp_main;
rm Cpp_main
pgi:
pgc++ Cpp_main_OpenACC.cpp -o Cpp_main -fast -ta=multicore -acc
export OMP_NUM_THREADS=$(CORES); ./Cpp_main;
rm Cpp_main
acc:
PGI=/opt/pgi;
PATH=/opt/pgi/linux86-64/17.10/bin:$PATH;
MANPATH=$MANPATH:/opt/pgi/linux86-64/17.10/man;
LM_LICENSE_FILE=$LM_LICENSE_FILE:/opt/pgi/license.dat;
pgc++ Cpp_main_OpenACC.cpp -o Cpp_main_acc.exe -fast -acc -ta=nvidia
./Cpp_main_acc.exe;
rm Cpp_main_acc.exe
acc_profile:
pgc++ Cpp_main_OpenACC.cpp -o Cpp_main_acc.exe -fast -acc -ta=nvidia -Minfo=accel,ccff
./Cpp_main_acc.exe;
pgprof ./Cpp_main_acc.exe
rm Cpp_main_acc.exe
omp:
g++ Cpp_main_OpenACC.cpp -o Cpp_main_omp.exe -fopenmp
./Cpp_main_omp.exe;
rm Cpp_main_omp.exe
omp_pgi:
pgc++ Cpp_main_OpenACC.cpp -o Cpp_main_omp_pgi.exe -fast -mp -ta=multicore
./Cpp_main_omp_pgi.exe;
rm Cpp_main_omp_pgi.exe
julia_parallel:
julia -p$(CORES) Julia_main_parallel.jl
julia_pmap:
julia -p$(CORES) Julia_main_pmap.jl
Rcpp:
export OMP_NUM_THREADS=$(CORES); Rscript Rcpp_main.R;
R:
Rscript R_main.R $(CORES)
python:
python Python_main.py $(CORES)
matlab:
matlab -nodesktop -nodisplay -r "Matlab_main $(CORES)"
MPI:
mpic++ -g MPI_main.cpp -o main
mpirun -np $(CORES) -hostfile MPI_host_file ./main
rm main
CUDA:
export PATH=/usr/local/cuda/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
nvcc CUDA_main.cu -o main
./main
rm main