# blas_benchmark **Repository Path**: iotwins/blas_benchmark ## Basic Information - **Project Name**: blas_benchmark - **Description**: No description available - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2020-09-08 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Getting Started ### Prerequisites The OpenBLAS and Eigen libraries should be installed (linux version) in order to run the following benchmark. #### OpenBLAS installation OpenBLAS can be cloned into your local directory by using `git`. ``` git clone "https://github.com/xianyi/OpenBLAS.git" ``` It can be installed by invoking `make` in the directory which contains `Makefile`. Make sure `gfortran` is installed and `gcc` is updated to the latest stable version. Use `make install` to copy your `include` and `lib` folder your preferred installation directory. ``` make install PREFIX=your_installation_directory ``` #### Eigen installation Eigen can also be downloaded from the official webset. Eigen can be used driectly without installation. After untar the archive, the `include` libraries are in the subforder `/Eigen`. Usually, the dense matrix manipulation libraries can be used by including `` as the header file in your C++ code. ### Installation of Benchmarking tool Clone the files into your local directory. ``` git clone "https://github.com/heilokchow/math_lib_benchmark.git" ``` Change the value of variables for include and library directories `EIGEN_INCDIR`, `OPENBLAS_INCDIR` and `OPENBLAS_LIBDIR` in the `Makefile` according to your installation path of OpenBLAS and Eigen libraries. By invoking `make`, the benchmarking binary file can be created for different libraries. Then, the benchmark can be run by `./bench.bin `, where `n` is the dimension of the matrix and `loops` is the number of replications. An important note is that if your own program use parrallel programming techniques already, you should use single thread for these math libraries. Also, Eigen can use `EIGEN_DONT_PARALLELIZE` to disable parallelization.