User Tools

Site Tools


steereo:classes:steereointracommunicator

SteereoIntraCommunicator

Description

This is the base class and interface definition for all intracommunicators like the SteereoMPIIntraCommunicator. The Intracommunicators are needed for parallel simulations as they manage partitions of processes, which will be able to communicate with client processes on its own.

Functions

Virtual functions that have be overloaded

  •  void generateIntraCommunicator () = 0 

    generate the partition with the given ranks.

  •  void gatherOnRoot (SteereoStream* myStream, SteereoStream** resultStream) = 0 

    gathers a SteereoStream at rank 0

  •  void distributeRequests (std::stack<request>* reqs, SteereoCommandQueue* queue) = 0 

    distributes the requests received from rank 0 to the other ranks

  •  int getRank() = 0 

    get the rank inside the partition

  •  int getSize() = 0 

    get the size of the partition

Other functions

  •  void generateEqually (int myRank, int numberOfPartitions, int globalSize) 

    generates numberOfPartitions partitions of size globalSize/numberOfPartitions. Internal values for the calling process are also set in here.

  •  void addRank (int rk) 
     void addRankRange (int startRk, int endRk) 

    add a rank or range of ranks (using global numbering) to the partition of the current process. Be careful: every process in a partition should have added the same ranks before generating the intra communicator. Therefore as user you should use functions like generateEqually.

  •  int getRoot () 

    get the root process number in the partition of this process. Usually 0.

  •  void setRoot (int rk) 

    set the root process of the partition of this process.

  •  bool amIRoot () 

    ask if the current process is the root of his partition

  •  int getPartition () 

    get the partition number of this partition

  •  int getNumberOfPartitions () 

    get the whole number of partitions at the moment

steereo/classes/steereointracommunicator.txt · Last modified: 2010/05/06 12:29 by hpcdjenz