I/O

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

Data access

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_atFunction.
MPI.File.write_at(file::FileHandle, offset::Integer, data)

Writes data to file at position offset. data can be a Buffer, or any object for which Buffer_send(data) is defined.

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