mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06: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:
parent
b39b60109d
commit
ddb6ef2acb
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user