commSchedule Class Reference

Determines the order in which a set of processors should communicate with one another. More...

Public Member Functions

 ClassName ("commSchedule")
 
 commSchedule (const label nProcs, const List< labelPair > &comms)
 Construct from wanted communication. Wanted communication is between. More...
 
const labelListschedule () const
 Order in which comms is scheduled. More...
 
const labelListListprocSchedule () const
 Per processor the order in which communication has been scheduled. More...
 

Detailed Description

Determines the order in which a set of processors should communicate with one another.

The communication order should

  • have maximum overlap
  • allow blocking communication without deadlock

Does a very simple scheduling which assumes same time for all operations.

After construction:

Does not care whether 'talking' is first send, second receive or maybe full swap. This is all responsibility of caller. See ProcessorTopology class for use in scheduling processor boundary swaps.

Source files

Definition at line 65 of file commSchedule.H.

Constructor & Destructor Documentation

◆ commSchedule()

commSchedule ( const label  nProcs,
const List< labelPair > &  comms 
)

Construct from wanted communication. Wanted communication is between.

two processors. Can be a one-way communication or two-way communication, that is up to the caller. This class just determines an order for it such that any processor is only talking to one other at a time. After construction:

  • schedule is the order in which comms is done.
  • procSchedule[proci] is for proci the order in which comms is done.

Definition at line 65 of file commSchedule.C.

References Foam::abort(), List< T >::append(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, SortableList< T >::indices(), Foam::labelMin, UPstream::master(), Foam::Pout, List< T >::setSize(), Foam::setw(), List< T >::size(), and OStringStream::str().

Here is the call graph for this function:

Member Function Documentation

◆ ClassName()

ClassName ( "commSchedule"  )

◆ schedule()

const labelList& schedule ( ) const
inline

Order in which comms is scheduled.

Definition at line 101 of file commSchedule.H.

◆ procSchedule()

const labelListList& procSchedule ( ) const
inline

Per processor the order in which communication has been scheduled.

Definition at line 107 of file commSchedule.H.


The documentation for this class was generated from the following files: