From 626e8dd243b38ccb835bf4734b5c0d1855fa55d5 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Mon, 24 Jun 2019 14:23:55 +0200 Subject: [PATCH] ebos: set the default for the number of threads to 2 if openMP is available this value is was chosen to exactly replicate `flow`'s behavior. IMO, it would be less surprising to set the default to `1`, i.e., the user needs to specify `--threads-per-process=$N` explicitly if multithreaded linearization ought to be used. --- ebos/ebos.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ebos/ebos.hh b/ebos/ebos.hh index 573a612a2..12fdc0025 100644 --- a/ebos/ebos.hh +++ b/ebos/ebos.hh @@ -99,6 +99,12 @@ SET_INT_PROP(EbosTypeTag, EclNewtonStrictIterations, 100); // relatively often) SET_INT_PROP(EbosTypeTag, NewtonMaxIterations, 8); +// if openMP is available, set the default the number of threads per process for the main +// simulation to 2 (instead of grabbing everything that is available). +#if _OPENMP +SET_INT_PROP(EbosTypeTag, ThreadsPerProcess, 2); +#endif + END_PROPERTIES namespace Ewoms {