Mpi_allreduce

Содержание:

Errors

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

MPI_SUCCESS
No error; MPI routine completed successfully.
MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. Additionally, this error can
occur if an uncommitted MPI_Datatype (see MPI_Type_commit) is used
in a communication call.
MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.
MPI_ERR_BUFFER
This error class is associcated with an error code that
indicates that two buffer arguments are aliased; that is, the
describe overlapping storage (often the exact same storage). This
is prohibited in MPI (because it is prohibited by the Fortran
standard, and rather than have a separate case for C and Fortran, the
MPI Forum adopted the more restrictive requirements of Fortran).

Errors

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

MPI_SUCCESS
No error; MPI routine completed successfully.
MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. May be an uncommitted
MPI_Datatype (see MPI_Type_commit).
MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.
MPI_ERR_OP
Invalid operation. MPI operations (objects of type MPI_Op)
must either be one of the predefined operations (e.g., MPI_SUM) or
created with MPI_Op_create.
MPI_ERR_BUFFER
This error class is associcated with an error code that
indicates that two buffer arguments are aliased; that is, the
describe overlapping storage (often the exact same storage). This
is prohibited in MPI (because it is prohibited by the Fortran
standard, and rather than have a separate case for C and Fortran, the
MPI Forum adopted the more restrictive requirements of Fortran).

Location:src/mpi/coll/red_scat_block.c

Errors

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

MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. May be an uncommitted
MPI_Datatype (see MPI_Type_commit).
MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.

Location:src/mpi/coll/allgather.c

Errors

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

MPI_SUCCESS
No error; MPI routine completed successfully.
MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. May be an uncommitted
MPI_Datatype (see MPI_Type_commit).
MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.

Location:src/mpi/coll/scatter.c

Errors

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

MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. Additionally, this error can
occur if an uncommitted MPI_Datatype (see MPI_Type_commit) is used
in a communication call.

Input Parameters

sendbuf

starting address of send buffer (choice)

sendcount

number of elements in send buffer (integer)

sendtype

data type of send buffer elements (handle)

recvcounts

integer array (of length group size)
containing the number of elements that are received from each process
(significant only at root)

displs

integer array (of length group size). Entry
i specifies the displacement relative to recvbuf at
which to place the incoming data from process i (significant only
at root)

recvtype

data type of recv buffer elements
(significant only at root) (handle)

root

rank of receiving process (integer)

comm
communicator (handle)

Errors

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

MPI_SUCCESS
No error; MPI routine completed successfully.
MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).
MPI_ERR_TYPE
Invalid datatype argument. May be an uncommitted
MPI_Datatype (see MPI_Type_commit).
MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.

Location:src/mpi/coll/gatherv.c

Errors

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

MPI_SUCCESS
No error; MPI routine completed successfully.
MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).
MPI_ERR_TYPE
Invalid datatype argument. Additionally, this error can
occur if an uncommitted MPI_Datatype (see MPI_Type_commit) is used
in a communication call.
MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.

Errors

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

MPI_SUCCESS
No error; MPI routine completed successfully.
MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. Additionally, this error can
occur if an uncommitted MPI_Datatype (see MPI_Type_commit) is used
in a communication call.
MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.

Errors

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

MPI_SUCCESS
No error; MPI routine completed successfully.
MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. May be an uncommitted
MPI_Datatype (see MPI_Type_commit).
MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.
MPI_ERR_OP
Invalid operation. MPI operations (objects of type MPI_Op)
must either be one of the predefined operations (e.g., MPI_SUM) or
created with MPI_Op_create.
MPI_ERR_BUFFER
This error class is associcated with an error code that
indicates that two buffer arguments are aliased; that is, the
describe overlapping storage (often the exact same storage). This
is prohibited in MPI (because it is prohibited by the Fortran
standard, and rather than have a separate case for C and Fortran, the
MPI Forum adopted the more restrictive requirements of Fortran).

Location:src/mpi/coll/red_scat.c

Errors

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

MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. May be an uncommitted
MPI_Datatype (see MPI_Type_commit).
MPI_ERR_OP
Invalid operation. MPI operations (objects of type MPI_Op)
must either be one of the predefined operations (e.g., MPI_SUM) or
created with MPI_Op_create.
MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).

