MPI_Scan(3)

MPI_Scan - Computes the scan (partial reductions) of data on a collection of processes

Showing IRIX 6.5.30 (default release). Last changed in IRIX 6.5.22.

NAME
     MPI_Scan - Computes the scan (partial reductions) of data on a collection
     of processes

SYNOPSIS
     C:

          #include <mpi.h>

          int MPI_Scan ( sendbuf, recvbuf, count, datatype,
          op, comm )
          void             *sendbuf;
          void             *recvbuf;
          int               count;
          MPI_Datatype      datatype;
          MPI_Op            op;
          MPI_Comm          comm;


     C++:

          #include <mpi.h>

          void Intracomm::Scan(
          const void*       sendbuf,
          void*             recvbuf,
          int               count,
          const Datatype&   datatype,
          const Op&         op) const


     Fortran:

          INCLUDE "mpif.h" (or USE MPI)

          <type> SENDBUF(*), RECVBUF(*)
          INTEGER count, datatype, op, comm,

          CALL MPI_SCAN(sendbuf, recvbuf, count, datatype, op, comm, ierror)


STANDARDS
     This release implements the MPI 1.2 standard, as documented by the MPI
     Forum in the spring 1997 release of MPI:  A Message Passing Interface
     Standard.

     The MPI_IN_PLACE option as defined in the MPI 2.0 standard is also
     supported in this implementation.
DESCRIPTION
     The MPI_Scan routine computes the scan (partial reductions) of data on a
     collection of processes.  This routine accepts the following parameters:

     sendbuf   Specifies the starting address of the send buffer (choice).
               You may also pass in the argument MPI_IN_PLACE for the value of
               sendbuf at all processes.  In this case, the input data is
               taken from the receive buffer, and replaced by the output data.
               Please note that using the MPI_IN_PLACE option in Fortran
               causes the receive buffer to become a send-and-receive buffer,
               so a binding that includes INTENT must be marked as INOUT, not
               OUT.

     count     Specifies the number of elements in the input buffer (integer)

     datatype  Specifies the data type of elements of the input buffer
               (handle)

     op        Specifies the operation (handle)

     comm      Specifies the communicator (handle)

     recvbuf   Returns the starting address of the receive buffer (choice)

     ierror    Specifies the return code value for successful completion,
               which is in MPI_SUCCESS.  MPI_SUCCESS is defined in the mpif.h
               file.