mpi4py.MPI.File
- class mpi4py.MPI.File
Bases:
object
File handle
Methods Summary
Call_errhandler
(errorcode)Call the error handler installed on a file
Close
()Close a file
Create_errhandler
(errhandler_fn)Create a new error handler for files
Delete
(filename[, info])Delete a file
Return the file access mode
Return the atomicity mode
Get_byte_offset
(offset)Return the absolute byte position in the file corresponding to 'offset' etypes relative to the current view
Get the error handler for a file
Return the group of processes that opened the file
Get_info
()Return the hints for a file that that are currently in use
Return the current position of the individual file pointer in etype units relative to the current view
Return the current position of the shared file pointer in etype units relative to the current view
Get_size
()Return the file size
Get_type_extent
(datatype)Return the extent of datatype in the file
Get_view
()Return the file view
Iread
(buf)Nonblocking read using individual file pointer
Iread_all
(buf)Nonblocking collective read using individual file pointer
Iread_at
(offset, buf)Nonblocking read using explicit offset
Iread_at_all
(offset, buf)Nonblocking collective read using explicit offset
Iread_shared
(buf)Nonblocking read using shared file pointer
Iwrite
(buf)Nonblocking write using individual file pointer
Iwrite_all
(buf)Nonblocking collective write using individual file pointer
Iwrite_at
(offset, buf)Nonblocking write using explicit offset
Iwrite_at_all
(offset, buf)Nonblocking collective write using explicit offset
Iwrite_shared
(buf)Nonblocking write using shared file pointer
Open
(comm, filename[, amode, info])Open a file
Preallocate
(size)Preallocate storage space for a file
Read
(buf[, status])Read using individual file pointer
Read_all
(buf[, status])Collective read using individual file pointer
Read_all_begin
(buf)Start a split collective read using individual file pointer
Read_all_end
(buf[, status])Complete a split collective read using individual file pointer
Read_at
(offset, buf[, status])Read using explicit offset
Read_at_all
(offset, buf[, status])Collective read using explicit offset
Read_at_all_begin
(offset, buf)Start a split collective read using explict offset
Read_at_all_end
(buf[, status])Complete a split collective read using explict offset
Read_ordered
(buf[, status])Collective read using shared file pointer
Read_ordered_begin
(buf)Start a split collective read using shared file pointer
Read_ordered_end
(buf[, status])Complete a split collective read using shared file pointer
Read_shared
(buf[, status])Read using shared file pointer
Seek
(offset[, whence])Update the individual file pointer
Seek_shared
(offset[, whence])Update the shared file pointer
Set_atomicity
(flag)Set the atomicity mode
Set_errhandler
(errhandler)Set the error handler for a file
Set_info
(info)Set new values for the hints associated with a file
Set_size
(size)Set the file size
Set_view
([disp, etype, filetype, datarep, info])Set the file view
Sync
()Causes all previous writes to be transferred to the storage device
Write
(buf[, status])Write using individual file pointer
Write_all
(buf[, status])Collective write using individual file pointer
Write_all_begin
(buf)Start a split collective write using individual file pointer
Write_all_end
(buf[, status])Complete a split collective write using individual file pointer
Write_at
(offset, buf[, status])Write using explicit offset
Write_at_all
(offset, buf[, status])Collective write using explicit offset
Write_at_all_begin
(offset, buf)Start a split collective write using explict offset
Write_at_all_end
(buf[, status])Complete a split collective write using explict offset
Write_ordered
(buf[, status])Collective write using shared file pointer
Write_ordered_begin
(buf)Start a split collective write using shared file pointer
Write_ordered_end
(buf[, status])Complete a split collective write using shared file pointer
Write_shared
(buf[, status])Write using shared file pointer
f2py
(arg)py2f
()Attributes Summary
file access mode
file group
file info
file size
Methods Documentation
- Call_errhandler(errorcode)
Call the error handler installed on a file
- classmethod Create_errhandler(errhandler_fn)
Create a new error handler for files
- Parameters:
- Return type:
- classmethod Delete(filename, info=INFO_NULL)
Delete a file
- Get_byte_offset(offset)
Return the absolute byte position in the file corresponding to ‘offset’ etypes relative to the current view
- Get_errhandler()
Get the error handler for a file
- Return type:
- Get_position()
Return the current position of the individual file pointer in etype units relative to the current view
- Return type:
Return the current position of the shared file pointer in etype units relative to the current view
- Return type:
- Get_type_extent(datatype)
Return the extent of datatype in the file
- Iread(buf)
Nonblocking read using individual file pointer
- Iread_all(buf)
Nonblocking collective read using individual file pointer
- Iread_at(offset, buf)
Nonblocking read using explicit offset
- Iread_at_all(offset, buf)
Nonblocking collective read using explicit offset
- Iwrite(buf)
Nonblocking write using individual file pointer
- Iwrite_all(buf)
Nonblocking collective write using individual file pointer
- Iwrite_at(offset, buf)
Nonblocking write using explicit offset
- Iwrite_at_all(offset, buf)
Nonblocking collective write using explicit offset
- classmethod Open(comm, filename, amode=MODE_RDONLY, info=INFO_NULL)
Open a file
- Read(buf, status=None)
Read using individual file pointer
- Read_all(buf, status=None)
Collective read using individual file pointer
- Read_all_begin(buf)
Start a split collective read using individual file pointer
- Read_all_end(buf, status=None)
Complete a split collective read using individual file pointer
- Read_at(offset, buf, status=None)
Read using explicit offset
- Read_at_all(offset, buf, status=None)
Collective read using explicit offset
- Read_at_all_begin(offset, buf)
Start a split collective read using explict offset
- Read_at_all_end(buf, status=None)
Complete a split collective read using explict offset
- Read_ordered(buf, status=None)
Collective read using shared file pointer
- Read_ordered_begin(buf)
Start a split collective read using shared file pointer
- Read_ordered_end(buf, status=None)
Complete a split collective read using shared file pointer
Read using shared file pointer
- Seek(offset, whence=SEEK_SET)
Update the individual file pointer
- Set_errhandler(errhandler)
Set the error handler for a file
- Parameters:
errhandler (Errhandler) –
- Return type:
- Set_info(info)
Set new values for the hints associated with a file
- Set_view(disp=0, etype=BYTE, filetype=None, datarep='native', info=INFO_NULL)
Set the file view
- Write(buf, status=None)
Write using individual file pointer
- Write_all(buf, status=None)
Collective write using individual file pointer
- Write_all_begin(buf)
Start a split collective write using individual file pointer
- Write_all_end(buf, status=None)
Complete a split collective write using individual file pointer
- Write_at(offset, buf, status=None)
Write using explicit offset
- Write_at_all(offset, buf, status=None)
Collective write using explicit offset
- Write_at_all_begin(offset, buf)
Start a split collective write using explict offset
- Write_at_all_end(buf, status=None)
Complete a split collective write using explict offset
- Write_ordered(buf, status=None)
Collective write using shared file pointer
- Write_ordered_begin(buf)
Start a split collective write using shared file pointer
- Write_ordered_end(buf, status=None)
Complete a split collective write using shared file pointer
Write using shared file pointer
Attributes Documentation
- amode
file access mode
- atomicity
- group
file group
- info
file info
- size
file size