Location:src/mpi/coll/allreduce.c

Errors

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

MPI_SUCCESS
No error; MPI routine completed successfully.
MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. May be an uncommitted
MPI_Datatype (see MPI_Type_commit).
MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.

Location:src/mpi/coll/scatterv.c

Errors

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

MPI_SUCCESS
No error; MPI routine completed successfully.
MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. May be an uncommitted
MPI_Datatype (see MPI_Type_commit).
MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.
MPI_ERR_OP
Invalid operation. MPI operations (objects of type MPI_Op)
must either be one of the predefined operations (e.g., MPI_SUM) or
created with MPI_Op_create.
MPI_ERR_BUFFER
This error class is associcated with an error code that
indicates that two buffer arguments are aliased; that is, the
describe overlapping storage (often the exact same storage). This
is prohibited in MPI (because it is prohibited by the Fortran
standard, and rather than have a separate case for C and Fortran, the
MPI Forum adopted the more restrictive requirements of Fortran).

Location:/tmp/IRFHxpqHTq/mpich-3.1.2/src/mpi/coll/red_scat_block.c

Errors

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

MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. Additionally, this error can
occur if an uncommitted MPI_Datatype (see MPI_Type_commit) is used
in a communication call.
MPI_ERR_OP
Invalid operation. MPI operations (objects of type MPI_Op)
must either be one of the predefined operations (e.g., MPI_SUM) or
created with MPI_Op_create.
MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).

Errors

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

MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. Additionally, this error can
occur if an uncommitted MPI_Datatype (see MPI_Type_commit) is used
in a communication call.
MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.

Errors

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

MPI_SUCCESS
No error; MPI routine completed successfully.
MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. May be an uncommitted
MPI_Datatype (see MPI_Type_commit).
MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.

Location:src/mpi/coll/gather.c

Errors

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

MPI_SUCCESS
No error; MPI routine completed successfully.
MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. May be an uncommitted
MPI_Datatype (see MPI_Type_commit).
MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.
MPI_ERR_BUFFER
This error class is associcated with an error code that
indicates that two buffer arguments are aliased; that is, the
describe overlapping storage (often the exact same storage). This
is prohibited in MPI (because it is prohibited by the Fortran
standard, and rather than have a separate case for C and Fortran, the
MPI Forum adopted the more restrictive requirements of Fortran).

Location:src/mpi/coll/reduce.c

Сборка для всех процессов

Синтаксис функции сборки Gather-to-all представлен ниже.

MPI_ALLGATHER(sendbuf,
sendcount, sendtype, recvbuf, recvcount, recvtype, comm)


IN
sendbuf начальный адрес посылающего буфера (альтернатива)

IN
sendcount количество элементов в буфере (целое)

IN
sendtype тип данных элементов в посылающем буфере (дескриптор)

OUT
recvbuf адрес принимающего буфера (альтернатива)

IN
recvcount количество элементов, полученных от любого процесса (целое)

IN
recvtype тип данных элементов принимающего буфера (дескриптор)

IN
comm коммуникатор (дескриптор)

int MPI_Allgather(void* sendbuf,

int sendcount, MPI_Datatype sendtype, void* recvbuf,

int recvcount, MPI_Datatype recvtype, MPI_Comm comm)

MPI_ALLGATHER(SENDBUF, SENDCOUNT,
SENDTYPE, RECVBUF, RECVCOUNT,

RECVTYPE, COMM, IERROR)
<type> SENDBUF(*), RECVBUF(*) INTEGER SENDCOUNT, SENDTYPE,
RECVCOUNT, RECVTYPE,

COMM, IERROR


void MPI::Intracomm::Allgather(const void* sendbuf, int sendcount,

const Datatype& sendtype, void* recvbuf, int recvcount,

const Datatype& recvtype) const

Функцию MPI_ALLGATHER можно представить как MPI_GATHER, где
результат принимают все процессы, а не только главный. Блок данных, посланный
j-м процессом принимается каждым процессом и помещается в j-й блок буфера
recvbuf.

Сигнатура типа, связанная с sendcount, sendtype, должна быть
одинаковой во всех процессах.

Результат выполнения вызова MPI_ALLGATHER(...) такой же, как если бы
все процессы выполнили n вызовов

