Group Class Reference
[PEARL.base]

Stores information related to a group of processes. More...

#include <Group.h>

Inheritance diagram for Group:

IdObject MpiComm

List of all members.

Public Types

typedef std::vector< Process * > process_group
 Container type for process groups.

Public Member Functions

Constructors & destructor
 Group (ident_t id, const process_group &processes)
Get group information
uint32_t num_processes () const
Processget_process (uint32_t rank) const
uint32_t get_rank (Process *process) const


Detailed Description

Instances of the Group class provide information about a group of processes with an ordering defined by the numerical identifier (i.e., the rank) of each process. Such groups are used, e.g., to define MPI communicators (see MpiComm).

The numerical identifiers of the individual groups are globally defined and continuously enumerated, i.e., the ID is element of [0,#process_groups-1].


Constructor & Destructor Documentation

Group ( ident_t  id,
const process_group processes 
)

Creates a new instance and initializes the data with the given values id and processes, respectively. The given processes have to be sorted by their numerical identifiers (i.e., their rank numbers) in ascending order!

Parameters:
id Group identifier
processes List of processes defining the group


Member Function Documentation

Process * get_process ( uint32_t  rank  )  const

Returns the Process with the given rank with respect to this group.

Parameters:
rank Rank number of the requested process
Returns:
Corresponding Process object
Exceptions:
RuntimeError if an invalid rank is given ("Rank out of range")

uint32_t get_rank ( Process process  )  const

Returns the rank number of the given process with respect to this group.

Parameters:
process Process object
Returns:
Rank number
Exceptions:
RuntimeError if the process is not part of this group ("Unknown process")

uint32_t num_processes (  )  const

Returns the number of processes belonging to this group.

Returns:
Number of processes


SCALASCA    Copyright © 1998–2009 Forschungszentrum Jülich, Jülich Supercomputing Centre