====================================== More rigorous Testing and Benchmarking [TOC] ====================================== Like in the previous session we use a given test suite for a more rigorous test. Required files for the Test Suite ================================= Like in Session 12 the test suite is given in separate files: - `ulmaux.h` and `ulmaux.c` contains declarations and definitions of functions for printing and initializing matrices, a timer and other auxiliary functions. - `ulmblas.h` contains declarations for BLAS functions you have to implement - Files with prefix `test_` are test programs. For this exercise we will need `test_dtrsv.c`. These files are in the public directory `/home/numerik/pub/hpc/ss18/ulmblas/` on thales. You can copy them (if you haven't already): ---- SHELL (path=session13, hide) ---------------------------------------------- rm -rf trsv -------------------------------------------------------------------------------- ---- SHELL (path=session13) ---------------------------------------------------- mkdir trsv cd trsv cp /home/numerik/pub/hpc/ss18/ulmblas/*.[hc] . ls -------------------------------------------------------------------------------- About `ulmblas.c` ================= In Session 12 you already have implemented a few of the functions in `ulmblas.c`. You can use your own implementation or the version provided in `/home/numerik/pub/hpc/ss18/ulmblas/session12/`: ---- SHELL (path=session13/trsv) ----------------------------------------------- cp /home/numerik/pub/hpc/ss18/ulmblas/session12/ulmblas.c . ls -------------------------------------------------------------------------------- Exercise ======== - Add your implementation of `dtrsv`, `daxpy` and `ddot` to `ulmblas.c`. - Compile the test suite with ---- SHELL (path=session13/trsv, hide) --------------------------------------- cp /home/numerik/pub/hpc/ss18/ulmblas/session13/ulmblas.c . ------------------------------------------------------------------------------ ---- SHELL (path=session13/trsv,hostname=heim) ------------------------------- gcc -Wall -std=c11 -I. -O3 -o test_dtrsv test_dtrsv.c ulmaux.c ulmblas.c ------------------------------------------------------------------------------ - Run the test for checking with ---- SHELL (path=session13/trsv,hostname=heim,fold) -------------------------- ./test_dtrsv check ------------------------------------------------------------------------------ - Run the benchmark for col and row major cases: - For col major: ---- SHELL (path=session13/trsv,hostname=heim,fold) ------------------------ ./test_dtrsv bench colmajor ---------------------------------------------------------------------------- - For row major: ---- SHELL (path=session13/trsv,hostname=heim,fold) ------------------------ ./test_dtrsv bench rowmajor ----------------------------------------------------------------------------