Permalink
Browse files

Some tweaks

Cmake script for superlu will search for blas.

Remove assertions for singular matrices in INNER_MPTILUC since they
could be handled.
  • Loading branch information...
kirill-terekhov committed Mar 25, 2016
1 parent 4c5a80d commit f2f0c34ce0619e114b6c94a0341be4f2b59e8c1e
Showing with 16 additions and 5 deletions.
  1. +2 −2 Source/Solver/solver.cpp
  2. +3 −3 Source/Solver/solver_mtiluc2.cpp
  3. +11 −0 cmake_find/FindSuperLU.cmake
@@ -46,8 +46,8 @@
#endif
//#define USE_OMP
#define KSOLVER BCGSL_solver
//#define KSOLVER BCGS_solver
//#define KSOLVER BCGSL_solver
#define KSOLVER BCGS_solver
//#define ACCELERATED_CONDEST
//#define PRINT_CONDEST
@@ -601,7 +601,7 @@ class BinaryHeap
A_Entries[j++] = Sparse::Row::make_entry(r->first, r->second);
}
A_Address[k].last = j;
assert(A_Address[k].Size() != 0); //singular matrix
//assert(A_Address[k].Size() != 0); //singular matrix
}
#endif
@@ -1571,7 +1571,7 @@ class BinaryHeap
///////////////////////////////////////////////////////////////////////////////////
// get diagonal value //
///////////////////////////////////////////////////////////////////////////////////
assert(B_Entries[B_Address[cbeg].first].first == cbeg);
//assert(B_Entries[B_Address[cbeg].first].first == cbeg);
if (B_Entries[B_Address[cbeg].first].first == cbeg)
LU_Diag[cbeg] = B_Entries[B_Address[cbeg].first].second;
else
@@ -1987,7 +1987,7 @@ class BinaryHeap
//DropLk = DropUk = 0.0;
//uncompress k-th row
// add diagonal value first, there shouldn't be values on left from diagonal
assert(B_Entries[B_Address[k].first].first == k);
//assert(B_Entries[B_Address[k].first].first == k);
LineIndecesU[cbeg] = k;
if (B_Entries[B_Address[k].first].first == k)
LineValuesU[k] = B_Entries[B_Address[k].first].second;
@@ -17,6 +17,17 @@ find_path(SUPERLU_INCLUDES
)
find_library(SUPERLU_LIBRARIES superlu PATHS $ENV{SUPERLUDIR}/lib ${SUPERLUDIR}/lib ${LIB_INSTALL_DIR})
find_package(BLAS)
if(BLAS_FOUND)
message("BLAS FOUND")
message(${BLAS_LIBRARIES})
if(SUPERLU_LIBRARIES)
set(SUPERLU_LIBRARIES ${SUPERLU_LIBRARIES} ${BLAS_LIBRARIES})
endif(SUPERLU_LIBRARIES)
else()
message("BLAS NOT FOUND")
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SUPERLU DEFAULT_MSG

0 comments on commit f2f0c34

Please sign in to comment.