This is a parallel implementation of the Jacobi algorithm.
The Jacobi method (or Jacobi iterative method is an algorithm for determining the solutions of a diagonally dominant system of linear equations. Each diagonal element is solved for, and an approximate value is plugged in.
In the source code is possible to find different implementation using different parallel framework. The framework supported are:
- OpenMP
- FastFlow
- Low level thread implementation
Just include the source in your code allocate the data structures and call the correct solving function.
It is also included a main containing several tests.
main [-w ] [-s ] « [-p ][-i ] [-t [-h] [-d] [-c ] »
The required argument is algorithm that indicates the algorithm executed from the following list.
- sequential: sequential jacobi algorithm.
- omp: OpenMP multi-thread implementation of jacobi algorithm.
- thread: plain thread implementation of jacobi algorithm.
- fastflow: fastflowimplementation of jacobi algorithm.
The optional arguments are:
- [-w] number of threads used, default 8.
- [-s] size of the matrix, default 1024.
- [-i] iteration performed, default 50.
- [-t] error tolerated, default -1.
- [-p] filename in case of csv exporting, default null.
- [-h] prints the helper.
- [-d] enable debug prints, solution and error.
- [-c] seed used to generate the matrix, default. 42.
Currently I'm developing an high performance libraryin c++ called ParallelIterativeMethods that achieve better performance.