mpi4py.MPI.File
- class mpi4py.MPI.File
Bases:
objectFile I/O context.
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.
Get the error handler for a file.
Access the group of processes that opened the file.
Get_info()Return the current hints for a file.
Return the current position of the individual file pointer.
Return the current position of the shared file pointer.
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 explicit offset.
Read_at_all_end(buf[, status])Complete a split collective read using explicit 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 explicit offset.
Write_at_all_end(buf[, status])Complete a split collective write using explicit 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)free()Call
Closeif not null.fromhandle(handle)Create object from MPI handle.
fromint(arg, /)Translate integer handle to object.
py2f()toint()Translate object to integer handle.
Attributes Summary
Access mode.
Atomicity mode.
Group.
Group rank.
Group size.
MPI handle.
Info hints.
Size (in bytes).
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.
Note
Input offset is measured in etype units relative to the current file view.
- Get_errhandler()
Get the error handler for a file.
- Return type:
- Get_position()
Return the current position of the individual file pointer.
Note
Position is measured in etype units relative to the current file view.
- Return type:
Return the current position of the shared file pointer.
Note
Position is measured 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 explicit offset.
- Read_at_all_end(buf, status=None)
Complete a split collective read using explicit 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.
- 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 explicit offset.
- Write_at_all_end(buf, status=None)
Complete a split collective write using explicit 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.
- classmethod fromhandle(handle)
Create object from MPI handle.
- classmethod fromint(arg, /)
Translate integer handle to object.
Attributes Documentation
- amode
Access mode.
- atomicity
Atomicity mode.
- group
Group.
- group_rank
Group rank.
- group_size
Group size.
- handle
MPI handle.
- info
Info hints.
- size
Size (in bytes).