CONFIG: add named topoControls
This commit is contained in:
parent
a01f3ed8b7
commit
db871856c0
@ -147,6 +147,15 @@ OptimisationSwitches
|
||||
// >= 3 : when there are more than N nodes
|
||||
nodeComms.min 0;
|
||||
|
||||
// Selection of topology-aware routines (bitmask)
|
||||
// 0: disabled [default]
|
||||
// 1: broadcast [MPI]
|
||||
// 4: gather/all-gather [MPI]
|
||||
// 16: combine (reduction) [manual algorithm]
|
||||
// 32: mapGather (reduction) [manual algorithm]
|
||||
// 64: gatherList/scatterList [manual algorithm]
|
||||
topoControl 0;
|
||||
|
||||
// Transfer double as float for processor boundaries. Mostly defunct.
|
||||
floatTransfer 0;
|
||||
|
||||
|
@ -106,7 +106,35 @@ void Foam::UPstream::printNodeCommsControl(Ostream& os)
|
||||
|
||||
void Foam::UPstream::printTopoControl(Ostream& os)
|
||||
{
|
||||
os << "none";
|
||||
unsigned count = 0;
|
||||
|
||||
if (UPstream::topologyControl_ > 0)
|
||||
{
|
||||
#undef PrintControl
|
||||
#define PrintControl(Ctrl, Name) \
|
||||
if (UPstream::usingTopoControl(topoControls::Ctrl)) \
|
||||
{ \
|
||||
os << (count++ ? ' ' : '(') << Name; \
|
||||
}
|
||||
|
||||
PrintControl(broadcast, "broadcast");
|
||||
PrintControl(reduce, "reduce");
|
||||
PrintControl(gather, "gather");
|
||||
PrintControl(combine, "combine");
|
||||
PrintControl(mapGather, "mapGather");
|
||||
PrintControl(gatherList, "gatherList");
|
||||
|
||||
#undef PrintControl
|
||||
}
|
||||
|
||||
if (count)
|
||||
{
|
||||
os << ')'; // End the list
|
||||
}
|
||||
else
|
||||
{
|
||||
os << "none";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user