mpi
Class Request

java.lang.Object
  extended by mpi.Request
Direct Known Subclasses:
Prequest

public class Request
extends java.lang.Object


Method Summary
 void Cancel()
          Mark a pending nonblocking communication for cancellation.
 void Free()
          Set the request object to be void.
 Status Get_status()
          Non-destructive test for the completion of a request.
 boolean Is_null()
          Test if request object is void.
 Status Test()
          Tests for the completion of a request.
static Status[] Testall(Request[] array_of_requests)
          Tests for completion of all of the operations associated with active requests.
static Status Testany(Request[] array_of_requests)
          Tests for completion of either one or none of the operations associated with active requests.
static Status[] Testsome(Request[] array_of_requests)
          Behaves like Waitsome, except that it returns immediately.
 Status Wait()
          Waits for a request to complete.
static Status[] Waitall(Request[] array_of_requests)
          Blocks until all of the operations associated with the active requests in the array have completed.
static Status Waitany(Request[] array_of_requests)
          Blocks until one of the operations associated with the active requests in the array has completed.
static Status[] Waitsome(Request[] array_of_requests)
          Blocks until at least one of the operations associated with the active requests in the array has completed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

Wait

public Status Wait()
            throws MPIException
Waits for a request to complete.

returns: status object

Java binding of the MPI operation MPI_WAIT.

Blocks until the operation identified by the request is complete. After the call returns, the request object becomes inactive.

Throws:
MPIException

Test

public Status Test()
            throws MPIException
Tests for the completion of a request.

returns: status object or null reference

Java binding of the MPI operation MPI_TEST.

Returns a status object if the operation identified by the request is complete, or a null reference otherwise. After the call, if the operation is complete (ie, if the return value is non-null), the request object becomes an inactive request.

Throws:
MPIException

Get_status

public Status Get_status()
                  throws MPIException
Non-destructive test for the completion of a request.

returns: status object or null reference

Java binding of the MPI operation MPI_REQUEST_GET_STATUS.

Unlike Test, the request object does not becomes inactive.

Throws:
MPIException

Is_null

public boolean Is_null()
                throws MPIException
Test if request object is void.

returns: true if the request object is void, false otherwise

Note that Is_null is always false on instances of the subclass Prequest.

Throws:
MPIException

Testany

public static Status Testany(Request[] array_of_requests)
                      throws MPIException
Tests for completion of either one or none of the operations associated with active requests.

array_of_requests array of requests
returns: status object or null reference

Java binding of the MPI operation MPI_TESTANY.

If some request completed, the index in array_of_requests for that request can be obtained from the returned status object through the Status.index field. The corresponding element of array_of_requests becomes inactive. If no request completed, Testany returns a null reference.

Throws:
MPIException

Waitall

public static Status[] Waitall(Request[] array_of_requests)
                        throws MPIException
Blocks until all of the operations associated with the active requests in the array have completed.

array_of_requests array of requests
returns: array of status objects

Java binding of the MPI operation MPI_WAITALL.

The result array will be the same size as array_of_requests. On exit, requests become inactive. If the input value of arrayOfRequests contains any inactive requests, corresponding elements of the result array will contain null status references.

Throws:
MPIException

Waitany

public static Status Waitany(Request[] array_of_requests)
                      throws MPIException
Blocks until one of the operations associated with the active requests in the array has completed.

array_of_requests array of requests
returns: status object

Java binding of the MPI operation MPI_WAITANY.

The index in array_of_requests for the request that completed can be obtained from the returned status object through the Status.index field. The corresponding element of array_of_requests becomes inactive. The array of requests may contain inactive requests. If the list contains no active requests, the method immediately returns a status in which the index field is MPI.UNDEFINED.

Throws:
MPIException

Testall

public static Status[] Testall(Request[] array_of_requests)
                        throws MPIException
Tests for completion of all of the operations associated with active requests.

array_of_requests array of requests
returns: array of status objects

Java binding of the MPI operation MPI_TESTALL.

If all operations have completed, the exit values of the argument array and the result array are as for Waitall. If any operation has not completed, the result value is null and no element of the argument array is modified.

Throws:
MPIException

Waitsome

public static Status[] Waitsome(Request[] array_of_requests)
                         throws MPIException
Blocks until at least one of the operations associated with the active requests in the array has completed.

array_of_requests array of requests
returns: array of status objects

Java binding of the MPI operation MPI_WAITSOME.

The size of the result array will be the number of operations that completed. The index in array_of_requests for each request that completed can be obtained from the index field of the returned status object. The corresponding element in array_of_requests becomes inactive.

If array of requests list contains no active requests, Waitsome immediately returns a null reference.

Throws:
MPIException

Testsome

public static Status[] Testsome(Request[] array_of_requests)
                         throws MPIException
Behaves like Waitsome, except that it returns immediately.

array_of_requests array of requests
returns: array of status objects

Java binding of the MPI operation MPI_TESTSOME.

If no operation has completed, TestSome returns an array of length zero and elements of array_of_requests are unchanged. Otherwise, arguments and return value are as for Waitsome.

Throws:
MPIException

Cancel

public void Cancel()
            throws MPIException
Mark a pending nonblocking communication for cancellation.

Java binding of the MPI operation MPI_CANCEL.

Not implemented in the current release

Throws:
MPIException

Free

public void Free()
Set the request object to be void.

Java binding of the MPI operation MPI_REQUEST_FREE.