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

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

Adding compiled files

File size: 3.7 KB
Line 
1.\"Copyright 2006-2008 Sun Microsystems, Inc.
2.\" Copyright (c) 1996 Thinking Machines Corporation
3.TH MPI_Bcast 3 "Dec 08, 2009" "1.4" "Open MPI"
4.SH NAME
5\fBMPI_Bcast\fP \- Broadcasts a message from the process with rank \fIroot\fP to all other processes of the group.
6
7.SH SYNTAX
8.ft R
9.SH C Syntax
10.nf
11#include <mpi.h>
12int MPI_Bcast(void \fI*buffer\fP, int\fI count\fP, MPI_Datatype\fI datatype\fP,
13        int\fI root\fP, MPI_Comm\fI comm\fP)
14
15.SH Fortran Syntax
16.nf
17INCLUDE 'mpif.h'
18MPI_BCAST(\fIBUFFER\fP,\fI COUNT\fP, \fIDATATYPE\fP,\fI ROOT\fP,\fI COMM\fP,\fI IERROR\fP)
19        <type>  \fIBUFFER\fP(*)
20        INTEGER \fICOUNT\fP,\fI DATATYPE\fP,\fI ROOT\fP,\fI COMM\fP,\fI IERROR\fP
21
22.SH C++ Syntax
23.nf
24#include <mpi.h>
25void MPI::Comm::Bcast(void* \fIbuffer\fP, int \fIcount\fP,
26        const MPI::Datatype& \fIdatatype\fP, int \fIroot\fP) const = 0
27
28.SH INPUT/OUTPUT PARAMETERS
29.ft R
30.TP 1i
31buffer
32Starting address of buffer (choice).
33.TP 1i
34count
35Number of entries in buffer (integer).
36.TP 1i
37datatype
38Data type of buffer (handle).
39.TP 1i
40root
41Rank of broadcast root (integer).
42.TP 1i
43comm
44Communicator (handle).
45
46.SH OUTPUT PARAMETER
47.ft R
48.TP 1i
49IERROR
50Fortran only: Error status (integer).
51
52.SH DESCRIPTION
53.ft R
54MPI_Bcast broadcasts a message from the process with rank root to all processes of the group, itself included. It is called by all members of group using the same arguments for comm, root. On return, the contents of root's communication buffer has been copied to all processes.   
55.sp
56General, derived datatypes are allowed for datatype. The type signature of count, datatype on any process must be equal to the type signature of count, datatype at the root. This implies that the amount of data sent must be equal to the amount received, pairwise between each process and the root. MPI_Bcast and all other data-movement collective routines make this restriction. Distinct type maps between sender and receiver are still allowed.
57.sp
58\fBExample:\fR Broadcast 100 ints from process 0 to every process in the group.
59.nf
60    MPI_Comm comm;
61    int array[100];
62    int root=0;
63    \&...
64    MPI_Bcast( array, 100, MPI_INT, root, comm);
65.fi
66.sp
67As in many of our sample code fragments, we assume that some of the variables (such as comm in the example above) have been assigned appropriate values.
68.sp
69WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR
70.sp
71When the communicator is an inter-communicator, the root process in the first group broadcasts data to all the processes in the second group.  The first group defines the root process.  That process uses MPI_ROOT as the value of its \fIroot\fR argument.  The remaining processes use MPI_PROC_NULL as the value of their \fIroot\fR argument.  All processes in the second group use the rank of that root process in the first group as the value of their \fIroot\fR argument.   The receive buffer arguments of the processes in the second group must be consistent with the send buffer argument of the root process in the first group.
72.sp 
73.SH NOTES
74This function does not support the in-place option.
75.sp
76
77
78
79.SH ERRORS
80Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI:Exception object.
81.sp
82Before the error value is returned, the current MPI error handler is
83called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error.
84
Note: See TracBrowser for help on using the repository browser.