root = 0, ..., n-1MPI_ALLGATHERMPI_GATHER

Синтаксис функции сборки MPI_ALLGATHERV представлен ниже.


MPI_ALLGATHERV(sendbuf,sendcount,sendtype,recvbuf,recvcounts,
displs,recvtype,comm)


IN
sendbuf начальный адрес посылающего буфера (альтернатива)

IN
sendcount количество элементовв посылающем буфере (целое)

IN
sendtype тип данных элементов в посылающем буфере (дескриптор)

OUT
recvbuf адрес принимающего буфера (альтернатива)

IN
recvcounts целочисленный массив (размера группы)
содержащий количество элементов, полученых от каждого процесса

IN
displs целочисленный массив (размера группы). Элемент
i представляет смещение области (относительно recvbuf), где на
помещаются принимаемые данные от процесса i

IN
recvtype тип данных элементов принимающего буфера(дескриптор)

IN
comm коммуникатор (дескриптор)


int MPI_Allgatherv(void* sendbuf, int sendcount,

MPI_Datatype sendtype, void *recvbuf,int *recvcounts,

int *displs, MPI_Datatype recvtype, MPI_Comm comm)


MPI_ALLGATHERV(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF,

RECVCOUNTS, DISPLS, RECVTYPE, COMM, IERROR)
<type> SENDBUF(*), RECVBUF(*) INTEGER SENDCOUNT, SENDTYPE,

RECVCOUNTS(*), DISPLS(*), RECVTYPE, COMM, IERROR


void MPI::Intracomm::Allgatherv(const void* sendbuf,

int sendcount, const Datatype& sendtype, void* recvbuf,

const int recvcounts[], const int displs[],

const Datatype& recvtype) const

Функцию MPI_ALLGATHERV можно представить как MPI_GATHERV, но
при ее использовании результат получают все процессы, а не только один корневой.
j-й блок данных, посланный каждым процессом, принимается каждым
процессом и помещается в j-й блок буфера recvbuf. Эти блоки не
обязаны быть одинакового размера.

Сигнатура типа, связанного с sendcount, sendtype в процессе j
должна быть такой же, как сигнатура типа, связанного с recvcounts,
recvtype
в любом другом процессе.

Результат вызова MPI_ALLGATHERV(...) такой же, как если бы все процессы
выполнили n вызовов

MPI_GATHERV(sendbuf, sendcount, sendtype, recvbuf,
    recvcounts, displs, recvtype, root, comm),

для root = 0, ..., n-1. Правила корректного использования
MPI_ALLGATHERV соответствуют правилам для MPI_GATHERV.

Subsections

Примеры использования MPI_ALLGATHER, MPI_ALLGATHERV

Next:Примеры использования MPI_ALLGATHER, MPI_ALLGATHERV Up:Коллективные взаимодействия процессов Previous:Пример использования MPI_SCATTER, MPI_SCATTERV Contents

Alex Otwagin
2002-12-10

Спонсоры:

Хостинг:

Maxim ChirkovДобавить, Поддержать, Вебмастеру

Input Parameters

sendbuf

starting address of send buffer (choice)

sendcount

number of elements in send buffer (integer)

sendtype

data type of send buffer elements (handle)

recvcounts

integer array (of length group size)
containing the number of elements that are received from each process
(significant only at root)

displs

integer array (of length group size). Entry
i specifies the displacement relative to recvbuf at
which to place the incoming data from process i (significant only
at root)

recvtype

data type of recv buffer elements
(significant only at root) (handle)

root

rank of receiving process (integer)

comm
communicator (handle)

Errors

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

MPI_SUCCESS
No error; MPI routine completed successfully.
MPI_ERR_COMM
Invalid communicator. A common error is to use a null
communicator in a call (not even allowed in MPI_Comm_rank).
MPI_ERR_COUNT
Invalid count argument. Count arguments must be
non-negative; a count of zero is often valid.
MPI_ERR_TYPE
Invalid datatype argument. Additionally, this error can
occur if an uncommitted MPI_Datatype (see MPI_Type_commit) is used
in a communication call.
MPI_ERR_BUFFER
Invalid buffer pointer. Usually a null buffer where
one is not valid.
Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *