diff --git a/MathLib/CMakeLists.txt b/MathLib/CMakeLists.txt index 3189ea241c907960a3c89274c47bf4356dc1d77a..45f7919c38e33c03e34c918bf90b319dc0a39f60 100644 --- a/MathLib/CMakeLists.txt +++ b/MathLib/CMakeLists.txt @@ -47,7 +47,7 @@ endif() target_compile_definitions( MathLib PUBLIC - $<$<BOOL:${USE_LIS}>:USE_LIS> + $<$<BOOL:${OGS_USE_LIS}>:USE_LIS> $<$<BOOL:${OGS_USE_CVODE}>:CVODE_FOUND> $<$<BOOL:${EIGEN_NO_DEBUG}>:EIGEN_NO_DEBUG> $<$<BOOL:${EIGEN_DONT_VECTORIZE}>:EIGEN_DONT_VECTORIZE> diff --git a/MathLib/LinAlg/Lis/LisLinearSolver.cpp b/MathLib/LinAlg/Lis/LisLinearSolver.cpp index 773cc298212c340c5a20fd5351b58100207e7120..ff9e50fe1535d81eda11c3554d2091987ef46d5a 100644 --- a/MathLib/LinAlg/Lis/LisLinearSolver.cpp +++ b/MathLib/LinAlg/Lis/LisLinearSolver.cpp @@ -46,21 +46,21 @@ bool LisLinearSolver::solve(LisMatrix& A, LisVector& b, LisVector& x) lis_solver_set_option(const_cast<char*>(lis_option_.option_string_.c_str()), solver); #ifdef _OPENMP - INFO("-> number of threads: {:i}", (int)omp_get_max_threads()); + INFO("-> number of threads: {:d}", (int)omp_get_max_threads()); #endif { int precon; ierr = lis_solver_get_precon(solver, &precon); if (!checkLisError(ierr)) return false; - INFO("-> precon: {:i}", precon); + INFO("-> precon: {:d}", precon); } { int slv; ierr = lis_solver_get_solver(solver, &slv); if (!checkLisError(ierr)) return false; - INFO("-> solver: {:i}", slv); + INFO("-> solver: {:d}", slv); } // solve diff --git a/MathLib/LinAlg/Lis/LisVector.cpp b/MathLib/LinAlg/Lis/LisVector.cpp index 08e5a94a3bed9f784d30ec2d202b31e34b52d9c7..a5cc596dde1600de283ffa57769cc44b5111d980 100644 --- a/MathLib/LinAlg/Lis/LisVector.cpp +++ b/MathLib/LinAlg/Lis/LisVector.cpp @@ -14,8 +14,6 @@ #include "LisVector.h" -#include <cassert> - #include "LisCheck.h" namespace MathLib @@ -57,7 +55,7 @@ std::size_t LisVector::size() const void LisVector::write(const std::string& filename) const { - lis_output_vector(vec_, LIS_FMT_PLAIN, const_cast<char*>(filename)); + lis_output_vector(vec_, LIS_FMT_PLAIN, const_cast<char*>(filename.c_str())); } } // namespace MathLib diff --git a/MathLib/LinAlg/Lis/LisVector.h b/MathLib/LinAlg/Lis/LisVector.h index 0f955c3d4ad429fcc4382cfa71c624275d389e1e..869ab269ec3c4e114bdb6d911bba4016c95838d5 100644 --- a/MathLib/LinAlg/Lis/LisVector.h +++ b/MathLib/LinAlg/Lis/LisVector.h @@ -14,11 +14,12 @@ #pragma once +#include <lis.h> + +#include <cassert> #include <string> #include <vector> -#include <lis.h> - namespace MathLib { /** diff --git a/scripts/cmake/ConanSetup.cmake b/scripts/cmake/ConanSetup.cmake index 506560d4e494bbaae6c0e9825e597cb50d363a99..cc5272d0d263f01427ab7f239c1c6595b7cfc656 100644 --- a/scripts/cmake/ConanSetup.cmake +++ b/scripts/cmake/ConanSetup.cmake @@ -46,7 +46,8 @@ if(OGS_USE_PETSC) endif() if(OGS_USE_LIS) - set(CONAN_REQUIRES ${CONAN_REQUIRES} lis/1.7.9@bilke/stable) + list(APPEND CONAN_OPTIONS lis:with_omp=True) + set(CONAN_REQUIRES ${CONAN_REQUIRES} lis/1.7.37@bilke/stable) endif() if(OGS_USE_MFRONT)