netcdf-c/libhdf5/hdf5err.h
Dennis Heimbigner d2316f866c Additional Fixes to NCZarr
Primary Fixes:
* Add a whole variable optimization -- used in the rare case that nc_get/put_vara covers the whole of a variable and the variable has a single chunk.
* Fix chunking error when stride causes whole chunks to be skipped.
* Fix some memory leaks
* Add test cases
* Add one performance test to nczarr_test/. This uses the timer utils from unit_test: timer_utils.[ch].
* Move ncdumpchunks utility from ncdump to nczarr_test

Misc. Other Changes:
* Make check for aws libraries conditional on --enable-nczarr-s3
* Remove all but one bm tests from nczarr_test until they are working.
* Remove another dependency on HDF5 from supposedly non-HDF5 specific code; specifically hdf5_log_hdf5.
* Make the BAIL2 macro be hdf5 specific and replace elsewhere with an HDF5 independent equivalent.
* Move hdf5cache.c to libsrc4/nc4cache.c because it is used by nczarr.
* Modify unit_tests so that some of them are run even if using Windows.
* Misc. small bug fixes and refactors and memory leaks.
* Rename some conflicting tests for cmake.
* Attempted to make nc_perf work with cmake and failed.
2020-12-16 20:48:02 -07:00

35 lines
888 B
C

/*********************************************************************
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
*********************************************************************/
#ifndef HDF5ERR_H
#define HDF5ERR_H
#ifdef LOGGING
/* BAIL2 was moved here from nc_logging.h because
it invokes nc_log_hdf5, and so is HDF5 specific.
Also moved nc_log_hdf5 into hdf5internal.c
*/
/* To log based on error code, and set retval. */
/* Note that this can only be used in libhdf5 because of
the call to nc_log_hdf5 */
#define BAIL2(e) \
do { \
retval = e; \
LOG((0, "file %s, line %d.\n%s", __FILE__, __LINE__, nc_strerror(e))); \
nc_log_hdf5(); \
} while (0)
#else /* LOGGING */
#define BAIL2(e) \
do { \
retval = e; \
} while (0)
#endif /*LOGGING*/
#endif /*HDF5ERR_H*/