Skip to content

Commit

Permalink
Some tweaks
Browse files Browse the repository at this point in the history
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 f2f0c34
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Source/Solver/solver.cpp
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions Source/Solver/solver_mtiluc2.cpp
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
11 changes: 11 additions & 0 deletions cmake_find/FindSuperLU.cmake
Expand Up @@ -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
Expand Down

0 comments on commit f2f0c34

Please sign in to comment.