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

Merge branch 'feature/issue4-remove-support-superlu-older-4.0' into 'master'

Feature/issue4 remove support superlu older 4.0

This fixes #4 

See merge request !14
parents 1ffb8ead 122ccd41
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,7 @@
#
# look for BLAS
find_package(BLAS QUIET REQUIRED)
find_package(BLAS QUIET)
if(NOT BLAS_FOUND)
message(WARNING "SuperLU requires BLAS which was not found, skipping the test.")
return()
......@@ -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)
......
......@@ -34,11 +34,8 @@
/* Define to ENABLE_ARPACKPP if the ARPACK++ library is available */
#cmakedefine HAVE_ARPACKPP ENABLE_ARPACKPP
/* define to 1 because older versions of SuperLU are no longer supported*/
#define SUPERLU_POST_2005_VERSION 1
/* 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@
......
......@@ -13,7 +13,6 @@
#ifndef SUPERLU_NTYPE
#define SUPERLU_NTYPE 1
#endif
#ifdef SUPERLU_POST_2005_VERSION
#if SUPERLU_NTYPE==0
#include "slu_sdefs.h"
......@@ -31,26 +30,6 @@
#include "slu_zdefs.h"
#endif
#else
#if SUPERLU_NTYPE==0
#include "ssp_defs.h"
#endif
#if SUPERLU_NTYPE==1
#include "dsp_defs.h"
#warning Support for SuperLU older than SuperLU 3.0 from August 2005 is deprecated.
#endif
#if SUPERLU_NTYPE==2
#include "csp_defs.h"
#endif
#if SUPERLU_NTYPE>=3
#include "zsp_defs.h"
#endif
#endif
#include "solvers.hh"
#include "supermatrix.hh"
#include <algorithm>
......@@ -517,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;
}
......
......@@ -4,7 +4,6 @@
#define DUNE_ISTL_SUPERMATRIX_HH
#if HAVE_SUPERLU
#ifdef SUPERLU_POST_2005_VERSION
#ifndef SUPERLU_NTYPE
#define SUPERLU_NTYPE 1
......@@ -26,25 +25,6 @@
#include "slu_zdefs.h"
#endif
#else
#if SUPERLU_NTYPE==0
#include "ssp_defs.h"
#endif
#if SUPERLU_NTYPE==1
#include "dsp_defs.h"
#endif
#if SUPERLU_NTYPE==2
#include "csp_defs.h"
#endif
#if SUPERLU_NTYPE>=3
#include "zsp_defs.h"
#endif
#endif
#include "bcrsmatrix.hh"
#include "bvector.hh"
#include <dune/common/fmatrix.hh>
......@@ -350,5 +330,5 @@ namespace Dune
SuperLUMatrix* slumat;
};
}
#endif
#endif // HAVE_SUPERLU
#endif
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