I/O

File manipulation

MPI.File.openFunction
MPI.File.open(comm::Comm, filename::AbstractString; keywords...)

Open the file identified by filename. This is a collective operation on comm.

Supported keywords are as follows:

  • read, write, create, append have the same behaviour and defaults as Base.open.
  • sequential: file will only be accessed sequentially (default: false)
  • uniqueopen: file will not be concurrently opened elsewhere (default: false)
  • deleteonclose: delete file on close (default: false)

Any additional keywords are passed via an Info object, and are implementation dependent.

External links

source

Views

MPI.File.set_view!Function
MPI.File.set_view!(file::FileHandle, disp::Integer, etype::Datatype, filetype::Datatype, datarep::AbstractString; kwargs...)

Set the current process's view of file.

The start of the view is set to disp; the type of data is set to etype; the distribution of data to processes is set to filetype; and the representation of data in the file is set to datarep: one of "native" (default), "internal", or "external32".

External links

source
MPI.File.get_byte_offsetFunction
MPI.File.get_byte_offset(file::FileHandle, offset::Integer)

Converts a view-relative offset into an absolute byte position. Returns the absolute byte position (from the beginning of the file) of offset relative to the current view of file.

External links

source

Consistency

MPI.File.syncFunction
MPI.File.sync(fh::FileHandle)

A collective operation causing all previous writes to fh by the calling process to be transferred to the storage device. If other processes have made updates to the storage device, then all such updates become visible to subsequent reads of fh by the calling process.

External links

source
MPI.File.get_atomicityFunction
MPI.File.get_atomicity(file::FileHandle)

Get the consistency option for the fh. If false it is non-atomic.

External links

source

Data access

Individual pointer

MPI.File.read_all!Function
MPI.File.read_all!(file::FileHandle, data)

Reads current view of file into data. data can be a Buffer, or any object for which Buffer(data) is defined. This is a collective operation, so must be called on all ranks in the communicator on which file was opened.

See also

External links

source
MPI.File.write_allFunction
MPI.File.write_all(file::FileHandle, data)

Writes data to the current view of file. data can be a Buffer, or any object for which Buffer_send(data) is defined. This is a collective operation, so must be called on all ranks in the communicator on which file was opened.

See also

External links

source

Explicit offsets

MPI.File.read_at!Function
MPI.File.read_at!(file::FileHandle, offset::Integer, data)

Reads from file at position offset into data. data can be a Buffer, or any object for which Buffer(data) is defined.

See also

External links

source
MPI.File.read_at_all!Function
MPI.File.read_at_all!(file::FileHandle, offset::Integer, data)

Reads from file at position offset into data. data can be a Buffer, or any object for which Buffer(data) is defined. This is a collective operation, so must be called on all ranks in the communicator on which file was opened.

See also

External links

source
MPI.File.write_at_allFunction
MPI.File.write_at_all(file::FileHandle, offset::Integer, data)

Writes from data to file at position offset. data can be a Buffer, or any object for which Buffer_send(data) is defined. This is a collective operation, so must be called on all ranks in the communicator on which file was opened.

See also

External links

source

Shared pointer

MPI.File.read_ordered!Function
MPI.File.read_ordered!(file::FileHandle, data)

Collectively reads in rank order from file using the shared file pointer into data. data can be a Buffer, or any object for which Buffer(data) is defined. This is a collective operation, so must be called on all ranks in the communicator on which file was opened.

See also

External links

source
MPI.File.write_orderedFunction
MPI.File.write_ordered(file::FileHandle, data)

Collectively writes in rank order to file using the shared file pointer from data. data can be a Buffer, or any object for which Buffer(data) is defined. This is a collective operation, so must be called on all ranks in the communicator on which file was opened.

See also

External links

source
MPI.File.seek_sharedFunction
MPI.File.seek_shared(file::FileHandle, offset::Integer, whence::Seek=SEEK_SET)

Updates the shared file pointer according to whence, which has the following possible values:

  • MPI.File.SEEK_SET (default): the pointer is set to offset
  • MPI.File.SEEK_CUR: the pointer is set to the current pointer position plus offset
  • MPI.File.SEEK_END: the pointer is set to the end of file plus offset

This is a collective operation, and must be called with the same value on all processes in the communicator.

External links

source
MPI.File.get_position_sharedFunction
MPI.File.get_position_shared(file::FileHandle)

The current position of the shared file pointer (in etype units) relative to the current view.

External links

source