ParSol is a library for semi-automatic parallelisation of data-parallel (especially linear algebra) algorithms. It is written in C++, using such C++ features as OOP, template metaprogramming, operatror overloading and others, so that the usage of the library is simple and intuitive, and the library itself is easily expanded.
The library presents user with the set of linear algebra objects (multidimentional arrays, vectors, sparse and dense matrices, among others). The functionality of arrays and vectors is similar to those of such libraries as Blitz++, FreePOOMA, and Boost.MultiArray. Using the library, the programmer creates sequential version of the code (no MPI needed), and debugs it. Once done, the parallel version of the algorithm is created by substituting some header files (to switch from sequential to parallel version), some class names, and adding several lines of code (initialization, topology specification and data exchange). The parallel version should be recompiled using MPI implementation (at least MPI-1.1 support required).
The parallelization is done the same way as in HPF. In fact, the library brings to C++ parallelization functionality similar to the one HPF brings to Fortran. However, differently from HPF, ParSol is a library, not a new compiler, with all the pros and cons. Also, in ParSol, the programmer must explicitely specify the computational stencil in order to ensure the optimal data exchange. From the one hand, this was a necessity, because it is hard for the library to analyse arbitrary user code. From the other hand, however, this allows for easy communication costs fine-tuning - the area where HPF failed to meet the expectations.
Apart from parallelization, the library objects are fine-tuned for high performance. For example, ParSol arrays performs similar to native C/C++ arrays. Also, the library uses only standard C++ features and MPI-1.1 for parallel version, which makes it highly portable. A comprehensive test suite is also available as a part of library.
Among the similar scientific libraries that ParSol may be compared to, FreePOOMA and PETSc should be mentioned. Both are more mature projects that ParSol, and it's great if they provide all the necessary functionality.
FreePOOMA went a much longer way towards implementing Fortran
features in C++. And it works, but ... C++ is not a Fortran. What in Fortran
is buried in specification and works by default, in C++ should be explicitely
specified. For example, it is possible (and necessary in FreePOOMA, if you
want it to be parallelized) to write
A(I) = B(I+1) + C(I-1)
in FreePooma, but code like that may require a bunch of FreePOOMA-specific
objects initializations before. Is it clearer and simpler than writing a simple
But the bigger problem of FreePOOMA is the absense of matrices, especially the sparse ones. This renders the library unusable for the large class of computational problems. In this case, ParSol library may be used.
PETSc does not have the matrix shortcomings of FreePOOMA. It has various types of matrices and linear equation solvers. However, PETSc primary interface if in C, and hence is functional and not as simple as ParSol's or FreePOOMA. Another problem with PETSc is its usage of global memory parallel programming model. This model allows for solution of more general problems, but at the cost of worse performance. Also, PETSc uses more explicit parallel programming, so if you need a clean implementation of linear algebra problem, both sequential and parallel (with high parallelization efficiency) at minimal cost, ParSol may be the valuable alternative.
Here're the ParSol library related links:
The ParSol library was used in several scientific projects, and therefore is mentioned is several publications. The list is provided here: