From e068fa0a34f24a72b191b4c82bdb04eebc61c900 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 23 Aug 2019 12:38:28 -0500 Subject: Fix merge issues for MPI --- config/cmake_ext_mod/runTest.cmake | 23 +- hl/test/gen_test_ds.c | 12 +- src/H5Edefin.h | 238 ++++---- src/H5Einit.h | 774 ++++++++++++------------ src/H5Epubgen.h | 434 +++++++------- src/H5Eterm.h | 238 ++++---- test/CMakeTests.cmake | 6 +- test/cmpd_dset.c | 1155 +++++++++++++++++++----------------- test/dtransform.c | 408 ++++++------- test/err_compat.c | 2 +- test/file_image.c | 1 - test/fillval.c | 786 ++++++++++++------------ test/filter_fail.c | 1 - test/gheap.c | 2 +- test/h5test.c | 24 +- test/hyperslab.c | 4 +- test/istore.c | 18 +- test/lheap.c | 4 +- 18 files changed, 2098 insertions(+), 2032 deletions(-) diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index a904855..21c8c18 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -125,12 +125,31 @@ message (STATUS "COMMAND Error: ${TEST_ERROR}") # remove special output file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) -string (FIND TEST_STREAM "_pmi_alps" "${TEST_FIND_RESULT}") -if (TEST_FIND_RESULT GREATER 0) +string (FIND "${TEST_STREAM}" "_pmi_alps" TEST_FIND_RESULT) +if (TEST_FIND_RESULT GREATER -1) string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_STREAM}) endif () +# remove special error output +if (NOT TEST_ERRREF) + # the error stack has been appended to the output file + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) +else () + # the error stack remains in the .err file + file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) +endif () +string (FIND "${TEST_STREAM}" "no version information available" TEST_FIND_RESULT) +if (TEST_FIND_RESULT GREATER -1) + string (REGEX REPLACE "^.*no version information available[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}") + # write back the changes to the original files + if (NOT TEST_ERRREF) + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + else () + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") + endif () +endif () + # if the output file needs Storage text removed if (TEST_MASK) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) diff --git a/hl/test/gen_test_ds.c b/hl/test/gen_test_ds.c index 273e393..285ab77 100644 --- a/hl/test/gen_test_ds.c +++ b/hl/test/gen_test_ds.c @@ -79,12 +79,12 @@ int main(int argc , char **argv) if (argc < 2) { - printf("Usage: gen_test [le | be]\n"); + HDprintf("Usage: gen_test [le | be]\n"); return 1; } if ( argv[1] && (strcmp("le",argv[1])!=0) && (strcmp("be",argv[1])!=0) ) { - printf("Usage: gen_test [le | be]\n"); + HDprintf("Usage: gen_test [le | be]\n"); return 1; } @@ -103,11 +103,11 @@ int main(int argc , char **argv) nerrors += test_long_scalenames(filename) < 0 ? 1 : 0; if(nerrors) goto error; - printf("Dimension scales file generation passed.\n"); + HDprintf("Dimension scales file generation passed.\n"); return 0; error: - printf("***** %d DIMENSION SCALES FILE GENERATION FAILED! *****\n",nerrors); + HDprintf("***** %d DIMENSION SCALES FILE GENERATION FAILED! *****\n",nerrors); return 1; } @@ -188,11 +188,11 @@ herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int id if(H5DSis_attached(did, dsid, idx) == 0) { if(H5DSattach_scale(did, dsid, idx) >= 0) { if(H5DSis_attached(did, dsid, idx) > 0) { - /* printf(" scale attached "); */ + /* HDprintf(" scale attached "); */ ret_value = SUCCEED; } else if(H5DSis_attached(did, dsid, idx) == 0) { - printf(" scale not attached "); + HDprintf(" scale not attached "); } } } diff --git a/src/H5Edefin.h b/src/H5Edefin.h index 07d3a8b..7861a2f 100644 --- a/src/H5Edefin.h +++ b/src/H5Edefin.h @@ -19,37 +19,37 @@ #define _H5Edefin_H /* Major error IDs */ -hid_t H5E_IO_g = FAIL; /* Low-level I/O */ -hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */ -hid_t H5E_ATTR_g = FAIL; /* Attribute */ -hid_t H5E_PLIST_g = FAIL; /* Property lists */ -hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */ -hid_t H5E_ERROR_g = FAIL; /* Error API */ -hid_t H5E_STORAGE_g = FAIL; /* Data storage */ -hid_t H5E_OHDR_g = FAIL; /* Object header */ -hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */ +hid_t H5E_FILE_g = FAIL; /* File accessibilty */ +hid_t H5E_PLINE_g = FAIL; /* Data filters */ hid_t H5E_TST_g = FAIL; /* Ternary Search Trees */ -hid_t H5E_DATASET_g = FAIL; /* Dataset */ hid_t H5E_BTREE_g = FAIL; /* B-Tree node */ -hid_t H5E_SLIST_g = FAIL; /* Skip Lists */ +hid_t H5E_HEAP_g = FAIL; /* Heap */ hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */ hid_t H5E_DATASPACE_g = FAIL; /* Dataspace */ -hid_t H5E_DATATYPE_g = FAIL; /* Datatype */ +hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */ +hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */ +hid_t H5E_CACHE_g = FAIL; /* Object cache */ +hid_t H5E_ERROR_g = FAIL; /* Error API */ +hid_t H5E_RESOURCE_g = FAIL; /* Resource unavailable */ hid_t H5E_RS_g = FAIL; /* Reference Counted Strings */ +hid_t H5E_ATTR_g = FAIL; /* Attribute */ +hid_t H5E_EFL_g = FAIL; /* External file list */ +hid_t H5E_PLIST_g = FAIL; /* Property lists */ +hid_t H5E_DATATYPE_g = FAIL; /* Datatype */ +hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */ +hid_t H5E_OHDR_g = FAIL; /* Object header */ +hid_t H5E_SLIST_g = FAIL; /* Skip Lists */ hid_t H5E_ATOM_g = FAIL; /* Object atom */ -hid_t H5E_CACHE_g = FAIL; /* Object cache */ -hid_t H5E_INTERNAL_g = FAIL; /* Internal error (too specific to document in detail) */ +hid_t H5E_STORAGE_g = FAIL; /* Data storage */ hid_t H5E_SYM_g = FAIL; /* Symbol table */ +hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */ +hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */ hid_t H5E_LINK_g = FAIL; /* Links */ -hid_t H5E_HEAP_g = FAIL; /* Heap */ -hid_t H5E_PLINE_g = FAIL; /* Data filters */ -hid_t H5E_EFL_g = FAIL; /* External file list */ +hid_t H5E_INTERNAL_g = FAIL; /* Internal error (too specific to document in detail) */ +hid_t H5E_DATASET_g = FAIL; /* Dataset */ hid_t H5E_REFERENCE_g = FAIL; /* References */ -hid_t H5E_FILE_g = FAIL; /* File accessibilty */ -hid_t H5E_RESOURCE_g = FAIL; /* Resource unavailable */ -hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */ -hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */ -hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */ +hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */ +hid_t H5E_IO_g = FAIL; /* Low-level I/O */ /* Minor error IDs */ @@ -58,17 +58,18 @@ hid_t H5E_CANTINIT_g = FAIL; /* Unable to initialize object */ hid_t H5E_ALREADYINIT_g = FAIL; /* Object already initialized */ hid_t H5E_CANTRELEASE_g = FAIL; /* Unable to release object */ -/* Link related errors */ -hid_t H5E_TRAVERSE_g = FAIL; /* Link traversal failure */ -hid_t H5E_NLINKS_g = FAIL; /* Too many soft links in path */ -hid_t H5E_NOTREGISTERED_g = FAIL; /* Link class not registered */ -hid_t H5E_CANTMOVE_g = FAIL; /* Can't move object */ -hid_t H5E_CANTSORT_g = FAIL; /* Can't sort objects */ +/* Free space errors */ +hid_t H5E_CANTMERGE_g = FAIL; /* Can't merge objects */ +hid_t H5E_CANTREVIVE_g = FAIL; /* Can't revive object */ +hid_t H5E_CANTSHRINK_g = FAIL; /* Can't shrink container */ -/* Parallel MPI errors */ -hid_t H5E_MPI_g = FAIL; /* Some MPI function failed */ -hid_t H5E_MPIERRSTR_g = FAIL; /* MPI Error String */ -hid_t H5E_CANTRECV_g = FAIL; /* Can't receive data */ +/* Heap errors */ +hid_t H5E_CANTRESTORE_g = FAIL; /* Can't restore condition */ +hid_t H5E_CANTCOMPUTE_g = FAIL; /* Can't compute value */ +hid_t H5E_CANTEXTEND_g = FAIL; /* Can't extend heap's space */ +hid_t H5E_CANTATTACH_g = FAIL; /* Can't attach object */ +hid_t H5E_CANTUPDATE_g = FAIL; /* Can't update object */ +hid_t H5E_CANTOPERATE_g = FAIL; /* Can't operate on object */ /* Cache related errors */ hid_t H5E_CANTFLUSH_g = FAIL; /* Unable to flush data from cache */ @@ -87,31 +88,46 @@ hid_t H5E_CANTDIRTY_g = FAIL; /* Unable to mark metadata as dirty */ hid_t H5E_CANTEXPUNGE_g = FAIL; /* Unable to expunge a metadata cache entry */ hid_t H5E_CANTRESIZE_g = FAIL; /* Unable to resize a metadata cache entry */ -/* Argument errors */ -hid_t H5E_UNINITIALIZED_g = FAIL; /* Information is uinitialized */ -hid_t H5E_UNSUPPORTED_g = FAIL; /* Feature is unsupported */ -hid_t H5E_BADTYPE_g = FAIL; /* Inappropriate type */ -hid_t H5E_BADRANGE_g = FAIL; /* Out of range */ -hid_t H5E_BADVALUE_g = FAIL; /* Bad value */ +/* B-tree related errors */ +hid_t H5E_NOTFOUND_g = FAIL; /* Object not found */ +hid_t H5E_EXISTS_g = FAIL; /* Object already exists */ +hid_t H5E_CANTENCODE_g = FAIL; /* Unable to encode value */ +hid_t H5E_CANTDECODE_g = FAIL; /* Unable to decode value */ +hid_t H5E_CANTSPLIT_g = FAIL; /* Unable to split node */ +hid_t H5E_CANTREDISTRIBUTE_g = FAIL; /* Unable to redistribute records */ +hid_t H5E_CANTSWAP_g = FAIL; /* Unable to swap records */ +hid_t H5E_CANTINSERT_g = FAIL; /* Unable to insert object */ +hid_t H5E_CANTLIST_g = FAIL; /* Unable to list node */ +hid_t H5E_CANTMODIFY_g = FAIL; /* Unable to modify record */ +hid_t H5E_CANTREMOVE_g = FAIL; /* Unable to remove object */ -/* Plugin errors */ -hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */ +/* Property list errors */ +hid_t H5E_CANTGET_g = FAIL; /* Can't get value */ +hid_t H5E_CANTSET_g = FAIL; /* Can't set value */ +hid_t H5E_DUPCLASS_g = FAIL; /* Duplicate class name in parent class */ +hid_t H5E_SETDISALLOWED_g = FAIL; /* Disallowed operation */ -/* Generic low-level file I/O errors */ -hid_t H5E_SEEKERROR_g = FAIL; /* Seek failed */ -hid_t H5E_READERROR_g = FAIL; /* Read failed */ -hid_t H5E_WRITEERROR_g = FAIL; /* Write failed */ -hid_t H5E_CLOSEERROR_g = FAIL; /* Close failed */ -hid_t H5E_OVERFLOW_g = FAIL; /* Address overflowed */ -hid_t H5E_FCNTL_g = FAIL; /* File control (fcntl) failed */ +/* File accessibilty errors */ +hid_t H5E_FILEEXISTS_g = FAIL; /* File already exists */ +hid_t H5E_FILEOPEN_g = FAIL; /* File already open */ +hid_t H5E_CANTCREATE_g = FAIL; /* Unable to create file */ +hid_t H5E_CANTOPENFILE_g = FAIL; /* Unable to open file */ +hid_t H5E_CANTCLOSEFILE_g = FAIL; /* Unable to close file */ +hid_t H5E_NOTHDF5_g = FAIL; /* Not an HDF5 file */ +hid_t H5E_BADFILE_g = FAIL; /* Bad file ID accessed */ +hid_t H5E_TRUNCATED_g = FAIL; /* File has been truncated */ +hid_t H5E_MOUNT_g = FAIL; /* File mount error */ -/* Heap errors */ -hid_t H5E_CANTRESTORE_g = FAIL; /* Can't restore condition */ -hid_t H5E_CANTCOMPUTE_g = FAIL; /* Can't compute value */ -hid_t H5E_CANTEXTEND_g = FAIL; /* Can't extend heap's space */ -hid_t H5E_CANTATTACH_g = FAIL; /* Can't attach object */ -hid_t H5E_CANTUPDATE_g = FAIL; /* Can't update object */ -hid_t H5E_CANTOPERATE_g = FAIL; /* Can't operate on object */ +/* Dataspace errors */ +hid_t H5E_CANTCLIP_g = FAIL; /* Can't clip hyperslab region */ +hid_t H5E_CANTCOUNT_g = FAIL; /* Can't count elements */ +hid_t H5E_CANTSELECT_g = FAIL; /* Can't select hyperslab */ +hid_t H5E_CANTNEXT_g = FAIL; /* Can't move to next iterator location */ +hid_t H5E_BADSELECT_g = FAIL; /* Invalid selection */ +hid_t H5E_CANTCOMPARE_g = FAIL; /* Can't compare objects */ + +/* Plugin errors */ +hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */ /* Resource errors */ hid_t H5E_NOSPACE_g = FAIL; /* No space available for allocation */ @@ -125,26 +141,41 @@ hid_t H5E_CANTGC_g = FAIL; /* Unable to garbage collect */ hid_t H5E_CANTGETSIZE_g = FAIL; /* Unable to compute size */ hid_t H5E_OBJOPEN_g = FAIL; /* Object is already open */ -/* I/O pipeline errors */ -hid_t H5E_NOFILTER_g = FAIL; /* Requested filter is not available */ -hid_t H5E_CALLBACK_g = FAIL; /* Callback failed */ -hid_t H5E_CANAPPLY_g = FAIL; /* Error from filter 'can apply' callback */ -hid_t H5E_SETLOCAL_g = FAIL; /* Error from filter 'set local' callback */ -hid_t H5E_NOENCODER_g = FAIL; /* Filter present but encoding disabled */ -hid_t H5E_CANTFILTER_g = FAIL; /* Filter operation failed */ +/* Argument errors */ +hid_t H5E_UNINITIALIZED_g = FAIL; /* Information is uinitialized */ +hid_t H5E_UNSUPPORTED_g = FAIL; /* Feature is unsupported */ +hid_t H5E_BADTYPE_g = FAIL; /* Inappropriate type */ +hid_t H5E_BADRANGE_g = FAIL; /* Out of range */ +hid_t H5E_BADVALUE_g = FAIL; /* Bad value */ -/* Dataspace errors */ -hid_t H5E_CANTCLIP_g = FAIL; /* Can't clip hyperslab region */ -hid_t H5E_CANTCOUNT_g = FAIL; /* Can't count elements */ -hid_t H5E_CANTSELECT_g = FAIL; /* Can't select hyperslab */ -hid_t H5E_CANTNEXT_g = FAIL; /* Can't move to next iterator location */ -hid_t H5E_BADSELECT_g = FAIL; /* Invalid selection */ -hid_t H5E_CANTCOMPARE_g = FAIL; /* Can't compare objects */ +/* No error */ +hid_t H5E_NONE_MINOR_g = FAIL; /* No error */ -/* Free space errors */ -hid_t H5E_CANTMERGE_g = FAIL; /* Can't merge objects */ -hid_t H5E_CANTREVIVE_g = FAIL; /* Can't revive object */ -hid_t H5E_CANTSHRINK_g = FAIL; /* Can't shrink container */ +/* Link related errors */ +hid_t H5E_TRAVERSE_g = FAIL; /* Link traversal failure */ +hid_t H5E_NLINKS_g = FAIL; /* Too many soft links in path */ +hid_t H5E_NOTREGISTERED_g = FAIL; /* Link class not registered */ +hid_t H5E_CANTMOVE_g = FAIL; /* Can't move object */ +hid_t H5E_CANTSORT_g = FAIL; /* Can't sort objects */ + +/* Object atom related errors */ +hid_t H5E_BADATOM_g = FAIL; /* Unable to find atom information (already closed?) */ +hid_t H5E_BADGROUP_g = FAIL; /* Unable to find ID group information */ +hid_t H5E_CANTREGISTER_g = FAIL; /* Unable to register new atom */ +hid_t H5E_CANTINC_g = FAIL; /* Unable to increment reference count */ +hid_t H5E_CANTDEC_g = FAIL; /* Unable to decrement reference count */ +hid_t H5E_NOIDS_g = FAIL; /* Out of IDs for group */ + +/* Group related errors */ +hid_t H5E_CANTOPENOBJ_g = FAIL; /* Can't open object */ +hid_t H5E_CANTCLOSEOBJ_g = FAIL; /* Can't close object */ +hid_t H5E_COMPLEN_g = FAIL; /* Name component is too long */ +hid_t H5E_PATH_g = FAIL; /* Problem with path to object */ + +/* Parallel MPI errors */ +hid_t H5E_MPI_g = FAIL; /* Some MPI function failed */ +hid_t H5E_MPIERRSTR_g = FAIL; /* MPI Error String */ +hid_t H5E_CANTRECV_g = FAIL; /* Can't receive data */ /* Object header related errors */ hid_t H5E_LINKCOUNT_g = FAIL; /* Bad object header link count */ @@ -157,58 +188,27 @@ hid_t H5E_CANTPACK_g = FAIL; /* Can't pack messages */ hid_t H5E_CANTRESET_g = FAIL; /* Can't reset object */ hid_t H5E_CANTRENAME_g = FAIL; /* Unable to rename object */ -/* System level errors */ -hid_t H5E_SYSERRSTR_g = FAIL; /* System error message */ - /* Datatype conversion errors */ hid_t H5E_CANTCONVERT_g = FAIL; /* Can't convert datatypes */ hid_t H5E_BADSIZE_g = FAIL; /* Bad size for object */ -/* Object atom related errors */ -hid_t H5E_BADATOM_g = FAIL; /* Unable to find atom information (already closed?) */ -hid_t H5E_BADGROUP_g = FAIL; /* Unable to find ID group information */ -hid_t H5E_CANTREGISTER_g = FAIL; /* Unable to register new atom */ -hid_t H5E_CANTINC_g = FAIL; /* Unable to increment reference count */ -hid_t H5E_CANTDEC_g = FAIL; /* Unable to decrement reference count */ -hid_t H5E_NOIDS_g = FAIL; /* Out of IDs for group */ - -/* Property list errors */ -hid_t H5E_CANTGET_g = FAIL; /* Can't get value */ -hid_t H5E_CANTSET_g = FAIL; /* Can't set value */ -hid_t H5E_DUPCLASS_g = FAIL; /* Duplicate class name in parent class */ -hid_t H5E_SETDISALLOWED_g = FAIL; /* Disallowed operation */ - -/* B-tree related errors */ -hid_t H5E_NOTFOUND_g = FAIL; /* Object not found */ -hid_t H5E_EXISTS_g = FAIL; /* Object already exists */ -hid_t H5E_CANTENCODE_g = FAIL; /* Unable to encode value */ -hid_t H5E_CANTDECODE_g = FAIL; /* Unable to decode value */ -hid_t H5E_CANTSPLIT_g = FAIL; /* Unable to split node */ -hid_t H5E_CANTREDISTRIBUTE_g = FAIL; /* Unable to redistribute records */ -hid_t H5E_CANTSWAP_g = FAIL; /* Unable to swap records */ -hid_t H5E_CANTINSERT_g = FAIL; /* Unable to insert object */ -hid_t H5E_CANTLIST_g = FAIL; /* Unable to list node */ -hid_t H5E_CANTMODIFY_g = FAIL; /* Unable to modify record */ -hid_t H5E_CANTREMOVE_g = FAIL; /* Unable to remove object */ - -/* Group related errors */ -hid_t H5E_CANTOPENOBJ_g = FAIL; /* Can't open object */ -hid_t H5E_CANTCLOSEOBJ_g = FAIL; /* Can't close object */ -hid_t H5E_COMPLEN_g = FAIL; /* Name component is too long */ -hid_t H5E_PATH_g = FAIL; /* Problem with path to object */ +/* Generic low-level file I/O errors */ +hid_t H5E_SEEKERROR_g = FAIL; /* Seek failed */ +hid_t H5E_READERROR_g = FAIL; /* Read failed */ +hid_t H5E_WRITEERROR_g = FAIL; /* Write failed */ +hid_t H5E_CLOSEERROR_g = FAIL; /* Close failed */ +hid_t H5E_OVERFLOW_g = FAIL; /* Address overflowed */ +hid_t H5E_FCNTL_g = FAIL; /* File control (fcntl) failed */ -/* No error */ -hid_t H5E_NONE_MINOR_g = FAIL; /* No error */ +/* System level errors */ +hid_t H5E_SYSERRSTR_g = FAIL; /* System error message */ -/* File accessibilty errors */ -hid_t H5E_FILEEXISTS_g = FAIL; /* File already exists */ -hid_t H5E_FILEOPEN_g = FAIL; /* File already open */ -hid_t H5E_CANTCREATE_g = FAIL; /* Unable to create file */ -hid_t H5E_CANTOPENFILE_g = FAIL; /* Unable to open file */ -hid_t H5E_CANTCLOSEFILE_g = FAIL; /* Unable to close file */ -hid_t H5E_NOTHDF5_g = FAIL; /* Not an HDF5 file */ -hid_t H5E_BADFILE_g = FAIL; /* Bad file ID accessed */ -hid_t H5E_TRUNCATED_g = FAIL; /* File has been truncated */ -hid_t H5E_MOUNT_g = FAIL; /* File mount error */ +/* I/O pipeline errors */ +hid_t H5E_NOFILTER_g = FAIL; /* Requested filter is not available */ +hid_t H5E_CALLBACK_g = FAIL; /* Callback failed */ +hid_t H5E_CANAPPLY_g = FAIL; /* Error from filter 'can apply' callback */ +hid_t H5E_SETLOCAL_g = FAIL; /* Error from filter 'set local' callback */ +hid_t H5E_NOENCODER_g = FAIL; /* Filter present but encoding disabled */ +hid_t H5E_CANTFILTER_g = FAIL; /* Filter operation failed */ #endif /* H5Edefin_H */ diff --git a/src/H5Einit.h b/src/H5Einit.h index 720e6f3..3f5c02b 100644 --- a/src/H5Einit.h +++ b/src/H5Einit.h @@ -22,160 +22,160 @@ /* Major error codes */ /*********************/ -HDassert(H5E_IO_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Low-level I/O"))==NULL) +HDassert(H5E_FILE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "File accessibilty"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_IO_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_SOHM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Shared Object Header Messages"))==NULL) +HDassert(H5E_PLINE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data filters"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SOHM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PLINE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_ATTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Attribute"))==NULL) +HDassert(H5E_TST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Ternary Search Trees"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ATTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_TST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_PLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Property lists"))==NULL) +HDassert(H5E_BTREE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "B-Tree node"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BTREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_FUNC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Function entry/exit"))==NULL) +HDassert(H5E_HEAP_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Heap"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FUNC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_HEAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_ERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Error API"))==NULL) +HDassert(H5E_VFL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Virtual File Layer"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_VFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_STORAGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data storage"))==NULL) +HDassert(H5E_DATASPACE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataspace"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_STORAGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_DATASPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_OHDR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object header"))==NULL) +HDassert(H5E_NONE_MAJOR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "No error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_OHDR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NONE_MAJOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_PLUGIN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Plugin for dynamically loaded library"))==NULL) +HDassert(H5E_FSPACE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Free Space Manager"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PLUGIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_TST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Ternary Search Trees"))==NULL) +HDassert(H5E_CACHE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_TST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CACHE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_DATASET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataset"))==NULL) +HDassert(H5E_ERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Error API"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_DATASET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BTREE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "B-Tree node"))==NULL) +HDassert(H5E_RESOURCE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Resource unavailable"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BTREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_RESOURCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_SLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Skip Lists"))==NULL) +HDassert(H5E_RS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Reference Counted Strings"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_RS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_VFL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Virtual File Layer"))==NULL) +HDassert(H5E_ATTR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Attribute"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_VFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ATTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_DATASPACE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataspace"))==NULL) +HDassert(H5E_EFL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "External file list"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_DATASPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_EFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_PLIST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Property lists"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_PLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_DATATYPE_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Datatype"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_DATATYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_RS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Reference Counted Strings"))==NULL) +HDassert(H5E_ARGS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Invalid arguments to routine"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_RS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ARGS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_OHDR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object header"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_OHDR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_SLIST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Skip Lists"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_SLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_ATOM_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object atom"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_ATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CACHE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object cache"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CACHE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_INTERNAL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Internal error (too specific to document in detail)"))==NULL) +HDassert(H5E_STORAGE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data storage"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_INTERNAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_STORAGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_SYM_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Symbol table"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_SYM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_PLUGIN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Plugin for dynamically loaded library"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_PLUGIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_FUNC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Function entry/exit"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_FUNC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_LINK_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Links"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_LINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_HEAP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Heap"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_HEAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_PLINE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data filters"))==NULL) +HDassert(H5E_INTERNAL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Internal error (too specific to document in detail)"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PLINE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_INTERNAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_EFL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "External file list"))==NULL) +HDassert(H5E_DATASET_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataset"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_EFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_DATASET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_REFERENCE_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "References"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_REFERENCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_FILE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "File accessibilty"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_RESOURCE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Resource unavailable"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_RESOURCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_NONE_MAJOR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "No error"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NONE_MAJOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_ARGS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Invalid arguments to routine"))==NULL) +HDassert(H5E_SOHM_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Shared Object Header Messages"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ARGS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SOHM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_FSPACE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Free Space Manager"))==NULL) +HDassert(H5E_IO_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Low-level I/O"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_IO_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /*********************/ @@ -200,48 +200,53 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to release object"))==NULL) if((H5E_CANTRELEASE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Link related errors */ -HDassert(H5E_TRAVERSE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Link traversal failure"))==NULL) +/* Free space errors */ +HDassert(H5E_CANTMERGE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't merge objects"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_TRAVERSE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTMERGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_NLINKS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Too many soft links in path"))==NULL) +HDassert(H5E_CANTREVIVE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't revive object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NLINKS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTREVIVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_NOTREGISTERED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Link class not registered"))==NULL) +HDassert(H5E_CANTSHRINK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't shrink container"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOTREGISTERED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSHRINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTMOVE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move object"))==NULL) + +/* Heap errors */ +HDassert(H5E_CANTRESTORE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't restore condition"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRESTORE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSORT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't sort objects"))==NULL) +HDassert(H5E_CANTCOMPUTE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compute value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSORT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCOMPUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Parallel MPI errors */ -HDassert(H5E_MPI_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Some MPI function failed"))==NULL) +HDassert(H5E_CANTEXTEND_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't extend heap's space"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_MPI_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTEXTEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_MPIERRSTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "MPI Error String"))==NULL) +HDassert(H5E_CANTATTACH_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't attach object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_MPIERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTATTACH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTRECV_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't receive data"))==NULL) +HDassert(H5E_CANTUPDATE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't update object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRECV_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTUPDATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTOPERATE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't operate on object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTOPERATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Cache related errors */ @@ -321,102 +326,169 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to resize a metadata cache entr if((H5E_CANTRESIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Argument errors */ -HDassert(H5E_UNINITIALIZED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Information is uinitialized"))==NULL) +/* B-tree related errors */ +HDassert(H5E_NOTFOUND_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object not found"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_UNINITIALIZED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOTFOUND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_UNSUPPORTED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Feature is unsupported"))==NULL) +HDassert(H5E_EXISTS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_UNSUPPORTED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_EXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADTYPE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Inappropriate type"))==NULL) +HDassert(H5E_CANTENCODE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to encode value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADTYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTENCODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADRANGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of range"))==NULL) +HDassert(H5E_CANTDECODE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decode value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADRANGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTDECODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADVALUE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad value"))==NULL) +HDassert(H5E_CANTSPLIT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to split node"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADVALUE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSPLIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTREDISTRIBUTE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to redistribute records"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTREDISTRIBUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTSWAP_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to swap records"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTSWAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTINSERT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTINSERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTLIST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to list node"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTMODIFY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to modify record"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTMODIFY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTREMOVE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to remove object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTREMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Plugin errors */ -HDassert(H5E_OPENERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open directory or file"))==NULL) +/* Property list errors */ +HDassert(H5E_CANTGET_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't get value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_OPENERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTGET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTSET_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't set value"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTSET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_DUPCLASS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Duplicate class name in parent class"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_DUPCLASS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_SETDISALLOWED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Disallowed operation"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_SETDISALLOWED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Generic low-level file I/O errors */ -HDassert(H5E_SEEKERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Seek failed"))==NULL) +/* File accessibilty errors */ +HDassert(H5E_FILEEXISTS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "File already exists"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SEEKERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FILEEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_READERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Read failed"))==NULL) +HDassert(H5E_FILEOPEN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "File already open"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_READERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FILEOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_WRITEERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Write failed"))==NULL) +HDassert(H5E_CANTCREATE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to create file"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_WRITEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCREATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CLOSEERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Close failed"))==NULL) +HDassert(H5E_CANTOPENFILE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to open file"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CLOSEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTOPENFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_OVERFLOW_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Address overflowed"))==NULL) +HDassert(H5E_CANTCLOSEFILE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to close file"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_OVERFLOW_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCLOSEFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_FCNTL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "File control (fcntl) failed"))==NULL) +HDassert(H5E_NOTHDF5_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Not an HDF5 file"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FCNTL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOTHDF5_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_BADFILE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad file ID accessed"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_BADFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_TRUNCATED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "File has been truncated"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_TRUNCATED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_MOUNT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "File mount error"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_MOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Heap errors */ -HDassert(H5E_CANTRESTORE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't restore condition"))==NULL) +/* Dataspace errors */ +HDassert(H5E_CANTCLIP_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't clip hyperslab region"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRESTORE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCLIP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCOMPUTE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compute value"))==NULL) +HDassert(H5E_CANTCOUNT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't count elements"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCOMPUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTEXTEND_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't extend heap's space"))==NULL) +HDassert(H5E_CANTSELECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't select hyperslab"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTEXTEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTATTACH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't attach object"))==NULL) +HDassert(H5E_CANTNEXT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move to next iterator location"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTATTACH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTNEXT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTUPDATE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't update object"))==NULL) +HDassert(H5E_BADSELECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Invalid selection"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUPDATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTOPERATE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't operate on object"))==NULL) +HDassert(H5E_CANTCOMPARE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compare objects"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTOPERATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCOMPARE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + +/* Plugin errors */ +HDassert(H5E_OPENERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open directory or file"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_OPENERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Resource errors */ @@ -471,85 +543,136 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Object is already open"))==NULL) if((H5E_OBJOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* I/O pipeline errors */ -HDassert(H5E_NOFILTER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Requested filter is not available"))==NULL) +/* Argument errors */ +HDassert(H5E_UNINITIALIZED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Information is uinitialized"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_UNINITIALIZED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CALLBACK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Callback failed"))==NULL) +HDassert(H5E_UNSUPPORTED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Feature is unsupported"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CALLBACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_UNSUPPORTED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANAPPLY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'can apply' callback"))==NULL) +HDassert(H5E_BADTYPE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Inappropriate type"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANAPPLY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADTYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_SETLOCAL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'set local' callback"))==NULL) +HDassert(H5E_BADRANGE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of range"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SETLOCAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADRANGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_NOENCODER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter present but encoding disabled"))==NULL) +HDassert(H5E_BADVALUE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOENCODER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADVALUE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTFILTER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter operation failed"))==NULL) + +/* No error */ +HDassert(H5E_NONE_MINOR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Dataspace errors */ -HDassert(H5E_CANTCLIP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't clip hyperslab region"))==NULL) +/* Link related errors */ +HDassert(H5E_TRAVERSE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Link traversal failure"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCLIP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_TRAVERSE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCOUNT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't count elements"))==NULL) +HDassert(H5E_NLINKS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Too many soft links in path"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NLINKS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSELECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't select hyperslab"))==NULL) +HDassert(H5E_NOTREGISTERED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Link class not registered"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOTREGISTERED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTNEXT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move to next iterator location"))==NULL) +HDassert(H5E_CANTMOVE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTNEXT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADSELECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Invalid selection"))==NULL) +HDassert(H5E_CANTSORT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't sort objects"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSORT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCOMPARE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compare objects"))==NULL) + +/* Object atom related errors */ +HDassert(H5E_BADATOM_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find atom information (already closed?)"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCOMPARE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Free space errors */ -HDassert(H5E_CANTMERGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't merge objects"))==NULL) +HDassert(H5E_BADGROUP_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find ID group information"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTMERGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADGROUP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTREVIVE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't revive object"))==NULL) +HDassert(H5E_CANTREGISTER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to register new atom"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTREVIVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTREGISTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSHRINK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't shrink container"))==NULL) +HDassert(H5E_CANTINC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to increment reference count"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSHRINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTINC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTDEC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decrement reference count"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTDEC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_NOIDS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of IDs for group"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_NOIDS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + +/* Group related errors */ +HDassert(H5E_CANTOPENOBJ_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTOPENOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTCLOSEOBJ_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't close object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTCLOSEOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_COMPLEN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Name component is too long"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_COMPLEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_PATH_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Problem with path to object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_PATH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + +/* Parallel MPI errors */ +HDassert(H5E_MPI_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Some MPI function failed"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_MPI_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_MPIERRSTR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "MPI Error String"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_MPIERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTRECV_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't receive data"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTRECV_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Object header related errors */ @@ -599,13 +722,6 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to rename object"))==NULL) if((H5E_CANTRENAME_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* System level errors */ -HDassert(H5E_SYSERRSTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "System error message"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SYSERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - /* Datatype conversion errors */ HDassert(H5E_CANTCONVERT_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't convert datatypes"))==NULL) @@ -618,191 +734,75 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad size for object"))==NULL) if((H5E_BADSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Object atom related errors */ -HDassert(H5E_BADATOM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find atom information (already closed?)"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADGROUP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find ID group information"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADGROUP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTREGISTER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to register new atom"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTREGISTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTINC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to increment reference count"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTINC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTDEC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decrement reference count"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDEC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_NOIDS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of IDs for group"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOIDS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Property list errors */ -HDassert(H5E_CANTGET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't get value"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTGET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't set value"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_DUPCLASS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Duplicate class name in parent class"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_DUPCLASS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_SETDISALLOWED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Disallowed operation"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SETDISALLOWED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* B-tree related errors */ -HDassert(H5E_NOTFOUND_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object not found"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOTFOUND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_EXISTS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_EXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTENCODE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to encode value"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTENCODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTDECODE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decode value"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDECODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSPLIT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to split node"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSPLIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTREDISTRIBUTE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to redistribute records"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTREDISTRIBUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSWAP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to swap records"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSWAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTINSERT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTINSERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to list node"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTMODIFY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to modify record"))==NULL) +/* Generic low-level file I/O errors */ +HDassert(H5E_SEEKERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Seek failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTMODIFY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SEEKERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTREMOVE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to remove object"))==NULL) +HDassert(H5E_READERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Read failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTREMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_READERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Group related errors */ -HDassert(H5E_CANTOPENOBJ_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open object"))==NULL) +HDassert(H5E_WRITEERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Write failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTOPENOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_WRITEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCLOSEOBJ_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't close object"))==NULL) +HDassert(H5E_CLOSEERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Close failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCLOSEOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CLOSEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_COMPLEN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Name component is too long"))==NULL) +HDassert(H5E_OVERFLOW_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Address overflowed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_COMPLEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_OVERFLOW_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_PATH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Problem with path to object"))==NULL) +HDassert(H5E_FCNTL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "File control (fcntl) failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PATH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FCNTL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* No error */ -HDassert(H5E_NONE_MINOR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL) +/* System level errors */ +HDassert(H5E_SYSERRSTR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "System error message"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SYSERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* File accessibilty errors */ -HDassert(H5E_FILEEXISTS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "File already exists"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FILEEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_FILEOPEN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "File already open"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FILEOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCREATE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to create file"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCREATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTOPENFILE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to open file"))==NULL) +/* I/O pipeline errors */ +HDassert(H5E_NOFILTER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Requested filter is not available"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTOPENFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCLOSEFILE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to close file"))==NULL) +HDassert(H5E_CALLBACK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Callback failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCLOSEFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CALLBACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_NOTHDF5_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Not an HDF5 file"))==NULL) +HDassert(H5E_CANAPPLY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'can apply' callback"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOTHDF5_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANAPPLY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADFILE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad file ID accessed"))==NULL) +HDassert(H5E_SETLOCAL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'set local' callback"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SETLOCAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_TRUNCATED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "File has been truncated"))==NULL) +HDassert(H5E_NOENCODER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter present but encoding disabled"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_TRUNCATED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOENCODER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_MOUNT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "File mount error"))==NULL) +HDassert(H5E_CANTFILTER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter operation failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_MOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") #endif /* H5Einit_H */ diff --git a/src/H5Epubgen.h b/src/H5Epubgen.h index d7694a0..c693973 100644 --- a/src/H5Epubgen.h +++ b/src/H5Epubgen.h @@ -26,68 +26,68 @@ extern "C" { /* Major error codes */ /*********************/ -#define H5E_IO (H5OPEN H5E_IO_g) -#define H5E_SOHM (H5OPEN H5E_SOHM_g) -#define H5E_ATTR (H5OPEN H5E_ATTR_g) -#define H5E_PLIST (H5OPEN H5E_PLIST_g) -#define H5E_FUNC (H5OPEN H5E_FUNC_g) -#define H5E_ERROR (H5OPEN H5E_ERROR_g) -#define H5E_STORAGE (H5OPEN H5E_STORAGE_g) -#define H5E_OHDR (H5OPEN H5E_OHDR_g) -#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g) +#define H5E_FILE (H5OPEN H5E_FILE_g) +#define H5E_PLINE (H5OPEN H5E_PLINE_g) #define H5E_TST (H5OPEN H5E_TST_g) -#define H5E_DATASET (H5OPEN H5E_DATASET_g) #define H5E_BTREE (H5OPEN H5E_BTREE_g) -#define H5E_SLIST (H5OPEN H5E_SLIST_g) +#define H5E_HEAP (H5OPEN H5E_HEAP_g) #define H5E_VFL (H5OPEN H5E_VFL_g) #define H5E_DATASPACE (H5OPEN H5E_DATASPACE_g) -#define H5E_DATATYPE (H5OPEN H5E_DATATYPE_g) +#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g) +#define H5E_FSPACE (H5OPEN H5E_FSPACE_g) +#define H5E_CACHE (H5OPEN H5E_CACHE_g) +#define H5E_ERROR (H5OPEN H5E_ERROR_g) +#define H5E_RESOURCE (H5OPEN H5E_RESOURCE_g) #define H5E_RS (H5OPEN H5E_RS_g) +#define H5E_ATTR (H5OPEN H5E_ATTR_g) +#define H5E_EFL (H5OPEN H5E_EFL_g) +#define H5E_PLIST (H5OPEN H5E_PLIST_g) +#define H5E_DATATYPE (H5OPEN H5E_DATATYPE_g) +#define H5E_ARGS (H5OPEN H5E_ARGS_g) +#define H5E_OHDR (H5OPEN H5E_OHDR_g) +#define H5E_SLIST (H5OPEN H5E_SLIST_g) #define H5E_ATOM (H5OPEN H5E_ATOM_g) -#define H5E_CACHE (H5OPEN H5E_CACHE_g) -#define H5E_INTERNAL (H5OPEN H5E_INTERNAL_g) +#define H5E_STORAGE (H5OPEN H5E_STORAGE_g) #define H5E_SYM (H5OPEN H5E_SYM_g) +#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g) +#define H5E_FUNC (H5OPEN H5E_FUNC_g) #define H5E_LINK (H5OPEN H5E_LINK_g) -#define H5E_HEAP (H5OPEN H5E_HEAP_g) -#define H5E_PLINE (H5OPEN H5E_PLINE_g) -#define H5E_EFL (H5OPEN H5E_EFL_g) +#define H5E_INTERNAL (H5OPEN H5E_INTERNAL_g) +#define H5E_DATASET (H5OPEN H5E_DATASET_g) #define H5E_REFERENCE (H5OPEN H5E_REFERENCE_g) -#define H5E_FILE (H5OPEN H5E_FILE_g) -#define H5E_RESOURCE (H5OPEN H5E_RESOURCE_g) -#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g) -#define H5E_ARGS (H5OPEN H5E_ARGS_g) -#define H5E_FSPACE (H5OPEN H5E_FSPACE_g) -H5_DLLVAR hid_t H5E_IO_g; /* Low-level I/O */ -H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */ -H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */ -H5_DLLVAR hid_t H5E_PLIST_g; /* Property lists */ -H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */ -H5_DLLVAR hid_t H5E_ERROR_g; /* Error API */ -H5_DLLVAR hid_t H5E_STORAGE_g; /* Data storage */ -H5_DLLVAR hid_t H5E_OHDR_g; /* Object header */ -H5_DLLVAR hid_t H5E_PLUGIN_g; /* Plugin for dynamically loaded library */ +#define H5E_SOHM (H5OPEN H5E_SOHM_g) +#define H5E_IO (H5OPEN H5E_IO_g) +H5_DLLVAR hid_t H5E_FILE_g; /* File accessibilty */ +H5_DLLVAR hid_t H5E_PLINE_g; /* Data filters */ H5_DLLVAR hid_t H5E_TST_g; /* Ternary Search Trees */ -H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */ H5_DLLVAR hid_t H5E_BTREE_g; /* B-Tree node */ -H5_DLLVAR hid_t H5E_SLIST_g; /* Skip Lists */ +H5_DLLVAR hid_t H5E_HEAP_g; /* Heap */ H5_DLLVAR hid_t H5E_VFL_g; /* Virtual File Layer */ H5_DLLVAR hid_t H5E_DATASPACE_g; /* Dataspace */ -H5_DLLVAR hid_t H5E_DATATYPE_g; /* Datatype */ +H5_DLLVAR hid_t H5E_NONE_MAJOR_g; /* No error */ +H5_DLLVAR hid_t H5E_FSPACE_g; /* Free Space Manager */ +H5_DLLVAR hid_t H5E_CACHE_g; /* Object cache */ +H5_DLLVAR hid_t H5E_ERROR_g; /* Error API */ +H5_DLLVAR hid_t H5E_RESOURCE_g; /* Resource unavailable */ H5_DLLVAR hid_t H5E_RS_g; /* Reference Counted Strings */ +H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */ +H5_DLLVAR hid_t H5E_EFL_g; /* External file list */ +H5_DLLVAR hid_t H5E_PLIST_g; /* Property lists */ +H5_DLLVAR hid_t H5E_DATATYPE_g; /* Datatype */ +H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */ +H5_DLLVAR hid_t H5E_OHDR_g; /* Object header */ +H5_DLLVAR hid_t H5E_SLIST_g; /* Skip Lists */ H5_DLLVAR hid_t H5E_ATOM_g; /* Object atom */ -H5_DLLVAR hid_t H5E_CACHE_g; /* Object cache */ -H5_DLLVAR hid_t H5E_INTERNAL_g; /* Internal error (too specific to document in detail) */ +H5_DLLVAR hid_t H5E_STORAGE_g; /* Data storage */ H5_DLLVAR hid_t H5E_SYM_g; /* Symbol table */ +H5_DLLVAR hid_t H5E_PLUGIN_g; /* Plugin for dynamically loaded library */ +H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */ H5_DLLVAR hid_t H5E_LINK_g; /* Links */ -H5_DLLVAR hid_t H5E_HEAP_g; /* Heap */ -H5_DLLVAR hid_t H5E_PLINE_g; /* Data filters */ -H5_DLLVAR hid_t H5E_EFL_g; /* External file list */ +H5_DLLVAR hid_t H5E_INTERNAL_g; /* Internal error (too specific to document in detail) */ +H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */ H5_DLLVAR hid_t H5E_REFERENCE_g; /* References */ -H5_DLLVAR hid_t H5E_FILE_g; /* File accessibilty */ -H5_DLLVAR hid_t H5E_RESOURCE_g; /* Resource unavailable */ -H5_DLLVAR hid_t H5E_NONE_MAJOR_g; /* No error */ -H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */ -H5_DLLVAR hid_t H5E_FSPACE_g; /* Free Space Manager */ +H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */ +H5_DLLVAR hid_t H5E_IO_g; /* Low-level I/O */ /*********************/ /* Minor error codes */ @@ -101,25 +101,27 @@ H5_DLLVAR hid_t H5E_CANTINIT_g; /* Unable to initialize object */ H5_DLLVAR hid_t H5E_ALREADYINIT_g; /* Object already initialized */ H5_DLLVAR hid_t H5E_CANTRELEASE_g; /* Unable to release object */ -/* Link related errors */ -#define H5E_TRAVERSE (H5OPEN H5E_TRAVERSE_g) -#define H5E_NLINKS (H5OPEN H5E_NLINKS_g) -#define H5E_NOTREGISTERED (H5OPEN H5E_NOTREGISTERED_g) -#define H5E_CANTMOVE (H5OPEN H5E_CANTMOVE_g) -#define H5E_CANTSORT (H5OPEN H5E_CANTSORT_g) -H5_DLLVAR hid_t H5E_TRAVERSE_g; /* Link traversal failure */ -H5_DLLVAR hid_t H5E_NLINKS_g; /* Too many soft links in path */ -H5_DLLVAR hid_t H5E_NOTREGISTERED_g; /* Link class not registered */ -H5_DLLVAR hid_t H5E_CANTMOVE_g; /* Can't move object */ -H5_DLLVAR hid_t H5E_CANTSORT_g; /* Can't sort objects */ +/* Free space errors */ +#define H5E_CANTMERGE (H5OPEN H5E_CANTMERGE_g) +#define H5E_CANTREVIVE (H5OPEN H5E_CANTREVIVE_g) +#define H5E_CANTSHRINK (H5OPEN H5E_CANTSHRINK_g) +H5_DLLVAR hid_t H5E_CANTMERGE_g; /* Can't merge objects */ +H5_DLLVAR hid_t H5E_CANTREVIVE_g; /* Can't revive object */ +H5_DLLVAR hid_t H5E_CANTSHRINK_g; /* Can't shrink container */ -/* Parallel MPI errors */ -#define H5E_MPI (H5OPEN H5E_MPI_g) -#define H5E_MPIERRSTR (H5OPEN H5E_MPIERRSTR_g) -#define H5E_CANTRECV (H5OPEN H5E_CANTRECV_g) -H5_DLLVAR hid_t H5E_MPI_g; /* Some MPI function failed */ -H5_DLLVAR hid_t H5E_MPIERRSTR_g; /* MPI Error String */ -H5_DLLVAR hid_t H5E_CANTRECV_g; /* Can't receive data */ +/* Heap errors */ +#define H5E_CANTRESTORE (H5OPEN H5E_CANTRESTORE_g) +#define H5E_CANTCOMPUTE (H5OPEN H5E_CANTCOMPUTE_g) +#define H5E_CANTEXTEND (H5OPEN H5E_CANTEXTEND_g) +#define H5E_CANTATTACH (H5OPEN H5E_CANTATTACH_g) +#define H5E_CANTUPDATE (H5OPEN H5E_CANTUPDATE_g) +#define H5E_CANTOPERATE (H5OPEN H5E_CANTOPERATE_g) +H5_DLLVAR hid_t H5E_CANTRESTORE_g; /* Can't restore condition */ +H5_DLLVAR hid_t H5E_CANTCOMPUTE_g; /* Can't compute value */ +H5_DLLVAR hid_t H5E_CANTEXTEND_g; /* Can't extend heap's space */ +H5_DLLVAR hid_t H5E_CANTATTACH_g; /* Can't attach object */ +H5_DLLVAR hid_t H5E_CANTUPDATE_g; /* Can't update object */ +H5_DLLVAR hid_t H5E_CANTOPERATE_g; /* Can't operate on object */ /* Cache related errors */ #define H5E_CANTFLUSH (H5OPEN H5E_CANTFLUSH_g) @@ -153,50 +155,78 @@ H5_DLLVAR hid_t H5E_CANTDIRTY_g; /* Unable to mark metadata as dirty */ H5_DLLVAR hid_t H5E_CANTEXPUNGE_g; /* Unable to expunge a metadata cache entry */ H5_DLLVAR hid_t H5E_CANTRESIZE_g; /* Unable to resize a metadata cache entry */ -/* Argument errors */ -#define H5E_UNINITIALIZED (H5OPEN H5E_UNINITIALIZED_g) -#define H5E_UNSUPPORTED (H5OPEN H5E_UNSUPPORTED_g) -#define H5E_BADTYPE (H5OPEN H5E_BADTYPE_g) -#define H5E_BADRANGE (H5OPEN H5E_BADRANGE_g) -#define H5E_BADVALUE (H5OPEN H5E_BADVALUE_g) -H5_DLLVAR hid_t H5E_UNINITIALIZED_g; /* Information is uinitialized */ -H5_DLLVAR hid_t H5E_UNSUPPORTED_g; /* Feature is unsupported */ -H5_DLLVAR hid_t H5E_BADTYPE_g; /* Inappropriate type */ -H5_DLLVAR hid_t H5E_BADRANGE_g; /* Out of range */ -H5_DLLVAR hid_t H5E_BADVALUE_g; /* Bad value */ +/* B-tree related errors */ +#define H5E_NOTFOUND (H5OPEN H5E_NOTFOUND_g) +#define H5E_EXISTS (H5OPEN H5E_EXISTS_g) +#define H5E_CANTENCODE (H5OPEN H5E_CANTENCODE_g) +#define H5E_CANTDECODE (H5OPEN H5E_CANTDECODE_g) +#define H5E_CANTSPLIT (H5OPEN H5E_CANTSPLIT_g) +#define H5E_CANTREDISTRIBUTE (H5OPEN H5E_CANTREDISTRIBUTE_g) +#define H5E_CANTSWAP (H5OPEN H5E_CANTSWAP_g) +#define H5E_CANTINSERT (H5OPEN H5E_CANTINSERT_g) +#define H5E_CANTLIST (H5OPEN H5E_CANTLIST_g) +#define H5E_CANTMODIFY (H5OPEN H5E_CANTMODIFY_g) +#define H5E_CANTREMOVE (H5OPEN H5E_CANTREMOVE_g) +H5_DLLVAR hid_t H5E_NOTFOUND_g; /* Object not found */ +H5_DLLVAR hid_t H5E_EXISTS_g; /* Object already exists */ +H5_DLLVAR hid_t H5E_CANTENCODE_g; /* Unable to encode value */ +H5_DLLVAR hid_t H5E_CANTDECODE_g; /* Unable to decode value */ +H5_DLLVAR hid_t H5E_CANTSPLIT_g; /* Unable to split node */ +H5_DLLVAR hid_t H5E_CANTREDISTRIBUTE_g; /* Unable to redistribute records */ +H5_DLLVAR hid_t H5E_CANTSWAP_g; /* Unable to swap records */ +H5_DLLVAR hid_t H5E_CANTINSERT_g; /* Unable to insert object */ +H5_DLLVAR hid_t H5E_CANTLIST_g; /* Unable to list node */ +H5_DLLVAR hid_t H5E_CANTMODIFY_g; /* Unable to modify record */ +H5_DLLVAR hid_t H5E_CANTREMOVE_g; /* Unable to remove object */ + +/* Property list errors */ +#define H5E_CANTGET (H5OPEN H5E_CANTGET_g) +#define H5E_CANTSET (H5OPEN H5E_CANTSET_g) +#define H5E_DUPCLASS (H5OPEN H5E_DUPCLASS_g) +#define H5E_SETDISALLOWED (H5OPEN H5E_SETDISALLOWED_g) +H5_DLLVAR hid_t H5E_CANTGET_g; /* Can't get value */ +H5_DLLVAR hid_t H5E_CANTSET_g; /* Can't set value */ +H5_DLLVAR hid_t H5E_DUPCLASS_g; /* Duplicate class name in parent class */ +H5_DLLVAR hid_t H5E_SETDISALLOWED_g; /* Disallowed operation */ + +/* File accessibilty errors */ +#define H5E_FILEEXISTS (H5OPEN H5E_FILEEXISTS_g) +#define H5E_FILEOPEN (H5OPEN H5E_FILEOPEN_g) +#define H5E_CANTCREATE (H5OPEN H5E_CANTCREATE_g) +#define H5E_CANTOPENFILE (H5OPEN H5E_CANTOPENFILE_g) +#define H5E_CANTCLOSEFILE (H5OPEN H5E_CANTCLOSEFILE_g) +#define H5E_NOTHDF5 (H5OPEN H5E_NOTHDF5_g) +#define H5E_BADFILE (H5OPEN H5E_BADFILE_g) +#define H5E_TRUNCATED (H5OPEN H5E_TRUNCATED_g) +#define H5E_MOUNT (H5OPEN H5E_MOUNT_g) +H5_DLLVAR hid_t H5E_FILEEXISTS_g; /* File already exists */ +H5_DLLVAR hid_t H5E_FILEOPEN_g; /* File already open */ +H5_DLLVAR hid_t H5E_CANTCREATE_g; /* Unable to create file */ +H5_DLLVAR hid_t H5E_CANTOPENFILE_g; /* Unable to open file */ +H5_DLLVAR hid_t H5E_CANTCLOSEFILE_g; /* Unable to close file */ +H5_DLLVAR hid_t H5E_NOTHDF5_g; /* Not an HDF5 file */ +H5_DLLVAR hid_t H5E_BADFILE_g; /* Bad file ID accessed */ +H5_DLLVAR hid_t H5E_TRUNCATED_g; /* File has been truncated */ +H5_DLLVAR hid_t H5E_MOUNT_g; /* File mount error */ + +/* Dataspace errors */ +#define H5E_CANTCLIP (H5OPEN H5E_CANTCLIP_g) +#define H5E_CANTCOUNT (H5OPEN H5E_CANTCOUNT_g) +#define H5E_CANTSELECT (H5OPEN H5E_CANTSELECT_g) +#define H5E_CANTNEXT (H5OPEN H5E_CANTNEXT_g) +#define H5E_BADSELECT (H5OPEN H5E_BADSELECT_g) +#define H5E_CANTCOMPARE (H5OPEN H5E_CANTCOMPARE_g) +H5_DLLVAR hid_t H5E_CANTCLIP_g; /* Can't clip hyperslab region */ +H5_DLLVAR hid_t H5E_CANTCOUNT_g; /* Can't count elements */ +H5_DLLVAR hid_t H5E_CANTSELECT_g; /* Can't select hyperslab */ +H5_DLLVAR hid_t H5E_CANTNEXT_g; /* Can't move to next iterator location */ +H5_DLLVAR hid_t H5E_BADSELECT_g; /* Invalid selection */ +H5_DLLVAR hid_t H5E_CANTCOMPARE_g; /* Can't compare objects */ /* Plugin errors */ #define H5E_OPENERROR (H5OPEN H5E_OPENERROR_g) H5_DLLVAR hid_t H5E_OPENERROR_g; /* Can't open directory or file */ -/* Generic low-level file I/O errors */ -#define H5E_SEEKERROR (H5OPEN H5E_SEEKERROR_g) -#define H5E_READERROR (H5OPEN H5E_READERROR_g) -#define H5E_WRITEERROR (H5OPEN H5E_WRITEERROR_g) -#define H5E_CLOSEERROR (H5OPEN H5E_CLOSEERROR_g) -#define H5E_OVERFLOW (H5OPEN H5E_OVERFLOW_g) -#define H5E_FCNTL (H5OPEN H5E_FCNTL_g) -H5_DLLVAR hid_t H5E_SEEKERROR_g; /* Seek failed */ -H5_DLLVAR hid_t H5E_READERROR_g; /* Read failed */ -H5_DLLVAR hid_t H5E_WRITEERROR_g; /* Write failed */ -H5_DLLVAR hid_t H5E_CLOSEERROR_g; /* Close failed */ -H5_DLLVAR hid_t H5E_OVERFLOW_g; /* Address overflowed */ -H5_DLLVAR hid_t H5E_FCNTL_g; /* File control (fcntl) failed */ - -/* Heap errors */ -#define H5E_CANTRESTORE (H5OPEN H5E_CANTRESTORE_g) -#define H5E_CANTCOMPUTE (H5OPEN H5E_CANTCOMPUTE_g) -#define H5E_CANTEXTEND (H5OPEN H5E_CANTEXTEND_g) -#define H5E_CANTATTACH (H5OPEN H5E_CANTATTACH_g) -#define H5E_CANTUPDATE (H5OPEN H5E_CANTUPDATE_g) -#define H5E_CANTOPERATE (H5OPEN H5E_CANTOPERATE_g) -H5_DLLVAR hid_t H5E_CANTRESTORE_g; /* Can't restore condition */ -H5_DLLVAR hid_t H5E_CANTCOMPUTE_g; /* Can't compute value */ -H5_DLLVAR hid_t H5E_CANTEXTEND_g; /* Can't extend heap's space */ -H5_DLLVAR hid_t H5E_CANTATTACH_g; /* Can't attach object */ -H5_DLLVAR hid_t H5E_CANTUPDATE_g; /* Can't update object */ -H5_DLLVAR hid_t H5E_CANTOPERATE_g; /* Can't operate on object */ - /* Resource errors */ #define H5E_NOSPACE (H5OPEN H5E_NOSPACE_g) #define H5E_CANTALLOC (H5OPEN H5E_CANTALLOC_g) @@ -219,41 +249,65 @@ H5_DLLVAR hid_t H5E_CANTGC_g; /* Unable to garbage collect */ H5_DLLVAR hid_t H5E_CANTGETSIZE_g; /* Unable to compute size */ H5_DLLVAR hid_t H5E_OBJOPEN_g; /* Object is already open */ -/* I/O pipeline errors */ -#define H5E_NOFILTER (H5OPEN H5E_NOFILTER_g) -#define H5E_CALLBACK (H5OPEN H5E_CALLBACK_g) -#define H5E_CANAPPLY (H5OPEN H5E_CANAPPLY_g) -#define H5E_SETLOCAL (H5OPEN H5E_SETLOCAL_g) -#define H5E_NOENCODER (H5OPEN H5E_NOENCODER_g) -#define H5E_CANTFILTER (H5OPEN H5E_CANTFILTER_g) -H5_DLLVAR hid_t H5E_NOFILTER_g; /* Requested filter is not available */ -H5_DLLVAR hid_t H5E_CALLBACK_g; /* Callback failed */ -H5_DLLVAR hid_t H5E_CANAPPLY_g; /* Error from filter 'can apply' callback */ -H5_DLLVAR hid_t H5E_SETLOCAL_g; /* Error from filter 'set local' callback */ -H5_DLLVAR hid_t H5E_NOENCODER_g; /* Filter present but encoding disabled */ -H5_DLLVAR hid_t H5E_CANTFILTER_g; /* Filter operation failed */ +/* Argument errors */ +#define H5E_UNINITIALIZED (H5OPEN H5E_UNINITIALIZED_g) +#define H5E_UNSUPPORTED (H5OPEN H5E_UNSUPPORTED_g) +#define H5E_BADTYPE (H5OPEN H5E_BADTYPE_g) +#define H5E_BADRANGE (H5OPEN H5E_BADRANGE_g) +#define H5E_BADVALUE (H5OPEN H5E_BADVALUE_g) +H5_DLLVAR hid_t H5E_UNINITIALIZED_g; /* Information is uinitialized */ +H5_DLLVAR hid_t H5E_UNSUPPORTED_g; /* Feature is unsupported */ +H5_DLLVAR hid_t H5E_BADTYPE_g; /* Inappropriate type */ +H5_DLLVAR hid_t H5E_BADRANGE_g; /* Out of range */ +H5_DLLVAR hid_t H5E_BADVALUE_g; /* Bad value */ -/* Dataspace errors */ -#define H5E_CANTCLIP (H5OPEN H5E_CANTCLIP_g) -#define H5E_CANTCOUNT (H5OPEN H5E_CANTCOUNT_g) -#define H5E_CANTSELECT (H5OPEN H5E_CANTSELECT_g) -#define H5E_CANTNEXT (H5OPEN H5E_CANTNEXT_g) -#define H5E_BADSELECT (H5OPEN H5E_BADSELECT_g) -#define H5E_CANTCOMPARE (H5OPEN H5E_CANTCOMPARE_g) -H5_DLLVAR hid_t H5E_CANTCLIP_g; /* Can't clip hyperslab region */ -H5_DLLVAR hid_t H5E_CANTCOUNT_g; /* Can't count elements */ -H5_DLLVAR hid_t H5E_CANTSELECT_g; /* Can't select hyperslab */ -H5_DLLVAR hid_t H5E_CANTNEXT_g; /* Can't move to next iterator location */ -H5_DLLVAR hid_t H5E_BADSELECT_g; /* Invalid selection */ -H5_DLLVAR hid_t H5E_CANTCOMPARE_g; /* Can't compare objects */ +/* No error */ +#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g) +H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */ -/* Free space errors */ -#define H5E_CANTMERGE (H5OPEN H5E_CANTMERGE_g) -#define H5E_CANTREVIVE (H5OPEN H5E_CANTREVIVE_g) -#define H5E_CANTSHRINK (H5OPEN H5E_CANTSHRINK_g) -H5_DLLVAR hid_t H5E_CANTMERGE_g; /* Can't merge objects */ -H5_DLLVAR hid_t H5E_CANTREVIVE_g; /* Can't revive object */ -H5_DLLVAR hid_t H5E_CANTSHRINK_g; /* Can't shrink container */ +/* Link related errors */ +#define H5E_TRAVERSE (H5OPEN H5E_TRAVERSE_g) +#define H5E_NLINKS (H5OPEN H5E_NLINKS_g) +#define H5E_NOTREGISTERED (H5OPEN H5E_NOTREGISTERED_g) +#define H5E_CANTMOVE (H5OPEN H5E_CANTMOVE_g) +#define H5E_CANTSORT (H5OPEN H5E_CANTSORT_g) +H5_DLLVAR hid_t H5E_TRAVERSE_g; /* Link traversal failure */ +H5_DLLVAR hid_t H5E_NLINKS_g; /* Too many soft links in path */ +H5_DLLVAR hid_t H5E_NOTREGISTERED_g; /* Link class not registered */ +H5_DLLVAR hid_t H5E_CANTMOVE_g; /* Can't move object */ +H5_DLLVAR hid_t H5E_CANTSORT_g; /* Can't sort objects */ + +/* Object atom related errors */ +#define H5E_BADATOM (H5OPEN H5E_BADATOM_g) +#define H5E_BADGROUP (H5OPEN H5E_BADGROUP_g) +#define H5E_CANTREGISTER (H5OPEN H5E_CANTREGISTER_g) +#define H5E_CANTINC (H5OPEN H5E_CANTINC_g) +#define H5E_CANTDEC (H5OPEN H5E_CANTDEC_g) +#define H5E_NOIDS (H5OPEN H5E_NOIDS_g) +H5_DLLVAR hid_t H5E_BADATOM_g; /* Unable to find atom information (already closed?) */ +H5_DLLVAR hid_t H5E_BADGROUP_g; /* Unable to find ID group information */ +H5_DLLVAR hid_t H5E_CANTREGISTER_g; /* Unable to register new atom */ +H5_DLLVAR hid_t H5E_CANTINC_g; /* Unable to increment reference count */ +H5_DLLVAR hid_t H5E_CANTDEC_g; /* Unable to decrement reference count */ +H5_DLLVAR hid_t H5E_NOIDS_g; /* Out of IDs for group */ + +/* Group related errors */ +#define H5E_CANTOPENOBJ (H5OPEN H5E_CANTOPENOBJ_g) +#define H5E_CANTCLOSEOBJ (H5OPEN H5E_CANTCLOSEOBJ_g) +#define H5E_COMPLEN (H5OPEN H5E_COMPLEN_g) +#define H5E_PATH (H5OPEN H5E_PATH_g) +H5_DLLVAR hid_t H5E_CANTOPENOBJ_g; /* Can't open object */ +H5_DLLVAR hid_t H5E_CANTCLOSEOBJ_g; /* Can't close object */ +H5_DLLVAR hid_t H5E_COMPLEN_g; /* Name component is too long */ +H5_DLLVAR hid_t H5E_PATH_g; /* Problem with path to object */ + +/* Parallel MPI errors */ +#define H5E_MPI (H5OPEN H5E_MPI_g) +#define H5E_MPIERRSTR (H5OPEN H5E_MPIERRSTR_g) +#define H5E_CANTRECV (H5OPEN H5E_CANTRECV_g) +H5_DLLVAR hid_t H5E_MPI_g; /* Some MPI function failed */ +H5_DLLVAR hid_t H5E_MPIERRSTR_g; /* MPI Error String */ +H5_DLLVAR hid_t H5E_CANTRECV_g; /* Can't receive data */ /* Object header related errors */ #define H5E_LINKCOUNT (H5OPEN H5E_LINKCOUNT_g) @@ -275,97 +329,43 @@ H5_DLLVAR hid_t H5E_CANTPACK_g; /* Can't pack messages */ H5_DLLVAR hid_t H5E_CANTRESET_g; /* Can't reset object */ H5_DLLVAR hid_t H5E_CANTRENAME_g; /* Unable to rename object */ -/* System level errors */ -#define H5E_SYSERRSTR (H5OPEN H5E_SYSERRSTR_g) -H5_DLLVAR hid_t H5E_SYSERRSTR_g; /* System error message */ - /* Datatype conversion errors */ #define H5E_CANTCONVERT (H5OPEN H5E_CANTCONVERT_g) #define H5E_BADSIZE (H5OPEN H5E_BADSIZE_g) H5_DLLVAR hid_t H5E_CANTCONVERT_g; /* Can't convert datatypes */ H5_DLLVAR hid_t H5E_BADSIZE_g; /* Bad size for object */ -/* Object atom related errors */ -#define H5E_BADATOM (H5OPEN H5E_BADATOM_g) -#define H5E_BADGROUP (H5OPEN H5E_BADGROUP_g) -#define H5E_CANTREGISTER (H5OPEN H5E_CANTREGISTER_g) -#define H5E_CANTINC (H5OPEN H5E_CANTINC_g) -#define H5E_CANTDEC (H5OPEN H5E_CANTDEC_g) -#define H5E_NOIDS (H5OPEN H5E_NOIDS_g) -H5_DLLVAR hid_t H5E_BADATOM_g; /* Unable to find atom information (already closed?) */ -H5_DLLVAR hid_t H5E_BADGROUP_g; /* Unable to find ID group information */ -H5_DLLVAR hid_t H5E_CANTREGISTER_g; /* Unable to register new atom */ -H5_DLLVAR hid_t H5E_CANTINC_g; /* Unable to increment reference count */ -H5_DLLVAR hid_t H5E_CANTDEC_g; /* Unable to decrement reference count */ -H5_DLLVAR hid_t H5E_NOIDS_g; /* Out of IDs for group */ - -/* Property list errors */ -#define H5E_CANTGET (H5OPEN H5E_CANTGET_g) -#define H5E_CANTSET (H5OPEN H5E_CANTSET_g) -#define H5E_DUPCLASS (H5OPEN H5E_DUPCLASS_g) -#define H5E_SETDISALLOWED (H5OPEN H5E_SETDISALLOWED_g) -H5_DLLVAR hid_t H5E_CANTGET_g; /* Can't get value */ -H5_DLLVAR hid_t H5E_CANTSET_g; /* Can't set value */ -H5_DLLVAR hid_t H5E_DUPCLASS_g; /* Duplicate class name in parent class */ -H5_DLLVAR hid_t H5E_SETDISALLOWED_g; /* Disallowed operation */ - -/* B-tree related errors */ -#define H5E_NOTFOUND (H5OPEN H5E_NOTFOUND_g) -#define H5E_EXISTS (H5OPEN H5E_EXISTS_g) -#define H5E_CANTENCODE (H5OPEN H5E_CANTENCODE_g) -#define H5E_CANTDECODE (H5OPEN H5E_CANTDECODE_g) -#define H5E_CANTSPLIT (H5OPEN H5E_CANTSPLIT_g) -#define H5E_CANTREDISTRIBUTE (H5OPEN H5E_CANTREDISTRIBUTE_g) -#define H5E_CANTSWAP (H5OPEN H5E_CANTSWAP_g) -#define H5E_CANTINSERT (H5OPEN H5E_CANTINSERT_g) -#define H5E_CANTLIST (H5OPEN H5E_CANTLIST_g) -#define H5E_CANTMODIFY (H5OPEN H5E_CANTMODIFY_g) -#define H5E_CANTREMOVE (H5OPEN H5E_CANTREMOVE_g) -H5_DLLVAR hid_t H5E_NOTFOUND_g; /* Object not found */ -H5_DLLVAR hid_t H5E_EXISTS_g; /* Object already exists */ -H5_DLLVAR hid_t H5E_CANTENCODE_g; /* Unable to encode value */ -H5_DLLVAR hid_t H5E_CANTDECODE_g; /* Unable to decode value */ -H5_DLLVAR hid_t H5E_CANTSPLIT_g; /* Unable to split node */ -H5_DLLVAR hid_t H5E_CANTREDISTRIBUTE_g; /* Unable to redistribute records */ -H5_DLLVAR hid_t H5E_CANTSWAP_g; /* Unable to swap records */ -H5_DLLVAR hid_t H5E_CANTINSERT_g; /* Unable to insert object */ -H5_DLLVAR hid_t H5E_CANTLIST_g; /* Unable to list node */ -H5_DLLVAR hid_t H5E_CANTMODIFY_g; /* Unable to modify record */ -H5_DLLVAR hid_t H5E_CANTREMOVE_g; /* Unable to remove object */ - -/* Group related errors */ -#define H5E_CANTOPENOBJ (H5OPEN H5E_CANTOPENOBJ_g) -#define H5E_CANTCLOSEOBJ (H5OPEN H5E_CANTCLOSEOBJ_g) -#define H5E_COMPLEN (H5OPEN H5E_COMPLEN_g) -#define H5E_PATH (H5OPEN H5E_PATH_g) -H5_DLLVAR hid_t H5E_CANTOPENOBJ_g; /* Can't open object */ -H5_DLLVAR hid_t H5E_CANTCLOSEOBJ_g; /* Can't close object */ -H5_DLLVAR hid_t H5E_COMPLEN_g; /* Name component is too long */ -H5_DLLVAR hid_t H5E_PATH_g; /* Problem with path to object */ +/* Generic low-level file I/O errors */ +#define H5E_SEEKERROR (H5OPEN H5E_SEEKERROR_g) +#define H5E_READERROR (H5OPEN H5E_READERROR_g) +#define H5E_WRITEERROR (H5OPEN H5E_WRITEERROR_g) +#define H5E_CLOSEERROR (H5OPEN H5E_CLOSEERROR_g) +#define H5E_OVERFLOW (H5OPEN H5E_OVERFLOW_g) +#define H5E_FCNTL (H5OPEN H5E_FCNTL_g) +H5_DLLVAR hid_t H5E_SEEKERROR_g; /* Seek failed */ +H5_DLLVAR hid_t H5E_READERROR_g; /* Read failed */ +H5_DLLVAR hid_t H5E_WRITEERROR_g; /* Write failed */ +H5_DLLVAR hid_t H5E_CLOSEERROR_g; /* Close failed */ +H5_DLLVAR hid_t H5E_OVERFLOW_g; /* Address overflowed */ +H5_DLLVAR hid_t H5E_FCNTL_g; /* File control (fcntl) failed */ -/* No error */ -#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g) -H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */ +/* System level errors */ +#define H5E_SYSERRSTR (H5OPEN H5E_SYSERRSTR_g) +H5_DLLVAR hid_t H5E_SYSERRSTR_g; /* System error message */ -/* File accessibilty errors */ -#define H5E_FILEEXISTS (H5OPEN H5E_FILEEXISTS_g) -#define H5E_FILEOPEN (H5OPEN H5E_FILEOPEN_g) -#define H5E_CANTCREATE (H5OPEN H5E_CANTCREATE_g) -#define H5E_CANTOPENFILE (H5OPEN H5E_CANTOPENFILE_g) -#define H5E_CANTCLOSEFILE (H5OPEN H5E_CANTCLOSEFILE_g) -#define H5E_NOTHDF5 (H5OPEN H5E_NOTHDF5_g) -#define H5E_BADFILE (H5OPEN H5E_BADFILE_g) -#define H5E_TRUNCATED (H5OPEN H5E_TRUNCATED_g) -#define H5E_MOUNT (H5OPEN H5E_MOUNT_g) -H5_DLLVAR hid_t H5E_FILEEXISTS_g; /* File already exists */ -H5_DLLVAR hid_t H5E_FILEOPEN_g; /* File already open */ -H5_DLLVAR hid_t H5E_CANTCREATE_g; /* Unable to create file */ -H5_DLLVAR hid_t H5E_CANTOPENFILE_g; /* Unable to open file */ -H5_DLLVAR hid_t H5E_CANTCLOSEFILE_g; /* Unable to close file */ -H5_DLLVAR hid_t H5E_NOTHDF5_g; /* Not an HDF5 file */ -H5_DLLVAR hid_t H5E_BADFILE_g; /* Bad file ID accessed */ -H5_DLLVAR hid_t H5E_TRUNCATED_g; /* File has been truncated */ -H5_DLLVAR hid_t H5E_MOUNT_g; /* File mount error */ +/* I/O pipeline errors */ +#define H5E_NOFILTER (H5OPEN H5E_NOFILTER_g) +#define H5E_CALLBACK (H5OPEN H5E_CALLBACK_g) +#define H5E_CANAPPLY (H5OPEN H5E_CANAPPLY_g) +#define H5E_SETLOCAL (H5OPEN H5E_SETLOCAL_g) +#define H5E_NOENCODER (H5OPEN H5E_NOENCODER_g) +#define H5E_CANTFILTER (H5OPEN H5E_CANTFILTER_g) +H5_DLLVAR hid_t H5E_NOFILTER_g; /* Requested filter is not available */ +H5_DLLVAR hid_t H5E_CALLBACK_g; /* Callback failed */ +H5_DLLVAR hid_t H5E_CANAPPLY_g; /* Error from filter 'can apply' callback */ +H5_DLLVAR hid_t H5E_SETLOCAL_g; /* Error from filter 'set local' callback */ +H5_DLLVAR hid_t H5E_NOENCODER_g; /* Filter present but encoding disabled */ +H5_DLLVAR hid_t H5E_CANTFILTER_g; /* Filter operation failed */ #ifdef __cplusplus } diff --git a/src/H5Eterm.h b/src/H5Eterm.h index b3bdecc..cdc65fc 100644 --- a/src/H5Eterm.h +++ b/src/H5Eterm.h @@ -20,37 +20,37 @@ /* Reset major error IDs */ -H5E_IO_g= -H5E_SOHM_g= -H5E_ATTR_g= -H5E_PLIST_g= -H5E_FUNC_g= -H5E_ERROR_g= -H5E_STORAGE_g= -H5E_OHDR_g= -H5E_PLUGIN_g= +H5E_FILE_g= +H5E_PLINE_g= H5E_TST_g= -H5E_DATASET_g= H5E_BTREE_g= -H5E_SLIST_g= +H5E_HEAP_g= H5E_VFL_g= H5E_DATASPACE_g= -H5E_DATATYPE_g= +H5E_NONE_MAJOR_g= +H5E_FSPACE_g= +H5E_CACHE_g= +H5E_ERROR_g= +H5E_RESOURCE_g= H5E_RS_g= +H5E_ATTR_g= +H5E_EFL_g= +H5E_PLIST_g= +H5E_DATATYPE_g= +H5E_ARGS_g= +H5E_OHDR_g= +H5E_SLIST_g= H5E_ATOM_g= -H5E_CACHE_g= -H5E_INTERNAL_g= +H5E_STORAGE_g= H5E_SYM_g= +H5E_PLUGIN_g= +H5E_FUNC_g= H5E_LINK_g= -H5E_HEAP_g= -H5E_PLINE_g= -H5E_EFL_g= +H5E_INTERNAL_g= +H5E_DATASET_g= H5E_REFERENCE_g= -H5E_FILE_g= -H5E_RESOURCE_g= -H5E_NONE_MAJOR_g= -H5E_ARGS_g= -H5E_FSPACE_g= (-1); +H5E_SOHM_g= +H5E_IO_g= (-1); /* Reset minor error IDs */ @@ -60,17 +60,18 @@ H5E_CANTINIT_g= H5E_ALREADYINIT_g= H5E_CANTRELEASE_g= -/* Link related errors */ -H5E_TRAVERSE_g= -H5E_NLINKS_g= -H5E_NOTREGISTERED_g= -H5E_CANTMOVE_g= -H5E_CANTSORT_g= +/* Free space errors */ +H5E_CANTMERGE_g= +H5E_CANTREVIVE_g= +H5E_CANTSHRINK_g= -/* Parallel MPI errors */ -H5E_MPI_g= -H5E_MPIERRSTR_g= -H5E_CANTRECV_g= +/* Heap errors */ +H5E_CANTRESTORE_g= +H5E_CANTCOMPUTE_g= +H5E_CANTEXTEND_g= +H5E_CANTATTACH_g= +H5E_CANTUPDATE_g= +H5E_CANTOPERATE_g= /* Cache related errors */ H5E_CANTFLUSH_g= @@ -89,31 +90,46 @@ H5E_CANTDIRTY_g= H5E_CANTEXPUNGE_g= H5E_CANTRESIZE_g= -/* Argument errors */ -H5E_UNINITIALIZED_g= -H5E_UNSUPPORTED_g= -H5E_BADTYPE_g= -H5E_BADRANGE_g= -H5E_BADVALUE_g= +/* B-tree related errors */ +H5E_NOTFOUND_g= +H5E_EXISTS_g= +H5E_CANTENCODE_g= +H5E_CANTDECODE_g= +H5E_CANTSPLIT_g= +H5E_CANTREDISTRIBUTE_g= +H5E_CANTSWAP_g= +H5E_CANTINSERT_g= +H5E_CANTLIST_g= +H5E_CANTMODIFY_g= +H5E_CANTREMOVE_g= -/* Plugin errors */ -H5E_OPENERROR_g= +/* Property list errors */ +H5E_CANTGET_g= +H5E_CANTSET_g= +H5E_DUPCLASS_g= +H5E_SETDISALLOWED_g= -/* Generic low-level file I/O errors */ -H5E_SEEKERROR_g= -H5E_READERROR_g= -H5E_WRITEERROR_g= -H5E_CLOSEERROR_g= -H5E_OVERFLOW_g= -H5E_FCNTL_g= +/* File accessibilty errors */ +H5E_FILEEXISTS_g= +H5E_FILEOPEN_g= +H5E_CANTCREATE_g= +H5E_CANTOPENFILE_g= +H5E_CANTCLOSEFILE_g= +H5E_NOTHDF5_g= +H5E_BADFILE_g= +H5E_TRUNCATED_g= +H5E_MOUNT_g= -/* Heap errors */ -H5E_CANTRESTORE_g= -H5E_CANTCOMPUTE_g= -H5E_CANTEXTEND_g= -H5E_CANTATTACH_g= -H5E_CANTUPDATE_g= -H5E_CANTOPERATE_g= +/* Dataspace errors */ +H5E_CANTCLIP_g= +H5E_CANTCOUNT_g= +H5E_CANTSELECT_g= +H5E_CANTNEXT_g= +H5E_BADSELECT_g= +H5E_CANTCOMPARE_g= + +/* Plugin errors */ +H5E_OPENERROR_g= /* Resource errors */ H5E_NOSPACE_g= @@ -127,26 +143,41 @@ H5E_CANTGC_g= H5E_CANTGETSIZE_g= H5E_OBJOPEN_g= -/* I/O pipeline errors */ -H5E_NOFILTER_g= -H5E_CALLBACK_g= -H5E_CANAPPLY_g= -H5E_SETLOCAL_g= -H5E_NOENCODER_g= -H5E_CANTFILTER_g= +/* Argument errors */ +H5E_UNINITIALIZED_g= +H5E_UNSUPPORTED_g= +H5E_BADTYPE_g= +H5E_BADRANGE_g= +H5E_BADVALUE_g= -/* Dataspace errors */ -H5E_CANTCLIP_g= -H5E_CANTCOUNT_g= -H5E_CANTSELECT_g= -H5E_CANTNEXT_g= -H5E_BADSELECT_g= -H5E_CANTCOMPARE_g= +/* No error */ +H5E_NONE_MINOR_g= -/* Free space errors */ -H5E_CANTMERGE_g= -H5E_CANTREVIVE_g= -H5E_CANTSHRINK_g= +/* Link related errors */ +H5E_TRAVERSE_g= +H5E_NLINKS_g= +H5E_NOTREGISTERED_g= +H5E_CANTMOVE_g= +H5E_CANTSORT_g= + +/* Object atom related errors */ +H5E_BADATOM_g= +H5E_BADGROUP_g= +H5E_CANTREGISTER_g= +H5E_CANTINC_g= +H5E_CANTDEC_g= +H5E_NOIDS_g= + +/* Group related errors */ +H5E_CANTOPENOBJ_g= +H5E_CANTCLOSEOBJ_g= +H5E_COMPLEN_g= +H5E_PATH_g= + +/* Parallel MPI errors */ +H5E_MPI_g= +H5E_MPIERRSTR_g= +H5E_CANTRECV_g= /* Object header related errors */ H5E_LINKCOUNT_g= @@ -159,58 +190,27 @@ H5E_CANTPACK_g= H5E_CANTRESET_g= H5E_CANTRENAME_g= -/* System level errors */ -H5E_SYSERRSTR_g= - /* Datatype conversion errors */ H5E_CANTCONVERT_g= H5E_BADSIZE_g= -/* Object atom related errors */ -H5E_BADATOM_g= -H5E_BADGROUP_g= -H5E_CANTREGISTER_g= -H5E_CANTINC_g= -H5E_CANTDEC_g= -H5E_NOIDS_g= - -/* Property list errors */ -H5E_CANTGET_g= -H5E_CANTSET_g= -H5E_DUPCLASS_g= -H5E_SETDISALLOWED_g= - -/* B-tree related errors */ -H5E_NOTFOUND_g= -H5E_EXISTS_g= -H5E_CANTENCODE_g= -H5E_CANTDECODE_g= -H5E_CANTSPLIT_g= -H5E_CANTREDISTRIBUTE_g= -H5E_CANTSWAP_g= -H5E_CANTINSERT_g= -H5E_CANTLIST_g= -H5E_CANTMODIFY_g= -H5E_CANTREMOVE_g= - -/* Group related errors */ -H5E_CANTOPENOBJ_g= -H5E_CANTCLOSEOBJ_g= -H5E_COMPLEN_g= -H5E_PATH_g= +/* Generic low-level file I/O errors */ +H5E_SEEKERROR_g= +H5E_READERROR_g= +H5E_WRITEERROR_g= +H5E_CLOSEERROR_g= +H5E_OVERFLOW_g= +H5E_FCNTL_g= -/* No error */ -H5E_NONE_MINOR_g= +/* System level errors */ +H5E_SYSERRSTR_g= -/* File accessibilty errors */ -H5E_FILEEXISTS_g= -H5E_FILEOPEN_g= -H5E_CANTCREATE_g= -H5E_CANTOPENFILE_g= -H5E_CANTCLOSEFILE_g= -H5E_NOTHDF5_g= -H5E_BADFILE_g= -H5E_TRUNCATED_g= -H5E_MOUNT_g= (-1); +/* I/O pipeline errors */ +H5E_NOFILTER_g= +H5E_CALLBACK_g= +H5E_CANAPPLY_g= +H5E_SETLOCAL_g= +H5E_NOENCODER_g= +H5E_CANTFILTER_g= (-1); #endif /* H5Eterm_H */ diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index ec64e0e..2481391 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -481,7 +481,7 @@ add_test (NAME H5TEST-links_env-clear-objects COMMAND ${CMAKE_COMMAND} -E remove extlinks_env0.h5 extlinks_env1.h5 - tmp/extlinks_env1.h5 + tmp_links_env/extlinks_env1.h5 WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -494,7 +494,7 @@ else () -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" #-D "TEST_ENV_VAR:STRING=HDF5_EXT_PREFIX" - #-D "TEST_ENV_VALUE:STRING=.:tmp" + #-D "TEST_ENV_VALUE:STRING=.:tmp_links_env" -D "TEST_EXPECT=0" -D "TEST_OUTPUT=links_env.txt" -D "TEST_REFERENCE=links_env.out" @@ -504,7 +504,7 @@ else () endif () set_tests_properties (H5TEST-links_env PROPERTIES FIXTURES_REQUIRED clear_links_env - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_EXT_PREFIX=.:tmp" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_EXT_PREFIX=.:tmp_links_env" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index 37ee076..9e7ba7a 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -19,8 +19,8 @@ /* See H5private.h for how to include headers */ #undef NDEBUG -#define H5T_PACKAGE -#include "H5Tpkg.h" /*to turn off hardware conversions*/ +#define H5T_PACKAGE /*suppress error about including H5Tpkg */ +#include "H5Tpkg.h" /*to turn off hardware conversions*/ #include "H5Iprivate.h" #include "h5test.h" @@ -120,91 +120,103 @@ typedef struct { long long r, s, t; } stype4; -#define NX 100u -#define NY 2000u +#define NX 100u +#define NY 2000u #define PACK_NMEMBS 100 - + /*------------------------------------------------------------------------- - * Function: test_compound + * Function: test_compound * - * Purpose: Creates a simple dataset of a compound type and then reads - * it back. The dataset is read back in various ways to - * exercise the I/O pipeline and compound type conversion. + * Purpose: Creates a simple dataset of a compound type and then reads + * it back. The dataset is read back in various ways to + * exercise the I/O pipeline and compound type conversion. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Friday, January 23, 1998 * * Modifications: - * Robb Matzke, 1999-06-23 - * If the command line switch `--noopt' is present then the fast - * compound datatype conversion is turned off. + * Robb Matzke, 1999-06-23 + * If the command line switch `--noopt' is present then the fast + * compound datatype conversion is turned off. * * Raymond Lu, 15 June 2007 * Moved this part of code from MAIN to TEST_COMPOUND function. *------------------------------------------------------------------------- */ -static int +static unsigned test_compound (char *filename, hid_t fapl) { /* First dataset */ - static s1_t s1[NX*NY]; - hid_t s1_tid; + s1_t *s1 = NULL; + hid_t s1_tid; /* Second dataset */ - static s2_t s2[NX*NY]; - hid_t s2_tid; + s2_t *s2 = NULL; + hid_t s2_tid; /* Third dataset */ - static s3_t s3[NX*NY]; - hid_t s3_tid; + s3_t *s3 = NULL; + hid_t s3_tid; /* Fourth dataset */ - static s4_t s4[NX*NY]; - hid_t s4_tid; + s4_t *s4 = NULL; + hid_t s4_tid; /* Fifth dataset */ - static s5_t s5[NX*NY]; - hid_t s5_tid; - - static s6_t s6[NX*NY]; - hid_t s6_tid; - + s5_t *s5 = NULL; + hid_t s5_tid; /* Sixth dataset */ + s6_t *s6 = NULL; + hid_t s6_tid; /* Seventh dataset */ - hid_t s7_sid; + hid_t s7_sid; /* Eighth dataset */ - s1_t *s8 = NULL; - hid_t s8_f_sid; /*file data space */ - hid_t s8_m_sid; /*memory data space */ + s1_t *s8 = NULL; + hid_t s8_f_sid; /*file data space */ + hid_t s8_m_sid; /*memory data space */ /* Ninth dataset */ /* Tenth dataset */ /* Eleventh dataset */ - s4_t *s11 = NULL; + s4_t *s11 = NULL; /* Other variables */ - unsigned int i, j; - hid_t file, dataset, space, PRESERVE; + unsigned int i, j; + hid_t file, dataset, space, PRESERVE; hid_t array_dt; - static hsize_t dim[] = {NX, NY}; - hsize_t f_offset[2]; /*offset of hyperslab in file */ - hsize_t h_size[2]; /*size of hyperslab */ - hsize_t memb_size[1] = {4}; - int ret_code; + static hsize_t dim[] = {NX, NY}; + hsize_t f_offset[2]; /*offset of hyperslab in file */ + hsize_t h_size[2]; /*size of hyperslab */ + hsize_t memb_size[1] = {4}; + int ret_code; + + /* Allocate buffers for datasets */ + if(NULL == (s1 = (s1_t *)HDmalloc(sizeof(s1_t) * NX * NY))) + goto error; + if(NULL == (s2 = (s2_t *)HDmalloc(sizeof(s2_t) * NX * NY))) + goto error; + if(NULL == (s3 = (s3_t *)HDmalloc(sizeof(s3_t) * NX * NY))) + goto error; + if(NULL == (s4 = (s4_t *)HDmalloc(sizeof(s4_t) * NX * NY))) + goto error; + if(NULL == (s5 = (s5_t *)HDmalloc(sizeof(s5_t) * NX * NY))) + goto error; + if(NULL == (s6 = (s6_t *)HDmalloc(sizeof(s6_t) * NX * NY))) + goto error; /* Create the file */ if ((file = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) { - goto error; + goto error; } /* Create the data space */ @@ -214,15 +226,15 @@ test_compound (char *filename, hid_t fapl) /* Also verify H5Pset_preserve is initially 0 and then is set to 1. */ if ((PRESERVE = H5Pcreate (H5P_DATASET_XFER))<0) goto error; if ((ret_code=H5Pget_preserve (PRESERVE)) != 0){ - HDprintf("Preserve status of dataset transfer property list should be" - " 0 (FALSE), got %d\n", ret_code); - goto error; + HDprintf("Preserve status of dataset transfer property list should be" + " 0 (FALSE), got %d\n", ret_code); + goto error; } if (H5Pset_preserve (PRESERVE, 1)<0) goto error; if ((ret_code=H5Pget_preserve (PRESERVE)) != 1){ - HDprintf("Preserve status of dataset transfer property list should be" - " 1 (TRUE), got %d\n", ret_code); - goto error; + HDprintf("Preserve status of dataset transfer property list should be" + " 1 (TRUE), got %d\n", ret_code); + goto error; } /* @@ -233,14 +245,14 @@ test_compound (char *filename, hid_t fapl) /* Initialize the dataset */ for (i=0; ia != ps1->a || - ps8->b != ps1->b || - ps8->c[0] != ps1->c[0] || - ps8->c[1] != ps1->c[1] || - ps8->c[2] != ps1->c[2] || - ps8->c[3] != ps1->c[3] || - ps8->d != ps1->d || - ps8->e != ps1->e) { - H5_FAILED(); - puts(" Incorrect values read from file"); - goto error; - } - } + for (j=0; ja != ps1->a || + ps8->b != ps1->b || + ps8->c[0] != ps1->c[0] || + ps8->c[1] != ps1->c[1] || + ps8->c[2] != ps1->c[2] || + ps8->c[3] != ps1->c[3] || + ps8->d != ps1->d || + ps8->e != ps1->e) { + H5_FAILED(); + puts(" Incorrect values read from file"); + goto error; + } + } } HDfree (s8); @@ -656,51 +668,51 @@ test_compound (char *filename, hid_t fapl) /* Initialize */ for (i=0; i=f_offset[0] && - i=f_offset[1] && - ja != ps1->a || - ps2->b != ps1->b || - ps2->c[0] != ps1->c[0] || - ps2->c[1] != ps1->c[1] || - ps2->c[2] != ps1->c[2] || - ps2->c[3] != ps1->c[3] || - ps2->d != ps1->d || - ps2->e != ps1->e) { - H5_FAILED(); - puts(" Memory values clobbered"); - goto error; - } - } else { - if (ps2->a != (unsigned)(-1) || - ps2->b != (unsigned)(-1) || - ps2->c[0] != (unsigned)(-1) || - ps2->c[1] != (unsigned)(-1) || - ps2->c[2] != (unsigned)(-1) || - ps2->c[3] != (unsigned)(-1) || - ps2->d != (unsigned)(-1) || - ps2->e != (unsigned)(-1)) { - H5_FAILED(); - puts(" Incorrect values read from file"); - goto error; - } - } - } + for (j=0; j=f_offset[0] && + i=f_offset[1] && + ja != ps1->a || + ps2->b != ps1->b || + ps2->c[0] != ps1->c[0] || + ps2->c[1] != ps1->c[1] || + ps2->c[2] != ps1->c[2] || + ps2->c[3] != ps1->c[3] || + ps2->d != ps1->d || + ps2->e != ps1->e) { + H5_FAILED(); + puts(" Memory values clobbered"); + goto error; + } + } else { + if (ps2->a != (unsigned)(-1) || + ps2->b != (unsigned)(-1) || + ps2->c[0] != (unsigned)(-1) || + ps2->c[1] != (unsigned)(-1) || + ps2->c[2] != (unsigned)(-1) || + ps2->c[3] != (unsigned)(-1) || + ps2->d != (unsigned)(-1) || + ps2->e != (unsigned)(-1)) { + H5_FAILED(); + puts(" Incorrect values read from file"); + goto error; + } + } + } } PASSED(); @@ -713,60 +725,60 @@ test_compound (char *filename, hid_t fapl) /* Initialize */ for (i=0; i=f_offset[0] && - i=f_offset[1] && - jpre != (unsigned)(-1) || - ps5->a != ps1->a || - ps5->b != ps1->b || - ps5->mid1 != (unsigned)(-1) || - ps5->c[0] != ps1->c[0] || - ps5->c[1] != ps1->c[1] || - ps5->c[2] != ps1->c[2] || - ps5->c[3] != ps1->c[3] || - ps5->mid2 != (unsigned)(-1) || - ps5->d != ps1->d || - ps5->e != ps1->e || - ps5->post != (unsigned)(-1)) { - H5_FAILED(); - puts(" Memory values clobbered"); - goto error; - } - } else { - if (ps5->pre != (unsigned)(-1) || - ps5->a != (unsigned)(-1) || - ps5->b != (unsigned)(-1) || - ps5->mid1 != (unsigned)(-1) || - ps5->c[0] != (unsigned)(-1) || - ps5->c[1] != (unsigned)(-1) || - ps5->c[2] != (unsigned)(-1) || - ps5->c[3] != (unsigned)(-1) || - ps5->mid2 != (unsigned)(-1) || - ps5->d != (unsigned)(-1) || - ps5->e != (unsigned)(-1) || - ps5->post != (unsigned)(-1)) { - H5_FAILED(); - puts(" Incorrect values read from file"); - goto error; - } - } - } + for (j=0; j=f_offset[0] && + i=f_offset[1] && + jpre != (unsigned)(-1) || + ps5->a != ps1->a || + ps5->b != ps1->b || + ps5->mid1 != (unsigned)(-1) || + ps5->c[0] != ps1->c[0] || + ps5->c[1] != ps1->c[1] || + ps5->c[2] != ps1->c[2] || + ps5->c[3] != ps1->c[3] || + ps5->mid2 != (unsigned)(-1) || + ps5->d != ps1->d || + ps5->e != ps1->e || + ps5->post != (unsigned)(-1)) { + H5_FAILED(); + puts(" Memory values clobbered"); + goto error; + } + } else { + if (ps5->pre != (unsigned)(-1) || + ps5->a != (unsigned)(-1) || + ps5->b != (unsigned)(-1) || + ps5->mid1 != (unsigned)(-1) || + ps5->c[0] != (unsigned)(-1) || + ps5->c[1] != (unsigned)(-1) || + ps5->c[2] != (unsigned)(-1) || + ps5->c[3] != (unsigned)(-1) || + ps5->mid2 != (unsigned)(-1) || + ps5->d != (unsigned)(-1) || + ps5->e != (unsigned)(-1) || + ps5->post != (unsigned)(-1)) { + H5_FAILED(); + puts(" Incorrect values read from file"); + goto error; + } + } + } } PASSED(); @@ -787,56 +799,56 @@ test_compound (char *filename, hid_t fapl) /* Initialize */ for (i=0; ia != 8*(i*NY+j)+0 || - ps1->c[0] != 8*(i*NY+j)+2 || - ps1->c[1] != 8*(i*NY+j)+3 || - ps1->c[2] != 8*(i*NY+j)+4 || - ps1->c[3] != 8*(i*NY+j)+5 || - ps1->e != 8*(i*NY+j)+7) { - H5_FAILED(); - puts(" Write clobbered values"); - goto error; - } - - if (i>=f_offset[0] && - i=f_offset[1] && - jb != (unsigned)(-1) || - ps1->d != (unsigned)(-1)) { - H5_FAILED(); - puts(" Wrong values written or read"); - goto error; - } - } else { - if (ps1->b != 8*(i*NY+j)+1 || - ps1->d != 8*(i*NY+j)+6) { - H5_FAILED(); - puts(" Write clobbered values"); - goto error; - } - } - } + for (j=0; ja != 8*(i*NY+j)+0 || + ps1->c[0] != 8*(i*NY+j)+2 || + ps1->c[1] != 8*(i*NY+j)+3 || + ps1->c[2] != 8*(i*NY+j)+4 || + ps1->c[3] != 8*(i*NY+j)+5 || + ps1->e != 8*(i*NY+j)+7) { + H5_FAILED(); + puts(" Write clobbered values"); + goto error; + } + + if (i>=f_offset[0] && + i=f_offset[1] && + jb != (unsigned)(-1) || + ps1->d != (unsigned)(-1)) { + H5_FAILED(); + puts(" Wrong values written or read"); + goto error; + } + } else { + if (ps1->b != 8*(i*NY+j)+1 || + ps1->d != 8*(i*NY+j)+6) { + H5_FAILED(); + puts(" Write clobbered values"); + goto error; + } + } + } } /* @@ -846,21 +858,44 @@ test_compound (char *filename, hid_t fapl) H5Dclose (dataset); H5Fclose (file); + /* Release buffers */ + HDfree(s1); + HDfree(s2); + HDfree(s3); + HDfree(s4); + HDfree(s5); + HDfree(s6); + PASSED(); return 0; error: puts("*** DATASET TESTS FAILED ***"); + + /* Release resources */ + if(s1) + HDfree(s1); + if(s2) + HDfree(s2); + if(s3) + HDfree(s3); + if(s4) + HDfree(s4); + if(s5) + HDfree(s5); + if(s6) + HDfree(s6); + return 1; } - + /*------------------------------------------------------------------------- - * Function: initialize_stype1 + * Function: initialize_stype1 * - * Purpose: Initialize data buffer. + * Purpose: Initialize data buffer. * - * Return: void + * Return: void * * Programmer: Raymond Lu * Friday, 15 June 2007 @@ -869,41 +904,41 @@ error: *------------------------------------------------------------------------- */ static void -initialize_stype1(unsigned char *buf, const size_t num) +initialize_stype1(unsigned char *buf, size_t num) { - int i, j; + int i, j; stype1 *s_ptr; - for (i=0; i<(int)num; i++) { - s_ptr = (stype1*)buf + i; - s_ptr->a = i*8+0; - s_ptr->b = i*8+1; - for(j=0; j<8; j++) - s_ptr->c[j] = i*8+j; - s_ptr->d = i*8+6; - s_ptr->e = i*8+7; - - s_ptr->f = i*2/3; - s_ptr->g = i*2/3+1; - for(j=0; j<16; j++) - s_ptr->h[j] = i*j/5+j; - s_ptr->i = i*2/3+2; - s_ptr->j = i*2/3+3; - - s_ptr->k = i/7+1; - s_ptr->l = i/7+2; - s_ptr->m = i/7+3; - s_ptr->n = i/7+4; + for(i = 0; i < (int)num; i++) { + s_ptr = (stype1 *)((void *)buf) + i; + s_ptr->a = i * 8 + 0; + s_ptr->b = i * 8 + 1; + for(j = 0; j < 8; j++) + s_ptr->c[j] = i * 8 + j; + s_ptr->d = i * 8 + 6; + s_ptr->e = i * 8 + 7; + + s_ptr->f = (float)(i * 2 / 3); + s_ptr->g = (float)(i * 2 / 3 + 1); + for(j = 0; j < 16; j++) + s_ptr->h[j] = (float)(i * j / 5 + j); + s_ptr->i = (float)(i * 2 / 3 + 2); + s_ptr->j = (float)(i * 2 / 3 + 3); + + s_ptr->k = i / 7 + 1; + s_ptr->l = i / 7 + 2; + s_ptr->m = i / 7 + 3; + s_ptr->n = i / 7 + 4; } } - + /*------------------------------------------------------------------------- - * Function: initialize_stype2 + * Function: initialize_stype2 * - * Purpose: Initialize data buffer. + * Purpose: Initialize data buffer. * - * Return: void + * Return: void * * Programmer: Raymond Lu * Friday, 15 June 2007 @@ -912,45 +947,45 @@ initialize_stype1(unsigned char *buf, const size_t num) *------------------------------------------------------------------------- */ static void -initialize_stype2(unsigned char *buf, const size_t num) +initialize_stype2(unsigned char *buf, size_t num) { size_t i, j; stype2 *s_ptr; - for (i=0; ia = i*8+0; - s_ptr->b = i*8+1; - for(j=0; j<8; j++) - s_ptr->c[j] = i*8+j; - s_ptr->d = i*8+6; - s_ptr->e = i*8+7; - - s_ptr->f = i*2/3; - s_ptr->g = i*2/3+1; - for(j=0; j<16; j++) - s_ptr->h[j] = i*j/5+j; - s_ptr->i = i*2/3+2; - s_ptr->j = i*2/3+3; - - s_ptr->k = i/7+1; - s_ptr->l = i/7+2; - s_ptr->m = i/7+3; - s_ptr->n = i/7+4; - - s_ptr->o = i*3+0; - s_ptr->p = i*3+1; - s_ptr->q = i*3+2; + for(i = 0; i < num; i++) { + s_ptr = (stype2 *)((void *)buf) + i; + s_ptr->a = (int)(i * 8 + 0); + s_ptr->b = (int)(i * 8 + 1); + for(j = 0; j < 8; j++) + s_ptr->c[j] = (int)(i * 8 + j); + s_ptr->d = (int)(i * 8 + 6); + s_ptr->e = (int)(i * 8 + 7); + + s_ptr->f = (float)(i * 2 / 3); + s_ptr->g = (float)(i * 2 / 3 + 1); + for(j = 0; j < 16; j++) + s_ptr->h[j] = (float)(i * j / 5 + j); + s_ptr->i = (float)(i * 2 / 3 + 2); + s_ptr->j = (float)(i * 2 / 3 + 3); + + s_ptr->k = (double)(i / 7 + 1); + s_ptr->l = (double)(i / 7 + 2); + s_ptr->m = (double)(i / 7 + 3); + s_ptr->n = (double)(i / 7 + 4); + + s_ptr->o = (long)(i * 3 + 0); + s_ptr->p = (long)(i * 3 + 1); + s_ptr->q = (long)(i * 3 + 2); } } - + /*------------------------------------------------------------------------- - * Function: initialize_stype3 + * Function: initialize_stype3 * - * Purpose: Initialize data buffer. + * Purpose: Initialize data buffer. * - * Return: Success: + * Return: Success: * * Programmer: Raymond Lu * Friday, 15 June 2007 @@ -959,29 +994,29 @@ initialize_stype2(unsigned char *buf, const size_t num) *------------------------------------------------------------------------- */ static void -initialize_stype3(unsigned char *buf, const size_t num) +initialize_stype3(unsigned char *buf, size_t num) { - int i, j; + int i, j; stype3 *s_ptr; - for (i=0; i<(int)num; i++) { - s_ptr = (stype3*)buf + i; - s_ptr->a = i*8+0; - s_ptr->b = i*8+1; - for(j=0; j<8; j++) - s_ptr->c[j] = i*8+j; - s_ptr->d = i*8+6; - s_ptr->e = i*8+7; + for(i = 0; i < (int)num; i++) { + s_ptr = (stype3 *)((void *)buf) + i; + s_ptr->a = i * 8 + 0; + s_ptr->b = i * 8 + 1; + for(j = 0; j < 8; j++) + s_ptr->c[j] = i * 8 + j; + s_ptr->d = i * 8 + 6; + s_ptr->e = i * 8 + 7; } } - + /*------------------------------------------------------------------------- - * Function: initialize_stype4 + * Function: initialize_stype4 * - * Purpose: Initialize data buffer. + * Purpose: Initialize data buffer. * - * Return: void + * Return: void * * Programmer: Raymond Lu * Friday, 15 June 2007 @@ -990,49 +1025,49 @@ initialize_stype3(unsigned char *buf, const size_t num) *------------------------------------------------------------------------- */ static void -initialize_stype4(unsigned char *buf, const size_t num) +initialize_stype4(unsigned char *buf, size_t num) { size_t i, j; stype4 *s_ptr; - for (i=0; ia = i*8+0; - s_ptr->b = i*8+1; - for(j=0; j<8; j++) - s_ptr->c[j] = i*8+j; - s_ptr->d = i*8+6; - s_ptr->e = i*8+7; - - s_ptr->f = i*2/3; - s_ptr->g = i*2/3+1; - for(j=0; j<16; j++) - s_ptr->h[j] = i*j/5+j; - s_ptr->i = i*2/3+2; - s_ptr->j = i*2/3+3; - - s_ptr->k = i/7+1; - s_ptr->l = i/7+2; - s_ptr->m = i/7+3; - s_ptr->n = i/7+4; - - s_ptr->o = i*3+0; - s_ptr->p = i*3+1; - s_ptr->q = i*3+2; - - s_ptr->r = i*5+1; - s_ptr->s = i*5+2; - s_ptr->t = i*5+3; + for(i = 0; i < num; i++) { + s_ptr = (stype4 *)((void *)buf) + i; + s_ptr->a = (int)(i * 8 + 0); + s_ptr->b = (int)(i * 8 + 1); + for(j = 0; j < 8; j++) + s_ptr->c[j] = (int)(i * 8 + j); + s_ptr->d = (int)(i * 8 + 6); + s_ptr->e = (int)(i * 8 + 7); + + s_ptr->f = (float)(i * 2 / 3); + s_ptr->g = (float)(i * 2 / 3 + 1); + for(j = 0; j < 16; j++) + s_ptr->h[j] = (float)(i * j / 5 + j); + s_ptr->i = (float)(i * 2 / 3 + 2); + s_ptr->j = (float)(i * 2 / 3 + 3); + + s_ptr->k = (double)(i / 7 + 1); + s_ptr->l = (double)(i / 7 + 2); + s_ptr->m = (double)(i / 7 + 3); + s_ptr->n = (double)(i / 7 + 4); + + s_ptr->o = (long)(i * 3 + 0); + s_ptr->p = (long)(i * 3 + 1); + s_ptr->q = (long)(i * 3 + 2); + + s_ptr->r = (long long)(i * 5 + 1); + s_ptr->s = (long long)(i * 5 + 2); + s_ptr->t = (long long)(i * 5 + 3); } } - + /*------------------------------------------------------------------------- - * Function: create_stype1 + * Function: create_stype1 * - * Purpose: Create HDF5 compound datatype for stype1. + * Purpose: Create HDF5 compound datatype for stype1. * - * Return: Success: datatype ID + * Return: Success: datatype ID * * Failure: negative * @@ -1046,7 +1081,7 @@ static hid_t create_stype1(void) { hid_t array_dt1, array_dt2, tid; - const hsize_t eight = 8, sixteen = 16; + const hsize_t eight = 8, sixteen = 16; /* Build hdf5 datatypes */ if((array_dt1 = H5Tarray_create2(H5T_NATIVE_INT,1, &eight)) < 0) @@ -1082,13 +1117,13 @@ error: return FAIL; } - + /*------------------------------------------------------------------------- - * Function: create_stype2 + * Function: create_stype2 * - * Purpose: Create HDF5 compound datatype for stype2. + * Purpose: Create HDF5 compound datatype for stype2. * - * Return: Success: datatype ID + * Return: Success: datatype ID * * Failure: negative * @@ -1102,7 +1137,7 @@ static hid_t create_stype2(void) { hid_t array_dt1, array_dt2, tid; - const hsize_t eight = 8, sixteen = 16; + const hsize_t eight = 8, sixteen = 16; /* Build hdf5 datatypes */ if((array_dt1 = H5Tarray_create2(H5T_NATIVE_INT,1, &eight)) < 0) @@ -1141,13 +1176,13 @@ error: return FAIL; } - + /*------------------------------------------------------------------------- - * Function: create_stype3 + * Function: create_stype3 * - * Purpose: Create HDF5 compound datatype for stype3. + * Purpose: Create HDF5 compound datatype for stype3. * - * Return: Success: datatype ID + * Return: Success: datatype ID * * Failure: negative * @@ -1161,7 +1196,7 @@ static hid_t create_stype3(void) { hid_t array_dt1, tid; - const hsize_t eight = 8; + const hsize_t eight = 8; /* Build hdf5 datatypes */ if((array_dt1 = H5Tarray_create2(H5T_NATIVE_INT,1, &eight)) < 0) @@ -1184,13 +1219,13 @@ error: return FAIL; } - + /*------------------------------------------------------------------------- - * Function: create_stype4 + * Function: create_stype4 * - * Purpose: Create HDF5 compound datatype for stype4. + * Purpose: Create HDF5 compound datatype for stype4. * - * Return: Success: datatype ID + * Return: Success: datatype ID * * Failure: negative * @@ -1204,7 +1239,7 @@ static hid_t create_stype4(void) { hid_t array_dt1, array_dt2, tid; - const hsize_t eight = 8, sixteen = 16; + const hsize_t eight = 8, sixteen = 16; /* Build hdf5 datatypes */ if((array_dt1 = H5Tarray_create2(H5T_NATIVE_INT,1, &eight)) < 0) @@ -1246,13 +1281,13 @@ error: return FAIL; } - + /*------------------------------------------------------------------------- - * Function: compare_data + * Function: compare_data * - * Purpose: Compare data of stype1 and stype2. + * Purpose: Compare data of stype1 and stype2. * - * Return: Success: 0 + * Return: Success: 0 * * Failure: negative * @@ -1271,51 +1306,51 @@ compare_data(void *src_data, void *dst_data, hbool_t src_subset) for(i = 0; i < (int)(NX * NY); i++) { if(src_subset) { - s_ptr = ((stype1 *)src_data) + i; - d_ptr = ((stype2 *)dst_data) + i; + s_ptr = ((stype1 *)src_data) + i; + d_ptr = ((stype2 *)dst_data) + i; } else { - s_ptr = (stype1 *)(((stype2 *)src_data) + i); - d_ptr = (stype2 *)(((stype1 *)dst_data) + i); + s_ptr = (stype1 *)(((stype2 *)src_data) + i); + d_ptr = (stype2 *)(((stype1 *)dst_data) + i); } - if (s_ptr->a != d_ptr->a || - s_ptr->b != d_ptr->b || - s_ptr->c[0] != d_ptr->c[0] || - s_ptr->c[1] != d_ptr->c[1] || - s_ptr->c[2] != d_ptr->c[2] || - s_ptr->c[3] != d_ptr->c[3] || - s_ptr->d != d_ptr->d || - s_ptr->e != d_ptr->e || - !FLT_ABS_EQUAL(s_ptr->f, d_ptr->f) || - !FLT_ABS_EQUAL(s_ptr->g, d_ptr->g) || - !FLT_ABS_EQUAL(s_ptr->h[0], d_ptr->h[0]) || - !FLT_ABS_EQUAL(s_ptr->h[1], d_ptr->h[1]) || - !FLT_ABS_EQUAL(s_ptr->i, d_ptr->i) || - !FLT_ABS_EQUAL(s_ptr->j, d_ptr->j) || - !DBL_ABS_EQUAL(s_ptr->k, d_ptr->k) || - !DBL_ABS_EQUAL(s_ptr->l, d_ptr->l) || - !DBL_ABS_EQUAL(s_ptr->m, d_ptr->m) || - !DBL_ABS_EQUAL(s_ptr->n, d_ptr->n) ) { - - H5_FAILED(); - HDprintf(" i=%d\n", i); - HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d,%d,%d,%d,%d], d=%d, e=%d, f=%f, g=%f, h=[%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f], i=%f, j=%f, k=%f, l=%f, m=%f, n=%f}\n", - s_ptr->a, s_ptr->b, s_ptr->c[0], s_ptr->c[1], s_ptr->c[2], - s_ptr->c[3], s_ptr->c[4], s_ptr->c[5], s_ptr->c[6], s_ptr->c[7], - s_ptr->d, s_ptr->e, s_ptr->f, s_ptr->g,s_ptr->h[0],s_ptr->h[1],s_ptr->h[2], - s_ptr->h[3],s_ptr->h[4],s_ptr->h[5],s_ptr->h[6],s_ptr->h[7],s_ptr->h[8], - s_ptr->h[9],s_ptr->h[10],s_ptr->h[11],s_ptr->h[12],s_ptr->h[13],s_ptr->h[14], - s_ptr->h[15], s_ptr->i,s_ptr->j,s_ptr->k,s_ptr->l,s_ptr->m,s_ptr->n); - HDprintf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d,%d,%d,%d,%d], d=%d, e=%d, f=%f, g=%f, h=[%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f], i=%f, j=%f, k=%f, l=%f, m=%f, n=%f}\n", - d_ptr->a, d_ptr->b, d_ptr->c[0], d_ptr->c[1], d_ptr->c[2], - d_ptr->c[3], d_ptr->c[4], d_ptr->c[5], d_ptr->c[6], d_ptr->c[7], - d_ptr->d, d_ptr->e, d_ptr->f, d_ptr->g,d_ptr->h[0],d_ptr->h[1],d_ptr->h[2], - d_ptr->h[3],d_ptr->h[4],d_ptr->h[5],d_ptr->h[6],d_ptr->h[7],d_ptr->h[8], - d_ptr->h[9],d_ptr->h[10],d_ptr->h[11],d_ptr->h[12],d_ptr->h[13], - d_ptr->h[14], d_ptr->h[15], d_ptr->i,d_ptr->j,d_ptr->k,d_ptr->l, + if (s_ptr->a != d_ptr->a || + s_ptr->b != d_ptr->b || + s_ptr->c[0] != d_ptr->c[0] || + s_ptr->c[1] != d_ptr->c[1] || + s_ptr->c[2] != d_ptr->c[2] || + s_ptr->c[3] != d_ptr->c[3] || + s_ptr->d != d_ptr->d || + s_ptr->e != d_ptr->e || + !H5_FLT_ABS_EQUAL(s_ptr->f, d_ptr->f) || + !H5_FLT_ABS_EQUAL(s_ptr->g, d_ptr->g) || + !H5_FLT_ABS_EQUAL(s_ptr->h[0], d_ptr->h[0]) || + !H5_FLT_ABS_EQUAL(s_ptr->h[1], d_ptr->h[1]) || + !H5_FLT_ABS_EQUAL(s_ptr->i, d_ptr->i) || + !H5_FLT_ABS_EQUAL(s_ptr->j, d_ptr->j) || + !H5_DBL_ABS_EQUAL(s_ptr->k, d_ptr->k) || + !H5_DBL_ABS_EQUAL(s_ptr->l, d_ptr->l) || + !H5_DBL_ABS_EQUAL(s_ptr->m, d_ptr->m) || + !H5_DBL_ABS_EQUAL(s_ptr->n, d_ptr->n) ) { + + H5_FAILED(); + HDprintf(" i=%d\n", i); + HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d,%d,%d,%d,%d], d=%d, e=%d, f=%f, g=%f, h=[%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f], i=%f, j=%f, k=%f, l=%f, m=%f, n=%f}\n", + s_ptr->a, s_ptr->b, s_ptr->c[0], s_ptr->c[1], s_ptr->c[2], + s_ptr->c[3], s_ptr->c[4], s_ptr->c[5], s_ptr->c[6], s_ptr->c[7], + s_ptr->d, s_ptr->e, (double)s_ptr->f, (double)s_ptr->g,(double)s_ptr->h[0],(double)s_ptr->h[1],(double)s_ptr->h[2], + (double)s_ptr->h[3],(double)s_ptr->h[4],(double)s_ptr->h[5],(double)s_ptr->h[6],(double)s_ptr->h[7],(double)s_ptr->h[8], + (double)s_ptr->h[9],(double)s_ptr->h[10],(double)s_ptr->h[11],(double)s_ptr->h[12],(double)s_ptr->h[13],(double)s_ptr->h[14], + (double)s_ptr->h[15], (double)s_ptr->i,(double)s_ptr->j,s_ptr->k,s_ptr->l,s_ptr->m,s_ptr->n); + HDprintf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d,%d,%d,%d,%d], d=%d, e=%d, f=%f, g=%f, h=[%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f], i=%f, j=%f, k=%f, l=%f, m=%f, n=%f}\n", + d_ptr->a, d_ptr->b, d_ptr->c[0], d_ptr->c[1], d_ptr->c[2], + d_ptr->c[3], d_ptr->c[4], d_ptr->c[5], d_ptr->c[6], d_ptr->c[7], + d_ptr->d, d_ptr->e, (double)d_ptr->f, (double)d_ptr->g,(double)d_ptr->h[0],(double)d_ptr->h[1],(double)d_ptr->h[2], + (double)d_ptr->h[3],(double)d_ptr->h[4],(double)d_ptr->h[5],(double)d_ptr->h[6],(double)d_ptr->h[7],(double)d_ptr->h[8], + (double)d_ptr->h[9],(double)d_ptr->h[10],(double)d_ptr->h[11],(double)d_ptr->h[12],(double)d_ptr->h[13], + (double)d_ptr->h[14],(double)d_ptr->h[15],(double)d_ptr->i,(double)d_ptr->j,d_ptr->k,d_ptr->l, d_ptr->m,d_ptr->n); - goto error; - } + goto error; + } } return SUCCEED; @@ -1324,11 +1359,11 @@ error: return FAIL; } - + /*------------------------------------------------------------------------- - * Function: test_hdf5_src_subset + * Function: test_hdf5_src_subset * - * Purpose: Test the optimization of compound data writing, rewriting, + * Purpose: Test the optimization of compound data writing, rewriting, * and reading when the source type is a subset of destination * type. For example: * struct source { struct destination { @@ -1340,17 +1375,17 @@ error: * }; * This optimization is for the Chicago company. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * Friday, 15 June 2007 * * Modifications: *------------------------------------------------------------------------- */ -static int +static unsigned test_hdf5_src_subset(char *filename, hid_t fapl) { hid_t file; @@ -1364,7 +1399,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl) /* Create the file for this test */ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto error; + goto error; /* Build hdf5 datatypes */ if ((src_tid=create_stype1()) < 0) @@ -1378,7 +1413,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl) /* Create the data space */ if((space = H5Screate_simple(2, dims, NULL)) < 0) - goto error; + goto error; /* Allocate space and initialize data */ orig = (unsigned char*)HDmalloc(NX * NY * sizeof(stype1)); @@ -1406,7 +1441,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl) /* Write the data to the dataset */ if(H5Dwrite(dataset, src_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig) < 0) - goto error; + goto error; if(H5Dclose(dataset) < 0) goto error; @@ -1421,7 +1456,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl) /* Write the data to the dataset */ if(H5Dwrite(dataset, src_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig) < 0) - goto error; + goto error; if(H5Dclose(dataset) < 0) goto error; @@ -1447,7 +1482,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl) /* Write the data to the dataset */ if(H5Dwrite(dataset, rew_tid, H5S_ALL, H5S_ALL, dxpl, rew_buf) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR if(H5Dclose(dataset) < 0) FAIL_STACK_ERROR @@ -1458,7 +1493,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl) /* Write the data to the dataset */ if(H5Dwrite(dataset, rew_tid, H5S_ALL, H5S_ALL, dxpl, rew_buf) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR if(H5Dclose(dataset) < 0) FAIL_STACK_ERROR @@ -1524,15 +1559,15 @@ test_hdf5_src_subset(char *filename, hid_t fapl) return 0; error: - puts("*** DATASET TESTS FAILED ***"); + HDputs("*** DATASET TESTS FAILED ***"); return 1; } - + /*------------------------------------------------------------------------- - * Function: test_hdf5_dst_subset + * Function: test_hdf5_dst_subset * - * Purpose: Test the optimization of compound data writing, rewriting, + * Purpose: Test the optimization of compound data writing, rewriting, * and reading when the destination type is a subset of the * source type. For example: * struct source { struct destination { @@ -1545,17 +1580,17 @@ error: * This optimization is for the Chicago company. This test * is in opposite of test_hdf5_src_subset. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * Friday, 15 June 2007 * * Modifications: *------------------------------------------------------------------------- */ -static int +static unsigned test_hdf5_dst_subset(char *filename, hid_t fapl) { hid_t file; @@ -1569,7 +1604,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl) /* Create the file for this test */ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto error; + goto error; /* Build hdf5 datatypes */ if ((src_tid=create_stype2()) < 0) @@ -1583,7 +1618,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl) /* Create the data space */ if((space = H5Screate_simple(2, dims, NULL)) < 0) - goto error; + goto error; /* Allocate space and initialize data */ orig = (unsigned char*)HDmalloc(NX * NY * sizeof(stype2)); @@ -1610,7 +1645,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl) /* Write the data to the dataset */ if(H5Dwrite(dataset, src_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig) < 0) - goto error; + goto error; if(H5Dclose(dataset) < 0) goto error; @@ -1625,7 +1660,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl) /* Write the data to the dataset */ if(H5Dwrite(dataset, src_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig) < 0) - goto error; + goto error; if(H5Dclose(dataset) < 0) goto error; @@ -1651,7 +1686,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl) /* Write the data to the dataset */ if(H5Dwrite(dataset, rew_tid, H5S_ALL, H5S_ALL, dxpl, rew_buf) < 0) - goto error; + goto error; if(H5Dclose(dataset) < 0) goto error; @@ -1662,7 +1697,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl) /* Write the data to the dataset */ if(H5Dwrite(dataset, rew_tid, H5S_ALL, H5S_ALL, dxpl, rew_buf) < 0) - goto error; + goto error; if(H5Dclose(dataset) < 0) goto error; @@ -1746,25 +1781,25 @@ error: goto error; \ } - + /*------------------------------------------------------------------------- - * Function: test_pack_ooo + * Function: test_pack_ooo * - * Purpose: Test inserting fields into a compound out of offset order. + * Purpose: Test inserting fields into a compound out of offset order. * Verifies that the compound is correctly marked as packed * or non-packed. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Neil Fortner + * Programmer: Neil Fortner * Thursday, 22 January 2009 * * Modifications: *------------------------------------------------------------------------- */ -static int +static unsigned test_pack_ooo(void) { hid_t cmpd, sub_cmpd; /* Datatype IDs */ @@ -1773,7 +1808,7 @@ test_pack_ooo(void) unsigned free_order[PACK_NMEMBS]; /* Index of remaining free slots in order */ unsigned num_free; /* Number of free slots in order */ unsigned sub_cmpd_order; /* Order to insert the inner compound */ - char name[6]; /* Member name */ + char name[16]; /* Member name */ unsigned extra_space; /* Whether to add extra space to the end of * the compound */ unsigned i, j; /* Indices */ @@ -1789,7 +1824,7 @@ test_pack_ooo(void) for(i=0; i1) { - if (argc>2 || strcmp("--noopt", argv[1])) { - HDfprintf(stderr, "usage: %s [--noopt]\n", argv[0]); - exit(1); - } - H5Tunregister(H5T_PERS_DONTCARE, NULL, (hid_t)-1, (hid_t)-1, H5T__conv_struct_opt); + if (argc>2 || strcmp("--noopt", argv[1])) { + HDfprintf(stderr, "usage: %s [--noopt]\n", argv[0]); + HDexit(EXIT_FAILURE); + } + H5Tunregister(H5T_PERS_DONTCARE, NULL, (hid_t)-1, (hid_t)-1, (H5T_conv_t)((void (*) (void))H5T__conv_struct_opt)); } /* Create the file */ @@ -2192,22 +2227,22 @@ main (int argc, char *argv[]) h5_fixname(FILENAME[0], fapl_id, fname, sizeof(fname)); - puts("Testing compound dataset:"); + HDputs("Testing compound dataset:"); nerrors += test_compound(fname, fapl_id); - puts("Testing the optimization of when the source type is a subset of the dest:"); + HDputs("Testing the optimization of when the source type is a subset of the dest:"); h5_fixname(FILENAME[1], fapl_id, fname, sizeof(fname)); nerrors += test_hdf5_src_subset(fname, fapl_id); - puts("Testing the optimization of when the dest type is a subset of the source:"); + HDputs("Testing the optimization of when the dest type is a subset of the source:"); h5_fixname(FILENAME[2], fapl_id, fname, sizeof(fname)); nerrors += test_hdf5_dst_subset(fname, fapl_id); - puts("Testing that compound types can be packed out of order:"); + HDputs("Testing that compound types can be packed out of order:"); nerrors += test_pack_ooo(); - puts("Testing compound member ordering:"); - nerrors += test_ooo_order(fname); + HDputs("Testing compound member ordering:"); + nerrors += test_ooo_order(fname, fapl_id); /* Verify symbol table messages are cached */ nerrors += (h5_verify_cached_stabs(FILENAME, fapl_id) < 0 ? 1 : 0); @@ -2215,10 +2250,10 @@ main (int argc, char *argv[]) if (nerrors) { HDprintf("***** %u FAILURE%s! *****\n", nerrors, 1==nerrors?"":"S"); - HDexit(1); + HDexit(EXIT_FAILURE); } h5_cleanup(FILENAME, fapl_id); - puts("All compound dataset tests passed."); + HDputs("All compound dataset tests passed."); return 0; } diff --git a/test/dtransform.c b/test/dtransform.c index 2882c8f..6f7e8a4 100644 --- a/test/dtransform.c +++ b/test/dtransform.c @@ -34,17 +34,17 @@ hid_t dset_id_float_chunk = -1; const float windchillFfloat[ROWS][COLS] = { {36.0f, 31.0f, 25.0f, 19.0f, 13.0f, 7.0f, 1.0f, -5.0f, -11.0f, -16.0f, -22.0f, -28.0f, -34.0f, -40.0f, -46.0f, -52.0f, -57.0f, -63.0f}, - {34.0f, 27.0f, 21.0f, 15.0f, 9.0f, 3.0f, -4.0f, -10.0f, -16.0f, -22.0f, -28.0f, -35.0f, -41.0f, -47.0f, -53.0f, -59.0f, -66.0f, -72.0f} , - {32.0f, 25.0f, 19.0f, 13.0f, 6.0f, 0.0f, -7.0f, -13.0f, -19.0f, -26.0f, -32.0f, -39.0f, -45.0f, -51.0f, -58.0f, -64.0f, -71.0f, -77.0f}, - {30.0f, 24.0f, 17.0f, 11.0f, 4.0f, -2.0f, -9.0f, -15.0f, -22.0f, -29.0f, -35.0f, -42.0f, -48.0f, -55.0f, -61.0f, -68.0f, -74.0f, -81.0f}, - {29.0f, 23.0f, 16.0f, 9.0f, 3.0f, -4.0f, -11.0f, -17.0f, -24.0f, -31.0f, -37.0f, -44.0f, -51.0f, -58.0f, -64.0f, -71.0f, -78.0f, -84.0f}, - {28.0f, 22.0f, 15.0f, 8.0f, 1.0f, -5.0f, -12.0f, -19.0f, -26.0f, -33.0f, -39.0f, -46.0f, -53.0f, -60.0f, -67.0f, -73.0f, -80.0f, -87.0f}, - {28.0f, 21.0f, 14.0f, 7.0f, 0.0f, -7.0f, -14.0f, -21.0f, -27.0f, -34.0f, -41.0f, -48.0f, -55.0f, -62.0f, -69.0f, -76.0f, -82.0f, -89.0f}, - {27.0f, 20.0f, 13.0f, 6.0f, -1.0f, -8.0f, -15.0f, -22.0f, -29.0f, -36.0f, -43.0f, -50.0f, -57.0f, -64.0f, -71.0f, -78.0f, -84.0f, -91.0f}, - {26.0f, 19.0f, 12.0f, 5.0f, -2.0f, -9.0f, -16.0f, -23.0f, -30.0f, -37.0f, -44.0f, -51.0f, -58.0f, -65.0f, -72.0f, -79.0f, -86.0f, -93.0f}, - {26.0f, 19.0f, 12.0f, 4.0f, -3.0f, -10.0f, -17.0f, -24.0f, -31.0f, -38.0f, -45.0f, -52.0f, -60.0f, -67.0f, -74.0f, -81.0f, -88.0f, -95.0f}, - {25.0f, 18.0f, 11.0f, 4.0f, -3.0f, -11.0f, -18.0f, -25.0f, -32.0f, -39.0f, -46.0f, -54.0f, -61.0f, -68.0f, -75.0f, -82.0f, -89.0f, -97.0f}, - {25.0f, 17.0f, 10.0f, 3.0f, -4.0f, -11.0f, -19.0f, -26.0f, -33.0f, -40.0f, -48.0f, -55.0f, -62.0f, -69.0f, -76.0f, -84.0f, -91.0f, -98.0f} + {34.0f, 27.0f, 21.0f, 15.0f, 9.0f, 3.0f, -4.0f, -10.0f, -16.0f, -22.0f, -28.0f, -35.0f, -41.0f, -47.0f, -53.0f, -59.0f, -66.0f, -72.0f} , + {32.0f, 25.0f, 19.0f, 13.0f, 6.0f, 0.0f, -7.0f, -13.0f, -19.0f, -26.0f, -32.0f, -39.0f, -45.0f, -51.0f, -58.0f, -64.0f, -71.0f, -77.0f}, + {30.0f, 24.0f, 17.0f, 11.0f, 4.0f, -2.0f, -9.0f, -15.0f, -22.0f, -29.0f, -35.0f, -42.0f, -48.0f, -55.0f, -61.0f, -68.0f, -74.0f, -81.0f}, + {29.0f, 23.0f, 16.0f, 9.0f, 3.0f, -4.0f, -11.0f, -17.0f, -24.0f, -31.0f, -37.0f, -44.0f, -51.0f, -58.0f, -64.0f, -71.0f, -78.0f, -84.0f}, + {28.0f, 22.0f, 15.0f, 8.0f, 1.0f, -5.0f, -12.0f, -19.0f, -26.0f, -33.0f, -39.0f, -46.0f, -53.0f, -60.0f, -67.0f, -73.0f, -80.0f, -87.0f}, + {28.0f, 21.0f, 14.0f, 7.0f, 0.0f, -7.0f, -14.0f, -21.0f, -27.0f, -34.0f, -41.0f, -48.0f, -55.0f, -62.0f, -69.0f, -76.0f, -82.0f, -89.0f}, + {27.0f, 20.0f, 13.0f, 6.0f, -1.0f, -8.0f, -15.0f, -22.0f, -29.0f, -36.0f, -43.0f, -50.0f, -57.0f, -64.0f, -71.0f, -78.0f, -84.0f, -91.0f}, + {26.0f, 19.0f, 12.0f, 5.0f, -2.0f, -9.0f, -16.0f, -23.0f, -30.0f, -37.0f, -44.0f, -51.0f, -58.0f, -65.0f, -72.0f, -79.0f, -86.0f, -93.0f}, + {26.0f, 19.0f, 12.0f, 4.0f, -3.0f, -10.0f, -17.0f, -24.0f, -31.0f, -38.0f, -45.0f, -52.0f, -60.0f, -67.0f, -74.0f, -81.0f, -88.0f, -95.0f}, + {25.0f, 18.0f, 11.0f, 4.0f, -3.0f, -11.0f, -18.0f, -25.0f, -32.0f, -39.0f, -46.0f, -54.0f, -61.0f, -68.0f, -75.0f, -82.0f, -89.0f, -97.0f}, + {25.0f, 17.0f, 10.0f, 3.0f, -4.0f, -11.0f, -19.0f, -26.0f, -33.0f, -40.0f, -48.0f, -55.0f, -62.0f, -69.0f, -76.0f, -84.0f, -91.0f, -98.0f} }; const int transformData[ROWS][COLS] = @@ -62,202 +62,202 @@ const int transformData[ROWS][COLS] = {25, 17, 10, 3, 4, 11, 19, 26, 33, 40, 48, 55, 62, 69, 4, 12, 19, 26} }; -#define UCOMPARE(TYPE,VAR1,VAR2,TOL) \ -{ \ - size_t i,j; \ - \ - for(i=0; i= (TYPE)((VAR2)[i][j])) && ( ((VAR1)[i][j] - TOL) < (TYPE)((VAR2)[i][j]))) || ( ((VAR1)[i][j] <= (TYPE)((VAR2)[i][j])) && ( ((VAR1)[i][j] + TOL) > (TYPE)((VAR2)[i][j]))))) \ - { \ - H5_FAILED(); \ - HDfprintf(stderr, " ERROR: Conversion failed to match computed data\n"); \ - goto error; \ - } \ - } \ - PASSED(); \ +#define UCOMPARE(TYPE,VAR1,VAR2,TOL) \ +{ \ + size_t i,j; \ + \ + for(i=0; i= (TYPE)((VAR2)[i][j])) && ( ((VAR1)[i][j] - TOL) < (TYPE)((VAR2)[i][j]))) || ( ((VAR1)[i][j] <= (TYPE)((VAR2)[i][j])) && ( ((VAR1)[i][j] + TOL) > (TYPE)((VAR2)[i][j]))))) \ + { \ + H5_FAILED(); \ + HDfprintf(stderr, " ERROR: Conversion failed to match computed data\n"); \ + goto error; \ + } \ + } \ + PASSED(); \ } -#define COMPARE(TYPE,VAR1,VAR2,TOL) \ -{ \ - size_t i,j; \ - \ - for(i=0; i= ((TYPE)(VAR2)[i][j] - TOL))) ) \ - { \ - H5_FAILED(); \ - HDfprintf(stderr, " ERROR: Conversion failed to match computed data\n"); \ - goto error; \ - } \ - } \ - PASSED(); \ +#define COMPARE(TYPE,VAR1,VAR2,TOL) \ +{ \ + size_t i,j; \ + \ + for(i=0; i= ((TYPE)(VAR2)[i][j] - TOL))) ) \ + { \ + H5_FAILED(); \ + HDfprintf(stderr, " ERROR: Conversion failed to match computed data\n"); \ + goto error; \ + } \ + } \ + PASSED(); \ } -#define COMPARE_INT(VAR1,VAR2) \ -{ \ - size_t i,j; \ - \ - for(i=0; i"TEST_STR")") \ - \ - if(H5Dread(dset, HDF_TYPE, H5S_ALL, H5S_ALL, XFORM, array) < 0) TEST_ERROR; \ - if(SIGNED) \ - COMPARE(TYPE, array, COMPARE_DATA, 2) \ - else \ - UCOMPARE(TYPE, array, COMPARE_DATA, 4) \ + \ + if(SIGNED) \ + { \ + if((dxpl_id_f_to_c = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR; \ + if(H5Pset_data_transform(dxpl_id_f_to_c, f_to_c) < 0) TEST_ERROR; \ + if(H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_f_to_c, windchillFfloat) < 0) TEST_ERROR; \ + if(H5Dwrite(dset_nn, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_f_to_c, windchillFfloat) < 0) TEST_ERROR; \ + if(H5Pclose(dxpl_id_f_to_c) < 0) TEST_ERROR; \ + } \ + else \ + { \ + if((dxpl_id_utrans = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR; \ + if(H5Pset_data_transform(dxpl_id_utrans, utrans) < 0) TEST_ERROR; \ + if(H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id_utrans, transformData) < 0) TEST_ERROR; \ + if(H5Dwrite(dset_nn, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id_utrans, transformData) < 0) TEST_ERROR; \ + if(H5Pclose(dxpl_id_utrans) < 0) TEST_ERROR; \ + } \ + \ + \ + TESTING("contiguous, no data type conversion ("TEST_STR"->"TEST_STR")") \ + \ + if(H5Dread(dset, HDF_TYPE, H5S_ALL, H5S_ALL, XFORM, array) < 0) TEST_ERROR; \ + if(SIGNED) \ + COMPARE(TYPE, array, COMPARE_DATA, 2) \ + else \ + UCOMPARE(TYPE, array, COMPARE_DATA, 4) \ \ - TESTING("contiguous, byte order conversion ("TEST_STR"->"TEST_STR")") \ - \ - if(H5Dread(dset_nn, HDF_TYPE, H5S_ALL, H5S_ALL, XFORM, array) < 0) TEST_ERROR; \ - if(SIGNED) \ - COMPARE(TYPE, array, COMPARE_DATA, 2) \ - else \ - UCOMPARE(TYPE, array, COMPARE_DATA, 4) \ - \ - if(SIGNED) \ - { \ - TESTING("contiguous, with type conversion (float->"TEST_STR")") \ - \ - if(H5Dread(dset_id_float, HDF_TYPE, H5S_ALL, H5S_ALL, XFORM, array) < 0) TEST_ERROR; \ - COMPARE(TYPE, array, COMPARE_DATA, 2) \ - } \ - \ - if(H5Dclose(dset) < 0) TEST_ERROR; \ - if(H5Sclose(dataspace) < 0) TEST_ERROR; \ + TESTING("contiguous, byte order conversion ("TEST_STR"->"TEST_STR")") \ + \ + if(H5Dread(dset_nn, HDF_TYPE, H5S_ALL, H5S_ALL, XFORM, array) < 0) TEST_ERROR; \ + if(SIGNED) \ + COMPARE(TYPE, array, COMPARE_DATA, 2) \ + else \ + UCOMPARE(TYPE, array, COMPARE_DATA, 4) \ + \ + if(SIGNED) \ + { \ + TESTING("contiguous, with type conversion (float->"TEST_STR")") \ + \ + if(H5Dread(dset_id_float, HDF_TYPE, H5S_ALL, H5S_ALL, XFORM, array) < 0) TEST_ERROR; \ + COMPARE(TYPE, array, COMPARE_DATA, 2) \ + } \ + \ + if(H5Dclose(dset) < 0) TEST_ERROR; \ + if(H5Sclose(dataspace) < 0) TEST_ERROR; \ } -#define TEST_TYPE_CHUNK(XFORM, TYPE, HDF_TYPE, TEST_STR, COMPARE_DATA, SIGNED) \ -{ \ - TYPE array[ROWS][COLS]; \ - const char* f_to_c = "(5/9.0)*(x-32)"; \ +#define TEST_TYPE_CHUNK(XFORM, TYPE, HDF_TYPE, TEST_STR, COMPARE_DATA, SIGNED) \ +{ \ + TYPE array[ROWS][COLS]; \ + const char* f_to_c = "(5/9.0)*(x-32)"; \ /* utrans is a transform for unsigned types: no negative numbers involved and results are < 255 to fit into uchar */ \ - const char* utrans = "((x+100)/4)*3"; \ - \ - hid_t dataspace, dxpl_id_f_to_c, dxpl_id_utrans, cparms, memspace, dset_chunk, filespace; \ - hsize_t dim[2] = {ROWS, COLS}; \ - hsize_t offset[2] = {0, 0}; \ - \ - \ - if((dataspace = H5Screate_simple(2, dim, NULL)) < 0) TEST_ERROR; \ - \ - if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR; \ - if(H5Pset_chunk(cparms, 2, dim) < 0) TEST_ERROR; \ - \ - if((dset_chunk = H5Dcreate2(file_id, "/transformtest_chunk_"TEST_STR, HDF_TYPE, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0) TEST_ERROR; \ - if((filespace = H5Dget_space(dset_chunk)) < 0) TEST_ERROR \ - if((memspace = H5Screate_simple(2, dim, NULL)) < 0) TEST_ERROR \ - if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL, dim, NULL) < 0) TEST_ERROR; \ - \ - if(SIGNED) \ - { \ - if((dxpl_id_f_to_c = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR; \ - if(H5Pset_data_transform(dxpl_id_f_to_c, f_to_c) < 0) TEST_ERROR; \ - if(H5Dwrite(dset_chunk, H5T_NATIVE_FLOAT, dataspace, filespace, dxpl_id_f_to_c, windchillFfloat) < 0) TEST_ERROR; \ - if(H5Pclose(dxpl_id_f_to_c) < 0) TEST_ERROR; \ - } \ - else \ - { \ - if((dxpl_id_utrans = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR; \ - if(H5Pset_data_transform(dxpl_id_utrans, utrans) < 0) TEST_ERROR; \ - if(H5Dwrite(dset_chunk, H5T_NATIVE_INT, dataspace, filespace, dxpl_id_utrans, transformData) < 0) TEST_ERROR; \ - if(H5Pclose(dxpl_id_utrans) < 0) TEST_ERROR; \ - } \ - \ - \ - TESTING("chunked, no data type conversion ("TEST_STR"->"TEST_STR")") \ - \ - if(H5Dread(dset_chunk, HDF_TYPE, memspace, filespace, XFORM, array) < 0) TEST_ERROR; \ - if(SIGNED) \ - COMPARE(TYPE, array, COMPARE_DATA, 2) \ - else \ - UCOMPARE(TYPE, array, COMPARE_DATA, 4) \ - \ - if(SIGNED) \ - { \ - TESTING("chunked, with type conversion (float->"TEST_STR")") \ - \ - if(H5Dread(dset_id_float_chunk, HDF_TYPE, memspace, filespace, XFORM, array) < 0) TEST_ERROR; \ - COMPARE(TYPE, array, COMPARE_DATA, 2) \ - } \ - \ - \ - if(H5Pclose(cparms) < 0) TEST_ERROR; \ - if(H5Dclose(dset_chunk) < 0) TEST_ERROR; \ - if(H5Sclose(dataspace) < 0) TEST_ERROR; \ - if(H5Sclose(memspace) < 0) TEST_ERROR; \ + const char* utrans = "((x+100)/4)*3"; \ + \ + hid_t dataspace, dxpl_id_f_to_c, dxpl_id_utrans, cparms, memspace, dset_chunk, filespace; \ + hsize_t dim[2] = {ROWS, COLS}; \ + hsize_t offset[2] = {0, 0}; \ + \ + \ + if((dataspace = H5Screate_simple(2, dim, NULL)) < 0) TEST_ERROR; \ + \ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR; \ + if(H5Pset_chunk(cparms, 2, dim) < 0) TEST_ERROR; \ + \ + if((dset_chunk = H5Dcreate2(file_id, "/transformtest_chunk_"TEST_STR, HDF_TYPE, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0) TEST_ERROR; \ + if((filespace = H5Dget_space(dset_chunk)) < 0) TEST_ERROR \ + if((memspace = H5Screate_simple(2, dim, NULL)) < 0) TEST_ERROR \ + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL, dim, NULL) < 0) TEST_ERROR; \ + \ + if(SIGNED) \ + { \ + if((dxpl_id_f_to_c = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR; \ + if(H5Pset_data_transform(dxpl_id_f_to_c, f_to_c) < 0) TEST_ERROR; \ + if(H5Dwrite(dset_chunk, H5T_NATIVE_FLOAT, dataspace, filespace, dxpl_id_f_to_c, windchillFfloat) < 0) TEST_ERROR; \ + if(H5Pclose(dxpl_id_f_to_c) < 0) TEST_ERROR; \ + } \ + else \ + { \ + if((dxpl_id_utrans = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR; \ + if(H5Pset_data_transform(dxpl_id_utrans, utrans) < 0) TEST_ERROR; \ + if(H5Dwrite(dset_chunk, H5T_NATIVE_INT, dataspace, filespace, dxpl_id_utrans, transformData) < 0) TEST_ERROR; \ + if(H5Pclose(dxpl_id_utrans) < 0) TEST_ERROR; \ + } \ + \ + \ + TESTING("chunked, no data type conversion ("TEST_STR"->"TEST_STR")") \ + \ + if(H5Dread(dset_chunk, HDF_TYPE, memspace, filespace, XFORM, array) < 0) TEST_ERROR; \ + if(SIGNED) \ + COMPARE(TYPE, array, COMPARE_DATA, 2) \ + else \ + UCOMPARE(TYPE, array, COMPARE_DATA, 4) \ + \ + if(SIGNED) \ + { \ + TESTING("chunked, with type conversion (float->"TEST_STR")") \ + \ + if(H5Dread(dset_id_float_chunk, HDF_TYPE, memspace, filespace, XFORM, array) < 0) TEST_ERROR; \ + COMPARE(TYPE, array, COMPARE_DATA, 2) \ + } \ + \ + \ + if(H5Pclose(cparms) < 0) TEST_ERROR; \ + if(H5Dclose(dset_chunk) < 0) TEST_ERROR; \ + if(H5Sclose(dataspace) < 0) TEST_ERROR; \ + if(H5Sclose(memspace) < 0) TEST_ERROR; \ } -#define INVALID_SET_TEST(TRANSFORM) \ -{ \ - if(H5Pset_data_transform(dxpl_id, TRANSFORM) < 0) \ - { \ - PASSED(); \ - } \ - else \ - { \ - H5_FAILED(); \ - HDfprintf(stderr, " ERROR: Data transform allowed invalid TRANSFORM transform to be set\n"); \ - goto error; \ - } \ +#define INVALID_SET_TEST(TRANSFORM) \ +{ \ + if(H5Pset_data_transform(dxpl_id, TRANSFORM) < 0) \ + { \ + PASSED(); \ + } \ + else \ + { \ + H5_FAILED(); \ + HDfprintf(stderr, " ERROR: Data transform allowed invalid TRANSFORM transform to be set\n"); \ + goto error; \ + } \ } int main(void) { hid_t dxpl_id_c_to_f = -1; hid_t dxpl_id_c_to_f_copy = 1; - hid_t dxpl_id_simple = -1; + hid_t dxpl_id_simple = -1; hid_t dxpl_id_polynomial = -1; hid_t dxpl_id_polynomial_copy = -1; hid_t dxpl_id_utrans_inv = -1; @@ -440,8 +440,8 @@ init_test(hid_t file_id) PASSED(); return 0; - -error: + +error: H5E_BEGIN_TRY { H5Pclose(cparms); H5Pclose(dxpl_id_f_to_c); @@ -472,7 +472,7 @@ test_poly(const hid_t dxpl_id_polynomial) if(H5Dread(dset_id_int, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_polynomial, polyflread) < 0) TEST_ERROR - + COMPARE(float, polyflread, polyflres, 2.0f) for(row = 0; row < ROWS; row++) @@ -485,12 +485,12 @@ test_poly(const hid_t dxpl_id_polynomial) if(H5Dread(dset_id_float, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id_polynomial, polyintread) < 0) TEST_ERROR - + COMPARE(int, polyintread, polyflres, 4) return 0; -error: +error: return -1; } @@ -533,7 +533,7 @@ test_specials(hid_t file) if(H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) TEST_ERROR - + COMPARE_INT(read_buf, data_res) if(H5Dclose(dset_id) < 0) @@ -557,7 +557,7 @@ test_specials(hid_t file) if(H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) TEST_ERROR - + COMPARE_INT(read_buf, data_res) if(H5Dclose(dset_id) < 0) @@ -581,7 +581,7 @@ test_specials(hid_t file) if(H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) TEST_ERROR - + COMPARE_INT(read_buf, data_res) if(H5Dclose(dset_id) < 0) @@ -605,7 +605,7 @@ test_specials(hid_t file) if(H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) TEST_ERROR - + COMPARE_INT(read_buf, data_res) if(H5Dclose(dset_id) < 0) @@ -629,7 +629,7 @@ test_specials(hid_t file) if(H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) TEST_ERROR - + COMPARE_INT(read_buf, data_res) if(H5Dclose(dset_id) < 0) @@ -644,7 +644,7 @@ test_specials(hid_t file) PASSED(); return 0; -error: +error: return -1; } @@ -667,19 +667,19 @@ test_copy(const hid_t dxpl_id_c_to_f_copy, const hid_t dxpl_id_polynomial_copy) if(H5Dread(dset_id_float, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id_c_to_f_copy, windchillFintread) < 0) TEST_ERROR - + COMPARE(int, windchillFintread, windchillFfloat, 2) TESTING("data transform, polynomial transform w/ copied property") if(H5Dread(dset_id_float, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id_polynomial_copy, polyintread) < 0) TEST_ERROR - + COMPARE(int, polyintread, polyflres, 2) return 0; -error: +error: return -1; } @@ -696,7 +696,7 @@ test_trivial(const hid_t dxpl_id_simple) TEST_ERROR for(row = 0; row < ROWS; row++) for(col = 0; col < COLS; col++) { - if((windchillFfloatread[row][col] - 4.8f) > FLOAT_TOL) + if((windchillFfloatread[row][col] - 4.8f) > FLOAT_TOL) FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n"); } @@ -708,7 +708,7 @@ test_trivial(const hid_t dxpl_id_simple) TEST_ERROR for(row = 0; row < ROWS; row++) for(col = 0; col < COLS; col++) { - if(windchillFintread[row][col] != 4) + if(windchillFintread[row][col] != 4) FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n") } @@ -740,7 +740,7 @@ test_getset(const hid_t dxpl_id_c_to_f) FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n") PASSED() - + HDfree(ptrgetTest); ptrgetTest = NULL; @@ -752,10 +752,10 @@ test_getset(const hid_t dxpl_id_c_to_f) if(H5Dread(dset_id_float, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_c_to_f, windchillFfloatread) < 0) TEST_ERROR - + for(row = 0; row < ROWS; row++) for(col = 0; col < COLS; col++) { - if((windchillFfloatread[row][col] - 4.8f) > FLOAT_TOL) + if((windchillFfloatread[row][col] - 4.8f) > FLOAT_TOL) FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n") } @@ -767,7 +767,7 @@ test_getset(const hid_t dxpl_id_c_to_f) TEST_ERROR if(H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, HDstrlen(simple) + 1) < 0) TEST_ERROR - if(HDstrcmp(simple, ptrgetTest) != 0) + if(HDstrcmp(simple, ptrgetTest) != 0) FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n") PASSED() @@ -793,11 +793,11 @@ test_set(void) char *ptrgetTest = NULL; TESTING("H5Pget_data_transform (get before set)") - + if(NULL == (ptrgetTest = (char *)HDmalloc(HDstrlen(str) + 1))) TEST_ERROR - if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) + if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR /* Test get before set */ @@ -807,7 +807,7 @@ test_set(void) if(H5Pget_data_transform(dxpl_id, ptrgetTest, HDstrlen(str) + 1) < 0) PASSED() - else + else FAIL_PUTS_ERROR(" ERROR: Data transform get before set succeeded (it shouldn't have)\n"); HDfree(ptrgetTest); diff --git a/test/err_compat.c b/test/err_compat.c index 7e0bc4e..d2d039a 100644 --- a/test/err_compat.c +++ b/test/err_compat.c @@ -503,7 +503,7 @@ main(void) HDprintf("All error API tests passed.\n"); return 0; - error: +error: HDprintf("***** ERROR TEST FAILED! *****\n"); return 1; } diff --git a/test/file_image.c b/test/file_image.c index 7859626..d10e036 100644 --- a/test/file_image.c +++ b/test/file_image.c @@ -20,7 +20,6 @@ *************************************************************/ #include "h5test.h" -#include "H5srcdir.h" #include "H5Fprivate.h" /* required to test property removals */ #define VERIFY(condition, string) do { if (!(condition)) FAIL_PUTS_ERROR(string) } while(0) diff --git a/test/fillval.c b/test/fillval.c index dac0e09..0454bde 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -15,7 +15,7 @@ * Programmer: Robb Matzke * Thursday, October 1, 1998 * - * Purpose: Tests dataset fill values. + * Purpose: Tests dataset fill values. */ #include "h5test.h" #include "H5srcdir.h" @@ -59,9 +59,9 @@ typedef struct { * for version 1.4(after 1.4.3). To get this data file, simply compile * gen_old_fill.c with HDF5 library (before v1.5) and run it. */ #define FILE_COMPATIBLE "fill_old.h5" -#define FILE_NAME_RAW "fillval.raw" +#define FILE_NAME_RAW "fillval.raw" + - /*------------------------------------------------------------------------- * Function: create_compound_type * @@ -91,7 +91,7 @@ static hid_t create_compound_type(void) if(H5Tinsert(ret_value, "y", HOFFSET(comp_datatype, y), H5T_NATIVE_DOUBLE) < 0) goto error; if(H5Tinsert(ret_value, "z", HOFFSET(comp_datatype, z), H5T_NATIVE_CHAR) < 0) - goto error; + goto error; return ret_value; @@ -102,7 +102,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: create_compound_vl_type * @@ -146,18 +146,18 @@ error: return -1; } /* end create_compound_vl_type() */ - + /*------------------------------------------------------------------------- - * Function: test_getset + * Function: test_getset * - * Purpose: Tests the H5Pget_fill_value() and H5Pset_fill_value() - * functions. + * Purpose: Tests the H5Pget_fill_value() and H5Pset_fill_value() + * functions. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: number of errors + * Failure: number of errors * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, October 1, 1998 * * Modifications: @@ -167,15 +167,15 @@ error: static int test_getset(void) { - hid_t dcpl=-1; - int fill_i; - hid_t type_ss=-1, type_si=-1; + hid_t dcpl=-1; + int fill_i; + hid_t type_ss=-1, type_si=-1; struct fill_si { - int v1, v2; - } fill_si; + int v1, v2; + } fill_si; struct fill_ss { - short v1, v2; - } fill_ss, fill_ss_rd; + short v1, v2; + } fill_ss, fill_ss_rd; TESTING("property lists"); @@ -185,18 +185,18 @@ test_getset(void) */ if((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error; if((type_ss=H5Tcreate(H5T_COMPOUND, sizeof fill_ss)) < 0 || - H5Tinsert(type_ss, "v1", HOFFSET(struct fill_ss, v1), - H5T_NATIVE_SHORT) < 0 || - H5Tinsert(type_ss, "v2", HOFFSET(struct fill_ss, v2), - H5T_NATIVE_SHORT) < 0) { - goto error; + H5Tinsert(type_ss, "v1", HOFFSET(struct fill_ss, v1), + H5T_NATIVE_SHORT) < 0 || + H5Tinsert(type_ss, "v2", HOFFSET(struct fill_ss, v2), + H5T_NATIVE_SHORT) < 0) { + goto error; } if((type_si=H5Tcreate(H5T_COMPOUND, sizeof fill_si)) < 0 || - H5Tinsert(type_si, "v1", HOFFSET(struct fill_si, v1), - H5T_NATIVE_INT) < 0 || - H5Tinsert(type_si, "v2", HOFFSET(struct fill_si, v2), - H5T_NATIVE_INT) < 0) { - goto error; + H5Tinsert(type_si, "v1", HOFFSET(struct fill_si, v1), + H5T_NATIVE_INT) < 0 || + H5Tinsert(type_si, "v2", HOFFSET(struct fill_si, v2), + H5T_NATIVE_INT) < 0) { + goto error; } /* @@ -204,12 +204,12 @@ test_getset(void) * no fill value should result in a failure. */ H5E_BEGIN_TRY { - H5Pget_fill_value(dcpl, H5T_NATIVE_INT, &fill_i); + H5Pget_fill_value(dcpl, H5T_NATIVE_INT, &fill_i); } H5E_END_TRY; if(fill_i != 0) { - H5_FAILED(); - puts(" H5Pget_fill_value() should return default 0"); - goto error; + H5_FAILED(); + puts(" H5Pget_fill_value() should return default 0"); + goto error; } /* @@ -224,10 +224,10 @@ test_getset(void) */ if(H5Pget_fill_value(dcpl, type_ss, &fill_ss_rd) < 0) goto error; if(fill_ss.v1!=fill_ss_rd.v1 || fill_ss.v2!=fill_ss_rd.v2) { - H5_FAILED(); - puts(" Failed to get fill value using same data type that was "); - puts(" used to set the fill value."); - goto error; + H5_FAILED(); + puts(" Failed to get fill value using same data type that was "); + puts(" used to set the fill value."); + goto error; } /* @@ -235,10 +235,10 @@ test_getset(void) */ if(H5Pget_fill_value(dcpl, type_si, &fill_si) < 0) goto error; if(fill_ss.v1!=fill_si.v1 || fill_ss.v2!=fill_si.v2) { - H5_FAILED(); - puts(" Failed to get fill value using a data type other than what"); - puts(" was used to set the fill value."); - goto error; + H5_FAILED(); + puts(" Failed to get fill value using a data type other than what"); + puts(" was used to set the fill value."); + goto error; } /* @@ -247,9 +247,9 @@ test_getset(void) if(H5Pset_fill_value(dcpl, type_si, &fill_si) < 0) goto error; if(H5Pget_fill_value(dcpl, type_ss, &fill_ss) < 0) goto error; if(fill_si.v1!=fill_ss.v1 || fill_si.v2!=fill_ss.v2) { - H5_FAILED(); - puts(" Resetting the fill value was unsuccessful."); - goto error; + H5_FAILED(); + puts(" Resetting the fill value was unsuccessful."); + goto error; } /* Success */ @@ -261,24 +261,24 @@ test_getset(void) error: H5E_BEGIN_TRY { - H5Pclose(dcpl); - H5Tclose(type_si); - H5Tclose(type_ss); + H5Pclose(dcpl); + H5Tclose(type_si); + H5Tclose(type_ss); } H5E_END_TRY; return 1; } - + /*------------------------------------------------------------------------- - * Function: test_getset_vl + * Function: test_getset_vl * - * Purpose: Tests the H5Pget_fill_value() and H5Pset_fill_value() - * functions, using variable-length datatype. + * Purpose: Tests the H5Pget_fill_value() and H5Pset_fill_value() + * functions, using variable-length datatype. * - * Return: Success: 0 - * Failure: number of errors + * Return: Success: 0 + * Failure: number of errors * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Thursday, May 31, 2007 * *------------------------------------------------------------------------- @@ -362,47 +362,47 @@ test_getset_vl(hid_t fapl) return 1; } /* end test_getset_vl() */ - + /*------------------------------------------------------------------------- - * Function: test_create + * Function: test_create * - * Purpose: Tests creating datasets that have fill values. + * Purpose: Tests creating datasets that have fill values. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: number of errors + * Failure: number of errors * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, October 1, 1998 * * Modifications: - * Many new cases have been added to this test since - * the fill value design has been modified. + * Many new cases have been added to this test since + * the fill value design has been modified. * *------------------------------------------------------------------------- */ static int test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) { - hid_t file=-1, space=-1, dcpl=-1, comp_type_id=-1; - hid_t dset1=-1, dset2=-1, dset3=-1, dset4=-1, dset5=-1, - dset6=-1, /* dset7=-1, */ dset8=-1, dset9=-1; + hid_t file=-1, space=-1, dcpl=-1, comp_type_id=-1; + hid_t dset1=-1, dset2=-1, dset3=-1, dset4=-1, dset5=-1, + dset6=-1, /* dset7=-1, */ dset8=-1, dset9=-1; hsize_t cur_size[5] = {2, 8, 8, 4, 2}; - hsize_t ch_size[5] = {1, 1, 1, 4, 1}; - short rd_s, fill_s = 0x1234; - long rd_l, fill_l = 0x4321; - char filename[1024]; - H5D_space_status_t allocation; + hsize_t ch_size[5] = {1, 1, 1, 4, 1}; + short rd_s, fill_s = 0x1234; + long rd_l, fill_l = 0x4321; + char filename[1024]; + H5D_space_status_t allocation; H5D_alloc_time_t alloc_time; - H5D_fill_time_t fill_time; + H5D_fill_time_t fill_time; comp_datatype rd_c, fill_ctype; if(H5D_CHUNKED==layout) { - TESTING("chunked dataset creation"); + TESTING("chunked dataset creation"); } else if(H5D_COMPACT==layout) { TESTING("compact dataset creation"); } else { - TESTING("contiguous dataset creation"); + TESTING("contiguous dataset creation"); } /* @@ -410,11 +410,11 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) */ h5_fixname(base_name, fapl, filename, sizeof filename); if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto error; + goto error; if((space=H5Screate_simple(5, cur_size, cur_size)) < 0) goto error; if((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error; if(H5D_CHUNKED==layout) { - if(H5Pset_chunk(dcpl, 5, ch_size) < 0) goto error; + if(H5Pset_chunk(dcpl, 5, ch_size) < 0) goto error; } else if(H5D_COMPACT==layout) { if(H5Pset_layout(dcpl, H5D_COMPACT) < 0) goto error; } @@ -444,21 +444,21 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) if(H5Pset_fill_value(dcpl, H5T_NATIVE_SHORT, &fill_s) < 0) goto error; #endif if((dset1=H5Dcreate2(file, "dset1", H5T_NATIVE_LONG, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - goto error; + goto error; /* 3. Large to small fill conversion */ #ifndef NO_FILLING if(H5Pset_fill_value(dcpl, H5T_NATIVE_LONG, &fill_l) < 0) goto error; #endif if((dset2=H5Dcreate2(file, "dset2", H5T_NATIVE_SHORT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - goto error; + goto error; /* 4. No conversion */ #ifndef NO_FILLING if(H5Pset_fill_value(dcpl, H5T_NATIVE_LONG, &fill_l) < 0) goto error; #endif if((dset3=H5Dcreate2(file, "dset3", H5T_NATIVE_LONG, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - goto error; + goto error; /* 5. late space allocation and never write fill value */ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0) goto error; @@ -504,7 +504,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) /* 3. Write fill value at space allocation time */ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error; if((dset6 = H5Dcreate2(file, "dset6", H5T_NATIVE_LONG, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - goto error; + goto error; /* 4. fill value is undefined while fill write time is H5D_FILL_TIME_ALLOC. * Supposed to fail. */ @@ -531,7 +531,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) /* Open the file and get the dataset fill value from each dataset */ if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) - goto error; + goto error; /* I. Check cases for late space allocation except compact dataset */ if(H5D_COMPACT != layout) { @@ -541,10 +541,10 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) #ifndef NO_FILLING if(H5Pget_fill_value(dcpl, H5T_NATIVE_SHORT, &rd_s) < 0) goto error; if(rd_s != fill_s) { - H5_FAILED(); - HDprintf(" %d: Got a different fill value than what was set.",__LINE__); - HDprintf(" Got %d, set %d\n", rd_s, fill_s); - goto error; + H5_FAILED(); + HDprintf(" %d: Got a different fill value than what was set.",__LINE__); + HDprintf(" Got %d, set %d\n", rd_s, fill_s); + goto error; } #endif if(H5Dclose(dset1) < 0) goto error; @@ -556,10 +556,10 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) #ifndef NO_FILLING if(H5Pget_fill_value(dcpl, H5T_NATIVE_LONG, &rd_l) < 0) goto error; if(rd_l!=fill_l) { - H5_FAILED(); - HDprintf(" %d: Got a different fill value than what was set.",__LINE__); - HDprintf(" Got %ld, set %ld\n", rd_l, fill_l); - goto error; + H5_FAILED(); + HDprintf(" %d: Got a different fill value than what was set.",__LINE__); + HDprintf(" Got %ld, set %ld\n", rd_l, fill_l); + goto error; } #endif if(H5Dclose(dset2) < 0) goto error; @@ -571,10 +571,10 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) #ifndef NO_FILLING if(H5Pget_fill_value(dcpl, H5T_NATIVE_LONG, &rd_l) < 0) goto error; if(rd_l != fill_l) { - H5_FAILED(); - HDprintf(" %d: Got a different fill value than what was set.",__LINE__); - HDprintf(" Got %ld, set %ld\n", rd_l, fill_l); - goto error; + H5_FAILED(); + HDprintf(" %d: Got a different fill value than what was set.",__LINE__); + HDprintf(" Got %ld, set %ld\n", rd_l, fill_l); + goto error; } #endif if(H5Pget_alloc_time(dcpl, &alloc_time) < 0) goto error; @@ -605,14 +605,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) if(H5Pget_alloc_time(dcpl, &alloc_time) < 0) goto error; if(H5Pget_fill_time(dcpl, &fill_time) < 0) goto error; if(alloc_time != H5D_ALLOC_TIME_LATE) { - H5_FAILED(); - puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time."); - HDprintf(" Got %d\n", alloc_time); + H5_FAILED(); + puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time."); + HDprintf(" Got %d\n", alloc_time); } if(fill_time != H5D_FILL_TIME_NEVER) { - H5_FAILED(); - puts(" Got non-H5D_FILL_TIME_NEVER fill value write time."); - HDprintf(" Got %d\n", fill_time); + H5_FAILED(); + puts(" Got non-H5D_FILL_TIME_NEVER fill value write time."); + HDprintf(" Got %d\n", fill_time); } if(H5Dclose(dset4) < 0) goto error; if(H5Pclose(dcpl) < 0) goto error; @@ -671,7 +671,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) if(H5Pget_fill_value(dcpl, H5T_NATIVE_LONG, &rd_l) < 0) goto error; if(rd_l != fill_l) { H5_FAILED(); - HDprintf(" %d: Got a different fill value than what was set.",__LINE__); + HDprintf(" %d: Got a different fill value than what was set.",__LINE__); HDprintf(" Got %ld, set %ld\n", rd_l, fill_l); goto error; } @@ -698,7 +698,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) H5_FAILED(); puts(" Got wrong fill value"); HDprintf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", - (double)rd_c.a, rd_c.y, rd_c.x, rd_c.z); + (double)rd_c.a, rd_c.y, rd_c.x, rd_c.z); } if(H5Dclose(dset8) < 0) goto error; if(H5Pclose(dcpl) < 0) goto error; @@ -710,56 +710,56 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) error: H5E_BEGIN_TRY { - H5Pclose(dcpl); - H5Sclose(space); + H5Pclose(dcpl); + H5Sclose(space); if(H5D_COMPACT != layout) { - H5Dclose(dset1); - H5Dclose(dset2); - H5Dclose(dset3); + H5Dclose(dset1); + H5Dclose(dset2); + H5Dclose(dset3); H5Dclose(dset4); H5Dclose(dset9); } H5Dclose(dset5); H5Dclose(dset6); - H5Dclose(dset8); - H5Fclose(file); + H5Dclose(dset8); + H5Fclose(file); } H5E_END_TRY; return 1; } /*------------------------------------------------------------------------- - * Function: test_rdwr_cases + * Function: test_rdwr_cases * - * Purpose: Tests fill values read and write for datasets. + * Purpose: Tests fill values read and write for datasets. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, October 1, 1998 * * Modifications: - * This function is called by test_rdwr to write and read - * dataset for different cases. + * This function is called by test_rdwr to write and read + * dataset for different cases. * *------------------------------------------------------------------------- */ static int test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, - H5D_fill_time_t fill_time, H5D_layout_t layout, - H5T_class_t datatype, hid_t ctype_id) + H5D_fill_time_t fill_time, H5D_layout_t layout, + H5T_class_t datatype, hid_t ctype_id) { - hid_t fspace=-1, mspace=-1, dset1=-1, dset2=-1; - hsize_t cur_size[5] = {2, 8, 8, 4, 2}; - hsize_t one[5] = {1, 1, 1, 1, 1}; - hsize_t hs_size[5], hs_stride[5]; - hsize_t hs_offset[5], nelmts; - int fillval=(-1), val_rd, should_be; - int i, j, *buf=NULL, odd; + hid_t fspace=-1, mspace=-1, dset1=-1, dset2=-1; + hsize_t cur_size[5] = {2, 8, 8, 4, 2}; + hsize_t one[5] = {1, 1, 1, 1, 1}; + hsize_t hs_size[5], hs_stride[5]; + hsize_t hs_offset[5], nelmts; + int fillval=(-1), val_rd, should_be; + int i, j, *buf=NULL, odd; unsigned u; comp_datatype rd_c, fill_c, should_be_c; - comp_datatype *buf_c=NULL; + comp_datatype *buf_c=NULL; H5D_space_status_t allocation; if(datatype == H5T_INTEGER) { @@ -788,27 +788,27 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, if((mspace = H5Screate_simple(5, one, NULL)) < 0) goto error; for (i=0; i<1000; i++) { - for (j=0; j<5; j++) - hs_offset[j] = (hsize_t)HDrand() % cur_size[j]; - if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, - one, NULL) < 0) goto error; + for (j=0; j<5; j++) + hs_offset[j] = (hsize_t)HDrand() % cur_size[j]; + if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, + one, NULL) < 0) goto error; - /* case for atomic datatype */ - if(datatype==H5T_INTEGER) { + /* case for atomic datatype */ + if(datatype==H5T_INTEGER) { if(H5Dread(dset1, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT, - &val_rd) < 0) goto error; - if(fill_time!=H5D_FILL_TIME_NEVER && val_rd!=fillval) { - H5_FAILED(); + &val_rd) < 0) goto error; + if(fill_time!=H5D_FILL_TIME_NEVER && val_rd!=fillval) { + H5_FAILED(); HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__); - HDfprintf(stdout," Elmt={%Hu,%Hu,%Hu,%Hu,%Hu}, read: %u, " - "Fill value: %u\n", - hs_offset[0], hs_offset[1], - hs_offset[2], hs_offset[3], - hs_offset[4], val_rd, fillval); - goto error; - } - /* case for compound datatype */ - } + HDfprintf(stdout," Elmt={%Hu,%Hu,%Hu,%Hu,%Hu}, read: %u, " + "Fill value: %u\n", + hs_offset[0], hs_offset[1], + hs_offset[2], hs_offset[3], + hs_offset[4], val_rd, fillval); + goto error; + } + /* case for compound datatype */ + } else if(datatype==H5T_COMPOUND) { if(H5Dread(dset2, ctype_id, mspace, fspace, H5P_DEFAULT, &rd_c) < 0) goto error; @@ -822,7 +822,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4], (double)rd_c.a, rd_c.x, rd_c.y, rd_c.z, - (double)fill_c.a, fill_c.x, fill_c.y, fill_c.z); + (double)fill_c.a, fill_c.x, fill_c.y, fill_c.z); goto error; } } @@ -871,8 +871,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, else if(datatype == H5T_COMPOUND) { /*check for overflow*/ HDassert((nelmts * sizeof(comp_datatype)) == - (hsize_t)((size_t)(nelmts * sizeof(comp_datatype)))); - buf_c = (comp_datatype *)HDmalloc((size_t)nelmts * sizeof(comp_datatype)); + (hsize_t)((size_t)(nelmts * sizeof(comp_datatype)))); + buf_c = (comp_datatype *)HDmalloc((size_t)nelmts * sizeof(comp_datatype)); if(H5Dread(dset2, ctype_id, mspace, fspace, H5P_DEFAULT, buf_c) < 0) goto error; @@ -910,18 +910,18 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, else if(datatype == H5T_COMPOUND) { HDmemset(buf_c, 0, ((size_t)nelmts * sizeof(comp_datatype))); for(u = 0; u < nelmts; u++) { - buf_c[u].a = 1111.11F; - buf_c[u].x = 2222; - buf_c[u].y = 3333.3333F; - buf_c[u].z = 'd'; - } + buf_c[u].a = 1111.11F; + buf_c[u].x = 2222; + buf_c[u].y = 3333.3333F; + buf_c[u].z = 'd'; + } if(H5Dwrite(dset2, ctype_id, mspace, fspace, H5P_DEFAULT, buf_c) < 0) goto error; } /* Check if space is allocated */ if(datatype==H5T_INTEGER && H5Dget_space_status(dset1, &allocation) < 0) - goto error; + goto error; if(datatype==H5T_COMPOUND && H5Dget_space_status(dset2, &allocation) < 0) goto error; if(layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_ALLOCATED) { @@ -938,16 +938,16 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, if((mspace = H5Screate_simple(5, one, NULL)) < 0) goto error; for(i = 0; i < 1000; i++) { - for(j = 0, odd = 0; j < 5; j++) { - hs_offset[j] = (hsize_t)HDrand() % cur_size[j]; - odd += (int)(hs_offset[j]%2); - } /* end for */ - if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL) < 0) + for(j = 0, odd = 0; j < 5; j++) { + hs_offset[j] = (hsize_t)HDrand() % cur_size[j]; + odd += (int)(hs_offset[j]%2); + } /* end for */ + if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL) < 0) goto error; - /* case for atomic datatype */ + /* case for atomic datatype */ if(datatype==H5T_INTEGER) { - if(H5Dread(dset1, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT, &val_rd) < 0) + if(H5Dread(dset1, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT, &val_rd) < 0) goto error; if(fill_time == H5D_FILL_TIME_ALLOC) { should_be = odd ? fillval : 9999; @@ -961,41 +961,41 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, (long)hs_offset[4], val_rd, should_be); goto error; } - } - else if(fill_time == H5D_FILL_TIME_NEVER && !odd) { - should_be = 9999; - if(val_rd!=should_be) { - H5_FAILED(); + } + else if(fill_time == H5D_FILL_TIME_NEVER && !odd) { + should_be = 9999; + if(val_rd!=should_be) { + H5_FAILED(); HDfprintf(stdout, "%u: Value read was not correct.\n", (unsigned)__LINE__); - HDprintf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %u, " - "should be: %u\n", - (long)hs_offset[0], (long)hs_offset[1], - (long)hs_offset[2], (long)hs_offset[3], - (long)hs_offset[4], val_rd, should_be); - goto error; - } - } else if(fill_time == H5D_FILL_TIME_NEVER && odd) { - /*Trash data. Don't compare*/ - } - } /* end for datatype==H5T_INTEGER */ - /* case for compound datatype */ - else if(datatype==H5T_COMPOUND) { + HDprintf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %u, " + "should be: %u\n", + (long)hs_offset[0], (long)hs_offset[1], + (long)hs_offset[2], (long)hs_offset[3], + (long)hs_offset[4], val_rd, should_be); + goto error; + } + } else if(fill_time == H5D_FILL_TIME_NEVER && odd) { + /*Trash data. Don't compare*/ + } + } /* end for datatype==H5T_INTEGER */ + /* case for compound datatype */ + else if(datatype==H5T_COMPOUND) { if(H5Dread(dset2, ctype_id, mspace, fspace, H5P_DEFAULT, &rd_c) < 0) goto error; if(fill_time == H5D_FILL_TIME_ALLOC) { - if(odd) { - should_be_c.a=fill_c.a; - should_be_c.x=fill_c.x; - should_be_c.y=fill_c.y; - should_be_c.z=fill_c.z; - } else { - should_be_c.a=buf_c[0].a; - should_be_c.x=buf_c[0].x; - should_be_c.y=buf_c[0].y; - should_be_c.z=buf_c[0].z; - } - if(!H5_FLT_ABS_EQUAL(rd_c.a, should_be_c.a) || rd_c.x != should_be_c.x || - !H5_DBL_ABS_EQUAL(rd_c.y, should_be_c.y) || rd_c.z != should_be_c.z) { + if(odd) { + should_be_c.a=fill_c.a; + should_be_c.x=fill_c.x; + should_be_c.y=fill_c.y; + should_be_c.z=fill_c.z; + } else { + should_be_c.a=buf_c[0].a; + should_be_c.x=buf_c[0].x; + should_be_c.y=buf_c[0].y; + should_be_c.z=buf_c[0].z; + } + if(!H5_FLT_ABS_EQUAL(rd_c.a, should_be_c.a) || rd_c.x != should_be_c.x || + !H5_DBL_ABS_EQUAL(rd_c.y, should_be_c.y) || rd_c.z != should_be_c.z) { H5_FAILED(); HDfprintf(stdout, "%u: Value read was not correct.\n", (unsigned)__LINE__); HDprintf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %f,%d,%f,%c " @@ -1003,18 +1003,18 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, (long)hs_offset[0], (long)hs_offset[1], (long)hs_offset[2], (long)hs_offset[3], (long)hs_offset[4], - (double)rd_c.a, rd_c.x, rd_c.y, rd_c.z, (double)should_be_c.a, - should_be_c.x,should_be_c.y,should_be_c.z); + (double)rd_c.a, rd_c.x, rd_c.y, rd_c.z, (double)should_be_c.a, + should_be_c.x,should_be_c.y,should_be_c.z); goto error; - } - } /* end for fill_time == H5D_FILL_TIME_ALLOC */ - else if(fill_time == H5D_FILL_TIME_NEVER && !odd) { + } + } /* end for fill_time == H5D_FILL_TIME_ALLOC */ + else if(fill_time == H5D_FILL_TIME_NEVER && !odd) { should_be_c.a=buf_c[0].a; should_be_c.x=buf_c[0].x; should_be_c.y=buf_c[0].y; should_be_c.z=buf_c[0].z; - if(!H5_FLT_ABS_EQUAL(rd_c.a, should_be_c.a) || rd_c.x != should_be_c.x || - !H5_DBL_ABS_EQUAL(rd_c.y, should_be_c.y) || rd_c.z != should_be_c.z) { + if(!H5_FLT_ABS_EQUAL(rd_c.a, should_be_c.a) || rd_c.x != should_be_c.x || + !H5_DBL_ABS_EQUAL(rd_c.y, should_be_c.y) || rd_c.z != should_be_c.z) { H5_FAILED(); HDfprintf(stdout, "%u: Value read was not correct.\n", (unsigned)__LINE__); HDprintf(" Elmt={%ld,%ld,%ld,%ld,%ld}, read: %f,%d,%f,%c " @@ -1026,11 +1026,11 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, should_be_c.x,should_be_c.y,should_be_c.z); goto error; } - } /* end for fill_time == H5D_FILL_TIME_NEVER */ + } /* end for fill_time == H5D_FILL_TIME_NEVER */ else if(fill_time == H5D_FILL_TIME_NEVER && odd) { /*Trash data. Don't compare*/ } - } /* end for datatype==H5T_COMPOUND */ + } /* end for datatype==H5T_COMPOUND */ } if(datatype == H5T_COMPOUND) { HDfree(buf_c); @@ -1045,16 +1045,16 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, error: H5E_BEGIN_TRY { - if(datatype==H5T_INTEGER) H5Dclose(dset1); - if(datatype==H5T_COMPOUND) H5Dclose(dset2); - H5Sclose(fspace); - H5Sclose(mspace); + if(datatype==H5T_INTEGER) H5Dclose(dset1); + if(datatype==H5T_COMPOUND) H5Dclose(dset2); + H5Sclose(fspace); + H5Sclose(mspace); } H5E_END_TRY; return 1; } - + /*------------------------------------------------------------------------- * Function: test_rdwr * @@ -1068,8 +1068,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, * Thursday, October 1, 1998 * * Modifications: - * Many new cases have been added to this test since the - * fill value design is modified. + * Many new cases have been added to this test since the + * fill value design is modified. * *------------------------------------------------------------------------- */ @@ -1077,9 +1077,9 @@ static int test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout) { char filename[1024]; - hid_t file=-1, dcpl=-1, ctype_id=-1; + hid_t file=-1, dcpl=-1, ctype_id=-1; hsize_t ch_size[5] = {2, 8, 8, 4, 2}; - int nerrors=0; + int nerrors=0; int fillval = 0x4c70f1cd; comp_datatype fill_ctype={0,0,0,0}; @@ -1154,7 +1154,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout) fill_ctype.y = 4444.4444F; if(H5Pset_fill_value(dcpl, ctype_id, &fill_ctype) < 0) goto error; nerrors += test_rdwr_cases(file, dcpl, "dset11", &fill_ctype, H5D_FILL_TIME_ALLOC, - layout, H5T_COMPOUND, ctype_id); + layout, H5T_COMPOUND, ctype_id); if(H5Pclose(dcpl) < 0) goto error; if((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error; @@ -1211,7 +1211,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout) if(nerrors) - goto error; + goto error; if(H5Pclose(dcpl) < 0) goto error; if(H5Tclose(ctype_id) < 0) goto error; if(H5Fclose(file) < 0) goto error; @@ -1221,22 +1221,22 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout) error: H5E_BEGIN_TRY { H5Pclose(dcpl); - H5Tclose(ctype_id); + H5Tclose(ctype_id); H5Fclose(file); } H5E_END_TRY; return nerrors; } - + /*------------------------------------------------------------------------- - * Function: test_extend_init_integer + * Function: test_extend_init_integer * - * Purpose: Initializes integer values + * Purpose: Initializes integer values * - * Return: Success: 0 - * Failure: < 0 + * Return: Success: 0 + * Failure: < 0 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, July 3, 2007 * *------------------------------------------------------------------------- @@ -1255,16 +1255,16 @@ test_extend_init_integer(void *_buf, size_t nelmts, const void *_val) return 0; } /* end test_extend_init_integer() */ - + /*------------------------------------------------------------------------- - * Function: test_extend_verify_integer + * Function: test_extend_verify_integer * - * Purpose: Verifies integer values + * Purpose: Verifies integer values * - * Return: Success: 0 - * Failure: < 0 + * Return: Success: 0 + * Failure: < 0 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, July 3, 2007 * *------------------------------------------------------------------------- @@ -1293,16 +1293,16 @@ error: return -1; } /* end test_extend_verify_integer() */ - + /*------------------------------------------------------------------------- - * Function: test_extend_release_integer + * Function: test_extend_release_integer * - * Purpose: Release element of integer value + * Purpose: Release element of integer value * - * Return: Success: 0 - * Failure: < 0 + * Return: Success: 0 + * Failure: < 0 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, July 3, 2007 * *------------------------------------------------------------------------- @@ -1313,16 +1313,16 @@ test_extend_release_integer(void H5_ATTR_UNUSED *_elmt) return 0; } /* end test_extend_release_integer() */ - + /*------------------------------------------------------------------------- - * Function: test_extend_init_cmpd_vl + * Function: test_extend_init_cmpd_vl * - * Purpose: Initializes compound+vl values + * Purpose: Initializes compound+vl values * - * Return: Success: 0 - * Failure: < 0 + * Return: Success: 0 + * Failure: < 0 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, July 3, 2007 * *------------------------------------------------------------------------- @@ -1348,16 +1348,16 @@ test_extend_init_cmpd_vl(void *_buf, size_t nelmts, const void *_val) return 0; } /* end test_extend_init_cmpd_vl() */ - + /*------------------------------------------------------------------------- - * Function: test_extend_verify_cmpd_vl + * Function: test_extend_verify_cmpd_vl * - * Purpose: Verifies compound+vl values + * Purpose: Verifies compound+vl values * - * Return: Success: 0 - * Failure: < 0 + * Return: Success: 0 + * Failure: < 0 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, July 3, 2007 * *------------------------------------------------------------------------- @@ -1389,16 +1389,16 @@ error: return -1; } /* end test_extend_verify_cmpd_vl() */ - + /*------------------------------------------------------------------------- - * Function: test_extend_release_cmpd_vl + * Function: test_extend_release_cmpd_vl * - * Purpose: Release element of compound+vl value + * Purpose: Release element of compound+vl value * - * Return: Success: 0 - * Failure: < 0 + * Return: Success: 0 + * Failure: < 0 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, July 3, 2007 * *------------------------------------------------------------------------- @@ -1415,16 +1415,16 @@ test_extend_release_cmpd_vl(void *_elmt) return 0; } /* end test_extend_release_integer() */ - + /*------------------------------------------------------------------------- - * Function: test_extend_cases + * Function: test_extend_cases * - * Purpose: Called to test fill values with various different values + * Purpose: Called to test fill values with various different values * - * Return: Success: 0 - * Failure: number of errors + * Return: Success: 0 + * Failure: number of errors * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, July 3, 2007 * *------------------------------------------------------------------------- @@ -1433,13 +1433,13 @@ static int test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, hsize_t *ch_size, hsize_t *start_size, hsize_t *max_size, hid_t dtype, void *fillval) { - hid_t fspace = -1, mspace = -1; /* File & memory dataspaces */ - hid_t dset = -1; /* Dataset ID */ + hid_t fspace = -1, mspace = -1; /* File & memory dataspaces */ + hid_t dset = -1; /* Dataset ID */ hid_t dcpl = -1; /* Dataset creation property list */ - hsize_t extend_size[5]; /* Dimensions to extend to */ - hsize_t one[5] = {1, 1, 1, 1, 1}; /* Dimensions of single element dataspace */ - hsize_t hs_size[5], hs_stride[5], hs_offset[5]; - size_t nelmts; + hsize_t extend_size[5]; /* Dimensions to extend to */ + hsize_t one[5] = {1, 1, 1, 1, 1}; /* Dimensions of single element dataspace */ + hsize_t hs_size[5], hs_stride[5], hs_offset[5]; + size_t nelmts; H5T_class_t dtype_class; /* Class of datatype */ int (*init_rtn)(void *, size_t, const void *); int (*verify_rtn)(unsigned, const hsize_t *, const void *, const void *); @@ -1447,12 +1447,12 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, size_t val_size; /* Size of element */ void *val_rd, *odd_val; const void *init_val, *should_be, *even_val; - int val_rd_i, init_val_i = 9999; + int val_rd_i, init_val_i = 9999; comp_vl_datatype init_val_c = {87, "baz", "mumble", 129}; comp_vl_datatype val_rd_c; - void *buf = NULL; - unsigned odd; /* Whether an odd or even coord. was read */ - unsigned i, j; /* Local index variables */ + void *buf = NULL; + unsigned odd; /* Whether an odd or even coord. was read */ + unsigned i, j; /* Local index variables */ /* Make copy of dataset creation property list */ if((dcpl = H5Pcopy(_dcpl)) < 0) TEST_ERROR @@ -1503,14 +1503,14 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, if((mspace = H5Screate_simple(5, one, NULL)) < 0) TEST_ERROR for(i = 0; i < 1000; i++) { /* Set offset for random element */ - for(j = 0; j < 5; j++) - hs_offset[j] = (hsize_t)HDrand() % start_size[j]; + for(j = 0; j < 5; j++) + hs_offset[j] = (hsize_t)HDrand() % start_size[j]; /* Select the random element */ - if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL) < 0) TEST_ERROR + if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL) < 0) TEST_ERROR /* Read the random element */ - if(H5Dread(dset, dtype, mspace, fspace, H5P_DEFAULT, val_rd) < 0) TEST_ERROR + if(H5Dread(dset, dtype, mspace, fspace, H5P_DEFAULT, val_rd) < 0) TEST_ERROR /* Verify the element read in */ if(verify_rtn((unsigned)__LINE__, hs_offset, val_rd, fillval) < 0) TEST_ERROR @@ -1526,10 +1526,10 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, /* Initialize dataspace & hyperslab info */ for(i = 0, nelmts = 1; i < 5; i++) { - hs_size[i] = (start_size[i] + 1) / 2; - hs_offset[i] = 0; - hs_stride[i] = 2; - nelmts *= hs_size[i]; + hs_size[i] = (start_size[i] + 1) / 2; + hs_offset[i] = 0; + hs_stride[i] = 2; + nelmts *= hs_size[i]; } /* end for */ /* Check for overflow */ @@ -1556,19 +1556,19 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, if((mspace = H5Screate_simple(5, one, NULL)) < 0) TEST_ERROR for(i = 0; i < 1000; i++) { /* Set offset for random element */ - for(j = 0, odd = 0; j < 5; j++) { - hs_offset[j] = (hsize_t)HDrand() % start_size[j]; - odd += (unsigned)(hs_offset[j] % 2); - } /* end for */ + for(j = 0, odd = 0; j < 5; j++) { + hs_offset[j] = (hsize_t)HDrand() % start_size[j]; + odd += (unsigned)(hs_offset[j] % 2); + } /* end for */ /* Select the random element */ - if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL) < 0) TEST_ERROR + if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL) < 0) TEST_ERROR /* Read the random element */ - if(H5Dread(dset, dtype, mspace, fspace, H5P_DEFAULT, val_rd) < 0) TEST_ERROR + if(H5Dread(dset, dtype, mspace, fspace, H5P_DEFAULT, val_rd) < 0) TEST_ERROR /* Verify the element read in */ - should_be = odd ? odd_val : even_val; + should_be = odd ? odd_val : even_val; if(verify_rtn((unsigned)__LINE__, hs_offset, val_rd, should_be) < 0) TEST_ERROR /* Release any VL components */ @@ -1594,22 +1594,22 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, if((mspace = H5Screate_simple(5, one, NULL)) < 0) TEST_ERROR for(i = 0; i < 1000; i++) { /* Set offset for random element */ - for(j = 0, odd = 0; j < 5; j++) { - hs_offset[j] = (hsize_t)HDrand() % extend_size[j]; - if(hs_offset[j] >= start_size[j]) - odd = 1; - else - odd += (unsigned)(hs_offset[j] % 2); - } /* end for */ + for(j = 0, odd = 0; j < 5; j++) { + hs_offset[j] = (hsize_t)HDrand() % extend_size[j]; + if(hs_offset[j] >= start_size[j]) + odd = 1; + else + odd += (unsigned)(hs_offset[j] % 2); + } /* end for */ /* Select the random element */ - if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL) < 0) TEST_ERROR + if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL) < 0) TEST_ERROR /* Read the random element */ - if(H5Dread(dset, dtype, mspace, fspace, H5P_DEFAULT, val_rd) < 0) TEST_ERROR + if(H5Dread(dset, dtype, mspace, fspace, H5P_DEFAULT, val_rd) < 0) TEST_ERROR /* Verify the element read in */ - should_be = odd ? odd_val : even_val; + should_be = odd ? odd_val : even_val; if(verify_rtn((unsigned)__LINE__, hs_offset, val_rd, should_be) < 0) TEST_ERROR /* Release any VL components */ @@ -1633,22 +1633,22 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, if((mspace = H5Screate_simple(5, one, NULL)) < 0) TEST_ERROR for(i = 0; i < 1000; i++) { /* Set offset for random element */ - for(j = 0, odd = 0; j < 5; j++) { - hs_offset[j] = (hsize_t)HDrand() % max_size[j]; - if(hs_offset[j] >= start_size[j]) - odd = 1; - else - odd += (unsigned)(hs_offset[j] % 2); - } /* end for */ + for(j = 0, odd = 0; j < 5; j++) { + hs_offset[j] = (hsize_t)HDrand() % max_size[j]; + if(hs_offset[j] >= start_size[j]) + odd = 1; + else + odd += (unsigned)(hs_offset[j] % 2); + } /* end for */ /* Select the random element */ - if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL) < 0) TEST_ERROR + if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL) < 0) TEST_ERROR /* Read the random element */ - if(H5Dread(dset, dtype, mspace, fspace, H5P_DEFAULT, val_rd) < 0) TEST_ERROR + if(H5Dread(dset, dtype, mspace, fspace, H5P_DEFAULT, val_rd) < 0) TEST_ERROR /* Verify the element read in */ - should_be = odd ? odd_val : even_val; + should_be = odd ? odd_val : even_val; if(verify_rtn((unsigned)__LINE__, hs_offset, val_rd, should_be) < 0) TEST_ERROR /* Release any VL components */ @@ -1674,22 +1674,22 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, if((mspace = H5Screate_simple(5, one, NULL)) < 0) TEST_ERROR for(i = 0; i < 1000; i++) { /* Set offset for random element */ - for(j = 0, odd = 0; j < 5; j++) { - hs_offset[j] = (hsize_t)HDrand() % extend_size[j]; - if(hs_offset[j] >= start_size[j]) - odd = 1; - else - odd += (unsigned)(hs_offset[j] % 2); - } /* end for */ + for(j = 0, odd = 0; j < 5; j++) { + hs_offset[j] = (hsize_t)HDrand() % extend_size[j]; + if(hs_offset[j] >= start_size[j]) + odd = 1; + else + odd += (unsigned)(hs_offset[j] % 2); + } /* end for */ /* Select the random element */ - if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL) < 0) TEST_ERROR + if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL) < 0) TEST_ERROR /* Read the random element */ - if(H5Dread(dset, dtype, mspace, fspace, H5P_DEFAULT, val_rd) < 0) TEST_ERROR + if(H5Dread(dset, dtype, mspace, fspace, H5P_DEFAULT, val_rd) < 0) TEST_ERROR /* Verify the element read in */ - should_be = odd ? odd_val : even_val; + should_be = odd ? odd_val : even_val; if(verify_rtn((unsigned)__LINE__, hs_offset, val_rd, should_be) < 0) TEST_ERROR /* Release any VL components */ @@ -1767,22 +1767,22 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, /* Read some data and make sure it's the right value */ for(i = 0; i < 1000; i++) { /* Set offset for random element */ - for(j = 0, odd = 0; j < 5; j++) { - hs_offset[j] = (hsize_t)HDrand() % extend_size[j]; - if(hs_offset[j] >= start_size[j]) - odd = 1; - else - odd += (unsigned)(hs_offset[j] % 2); - } /* end for */ + for(j = 0, odd = 0; j < 5; j++) { + hs_offset[j] = (hsize_t)HDrand() % extend_size[j]; + if(hs_offset[j] >= start_size[j]) + odd = 1; + else + odd += (unsigned)(hs_offset[j] % 2); + } /* end for */ /* Select the random element */ - if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL) < 0) TEST_ERROR + if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL) < 0) TEST_ERROR /* Read the random element */ - if(H5Dread(dset, dtype, mspace, fspace, H5P_DEFAULT, val_rd) < 0) TEST_ERROR + if(H5Dread(dset, dtype, mspace, fspace, H5P_DEFAULT, val_rd) < 0) TEST_ERROR /* Verify the element read in */ - should_be = odd ? odd_val : even_val; + should_be = odd ? odd_val : even_val; if(verify_rtn((unsigned)__LINE__, hs_offset, val_rd, should_be) < 0) TEST_ERROR /* Release any VL components */ @@ -1811,26 +1811,26 @@ error: if(buf) HDfree(buf); H5E_BEGIN_TRY { - H5Pclose(dcpl); - H5Dclose(dset); - H5Sclose(fspace); - H5Sclose(mspace); + H5Pclose(dcpl); + H5Dclose(dset); + H5Sclose(fspace); + H5Sclose(mspace); } H5E_END_TRY; return -1; } /* end test_extend_cases() */ - + /*------------------------------------------------------------------------- - * Function: test_extend + * Function: test_extend * - * Purpose: Test that filling works okay when a dataset is extended. + * Purpose: Test that filling works okay when a dataset is extended. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: number of errors + * Failure: number of errors * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Monday, October 5, 1998 * * Modifications: @@ -1840,30 +1840,30 @@ error: static int test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout) { - hid_t file = -1; /* File ID */ - hid_t dcpl = -1; /* Dataset creation property list ID */ - hid_t cmpd_vl_tid = -1; /* Compound+vl datatype ID */ - hsize_t start_size[5] = {8, 8, 8, 4, 2}; - hsize_t max_size[5] = {32, 32, 32, 16, 8}; - hsize_t ch_size[5] = {1, 8, 8, 4, 2}; + hid_t file = -1; /* File ID */ + hid_t dcpl = -1; /* Dataset creation property list ID */ + hid_t cmpd_vl_tid = -1; /* Compound+vl datatype ID */ + hsize_t start_size[5] = {8, 8, 8, 4, 2}; + hsize_t max_size[5] = {32, 32, 32, 16, 8}; + hsize_t ch_size[5] = {1, 8, 8, 4, 2}; #ifdef NO_FILLING - int fillval_i = 0; + int fillval_i = 0; #else - int fillval_i = 0x4c70f1cd; + int fillval_i = 0x4c70f1cd; #endif comp_vl_datatype fillval_c = {32, "foo", "bar", 64}; /* Fill value for compound+vl datatype tests */ - char filename[1024]; + char filename[1024]; /* Print testing message */ if(H5D_CHUNKED == layout) - TESTING("chunked dataset extend") + TESTING("chunked dataset extend") else - TESTING("contiguous dataset extend") + TESTING("contiguous dataset extend") /* Create dataset creation property list */ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR if(H5D_CHUNKED == layout) - if(H5Pset_chunk(dcpl, 5, ch_size) < 0) TEST_ERROR + if(H5Pset_chunk(dcpl, 5, ch_size) < 0) TEST_ERROR #if 1 /* @@ -1877,13 +1877,13 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout) * below. */ if(H5D_CONTIGUOUS==layout) { - max_size[0] = (max_size[0] * max_size[1] * max_size[2] * - max_size[3] * max_size[4]) / - (start_size[1] * start_size[2] * start_size[3] * start_size[4]); - max_size[1] = start_size[1]; - max_size[2] = start_size[2]; - max_size[3] = start_size[3]; - max_size[4] = start_size[4]; + max_size[0] = (max_size[0] * max_size[1] * max_size[2] * + max_size[3] * max_size[4]) / + (start_size[1] * start_size[2] * start_size[3] * start_size[4]); + max_size[1] = start_size[1]; + max_size[2] = start_size[2]; + max_size[3] = start_size[3]; + max_size[4] = start_size[4]; } #endif @@ -1896,13 +1896,13 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout) */ if(H5D_CONTIGUOUS==layout) { int fd; - hsize_t nelmts; + hsize_t nelmts; - nelmts = max_size[0]*max_size[1]*max_size[2]*max_size[3]*max_size[4]; - if((fd = HDopen(FILE_NAME_RAW, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0 || - HDclose(fd) < 0) goto error; - if(H5Pset_external(dcpl, FILE_NAME_RAW, (off_t)0, (hsize_t)nelmts*sizeof(int)) < 0) - goto error; + nelmts = max_size[0]*max_size[1]*max_size[2]*max_size[3]*max_size[4]; + if((fd = HDopen(FILE_NAME_RAW, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0 || + HDclose(fd) < 0) goto error; + if(H5Pset_external(dcpl, FILE_NAME_RAW, (off_t)0, (hsize_t)nelmts*sizeof(int)) < 0) + goto error; } #endif @@ -1914,9 +1914,9 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout) * errors described above or `unable to select fill value region'. */ if(H5D_CONTIGUOUS==layout) { - SKIPPED(); - puts(" Not implemented yet -- needs H5S_SELECT_DIFF operator"); - goto skip; + SKIPPED(); + puts(" Not implemented yet -- needs H5S_SELECT_DIFF operator"); + goto skip; } #endif @@ -1947,20 +1947,20 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout) error: H5E_BEGIN_TRY { H5Tclose(cmpd_vl_tid); - H5Pclose(dcpl); - H5Fclose(file); + H5Pclose(dcpl); + H5Fclose(file); } H5E_END_TRY; return 1; skip: H5E_BEGIN_TRY { - H5Pclose(dcpl); - H5Fclose(file); + H5Pclose(dcpl); + H5Fclose(file); } H5E_END_TRY; return 0; } /* end test_extend() */ - + /*------------------------------------------------------------------------- * Function: test_compatible * @@ -2096,20 +2096,20 @@ error: } /*------------------------------------------------------------------------- - * Function: test_partalloc_cases + * Function: test_partalloc_cases * - * Purpose: Tests fill values read and write for datasets. + * Purpose: Tests fill values read and write for datasets. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Joel Plutchak + * Programmer: Joel Plutchak * April 15, 2013 * * Modifications: - * This function is called by test_rdwr to write and read - * dataset for different cases of chunked datasets with + * This function is called by test_rdwr to write and read + * dataset for different cases of chunked datasets with * unallocated chunks. * *------------------------------------------------------------------------- @@ -2118,12 +2118,12 @@ error: static int test_partalloc_cases(hid_t file, hid_t dcpl, const char *dname, H5D_fill_time_t fill_time) { - hid_t fspace=-1, dset1=-1, rspace = -1; - herr_t ret; - hsize_t ds_size[2] = {4, 4}; - hsize_t max_size[2] = {H5S_UNLIMITED,4}; + hid_t fspace=-1, dset1=-1, rspace = -1; + herr_t ret; + hsize_t ds_size[2] = {4, 4}; + hsize_t max_size[2] = {H5S_UNLIMITED,4}; hsize_t chunk_size[2] = {1, 4}; - int fillval=(-1); + int fillval=(-1); int w_values[] = {42}; /* New value to be written */ int f_values[4] = {88,88,88,88}; /* pre-seed read buffer with known values */ int r_values[4] = {88,88,88,88}; /* pre-seed read buffer with known values */ @@ -2141,17 +2141,17 @@ test_partalloc_cases(hid_t file, hid_t dcpl, const char *dname, H5D_fill_time_t /* * Select a point in the file dataspace. */ - coord[0][0]=0; coord[0][1]=0; + coord[0][0]=0; coord[0][1]=0; if (H5Sselect_elements( fspace, H5S_SELECT_SET, (size_t)1, (const hsize_t *)coord)) goto error; - + /* * Write single data point to the dataset. */ if ((ret = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, fspace, H5P_DEFAULT, w_values))< 0) { goto error; } - + /* Read a line/chunk and make sure values are right */ rspace = H5Screate_simple(2, chunk_size, NULL); @@ -2163,7 +2163,7 @@ test_partalloc_cases(hid_t file, hid_t dcpl, const char *dname, H5D_fill_time_t if ((ret = H5Sselect_hyperslab(fspace, H5S_SELECT_SET, start, NULL, count, NULL)) < 0) goto error; if ((ret = H5Sselect_all(rspace)) < 0) - goto error; + goto error; if(H5Dread(dset1, H5T_NATIVE_INT, rspace, fspace, H5P_DEFAULT, &r_values) < 0) goto error; @@ -2218,15 +2218,15 @@ test_partalloc_cases(hid_t file, hid_t dcpl, const char *dname, H5D_fill_time_t error: H5E_BEGIN_TRY { - H5Dclose(dset1); - H5Sclose(fspace); - H5Sclose(rspace); + H5Dclose(dset1); + H5Sclose(fspace); + H5Sclose(rspace); } H5E_END_TRY; return 1; } - + /*------------------------------------------------------------------------- * Function: test_partalloc * @@ -2246,9 +2246,9 @@ static int test_partalloc(hid_t fapl, const char *base_name) { char filename[1024]; - hid_t file=-1, dcpl=-1; + hid_t file=-1, dcpl=-1; hsize_t ch_size[2] = {1, 4}; - int nerrors=0; + int nerrors=0; TESTING("chunked dataset partially allocated I/O"); @@ -2271,7 +2271,7 @@ test_partalloc(hid_t fapl, const char *base_name) HDfprintf( stdout, " FILL_TIME_ALLOC\n" ); #endif nerrors += test_partalloc_cases(file, dcpl, "dset1", H5D_FILL_TIME_ALLOC); - + /* case for H5D_FILL_TIME_NEVER as fill write time and fill value to be default */ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0) goto error; #ifdef DEBUG @@ -2341,7 +2341,7 @@ test_partalloc(hid_t fapl, const char *base_name) nerrors += test_partalloc_cases(file, dcpl, "dset9", H5D_FILL_TIME_IFSET ); if(nerrors) - goto error; + goto error; if(H5Pclose(dcpl) < 0) goto error; if(H5Fclose(file) < 0) goto error; PASSED(); @@ -2355,17 +2355,17 @@ test_partalloc(hid_t fapl, const char *base_name) return nerrors; } - + /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Tests fill values + * Purpose: Tests fill values * - * Return: Success: + * Return: Success: * - * Failure: + * Failure: * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, October 1, 1998 * *------------------------------------------------------------------------- @@ -2373,9 +2373,9 @@ test_partalloc(hid_t fapl, const char *base_name) int main(int argc, char *argv[]) { - int nerrors=0, argno, test_contig=1, test_chunk=1, test_compact=1; - hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */ - unsigned new_format; /* Whether to use the new format or not */ + int nerrors=0, argno, test_contig=1, test_chunk=1, test_compact=1; + hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */ + unsigned new_format; /* Whether to use the new format or not */ if(argc >= 2) { test_contig = test_chunk = test_compact = 0; diff --git a/test/filter_fail.c b/test/filter_fail.c index 1d0d676..2acce01 100644 --- a/test/filter_fail.c +++ b/test/filter_fail.c @@ -20,7 +20,6 @@ */ #include "h5test.h" -#include "H5srcdir.h" #define DSET_NAME "dset_fail" #define H5Z_FILTER_FAIL_TEST 312 diff --git a/test/gheap.c b/test/gheap.c index 7ddbd37..59db1d4 100644 --- a/test/gheap.c +++ b/test/gheap.c @@ -215,7 +215,7 @@ test_2 (hid_t fapl) size = GHEAP_TEST_NOBJS - u; HDmemset(out, (int)('A' + u % 26), size); H5Eclear2(H5E_DEFAULT); - if (H5HG_insert (f, H5P_DATASET_XFER_DEFAULT, size, out, obj + u) < 0) { + if(H5HG_insert(f, H5P_DATASET_XFER_DEFAULT, size, out, obj + u) < 0) { H5_FAILED(); HDputs(" Unable to insert object into global heap"); nerrors++; diff --git a/test/h5test.c b/test/h5test.c index 6ed14d3..cbccf8f 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -94,6 +94,21 @@ static const char *multi_letters = "msbrglo"; /* Length of multi-file VFD filename buffers */ #define H5TEST_MULTI_FILENAME_LEN 1024 +/* Temporary file for sending signal messages */ +#define TMP_SIGNAL_FILE "tmp_signal_file" + +/* The # of seconds to wait for the message file--used by h5_wait_message() */ +#define MESSAGE_TIMEOUT 300 /* Timeout in seconds */ + +/* The strings that correspond to library version bounds H5F_libver_t in H5Fpublic.h */ +/* This is used by h5_get_version_string() */ +const char *LIBVER_NAMES[] = { + "earliest", /* H5F_LIBVER_EARLIEST = 0 */ + "v18", /* H5F_LIBVER_V18 = 1 */ + "latest", /* H5F_LIBVER_V112 = 3 */ + NULL +}; + /* Previous error reporting function */ static H5E_auto2_t err_func = NULL; @@ -963,7 +978,7 @@ error: return -1; } /* end h5_get_vfd_fapl() */ - + /*------------------------------------------------------------------------- * Function: h5_no_hwconv * @@ -1753,8 +1768,8 @@ static haddr_t dummy_vfd_get_eoa(const H5FD_t H5_ATTR_UNUSED *file, H5FD_mem_t H static herr_t dummy_vfd_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr); static herr_t dummy_vfd_set_eoa(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t H5_ATTR_UNUSED addr) { return FAIL; } -static haddr_t dummy_vfd_get_eof(const H5FD_t *file, H5FD_mem_t type); -static haddr_t dummy_vfd_get_eof(const H5FD_t H5_ATTR_UNUSED *file, H5FD_mem_t H5_ATTR_UNUSED type) { return HADDR_UNDEF; } +static haddr_t dummy_vfd_get_eof(const H5FD_t *file); +static haddr_t dummy_vfd_get_eof(const H5FD_t H5_ATTR_UNUSED *file) { return HADDR_UNDEF; } static herr_t dummy_vfd_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size, void *buf); static herr_t dummy_vfd_read(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED fapl_id, haddr_t H5_ATTR_UNUSED addr, size_t H5_ATTR_UNUSED size, void H5_ATTR_UNUSED *buf) { return FAIL; } @@ -1767,7 +1782,6 @@ static const H5FD_class_t H5FD_dummy_g = { "dummy", /* name */ 1, /* maxaddr */ H5F_CLOSE_WEAK, /* fc_degree */ - NULL, /* terminate */ NULL, /* sb_size */ NULL, /* sb_encode */ NULL, /* sb_decode */ @@ -1795,7 +1809,7 @@ static const H5FD_class_t H5FD_dummy_g = { NULL, /* truncate */ NULL, /* lock */ NULL, /* unlock */ - H5FD_FLMAP_DICHOTOMY /* fl_map */ + H5FD_FLMAP_DICHOTOMY /* fl_map */ }; diff --git a/test/hyperslab.c b/test/hyperslab.c index 773d573..9e17a2f 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -1001,9 +1001,9 @@ test_sub_super(size_t nx, size_t ny) H5_FAILED() if(!HDisatty(1)) { AT(); - printf(" %s\n Half is:\n", s); + HDprintf(" %s\n Half is:\n", s); print_array(half, nx, ny, (size_t)1); - printf("\n Twice is:\n"); + HDprintf("\n Twice is:\n"); print_array(twice, 2 * nx, 2 * ny, (size_t)1); } /* end if */ goto error; diff --git a/test/istore.c b/test/istore.c index f0ddda4..6656abd 100644 --- a/test/istore.c +++ b/test/istore.c @@ -113,12 +113,12 @@ print_array(uint8_t *array, size_t nx, size_t ny, size_t nz) for (j = 0; j < ny; j++) { if (nz > 1) - HDfprintf(stderr,"%03lu:", (unsigned long)j); + HDfprintf(stderr,"%03lu:", (unsigned long)j); for (k = 0; k < nz; k++) { - HDfprintf(stderr," %3d", *array++); + HDfprintf(stderr," %3d", *array++); } if (nz > 1) - HDfprintf(stderr,"\n"); + HDfprintf(stderr,"\n"); } HDfprintf(stderr,"\n"); } @@ -296,8 +296,8 @@ test_extend(hid_t f, const char *prefix, /* Build the new empty object */ HDsprintf(name, "%s_%s", prefix, dims); if ((dataset=new_object(f, name, ndims, whole_size, whole_size)) < 0) { - HDfprintf(stderr," Cannot create %u-d object `%s'\n", ndims, name); - goto error; + HDfprintf(stderr," Cannot create %u-d object `%s'\n", ndims, name); + goto error; } /* Get dataset's dataspace */ @@ -407,10 +407,10 @@ test_extend(hid_t f, const char *prefix, H5_FAILED(); HDfprintf(stderr," Check failed at i=%lu", (unsigned long)i); if (ndims > 1) { - HDfprintf(stderr,", j=%lu", (unsigned long)j); + HDfprintf(stderr,", j=%lu", (unsigned long)j); } if (ndims > 2) { - HDfprintf(stderr,", k=%lu", (unsigned long)k); + HDfprintf(stderr,", k=%lu", (unsigned long)k); } HDfprintf(stderr,"\n Check array is:\n"); print_array(whole, nx, ny, nz); @@ -514,8 +514,8 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, /* Build the new empty object */ HDsprintf(name, "%s_%s", prefix, dims); if ((dataset=new_object(f, name, ndims, whole_size, chunk_dims)) < 0) { - HDprintf(" Cannot create %u-d object `%s'\n", ndims, name); - goto error; + HDprintf(" Cannot create %u-d object `%s'\n", ndims, name); + goto error; } /* Get dataset's dataspace */ diff --git a/test/lheap.c b/test/lheap.c index b692947..c580099 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -15,7 +15,7 @@ * Programmer: Robb Matzke * Tuesday, November 24, 1998 * - * Purpose: Test local heaps used by symbol tables (groups). + * Purpose: Test local heaps used by symbol tables (groups). */ #include "h5test.h" #include "H5srcdir.h" @@ -32,7 +32,7 @@ const char *FILENAME[] = { #define NOBJS 40 - + /*------------------------------------------------------------------------- * Function: main * -- cgit v0.12