|
NAMEMPI_Op_create - Create an operation for reduce and scan functions SYNOPSIS
INPUT PARAMETERS
func - function to call (function pointer)
commute - does the function commute (boolean)
OUTPUT PARAMETER
op - new operation (handle)
DESCRIPTIONThe MPI_Op_create() function is used to create a MPI_Op handle op that can be used for reduce and scan functions from a user defined function, func . If the function commutes then commute should be set to be true. This allows extra optimization in the functions using the operator, avoiding spurious copies. The form of MPI_User_function is
inbuf - buffer 1 (array)
outbuf - buffer 2 (array)
len - buffer length in units of datatype (integer)
datatype - type of elements in buffer (handle)
USER FUNCTIONS
The function should perform an operation on inbuf and outbuf , storing the result of that operation in outbuf . Even though len and datatype are pointers, the user function should not alter the underlying values. All user functions are assumed to be associative, which allows computation of the results in any order. This version of MPI will compute the results of a reduce or scan operation in a stable manner, not reordering operations based on process physical location. An op created by this function should eventually be freed by MPI_Op_free(). PMPI_Op_create() is the profiling version of this function. ERRORS
All MPI routines except for MPI_Wtime and MPI_Wtick return an error value. The the current MPI error handler is invoked if this return value is not MPI_SUCCESS. The default error handler aborts, but this may be changed with by using the MPI_Errhandler_set() function. The predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned instead. Note that MPI does not guarentee that an MPI program can continue past an error. In this implementation, all errors except MPI_ERR_INTERN or MPI_ERR_OTHER should always be recoverable.
MPI_SUCCESS - No error;
MPI_ERR_ARG - Invalid pointer;
MPI_ERR_INTERN - Out of memory.
SEE ALSOMPI_Op_free (3) MPI_Reduce (3) MPI_Allreduce (3) MPI_Reduce_scatter (3) MPI_Scan (3) MPI_Exscan (3)
|
|
| About Us | Returns Policy | Privacy Policy | Send us Feedback |
|
Company Info |
Product Index |
Category Index |
Help |
Terms of Use
Copyright © Lockless Inc All Rights Reserved. |