I have a couple of questions regarding the DSS API to PARDISO.
1. When calling dss_solve_* is the Rhs-vector input reordered internally according to the reordering obtained with dss_reorder? (Same for dss_factor_* and the matrix input)
2. It is possible to duplicate an existing solver object such that there exist two identical solver objects with different handles?
3. According to the MKL manual the dss_factor_* takes the matrix entries input as an 'array of elements'. How should this 1D-array be constructed from a (Fortran) 2D-array, row-by-row (row-major) or column-by-column (column-major)? Similarly, for multiple Rhs-vectors are the solution vectors of dss_solve_* outputted row- or column-major?
4. Related to 1., is the solution outputted by dss_solve_* reordered back to the original ordering, or should this be done by the user?
Hopefully one of you guys can help me out.
Thanks in advance.
I confine my answer to the third item in your list. Before you call DSS_FACTOR_xxx, you should have called DSS_CREATE, DSS_DEFINE_STRUCTURE and DSS_REORDER. The matrix is supplied in the compressed sparse row (CSR) representation to DSS_DEFINE_STRUCTURE. The MKL documentation has a full appendix, "Linear Solver Basics" that describes sparse matrix storage.
It would be instructive for you to study the DSS example problems that are included in the MKL examples directory.
Thanks for the reply.
Indeed the examples proved instructive. However, I still have one question remaining. In the case of multiple right-hand side vectors, how should these values be given as an argument to dss_solve_real? Obviously as an array of length #rhs x #rows of system matrix, but stored row- or column major?
Thanks in advance.
If you have N equations and R right-hand sides, the RhsValues argument is an N.R element 1-D array. The first N elements contain the first right hand side vector. Elements N+1, ..., 2N contain the second right hand side vector, and so on. The solution vectors are similarly combined into an N.R 1-D array, with the first solution vector in the first N elements, etc.
If you carefully read the DSS solver documentation (in the MKL reference manual), you will see this for yourself. Linear algebra routines with a Fortran pedigree use column-major order for 2-D arrays.