diff --git a/cmake/modules/FindSuperLU.cmake b/cmake/modules/FindSuperLU.cmake index bf20f9739bfd1249b04c0bd206e47bcb9f1609dd..8021925481f20e0ff96d005826d06759f9656e24 100644 --- a/cmake/modules/FindSuperLU.cmake +++ b/cmake/modules/FindSuperLU.cmake @@ -55,7 +55,7 @@ find_path(SUPERLU_INCLUDE_DIR # look for library, only at positions given by the user find_library(SUPERLU_LIBRARY - NAMES "superlu_4.3" "superlu_4.2" "superlu_4.1" "superlu_4.0" "superlu_3.1" "superlu_3.0" "superlu" + NAMES "superlu_4.3" "superlu_4.2" "superlu_4.1" "superlu_4.0" "superlu" PATHS ${SUPERLU_PREFIX} ${SUPERLU_ROOT} PATH_SUFFIXES "lib" "lib32" "lib64" NO_DEFAULT_PATH @@ -63,7 +63,7 @@ find_library(SUPERLU_LIBRARY # look for library files, including default paths find_library(SUPERLU_LIBRARY - NAMES "superlu_4.3" "superlu_4.2" "superlu_4.1" "superlu_4.0" "superlu_3.1" "superlu_3.0" "superlu" + NAMES "superlu_4.3" "superlu_4.2" "superlu_4.1" "superlu_4.0" "superlu" PATH_SUFFIXES "lib" "lib32" "lib64" ) @@ -87,16 +87,6 @@ endif(SUPERLU_LIBRARY) if(BLAS_LIBRARIES) set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${BLAS_LIBRARIES}) endif(BLAS_LIBRARIES) -# check whether "mem_usage_t.expansions" was found in "slu_ddefs.h" -CHECK_C_SOURCE_COMPILES(" -#include <slu_ddefs.h> -int main(void) -{ - mem_usage_t mem; - return mem.expansions; -}" -HAVE_MEM_USAGE_T_EXPANSIONS) - # check whether version is at least 4.3 CHECK_C_SOURCE_COMPILES(" #include <slu_ddefs.h> @@ -111,7 +101,7 @@ if(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, post 2005" CACHE STRING + set(SUPERLU_WITH_VERSION "SuperLU <= 4.2 and >= 4.0" CACHE STRING "Human readable string containing SuperLU version information.") endif(SUPERLU_MIN_VERSION_4_3) diff --git a/config.h.cmake b/config.h.cmake index f4a3007220fe723821ef9f858f6dc3fb4794cd1b..e1542aff40cb4505edbbf5cc2627f4e015468971 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -34,8 +34,8 @@ /* Define to ENABLE_ARPACKPP if the ARPACK++ library is available */ #cmakedefine HAVE_ARPACKPP ENABLE_ARPACKPP -/* Define to 1 if 'expansions' is a member of 'mem_usage_t'. */ -#cmakedefine HAVE_MEM_USAGE_T_EXPANSIONS @HAVE_MEM_USAGE_T_EXPANSIONS@ +/* 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@ diff --git a/dune/istl/superlu.hh b/dune/istl/superlu.hh index 5f36677949808ed358c7ec313c8ff5a5f0da46cc..a018f8b060f0b0286685ed209267f66f5de34c1e 100644 --- a/dune/istl/superlu.hh +++ b/dune/istl/superlu.hh @@ -496,12 +496,8 @@ namespace Dune QuerySpaceChooser<T>::querySpace(&L, &U, &memusage); dinfo<<"L\\U MB "<<memusage.for_lu/1e6<<" \ttotal MB needed "<<memusage.total_needed/1e6 <<" \texpansions "; - -#ifdef HAVE_MEM_USAGE_T_EXPANSIONS - std::cout<<memusage.expansions<<std::endl; -#else std::cout<<stat.expansions<<std::endl; -#endif + } else if ( info > 0 && lwork == -1 ) { dinfo<<"** Estimated memory: "<< info - n<<std::endl; }