Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class mpij.Group

java.lang.Object
  |
  +--mpij.Group

public class Group
extends java.lang.Object
A process set.


Method Summary
static int compare(Group group1, Group group2)
          MPI.IDENT results if the group members and group order is exactly the same in both groups.
static Group difference(Group group1, Group group2)
          Returns a new group consisting of all elements of the first group that are not in the second group, ordered as in the first group.
Group excl(int start, int n, int[] ranks)
          Creates a group of processes newgroup that is obtained by deleting from group those processes with ranks ranks[0]
Group incl(int start, int n, int[] ranks)
          Creates a group newgroup that consists of the n processes in group with ranks rank[0]
static Group intersection(Group group1, Group group2)
          Returns a new group consisting of all elements of the first group that are also in the second group, ordered as in first group.
int rank()
          Returns the calling rank of the calling process in this group or MPI.UNDEFINED if the calling process is not a member.
int size()
          Returns the number of processes in this group.
static void translateRanks(Group group1, int start1, int n, int[] ranks1, Group group2, int start2, int[] ranks2)
          This function is important for determining the relative numbering of the same processes in two different groups.
static Group union(Group group1, Group group2)
          Returns a new group consisting of all elements of the first group1, followed by all elements of group2 not in first.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Method Detail

size

public int size()
Returns the number of processes in this group.

rank

public int rank()
Returns the calling rank of the calling process in this group or MPI.UNDEFINED if the calling process is not a member.

translateRanks

public static void translateRanks(Group group1,
                                  int start1,
                                  int n,
                                  int[] ranks1,
                                  Group group2,
                                  int start2,
                                  int[] ranks2)
                          throws MPIException
This function is important for determining the relative numbering of the same processes in two different groups. For instance, if one knows the ranks of certain processes in the group of MPI.COMM_WORLD, one might want to know their ranks in a subset of that group.
Parameters:
group1 -  
start1 - offset into group1 and group2 at which to start
n - number of ranks in ranks1 and ranks2 arrays to use
ranks1 - array of zero or more valid ranks in group1
start2 - offset into group1 and group2 at which to start
group2 -  
ranks2 - array of zero or more valid ranks in group1

compare

public static int compare(Group group1,
                          Group group2)
MPI.IDENT results if the group members and group order is exactly the same in both groups. This happens for instance if group1 and group2 are the same handle. MPI.SIMILAR results if the group members are the same but the order is different. MPI.UNEQUAL results otherwise.

union

public static Group union(Group group1,
                          Group group2)
Returns a new group consisting of all elements of the first group1, followed by all elements of group2 not in first.

intersection

public static Group intersection(Group group1,
                                 Group group2)
Returns a new group consisting of all elements of the first group that are also in the second group, ordered as in first group.

difference

public static Group difference(Group group1,
                               Group group2)
Returns a new group consisting of all elements of the first group that are not in the second group, ordered as in the first group.

incl

public Group incl(int start,
                  int n,
                  int[] ranks)
               throws MPIException
Creates a group newgroup that consists of the n processes in group with ranks rank[0],...,rank[n-1]; the process with rank i in newgroup is the process with rank ranks[i] in group. Each of the n elements of ranks must be a valid rank in group and all elements must be distinct, or else the program is erroneous. If n~=~0, then newgroup is MPI.GROUP_EMPTY. This function can, for instance, be used to reorder the elements of a group.
See Also:
compare

excl

public Group excl(int start,
                  int n,
                  int[] ranks)
               throws MPIException
Creates a group of processes newgroup that is obtained by deleting from group those processes with ranks ranks[0],...,ranks[n-1]. The ordering of processes in newgroup is identical to the ordering in group. Each of the n elements of ranks must be a valid rank in group and all elements must be distinct; otherwise, the program is erroneous. If n~=~0, then newgroup is identical to group.

Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD