source: proiecte/hpl/openmpi_compiled/share/man/man3/MPI_Alltoallw.3 @ 97

Last change on this file since 97 was 97, checked in by (none), 14 years ago

Adding compiled files

File size: 5.7 KB
Line 
1.\"Copyright 2006-2008 Sun Microsystems, Inc.
2.\" Copyright (c) 1996 Thinking Machines Corporation
3.TH MPI_Alltoallw 3 "Dec 08, 2009" "1.4" "Open MPI"
4
5.SH NAME
6\fBMPI_Alltoallw\fP \- All processes send data of different types to, and receive data of different types from, all processes
7
8.SH SYNTAX
9.ft R
10
11.SH C Syntax
12.nf
13#include <mpi.h>
14int MPI_Alltoallw(void *\fIsendbuf\fP, int *\fIsendcounts\fP,
15        int *\fIsdispls\fP, MPI_Datatype *\fIsendtypes\fP,
16        void *\fIrecvbuf\fP, int *\fIrecvcounts\fP,
17        int *\fIrdispls\fP, MPI_Datatype *\fIrecvtypes\fP, MPI_Comm \fIcomm\fP)
18
19.SH Fortran Syntax
20.nf
21INCLUDE 'mpif.h'
22MPI_ALLTOALLW(\fISENDBUF, SENDCOUNTS, SDISPLS, SENDTYPES,
23        RECVBUF, RECVCOUNTS, RDISPLS, RECVTYPES, COMM, IERROR\fP)
24
25        <type>  \fISENDBUF(*), RECVBUF(*)\fP
26        INTEGER \fISENDCOUNTS(*), SDISPLS(*), SENDTYPES(*)\fP
27        INTEGER \fIRECVCOUNTS(*), RDISPLS(*), RECVTYPES(*)\fP
28        INTEGER \fICOMM, IERROR\fP
29
30.SH C++ Syntax
31.nf
32#include <mpi.h>
33void MPI::Comm::Alltoallw(const void* \fIsendbuf\fP,
34        const int \fIsendcounts\fP[], const int \fIsdispls\fP[],
35        const MPI::Datatype \fIsendtypes\fP[], void* \fIrecvbuf\fP,
36        const int \fIrecvcounts\fP[], const int \fIrdispls\fP[],
37        const MPI::Datatype \fIrecvtypes\fP[])
38
39.SH INPUT PARAMETERS
40.ft R
41.TP 1.2i
42sendbuf
43Starting address of send buffer.
44.TP 1.2i
45sendcounts
46Integer array, where entry i specifies the number of elements to send
47to rank i.
48.TP 1.2i
49sdispls
50Integer array, where entry i specifies the displacement (in bytes,
51offset from \fIsendbuf\fP) from which to send data to rank i.
52.TP 1.2i
53sendtypes
54Datatype array, where entry i specifies the datatype to use when
55sending data to rank i.
56.TP 1.2i
57recvcounts
58Integer array, where entry j specifies the number of elements to
59receive from rank j.
60.TP 1.2i
61rdispls
62Integer array, where entry j specifies the displacement (in bytes,
63offset from \fIrecvbuf\fP) to which data from rank j should
64be written.
65.TP 1.2i
66recvtypes
67Datatype array, where entry j specifies the datatype to use when
68receiving data from rank j.
69.TP 1.2i
70comm
71Communicator over which data is to be exchanged.
72
73.SH OUTPUT PARAMETERS
74.ft R
75.TP 1.2i
76recvbuf
77Address of receive buffer.
78.ft R
79.TP 1.2i
80IERROR
81Fortran only: Error status.
82
83.SH DESCRIPTION
84.ft R
85MPI_Alltoallw is a generalized collective operation in which all
86processes send data to and receive data from all other processes. It
87adds flexibility to MPI_Alltoallv by allowing the user to specify the
88datatype of individual data blocks (in addition to displacement and
89element count). Its operation can be thought of in the following way,
90where each process performs 2n (n being the number of processes in
91communicator \fIcomm\fP) independent point-to-point communications
92(including communication with itself).
93.sp
94.nf
95        MPI_Comm_size(\fIcomm\fP, &n);
96        for (i = 0, i < n; i++)
97            MPI_Send(\fIsendbuf\fP + \fIsdispls\fP[i], \fIsendcounts\fP[i],
98                \fIsendtypes\fP[i], i, ..., \fIcomm\fP);
99        for (i = 0, i < n; i++)
100            MPI_Recv(\fIrecvbuf\fP + \fIrdispls\fP[i], \fIrecvcounts\fP[i],
101                \fIrecvtypes\fP[i], i, ..., \fIcomm\fP);
102.fi
103.sp
104Process j sends the k-th block of its local \fIsendbuf\fP to process
105k, which places the data in the j-th block of its local
106\fIrecvbuf\fP.
107.sp
108When a pair of processes exchanges data, each may pass different
109element count and datatype arguments so long as the sender specifies
110the same amount of data to send (in bytes) as the receiver expects
111to receive.
112.sp
113Note that process i may send a different amount of data to process j
114than it receives from process j. Also, a process may send entirely
115different amounts and types of data to different processes in the
116communicator.
117
118WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR
119.sp
120When the communicator is an inter-communicator, the gather operation occurs in two phases.  The data is gathered from all the members of the first group and received by all the members of the second group.  Then the data is gathered from all the members of the second group and received by all the members of the first.  The operation exhibits a symmetric, full-duplex behavior. 
121.sp
122The first group defines the root process.  The root process uses MPI_ROOT as the value of \fIroot\fR.  All other processes in the first group use MPI_PROC_NULL as the value of \fIroot\fR.  All processes in the second group use the rank of the root process in the first group as the value of \fIroot\fR.
123.sp
124When the communicator is an intra-communicator, these groups are the same, and the operation occurs in a single phase.
125.sp 
126.SH NOTES
127.ft R
128The MPI_IN_PLACE option is not available for any form of all-to-all
129communication.
130.sp
131The specification of counts, types, and displacements should not cause
132any location to be written more than once.
133.sp
134All arguments on all processes are significant. The \fIcomm\fP argument,
135in particular, must describe the same communicator on all processes.
136.sp
137The offsets of \fIsdispls\fP and \fIrdispls\fP are measured in bytes.
138Compare this to MPI_Alltoallv, where these offsets are measured in units
139of \fIsendtype\fP and \fIrecvtype\fP, respectively.
140
141.SH ERRORS
142.ft R
143Almost all MPI routines return an error value; C routines as
144the value of the function and Fortran routines in the last argument. C++
145functions do not return errors. If the default error handler is set to
146MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism
147will be used to throw an MPI:Exception object.
148.sp
149Before the error value is returned, the current MPI error handler is
150called. By default, this error handler aborts the MPI job, except for
151I/O function errors. The error handler may be changed with
152MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN
153may be used to cause error values to be returned. Note that MPI does not
154guarantee that an MPI program can continue past an error.
155
156.SH SEE ALSO
157.ft R
158.nf
159MPI_Alltoall
160MPI_Alltoallv
161
Note: See TracBrowser for help on using the repository browser.