If this zone has no elements on this processor, then it must still call cgp_elements_read_data or cgp_elements_write_data in order for the collectives down in the HDF5 library to work correctly (calls an MPI_Allreduce and possibly other collectives). Therefore, only check for valid data range if the 'elements' pointer is non-null.
This is similar to what is done in cgp_coord_write_data and cgp_coord_read_data at lines 369 and 320.
Potential fix suggested at https://github.com/CGNS/CGNS/pull/21
cgns library built with parallel enabled