============ Using OpenMP [TOC] ============ Changes: - `gemm.hpp` uses OpenMP if you compile with `-fopenmp`. Tar-Ball for this Session ========================= The tar-ball __session3.tgz__ contains the files: ---- SHELL --------------------------------------------------------------------- tar tfvz session3.tgz -------------------------------------------------------------------------------- :links: session3.tgz -> http://www.mathematik.uni-ulm.de/~lehn/test_ublas/session3.tgz Compile and Run Benchmark ========================= For a quick benchmark we again limit $m$ to $500$ with `-DM_MAX=500`. This time we also enable the optimized micro kernel for AVX with `-DHAVE_AVX`: ---- SHELL (path=session3,hostname=heim) --------------------------------------- g++ -Ofast -mavx -Wall -std=c++11 -DNDEBUG -DHAVE_AVX -fopenmp -DM_MAX=500 -I ../boost_1_60_0 matprod.cc ./a.out -------------------------------------------------------------------------------- Core Function for Matrix-Matrix Produkt ======================================= :import: session3/gemm.hpp Benchmark Results ================= ---- SHELL (path=session3,hostname=heim) --------------------------------------- g++ -Ofast -mavx -Wall -std=c++11 -DHAVE_AVX -fopenmp -DNDEBUG -I ../boost_1_60_0 matprod.cc ./a.out > report.session3 cat report.session3 gnuplot plot.session3.mflops gnuplot plot.session3.time gnuplot plot.session3.time_log -------------------------------------------------------------------------------- MFLOPS ------ ---- IMAGE ----------------------- session3/bench.session3.mflops.svg ---------------------------------- Time ---- ---- IMAGE ----------------------- session3/bench.session3.time.svg ---------------------------------- Time with Logarithmic scale --------------------------- ---- IMAGE ------------------------- session3/bench.session3.time_log.svg ------------------------------------ :navigate: back -> doc:session2/page01 next -> doc:session4/page01