Support for ILU using superlu is leading to SIGSEGV

Summary

When trying to launch SuperLU support for ILU using Eigen::SuperILU< Eigen::SparseMatrix<double> > solver with libsuperlu.so.7.0.1, a SIGSEGV is raised as the interface shift an argument. Indeed, the interface to ILU routine in the deps must have been changed and now as its LU counterpart, it takes a pointer to GlobalLU_t. The fix is in #xxx though need reviews.

Environment

  • Operating System : Linux
  • Architecture : x64
  • Eigen Version : 3
  • Compiler Version : Gcc11.4
  • Compile Flags : -O3 or -O0

Minimal Example

#include <eigen3/Eigen/Sparse>
#include <eigen3/Eigen/SuperLUSupport>

int main(){
        SparseMatrix  A(3,3);

            A.insert(0, 0) = 4;
            A.insert(0, 1) = -1;
            A.insert(1, 0) = -1;
            A.insert(1, 1) = 4;
            A.insert(1, 2) = -1;
            A.insert(2, 1) = -1;
            A.insert(2, 2) = 4;

            Eigen::SuperILU< SparseMatrix > solver;
            solver.analyzePattern(A);
            solver.factorize(A);

          };

Steps to reproduce

cmake_minimum_required (VERSION 3.12)
project(TEST)
set(test "test")

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build)

find_package(Threads REQUIRED)
find_package(Eigen3 3.3 REQUIRED)
message(STATUS "Eigen dir .. ${EIGEN3_INCLUDE_DIR}")


add_executable(${test} main.cpp)
target_link_libraries(${test} PUBLIC /usr/local/lib/libsuperlu.so.7 Threads::Threads)
  • Have a plan to fix this issue.

Fixed in !1934 (merged)

Edited by jacques FRANC