Next: Motivating Examples
Up: Groups, Contexts and Communicators
Previous: Group Management
Contents
int Comm.Size()
returns: |
number of processors in the group of this communicator |
Size of group of this communicator.
Java binding of the MPI operation MPI_COMM_SIZE.
int Comm.Rank()
returns: |
rank of the calling process in the group of this communicator |
Rank of this process in group of this communicator.
Java binding of the MPI operation MPI_COMM_RANK.
static int Comm.Compare(Comm comm1, Comm comm2)
comm1 |
first communicator |
comm2 |
second communicator |
|
|
returns: |
result |
Compare two communicators.
Java binding of the MPI operation MPI_COMM_COMPARE.
MPI.IDENT results if the comm1 and comm2
are references to the same object (ie, if comm1 == comm2).
MPI.CONGRUENT results if
the underlying groups are identical but the communicators
differ by context.
MPI.SIMILAR results if
the underlying groups are similar but the communicators
differ by context.
MPI.UNEQUAL results otherwise.
Object Comm.clone()
returns: |
copy of this communicator |
Duplicate this communicator.
Java binding of the MPI operation MPI_COMM_DUP.
The new communicator is ``congruent'' to the old one,
but has a different context.
- Rationale. The decision to use the standard Java clone method means the
static result type must be Object. The dynamic type will be that
of the Comm subclass of the parent. MPI-defined and user-defined
subclasses of Comm will generally override clone to ensure
all relevant attributes are copied.(End of rationale.)
Intracomm Intracomm.Create(Group group)
group |
group which is a subset of the group of this communicator |
|
|
returns: |
new communicator |
Create a new communicator.
Java binding of the MPI operation MPI_COMM_CREATE.
Intracomm Intracomm.Split(int color, int key)
color |
control of subset assignment |
key |
control of rank assignment |
|
|
returns: |
new communicator |
Partition the group associated with this communicator and create
a new communicator within each subgroup.
Java binding of the MPI operation MPI_COMM_SPLIT.
void Comm.Free()
Destroy this communicator.
Java binding of the MPI operation MPI_COMM_FREE.
- Rationale. An explicitly called Free method is required rather than an
implicitly called finalize method, because MPI_COMM_FREE
is a collective operation. We cannot assume that
the Java garbage collector will call a finalize method
synchronously on all processors.(End of rationale.)
boolean Comm.Is_null()
returns: |
true if the communicator object has been freed, false otherwise |
Replaces comparision with MPI_COMM_NULL.
Next: Motivating Examples
Up: Groups, Contexts and Communicators
Previous: Group Management
Contents
Bryan Carpenter
2002-07-12