Opens a scope

ss_scope_open is a function defined in ssscope.c.

Synopsis:

herr_t ss_scope_open(ss_scope_t *scope, unsigned flags, ss_prop_t *props)

Formal Arguments:

  • scope: A link to a scope object, probably the result of a find operation.
  • flags: Various bit flags to control common scope open switches.
  • props: Scope opening properties (see *Scope Properties*).

Description: Given a link to a scope (i.e., a link to an entry in the top-level Scopes table of some file that is currently open), open the scope. The flags argument determines the mode for opening the scope. The following bits are supported at this time:

H5F_ACC_RDONLY: The scope is opened for read-only access.

H5F_ACC_RDWR: The scope is opened for both read and write access.

H5F_ACC_DEBUG: Turn on scope debugging.

The H5F_ACC_EXCL, H5F_ACC_TRUNC, and H5F_ACC_CREAT bits are not supported by this function because they require participation of all tasks in the file’s communicator, and therefore SSlib separates scope creation from scope opening.

The H5F_ACC_RDWR flag can only be used if the containing file is also H5F_ACC_RDWR.

The scope will be a transient scope if and only if the file was opened with H5F_ACC_TRANSIENT. Therefore this function simply ignores that bit in the flags vector.

Return Value: Returns non-negative on success; negative on failure.

It is an error to open a scope that is already open. However, since the original open might have been performed on a disjoint subset of tasks, the current operation might not be able to detect a duplicate open. If disjoint sets of tasks open the same scope for read-only access and no task has the scope open for writing then things will most likely work properly.

Parallel Notes: Collective across the scope’s communicator, props.comm, defaulting to the same communicator as the file in which the scope exists.

See Also:

  • Scopes: Introduction for current chapter