{
  "slug": "mpi-file-view",
  "term": "MPI file view",
  "aliases": [
    "MPI-IO file view",
    "MPI_File_set_view"
  ],
  "definition": "An MPI file view selects an ordered sequence of elementary data items from a file using a byte displacement and a repeating datatype pattern.",
  "note": "Coordinates: disp is an absolute byte displacement, but an I/O offset counts etypes visible through the view and skips holes. Offset zero is the first visible etype, which need not start at disp. MPI_File_get_byte_offset converts a view-relative offset to an absolute byte position. [definitions][position]\n\nRepetition: the filetype repeats at its extent, not its payload size. With disp 128 bytes, contiguous four-byte etypes at positions 0 and 8, and filetype extent 16 bytes, offsets 0, 1, 2 map to bytes 128, 136, 144. An extent of 12 instead maps offset 2 to byte 140. [definitions][extent][example]\n\nMPI_File_set_view is collective and resets individual and shared file pointers to zero. Processes may use different displacements and filetypes, but must agree on datarep and the file-representation extent of etype. The supplied datatypes must be committed. [views]\n\nThe view describes file layout; a read or write has a separate memory-buffer datatype. Explicit-offset operations do not advance file pointers. MPI_File_read_at_all combines an explicit view-relative offset with collective participation. [access]\n\nExposing a full noncontiguous request enables optimizations such as data sieving and collective buffering. A view does not guarantee fewer device requests or faster execution, and is not a physical disk map. [romio]",
  "status": "research",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-12-02",
  "related": [
    "collective-io",
    "two-phase-io"
  ],
  "citations": [
    {
      "id": "definitions",
      "title": "MPI 4.1, I/O definitions: displacement, etype, filetype, view and offset",
      "url": "https://www.mpi-forum.org/docs/mpi-4.1/mpi41-report/node350.htm",
      "accessed": "2026-12-02"
    },
    {
      "id": "position",
      "title": "MPI 4.1, Individual file pointers: MPI_File_get_byte_offset",
      "url": "https://www.mpi-forum.org/docs/mpi-4.1/mpi41-report/node369.htm",
      "accessed": "2026-12-02"
    },
    {
      "id": "extent",
      "title": "MPI 4.1, Extent and bounds of datatypes",
      "url": "https://www.mpi-forum.org/docs/mpi-4.1/mpi41-report/node103.htm",
      "accessed": "2026-12-02"
    },
    {
      "id": "views",
      "title": "MPI 4.1, File views: MPI_File_set_view",
      "url": "https://www.mpi-forum.org/docs/mpi-4.1/mpi41-report/node361.htm",
      "accessed": "2026-12-02"
    },
    {
      "id": "access",
      "title": "MPI 4.1, Data access routines and positioning",
      "url": "https://www.mpi-forum.org/docs/mpi-4.1/mpi41-report/node363.htm",
      "accessed": "2026-12-02"
    },
    {
      "id": "romio",
      "title": "Thakur, Gropp and Lusk. Data Sieving and Collective I/O in ROMIO. Frontiers 1999.",
      "url": "https://web.cels.anl.gov/~thakur/papers/romio-coll.pdf",
      "accessed": "2026-12-02"
    },
    {
      "id": "example",
      "title": "Hesela: exact MPI file-view offset example",
      "url": "https://hesela.dev/research/mpi-file-view/README.md",
      "accessed": "2026-12-02"
    }
  ],
  "provenance": [
    "The worked example uses contiguous etypes with equal size and extent. It is exact layout arithmetic, not an MPI implementation test or a performance benchmark.",
    "Semantics are scoped to MPI 4.1. ROMIO 1999 supplies historical optimization context, not a prediction for current hardware."
  ]
}
