Edit

Share via


MPI_User_function function

MPI_User_function is a placeholder for the application-defined function name.

Syntax

void MPI_User_function(
       _In_count_   invec,
       _Inout_ void *inoutvec,
  _In_ int          *len,
  _In_ MPI_Datatype *datatype
);

Parameters

  • invec
    Array of elements that the user function is combining.

  • inoutvec
    Array of elements that the user function is combining.

  • len [in]
    Length of invec and inoutvec.

  • datatype [in]
    A handle to the data type that was passed into the call to MPI_Reduce.

Fortran

    SUBROUTINE USER_FUNCTION(INVEC, INOUTVEC, LEN, DATATYPE)
        <type> INVEC(LEN), INOUTVEC(LEN)
        INTEGER LEN, DATATYPE

Remarks

The user-defined operation is assumed to be associative. If commute = true, then the operation should be both commutative and associative. If commute = false, then the order of operands is fixed and is defined to be in ascending, process rank order, beginning with process zero. The order of evaluation can be changed, taking advantage of the associativity of the operation. If commute = true then the order of evaluation can be changed, taking advantage of commutativity and associativity.

Requirements

Product

HPC Pack 2012 MS-MPI Redistributable Package, HPC Pack 2008 R2 MS-MPI Redistributable Package, HPC Pack 2008 MS-MPI Redistributable Package or HPC Pack 2008 Client Utilities

Header

Mpi.h; Mpif.h

Library

Msmpi.lib

DLL

Msmpi.dll

See also

MPI Collective Functions

MPI_Op_create