mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-09-05 04:40:19 -05:00
generalize the tasklet mechanism to an arbitrary number of worker threads
this has been quite a bit more complicated than I initially thought.
This commit is contained in:
+4
-2
@@ -115,8 +115,10 @@ public:
|
|||||||
// create output thread if enabled and rank is I/O rank
|
// create output thread if enabled and rank is I/O rank
|
||||||
// async output is enabled by default if pthread are enabled
|
// async output is enabled by default if pthread are enabled
|
||||||
bool enableAsyncOutput = EWOMS_GET_PARAM(TypeTag, bool, EnableAsyncEclOutput);
|
bool enableAsyncOutput = EWOMS_GET_PARAM(TypeTag, bool, EnableAsyncEclOutput);
|
||||||
bool createOutputThread = enableAsyncOutput && collectToIORank_.isIORank();
|
int numWorkerThreads = 0;
|
||||||
taskletRunner_.reset(new TaskletRunner(createOutputThread));
|
if (enableAsyncOutput && collectToIORank_.isIORank())
|
||||||
|
numWorkerThreads = 1;
|
||||||
|
taskletRunner_.reset(new TaskletRunner(numWorkerThreads));
|
||||||
}
|
}
|
||||||
|
|
||||||
~EclWriter()
|
~EclWriter()
|
||||||
|
|||||||
Reference in New Issue
Block a user