Last modified: 18 June 2013
Name: H5Pset_fclose_degree
Signature:
  herr_t `H5Pset_fclose_degree`( hid_t `fapl_id`, H5F_close_degree_t `fc_degree` )

Purpose:
  Sets the file close degree.

Description:
  `H5Pset_fclose_degree` sets the file close degree property `fc_degree` in the file access property list `fapl_id`.

  The value of `fc_degree` determines how aggressively `H5Fclose` deals with objects within a file that remain open when `H5Fclose` is called to close that file. `fc_degree` can have any one of four valid values:

  Degree name | `H5Fclose` behavior with no open object in file | `H5Fclose` behavior with open object(s) in file
  --- | --- | ---
  `H5F_CLOSE_WEAK` | Actual file is closed. | Access to file identifier is terminated; actual file close is delayed until all objects in file are closed
  `H5F_CLOSE_SEMI` | Actual file is closed. | Function returns FAILURE
  `H5F_CLOSE_STRONG` | Actual file is closed. | All open objects remaining in the file are closed then file is closed
  `H5F_CLOSE_DEFAULT` | The VFL driver chooses the behavior. Currently, all VFL drivers set this value to `H5F_CLOSE_WEAK`, except for the MPI-I/O driver, which sets it to `H5F_CLOSE_SEMI`.

  Note that if a file is opened multiple times without being closed, each open operation must use the same file close degree setting. For example, if a file is already open with `H5F_CLOSE_WEAK`, an `H5Fopen` call with `H5F_CLOSE_STRONG` will fail.

Parameters:

  hid_t `fapl_id` | IN: File access property list identifier.
  H5F_close_degree_t `fc_degree` | IN: Pointer to a location containing the file close degree property, the value of `fc_degree`.

Returns:
  Returns a non-negative value if successful. Otherwise returns a negative value.

Fortran90 Interface: h5pset_fclose_degree_f

      SUBROUTINE h5pset_fclose_degree_f(fapl_id, degree, hdferr)
        IMPLICIT NONE
        INTEGER(HID_T), INTENT(IN) :: fapl_id  ! File access property list identifier
        INTEGER, INTENT(IN) :: degree          ! Info about file close behavior
                                               ! Possible values:
                                               !    H5F_CLOSE_DEFAULT_F
                                               !    H5F_CLOSE_WEAK_F
                                               !    H5F_CLOSE_SEMI_F
                                               !    H5F_CLOSE_STRONG_F
        INTEGER, INTENT(OUT) :: hdferr         ! Error code
                                               ! 0 on success and -1 on failure
      END SUBROUTINE h5pset_fclose_degree_f

History:

  Release | C
  1.6.0 | Function introduced in this release.