This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Pastix solver with MPI

Tags: None
(comma "," separated)
pjsa
Registered Member
Posts
15
Karma
0

Pastix solver with MPI

Sun Sep 29, 2013 6:55 am
Hi, I'm interested in using the Pastix solver via the eigen interface in an application which uses MPI.
It would be nice if the eigen interface was sufficiently general to allow this possibility, particularly since Pastix is a parallel solver.

When I tried to use Pastix in this way I encountered a few compiler and linking errors, not all were related to MPI. The fixes required are in PaStiXSupport.h
1. change on lines 59, 66, 73, 80 "int pastix_comm" to "MPI_Comm pastix_comm". This is because MPI_Comm is not always defined to be an integer, it is implementation dependent.
2. lines 286-288 change to
Code: Select all
  internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD,
         0, 0, 0, (Scalar*)0,
         0, 0, 0, 1, m_iparm.data(), m_dparm.data());

Note there are a few changes here: the cast to Scalar for argument 6, the name of function and scope.
3. change eigen_pastix functions on lines 59,66,73 and 80 to be inline
I am using openmpi 1.4.5,, gcc 4.7.3, pastix release 3725 and eigen changeset id 705214450889
Also I had to define the following macros __COMPLEX__ COMPLEXFLOAT_ COMPLEXDOUBLE_ and MPI_FALSE_H and make sure that mpi.h is included before Eigen/PaStiXSupport in my application code (ideally mpi.h would be included in the header file Eigen/PaStiXSupport and not pastix_nompi.h, I suppose when some macro is defined e.g. EIGEN_PASTIXMPI_SUPPORT). When I did all of this then everything worked fine. The solve is not "quiet" though and dumps a lot of details to the screen which is ok but not consistent with the behaviour of the other sparse solvers.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Pastix solver with MPI

Wed Oct 02, 2013 8:56 pm
Thanks for the hints. The best to get these changes upstream would be to submit a proper diff using mercurial.

See: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=668


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]