Blame www/www3/MPI_Grequest_start.html

Packit 0848f5
Packit 0848f5
<HTML>
Packit 0848f5
<HEAD>
Packit 0848f5
<META NAME="GENERATOR" CONTENT="DOCTEXT">
Packit 0848f5
<TITLE>MPI_Grequest_start</TITLE>
Packit 0848f5
</HEAD>
Packit 0848f5
<BODY BGCOLOR="FFFFFF">
Packit 0848f5

MPI_Grequest_start

Packit 0848f5
Create and return a user-defined request 
Packit 0848f5

Synopsis

Packit 0848f5
Packit 0848f5
int MPI_Grequest_start( MPI_Grequest_query_function *query_fn, 
Packit 0848f5
                      MPI_Grequest_free_function *free_fn, 
Packit 0848f5
                      MPI_Grequest_cancel_function *cancel_fn, 
Packit 0848f5
                      void *extra_state, MPI_Request *request )
Packit 0848f5
Packit 0848f5

Input Parameters

Packit 0848f5
Packit 0848f5
query_fn
callback function invoked when request status is queried (function)
Packit 0848f5
Packit 0848f5
free_fn
callback function invoked when request is freed (function)
Packit 0848f5
Packit 0848f5
cancel_fn
callback function invoked when request is cancelled (function)
Packit 0848f5
Packit 0848f5
extra_state
Extra state passed to the above functions.
Packit 0848f5
Packit 0848f5

Packit 0848f5

Output Parameters

Packit 0848f5
request
Generalized request (handle)
Packit 0848f5
Packit 0848f5

Packit 0848f5

Notes on the callback functions

Packit 0848f5
The return values from the callback functions must be a valid MPI error code
Packit 0848f5
or class.  This value may either be the return value from any MPI routine
Packit 0848f5
(with one exception noted below) or any of the MPI error classes.
Packit 0848f5
For portable programs, <tt>MPI_ERR_OTHER</tt> may be used; to provide more
Packit 0848f5
specific information, create a new MPI error class or code with
Packit 0848f5
<tt>MPI_Add_error_class</tt> or <tt>MPI_Add_error_code</tt> and return that value.
Packit 0848f5

Packit 0848f5
The MPI standard is not clear on the return values from the callback routines.
Packit 0848f5
However, there are notes in the standard that imply that these are MPI error
Packit 0848f5
codes.  For example, pages 169 line 46 through page 170, line 1 require that
Packit 0848f5
the <tt>free_fn</tt> return an MPI error code that may be used in the MPI completion
Packit 0848f5
functions when they return <tt>MPI_ERR_IN_STATUS</tt>.
Packit 0848f5

Packit 0848f5
The one special case is the error value returned by <tt>MPI_Comm_dup</tt> when
Packit 0848f5
the attribute callback routine returns a failure.  The MPI standard is not
Packit 0848f5
clear on what values may be used to indicate an error return.  Further,
Packit 0848f5
the Intel MPI test suite made use of non-zero values to indicate failure,
Packit 0848f5
and expected these values to be returned by the <tt>MPI_Comm_dup</tt> when the
Packit 0848f5
attribute routines encountered an error.  Such error values may not be valid
Packit 0848f5
MPI error codes or classes.  Because of this, it is the user's responsibility
Packit 0848f5
to either use valid MPI error codes in return from the attribute callbacks,
Packit 0848f5
if those error codes are to be returned by a generalized request callback,
Packit 0848f5
or to detect and convert those error codes to valid MPI error codes (recall
Packit 0848f5
that MPI error classes are valid error codes).
Packit 0848f5

Packit 0848f5

Thread and Interrupt Safety

Packit 0848f5

Packit 0848f5
This routine is thread-safe.  This means that this routine may be
Packit 0848f5
safely used by multiple threads without the need for any user-provided
Packit 0848f5
thread locks.  However, the routine is not interrupt safe.  Typically,
Packit 0848f5
this is due to the use of memory allocation routines such as <tt>malloc
Packit 0848f5
</tt>or other non-MPICH runtime routines that are themselves not interrupt-safe.
Packit 0848f5

Packit 0848f5

Notes for Fortran

Packit 0848f5
All MPI routines in Fortran (except for <tt>MPI_WTIME</tt> and <tt>MPI_WTICK</tt>) have
Packit 0848f5
an additional argument <tt>ierr</tt> at the end of the argument list.  <tt>ierr
Packit 0848f5
</tt>is an integer and has the same meaning as the return value of the routine
Packit 0848f5
in C.  In Fortran, MPI routines are subroutines, and are invoked with the
Packit 0848f5
<tt>call</tt> statement.
Packit 0848f5

Packit 0848f5
All MPI objects (e.g., <tt>MPI_Datatype</tt>, <tt>MPI_Comm</tt>) are of type <tt>INTEGER
Packit 0848f5
</tt>in Fortran.
Packit 0848f5

Packit 0848f5

Errors

Packit 0848f5

Packit 0848f5
All MPI routines (except <tt>MPI_Wtime</tt> and <tt>MPI_Wtick</tt>) return an error value;
Packit 0848f5
C routines as the value of the function and Fortran routines in the last
Packit 0848f5
argument.  Before the value is returned, the current MPI error handler is
Packit 0848f5
called.  By default, this error handler aborts the MPI job.  The error handler
Packit 0848f5
may be changed with <tt>MPI_Comm_set_errhandler</tt> (for communicators),
Packit 0848f5
<tt>MPI_File_set_errhandler</tt> (for files), and <tt>MPI_Win_set_errhandler</tt> (for
Packit 0848f5
RMA windows).  The MPI-1 routine <tt>MPI_Errhandler_set</tt> may be used but
Packit 0848f5
its use is deprecated.  The predefined error handler
Packit 0848f5
<tt>MPI_ERRORS_RETURN</tt> may be used to cause error values to be returned.
Packit 0848f5
Note that MPI does not guarentee that an MPI program can continue past
Packit 0848f5
an error; however, MPI implementations will attempt to continue whenever
Packit 0848f5
possible.
Packit 0848f5

Packit 0848f5
MPI_SUCCESS
No error; MPI routine completed successfully.
Packit 0848f5
Packit 0848f5
MPI_ERR_ARG
Invalid argument. Some argument is invalid and is not
Packit 0848f5
identified by a specific error class (e.g., <tt>MPI_ERR_RANK</tt>).
Packit 0848f5
Packit 0848f5
</BODY></HTML>