Skip to content
Snippets Groups Projects
Commit 4408ec20 authored by mattijs's avatar mattijs
Browse files

ENH: collated: switch off threading by default. See also #659.

parent fd4782f7
Branches
Tags
No related merge requests found
...@@ -81,13 +81,13 @@ OptimisationSwitches ...@@ -81,13 +81,13 @@ OptimisationSwitches
//- collated: thread buffer size for queued file writes. //- collated: thread buffer size for queued file writes.
// If set to 0 or not sufficient for the file size threading is not used. // If set to 0 or not sufficient for the file size threading is not used.
// Default: 2e9 // Default: 1e9
maxThreadFileBufferSize 2e9; maxThreadFileBufferSize 0;
//- masterUncollated: non-blocking buffer size. //- masterUncollated: non-blocking buffer size.
// If the file exceeds this buffer size scheduled transfer is used. // If the file exceeds this buffer size scheduled transfer is used.
// Default: 2e9 // Default: 1e9
maxMasterFileBufferSize 2e9; maxMasterFileBufferSize 1e9;
commsType nonBlocking; //scheduled; //blocking; commsType nonBlocking; //scheduled; //blocking;
floatTransfer 0; floatTransfer 0;
......
...@@ -30,6 +30,7 @@ License ...@@ -30,6 +30,7 @@ License
#include "SubList.H" #include "SubList.H"
#include "allReduce.H" #include "allReduce.H"
#include "int.H" #include "int.H"
#include "collatedFileOperation.H"
#include <mpi.h> #include <mpi.h>
...@@ -128,12 +129,17 @@ bool Foam::UPstream::init(int& argc, char**& argv) ...@@ -128,12 +129,17 @@ bool Foam::UPstream::init(int& argc, char**& argv)
//MPI_Init(&argc, &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; int provided_thread_support;
MPI_Init_thread MPI_Init_thread
( (
&argc, &argc,
&argv, &argv,
MPI_THREAD_MULTIPLE, wanted_thread_support,
&provided_thread_support &provided_thread_support
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment