Skip to content

Commit

Permalink
Incorporate perf.f90 into the benchmark suite
Browse files Browse the repository at this point in the history
Use OpenBlas from Julia for matmul(). This is accomplished by the
-fexternal-blas option to gfortran.

Add Fortran support in table.pl.
  • Loading branch information
certik committed Jun 7, 2012
1 parent ce91f65 commit 88efb77
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
16 changes: 15 additions & 1 deletion test/perf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,29 @@ default: benchmarks.html
bin/perf%: perf.cpp
$(CXX) -O$* $< -o $@ $(JULIAHOME)/deps/openblas-v0.1.1/libopenblas.a -lpthread

bin/fperf%: perf.f90
$(FC) -O$* -fexternal-blas $< -o $@ $(JULIAHOME)/deps/openblas-v0.1.1/libopenblas.a -lpthread

benchmarks/c.csv: \
benchmarks/c0.csv \
benchmarks/c1.csv \
benchmarks/c2.csv \
benchmarks/c3.csv
cat $^ > $@

benchmarks/fortran.csv: \
benchmarks/fortran0.csv \
benchmarks/fortran1.csv \
benchmarks/fortran2.csv \
benchmarks/fortran3.csv
cat $^ > $@

benchmarks/c%.csv: bin/perf%
for t in 1 2 3 4 5; do $<; done >$@

benchmarks/fortran%.csv: bin/fperf%
for t in 1 2 3 4 5; do $<; done >$@

benchmarks/julia.csv: perf.jl
for t in 1 2 3 4 5; do ../../julia $<; done >$@

Expand All @@ -36,6 +49,7 @@ benchmarks/javascript.csv: perf.js

BENCHMARKS = \
benchmarks/c.csv \
benchmarks/fortran.csv \
benchmarks/julia.csv \
benchmarks/python.csv \
benchmarks/matlab.csv \
Expand All @@ -50,6 +64,6 @@ benchmarks.html: bin/table.pl benchmarks.csv
$(QUIET_PERL) $^ >$@

clean:
@rm -rf bin/perf* benchmarks/*.csv benchmarks.csv
@rm -rf bin/perf* bin/fperf* benchmarks/*.csv benchmarks.csv

.PHONY: all perf clean
3 changes: 2 additions & 1 deletion test/perf/bin/table.pl
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
"octave" => ["Octave" , "3.4" ],
"r" => ["R" , "2.14.2" ],
"javascript" => ["JavaScript" , "V8 3.6.6.11"],
"fortran" => ["Fortran" , ""],
);

our @systems = qw(julia python matlab octave r javascript);
our @systems = qw(julia python matlab octave r javascript fortran);

print qq[<table class="benchmarks">\n];
print qq[<colgroup>\n];
Expand Down

0 comments on commit 88efb77

Please sign in to comment.