Write pending data to file¶
ss_scope_flush
is a function defined in ssscope.c.
Synopsis:
-
herr_t
ss_scope_flush
(ss_scope_t *scope, unsigned tableidx, ss_prop_t UNUSED *props)¶
Formal Arguments:
scope
: A link to the open scope to be flushed.tableidx
: Magic number to define which table to flush, orSS_TABLE_ALL
props
: Scope flushing properties (none defined yet)
Description: Flushing a scope causes all of its tables to be written to HDF5. It does not include synchronizing the tables or telling HDF5 to flush its cached data to the file or telling the operating system to flush dirty blocks to disk. That can be done with code similar to the following:
1 2 | ss_scope_flush(scope, SS_MAGIC(ss_field_t), properties);
H5Fflush(ss_scope_isopen(scope), H5F_SCOPE_GLOBAL); // flushes the whole hdf5 file and all mounts
|
Return Value: Returns non-negative on success, negative on failure.
Parallel Notes: Conceptually this function is collective across the scope’s communicator, however because ss_table_write
and
ss_string_flush
are file-collective due to HDF5 API restrictions this function must also be file collective.
Fortunately the scope
argument is available on all tasks of the file which makes this restriction easy to
program around.
Issues: When flushing a specific table the variable length string values are not written to the file.
See Also:
- Scopes: Introduction for current chapter