mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-11-02 20:30:55 -06:00
Merge pull request #6801 from akva2/fix_thread_printout_separate_simulator
fixed: move getNumThreads into TU
This commit is contained in:
2 files changed
+14
-8
No files matched your search
@@ -44,6 +44,10 @@
|
||||
#include <amgx_c.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_OPENMP
|
||||
#include <omp.h>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
// NOTE: There is no C++ header replacement for these C posix headers (as of C++17)
|
||||
#include <fcntl.h> // for open()
|
||||
@@ -381,4 +385,13 @@ void Main::setupDamaris(const std::string& outputDir )
|
||||
}
|
||||
#endif
|
||||
|
||||
int Main::getNumThreads()
|
||||
{
|
||||
#ifdef _OPENMP
|
||||
return omp_get_max_threads();
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace Opm
|
||||
@@ -520,14 +520,7 @@ private:
|
||||
std::string_view moduleVersion,
|
||||
std::string_view compileTimestamp);
|
||||
|
||||
static int getNumThreads()
|
||||
{
|
||||
#ifdef _OPENMP
|
||||
return omp_get_max_threads();
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
static int getNumThreads();
|
||||
|
||||
#if HAVE_DAMARIS
|
||||
void setupDamaris(const std::string& outputDir);
|
||||
|
||||
Reference in new issue
Block a user