Skip to content
Snippets Groups Projects
Commit 508f1ef2 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

Remove support for SuperLU 4.

Only SuperLU 5 is now supported.
parent 15d4af8e
No related branches found
No related tags found
1 merge request!364Feature/remove more deprecated stuff after 2.7
......@@ -6,6 +6,8 @@
- Remove deprecated preconditioner implementations `SeqILU0` and `SeqILUn`. Use
`SeqILU` instead, which implements incomplete LU decomposition of any order.
- Drop support SuperLU 4.
# Release 2.7
- New `SolverFactory` for generating sequential direct or iterative solvers and
......
# .. cmake_module::
#
# Module that checks whether SuperLU is available and usable.
# SuperLU must be 4.0 or newer.
# SuperLU must be 5.0 or newer.
#
# Variables used by this module which you may want to set:
#
......@@ -13,15 +13,6 @@
# :code:`SUPERLU_FOUND`
# True if SuperLU available and usable.
#
# :code:`SUPERLU_MIN_VERSION_4`
# True if SuperLU version >= 4.0.
#
# :code:`SUPERLU_MIN_VERSION_4_3`
# True if SuperLU version >= 4.3.
#
# :code:`SUPERLU_MIN_VERSION_5`
# True if SuperLU version >= 5.0.
#
# :code:`SUPERLU_WITH_VERSION`
# Human readable string containing version information.
#
......@@ -58,7 +49,6 @@ find_path(SUPERLU_INCLUDE_DIR
find_library(SUPERLU_LIBRARY
NAMES "superlu"
"superlu_5.2.1" "superlu_5.2" "superlu_5.1.1" "superlu_5.1" "superlu_5.0"
"superlu_4.3" "superlu_4.2" "superlu_4.1" "superlu_4.0"
PATHS ${SUPERLU_PREFIX} ${SUPERLU_ROOT}
PATH_SUFFIXES "lib" "lib32" "lib64"
NO_DEFAULT_PATH
......@@ -68,7 +58,6 @@ find_library(SUPERLU_LIBRARY
find_library(SUPERLU_LIBRARY
NAMES "superlu"
"superlu_5.2.1" "superlu_5.2" "superlu_5.1.1" "superlu_5.1" "superlu_5.0"
"superlu_4.3" "superlu_4.2" "superlu_4.1" "superlu_4.0"
PATH_SUFFIXES "lib" "lib32" "lib64"
)
......@@ -92,26 +81,6 @@ endif(SUPERLU_LIBRARY)
if(BLAS_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${BLAS_LIBRARIES})
endif(BLAS_LIBRARIES)
# check wether version is new enough >= 4.0
check_c_source_compiles("
typedef int int_t;
#include <supermatrix.h>
#include <slu_util.h>
int main()
{
SuperLUStat_t stat;
stat.expansions=8;
return 0;
}" SUPERLU_MIN_VERSION_4)
# check whether version is at least 4.3
check_c_source_compiles("
#include <slu_ddefs.h>
int main(void)
{
return SLU_DOUBLE;
}"
SUPERLU_MIN_VERSION_4_3)
# check whether version is at least 5.0
check_c_source_compiles("
......@@ -125,13 +94,11 @@ int main(void)
}"
SUPERLU_MIN_VERSION_5)
if(SUPERLU_MIN_VERSION_4_3)
include(CheckIncludeFiles)
set(HAVE_SLU_DDEFS_H 1)
check_include_files(slu_sdefs.h HAVE_SLU_SDEFS_H)
check_include_files(slu_cdefs.h HAVE_SLU_CDEFS_H)
check_include_files(slu_zdefs.h HAVE_SLU_ZDEFS_H)
endif(SUPERLU_MIN_VERSION_4_3)
include(CheckIncludeFiles)
set(HAVE_SLU_DDEFS_H 1)
check_include_files(slu_sdefs.h HAVE_SLU_SDEFS_H)
check_include_files(slu_cdefs.h HAVE_SLU_CDEFS_H)
check_include_files(slu_zdefs.h HAVE_SLU_ZDEFS_H)
cmake_pop_check_state()
......@@ -139,26 +106,6 @@ set(SUPERLU_INT_TYPE "int" CACHE STRING
"The integer version that SuperLU was compiled for (Default is int.
Should be the same as int_t define in e.g. slu_sdefs.h")
if(NOT SUPERLU_MIN_VERSION_4)
set(SUPERLU_WITH_VERSION "SuperLU < 4.0" CACHE STRING
"Human readable string containing SuperLU version information.")
else()
if(SUPERLU_MIN_VERSION_5)
set(SUPERLU_WITH_VERSION "SuperLU >= 5.0" CACHE STRING
"Human readable string containing SuperLU version information.")
elseif(SUPERLU_MIN_VERSION_4_3)
set(SUPERLU_WITH_VERSION "SuperLU >= 4.3" CACHE STRING
"Human readable string containing SuperLU version information.")
else()
set(SUPERLU_WITH_VERSION "SuperLU <= 4.2 and >= 4.0" CACHE STRING
"Human readable string containing SuperLU version information.")
endif()
if(NOT SUPERLU_MIN_VERSION_5)
message(AUTHOR_WARNING "Support for SuperLU 4.x is deprecated an will be removed after Dune 2.7")
endif()
endif()
# behave like a CMake module is supposed to behave
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
......@@ -166,10 +113,10 @@ find_package_handle_standard_args(
DEFAULT_MSG
SUPERLU_INCLUDE_DIR
SUPERLU_LIBRARY
SUPERLU_MIN_VERSION_4
SUPERLU_MIN_VERSION_5
)
mark_as_advanced(SUPERLU_INCLUDE_DIR SUPERLU_LIBRARY)
mark_as_advanced(SUPERLU_INCLUDE_DIR SUPERLU_LIBRARY SUPERLU_MIN_VERSION_5)
# if both headers and library are found, store results
if(SUPERLU_FOUND)
......
......@@ -50,15 +50,6 @@
/* Define to ENABLE_ARPACKPP if the ARPACK++ library is available */
#cmakedefine HAVE_ARPACKPP ENABLE_ARPACKPP
/* Define to 0 as all versions since SuperLu 4.0 do no longer provide it that way. */
#define HAVE_MEM_USAGE_T_EXPANSIONS 1
/* define to 1 if SuperLU header slu_ddefs.h contains SLU_DOUBLE */
#cmakedefine SUPERLU_MIN_VERSION_4_3 @SUPERLU_MIN_VERSION_4_3@
/* define to 1 if SuperLU dgssvx takes a GlobalLU_t parameter */
#cmakedefine SUPERLU_MIN_VERSION_5 @SUPERLU_MIN_VERSION_5@
/* Define to the version of dune-istl */
#define DUNE_ISTL_VERSION "${DUNE_ISTL_VERSION}"
......
......@@ -78,16 +78,10 @@ namespace Dune
float *rpg, float *rcond, float *ferr, float *berr,
mem_usage_t *memusage, SuperLUStat_t *stat, int *info)
{
#if SUPERLU_MIN_VERSION_5
GlobalLU_t gLU;
sgssvx(options, mat, perm_c, perm_r, etree, equed, R, C,
L, U, work, lwork, B, X, rpg, rcond, ferr, berr,
&gLU, memusage, stat, info);
#else
sgssvx(options, mat, perm_c, perm_r, etree, equed, R, C,
L, U, work, lwork, B, X, rpg, rcond, ferr, berr,
memusage, stat, info);
#endif
}
};
......@@ -126,16 +120,10 @@ namespace Dune
double *rpg, double *rcond, double *ferr, double *berr,
mem_usage_t *memusage, SuperLUStat_t *stat, int *info)
{
#if SUPERLU_MIN_VERSION_5
GlobalLU_t gLU;
dgssvx(options, mat, perm_c, perm_r, etree, equed, R, C,
L, U, work, lwork, B, X, rpg, rcond, ferr, berr,
&gLU, memusage, stat, info);
#else
dgssvx(options, mat, perm_c, perm_r, etree, equed, R, C,
L, U, work, lwork, B, X, rpg, rcond, ferr, berr,
memusage, stat, info);
#endif
}
};
......@@ -173,16 +161,10 @@ namespace Dune
double *rpg, double *rcond, double *ferr, double *berr,
mem_usage_t *memusage, SuperLUStat_t *stat, int *info)
{
#if SUPERLU_MIN_VERSION_5
GlobalLU_t gLU;
zgssvx(options, mat, perm_c, perm_r, etree, equed, R, C,
L, U, work, lwork, B, X, rpg, rcond, ferr, berr,
&gLU, memusage, stat, info);
#else
zgssvx(options, mat, perm_c, perm_r, etree, equed, R, C,
L, U, work, lwork, B, X, rpg, rcond, ferr, berr,
memusage, stat, info);
#endif
}
};
......@@ -220,16 +202,10 @@ namespace Dune
float *rpg, float *rcond, float *ferr, float *berr,
mem_usage_t *memusage, SuperLUStat_t *stat, int *info)
{
#if SUPERLU_MIN_VERSION_5
GlobalLU_t gLU;
cgssvx(options, mat, perm_c, perm_r, etree, equed, R, C,
L, U, work, lwork, B, X, rpg, rcond, ferr, berr,
&gLU, memusage, stat, info);
#else
cgssvx(options, mat, perm_c, perm_r, etree, equed, R, C,
L, U, work, lwork, B, X, rpg, rcond, ferr, berr,
memusage, stat, info);
#endif
}
};
......@@ -606,11 +582,7 @@ namespace Dune
double def0=d.two_norm();
*/
#ifdef SUPERLU_MIN_VERSION_4_3
options.IterRefine=SLU_DOUBLE;
#else
options.IterRefine=DOUBLE;
#endif
SuperLUSolveChooser<T>::solve(&options, &static_cast<SuperMatrix&>(mat), perm_c, perm_r, etree, &equed, R, C,
&L, &U, work, lwork, mB, mX, &rpg, &rcond, &ferr, &berr,
......@@ -691,11 +663,7 @@ namespace Dune
/* Initialize the statistics variables. */
StatInit(&stat);
#ifdef SUPERLU_MIN_VERSION_4_3
options.IterRefine=SLU_DOUBLE;
#else
options.IterRefine=DOUBLE;
#endif
SuperLUSolveChooser<T>::solve(&options, &static_cast<SuperMatrix&>(mat), perm_c, perm_r, etree, &equed, R, C,
&L, &U, work, lwork, mB, mX, &rpg, &rcond, &ferr, &berr,
......
......@@ -17,10 +17,7 @@ extern "C" {
char *, float *, float *, SuperMatrix *, SuperMatrix *,
void *, int, SuperMatrix *, SuperMatrix *,
float *, float *, float *, float *,
#if SUPERLU_MIN_VERSION_5
GlobalLU_t*,
#endif
mem_usage_t *, SuperLUStat_t *, int *);
GlobalLU_t*, mem_usage_t *, SuperLUStat_t *, int *);
extern void
sCreate_Dense_Matrix(SuperMatrix *, int, int, float *, int,
......@@ -41,10 +38,7 @@ extern "C" {
char *, double *, double *, SuperMatrix *, SuperMatrix *,
void *, int, SuperMatrix *, SuperMatrix *,
double *, double *, double *, double *,
#if SUPERLU_MIN_VERSION_5
GlobalLU_t*,
#endif
mem_usage_t *, SuperLUStat_t *, int *);
GlobalLU_t*, mem_usage_t *, SuperLUStat_t *, int *);
extern void
dCreate_CompCol_Matrix(SuperMatrix *, int, int, int, double *,
......@@ -69,10 +63,7 @@ extern "C" {
char *, float *, float *, SuperMatrix *, SuperMatrix *,
void *, int, SuperMatrix *, SuperMatrix *,
float *, float *, float *, float *,
#if SUPERLU_MIN_VERSION_5
GlobalLU_t*,
#endif
mem_usage_t *, SuperLUStat_t *, int *);
GlobalLU_t*, mem_usage_t *, SuperLUStat_t *, int *);
extern void
......@@ -98,10 +89,7 @@ extern "C" {
char *, double *, double *, SuperMatrix *, SuperMatrix *,
void *, int, SuperMatrix *, SuperMatrix *,
double *, double *, double *, double *,
#if SUPERLU_MIN_VERSION_5
GlobalLU_t*,
#endif
mem_usage_t *, SuperLUStat_t *, int *);
GlobalLU_t*, mem_usage_t *, SuperLUStat_t *, int *);
extern void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment