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

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

Adding compiled files

File size: 3.3 KB
Line 
1.\"Copyright 2006-2008 Sun Microsystems, Inc.
2.\"Copyright (c) 1996 Thinking Machines
3.TH MPI_Comm_set_attr 3 "Dec 08, 2009" "1.4" "Open MPI"
4.SH NAME
5\fBMPI_Comm_set_attr\fP \- Stores attribute value associated with a key.
6
7.SH SYNTAX
8.ft R
9.SH C Syntax
10.nf
11#include <mpi.h>
12int MPI_Comm_set_attr(MPI_Comm \fIcomm\fP, int \fIcomm_keyval\fP, void *\fIattribute_val\fP)
13
14.SH Fortran Syntax (see FORTRAN 77 NOTES)
15.nf
16INCLUDE 'mpif.h'
17MPI_COMM_SET_ATTR(\fICOMM, COMM_KEYVAL, ATTRIBUTE_VAL, IERROR\fP)
18        INTEGER \fICOMM, COMM_KEYVAL, IERROR \fP
19        INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE_VAL\fP
20
21.SH C++ Syntax
22.nf
23#include <mpi.h>
24void MPI::Comm::Set_attr(int \fIcomm_keyval\fP, const void* \fIattribute_val\fP) const
25
26.SH INPUT/OUTPUT PARAMETER
27.ft R
28.TP 1i
29comm
30Communicator from which attribute will be attached (handle).
31
32.SH INPUT PARAMETERS
33.ft R
34.TP 1i
35comm_keyval
36Key value (integer).
37.TP 1i
38attribute_val
39Attribute value.
40
41.SH OUTPUT PARAMETER
42.ft R
43.TP 1i
44IERROR
45Fortran only: Error status (integer).
46
47.SH DESCRIPTION
48.ft R
49MPI_Comm_set_attr stores the stipulated attribute value \fIattribute_val\fP for subsequent retrieval by MPI_Comm_get_attr. If the value is already present, then the outcome is as if MPI_Comm_delete_attr was first called to delete the previous value (and the callback function delete_fn was executed), and a new value was next stored. The call is erroneous if there is no key with value \fIcomm_keyval\fP; in particular MPI_KEYVAL_INVALID is an erroneous key value. The call will fail if the delete_fn function returned an error code other than MPI_SUCCESS.
50.sp
51This function replaces MPI_Attr_put, the use of which is deprecated. The C binding is identical. The Fortran binding differs in that \fIattribute_val\fP is an address-sized integer.
52
53.SH FORTRAN 77 NOTES
54.ft R
55The MPI standard prescribes portable Fortran syntax for
56the \fIATTRIBUTE_VAL\fP argument only for Fortran 90. Sun FORTRAN 77
57users may use the non-portable syntax
58.sp
59.nf
60     INTEGER*MPI_ADDRESS_KIND \fIATTRIBUTE_VAL\fP
61.fi
62.sp
63where MPI_ADDRESS_KIND is a constant defined in mpif.h
64and gives the length of the declared integer in bytes.
65
66.SH NOTES
67.ft R
68Values of the permanent attributes MPI_TAG_UB, MPI_HOST,
69MPI_IO, and MPI_WTIME_IS_GLOBAL may not be changed.
70.sp
71The type of the attribute value depends on whether C or Fortran is being used. In C, an attribute value is a pointer (void *); in Fortran, it is a single, address-size integer system for which a pointer does not fit in an integer.
72.sp
73If an attribute is already present, the delete function (specified when the corresponding keyval was created) will be called.
74
75.SH ERRORS
76Almost 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.
77.sp
78Before the error value is returned, the current MPI error handler is
79called. 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. 
80
Note: See TracBrowser for help on using the repository browser.