Skip to content

Commit

Permalink
Benchmark cleanups
Browse files Browse the repository at this point in the history
Related to #56
  • Loading branch information
nakatamaho committed Sep 24, 2022
1 parent 9b93a0e commit 15c7c5f
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 27 deletions.
2 changes: 1 addition & 1 deletion benchmark/mpblas/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
bench_PROGRAMS =
bench_DATA = \
Raxpy1.plt.in Raxpy2.plt.in Raxpy3.plt.in \
Rcopy1.plt Rcopy2.plt Rcopy3.plt \
Rcopy1.plt.in Rcopy2.plt.in Rcopy3.plt.in \
Rdot1.plt.in Rdot2.plt.in Rdot3.plt.in \
Rgemm1.plt Rgemm2.plt Rgemm3.plt \
Rgemm_cuda.plt \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set title font "Helvetica,20"
set title "Rcopy on %%MODELNAME%%"
set xlabel "Dimension"
set ylabel "MFLOPS"
#set terminal postscript eps color enhanced
set key above
set terminal pdf

plot \
Expand All @@ -14,5 +14,4 @@ plot \
"log.Rcopy._Float128_opt" using 1:2 title '\_Float128 (OpenMP)' with lines linewidth 1, \
"log.Rcopy._Float64x" using 1:2 title '\_Float64x' with lines linewidth 1, \
"log.Rcopy._Float64x_opt" using 1:2 title '\_Float64x (OpenMP)' with lines linewidth 1, \
"log.Rcopy.dd" using 1:2 title 'double double' with lines linewidth 1, \
"log.Rcopy.double" using 1:2 title 'double' with lines linewidth 1
"log.Rcopy.dd" using 1:2 title 'double double' with lines linewidth 1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set title font "Helvetica,20"
set title "Rcopy on %%MODELNAME%%"
set xlabel "Dimension"
set ylabel "MFLOPS"
#set terminal postscript eps color enhanced
set key above
set terminal pdf

plot \
Expand Down
12 changes: 0 additions & 12 deletions benchmark/mpblas/Rcopy3.plt

This file was deleted.

14 changes: 14 additions & 0 deletions benchmark/mpblas/Rcopy3.plt.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
set xlabel font "Helvetica,20"
set ylabel font "Helvetica,20"
set key font "Helvetica,16"
set title font "Helvetica,20"
set title "Rcopy on %%MODELNAME%%"
set xlabel "Dimension"
set ylabel "MFLOPS"
set key above
set terminal pdf

plot "log.Rcopy.double_opt" using 1:2 title 'double (OpenMP)' with lines linewidth 1, \
"log.Rcopy.double" using 1:2 title 'double' with lines linewidth 1, \
"log.dcopy.ref" using 1:2 title 'double (Ref.BLAS)' with lines linewidth 1, \
"log.dcopy.openblas" using 1:2 title 'double (OpenBLAS)' with lines linewidth 1
11 changes: 5 additions & 6 deletions benchmark/mpblas/dcopy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@
#define ___DOUBLE_BENCH___
#include <mplapack_benchmark.h>

#define TOTALSTEPS 1000

int main(int argc, char *argv[]) {
int n;
int incx = 1, incy = 1, STEP, N0;
int incx = 1, incy = 1, STEP = 97, N0 = 1, LOOPS = 3, TOTALSTEPS = 3000;
double alpha, dummy, *dummywork;
double mOne = -1;
double elapsedtime;
Expand All @@ -51,18 +49,19 @@ int main(int argc, char *argv[]) {
using std::chrono::nanoseconds;

// initialization
N0 = 1;
STEP = 1;
if (argc != 1) {
for (i = 1; i < argc; i++) {
if (strcmp("-N", argv[i]) == 0) {
N0 = atoi(argv[++i]);
} else if (strcmp("-STEP", argv[i]) == 0) {
STEP = atoi(argv[++i]);
} else if (strcmp("-LOOPS", argv[i]) == 0) {
LOOPS = atoi(argv[++i]);
} else if (strcmp("-TOTALSTEPS", argv[i]) == 0) {
TOTALSTEPS = atoi(argv[++i]);
}
}
}

n = N0;
for (p = 0; p < TOTALSTEPS; p++) {
double *x = new double[n];
Expand Down
1 change: 0 additions & 1 deletion benchmark/mpblas/ddot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ int main(int argc, char *argv[]) {
double mOne = -1;
double elapsedtime;
int i, p;
int check_flag = 1;

using Clock = std::chrono::high_resolution_clock;
using std::chrono::duration_cast;
Expand Down
9 changes: 6 additions & 3 deletions benchmark/mpblas/go.Rcopy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ else
LDPATHPREFIX="LD_LIBRARY_PATH=%%PREFIX%%/lib:$LD_LIBRARY_PATH"
fi

env $LDPATHPREFIX ./dcopy_ref -STEP 7 -TOTALSTEPS 42857 -LOOPS 3 >& log.dcopy.ref
env $LDPATHPREFIX ./dcopy_openblas -STEP 7 -TOTALSTEPS 42857 -LOOPS 3 >& log.dcopy.openblas

####
MPLIBS="_Float128 _Float64x dd double"

Expand Down Expand Up @@ -35,9 +38,9 @@ else
MODELNAME="unknown"
fi

$SED -i -e "s/%%MODELNAME%%/$MODELNAME/g" Rcopy1.plt
$SED -i -e "s/%%MODELNAME%%/$MODELNAME/g" Rcopy2.plt
$SED -i -e "s/%%MODELNAME%%/$MODELNAME/g" Rcopy3.plt
$SED -e "s/%%MODELNAME%%/$MODELNAME/g" Rcopy1.plt.in > Rcopy1.plt
$SED -e "s/%%MODELNAME%%/$MODELNAME/g" Rcopy2.plt.in > Rcopy2.plt
$SED -e "s/%%MODELNAME%%/$MODELNAME/g" Rcopy3.plt.in > Rcopy3.plt
####

gnuplot Rcopy1.plt > Rcopy1.pdf
Expand Down

0 comments on commit 15c7c5f

Please sign in to comment.