MPI_File_iread - Performs a nonblocking read using an
individual file pointer
SYNOPSIS
C:
#include "mpi.h"
int MPI_File_iread (MPI_File fh, void *buf,
int count, MPI_Datatype datatype, MPIO_Request *request)
Fortran:
INCLUDE "mpif.h" (or USE MPI)
<type> BUF(*)
INTEGER fh, count, datatype, request,
ierror
CALL MPI_FILE_IREAD(fh, buf, count, datatype,
request, ierror)
DESCRIPTION
MPI_File_iread is a nonblocking version of the
MPI_FILE_READ interface.
MPI_File_iread accepts the following arguments:
fh Specifies the file handle (handle)
count Specifies the number of elements in the buffer
(nonnegative integer)
datatype Specifies the datatype of each buffer element
(handle)
buf Returns the initial address of the buffer
(choice)
request Returns the request object (handle)
ierror Specifies the return code value for successful
completion, which is in MPI_SUCCESS.
MPI_SUCCESS is defined in the mpif.h file.
Limitations
In Fortran and C, the routines MPIO_Wait and MPIO_Test
must be used instead of MPI_Wait and MPI_Test,
respectively. This is a nonstandard restriction and might
change in an upcoming release.
All MPI objects (for example, MPI_Datatype, MPI_Comm,
MPI_File) are of type INTEGER.
EXAMPLES
The following Fortran code fragment illustrates file
pointer update semantics:
! Read the first twenty real words in a file into two local
! buffers. Note that when the first MPI_FILE_IREAD returns,
! the file pointer has been updated to point to the
! eleventh real word in the file.
integer bufsize, req1, req2
integer, dimension(MPI_STATUS_SIZE) :: status1, status2
parameter (bufsize=10)
real buf1(bufsize), buf2(bufsize)
call MPI_FILE_OPEN( MPI_COMM_WORLD, 'myoldfile', &
MPI_MODE_RDONLY, MPI_INFO_NULL, myfh, ierr )
call MPI_FILE_SET_VIEW( myfh, 0, MPI_REAL, MPI_REAL, 'native', &
MPI_INFO_NULL, ierr )
call MPI_FILE_IREAD( myfh, buf1, bufsize, MPI_REAL, &
req1, ierr )
call MPI_FILE_IREAD( myfh, buf2, bufsize, MPI_REAL, &
req2, ierr )
call MPIO_WAIT( req1, status1, ierr )
call MPIO_WAIT( req2, status2, ierr )
call MPI_FILE_CLOSE( myfh, ierr )
SEE ALSO
MPI_File_close(3), MPI_File_open(3), MPI_File_read(3),
MPI_File_set_view(3), MPI_IO(3)
Man(1) output converted with
man2html