Closes a scope¶
ss_scope_close is a function defined in ssscope.c.
Synopsis:
-
herr_t
ss_scope_close(ss_scope_t *scope)¶
Description: Closes the specified scope without totally destroying the memory representation. Specifically, the top-scope’s Scope table is left intact as are the indirect map arrays in all scopes that have them. This is required for the following common scenario:
The application has two files called File-A and File-B. The application creates a new object (e.g., a
quantity) in File-A without using the SS_ALLSAME flag and then creates another object (e.g., a unit) in
File-B that refers to the object in File-A. The application closes File-A which closes all the
scopes in that file. It then attempts to close File-B, which includes a synchronization and a flush.
However, when flushing, SSlib will need to convert a persistent object link from the Memory state to the
Closed state and convert its indirect object index to a direct object index. The only way this can be done is
by having the indirect mappings for the table that contained the object in File-A.
The scope is assumed to already be synchronized and flushed. In fact, it would not even be possible to flush
the scope from this function because doing so may require a call to H5Dextend, which is file collective.
Return Value: Returns non-negative on success; negative on failure.
Parallel Notes: Collective across the scope’s communicator. This is the same set of tasks that originally opened the scope.
See Also:
- Scopes: Introduction for current chapter