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

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

Adding compiled files

File size: 6.3 KB
Line 
1
2.\"Copyright 2006-2008 Sun Microsystems, Inc.
3.\" Copyright (c) 1996 Thinking Machines Corporation
4.TH MPI_File_open 3 "Dec 08, 2009" "1.4" "Open MPI"
5.SH NAME
6\fBMPI_File_open\fP \- Opens a file (collective).
7.SH SYNTAX
8.ft R
9.nf
10C Syntax
11    #include <mpi.h>
12    int MPI_File_open(MPI_Comm \fIcomm\fP, char \fI*filename\fP,
13              int \fIamode\fP, MPI_Info \fIinfo\fP,
14              MPI_File \fI*fh\fP)
15
16Fortran Syntax
17    INCLUDE 'mpif.h'
18    MPI_FILE_OPEN(\fICOMM\fP,\fI FILENAME\fP,\fI AMODE\fP, \fIINFO\fP,\fI FH\fP,\fI IERROR\fP)
19         CHARACTER*(*)    FILENAME
20         INTEGER      COMM, AMODE, INFO, FH, IERROR
21
22.SH C++ Syntax
23.nf
24#include <mpi.h>
25static MPI::File MPI::File::Open(const MPI::Intracomm& \fIcomm\fP,
26        const char* \fIfilename\fP, int \fIamode\fP, const MPI::Info& \fIinfo\fP)
27
28.SH INPUT PARAMETERS
29.ft R
30.TP 1i
31comm 
32Communicator (handle).
33.TP 1i
34filename
35Name of file to open (string).
36.TP 1i
37amode
38File access mode (integer).
39.TP 1i
40info
41Info object (handle).
42
43.SH OUTPUT PARAMETERS
44.ft R
45.TP 1i
46fh   
47New file handle (handle).
48.TP 1i
49IERROR
50Fortran only: Error status (integer).
51
52.SH DESCRIPTION
53.ft R
54MPI_File_open opens the file identified by the filename
55.I
56filename
57on all processes in the
58.I comm
59communicator group. MPI_File_open is a collective routine; all processes
60must provide the same value for
61.I amode,
62and all processes must provide filenames that reference the same
63file and which are textually identical. A process can open a file
64independently of other processes by using the MPI_COMM_SELF
65communicator. The file handle returned,
66.I fh,
67can be subsequently used to access the file until the file is closed
68using MPI_File_close. Before calling MPI_Finalize, the user is required to
69close (via MPI_File_close) all files that were opened with MPI_File_open. Note
70that the communicator
71.I comm
72is unaffected by MPI_File_open and continues to be usable in all MPI
73routines. Furthermore, use of
74.I comm
75will not interfere with I/O behavior.
76.sp
77Initially, all processes view the file as a linear byte stream; that is, the
78.I etype
79and
80.I filetype
81are both MPI_BYTE. The file view can be changed via the MPI_File_set_view routine.
82.sp
83The following access modes are supported (specified in amode, in a bit-vector OR in one of the following integer constants):
84.TP .5i
85  o 
86MPI_MODE_APPEND
87.TP .5i
88  o
89MPI_MODE_CREATE -- Create the file if it does not exist.
90.TP .5i
91  o 
92MPI_MODE_DELETE_ON_CLOSE
93.TP .5i
94  o 
95MPI_MODE_EXCL -- Error creating a file that already exists.
96.TP .5i
97  o 
98MPI_MODE_RDONLY -- Read only.
99.TP .5i
100  o
101MPI_MODE_RDWR -- Reading and writing.
102.TP .5i
103  o 
104MPI_MODE_SEQUENTIAL
105.TP .5i
106  o
107MPI_MODE_WRONLY -- Write only.
108.TP .5i
109  o 
110MPI_MODE_UNIQUE_OPEN
111.RE
112.sp
113The modes MPI_MODE_RDONLY, MPI_MODE_RDWR, MPI_MODE_WRONLY, and MPI_MODE_CREATE have
114identical semantics to their POSIX counterparts. It is erroneous to
115specify MPI_MODE_CREATE in conjunction with MPI_MODE_RDONLY. Errors related to
116the access mode are raised in the class MPI_ERR_AMODE.
117.sp
118On single-node clusters, files are opened by default using nonatomic mode file consistency
119semantics. The more stringent atomic-mode consistency semantics, required for atomicity of overlapping accesses, are the default when processors in a communicator group reside on more than one node.
120This setting can be changed using
121MPI_File_set_atomicity.
122.sp
123The MPI_File_open interface allows the user to pass information via the \fIinfo\fP argument. It can be set to MPI_INFO_NULL. See the HINTS section for a list of hints that can be set.
124
125.SH HINTS
126.ft R
127The following hints can be used as values for the \fIinfo\fP argument.
128.sp
129SETTABLE HINTS:
130.sp
131- MPI_INFO_NULL
132.sp
133- shared_file_timeout: Amount of time (in seconds) to wait for access to the
134shared file pointer before exiting with MPI_ERR_TIMEDOUT.
135.sp
136- rwlock_timeout: Amount of time (in seconds) to wait for obtaining a read or
137write lock on a contiguous chunk of a UNIX file before exiting with MPI_ERR_TIMEDOUT.
138.sp
139- noncoll_read_bufsize:  Maximum size of the buffer used by
140MPI I/O to satisfy multiple noncontiguous read requests in
141the noncollective data-access routines. (See NOTE, below.)
142.sp
143- noncoll_write_bufsize: Maximum size of the buffer used by
144MPI I/O to satisfy multiple noncontiguous write requests in
145the noncollective data-access routines. (See NOTE, below.)
146.sp
147- coll_read_bufsize:  Maximum size of the buffer used by MPI
148I/O to satisfy multiple noncontiguous read requests in the
149collective data-access routines. (See NOTE, below.)
150.sp
151- coll_write_bufsize:  Maximum size of the buffer used by MPI
152I/O to satisfy multiple noncontiguous write requests in the
153collective data-access routines. (See NOTE, below.)
154.sp
155NOTE: A buffer size smaller than the distance (in bytes) in a UNIX file between the first byte and the last byte of the access request causes MPI I/O to iterate and perform multiple UNIX read() or write() calls. If the request includes multiple noncontiguous chunks of data, and the buffer size is greater than the size of those chunks, then the UNIX read() or write() (made at the MPI I/O level) will access data not requested by this process in order to reduce the total number of write() calls made. If this is not desirable behavior, you should reduce this buffer size to equal the size of the contiguous chunks within the aggregate request.
156.sp
157- mpiio_concurrency: (boolean) controls whether nonblocking
158I/O routines can bind an extra thread to an LWP.
159.sp
160- mpiio_coll_contiguous: (boolean) controls whether subsequent collective data accesses will request collectively contiguous regions of the file.
161.sp
162NON-SETTABLE HINTS:
163.sp
164- filename: Access this hint to get the name of the file.
165
166.SH ERRORS
167Almost 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.
168.sp
169Before the error value is returned, the current MPI error handler is
170called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. 
171
Note: See TracBrowser for help on using the repository browser.