public class Group
extends java.lang.Object
MPI_Group
.Constructor and Description |
---|
Group(int type) |
Modifier and Type | Method and Description |
---|---|
static int |
compare(Group group1,
Group group2)
Compare two groups.
|
static Group |
difference(Group group1,
Group group2)
Result contains all elements of the first group that are not in the second group.
|
Group |
excl(int[] ranks)
Create a subset group excluding specified processes.
|
void |
free()
Destructor.
|
int |
getRank()
Rank of this process in group.
|
int |
getSize()
Size of group.
|
Group |
incl(int[] ranks)
Create a subset group including specified processes.
|
static Group |
intersection(Group group1,
Group group2)
Set intersection of two groups.
|
Group |
rangeExcl(int[][] ranges)
Create a subset group excluding processes specified by strided intervals of ranks.
|
Group |
rangeIncl(int[][] ranges)
Create a subset group including processes specified by strided intervals of ranks.
|
static int[] |
translateRanks(Group group1,
int[] ranks1,
Group group2)
Translate ranks within one group to ranks within another.
|
static Group |
union(Group group1,
Group group2)
Set union of two groups.
|
public static int[] translateRanks(Group group1, int[] ranks1, Group group2) throws MPIException
group1
- first group.ranks1
- array of valid ranks in group1
.group2
- second group.group2
Java binding of the MPI operation MPI_GROUP_TRANSLATE_RANKS
.
Result elements are MPI.UNDEFINED
where no correspondence exists.
MPIException
- Points out that an MPI exception has occured.public static int compare(Group group1, Group group2) throws MPIException
group1
- first group.group2
- second group.Java binding of the MPI operation MPI_GROUP_COMPARE
.
MPI.IDENT
results if the group members and group order are exactly the same in both
groups. MPI.SIMILAR
results if the group members are the same but the order is
different. MPI.UNEQUAL
results otherwise.
MPIException
- Points out that an MPI exception has occured.public static Group union(Group group1, Group group2) throws MPIException
group1
- first group.group2
- second group.Java binding of the MPI operation MPI_GROUP_UNION
.
MPIException
- Points out that an MPI exception has occured.public static Group intersection(Group group1, Group group2) throws MPIException
group1
- first group.group2
- second group.Java binding of the MPI operation MPI_GROUP_INTERSECTION
.
MPIException
- Points out that an MPI exception has occured.public static Group difference(Group group1, Group group2) throws MPIException
group1
- first group.group2
- second group.Java binding of the MPI operation MPI_GROUP_DIFFERENCE
.
MPIException
- Points out that an MPI exception has occured.public int getSize() throws MPIException
Java binding of the MPI operation MPI_GROUP_SIZE
.
MPIException
- Points out that an MPI exception has occured.public int getRank() throws MPIException
Java binding of the MPI operation MPI_GROUP_RANK
.
Result value is MPI.UNDEFINED
if this process is not a member of the group.
MPIException
- Points out that an MPI exception has occured.public Group incl(int[] ranks) throws MPIException
ranks
- ranks from this group to appear in new group.Java binding of the MPI operation MPI_GROUP_INCL
.
MPIException
- Points out that an MPI exception has occured.public Group excl(int[] ranks) throws MPIException
ranks
- ranks from thsi groupnot to appear in new group.Java binding of the MPI operation MPI_GROUP_EXCL
.
MPIException
- Points out that an MPI exception has occured.public Group rangeIncl(int[][] ranges) throws MPIException
ranges
- array of integer triplets.Java binding of the MPI operation MPI_GROUP_RANGE_INCL
.
The triplets are of the form (first rank, last rank, stride) indicating ranks in this group
to be included in the new group. The size of the first dimension of ranges
is the
number of triplets. The size of the second dimension is 3.
MPIException
- Points out that an MPI exception has occured.public Group rangeExcl(int[][] ranges) throws MPIException
ranges
- array of integer triplets.Java binding of the MPI operation MPI_GROUP_RANGE_EXCL
.
Triplet array is defined as for Range_incl
, the ranges indicating ranks in this
group to be excluded from the new group.
MPIException
- Points out that an MPI exception has occured.public void free()
Java binding of the MPI operation MPI_GROUP_FREE
.