Write pending data to file

ss_file_flush is a function defined in ssfile.c.

Synopsis:

herr_t ss_file_flush(ss_file_t *file, ss_prop_t *props)

Formal Arguments:

  • file: The file to be flushed.
  • props: Flushing properties. See ss_scope_flush.

Description: As objects are created or modified the library caches changes in memory to prevent repeatedly writing to disk. This function writes that data to disk. However, to reduce the amount of communication necessary in cases where the caller knows the file is synchronized, the various data flushing functions do not synchronize first, so the caller should invoke ss_file_synchronize. The flushing functions also do not generally guarantee that the data is flushed from HDF5 to the underlying file.

Flushing a transient file is a no-op.

The ss_file_close function both synchronizes and flushes.

Return Value: Returns non-negative on success, negative on failure. It is an error to attempt to flush a file which is not open.

Parallel Notes: Collective across the file’s communicator (see ss_file_open).

Example: The following code flushes data to HDF5 and then tells HDF5 to flush its data to the file:

1
2
3
4
5
 ss_file_t file = ss_file_open(....);
 ....
 ss_file_synchronize(file);
 ss_file_flush(file, NULL);
 H5Fflush(ss_file_isopen(file), H5F_SCOPE_GLOBAL);

See Also: