File: MPI_Win_create_keyval.3in

package info (click to toggle)
openmpi 3.1.3-11
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 118,572 kB
  • sloc: ansic: 628,972; f90: 17,993; makefile: 13,761; sh: 7,051; java: 6,360; perl: 3,215; cpp: 2,225; python: 1,350; lex: 988; fortran: 52; tcl: 12
file content (146 lines) | stat: -rw-r--r-- 5,051 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
.\" -*- nroff -*-
.\" Copyright 2010 Cisco Systems, Inc.  All rights reserved.
.\" Copyright 2006-2008 Sun Microsystems, Inc.
.\" Copyright (c) 1996 Thinking Machines Corporation
.\" $COPYRIGHT$
.TH MPI_Win_create_keyval 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
.SH NAME
\fBMPI_Win_create_keyval\fP \- Creates a keyval for a window.

.SH SYNTAX
.ft R
.SH C Syntax
.nf
#include <mpi.h>
int MPI_Win_create_keyval(MPI_Win_copy_attr_function *\fIwin_copy_attr_fn\fP,
	MPI_Win_delete_attr_function *\fIwin_delete_attr_fn\fP,
	int *\fIwin_keyval\fP, void *\fIextra_state\fP)

.fi
.SH Fortran Syntax (see FORTRAN 77 NOTES)
.nf
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_WIN_CREATE_KEYVAL(\fIWIN_COPY_ATTR_FN, WIN_DELETE_ATTR_FN,
	WIN_KEYVAL, EXTRA_STATE, IERROR\fP)
	EXTERNAL \fIWIN_COPY_ATTR_FN, WIN_DELETE_ATTR_FN\fP
	INTEGER \fIWIN_KEYVAL, IERROR\fP
	INTEGER(KIND=MPI_ADDRESS_KIND) \fIEXTRA_STATE\fP

.fi
.SH Fortran 2008 Syntax
.nf
USE mpi_f08
MPI_Win_create_keyval(\fIwin_copy_attr_fn\fP, \fIwin_delete_attr_fn\fP, \fIwin_keyval\fP,
		\fIextra_state\fP, \fIierror\fP)
	PROCEDURE(MPI_Win_copy_attr_function) :: \fIwin_copy_attr_fn\fP
	PROCEDURE(MPI_Win_delete_attr_function) :: \fIwin_delete_attr_fn\fP
	INTEGER, INTENT(OUT) :: \fIwin_keyval\fP
	INTEGER(KIND=MPI_ADDRESS_KIND), INTENT(IN) :: \fIextra_state\fP
	INTEGER, OPTIONAL, INTENT(OUT) :: \fIierror\fP

.fi
.SH C++ Syntax
.nf
#include <mpi.h>
static int MPI::Win::Create_keyval(MPI::Win::Copy_attr_function*
	\fIwin_copy_attr_fn\fP,
	MPI::Win::Delete_attr_function* \fIwin_delete_attr_fn\fP,
	void* \fIextra_state\fP)

.fi
.SH INPUT PARAMETERS
.ft R
.TP 1i
win_copy_attr_fn
Copy callback function for \fIwin_keyval\fP (function).
.TP 1i
win_delete_attr_fn
Delete callback function for \fIwin_keyval\fP (function).
.TP 1i
extra_state
Extra state for callback functions.

.SH OUTPUT PARAMETERS
.ft R
.TP 1i
win_keyval
Key value for future access (integer).
.TP 1i
IERROR
Fortran only: Error status (integer).

.SH DESCRIPTION
.ft R
The argument \fIwin_copy_attr_fn\fP may be specified as MPI_WIN_NULL_COPY_FN or MPI_WIN_DUP_FN from either C, C++, or Fortran. MPI_WIN_NULL_COPY_FN is a function that serves only to return \fIflag\fP = 0 and MPI_SUCCESS. MPI_WIN_DUP_FN is a simple-minded copy function that sets \fIflag\fP = 1, returns the value of \fIattribute_val_in\fP in \fIattribute_val_out\fP, and returns MPI_SUCCESS.
.sp
The argument \fIwin_delete_attr_fn\fP may be specified as MPI_WIN_NULL_DELETE_FN from either C, C++, or Fortran. MPI_WIN_NULL_DELETE_FN is a function that serves only to return MPI_SUCCESS.
.sp
The C callback functions are:
.sp
.nf
typedef int MPI_Win_copy_attr_function(MPI_Win \fIoldwin\fP, int \fIwin_keyval\fP,
             void *\fIextra_state\fP, void *\fIattribute_val_in\fP,
             void *\fIattribute_val_out\fP, int *\fIflag\fP);
.fi
.sp
and
.sp
.nf
typedef int MPI_Win_delete_attr_function(MPI_Win \fIwin\fP, int \fIwin_keyval\fP,
             void *\fIattribute_val\fP, void *\fIextra_state\fP);
.fi
.sp
The Fortran callback functions are:
.sp
.nf
SUBROUTINE WIN_COPY_ATTR_FN(\fIOLDWIN, WIN_KEYVAL, EXTRA_STATE,
	ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT, FLAG, IERROR\fP)
	INTEGER \fIOLDWIN, WIN_KEYVAL, IERROR\fP
	INTEGER(KIND=MPI_ADDRESS_KIND) \fIEXTRA_STATE, ATTRIBUTE_VAL_IN,
		ATTRIBUTE_VAL_OUT\fP
	LOGICAL \fIFLAG\fP
.fi
.sp
and
.sp
.nf
SUBROUTINE WIN_DELETE_ATTR_FN(\fIWIN, WIN_KEYVAL, ATTRIBUTE_VAL,
	EXTRA_STATE, IERROR\fP)
	INTEGER \fIWIN, WIN_KEYVAL, IERROR\fP
	INTEGER(KIND=MPI_ADDRESS_KIND) \fIATTRIBUTE_VAL, EXTRA_STATE\fP
.fi
.sp
The C++ callbacks are:
.sp
.nf
typedef int MPI::Win::Copy_attr_function(const MPI::Win& \fIoldwin\fP,
	int \fIwin_keyval\fP, void* \fIextra_state\fP, void* \fIattribute_val_in\fP,
	void* \fIattribute_val_out\fP, bool& \fIflag\fP);
.fi
.sp
and
.sp
.nf
typedef int MPI::Win::Delete_attr_function(MPI::Win& \fIwin\fP, int \fIwin_keyval\fP, void* \fIattribute_val\fP, void* \fIextra_state\fP);
.fi

.SH FORTRAN 77 NOTES
.ft R
The MPI standard prescribes portable Fortran syntax for
the \fIEXTRA_STATE\fP argument only for Fortran 90. FORTRAN 77
users may use the non-portable syntax
.sp
.nf
     INTEGER*MPI_ADDRESS_KIND \fIEXTRA_STATE\fP
.fi
.sp
where MPI_ADDRESS_KIND is a constant defined in mpif.h
and gives the length of the declared integer in bytes.

.SH ERRORS
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.
.sp
Before the error value is returned, the current MPI error handler is
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.