[97] | 1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
| 2 | .\"Copyright (c) 1996 Thinking Machines |
---|
| 3 | .TH MPI_Type_set_attr 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
| 4 | .SH NAME |
---|
| 5 | \fBMPI_Type_set_attr\fP \- Sets a key value/attribute pair to a data type. |
---|
| 6 | |
---|
| 7 | .SH SYNTAX |
---|
| 8 | .ft R |
---|
| 9 | .SH C Syntax |
---|
| 10 | .nf |
---|
| 11 | #include <mpi.h> |
---|
| 12 | int MPI_Type_set_attr(MPI_Datatype \fItype\fP, int \fItype_keyval\fP, |
---|
| 13 | void *\fIattribute_val\fP) |
---|
| 14 | |
---|
| 15 | .SH Fortran Syntax (see FORTRAN 77 NOTES) |
---|
| 16 | .nf |
---|
| 17 | INCLUDE 'mpif.h' |
---|
| 18 | MPI_TYPE_SET_ATTR(\fITYPE, TYPE_KEYVAL, ATTRIBUTE_VAL, IERROR\fP) |
---|
| 19 | INTEGER \fITYPE, TYPE_KEYVAL, IERROR\fP |
---|
| 20 | INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE_VAL\fP |
---|
| 21 | |
---|
| 22 | .SH C++ Syntax |
---|
| 23 | .nf |
---|
| 24 | #include <mpi.h> |
---|
| 25 | void MPI::Datatype::Set_attr(int \fItype_keyval\fP, const void* \fIattribute_val\fP) |
---|
| 26 | |
---|
| 27 | .SH INPUT/OUTPUT PARAMETER |
---|
| 28 | .ft R |
---|
| 29 | .TP 1i |
---|
| 30 | type |
---|
| 31 | Data type to which attribute will be attached (handle). |
---|
| 32 | |
---|
| 33 | .SH INPUT PARAMETERS |
---|
| 34 | .ft R |
---|
| 35 | .TP 1i |
---|
| 36 | type_keyval |
---|
| 37 | Key value (integer). |
---|
| 38 | .TP 1i |
---|
| 39 | attribute_val |
---|
| 40 | Attribute value. |
---|
| 41 | |
---|
| 42 | .SH OUTPUT PARAMETER |
---|
| 43 | .ft R |
---|
| 44 | .TP 1i |
---|
| 45 | IERROR |
---|
| 46 | Fortran only: Error status (integer). |
---|
| 47 | |
---|
| 48 | .SH DESCRIPTION |
---|
| 49 | For the given data type, MPI_Type_set_attr sets the key value to the value of the specified attribute. |
---|
| 50 | |
---|
| 51 | .SH FORTRAN 77 NOTES |
---|
| 52 | .ft R |
---|
| 53 | The MPI standard prescribes portable Fortran syntax for |
---|
| 54 | the \fIATTRIBUTE_VAL\fP argument only for Fortran 90. FORTRAN 77 |
---|
| 55 | users may use the non-portable syntax |
---|
| 56 | .sp |
---|
| 57 | .nf |
---|
| 58 | INTEGER*MPI_ADDRESS_KIND \fIATTRIBUTE_VAL\fP |
---|
| 59 | .fi |
---|
| 60 | .sp |
---|
| 61 | where MPI_ADDRESS_KIND is a constant defined in mpif.h |
---|
| 62 | and gives the length of the declared integer in bytes. |
---|
| 63 | |
---|
| 64 | .SH ERRORS |
---|
| 65 | Almost 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. |
---|
| 66 | .sp |
---|
| 67 | Before the error value is returned, the current MPI error handler is |
---|
| 68 | called. 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. |
---|
| 69 | |
---|
| 70 | .SH SEE ALSO |
---|
| 71 | .ft R |
---|
| 72 | .sp |
---|
| 73 | MPI_Type_get_attr |
---|
| 74 | .br |
---|
| 75 | |
---|