mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: support command-line specification of MPI threads (#2791)
- MPI_THREAD_MULTIPLE is usually undesirable for performance reasons, but in some cases may be necessary if a linked library expects it. Provide a '-mpi-threads' option to explicitly request it. ENH: consolidate some looping logic within argList
This commit is contained in:
@ -43,24 +43,15 @@ using namespace Foam;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noFunctionObjects();
|
||||
argList::addBoolOption("verbose", "Set debug level");
|
||||
argList::addVerboseOption("Set UPstream::debug level");
|
||||
argList::addBoolOption("comm-graph", "Test simple graph communicator");
|
||||
argList::addNote
|
||||
(
|
||||
"Create graph of OpenFOAM mesh connections"
|
||||
);
|
||||
|
||||
// Capture manually. We need values before proper startup
|
||||
int nVerbose = 0;
|
||||
for (int argi = 1; argi < argc; ++argi)
|
||||
{
|
||||
if (strcmp(argv[argi], "-verbose") == 0)
|
||||
{
|
||||
++nVerbose;
|
||||
}
|
||||
}
|
||||
|
||||
UPstream::debug = nVerbose;
|
||||
// Check -verbose before initialisation
|
||||
UPstream::debug = argList::verbose(argc, argv);
|
||||
|
||||
#include "setRootCase.H"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user