New user self-registration is disabled due to spam. Please email eigen-core-team @ if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 1119 - SuperLUSupport crashing if linking SuperLU 5.0
Summary: SuperLUSupport crashing if linking SuperLU 5.0
Alias: None
Product: Eigen
Classification: Unclassified
Component: Sparse (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Normal Feature Request
Assignee: Nobody
Depends on:
Reported: 2015-11-25 14:54 UTC by Tobias Nöll
Modified: 2016-07-10 00:38 UTC (History)
3 users (show)


Description Tobias Nöll 2015-11-25 14:54:12 UTC
This bug is related to the new version of SuperLU (5.0)
The authors decided to change the interface of xGSSVX and xGSTRF which are called by Eigen in SuperLUSupport.h. As a result Eigen crashes if linked with SuperLU 5.0.

The crash can be reproduced with this simple program:

Eigen::SparseMatrix<double> A(3, 3);
Eigen::Matrix<Scalar, Eigen::Dynamic, 1> b(3);
Eigen::Matrix<Scalar, Eigen::Dynamic, 1> x(3);
Eigen::SuperLU<Eigen::SparseMatrix<double>> solver;
x = solver.solve(b);

It does not crash if linking the prior version 4.3 of SuperLU. 
SuperLU 5.0 expects an additional work variable GlobalLU_t Glu to be passed via pointer in the interfaces of xGSSVX and xGSTRF. Eigen always calls xGSSVX with the "old" interface (having 1 parameter less).
Comment 1 Gael Guennebaud 2015-11-27 09:32:19 UTC
hm, then I don't see how it can even compile if you include superlu 5.0 headers.

Anyway, feel free to propose a patch specializing the calls for 5.0 (hopefully superlu 5.0 headers define some macro allowing to detect it)
Comment 2 Christoph Hertzberg 2016-07-10 00:33:57 UTC
Fixed here (dev-branch only):
Comment 3 Christoph Hertzberg 2016-07-10 00:38:35 UTC
(In reply to Gael Guennebaud from comment #1)
> hm, then I don't see how it can even compile if you include superlu 5.0
> headers.

I guess the reason it compiled was because we provided the declaration of the external "C" functions ourself. And C does not care about parameters when linking.

Note You need to log in before you can comment on or make changes to this bug.