Amesos2: Build error when compiling with SuperLU 5.2.1
Created by: Filipe-Cumaru
@trilinos/Amesos @trilinos/Amesos2
Expectations
Amesos2 works with SuperLU and SuperLU-dist 5.
Current Behavior
I've got some compilation errors when trying to build Amesos2 with SuperLU support. Some of those are shown above. I've put the full list of errors in the attached file to avoid flooding this report. amesos_compilation_errors.txt
/home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superludist_FunctionMap.hpp:378:37: error: invalid conversion from ‘SLUD::int_t {aka int}’ to ‘SLUD::D::LUstruct_t*’ [-fpermissive]
SLUD::D::LUstructInit(m, n, lu);
^
In file included from /home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superludist_TypeMap.hpp:87:0,
from /home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superludist_FunctionMap.hpp:63,
from /home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superludist_decl.hpp:58,
from /home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superludist.hpp:47,
from /home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Factory.hpp:108,
from /home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Details_LinearSolverFactory_def.hpp:52,
from /home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Details_LinearSolverFactory.hpp:49,
from /home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Details_registerLinearSolverFactory.cpp:45:
/usr/include/superlu-dist/superlu_ddefs.h:262:13: note: declared here
extern void LUstructInit(const int_t, LUstruct_t *);
^~~~~~~~~~~~
In file included from /home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superlu_decl.hpp:58:0,
from /home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superlu.hpp:47,
from /home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Factory.hpp:124,
from /home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Details_LinearSolverFactory_def.hpp:52,
from /home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Details_LinearSolverFactory.hpp:49,
from /home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Details_registerLinearSolverFactory.cpp:45:
/home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superlu_FunctionMap.hpp: At global scope:
/home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superlu_FunctionMap.hpp:108:19: error: variable or field ‘sgssvx’ declared void
sgssvx(SLU::superlu_options_t *, SLU::SuperMatrix *, int *, int *, int *,
^~~~~~~~~~~~~~~~~
/home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superlu_FunctionMap.hpp:108:19: error: ‘superlu_options_t’ is not a member of ‘SLU’
/home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superlu_FunctionMap.hpp:108:38: error: expected primary-expression before ‘,’ token
sgssvx(SLU::superlu_options_t *, SLU::SuperMatrix *, int *, int *, int *,
^
/home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superlu_FunctionMap.hpp:115:19: error: ‘mem_usage_t’ is not a member of ‘SLU’
SLU::mem_usage_t *, SLU::SuperLUStat_t *, int *);
^~~~~~~~~~~
/home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superlu_FunctionMap.hpp:115:32: error: expected primary-expression before ‘,’ token
SLU::mem_usage_t *, SLU::SuperLUStat_t *, int *);
^
/home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superlu_FunctionMap.hpp:115:39: error: ‘SuperLUStat_t’ is not a member of ‘SLU’
SLU::mem_usage_t *, SLU::SuperLUStat_t *, int *);
^~~~~~~~~~~~~
/home/facsa/Downloads/Trilinos-master/packages/amesos2/src/Amesos2_Superlu_FunctionMap.hpp:459:15: error: ‘sgssvx’ is not a member of ‘SLU::S’
SLU::S::sgssvx(options, A, perm_c, perm_r, etree, equed, R, C, L, U, work,
^~~~~~
Steps to Reproduce
I've configured Trilinos using cmake with the following options:
cmake \
-D CMAKE_INSTALL_PREFIX:PATH=/home/facsa/Trilinos-SuperLU \
\
-D MPI_BASE_DIR:PATH=/usr \
\
-D CMAKE_BUILD_TYPE:STRING=DEBUG \
-D CMAKE_Fortran_COMPILER:FILEPATH=/usr/bin/mpif90 \
-D CMAKE_CXX_FLAGS:STRING="-std=c++11 -O3" \
-D BUILD_SHARED_LIBS:BOOL=ON \
-D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING="" \
-D PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
\
-D Trilinos_ENABLE_CXX11=ON \
-D Trilinos_CXX11_FLAGS="-std=c++11" \
-D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
-D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=OFF \
-D Trilinos_ENABLE_ALL_FORWARD_DEP_PACKAGES:BOOL=OFF \
-D Trilinos_ENABLE_Teuchos:BOOL=ON \
-D Trilinos_ENABLE_Epetra:BOOL=ON \
-D Trilinos_ENABLE_EpetraExt:BOOL=ON \
-D Trilinos_ENABLE_AztecOO:BOOL=ON \
-D Trilinos_ENABLE_Amesos2:BOOL=ON \
-D Trilinos_ENABLE_ML:BOOL=ON \
-D Trilinos_ENABLE_PyTrilinos:BOOL=OFF \
\
-D Trilinos_ENABLE_EXAMPLES:BOOL=OFF \
-D Trilinos_ENABLE_TESTS:BOOL=OFF \
\
-D TPL_ENABLE_MATLAB:BOOL=OFF \
-D TPL_ENABLE_Matio:BOOL=OFF \
-D TPL_ENABLE_MPI:BOOL=ON \
-D TPL_ENABLE_BLAS:BOOL=ON \
-D TPL_ENABLE_LAPACK:BOOL=ON \
-D TPL_ENABLE_QT:BOOL=OFF \
-D TPL_ENABLE_X11:BOOL=OFF \
-D TPL_ENABLE_SuperLU:BOOL=ON \
-D TPL_SuperLU_LIBRARIES:PATH=/usr/lib/x86_64-linux-gnu \
-D TPL_SuperLU_INCLUDE_DIRS:PATH=/usr/include/superlu \
-D TPL_ENABLE_SuperLUDist:BOOL=ON \
-D TPL_SuperLUDist_INCLUDE_DIRS:PATH=/usr/include/superlu-dist \
-D TPL_SuperLUDist_LIBRARIES:PATH=/usr/lib/x86_64-linux-gnu \
-D TPL_ENABLE_ParMETIS:BOOL=ON \
\
-D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF \
-D Trilinos_VERBOSE_CONFIGURE:BOOL=OFF \
..
and then tried to build with make
. I've tried to build master branch and the latest release. Both failed with the same errors.
Your Environment
I'm trying to build Trilinos on Ubuntu 18.04 (Bionic Beaver). The SuperLU libraries were installed using apt-get install libsuperlu-dev libsuperlu-dist-dev
.