Scopes

A scope is a collection of persistent object tables that belong to a single file. A file always has one top-level scope called “SAF” which is returned when the file is opened (see ss_file_open), but may have any number of additional scopes. Each scope is associated with a communicator which is a subset of the communicator for file containing the scope, and that communicator defines what tasks “own” the scope. Operations that open, close, or create scopes are generally collective over the file communicator; operations that modify the contents of a scope are generally collective over the scope communicator; operations that simply access the scope are generally independent.

Scopes satisfy a number of design goals:

  • Scopes minimize communication by isolating certain objects to a subset of MPI_COMM_WORLD.
  • Scopes provide a mechanism for controlled partial reads of the SAF metadata.
  • Scopes provide a framework for transient objects.
  • Scopes will allow for a crude form of object deletion but at a finer granularity than entire files.
  • Scopes turn SAF’s auxiliary files into standalone SAF databases.

A scope is a type of persistent object pointed to by a variable of type ss_scope_t (see *Persistent Objects*). As such, a scope is simply an entry in a table that gets written to a file. Each file has only one scope table, called /SAF/Scopes. That is, only the top-level scope contains a Scopes table and the first entry in that table is always the top-level scope itself, /SAF.

Since a scope is a persistent object, scopes are created, modified, destroyed, and queried just like any other persistent object. However, since a scope is also part of the file infrastructure, additional operations are defined and documented in this chapter.