Commit 32f04f9c authored by Dmitry Yu. Naumov's avatar Dmitry Yu. Naumov
Browse files

Merge branch 'LisFixes' into 'master'

LIS fixes

See merge request ogs/ogs!3660
parents f1dc72bc bb5ecdcc
......@@ -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>
......
......@@ -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
......
......@@ -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
......@@ -14,11 +14,12 @@
#pragma once
#include <lis.h>
#include <cassert>
#include <string>
#include <vector>
#include <lis.h>
namespace MathLib
{
/**
......
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment