diff --git a/README.md b/README.md index 0605bb3201d56f1528614cb384492a1837340fa7..9cb71768cebc5c2669b3362930f8ae84b108f6e8 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,12 @@ In this Sparse Linear Algebra folder, there are sample codes for beginners, as w - Reha Oguz Selvitopi(reha@cs.bilkent.edu.tr) # Contents +- spmv: Multiplication of a sparse matrix with a dense vector. + - mkl_shmem: Using MKL's routine mkl_dcsrmv() on a multicore processor - spgemm: Multiplication of two sparse matrices. - mkl_shmem: Using MKL's routine mkl_dcsrmultcsr() on a multicore processor - mkl_xphi: Using MKL's routine mkl_dcsrmultcsr() via offloading to a Xeon Phi coprocessor + These two codes also contain schoolbook implementation of an SpGEMM algorithm that uses row-by-row formulation [1]. - Krylov Subspace Methods - Linear system solution in parallel - 2D Laplacian (2D mesh) @@ -21,3 +24,7 @@ In this Sparse Linear Algebra folder, there are sample codes for beginners, as w - Solving multiple linear systems - Same cofficient matrix - Different right-hand-side vectors + + +REFERENCES: +[1] Fred G. Gustavson. 1978. Two Fast Algorithms for Sparse Matrices: Multiplication and Permuted Transposition. ACM Trans. Math. Softw. 4, 3 (September 1978), 250-269. DOI=http://dx.doi.org/10.1145/355791.355796 diff --git a/spgemm/README.md b/spgemm/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ef88994a285df8c38633b232d3caf6d2c67e5c1f --- /dev/null +++ b/spgemm/README.md @@ -0,0 +1,10 @@ +CodeVault: Sparse Matrix-Matrix Multiplication +================ +# Overview +Sparse matrix-matrix multiplication (SpGEMM) operation, which involves multiplication of two sparse matrices, is used in solving linear programming problems, molecular dynamics simulations (e.g. CP2K), etc. This folder contains samples for performing SpGEMM. + +# Contributors & Maintainers +- Cevdet Aykanat (aykanat@cs.bilkent.edu.tr) +- Kadir Akbudak (kadir.cs@gmail.com) +- Reha Oguz Selvitopi(reha@cs.bilkent.edu.tr) + diff --git a/spgemm/mkl_shmem/README.md b/spgemm/mkl_shmem/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2a56c563c9e8a75ab0c9aee2429048816bc032d8 --- /dev/null +++ b/spgemm/mkl_shmem/README.md @@ -0,0 +1,55 @@ +======= +README +======= +- 1. Code sample name +mklspgemm + +- 2. Description of the code sample package +mklspgemm code performs multiplication of two sparse matrices using MKL's routine mkl_dcsrmultcsr() on a multicore processor. + +MKL library is required. + +This is one of the code sample from the PRACE CodeVault. You can find more code samples available for download from the PRACE CodeVault here: https://gitlab.com/PRACE-4IP/CodeVault + +- 3. Release date +26 January 2016 + +- 4. Version history +1.0: initial version + +- 5. Contributor (s) / Maintainer(s) +Kadir Akbudak + +- 6. Copyright / License of the code sample +Apache 2.0 + +- 7. Language(s) +C + +- 8. Parallelisation Implementation(s) +Parallelism is provided by MKL. + +- 9. Level of the code sample complexity +new starts + +- 10. Instructions on how to compile the code +cc=icc cmake . +make + +- 11. Instructions on how to run the code +./mklspgemm test.mtx test.mtx out.mtx 2 PRINT_YES +1. ./mklspgemm : Executable +2. test.mtx : First input matrix +3. test.mtx : Second input matrix +4. out.mtx : Output matrix +5. 2 : Number of threads +6. PRINT_YES : Print matrices to stdout + +- 12. Sample input(s) +test.mtx contains a small square matrix in Matrix Market format [1] + +- 13. Sample output(s) +Prints timing information to output. + +REFERENCES: +[1] http://math.nist.gov/MatrixMarket/formats.html diff --git a/spgemm/mkl_xphi/README.md b/spgemm/mkl_xphi/README.md new file mode 100644 index 0000000000000000000000000000000000000000..73ac1d5887354cdbebf673332cbd0c6a69d0e3b1 --- /dev/null +++ b/spgemm/mkl_xphi/README.md @@ -0,0 +1,59 @@ +======= +README +======= +- 1. Code sample name +mklspgemm + +- 2. Description of the code sample package +mklspgemm code performs multiplication of two sparse matrices using MKL's routine mkl_dcsrmultcsr() on a Xeon Phi coprocessor. +Offload mode is used. + +MKL library for Xeon Phi is required. Note that MKL library for Xeon Phi is in different from the one for host system. + +This is one of the code sample from the PRACE CodeVault. You can find more code samples available for download from the PRACE CodeVault here: https://gitlab.com/PRACE-4IP/CodeVault + +- 3. Release date +26 January 2016 + +- 4. Version history +1.0: initial version + +- 5. Contributor (s) / Maintainer(s) +Kadir Akbudak + +- 6. Copyright / License of the code sample +Apache 2.0 + +- 7. Language(s) +C + +- 8. Parallelisation Implementation(s) +Parallelism is provided by MKL. + +- 9. Level of the code sample complexity +new starts + +- 10. Instructions on how to compile the code +cc=icc cmake . +make + +- 11. Instructions on how to run the code +export OFFLOAD_INIT=on_offload;./mklspgemm test.mtx test.mtx out.mtx 2 0 PRINT_YES +1. ./mklspgemm : Executable +2. test.mtx : First input matrix +3. test.mtx : Second input matrix +4. out.mtx : Output matrix +5. 2 : Number of threads +6. 0 : Id of the mic device. It must be a single integer. +7. PRINT_YES : Print matrices to stdout + +export OFFLOAD_INIT=on_offload; starts only on of the mic cards when there are more than one mic card. If you avoid this environment variable, systems tries to start all mic cards so runs on other cards are effected. + +- 12. Sample input(s) +test.mtx contains a small square matrix in Matrix Market format [1] + +- 13. Sample output(s) +Prints timing information to output. + +REFERENCES: +[1] http://math.nist.gov/MatrixMarket/formats.html diff --git a/spmv/README.md b/spmv/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6e93332eaa39f10c6c76814b1f0ea1df659b1347 --- /dev/null +++ b/spmv/README.md @@ -0,0 +1,10 @@ +CodeVault: Sparse Matrix-Vector Multiplication +================ +# Overview +Sparse matrix-vector multiplication (SpMV) is one of the fundamental kernels in scientific computing. This folder contains samples for performing SpMV. + +# Contributors & Maintainers +- Cevdet Aykanat (aykanat@cs.bilkent.edu.tr) +- Kadir Akbudak (kadir.cs@gmail.com) +- Reha Oguz Selvitopi(reha@cs.bilkent.edu.tr) + diff --git a/spmv/mkl_shmem/README.md b/spmv/mkl_shmem/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7fbdfa89fe95f0d54c0a963b3294607ffa6bcd05 --- /dev/null +++ b/spmv/mkl_shmem/README.md @@ -0,0 +1,53 @@ +======= +README +======= +- 1. Code sample name +mklspmv + +- 2. Description of the code sample package +mklspmv code performs multiplication of a sparse matrix with a dense vector using MKL's routine mkl_dcsrmv() on a multicore processor. + +MKL library is required. + +This is one of the code sample from the PRACE CodeVault. You can find more code samples available for download from the PRACE CodeVault here: https://gitlab.com/PRACE-4IP/CodeVault + +- 3. Release date +26 January 2016 + +- 4. Version history +1.0: initial version + +- 5. Contributor (s) / Maintainer(s) +Kadir Akbudak + +- 6. Copyright / License of the code sample +Apache 2.0 + +- 7. Language(s) +C + +- 8. Parallelisation Implementation(s) +Parallelism is provided by MKL. + +- 9. Level of the code sample complexity +new starts + +- 10. Instructions on how to compile the code +cc=icc cmake . +make + +- 11. Instructions on how to run the code +./mklspmv test.mtx 2 PRINT_YES +1. ./mklspmv : Executable +2. test.mtx : Input matrix +3. 2 : Number of threads +4. PRINT_YES : Print input matrix to stdout + +- 12. Sample input(s) +test.mtx contains a small matrix in Matrix Market format [1] + +- 13. Sample output(s) +Prints timing information to output. + +REFERENCES: +[1] http://math.nist.gov/MatrixMarket/formats.html