This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1119 - SuperLUSupport crashing if linking SuperLU 5.0
Summary: SuperLUSupport crashing if linking SuperLU 5.0
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Sparse (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Normal Feature Request
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-25 14:54 UTC by Tobias Nöll
Modified: 2019-12-04 15:12 UTC (History)
3 users (show)



Attachments

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);
A.setIdentity();
Eigen::Matrix<Scalar, Eigen::Dynamic, 1> b(3);
b.setOnes();
Eigen::Matrix<Scalar, Eigen::Dynamic, 1> x(3);
Eigen::SuperLU<Eigen::SparseMatrix<double>> solver;
solver.compute(A);
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):
https://bitbucket.org/eigen/eigen/commits/61b5464dd4
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.
Comment 4 Nobody 2019-12-04 15:12:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1119.

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