Skip to content
Snippets Groups Projects
Commit 3bc184d7 authored by joergbuchwald's avatar joergbuchwald Committed by Dmitri Naumov
Browse files

[AL] Add info output on number of threads used by Eigen.

parent b97c0b44
No related branches found
No related tags found
No related merge requests found
...@@ -68,7 +68,22 @@ namespace ApplicationsLib ...@@ -68,7 +68,22 @@ namespace ApplicationsLib
{ {
struct LinearSolverLibrarySetup final struct LinearSolverLibrarySetup final
{ {
LinearSolverLibrarySetup(int /*argc*/, char* /*argv*/[]) {} LinearSolverLibrarySetup(int /*argc*/, char* /*argv*/[])
{
#ifdef _OPENMP
const char* omp_num_threads_env = std::getenv("OMP_NUM_THREADS");
if (omp_num_threads_env)
{
INFO("OMP_NUM_THREADS is set to: {:s}", omp_num_threads_env);
}
else
{
WARN("OMP_NUM_THREADS is not set, falling back to: {:d}",
omp_get_max_threads());
}
#endif
INFO("Eigen use {:d} threads", Eigen::nbThreads());
}
~LinearSolverLibrarySetup() ~LinearSolverLibrarySetup()
{ {
NumLib::cleanupGlobalMatrixProviders(); NumLib::cleanupGlobalMatrixProviders();
......
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