Page tree

The license could not be verified: License Certificate has expired!

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »









Control the loading of dynamic plugins.




herr_t H5PLset_loading_state( int plugin_flags )

int plugin_flags    IN: The list of dynamic plugin types to enable or disable. 
A plugin bit set to 0 (zero) prevents use of that dynamic plugin. 
A plugin bit set to 1 (one) enables use of that dynamic plugin.

Setting plugin_flags to a negative value enables all dynamic plugins. 
Setting plugin_flags to 0 (zero) disables all dynamic plugins.



The loading of external dynamic plugins can be controlled during runtime with an environment variable, HDF5_PLUGIN_PRELOAD. The environment variable can control the loading of dynamic filters at runtime, but it will disable it for all running programs that access that variable using the library.

H5PLset_loading_state controls the loading of external dynamic plugins during program execution.


H5PLset_loading_state uses one argument to enable or disable individual plugins.

The plugin_flags parameter is an encoded integer in which each bit controls a specific plugin or class of plugins. Bit positions allocated to date are listed in the “Plugin Type/Bit Position” table below.

A plugin bit set to 0 (zero) prevents the use of the dynamic plugin corresponding to that bit position. A plugin bit set to 1 (one) allows the use of that dynamic plugin.

All dynamic plugins can be enabled by setting plugin_flags to a negative value. A value of 0 (zero) will disable all dynamic plugins.

H5PLset_loading_state inspects the HDF5_PLUGIN_PRELOAD environment variable every time it is called. If the environment variable is set to the special :: string, all dynamic plugins will be disabled.


The classes of plugins subject to programmatic control are specified in the H5PL_type_t ENUM. Since only dynamically loaded filter plugins are currently subject to programmatic control, only one plugin type is defined:

    Plugin TypeBit Position

Additional values may be added to the H5PL_type_t ENUM as programmatic control is implemented for other plugin types.


Returns a non-negative value if successful; otherwise returns a negative value.

/* Disable plugin X: Requires user to negate the state 
 * with a 0 in bit position X and AND it with the result 
 * from an H5PLget_loading_state call. */

int new_setting = curr_setting & ~H5PL_FILTER_PLUGIN ;
H5PLset_loading_state (new_setting);

examples / h5_subset.c [32:42]  1.10/master  HDFFV/hdf5
main (void)
    hsize_t     dims[2], dimsm[2];   
    int         data[DIM0][DIM1];           /* data to write */
    int         sdata[DIM0_SUB][DIM1_SUB];  /* subset to write */
    int         rdata[DIM0][DIM1];          /* buffer for read */
    hid_t       file_id, dataset_id;        /* handles */
    hid_t       dataspace_id, memspace_id; 


     USE HDF5 ! This module contains all necessary modules


     CHARACTER(LEN=11), PARAMETER :: filename = "compound.h5" ! File name
     CHARACTER(LEN=8), PARAMETER :: dsetname = "Compound"     ! Dataset name
     INTEGER, PARAMETER :: dimsize = 6 ! Size of the dataset

     INTEGER(HID_T) :: file_id       ! File identifier

c++ / examples / create.cpp [33:43]  1.10/master  HDFFV/hdf5
int main (void)
    * Data initialization.
   int i, j;
   int data[NX][NY];          // buffer for data to write
   for (j = 0; j < NX; j++)
      for (i = 0; i < NY; i++)

public class H5Ex_D_Chunk {
    private static String FILENAME = "H5Ex_D_Chunk.h5";
    private static String DATASETNAME = "DS1";
    private static final int DIM_X = 6;
    private static final int DIM_Y = 8;
    private static final int CHUNK_X = 4;
    private static final int CHUNK_Y = 4;
    private static final int RANK = 2;
    private static final int NDIMS = 2;

Release    C
1.8.15Function introduced in this release.

--- Last Modified: November 15, 2017 | 07:50 AM