mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: collated: switch off threading by default. See also #659.
This commit is contained in:
@ -81,13 +81,13 @@ OptimisationSwitches
|
||||
|
||||
//- collated: thread buffer size for queued file writes.
|
||||
// If set to 0 or not sufficient for the file size threading is not used.
|
||||
// Default: 2e9
|
||||
maxThreadFileBufferSize 2e9;
|
||||
// Default: 1e9
|
||||
maxThreadFileBufferSize 0;
|
||||
|
||||
//- masterUncollated: non-blocking buffer size.
|
||||
// If the file exceeds this buffer size scheduled transfer is used.
|
||||
// Default: 2e9
|
||||
maxMasterFileBufferSize 2e9;
|
||||
// Default: 1e9
|
||||
maxMasterFileBufferSize 1e9;
|
||||
|
||||
commsType nonBlocking; //scheduled; //blocking;
|
||||
floatTransfer 0;
|
||||
|
||||
@ -30,6 +30,7 @@ License
|
||||
#include "SubList.H"
|
||||
#include "allReduce.H"
|
||||
#include "int.H"
|
||||
#include "collatedFileOperation.H"
|
||||
|
||||
#include <mpi.h>
|
||||
|
||||
@ -128,12 +129,17 @@ bool Foam::UPstream::init(int& argc, char**& argv)
|
||||
|
||||
|
||||
//MPI_Init(&argc, &argv);
|
||||
int wanted_thread_support = MPI_THREAD_SINGLE;
|
||||
if (fileOperations::collatedFileOperation::maxThreadFileBufferSize > 0)
|
||||
{
|
||||
wanted_thread_support = MPI_THREAD_MULTIPLE;
|
||||
}
|
||||
int provided_thread_support;
|
||||
MPI_Init_thread
|
||||
(
|
||||
&argc,
|
||||
&argv,
|
||||
MPI_THREAD_MULTIPLE,
|
||||
wanted_thread_support,
|
||||
&provided_thread_support
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user