1MPI_Win_create(3) LAM/MPI MPI_Win_create(3)
2
3
4
6 MPI_Win_create - Specifies an window accessible by remote processes
7
9 #include <mpi.h>
10 int
11 MPI_Win_create(void *base, MPI_Aint size, int disp_unit,
12 MPI_Info info, MPI_Comm comm, MPI_Win *newwin)
13
15 base - initial address of window (choice)
16 size - size of window in bytes (nonnegative integer)
17 disp_unit
18 - local unit size for displacements, in bytes (positive integer)
19 info - info argument (handle)
20 comm - communicator (handle)
21 newwin - window object returned by the call (handle)
22
23
25 Common choices for disp_unit are 1 (no scaling), and (in C syntax)
26 sizeof(type), for a window that consists of an array of elements of
27 type type. The later choice will allow one to use array indices in RMA
28 calls, and have those scaled correctly to byte displacements, even in a
29 heterogeneous environment. ( End of advice to users.) The info argu‐
30 ment provides optimization hints to the runtime about the expected
31 usage pattern of the window.
32
33 The various processes in the group of comm may specify completely dif‐
34 ferent target windows, in location, size, displacement units and info
35 arguments. As long as all the get, put and accumulate accesses to a
36 particular process fit their specific target window this should pose no
37 problem. The same area in memory may appear in multiple windows, each
38 associated with a different window object. However, concurrent communi‐
39 cations to distinct, overlapping windows may lead to erroneous results.
40
41
43 All MPI routines in Fortran (except for MPI_WTIME and MPI_WTICK ) have
44 an additional argument ierr at the end of the argument list. ierr is
45 an integer and has the same meaning as the return value of the routine
46 in C. In Fortran, MPI routines are subroutines, and are invoked with
47 the call statement.
48
49 All MPI objects (e.g., MPI_Datatype , MPI_Comm ) are of type INTEGER in
50 Fortran.
51
53 The IMPI standard only supports MPI-1 functions. Hence, this function
54 is currently not designed to operate within an IMPI job.
55
56
58 If an error occurs in an MPI function, the current MPI error handler is
59 called to handle it. By default, this error handler aborts the MPI
60 job. The error handler may be changed with MPI_Errhandler_set ; the
61 predefined error handler MPI_ERRORS_RETURN may be used to cause error
62 values to be returned (in C and Fortran; this error handler is less
63 useful in with the C++ MPI bindings. The predefined error handler
64 MPI::ERRORS_THROW_EXCEPTIONS should be used in C++ if the error value
65 needs to be recovered). Note that MPI does not guarantee that an MPI
66 program can continue past an error.
67
68 All MPI routines (except MPI_Wtime and MPI_Wtick ) return an error
69 value; C routines as the value of the function and Fortran routines in
70 the last argument. The C++ bindings for MPI do not return error val‐
71 ues; instead, error values are communicated by throwing exceptions of
72 type MPI::Exception (but not by default). Exceptions are only thrown
73 if the error value is not MPI::SUCCESS .
74
75
76 Note that if the MPI::ERRORS_RETURN handler is set in C++, while MPI
77 functions will return upon an error, there will be no way to recover
78 what the actual error value was.
79 MPI_SUCCESS
80 - No error; MPI routine completed successfully.
81 MPI_ERR_COMM
82 - Invalid communicator. A common error is to use a null commu‐
83 nicator in a call (not even allowed in MPI_Comm_rank ).
84 MPI_ERR_ARG
85 - Invalid argument. Some argument is invalid and is not identi‐
86 fied by a specific error class. This is typically a NULL
87 pointer or other such error.
88 MPI_ERR_OTHER
89 - Other error; use MPI_Error_string to get more information
90 about this error code.
91 MPI_ERR_INTERN
92 - An internal error has been detected. This is fatal. Please
93 send a bug report to the LAM mailing list (see http://www.lam-
94 mpi.org/contact.php ).
95
96
98 MPI_Put(3), MPI_Get(3), MPI_Accumulate(3), MPI_Win_start(3),
99 MPI_Win_complete(3), MPI_Win_fence(3), MPI_Win_free(3),
100 MPI_Win_get_group(3), MPI_Win_get_group(3), MPI_Win_wait(3)
101
102
104 For more information, please see the official MPI Forum web site, which
105 contains the text of both the MPI-1 and MPI-2 standards. These docu‐
106 ments contain detailed information about each MPI function (most of
107 which is not duplicated in these man pages).
108
109 http://www.mpi-forum.org/
110
112 wcreate.c
113
114
115
116LAM/MPI 7.1.2 2/23/2006 MPI_Win_create(3)