From 14200fef675e0c1732d84ae7e06e81a812bd5e99 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 10 Feb 2015 14:58:09 -0500 Subject: [svn-r26153] INCOMPLETE, UNWORKING CODE Commit progress through 2/10/15 at 1500 CST --- MANIFEST | 1 + src/H5Dlayout.c | 12 +++ src/H5Dpkg.h | 5 ++ src/H5Dprivate.h | 5 ++ src/H5Dpublic.h | 1 + src/H5Olayout.c | 222 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- src/H5Oprivate.h | 27 ++++++- src/H5Pdcpl.c | 121 +++++++++++++++++++++++++++++- src/H5R.c | 4 +- src/H5S.c | 4 +- src/H5Sall.c | 41 ++++++++-- src/H5Shyper.c | 80 +++++++++++++------- src/H5Snone.c | 36 +++++++-- src/H5Spkg.h | 2 +- src/H5Spoint.c | 62 +++++++++++----- src/H5Sselect.c | 20 +++-- src/Makefile.am | 2 +- 17 files changed, 559 insertions(+), 86 deletions(-) diff --git a/MANIFEST b/MANIFEST index fbc4a1e..a0737ef 100644 --- a/MANIFEST +++ b/MANIFEST @@ -615,6 +615,7 @@ ./src/H5Dscatgath.c ./src/H5Dselect.c ./src/H5Dtest.c +./src/H5Dvirtual.c ./src/H5E.c ./src/H5Edefin.h ./src/H5Edeprec.c diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index d7d7b88..5929163 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -104,6 +104,10 @@ H5D__layout_set_io_ops(const H5D_t *dataset) dataset->shared->layout.ops = H5D_LOPS_COMPACT; break; + case H5D_VIRTUAL: + dataset->shared->layout.ops = H5D_LOPS_VIRTUAL; + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -169,6 +173,11 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ ret_value += H5F_SIZEOF_ADDR(f); /* Address of data */ break; + case H5D_VIRTUAL: + ret_value += H5F_SIZEOF_ADDR(f); /* Address of global heap */ + ret_value += 4; /* Global heap index */ + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -439,6 +448,9 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t case H5D_COMPACT: break; + case H5D_VIRTUAL: + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 5a785a3..1a659a1 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -173,11 +173,15 @@ typedef struct { hbool_t *dirty; /* Pointer to dirty flag to mark */ } H5D_compact_storage_t; +typedef struct { +} H5D_virtual_storage_t; + typedef union H5D_storage_t { H5D_contig_storage_t contig; /* Contiguous information for dataset */ H5D_chunk_storage_t chunk; /* Chunk information for dataset */ H5D_compact_storage_t compact; /* Compact information for dataset */ H5O_efl_t efl; /* External file list information for dataset */ + H5D_virtual_storage_t virtual; /* Virtual dataset information */ } H5D_storage_t; /* Typedef for raw data I/O operation info */ @@ -515,6 +519,7 @@ H5_DLLVAR const H5D_layout_ops_t H5D_LOPS_CONTIG[1]; H5_DLLVAR const H5D_layout_ops_t H5D_LOPS_EFL[1]; H5_DLLVAR const H5D_layout_ops_t H5D_LOPS_COMPACT[1]; H5_DLLVAR const H5D_layout_ops_t H5D_LOPS_CHUNK[1]; +H5_DLLVAR const H5D_layout_ops_t H5D_LOPS_VIRTUAL[1]; /* Chunked layout operations */ H5_DLLVAR const H5D_chunk_ops_t H5D_COPS_BTREE[1]; diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index 0b8b76f..804afd1 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -174,6 +174,11 @@ H5_DLL herr_t H5D_vlen_reclaim(hid_t type_id, H5S_t *space, hid_t plist_id, /* Functions that operate on chunked storage */ H5_DLL herr_t H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr); +/* Functions that operate on virtual storage */ +herr_t H5D_virtual_copy_layout(H5O_layout_t *layout); +herr_t H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, + const H5O_storage_t *storage); + /* Functions that operate on indexed storage */ H5_DLL herr_t H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int fwidth, unsigned ndims); diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index e7ae3ae..003e357 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -51,6 +51,7 @@ typedef enum H5D_layout_t { H5D_COMPACT = 0, /*raw data is very small */ H5D_CONTIGUOUS = 1, /*the default */ H5D_CHUNKED = 2, /*slow and fancy */ + H5D_VIRTUAL = 3, /*actual data is stored in other datasets */ H5D_NLAYOUTS = 3 /*this one must be last! */ } H5D_layout_t; diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 4c43873..2b12a97 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -96,10 +96,11 @@ H5FL_DEFINE(H5O_layout_t); *------------------------------------------------------------------------- */ static void * -H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, +H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, unsigned UNUSED mesg_flags, unsigned UNUSED *ioflags, const uint8_t *p) { H5O_layout_t *mesg = NULL; + uint8_t *heap_block = NULL; unsigned u; void *ret_value; /* Return value */ @@ -241,6 +242,72 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, mesg->ops = H5D_LOPS_CHUNK; break; + case H5D_VIRTUAL: + /* Heap information */ + H5F_addr_decode(f, &p, &(mesg->storage.u.virtual.serial_list_hobjid.addr)); + UINT32DECODE(p, mesg->storage.u.virtual.serial_list_hobjid.idx); + + /* Initialize other fields */ + mesg->storage.u.virtual.list_nused = 0; + mesg->storage.u.virtual.list = NULL; + mesg->storage.u.virtual.list_nalloc = 0; + + /* Decode heap block if it exists */ + if(mesg->storage.u.virtual.serial_list_hobjid.addr != HADDR_UNDEF) { + uint8_t *heap_block_p; + size_t block_size = 0; + hsize_t tmp_hsize; + uint32_t stored_chksum; + uint32_t computed_chksum; + size_t i; + + /* Read heap */ + if(NULL == (heap_block = (uint8_t *)H5HG_read(f, dxpl_id, &(mesg->storage.u.virtual.serial_list_hobjid), NULL, &block_size))) + HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "Unable to read global heap block") + + heap_block_p = heap_block; + + /* Number of entries */ + H5F_DECODE_LENGTH(f, heap_block_p, tmp_hsize) + + /* Allocate entry list */ + if(NULL == (mesg->storage.u.virtual.list = (H5O_storage_virtual_ent_t *)H5MM_malloc((size_t)tmp_hsize * sizeof(H5O_storage_virtual_ent_t)))) + HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, NULL, "unable to allocate heap block") + mesg->storage.u.virtual.list_nalloc = (size_t)tmp_hsize; + mesg->storage.u.virtual.list_nused = (size_t)tmp_hsize; + + /* Decode each entry */ + for(i = 0; i < mesg->storage.u.virtual.list_nused; i++) { + /* Source file name */ + if(NULL == (mesg->storage.u.virtual.list[i].source_file = HDstrdup(heap_block_p))) + HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, NULL, "unable to duplicate source file name") + heap_block_p += HDstrlen(heap_block_p) + 1; + + /* Source dataset name */ + if(NULL == (mesg->storage.u.virtual.list[i].source_dset = HDstrdup(heap_block_p))) + HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, NULL, "unable to duplicate source dataset name") + heap_block_p += HDstrlen(heap_block_p) + 1; + + /* Source selection */ + H5S_SELECT_DESERIALIZE(&(mesg->storage.u.virtual.list[i].source_select), &heap_block_p) + + /* Virtual selection */ + H5S_SELECT_SERIALIZE(&(mesg->storage.u.virtual.list[i].virtual_select), &heap_block_p) + } /* end for */ + + /* Read stored checksum */ + UINT32DECODE(heap_block_p, stored_chksum) + + /* Compute checksum */ + computed_chksum = H5_checksum_metadata(heap_block, block_size - (size_t)4, 0); + + /* Verify checksum */ + if(stored_chksum != computed_chksum) + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "incorrect metadata checksum for global heap block") + } /* end if */ + + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -253,9 +320,13 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, done: if(ret_value == NULL) - if(mesg) + if(mesg) { + if(mesg->type == H5D_VIRTUAL) + mesg-> mesg = H5FL_FREE(H5O_layout_t, mesg); + heap_block = H5MM_xfree(heap_block); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_layout_decode() */ @@ -294,6 +365,7 @@ static herr_t H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void *_mesg) { const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg; + uint8_t *heap_block = NULL; unsigned u; herr_t ret_value = SUCCEED; /* Return value */ @@ -344,6 +416,101 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi UINT32ENCODE(p, mesg->u.chunk.dim[u]); break; + case H5D_VIRTUAL: + /* Create heap block if it has not been created yet */ + /* Note that we assume here that the contents of the heap block + * cannot change! If this ever stops being the case we must change + * this code to allow overwrites of the heap block. -NAF */ + if((mesg->storage.u.virtual.serial_list_hobjid.addr == HADDR_UNDEF) + && (mesg->storage.u.virtual.list_nused > 0)) { + uint8_t *heap_block_p; + size_t block_size; + hssize_t select_serial_size; + hsize_t tmp_hsize; + uint32_t chksum; + size_t i; + + /* + * Calculate heap block size + */ + /* Number of entries */ + block_size = H5F_SIZEOF_SIZE(f); + + /* Calculate size of each entry */ + for(i = 0; i < mesg->storage.u.virtual.list_nused; i++) { + HDassert(mesg->storage.u.virtual.list[i].source_file); + HDassert(mesg->storage.u.virtual.list[i].source_dset); + HDassert(mesg->storage.u.virtual.list[i].source_select); + HDassert(mesg->storage.u.virtual.list[i].virtual_select); + + /* Source file name */ + block_size += HDstrlen(mesg->storage.u.virtual.list[i].source_file) + (size_t)1; + + /* Source dset name */ + block_size += HDstrlen(mesg->storage.u.virtual.list[i].source_dset) + (size_t)1; + + /* Source selection */ + if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virtual.list[i].source_select)) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") + block_size += (size_t)select_serial_size; + + /* Virtual dataset selection */ + if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virtual.list[i].virtual_select)) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") + block_size += (size_t)select_serial_size; + } /* end for */ + + /* Checksum */ + block_size += 4; + + /* Allocate heap block */ + if(NULL == (heap_block = (uint8_t *)H5MM_malloc((size_t)mesg->storage.u.virtual.serial_list_size))) + HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, FAIL, "unable to allocate heap block") + + /* + * Encode heap block + */ + heap_block_p = heap_block; + + /* Number of entries */ + tmp_hsize = (hsize_t)mesg->storage.u.virtual.list_nused; + H5F_ENCODE_LENGTH(f, heap_block_p, tmp_hsize) + + /* Encode each entry */ + for(i = 0; i < mesg->storage.u.virtual.list_nused; i++) { + /* Source file name */ + (void)HDstrcpy(heap_block_p, mesg->storage.u.virtual.list[i].source_file); + heap_block_p += HDstrlen(heap_block_p) + 1; + + /* Source dataset name */ + (void)HDstrcpy(heap_block_p, mesg->storage.u.virtual.list[i].source_dset); + heap_block_p += HDstrlen(heap_block_p) + 1; + + /* Source selection */ + if(H5S_SELECT_SERIALIZE(mesg->storage.u.virtual.list[i].source_select, &heap_block_p) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "Unable to serialize selection") + + /* Virtual selection */ + if(H5S_SELECT_SERIALIZE(mesg->storage.u.virtual.list[i].virtual_select, &heap_block_p) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "Unable to serialize selection") + } /* end for */ + + /* Checksum */ + chksum = H5_checksum_metadata(heap_block, block_size - (size_t)4, 0); + UINT32ENCODE(heap_block_p, chksum) + + /* Insert block into global heap */ + /* Casting away const OK --NAF */ + if(H5HG_insert(f, H5AC_ind_dxpl_id, block_size, heap_block, &((H5O_layout_t *)mesg)->storage.u.virtual.serial_list_hobjid) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to insert virtual dataset heap block") + } /* end if */ + + /* Heap information */ + H5F_addr_encode(f, &p, mesg->storage.u.virtual.serial_list_hobjid.addr); + UINT32ENCODE(p, mesg->storage.u.virtual.serial_list_hobjid.idx); + + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -351,6 +518,8 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi } /* end switch */ done: + heap_block = H5MM_xfree(heap_block); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_layout_encode() */ @@ -403,6 +572,11 @@ H5O_layout_copy(const void *_mesg, void *_dest) if(dest->type == H5D_CHUNKED && dest->storage.u.chunk.ops) H5D_chunk_idx_reset(&dest->storage.u.chunk, FALSE); + /* Deep copy the entry list for virtual datasets */ + if(mesg->type == H5D_VIRTUAL) + if(H5D_virtual_copy_layout(dest) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy virtual layout") + /* Set return value */ ret_value = dest; @@ -468,19 +642,43 @@ static herr_t H5O_layout_reset(void *_mesg) { H5O_layout_t *mesg = (H5O_layout_t *)_mesg; + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_NOAPI_NOINIT if(mesg) { /* Free the compact storage buffer */ if(H5D_COMPACT == mesg->type) mesg->storage.u.compact.buf = H5MM_xfree(mesg->storage.u.compact.buf); + /* Free the virtual entry list */ + if(H5D_VIRTUAL == mesg->type) { + if(mesg->storage.u.virtual.list_nused > 0) { + size_t i; + HDassert(mesg->storage.u.virtual.list); + + /* Free the list entries */ + for(i = 0; i < mesg->storage.u.virtual.nused; i++) { + mesg->storage.u.virtual.list[i].source_file = H5MM_xfree(mesg->storage.u.virtual.list[i].source_file); + mesg->storage.u.virtual.list[i].source_dset = H5MM_xfree(mesg->storage.u.virtual.list[i].source_dset); + if(H5S_close(mesg->storage.u.virtual.list[i].source_select) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CLOSEERROR, FAIL, "unable to release source selection") + mesg->storage.u.virtual.list[i].source_select = NULL; + if(H5S_close(mesg->storage.u.virtual.list[i].virtual_select) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CLOSEERROR, FAIL, "unable to release virtual selection") + mesg->storage.u.virtual.list[i].virtual_select = NULL; + } /* end for */ + + /* Free the list */ + mesg->storage.u.virtual.list = H5MM_xfree(mesg->storage.u.virtual.list); + } /* end if */ + /* Reset the message */ mesg->type = H5D_CONTIGUOUS; } /* end if */ - FUNC_LEAVE_NOAPI(SUCCEED) +done: + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_layout_reset() */ @@ -560,6 +758,13 @@ H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg) HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data") break; + case H5D_VIRTUAL: /* Virtual dataset */ + HDassert(0 && "checking code coverage...");//VDSINC + /* Free the file space virtual dataset */ + if(H5D__virtual_delete(f, dxpl_id, &mesg->storage) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data") + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -647,6 +852,10 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, } /* end if */ break; + case H5D_VIRTUAL: + HDassert(0 && "Not yet implemented...");//VDSINC + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -745,6 +954,11 @@ H5O_layout_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, "Data Size:", mesg->storage.u.compact.size); break; + case H5D_VIRTUAL: + HDassert(0 && "Not yet implemented...");//VDSINC + + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index e3a2d33..b3d6237 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -372,7 +372,8 @@ typedef struct H5O_efl_t { * for larger chunk dimensions, stores chunk indices into their own * message (the "layout index" message), adds features for compact/dense * storage of elements and/or chunk records, adds features for abbreviating - * the storage used for partial chunks on boundaries, etc. + * the storage used for partial chunks on boundaries, adds the virtual + * layout type, etc. */ #define H5O_LAYOUT_VERSION_4 4 @@ -410,12 +411,36 @@ typedef struct H5O_storage_compact_t { void *buf; /* Buffer for compact dataset */ } H5O_storage_compact_t; +typedef struct H5O_storage_virtual_ent_t { + /* Stored */ + char *source_file; + char *source_dset; + H5S_t *source_select; + H5S_t *virtual_select; + + /* Not stored */ + H5D_t *source_dset; +} H5O_storage_virtual_ent_t; + +typedef struct H5O_storage_virtual_t { + /* Stored in message */ + H5HG_t serial_list_hobjid; + + /* Stored in heap */ + size_t list_nused; /* Number of slots used */ + H5O_storage_virtual_ent_t *list; /* Array of virtual dataset mapping entries */ + + /* Not stored */ + size_t list_nalloc; /* Number of slots allocated */ +} H5O_storage_virtual_t; + typedef struct H5O_storage_t { H5D_layout_t type; /* Type of layout */ union { H5O_storage_contig_t contig; /* Information for contiguous storage */ H5O_storage_chunk_t chunk; /* Information for chunked storage */ H5O_storage_compact_t compact; /* Information for compact storage */ + H5O_storage_virtual_t virtual; /* Information for virtual storage */ } u; } H5O_storage_t; diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index a753209..e9bd9bf 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -41,6 +41,7 @@ #include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ +#include "H5Oprivate.h" /* Object headers */ #include "H5Ppkg.h" /* Property lists */ #include "H5Tprivate.h" /* Datatypes */ #include "H5Zpkg.h" /* Data filters */ @@ -55,13 +56,16 @@ #define H5D_DEF_STORAGE_CONTIG_INIT {HADDR_UNDEF, (hsize_t)0} #define H5D_DEF_STORAGE_CHUNK_INIT {H5D_CHUNK_BTREE, HADDR_UNDEF, NULL, {{HADDR_UNDEF, NULL}}} #define H5D_DEF_LAYOUT_CHUNK_INIT {(unsigned)0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, (uint32_t)0, (hsize_t)0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}} +#define H5D_DEF_STORAGE_VIRTUAL_INIT {{HADDR_UNDEF, 0}, 0, NULL, 0} #ifdef H5_HAVE_C99_DESIGNATED_INITIALIZER #define H5D_DEF_STORAGE_COMPACT {H5D_COMPACT, { .compact = H5D_DEF_STORAGE_COMPACT_INIT }} #define H5D_DEF_STORAGE_CONTIG {H5D_CONTIGUOUS, { .contig = H5D_DEF_STORAGE_CONTIG_INIT }} #define H5D_DEF_STORAGE_CHUNK {H5D_CHUNKED, { .chunk = H5D_DEF_STORAGE_CHUNK_INIT }} -#define H5D_DEF_LAYOUT_COMPACT {H5D_COMPACT, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, H5D_DEF_STORAGE_COMPACT} +#define H5D_DEF_STORAGE_VIRTUAL {H5D_CHUNKED, { .chunk = H5D_DEF_STORAGE_CHUNK_INIT }} +#define H5D_DEF_LAYOUT_COMPACT {H5D_COMPACT, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, H5D_DEF_STORAGE_VIRTUAL} #define H5D_DEF_LAYOUT_CONTIG {H5D_CONTIGUOUS, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, H5D_DEF_STORAGE_CONTIG} #define H5D_DEF_LAYOUT_CHUNK {H5D_CHUNKED, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, H5D_DEF_STORAGE_CHUNK} +#define H5D_DEF_LAYOUT_VIRTUAL {H5D_VIRTUAL, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, H5D_DEF_STORAGE_VIRTUAL} #else /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ /* Note that the compact & chunked layout initialization values are using the * contiguous layout initialization in the union, because the contiguous @@ -71,6 +75,7 @@ #define H5D_DEF_LAYOUT_COMPACT {H5D_COMPACT, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, {H5D_CONTIGUOUS, H5D_DEF_STORAGE_CONTIG_INIT}} #define H5D_DEF_LAYOUT_CONTIG {H5D_CONTIGUOUS, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, {H5D_CONTIGUOUS, H5D_DEF_STORAGE_CONTIG_INIT}} #define H5D_DEF_LAYOUT_CHUNK {H5D_CHUNKED, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, {H5D_CONTIGUOUS, H5D_DEF_STORAGE_CONTIG_INIT}} +#define H5D_DEF_LAYOUT_VIRTUAL {H5D_CHUNKED, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, {H5D_CONTIGUOUS, H5D_DEF_STORAGE_CONTIG_INIT}} #endif /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ /* ======== Dataset creation properties ======== */ @@ -79,7 +84,10 @@ #define H5D_CRT_LAYOUT_DEF H5D_DEF_LAYOUT_CONTIG #define H5D_CRT_LAYOUT_ENC H5P__dcrt_layout_enc #define H5D_CRT_LAYOUT_DEC H5P__dcrt_layout_dec +#define H5D_CRT_LAYOUT_DEL H5P__dcrt_layout_del +#define H5D_CRT_LAYOUT_COPY H5P__dcrt_layout_copy #define H5D_CRT_LAYOUT_CMP H5P__dcrt_layout_cmp +#define H5D_CRT_LAYOUT_CLOSE H5P__dcrt_layout_close /* Definitions for fill value. size=0 means fill value will be 0 as * library default; size=-1 means fill value is undefined. */ #define H5D_CRT_FILL_VALUE_SIZE sizeof(H5O_fill_t) @@ -183,10 +191,12 @@ static const H5O_efl_t H5D_def_efl_g = H5D_CRT_EXT_FILE_LIST_DEF; static const H5O_layout_t H5D_def_layout_compact_g = H5D_DEF_LAYOUT_COMPACT; static const H5O_layout_t H5D_def_layout_contig_g = H5D_DEF_LAYOUT_CONTIG; static const H5O_layout_t H5D_def_layout_chunk_g = H5D_DEF_LAYOUT_CHUNK; +static const H5O_layout_t H5D_def_layout_virtual_g = H5D_DEF_LAYOUT_VIRTUAL; #else /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ static H5O_layout_t H5D_def_layout_compact_g = H5D_DEF_LAYOUT_COMPACT; static H5O_layout_t H5D_def_layout_contig_g = H5D_DEF_LAYOUT_CONTIG; static H5O_layout_t H5D_def_layout_chunk_g = H5D_DEF_LAYOUT_CHUNK; +static H5O_layout_t H5D_def_layout_virtual_g = H5D_DEF_LAYOUT_CHUNK; static hbool_t H5P_dcrt_def_layout_init_g = FALSE; #endif /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ @@ -213,7 +223,7 @@ H5P__dcrt_reg_prop(H5P_genclass_t *pclass) /* Register the storage layout property */ if(H5P_register_real(pclass, H5D_CRT_LAYOUT_NAME, H5D_CRT_LAYOUT_SIZE, &H5D_def_layout_g, NULL, NULL, NULL, H5D_CRT_LAYOUT_ENC, H5D_CRT_LAYOUT_DEC, - NULL, NULL, H5D_CRT_LAYOUT_CMP, NULL) < 0) + H5D_CRT_LAYOUT_DEL, H5D_CRT_LAYOUT_COPY, H5D_CRT_LAYOUT_CMP, H5D_CRT_LAYOUT_CLOSE) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the fill value property */ @@ -444,6 +454,9 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size) for(u = 0; u < layout->u.chunk.ndims; u++) UINT32ENCODE(*pp, layout->u.chunk.dim[u]) } /* end if */ + else if(H5D_VIRTUAL == layout->type) { + HDassert(0 && "Not yet implemented...");//VDSINC + } /* end else */ } /* end if */ /* Size of layout type */ @@ -531,6 +544,10 @@ H5P__dcrt_layout_dec(const void **_pp, void *value) } break; + case H5D_VIRTUAL: + HDassert(0 && "Not yet implemented...");//VDSINC + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -546,6 +563,66 @@ done: /*------------------------------------------------------------------------- + * Function: H5P__dcrt_layout_del + * + * Purpose: Frees memory used to store the layout property + * + * Return: Success: Non-negative + * Failure: Never fails + * + * Programmer: Neil Fortner + * Tuesday, Feb 10, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5P__dcrt_layout_del(hid_t UNUSED prop_id, const char UNUSED *name, size_t UNUSED size, void *value) +{ + FUNC_ENTER_STATIC_NOERR + + HDassert(value); + + (void)H5O_msg_free(H5O_LAYOUT_ID, value) + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5P__dcrt_layout_del() */ + + +/*-------------------------------------------------------------------------- + * Function: H5P__dcrt_layout_copy + * + * Purpose: Copy the layout property + * + * Return: Success: Non-negative + * Failure: Negative + * + * Programmer: Neil Fortner + * Monday, Feb 9, 2015 + * + *-------------------------------------------------------------------------- + */ +static herr_t +H5P__dcrt_layout_copy(const char UNUSED *name, size_t UNUSED size, void *value) +{ + H5O_layout_t *layout; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_STATIC + + HDassert(value); + + layout = (H5O_layout_t *)value; + + if(layout->type == H5D_VIRTUAL) + if(H5D_virtual_copy_layout(layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual layout") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5P__dcrt_layout_copy() */ + + +/*------------------------------------------------------------------------- * Function: H5P__dcrt_layout_cmp * * Purpose: Callback routine which is called whenever the layout @@ -605,6 +682,10 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2, size_t UNUSED s } /* end case */ break; + case H5D_VIRTUAL: + HDassert(0 && "Not yet implemented...");//VDSINC + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -617,6 +698,32 @@ done: /*------------------------------------------------------------------------- + * Function: H5P__dcrt_layout_close + * + * Purpose: Frees memory used to store the layout property + * + * Return: Success: Non-negative + * Failure: Never fails + * + * Programmer: Neil Fortner + * Tuesday, Feb 10, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5P__dcrt_layout_close(const char UNUSED *name, size_t UNUSED size, void *value) +{ + FUNC_ENTER_STATIC_NOERR + + HDassert(value); + + (void)H5O_msg_free(H5O_LAYOUT_ID, value) + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5P__dcrt_layout_close() */ + + +/*------------------------------------------------------------------------- * Function: H5P__fill_value_enc * * Purpose: Callback routine which is called whenever the fill value @@ -1141,6 +1248,10 @@ H5P__set_layout(H5P_genplist_t *plist, const H5O_layout_t *layout) fill.alloc_time = H5D_ALLOC_TIME_INCR; break; + case H5D_VIRTUAL: + fill.alloc_time = H5D_ALLOC_TIME_INCR; + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -1181,6 +1292,7 @@ H5P__init_def_layout(void) const H5O_layout_chunk_t def_layout_chunk = H5D_DEF_LAYOUT_CHUNK_INIT; const H5O_storage_compact_t def_store_compact = H5D_DEF_STORAGE_COMPACT_INIT; const H5O_storage_chunk_t def_store_chunk = H5D_DEF_STORAGE_CHUNK_INIT; + const H5O_storage_virtual_t def_store_virtual = H5D_DEF_STORAGE_VIRTUAL_INIT; FUNC_ENTER_STATIC_NOERR @@ -1188,6 +1300,7 @@ H5P__init_def_layout(void) H5D_def_layout_compact_g.storage.u.compact = def_store_compact; H5D_def_layout_chunk_g.u.chunk = def_layout_chunk; H5D_def_layout_chunk_g.storage.u.chunk = def_store_chunk; + H5D_def_layout_virtual_g.storage.u.virtual = def_store_virtual; /* Note that we've initialized the default values */ H5P_dcrt_def_layout_init_g = TRUE; @@ -1257,6 +1370,10 @@ H5Pset_layout(hid_t plist_id, H5D_layout_t layout_type) layout = &H5D_def_layout_chunk_g; break; + case H5D_VIRTUAL: + layout = &H5D_def_layout_virtual_g; + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: diff --git a/src/H5R.c b/src/H5R.c index 8396dcc..f44b21f 100644 --- a/src/H5R.c +++ b/src/H5R.c @@ -291,7 +291,7 @@ H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5 H5F_addr_encode(loc->oloc->file, &p, obj_loc.oloc->addr); /* Serialize the selection into heap buffer */ - if(H5S_SELECT_SERIALIZE(space, p) < 0) + if(H5S_SELECT_SERIALIZE(space, &p) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Unable to serialize selection") /* Save the serialized buffer for later */ @@ -659,7 +659,7 @@ H5R_get_region(H5F_t *file, hid_t dxpl_id, const void *_ref) HGOTO_ERROR(H5E_DATASPACE, H5E_NOTFOUND, NULL, "not found") /* Unserialize the selection */ - if(H5S_select_deserialize(ret_value, p) < 0) + if(H5S_select_deserialize(&ret_value, &p) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, NULL, "can't deserialize selection") done: diff --git a/src/H5S.c b/src/H5S.c index 1146ab4..7798049 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -1536,7 +1536,7 @@ H5S_encode(H5S_t *obj, unsigned char *buf, size_t *nalloc) buf += extent_size; /* Encode the selection part of dataspace. */ - if(H5S_SELECT_SERIALIZE(obj, buf) < 0) + if(H5S_SELECT_SERIALIZE(obj, &buf) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode select space") } /* end else */ @@ -1655,7 +1655,7 @@ H5S_decode(const unsigned char *buf) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection") /* Decode the select part of dataspace. I believe this part always exists. */ - if(H5S_SELECT_DESERIALIZE(ds, buf) < 0) + if(H5S_SELECT_DESERIALIZE(&ds, &buf) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode space selection") /* Set return value */ diff --git a/src/H5Sall.c b/src/H5Sall.c index 24caad2..a9e72fb 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -510,17 +510,19 @@ H5S_all_serial_size (const H5S_t UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_all_serialize (const H5S_t *space, uint8_t *buf) +H5S_all_serialize (const H5S_t *space, uint8_t **p) { FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(space); + HDassert(p); + HDassert(*p); /* Store the preamble information */ - UINT32ENCODE(buf, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ - UINT32ENCODE(buf, (uint32_t)1); /* Store the version number */ - UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */ - UINT32ENCODE(buf, (uint32_t)0); /* Store the additional information length */ + UINT32ENCODE(*p, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ + UINT32ENCODE(*p, (uint32_t)1); /* Store the version number */ + UINT32ENCODE(*p, (uint32_t)0); /* Store the un-used padding */ + UINT32ENCODE(*p, (uint32_t)0); /* Store the additional information length */ FUNC_LEAVE_NOAPI(SUCCEED) } /* H5S_all_serialize() */ @@ -546,19 +548,42 @@ H5S_all_serialize (const H5S_t *space, uint8_t *buf) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_all_deserialize(H5S_t *space, const uint8_t UNUSED *buf) +H5S_all_deserialize(H5S_t **space, const uint8_t **p) { - herr_t ret_value; /* return value */ + H5S_t *tmp_space; + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_NOAPI(FAIL) HDassert(space); + HDassert(p); + HDassert(*p); + + /* Allocate space if not provided */ + if(!*space) { + if(NULL == (tmp_space = H5S_create(H5S_SIMPLE))) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace") + } /* end if */ + else + tmp_space = *space; + + + /* Skip over the remainder of the header */ + *p += 12; /* Change to "all" selection */ - if((ret_value = H5S_select_all(space, TRUE)) < 0) + if(H5S_select_all(tmp_space, TRUE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + if(!*space) + *space = tmp_space; + done: + /* Free temporary space if not passed to caller (only happens on error) */ + if(!*space && tmp_space) + if(H5S_close(tmp_space) < 0) + HDONE_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't close dataspace") + FUNC_LEAVE_NOAPI(ret_value) } /* H5S_all_deserialize() */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index c97c9b6..02d9359 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -1994,7 +1994,7 @@ H5S_hyper_serial_size(const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start, hsize_t *end, hsize_t rank, uint8_t **buf) +H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start, hsize_t *end, hsize_t rank, uint8_t **p) { H5S_hyper_span_t *curr; /* Pointer to current hyperslab span */ hsize_t u; /* Index variable */ @@ -2007,7 +2007,7 @@ H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start, HDassert(start); HDassert(end); HDassert(rank < H5O_LAYOUT_NDIMS); - HDassert(buf && *buf); + HDassert(p && *p); /* Walk through the list of spans, recursing or outputing them */ curr=spans->head; @@ -2019,7 +2019,7 @@ H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start, end[rank]=curr->high; /* Recurse down to the next dimension */ - if(H5S_hyper_serialize_helper(curr->down,start,end,rank+1,buf)<0) + if(H5S_hyper_serialize_helper(curr->down,start,end,rank+1,p)<0) HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans") } /* end if */ else { @@ -2027,17 +2027,17 @@ H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start, /* Encode previous starting points */ for(u=0; ulow); + UINT32ENCODE(*p, (uint32_t)curr->low); /* Encode previous ending points */ for(u=0; uhigh); + UINT32ENCODE(*p, (uint32_t)curr->high); } /* end else */ /* Advance to next node */ @@ -2069,7 +2069,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_hyper_serialize (const H5S_t *space, uint8_t *buf) +H5S_hyper_serialize (const H5S_t *space, uint8_t **p) { const H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */ hsize_t tmp_count[H5O_LAYOUT_NDIMS]; /* Temporary hyperslab counts */ @@ -2089,11 +2089,11 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf) HDassert(space); /* Store the preamble information */ - UINT32ENCODE(buf, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ - UINT32ENCODE(buf, (uint32_t)1); /* Store the version number */ - UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */ - lenp = buf; /* keep the pointer to the length location for later */ - buf += 4; /* skip over space for length */ + UINT32ENCODE(*p, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ + UINT32ENCODE(*p, (uint32_t)1); /* Store the version number */ + UINT32ENCODE(*p, (uint32_t)0); /* Store the un-used padding */ + lenp = *p; /* keep the pointer to the length location for later */ + *p += 4; /* skip over space for length */ /* Encode number of dimensions */ UINT32ENCODE(buf, (uint32_t)space->extent.rank); @@ -2114,7 +2114,7 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf) /* Encode number of hyperslabs */ H5_CHECK_OVERFLOW(block_count, hsize_t, uint32_t); - UINT32ENCODE(buf, (uint32_t)block_count); + UINT32ENCODE(*p, (uint32_t)block_count); len+=4; /* Now serialize the information for the regular hyperslab */ @@ -2137,11 +2137,11 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf) /* Encode hyperslab starting location */ for(u = 0; u < ndims; u++) - UINT32ENCODE(buf, (uint32_t)offset[u]); + UINT32ENCODE(*p, (uint32_t)offset[u]); /* Encode hyperslab ending location */ for(u = 0; u < ndims; u++) - UINT32ENCODE(buf, (uint32_t)(offset[u] + (diminfo[u].block - 1))); + UINT32ENCODE(*p, (uint32_t)(offset[u] + (diminfo[u].block - 1))); /* Move the offset to the next sequence to start */ offset[fast_dim]+=diminfo[fast_dim].stride; @@ -2192,7 +2192,7 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf) /* Encode number of hyperslabs */ block_count = H5S_hyper_span_nblocks(space->select.sel_info.hslab->span_lst); H5_CHECK_OVERFLOW(block_count, hsize_t, uint32_t); - UINT32ENCODE(buf, (uint32_t)block_count); + UINT32ENCODE(*p, (uint32_t)block_count); len+=4; /* Add 8 bytes times the rank for each hyperslab selected */ @@ -2200,7 +2200,7 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf) len += (size_t)(8 * space->extent.rank * block_count); /* Encode each hyperslab in selection */ - H5S_hyper_serialize_helper(space->select.sel_info.hslab->span_lst, start, end, (hsize_t)0, &buf); + H5S_hyper_serialize_helper(space->select.sel_info.hslab->span_lst, start, end, (hsize_t)0, p); } /* end else */ /* Encode length */ @@ -2230,8 +2230,9 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_hyper_deserialize (H5S_t *space, const uint8_t *buf) +H5S_hyper_deserialize (H5S_t **space, const uint8_t **p) { + H5S_t *tmp_space; uint32_t rank; /* rank of points */ size_t num_elem=0; /* number of elements in selection */ hsize_t start[H5O_LAYOUT_NDIMS]; /* hyperslab start information */ @@ -2251,14 +2252,29 @@ H5S_hyper_deserialize (H5S_t *space, const uint8_t *buf) /* Check args */ HDassert(space); - HDassert(buf); + HDassert(p); + HDassert(*p); /* Deserialize slabs to select */ - buf+=16; /* Skip over selection header */ - UINT32DECODE(buf,rank); /* decode the rank of the point selection */ - if(rank!=space->extent.rank) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "rank of pointer does not match dataspace") - UINT32DECODE(buf,num_elem); /* decode the number of points */ + *p+=12; /* Skip over remainder of selection header */ + UINT32DECODE(*p,rank); /* decode the rank of the point selection */ + UINT32DECODE(*p,num_elem); /* decode the number of points */ + + /* Allocate space if not provided */ + if(!*space) { + if(NULL == (tmp_space = H5S_create(H5S_SIMPLE))) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace") + + /* Set rank of dataspace */ + tmp_space->extent.rank = rank; + } /* end if */ + else { + tmp_space = *space; + + /* Verify rank of dataspace */ + if(rank!=tmp_space->extent.rank) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "rank of pointer does not match dataspace") + } /* end else */ /* Set the count & stride for all blocks */ for(tcount=count,tstride=stride,j=0; jextent.rank); + UINT32ENCODE(*p, (uint32_t)space->extent.rank); len+=4; /* Encode number of elements */ - UINT32ENCODE(buf, (uint32_t)space->select.num_elem); + UINT32ENCODE(*p, (uint32_t)space->select.num_elem); len+=4; /* Encode each point in selection */ curr=space->select.sel_info.pnt_lst->head; while(curr!=NULL) { /* Add 4 bytes times the rank for each element selected */ - len+=4*space->extent.rank; + *p+=4*space->extent.rank; /* Encode each point */ for(u=0; uextent.rank; u++) - UINT32ENCODE(buf, (uint32_t)curr->pnt[u]); + UINT32ENCODE(*p, (uint32_t)curr->pnt[u]); curr=curr->next; } /* end while */ @@ -884,8 +884,9 @@ H5S_point_serialize (const H5S_t *space, uint8_t *buf) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_point_deserialize (H5S_t *space, const uint8_t *buf) +H5S_point_deserialize (H5S_t **space, const uint8_t **p) { + H5S_t *tmp_space; H5S_seloper_t op=H5S_SELECT_SET; /* Selection operation */ uint32_t rank; /* Rank of points */ size_t num_elem=0; /* Number of elements in selection */ @@ -897,14 +898,29 @@ H5S_point_deserialize (H5S_t *space, const uint8_t *buf) /* Check args */ HDassert(space); - HDassert(buf); + HDassert(p); + HDassert(*p); /* Deserialize points to select */ - buf += 16; /* Skip over selection header */ - UINT32DECODE(buf, rank); /* decode the rank of the point selection */ - if(rank != space->extent.rank) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "rank of pointer does not match dataspace") - UINT32DECODE(buf, num_elem); /* decode the number of points */ + *p += 12; /* Skip over remaining selection header */ + UINT32DECODE(*p, rank); /* decode the rank of the point selection */ + UINT32DECODE(*p, num_elem); /* decode the number of points */ + + /* Allocate space if not provided */ + if(!*space) { + if(NULL == (tmp_space = H5S_create(H5S_SIMPLE))) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace") + + /* Set rank of dataspace */ + tmp_space->extent.rank = rank; + } /* end if */ + else { + tmp_space = *space; + + /* Verify rank of dataspace */ + if(rank!=tmp_space->extent.rank) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "rank of pointer does not match dataspace") + } /* end else */ /* Allocate space for the coordinates */ if(NULL == (coord = (hsize_t *)H5MM_malloc(num_elem * rank * sizeof(hsize_t)))) @@ -913,13 +929,21 @@ H5S_point_deserialize (H5S_t *space, const uint8_t *buf) /* Retrieve the coordinates from the buffer */ for(tcoord = coord, i = 0; i < num_elem; i++) for(j = 0; j < (unsigned)rank; j++, tcoord++) - UINT32DECODE(buf, *tcoord); + UINT32DECODE(*p, *tcoord); /* Select points */ - if(H5S_select_elements(space, op, num_elem, (const hsize_t *)coord) < 0) + if(H5S_select_elements(tmp_space, op, num_elem, (const hsize_t *)coord) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + if(!*space) + *space = tmp_space; + done: + /* Free temporary space if not passed to caller (only happens on error) */ + if(!*space && tmp_space) + if(H5S_close(tmp_space) < 0) + HDONE_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't close dataspace") + /* Free the coordinate array if necessary */ if(coord != NULL) H5MM_xfree(coord); diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 2cb4b38..7d22f08 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -241,7 +241,7 @@ H5S_select_serial_size(const H5S_t *space) USAGE herr_t H5S_select_serialize(space, buf) const H5S_t *space; IN: Dataspace with selection to serialize - uint8_t *buf; OUT: Buffer to put serialized selection + uint8_t **p; OUT: Buffer to put serialized selection RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -256,7 +256,7 @@ H5S_select_serial_size(const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_select_serialize(const H5S_t *space, uint8_t *buf) +H5S_select_serialize(const H5S_t *space, uint8_t **p) { herr_t ret_value=SUCCEED; /* Return value */ @@ -266,7 +266,7 @@ H5S_select_serialize(const H5S_t *space, uint8_t *buf) HDassert(buf); /* Call the selection type's serialize function */ - ret_value=(*space->select.type->serialize)(space,buf); + ret_value=(*space->select.type->serialize)(space,p); FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_select_serialize() */ @@ -444,9 +444,8 @@ H5S_select_valid(const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_select_deserialize (H5S_t *space, const uint8_t *buf) +H5S_select_deserialize (H5S_t **space, const uint8_t **p) { - const uint8_t *tbuf; /* Temporary pointer to the selection type */ uint32_t sel_type; /* Pointer to the selection type */ herr_t ret_value=FAIL; /* return value */ @@ -454,23 +453,22 @@ H5S_select_deserialize (H5S_t *space, const uint8_t *buf) HDassert(space); - tbuf=buf; - UINT32DECODE(tbuf, sel_type); + UINT32DECODE(*p, sel_type); switch(sel_type) { case H5S_SEL_POINTS: /* Sequence of points selected */ - ret_value=(*H5S_sel_point->deserialize)(space,buf); + ret_value=(*H5S_sel_point->deserialize)(space,p); break; case H5S_SEL_HYPERSLABS: /* Hyperslab selection defined */ - ret_value=(*H5S_sel_hyper->deserialize)(space,buf); + ret_value=(*H5S_sel_hyper->deserialize)(space,p); break; case H5S_SEL_ALL: /* Entire extent selected */ - ret_value=(*H5S_sel_all->deserialize)(space,buf); + ret_value=(*H5S_sel_all->deserialize)(space,p); break; case H5S_SEL_NONE: /* Nothing selected */ - ret_value=(*H5S_sel_none->deserialize)(space,buf); + ret_value=(*H5S_sel_none->deserialize)(space,p); break; default: diff --git a/src/Makefile.am b/src/Makefile.am index 4b55144..6a745e2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -48,7 +48,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5D.c H5Dbtree.c H5Dchunk.c H5Dcompact.c H5Dcontig.c H5Ddbg.c \ H5Ddeprec.c H5Defl.c H5Dfill.c H5Dint.c \ H5Dio.c H5Dlayout.c \ - H5Dmpio.c H5Doh.c H5Dscatgath.c H5Dselect.c H5Dtest.c \ + H5Dmpio.c H5Doh.c H5Dscatgath.c H5Dselect.c H5Dtest.c H5Dvirtual.c \ H5E.c H5Edeprec.c H5Eint.c \ H5EA.c H5EAcache.c H5EAdbg.c H5EAdblkpage.c H5EAdblock.c H5EAhdr.c \ H5EAiblock.c H5EAint.c H5EAsblock.c H5EAstat.c H5EAtest.c \ -- cgit v0.12 From d273b2a2f88dc571272b7e3bdc8a011fbed969ad Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 10 Feb 2015 15:14:00 -0500 Subject: [svn-r26154] INCOMPLETE, UNWORKING CODE Add H5Dvirtual.c mistakenly omitted from last checkin. --- src/H5Dvirtual.c | 394 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 394 insertions(+) create mode 100644 src/H5Dvirtual.c diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c new file mode 100644 index 0000000..3053690 --- /dev/null +++ b/src/H5Dvirtual.c @@ -0,0 +1,394 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Programmer: Neil Fortner + * Wednesday, January 28, 2015 + * + * Purpose: + * VDSINC + */ + +/****************/ +/* Module Setup */ +/****************/ + +#define H5D_PACKAGE /* Suppress error about including H5Dpkg */ + + +/***********/ +/* Headers */ +/***********/ +#include "H5private.h" /* Generic Functions */ +#include "H5Dpkg.h" /* Dataset functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fprivate.h" /* Files */ +#include "H5HGprivate.h" /* Global Heaps */ +#include "H5Oprivate.h" /* Object headers */ +#include "H5Sprivate.h" /* Dataspaces */ + + +/****************/ +/* Local Macros */ +/****************/ + + +/******************/ +/* Local Typedefs */ +/******************/ + + +/********************/ +/* Local Prototypes */ +/********************/ + +/* Layout operation callbacks */ +static herr_t H5D__virtual_construct(H5F_t *f, H5D_t *dset); +static herr_t H5D__virtual_io_init(const H5D_io_info_t *io_info, + const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space, + const H5S_t *mem_space, H5D_chunk_map_t *cm); +static herr_t H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t + *type_info, hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space, + H5D_chunk_map_t *fm); +static herr_t H5D__virtual_write(H5D_io_info_t *io_info, + const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space, + const H5S_t *mem_space, H5D_chunk_map_t *fm); +static herr_t H5D__virtual_flush(H5D_t *dset, hid_t dxpl_id); + + +/*********************/ +/* Package Variables */ +/*********************/ + +/* Contiguous storage layout I/O ops */ +const H5D_layout_ops_t H5D_LOPS_VIRTUAL[1] = {{ + H5D__virtual_construct, + NULL, + H5D__virtual_is_space_alloc, + H5D__virtual_io_init, + H5D__virtual_read, + H5D__virtual_write, +#ifdef H5_HAVE_PARALLEL + H5D__virtual_collective_read, //VDSINC + H5D__virtual_collective_write, //VDSINC +#endif /* H5_HAVE_PARALLEL */ + NULL, + NULL, + H5D__virtual_flush, + NULL +}}; + + +/*******************/ +/* Local Variables */ +/*******************/ + + + +/*------------------------------------------------------------------------- + * Function: H5D_virtual_copy_layout + * + * Purpose: Deep copies virtual storage layout message in memory. + * This function assumes that the top-level struct has + * already been copied (so the source struct retains + * ownership of the fields passed to this function). + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * February 10, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D_virtual_copy_layout(H5O_layout_t *layout) +{ + H5O_storage_virtual_ent_t *orig_list = NULL; + size_t i; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_PACKAGE + + HDassert(layout); + + if(mesg->storage.u.virtual.list_nused > 0) { + HDassert(0 && "checking code coverage...");//VDSINC + HDassert(layout->storage.u.virtual.list); + + /* Save original entry list for use as the "source" */ + orig_list = layout->storage.u.virtual.list; + + /* Allocate memory for the list */ + if(NULL == (layout->storage.u.virtual.list = (H5O_storage_virtual_ent_t *)H5MM_calloc(layout->storage.u.virtual.list_nused * sizeof(H5O_storage_virtual_ent_t)))) + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "unable to allocate memory for virtual dataset entry list") + layout->storage.u.virtual.list_nalloc = layout->storage.u.virtual.list_nused; + + /* Copy the list entries */ + for(i = 0; i < layout->storage.u.virtual.nused; i++) { + if(NULL == (layout->storage.u.virtual.list[i].source_file + = HDstrdup(orig_list[i].source_file))) + HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source file name") + if(NULL == (layout->storage.u.virtual.list[i].source_dset + = HDstrdup(orig_list[i].source_dset))) + HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source dataset name") + if(NULL == (layout->storage.u.virtual.list[i].source_select + = H5S_copy(orig_list[i].source_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") + if(NULL == (layout->storage.u.virtual.list[i].virtual_select + = H5S_copy(orig_list[i].virtual_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + } /* end for */ + } /* end if */ + else { + HDassert(0 && "checking code coverage...");//VDSINC + /* Zero out other fields related to list, just to be sure */ + layout->storage.u.virtual.list = NULL; + layout->storage.u.virtual.list_nalloc = 0; + } /* end else */ + +done: + /* Release allocated resources on failure */ + if((ret_value < 0) && orig_list + && (orig_list != layout->storage.u.virtual.list)) { + /* Free the list entries */ + for(i = 0; i < layout->storage.u.virtual.nused; i++) { + layout->storage.u.virtual.list[i].source_file = H5MM_xfree(layout->storage.u.virtual.list[i].source_file); + layout->storage.u.virtual.list[i].source_dset = H5MM_xfree(layout->storage.u.virtual.list[i].source_dset); + if(layout->storage.u.virtual.list[i].source_select + && H5S_close(layout->storage.u.virtual.list[i].source_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") + mesg->storage.u.virtual.list[i].source_select = NULL; + if(layout->storage.u.virtual.list[i].virtual_select + && H5S_close(layout->storage.u.virtual.list[i].virtual_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release virtual selection") + mesg->storage.u.virtual.list[i].virtual_select = NULL; + } /* end for */ + + /* Free the list */ + layout->storage.u.virtual.list = H5MM_xfree(layout->storage.u.virtual.list); + } /* end if */ + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D_virtual_copy_layout() */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_delete + * + * Purpose: Delete the file space for a virtual dataset + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * February 6, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, const H5O_storage_t *storage) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_PACKAGE + + /* check args */ + HDassert(f); + HDassert(storage); + + /* Need to add stuff for private data here VDSINC */ + + /* Delete the global heap block */ + if(H5HG_remove(f, dxpl_id, &(storage->u.virtual.serial_list_hobjid)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "Unable to remove heap object") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__virtual_delete */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_construct + * + * Purpose: Constructs new virtual layout information for dataset + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * Monday, February 2, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5D__virtual_construct(H5F_t UNUSED *f, H5D_t UNUSED *dset) +{ + FUNC_ENTER_STATIC_NOERR + + /* No-op for now VDSINC */ + HDassert(0 && "checking code coverage...");//VDSINC + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5D__virtual_construct() */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_is_space_alloc + * + * Purpose: Query if space is allocated for layout + * + * Return: TRUE if space is allocated + * FALSE if it is not + * Negative on failure + * + * Programmer: Neil Fortner + * February 6, 2015 + * + *------------------------------------------------------------------------- + */ +hbool_t +H5D__virtual_is_space_alloc(const H5O_storage_t UNUSED *storage) +{ + hbool_t ret_value; /* Return value */ + + FUNC_ENTER_PACKAGE_NOERR + + /* Need to decide what to do here. For now just return true. VDSINC */ + + FUNC_LEAVE_NOAPI(TRUE) +} /* end H5D__virtual_is_space_alloc() */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_io_init + * + * Purpose: Performs initialization before any sort of I/O on the raw data + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * February 6, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5D__virtual_io_init(const H5D_io_info_t UNUSED *io_info, const H5D_type_info_t UNUSED *type_info, + hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space, + H5D_chunk_map_t UNUSED *cm) +{ + FUNC_ENTER_STATIC_NOERR + + HDassert(0 && "Not yet implemented...");//VDSINC + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5D__virtual_io_init() */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_read + * + * Purpose: Read from a virtual dataset. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * February 6, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D__virtual_read(H5D_io_info_t UNUSED *io_info, const H5D_type_info_t UNUSED *type_info, + hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space, + H5D_chunk_map_t UNUSED *fm) +{ + FUNC_ENTER_PACKAGE_NOERR + + HDassert(0 && "Not yet implemented...");//VDSINC + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5D__virtual_read() */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_write + * + * Purpose: Write to a virtual dataset. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * February 6, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D__virtual_write(H5D_io_info_t UNUSED *io_info, const H5D_type_info_t UNUSED *type_info, + hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space, + H5D_chunk_map_t UNUSED *fm) +{ + FUNC_ENTER_PACKAGE_NOERR + + HDassert(0 && "Not yet implemented...");//VDSINC + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5D__virtual_write() */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_flush + * + * Purpose: Writes all dirty data to disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * February 6, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5D__virtual_flush(H5D_t UNUSED *dset, hid_t UNUSED dxpl_id) +{ + FUNC_ENTER_STATIC_NOERR + + /* No-op for now VDSINC */ + HDassert(0 && "checking code coverage...");//VDSINC + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5D__virtual_flush() */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_copy + * + * Purpose: Copy virtual storage raw data from SRC file to DST file. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * February 6, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D__virtual_copy(H5F_t UNUSED *f_src, const H5O_storage_contig_t UNUSED *storage_src, + H5F_t UNUSED *f_dst, H5O_storage_contig_t UNUSED *storage_dst, H5T_t UNUSED *dt_src, + H5O_copy_t UNUSED *cpy_info, hid_t UNUSED dxpl_id) +{ + FUNC_ENTER_PACKAGE_NOERR + + HDassert(0 && "Not yet implemented...");//VDSINC + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5D__virtual_copy() */ + -- cgit v0.12 From 1199ab1f480fd700c6e8a2d9f939ebb0765c25ab Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 17 Feb 2015 16:11:22 -0500 Subject: [svn-r26198] INCOMPLETE, UNWORKING CODE Commit progress through 1610 CST 2/17/15 --- src/H5Ddbg.c | 2 + src/H5Dint.c | 23 +- src/H5Dlayout.c | 1 + src/H5Doh.c | 3 + src/H5Dpkg.h | 11 +- src/H5Dprivate.h | 7 +- src/H5Dpublic.h | 2 +- src/H5Dvirtual.c | 132 +++++--- src/H5Olayout.c | 153 ++++----- src/H5Oprivate.h | 17 +- src/H5Pdcpl.c | 420 ++++++++++++++++++++++++- src/H5Ppublic.h | 9 + src/H5Sall.c | 46 +-- src/H5Shyper.c | 62 ++-- src/H5Snone.c | 45 +-- src/H5Spkg.h | 4 +- src/H5Spoint.c | 60 ++-- src/H5Sprivate.h | 4 +- src/H5Sselect.c | 70 ++++- src/H5trace.c | 4 + src/Makefile.in | 92 +++--- test/Makefile.am | 5 +- test/Makefile.in | 30 +- test/vds.c | 452 +++++++++++++++++++++++++++ tools/h5stat/h5stat.c | 4 +- tools/h5stat/testfiles/h5stat_dims1.ddl | 1 + tools/h5stat/testfiles/h5stat_dims2.ddl | 1 + tools/h5stat/testfiles/h5stat_filters-d.ddl | 1 + tools/h5stat/testfiles/h5stat_filters-dT.ddl | 1 + tools/h5stat/testfiles/h5stat_filters.ddl | 1 + tools/h5stat/testfiles/h5stat_links2.ddl | 1 + tools/h5stat/testfiles/h5stat_newgrat.ddl | 1 + tools/h5stat/testfiles/h5stat_numattrs2.ddl | 1 + tools/h5stat/testfiles/h5stat_tsohm.ddl | 1 + 34 files changed, 1307 insertions(+), 360 deletions(-) create mode 100644 test/vds.c diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c index a7c6dc1..adec71b 100644 --- a/src/H5Ddbg.c +++ b/src/H5Ddbg.c @@ -116,6 +116,8 @@ H5Ddebug(hid_t dset_id) (void)H5D__chunk_dump_index(dset, H5AC_dxpl_id, stdout); else if(H5D_CONTIGUOUS == dset->shared->layout.type) HDfprintf(stdout, " %-10s %a\n", "Address:", dset->shared->layout.storage.u.contig.addr); + else if(H5D_VIRTUAL == dset->shared->layout.type) + HDassert(0 && "Not yet implemented...");//VDSINC done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Dint.c b/src/H5Dint.c index ee346f3..61a2ed7 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1296,6 +1296,10 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id) fill_prop->alloc_time = H5D_ALLOC_TIME_INCR; break; + case H5D_VIRTUAL: + fill_prop->alloc_time = H5D_ALLOC_TIME_INCR; + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -1310,7 +1314,8 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id) alloc_time_state = 0; if((dataset->shared->layout.type == H5D_COMPACT && fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY) || (dataset->shared->layout.type == H5D_CONTIGUOUS && fill_prop->alloc_time == H5D_ALLOC_TIME_LATE) - || (dataset->shared->layout.type == H5D_CHUNKED && fill_prop->alloc_time == H5D_ALLOC_TIME_INCR)) + || (dataset->shared->layout.type == H5D_CHUNKED && fill_prop->alloc_time == H5D_ALLOC_TIME_INCR) + || (dataset->shared->layout.type == H5D_VIRTUAL && fill_prop->alloc_time == H5D_ALLOC_TIME_INCR)) alloc_time_state = 1; /* Set revised fill value properties, if they are different from the defaults */ @@ -1437,6 +1442,10 @@ H5D_close(H5D_t *dataset) dataset->shared->layout.storage.u.compact.buf = H5MM_xfree(dataset->shared->layout.storage.u.compact.buf); break; + case H5D_VIRTUAL: + /* Close datasets here? VDSINC */ + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -1681,6 +1690,10 @@ H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc } /* end if */ break; + case H5D_VIRTUAL: + /* No-op for now VDSINC */ + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -1800,6 +1813,9 @@ H5D__init_storage(const H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[], break; } /* end block */ + case H5D_VIRTUAL: + /* No-op for now VDSINC */ + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -1856,6 +1872,10 @@ H5D__get_storage_size(H5D_t *dset, hid_t dxpl_id, hsize_t *storage_size) *storage_size = dset->shared->layout.storage.u.compact.size; break; + case H5D_VIRTUAL: + /* Just set to 0 until private data is implemented VDSINC */ + *storage_size = 0; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -1894,6 +1914,7 @@ H5D__get_offset(const H5D_t *dset) switch(dset->shared->layout.type) { case H5D_CHUNKED: case H5D_COMPACT: + case H5D_VIRTUAL: break; case H5D_CONTIGUOUS: diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index 5929163..0dbe4db 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -174,6 +174,7 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ break; case H5D_VIRTUAL: + HDassert((layout->storage.u.virt.list_nused > 0) && "checking code coverage...");//VDSINC ret_value += H5F_SIZEOF_ADDR(f); /* Address of global heap */ ret_value += 4; /* Global heap index */ break; diff --git a/src/H5Doh.c b/src/H5Doh.c index abf76d0..a688fe7 100644 --- a/src/H5Doh.c +++ b/src/H5Doh.c @@ -398,6 +398,9 @@ H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info) if(H5D__chunk_bh_info(f, dxpl_id, &layout, &pline, &(bh_info->index_size)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine chunked dataset btree info") } /* end if */ + else if(layout.type == H5D_VIRTUAL && H5D__virtual_is_space_alloc(&layout.storage)) { + HDassert(0 && "Not yet implemented...");//VDSINC + } /* end if */ /* Check for External File List message in the object header */ if((exists = H5O_msg_exists_oh(oh, H5O_EFL_ID)) < 0) diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 1a659a1..ac6896f 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -174,14 +174,14 @@ typedef struct { } H5D_compact_storage_t; typedef struct { -} H5D_virtual_storage_t; +} H5D_virtual_storage_t; /* Either fill out or remove VDSINC */ typedef union H5D_storage_t { H5D_contig_storage_t contig; /* Contiguous information for dataset */ H5D_chunk_storage_t chunk; /* Chunk information for dataset */ H5D_compact_storage_t compact; /* Compact information for dataset */ H5O_efl_t efl; /* External file list information for dataset */ - H5D_virtual_storage_t virtual; /* Virtual dataset information */ + H5D_virtual_storage_t virt; /* Virtual dataset information */ } H5D_storage_t; /* Typedef for raw data I/O operation info */ @@ -653,6 +653,13 @@ H5_DLL herr_t H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src H5F_t *f_dst, H5O_storage_compact_t *storage_dst, H5T_t *src_dtype, H5O_copy_t *cpy_info, hid_t dxpl_id); +/* Functions that operate on virtual dataset storage */ +H5_DLL herr_t H5D__virtual_copy(H5F_t *f_src, + const H5O_storage_virtual_t *storage_src, H5F_t *f_dst, + H5O_storage_virtual_t *storage_dst, H5T_t *dt_src, H5O_copy_t *cpy_info, + hid_t dxpl_id); +H5_DLL hbool_t H5D__virtual_is_space_alloc(const H5O_storage_t *storage); + /* Functions that operate on EFL (External File List)*/ H5_DLL hbool_t H5D__efl_is_space_alloc(const H5O_storage_t *storage); H5_DLL herr_t H5D__efl_bh_info(H5F_t *f, hid_t dxpl_id, H5O_efl_t *efl, diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index 804afd1..11c9fac 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -106,6 +106,9 @@ #define H5D_VLEN_FREE NULL #define H5D_VLEN_FREE_INFO NULL +/* Default virtual dataset list size */ +#define H5D_VIRTUAL_DEF_LIST_SIZE 8 + /****************************/ /* Library Private Typedefs */ @@ -176,8 +179,8 @@ H5_DLL herr_t H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_ad /* Functions that operate on virtual storage */ herr_t H5D_virtual_copy_layout(H5O_layout_t *layout); -herr_t H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, - const H5O_storage_t *storage); +herr_t H5D_virtual_reset_layout(H5O_layout_t *layout); +herr_t H5D_virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage); /* Functions that operate on indexed storage */ H5_DLL herr_t H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index 003e357..fb936d2 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -52,7 +52,7 @@ typedef enum H5D_layout_t { H5D_CONTIGUOUS = 1, /*the default */ H5D_CHUNKED = 2, /*slow and fancy */ H5D_VIRTUAL = 3, /*actual data is stored in other datasets */ - H5D_NLAYOUTS = 3 /*this one must be last! */ + H5D_NLAYOUTS = 4 /*this one must be last! */ } H5D_layout_t; /* Types of chunk index data structures */ diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 3053690..5e9decd 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -36,6 +36,7 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* Files */ #include "H5HGprivate.h" /* Global Heaps */ +#include "H5MMprivate.h" /* Memory management */ #include "H5Oprivate.h" /* Object headers */ #include "H5Sprivate.h" /* Dataspaces */ @@ -119,34 +120,35 @@ H5D_virtual_copy_layout(H5O_layout_t *layout) size_t i; herr_t ret_value = SUCCEED; - FUNC_ENTER_PACKAGE + FUNC_ENTER_NOAPI(FAIL) HDassert(layout); + HDassert(layout->type == H5D_VIRTUAL); - if(mesg->storage.u.virtual.list_nused > 0) { + if(layout->storage.u.virt.list_nused > 0) { HDassert(0 && "checking code coverage...");//VDSINC - HDassert(layout->storage.u.virtual.list); + HDassert(layout->storage.u.virt.list); /* Save original entry list for use as the "source" */ - orig_list = layout->storage.u.virtual.list; + orig_list = layout->storage.u.virt.list; /* Allocate memory for the list */ - if(NULL == (layout->storage.u.virtual.list = (H5O_storage_virtual_ent_t *)H5MM_calloc(layout->storage.u.virtual.list_nused * sizeof(H5O_storage_virtual_ent_t)))) + if(NULL == (layout->storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_calloc(layout->storage.u.virt.list_nused * sizeof(H5O_storage_virtual_ent_t)))) HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "unable to allocate memory for virtual dataset entry list") - layout->storage.u.virtual.list_nalloc = layout->storage.u.virtual.list_nused; + layout->storage.u.virt.list_nalloc = layout->storage.u.virt.list_nused; /* Copy the list entries */ - for(i = 0; i < layout->storage.u.virtual.nused; i++) { - if(NULL == (layout->storage.u.virtual.list[i].source_file - = HDstrdup(orig_list[i].source_file))) + for(i = 0; i < layout->storage.u.virt.list_nused; i++) { + if(NULL == (layout->storage.u.virt.list[i].source_file_name + = HDstrdup(orig_list[i].source_file_name))) HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source file name") - if(NULL == (layout->storage.u.virtual.list[i].source_dset - = HDstrdup(orig_list[i].source_dset))) + if(NULL == (layout->storage.u.virt.list[i].source_dset_name + = HDstrdup(orig_list[i].source_dset_name))) HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source dataset name") - if(NULL == (layout->storage.u.virtual.list[i].source_select + if(NULL == (layout->storage.u.virt.list[i].source_select = H5S_copy(orig_list[i].source_select, FALSE, TRUE))) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") - if(NULL == (layout->storage.u.virtual.list[i].virtual_select + if(NULL == (layout->storage.u.virt.list[i].virtual_select = H5S_copy(orig_list[i].virtual_select, FALSE, TRUE))) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") } /* end for */ @@ -154,38 +156,74 @@ H5D_virtual_copy_layout(H5O_layout_t *layout) else { HDassert(0 && "checking code coverage...");//VDSINC /* Zero out other fields related to list, just to be sure */ - layout->storage.u.virtual.list = NULL; - layout->storage.u.virtual.list_nalloc = 0; + layout->storage.u.virt.list = NULL; + layout->storage.u.virt.list_nalloc = 0; } /* end else */ done: /* Release allocated resources on failure */ if((ret_value < 0) && orig_list - && (orig_list != layout->storage.u.virtual.list)) { - /* Free the list entries */ - for(i = 0; i < layout->storage.u.virtual.nused; i++) { - layout->storage.u.virtual.list[i].source_file = H5MM_xfree(layout->storage.u.virtual.list[i].source_file); - layout->storage.u.virtual.list[i].source_dset = H5MM_xfree(layout->storage.u.virtual.list[i].source_dset); - if(layout->storage.u.virtual.list[i].source_select - && H5S_close(layout->storage.u.virtual.list[i].source_select) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") - mesg->storage.u.virtual.list[i].source_select = NULL; - if(layout->storage.u.virtual.list[i].virtual_select - && H5S_close(layout->storage.u.virtual.list[i].virtual_select) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release virtual selection") - mesg->storage.u.virtual.list[i].virtual_select = NULL; - } /* end for */ - - /* Free the list */ - layout->storage.u.virtual.list = H5MM_xfree(layout->storage.u.virtual.list); - } /* end if */ + && (orig_list != layout->storage.u.virt.list)) + if(H5D_virtual_reset_layout(layout) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset virtual layout") FUNC_LEAVE_NOAPI(ret_value) } /* end H5D_virtual_copy_layout() */ /*------------------------------------------------------------------------- - * Function: H5D__virtual_delete + * Function: H5D_virtual_reset_layout + * + * Purpose: Frees internal structures in a virtual storage layout + * message in memory. This function is safe to use on + * incomplete structures (for recovery from failure) provided + * the internal structures are initialized with all bytes set + * to 0. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * February 11, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D_virtual_reset_layout(H5O_layout_t *layout) +{ + size_t i; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI(FAIL) + + HDassert(layout); + HDassert(layout->type == H5D_VIRTUAL); + + /* Free the list entries. Note we always attempt to free everything even in + * the case of a failure. */ + for(i = 0; i < layout->storage.u.virt.list_nused; i++) { + layout->storage.u.virt.list[i].source_file_name = (char *)H5MM_xfree(layout->storage.u.virt.list[i].source_file_name); + layout->storage.u.virt.list[i].source_dset_name = (char *)H5MM_xfree(layout->storage.u.virt.list[i].source_dset_name); + if(layout->storage.u.virt.list[i].source_select + && H5S_close(layout->storage.u.virt.list[i].source_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") + layout->storage.u.virt.list[i].source_select = NULL; + if(layout->storage.u.virt.list[i].virtual_select + && H5S_close(layout->storage.u.virt.list[i].virtual_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release virtual selection") + layout->storage.u.virt.list[i].virtual_select = NULL; + /* Close dataset here? VDSINC */ + } /* end for */ + + /* Free the list */ + layout->storage.u.virt.list = (H5O_storage_virtual_ent_t *)(layout->storage.u.virt.list); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D_virtual_reset_layout() */ + + +/*------------------------------------------------------------------------- + * Function: H5D_virtual_delete * * Purpose: Delete the file space for a virtual dataset * @@ -197,25 +235,30 @@ done: *------------------------------------------------------------------------- */ herr_t -H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, const H5O_storage_t *storage) +H5D_virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE + FUNC_ENTER_NOAPI(FAIL) /* check args */ HDassert(f); HDassert(storage); + HDassert(storage->type == H5D_VIRTUAL); /* Need to add stuff for private data here VDSINC */ /* Delete the global heap block */ - if(H5HG_remove(f, dxpl_id, &(storage->u.virtual.serial_list_hobjid)) < 0) + if(H5HG_remove(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "Unable to remove heap object") + /* Clear global heap ID in storage */ + storage->u.virt.serial_list_hobjid.addr = HADDR_UNDEF; + storage->u.virt.serial_list_hobjid.idx = 0; + done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D__virtual_delete */ +} /* end H5D_virtual_delete */ /*------------------------------------------------------------------------- @@ -257,15 +300,18 @@ H5D__virtual_construct(H5F_t UNUSED *f, H5D_t UNUSED *dset) *------------------------------------------------------------------------- */ hbool_t -H5D__virtual_is_space_alloc(const H5O_storage_t UNUSED *storage) +H5D__virtual_is_space_alloc(const H5O_storage_t *storage) { hbool_t ret_value; /* Return value */ FUNC_ENTER_PACKAGE_NOERR - /* Need to decide what to do here. For now just return true. VDSINC */ + HDassert(0 && "checking code coverage...");//VDSINC + /* Need to decide what to do here. For now just return TRUE if the global + * heap block has been allocated. VDSINC */ + ret_value = storage->u.virt.serial_list_hobjid.addr != HADDR_UNDEF; - FUNC_LEAVE_NOAPI(TRUE) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_is_space_alloc() */ @@ -381,8 +427,8 @@ H5D__virtual_flush(H5D_t UNUSED *dset, hid_t UNUSED dxpl_id) *------------------------------------------------------------------------- */ herr_t -H5D__virtual_copy(H5F_t UNUSED *f_src, const H5O_storage_contig_t UNUSED *storage_src, - H5F_t UNUSED *f_dst, H5O_storage_contig_t UNUSED *storage_dst, H5T_t UNUSED *dt_src, +H5D__virtual_copy(H5F_t UNUSED *f_src, const H5O_storage_virtual_t UNUSED *storage_src, + H5F_t UNUSED *f_dst, H5O_storage_virtual_t UNUSED *storage_dst, H5T_t UNUSED *dt_src, H5O_copy_t UNUSED *cpy_info, hid_t UNUSED dxpl_id) { FUNC_ENTER_PACKAGE_NOERR diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 2b12a97..0e43824 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -244,55 +244,62 @@ H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, case H5D_VIRTUAL: /* Heap information */ - H5F_addr_decode(f, &p, &(mesg->storage.u.virtual.serial_list_hobjid.addr)); - UINT32DECODE(p, mesg->storage.u.virtual.serial_list_hobjid.idx); + H5F_addr_decode(f, &p, &(mesg->storage.u.virt.serial_list_hobjid.addr)); + UINT32DECODE(p, mesg->storage.u.virt.serial_list_hobjid.idx); /* Initialize other fields */ - mesg->storage.u.virtual.list_nused = 0; - mesg->storage.u.virtual.list = NULL; - mesg->storage.u.virtual.list_nalloc = 0; + mesg->storage.u.virt.list_nused = 0; + mesg->storage.u.virt.list = NULL; + mesg->storage.u.virt.list_nalloc = 0; /* Decode heap block if it exists */ - if(mesg->storage.u.virtual.serial_list_hobjid.addr != HADDR_UNDEF) { - uint8_t *heap_block_p; + if(mesg->storage.u.virt.serial_list_hobjid.addr != HADDR_UNDEF) { + const uint8_t *heap_block_p; size_t block_size = 0; + size_t tmp_size; hsize_t tmp_hsize; uint32_t stored_chksum; uint32_t computed_chksum; size_t i; /* Read heap */ - if(NULL == (heap_block = (uint8_t *)H5HG_read(f, dxpl_id, &(mesg->storage.u.virtual.serial_list_hobjid), NULL, &block_size))) + if(NULL == (heap_block = (uint8_t *)H5HG_read(f, dxpl_id, &(mesg->storage.u.virt.serial_list_hobjid), NULL, &block_size))) HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "Unable to read global heap block") - heap_block_p = heap_block; + heap_block_p = (const uint8_t *)heap_block; /* Number of entries */ H5F_DECODE_LENGTH(f, heap_block_p, tmp_hsize) /* Allocate entry list */ - if(NULL == (mesg->storage.u.virtual.list = (H5O_storage_virtual_ent_t *)H5MM_malloc((size_t)tmp_hsize * sizeof(H5O_storage_virtual_ent_t)))) + if(NULL == (mesg->storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_calloc((size_t)tmp_hsize * sizeof(H5O_storage_virtual_ent_t)))) HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, NULL, "unable to allocate heap block") - mesg->storage.u.virtual.list_nalloc = (size_t)tmp_hsize; - mesg->storage.u.virtual.list_nused = (size_t)tmp_hsize; + mesg->storage.u.virt.list_nalloc = (size_t)tmp_hsize; + mesg->storage.u.virt.list_nused = (size_t)tmp_hsize; /* Decode each entry */ - for(i = 0; i < mesg->storage.u.virtual.list_nused; i++) { + for(i = 0; i < mesg->storage.u.virt.list_nused; i++) { /* Source file name */ - if(NULL == (mesg->storage.u.virtual.list[i].source_file = HDstrdup(heap_block_p))) - HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, NULL, "unable to duplicate source file name") - heap_block_p += HDstrlen(heap_block_p) + 1; + tmp_size = HDstrlen((const char *)heap_block_p) + 1; + if(NULL == (mesg->storage.u.virt.list[i].source_file_name = (char *)H5MM_malloc(tmp_size))) + HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, NULL, "unable to allocate memory for source file name") + (void)HDmemcpy(mesg->storage.u.virt.list[i].source_file_name, heap_block_p, tmp_size); + heap_block_p += tmp_size; /* Source dataset name */ - if(NULL == (mesg->storage.u.virtual.list[i].source_dset = HDstrdup(heap_block_p))) - HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, NULL, "unable to duplicate source dataset name") - heap_block_p += HDstrlen(heap_block_p) + 1; + tmp_size = HDstrlen((const char *)heap_block_p) + 1; + if(NULL == (mesg->storage.u.virt.list[i].source_dset_name = (char *)H5MM_malloc(tmp_size))) + HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, NULL, "unable to allocate memory for source dataset name") + (void)HDmemcpy(mesg->storage.u.virt.list[i].source_dset_name, heap_block_p, tmp_size); + heap_block_p += tmp_size; /* Source selection */ - H5S_SELECT_DESERIALIZE(&(mesg->storage.u.virtual.list[i].source_select), &heap_block_p) + if(H5S_SELECT_DESERIALIZE(&(mesg->storage.u.virt.list[i].source_select), &heap_block_p) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode source space selection") /* Virtual selection */ - H5S_SELECT_SERIALIZE(&(mesg->storage.u.virtual.list[i].virtual_select), &heap_block_p) + if(H5S_SELECT_DESERIALIZE(&(mesg->storage.u.virt.list[i].virtual_select), &heap_block_p) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode virtual space selection") } /* end for */ /* Read stored checksum */ @@ -304,6 +311,10 @@ H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, /* Verify checksum */ if(stored_chksum != computed_chksum) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "incorrect metadata checksum for global heap block") + + /* Verify that the heap block size is correct */ + if((size_t)(heap_block_p - heap_block) != block_size) + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "incorrect heap block size") } /* end if */ break; @@ -322,10 +333,12 @@ done: if(ret_value == NULL) if(mesg) { if(mesg->type == H5D_VIRTUAL) - mesg-> + if(H5D_virtual_reset_layout(mesg) < 0) + HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, NULL, "unable to reset virtual layout") mesg = H5FL_FREE(H5O_layout_t, mesg); + } /* end if */ - heap_block = H5MM_xfree(heap_block); + heap_block = (uint8_t *)H5MM_xfree(heap_block); FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_layout_decode() */ @@ -366,6 +379,7 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi { const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg; uint8_t *heap_block = NULL; + size_t *str_size = NULL; unsigned u; herr_t ret_value = SUCCEED; /* Return value */ @@ -421,8 +435,8 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi /* Note that we assume here that the contents of the heap block * cannot change! If this ever stops being the case we must change * this code to allow overwrites of the heap block. -NAF */ - if((mesg->storage.u.virtual.serial_list_hobjid.addr == HADDR_UNDEF) - && (mesg->storage.u.virtual.list_nused > 0)) { + if((mesg->storage.u.virt.serial_list_hobjid.addr == HADDR_UNDEF) + && (mesg->storage.u.virt.list_nused > 0)) { uint8_t *heap_block_p; size_t block_size; hssize_t select_serial_size; @@ -430,6 +444,10 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi uint32_t chksum; size_t i; + /* Allocate array for caching results of strlen */ + if(NULL == (str_size = (size_t *)H5MM_malloc(2 * mesg->storage.u.virt.list_nused *sizeof(size_t)))) + HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, FAIL, "unable to allocate string length array") + /* * Calculate heap block size */ @@ -437,25 +455,27 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi block_size = H5F_SIZEOF_SIZE(f); /* Calculate size of each entry */ - for(i = 0; i < mesg->storage.u.virtual.list_nused; i++) { - HDassert(mesg->storage.u.virtual.list[i].source_file); - HDassert(mesg->storage.u.virtual.list[i].source_dset); - HDassert(mesg->storage.u.virtual.list[i].source_select); - HDassert(mesg->storage.u.virtual.list[i].virtual_select); + for(i = 0; i < mesg->storage.u.virt.list_nused; i++) { + HDassert(mesg->storage.u.virt.list[i].source_file_name); + HDassert(mesg->storage.u.virt.list[i].source_dset_name); + HDassert(mesg->storage.u.virt.list[i].source_select); + HDassert(mesg->storage.u.virt.list[i].virtual_select); /* Source file name */ - block_size += HDstrlen(mesg->storage.u.virtual.list[i].source_file) + (size_t)1; + str_size[2 * i] = HDstrlen(mesg->storage.u.virt.list[i].source_file_name) + (size_t)1; + block_size += str_size[2 * i]; /* Source dset name */ - block_size += HDstrlen(mesg->storage.u.virtual.list[i].source_dset) + (size_t)1; + str_size[(2 * i) + 1] = HDstrlen(mesg->storage.u.virt.list[i].source_dset_name) + (size_t)1; + block_size += str_size[(2 * i) + 1]; /* Source selection */ - if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virtual.list[i].source_select)) < 0) + if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virt.list[i].source_select)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") block_size += (size_t)select_serial_size; /* Virtual dataset selection */ - if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virtual.list[i].virtual_select)) < 0) + if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virt.list[i].virtual_select)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") block_size += (size_t)select_serial_size; } /* end for */ @@ -464,7 +484,7 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi block_size += 4; /* Allocate heap block */ - if(NULL == (heap_block = (uint8_t *)H5MM_malloc((size_t)mesg->storage.u.virtual.serial_list_size))) + if(NULL == (heap_block = (uint8_t *)H5MM_malloc(block_size))) HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, FAIL, "unable to allocate heap block") /* @@ -473,26 +493,26 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi heap_block_p = heap_block; /* Number of entries */ - tmp_hsize = (hsize_t)mesg->storage.u.virtual.list_nused; + tmp_hsize = (hsize_t)mesg->storage.u.virt.list_nused; H5F_ENCODE_LENGTH(f, heap_block_p, tmp_hsize) /* Encode each entry */ - for(i = 0; i < mesg->storage.u.virtual.list_nused; i++) { + for(i = 0; i < mesg->storage.u.virt.list_nused; i++) { /* Source file name */ - (void)HDstrcpy(heap_block_p, mesg->storage.u.virtual.list[i].source_file); - heap_block_p += HDstrlen(heap_block_p) + 1; + (void)HDstrcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_file_name); + heap_block_p += str_size[2 * i]; /* Source dataset name */ - (void)HDstrcpy(heap_block_p, mesg->storage.u.virtual.list[i].source_dset); - heap_block_p += HDstrlen(heap_block_p) + 1; + (void)HDstrcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_dset_name); + heap_block_p += str_size[(2 * i) + 1]; /* Source selection */ - if(H5S_SELECT_SERIALIZE(mesg->storage.u.virtual.list[i].source_select, &heap_block_p) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "Unable to serialize selection") + if(H5S_SELECT_SERIALIZE(mesg->storage.u.virt.list[i].source_select, &heap_block_p) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize source selection") /* Virtual selection */ - if(H5S_SELECT_SERIALIZE(mesg->storage.u.virtual.list[i].virtual_select, &heap_block_p) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "Unable to serialize selection") + if(H5S_SELECT_SERIALIZE(mesg->storage.u.virt.list[i].virtual_select, &heap_block_p) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize virtual selection") } /* end for */ /* Checksum */ @@ -501,13 +521,15 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi /* Insert block into global heap */ /* Casting away const OK --NAF */ - if(H5HG_insert(f, H5AC_ind_dxpl_id, block_size, heap_block, &((H5O_layout_t *)mesg)->storage.u.virtual.serial_list_hobjid) < 0) + if(H5HG_insert(f, H5AC_ind_dxpl_id, block_size, heap_block, &((H5O_layout_t *)mesg)->storage.u.virt.serial_list_hobjid) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to insert virtual dataset heap block") } /* end if */ + HDassert((mesg->storage.u.virt.list_nused > 0) && "checking code coverage...");//VDSINC + /* Heap information */ - H5F_addr_encode(f, &p, mesg->storage.u.virtual.serial_list_hobjid.addr); - UINT32ENCODE(p, mesg->storage.u.virtual.serial_list_hobjid.idx); + H5F_addr_encode(f, &p, mesg->storage.u.virt.serial_list_hobjid.addr); + UINT32ENCODE(p, mesg->storage.u.virt.serial_list_hobjid.idx); break; @@ -518,7 +540,8 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi } /* end switch */ done: - heap_block = H5MM_xfree(heap_block); + heap_block = (uint8_t *)H5MM_xfree(heap_block); + str_size = (size_t *)H5MM_xfree(str_size); FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_layout_encode() */ @@ -573,9 +596,11 @@ H5O_layout_copy(const void *_mesg, void *_dest) H5D_chunk_idx_reset(&dest->storage.u.chunk, FALSE); /* Deep copy the entry list for virtual datasets */ - if(mesg->type == H5D_VIRTUAL) + if(mesg->type == H5D_VIRTUAL) { + HDassert((mesg->storage.u.virt.list_nused > 0) && "checking code coverage...");//VDSINC if(H5D_virtual_copy_layout(dest) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy virtual layout") + } //VDSINC /* Set return value */ ret_value = dest; @@ -650,28 +675,10 @@ H5O_layout_reset(void *_mesg) /* Free the compact storage buffer */ if(H5D_COMPACT == mesg->type) mesg->storage.u.compact.buf = H5MM_xfree(mesg->storage.u.compact.buf); - - /* Free the virtual entry list */ - if(H5D_VIRTUAL == mesg->type) { - if(mesg->storage.u.virtual.list_nused > 0) { - size_t i; - HDassert(mesg->storage.u.virtual.list); - - /* Free the list entries */ - for(i = 0; i < mesg->storage.u.virtual.nused; i++) { - mesg->storage.u.virtual.list[i].source_file = H5MM_xfree(mesg->storage.u.virtual.list[i].source_file); - mesg->storage.u.virtual.list[i].source_dset = H5MM_xfree(mesg->storage.u.virtual.list[i].source_dset); - if(H5S_close(mesg->storage.u.virtual.list[i].source_select) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CLOSEERROR, FAIL, "unable to release source selection") - mesg->storage.u.virtual.list[i].source_select = NULL; - if(H5S_close(mesg->storage.u.virtual.list[i].virtual_select) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CLOSEERROR, FAIL, "unable to release virtual selection") - mesg->storage.u.virtual.list[i].virtual_select = NULL; - } /* end for */ - - /* Free the list */ - mesg->storage.u.virtual.list = H5MM_xfree(mesg->storage.u.virtual.list); - } /* end if */ + else if(H5D_VIRTUAL == mesg->type) + /* Free the virtual entry list */ + if(H5D_virtual_reset_layout(mesg) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to reset virtual layout") /* Reset the message */ mesg->type = H5D_CONTIGUOUS; @@ -761,7 +768,7 @@ H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg) case H5D_VIRTUAL: /* Virtual dataset */ HDassert(0 && "checking code coverage...");//VDSINC /* Free the file space virtual dataset */ - if(H5D__virtual_delete(f, dxpl_id, &mesg->storage) < 0) + if(H5D_virtual_delete(f, dxpl_id, &mesg->storage) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data") break; diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index b3d6237..ac8d02f 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -37,6 +37,7 @@ /* Private headers needed by this file */ #include "H5ACprivate.h" /* Metadata cache */ #include "H5Fprivate.h" /* File access */ +#include "H5HGprivate.h" /* Global Heaps */ #include "H5SLprivate.h" /* Skip lists */ #include "H5Tprivate.h" /* Datatype functions */ #include "H5Zprivate.h" /* I/O pipeline filters */ @@ -413,21 +414,21 @@ typedef struct H5O_storage_compact_t { typedef struct H5O_storage_virtual_ent_t { /* Stored */ - char *source_file; - char *source_dset; - H5S_t *source_select; - H5S_t *virtual_select; + char *source_file_name; /* Source file name used for virtual dataset mapping */ + char *source_dset_name; /* Source dataset name used for virtual dataset mapping */ + struct H5S_t *source_select; /* Selection in the source dataset for mapping */ + struct H5S_t *virtual_select; /* Selection in the virtual dataset that is mapped to source_select */ /* Not stored */ - H5D_t *source_dset; + struct H5D_t *source_dset; /* Source dataset */ } H5O_storage_virtual_ent_t; typedef struct H5O_storage_virtual_t { /* Stored in message */ - H5HG_t serial_list_hobjid; + H5HG_t serial_list_hobjid; /* Global heap ID for the list of virtual mapping entries stored on disk */ /* Stored in heap */ - size_t list_nused; /* Number of slots used */ + size_t list_nused; /* Number of array elements used in list */ H5O_storage_virtual_ent_t *list; /* Array of virtual dataset mapping entries */ /* Not stored */ @@ -440,7 +441,7 @@ typedef struct H5O_storage_t { H5O_storage_contig_t contig; /* Information for contiguous storage */ H5O_storage_chunk_t chunk; /* Information for chunked storage */ H5O_storage_compact_t compact; /* Information for compact storage */ - H5O_storage_virtual_t virtual; /* Information for virtual storage */ + H5O_storage_virtual_t virt; /* Information for virtual storage */ } u; } H5O_storage_t; diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index e9bd9bf..6abe17d 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -61,8 +61,8 @@ #define H5D_DEF_STORAGE_COMPACT {H5D_COMPACT, { .compact = H5D_DEF_STORAGE_COMPACT_INIT }} #define H5D_DEF_STORAGE_CONTIG {H5D_CONTIGUOUS, { .contig = H5D_DEF_STORAGE_CONTIG_INIT }} #define H5D_DEF_STORAGE_CHUNK {H5D_CHUNKED, { .chunk = H5D_DEF_STORAGE_CHUNK_INIT }} -#define H5D_DEF_STORAGE_VIRTUAL {H5D_CHUNKED, { .chunk = H5D_DEF_STORAGE_CHUNK_INIT }} -#define H5D_DEF_LAYOUT_COMPACT {H5D_COMPACT, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, H5D_DEF_STORAGE_VIRTUAL} +#define H5D_DEF_STORAGE_VIRTUAL {H5D_CHUNKED, { .virt = H5D_DEF_STORAGE_VIRTUAL_INIT }} +#define H5D_DEF_LAYOUT_COMPACT {H5D_COMPACT, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, H5D_DEF_STORAGE_COMPACT} #define H5D_DEF_LAYOUT_CONTIG {H5D_CONTIGUOUS, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, H5D_DEF_STORAGE_CONTIG} #define H5D_DEF_LAYOUT_CHUNK {H5D_CHUNKED, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, H5D_DEF_STORAGE_CHUNK} #define H5D_DEF_LAYOUT_VIRTUAL {H5D_VIRTUAL, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, H5D_DEF_STORAGE_VIRTUAL} @@ -136,7 +136,10 @@ static herr_t H5P__dcrt_close(hid_t dxpl_id, void *close_data); /* Property callbacks */ static herr_t H5P__dcrt_layout_enc(const void *value, void **pp, size_t *size); static herr_t H5P__dcrt_layout_dec(const void **pp, void *value); +static herr_t H5P__dcrt_layout_del(hid_t prop_id, const char *name, size_t size, void *value); +static herr_t H5P__dcrt_layout_copy(const char *name, size_t size, void *value); static int H5P__dcrt_layout_cmp(const void *value1, const void *value2, size_t size); +static herr_t H5P__dcrt_layout_close(const char *name, size_t size, void *value); static herr_t H5P__fill_value_enc(const void *value, void **pp, size_t *size); static herr_t H5P__fill_value_dec(const void **pp, void *value); static herr_t H5P__dcrt_ext_file_list_enc(const void *value, void **pp, size_t *size); @@ -324,6 +327,10 @@ H5P__dcrt_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data) dst_layout.storage.u.chunk.ops = NULL; break; + case H5D_VIRTUAL: + dst_layout.storage.u.virt.serial_list_hobjid.addr = HADDR_UNDEF; + dst_layout.storage.u.virt.serial_list_hobjid.idx = 0; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: @@ -568,7 +575,7 @@ done: * Purpose: Frees memory used to store the layout property * * Return: Success: Non-negative - * Failure: Never fails + * Failure: Negative * * Programmer: Neil Fortner * Tuesday, Feb 10, 2015 @@ -578,13 +585,21 @@ done: static herr_t H5P__dcrt_layout_del(hid_t UNUSED prop_id, const char UNUSED *name, size_t UNUSED size, void *value) { - FUNC_ENTER_STATIC_NOERR + H5O_layout_t *layout = (H5O_layout_t *)value; /* Create local aliases for values */ + herr_t ret_value = SUCCEED; /* Return value */ - HDassert(value); + FUNC_ENTER_STATIC - (void)H5O_msg_free(H5O_LAYOUT_ID, value) + /* Sanity check */ + HDassert(layout); - FUNC_LEAVE_NOAPI(SUCCEED) + /* Reset the old layout befopre overwriting it if necessary */ + if(layout->type == H5D_VIRTUAL) + if(H5D_virtual_reset_layout(layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "unable to reset virtual layout") + +done: + FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dcrt_layout_del() */ @@ -604,12 +619,12 @@ H5P__dcrt_layout_del(hid_t UNUSED prop_id, const char UNUSED *name, size_t UNUSE static herr_t H5P__dcrt_layout_copy(const char UNUSED *name, size_t UNUSED size, void *value) { - H5O_layout_t *layout; + H5O_layout_t *layout = (H5O_layout_t *)value; /* Create local aliases for values */ herr_t ret_value = SUCCEED; FUNC_ENTER_STATIC - HDassert(value); + HDassert(layout); layout = (H5O_layout_t *)value; @@ -703,7 +718,7 @@ done: * Purpose: Frees memory used to store the layout property * * Return: Success: Non-negative - * Failure: Never fails + * Failure: Negative * * Programmer: Neil Fortner * Tuesday, Feb 10, 2015 @@ -713,13 +728,21 @@ done: static herr_t H5P__dcrt_layout_close(const char UNUSED *name, size_t UNUSED size, void *value) { - FUNC_ENTER_STATIC_NOERR + H5O_layout_t *layout = (H5O_layout_t *)value; /* Create local aliases for values */ + herr_t ret_value = SUCCEED; /* Return value */ - HDassert(value); + FUNC_ENTER_STATIC - (void)H5O_msg_free(H5O_LAYOUT_ID, value) + /* Sanity check */ + HDassert(layout); - FUNC_LEAVE_NOAPI(SUCCEED) + /* Reset the old layout befopre overwriting it if necessary */ + if(layout->type == H5D_VIRTUAL) + if(H5D_virtual_reset_layout(layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "unable to reset virtual layout") + +done: + FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dcrt_layout_close() */ @@ -1217,6 +1240,7 @@ done: static herr_t H5P__set_layout(H5P_genplist_t *plist, const H5O_layout_t *layout) { + H5O_layout_t old_layout; /* Layout propertry already on list */ unsigned alloc_time_state; /* State of allocation time property */ herr_t ret_value = SUCCEED; /* return value */ @@ -1263,6 +1287,17 @@ H5P__set_layout(H5P_genplist_t *plist, const H5O_layout_t *layout) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set space allocation time") } /* end if */ + /* Get the old layout */ + if(H5P_get(plist, H5D_CRT_LAYOUT_NAME, &old_layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get layout") + + /* Reset the old layout before overwriting it if necessary */ + if(old_layout.type == H5D_VIRTUAL) { + HDassert((layout->storage.u.virt.list_nused > 0) && "checking code coverage...");//VDSINC + if(H5D_virtual_reset_layout(&old_layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "unable to reset virtual layout") + } //VDSINC + /* Set layout value */ if(H5P_set(plist, H5D_CRT_LAYOUT_NAME, layout) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set layout") @@ -1278,7 +1313,8 @@ done: * * Purpose: Set the default layout information for the various types of * dataset layouts - * + + * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol @@ -1300,7 +1336,7 @@ H5P__init_def_layout(void) H5D_def_layout_compact_g.storage.u.compact = def_store_compact; H5D_def_layout_chunk_g.u.chunk = def_layout_chunk; H5D_def_layout_chunk_g.storage.u.chunk = def_store_chunk; - H5D_def_layout_virtual_g.storage.u.virtual = def_store_virtual; + H5D_def_layout_virtual_g.storage.u.virt = def_store_virtual; /* Note that we've initialized the default values */ H5P_dcrt_def_layout_init_g = TRUE; @@ -1579,6 +1615,354 @@ done: /*------------------------------------------------------------------------- + * Function: H5Pset_virtual + * + * Purpose: VDSINC + * + * As a side effect, the layout method is changed to + * H5D_VIRTUAL. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * Friday, February 13, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, + const char *src_dset_name, hid_t src_space_id) +{ + H5P_genplist_t *plist; /* Property list pointer */ + H5O_layout_t layout; /* Layout information for setting chunk info */ + H5S_t *vspace; /* Virtual dataset space selection */ + H5S_t *src_space; /* Source dataset space selection */ + hbool_t new_layout = FALSE; /* Whether we are adding a new virtual layout message to plist */ + hbool_t adding_entry = FALSE; /* Whether we are in the middle of adding an entry */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE5("e", "ii*s*si", dcpl_id, vspace_id, src_file_name, src_dset_name, + src_space_id); + + /* Check arguments */ + if(!src_file_name) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source file name not provided") + if(!src_dset_name) + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "source dataset name not provided") + if(NULL == (vspace = (H5S_t *)H5I_object_verify(vspace_id, H5I_DATASPACE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + if(NULL == (src_space = (H5S_t *)H5I_object_verify(src_space_id, H5I_DATASPACE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + +#ifndef H5_HAVE_C99_DESIGNATED_INITIALIZER + /* If the compiler doesn't support C99 designated initializers, check if + * the default layout structs have been initialized yet or not. *ick* -QAK + */ + if(!H5P_dcrt_def_layout_init_g) + if(H5P__init_def_layout() < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't initialize default layout info") +#endif /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ + + /* Get the plist structure */ + if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + + /* Get the current layout */ + if(H5P_get(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get layout") + + /* If the layout was not already virtual, Start with default virtual layout. + * Otherwise, add the mapping to the current list. */ + if(layout.type != H5D_VIRTUAL) { + new_layout = TRUE; + HDmemcpy(&layout, &H5D_def_layout_virtual_g, sizeof(H5D_def_layout_virtual_g)); + } /* end if */ + + /* Expand list if necessary */ + if(layout.storage.u.virt.list_nalloc == 0) { + /* Allocate initial entry list */ + if(NULL == (layout.storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_calloc(H5D_VIRTUAL_DEF_LIST_SIZE * sizeof(H5O_storage_virtual_ent_t)))) + HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't allocate virtual dataset mapping list") + } /* end if */ + else if(layout.storage.u.virt.list_nused + == layout.storage.u.virt.list_nalloc) { + HDassert((layout.storage.u.virt.list_nused > 0) && "checking code coverage...");//VDSINC + /* Double size of entry list. Make sure to zero out new memory. */ + if(NULL == (layout.storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_realloc(layout.storage.u.virt.list, (size_t)2 * layout.storage.u.virt.list_nalloc * sizeof(H5O_storage_virtual_ent_t)))) + HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't reallocate virtual dataset mapping list") + (void)HDmemset(layout.storage.u.virt.list + layout.storage.u.virt.list_nalloc, 0, layout.storage.u.virt.list_nalloc * sizeof(H5O_storage_virtual_ent_t)); + layout.storage.u.virt.list_nalloc *= (size_t)2; + } /* end if */ + + /* Add virtual dataset mapping entry */ + if(NULL == (layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_file_name = HDstrdup(src_file_name))) + HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name") + adding_entry = TRUE; + if(NULL == (layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_dset_name = HDstrdup(src_dset_name))) + HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name") + if(NULL == (layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_select = H5S_copy(src_space, FALSE, TRUE))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection") + if(NULL == (layout.storage.u.virt.list[layout.storage.u.virt.list_nused].virtual_select = H5S_copy(vspace, FALSE, TRUE))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + layout.storage.u.virt.list_nused++; + adding_entry = FALSE; + + /* Set chunk information in property list if we are adding a new layout */ + if(new_layout) + if(H5P__set_layout(plist, &layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout") + +done: + if(adding_entry) { + HDassert(ret_value < 0); + + /* Free incomplete entry */ + layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_file_name = (char *)H5MM_xfree(layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_file_name); + layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_dset_name = (char *)H5MM_xfree(layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_dset_name); + if(layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_select + && H5S_close(layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") + layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_select = NULL; + HDassert(layout.storage.u.virt.list[layout.storage.u.virt.list_nused].virtual_select == NULL); + } /* end if */ + + FUNC_LEAVE_API(ret_value) +} /* end H5Pset_virtual() */ + + +/*------------------------------------------------------------------------- + * Function: H5Pget_virtual_count + * + * Purpose: VDSINC + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * Friday, February 13, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5Pget_virtual_count(hid_t dcpl_id, size_t *count/*out*/) +{ + H5P_genplist_t *plist; /* Property list pointer */ + H5O_layout_t layout; /* Layout information */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE2("e", "ix", dcpl_id, count); + HDassert(0 && "checking code coverage...");//VDSINC + + if(count) { + /* Get the plist structure */ + if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + + /* Retrieve the layout property */ + if(H5P_get(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout") + if(H5D_VIRTUAL != layout.type) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") + + /* Return the number of mappings */ + *count = layout.storage.u.virt.list_nused; + } /* end if */ + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Pget_virtual_count() */ + + +/*------------------------------------------------------------------------- + * Function: H5Pget_virtual_vspace + * + * Purpose: VDSINC + * + * Return: VDSINC + * + * Programmer: Neil Fortner + * Friday, February 13, 2015 + * + *------------------------------------------------------------------------- + */ +hid_t +H5Pget_virtual_vspace(hid_t dcpl_id, size_t index) +{ + H5P_genplist_t *plist; /* Property list pointer */ + H5O_layout_t layout; /* Layout information */ + H5S_t *space; /* Dataspace pointer */ + hid_t ret_value; /* Return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE2("i", "iz", dcpl_id, index); + HDassert(0 && "checking code coverage...");//VDSINC + + /* Get the plist structure */ + if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + + /* Retrieve the layout property */ + if(H5P_get(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout") + if(H5D_VIRTUAL != layout.type) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") + + /* Get the virtual space */ + if(index >= layout.storage.u.virt.list_nalloc) + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") + if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].virtual_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + + /* Register ID */ + if((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register data space") + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Pget_virtual_vspace() */ + + +/*------------------------------------------------------------------------- + * Function: H5Pget_virtual_srcspace + * + * Purpose: VDSINC + * + * Return: VDSINC + * + * Programmer: Neil Fortner + * Saturday, February 14, 2015 + * + *------------------------------------------------------------------------- + */ +hid_t +H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index) +{ + H5P_genplist_t *plist; /* Property list pointer */ + H5O_layout_t layout; /* Layout information */ + H5S_t *space; /* Dataspace pointer */ + hid_t ret_value; /* Return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE2("i", "iz", dcpl_id, index); + HDassert(0 && "checking code coverage...");//VDSINC + + /* Get the plist structure */ + if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + + /* Retrieve the layout property */ + if(H5P_get(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout") + if(H5D_VIRTUAL != layout.type) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") + + /* Get the virtual space */ + if(index >= layout.storage.u.virt.list_nalloc) + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") + if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].source_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection") + + /* Register ID */ + if((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register data space") + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Pget_virtual_srcspace() */ + + +/*------------------------------------------------------------------------- + * Function: H5Pget_virtual_filename + * + * Purpose: VDSINC + * + * Return: VDSINC + * + * Programmer: Neil Fortner + * Saturday, February 14, 2015 + * + *------------------------------------------------------------------------- + */ +ssize_t +H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name/*out*/, + size_t size) +{ + H5P_genplist_t *plist; /* Property list pointer */ + H5O_layout_t layout; /* Layout information */ + ssize_t ret_value; /* Return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE4("Zs", "izxz", dcpl_id, index, name, size); + HDassert(0 && "checking code coverage...");//VDSINC + + /* Get the plist structure */ + if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + + /* Retrieve the layout property */ + if(H5P_get(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout") + if(H5D_VIRTUAL != layout.type) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") + + /* Get the virtual filename */ + HDassert(layout.storage.u.virt.list[index].source_file_name); + if(name && (size > 0)) + (void)HDstrncpy(name, layout.storage.u.virt.list[index].source_file_name, size); + ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[index].source_file_name); + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Pget_virtual_filename() */ + + +/*------------------------------------------------------------------------- + * Function: H5Pget_virtual_dsetname + * + * Purpose: VDSINC + * + * Return: VDSINC + * + * Programmer: Neil Fortner + * Saturday, February 14, 2015 + * + *------------------------------------------------------------------------- + */ +ssize_t +H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name/*out*/, + size_t size) +{ + H5P_genplist_t *plist; /* Property list pointer */ + H5O_layout_t layout; /* Layout information */ + ssize_t ret_value; /* Return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE4("Zs", "izxz", dcpl_id, index, name, size); + HDassert(0 && "checking code coverage...");//VDSINC + + /* Get the plist structure */ + if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + + /* Retrieve the layout property */ + if(H5P_get(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout") + if(H5D_VIRTUAL != layout.type) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") + + /* Get the virtual filename */ + HDassert(layout.storage.u.virt.list[index].source_dset_name); + if(name && (size > 0)) + (void)HDstrncpy(name, layout.storage.u.virt.list[index].source_dset_name, size); + ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[index].source_dset_name); + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Pget_virtual_dsetname() */ + + +/*------------------------------------------------------------------------- * Function: H5Pset_external * * Purpose: Adds an external file to the list of external files. PLIST_ID @@ -2419,6 +2803,10 @@ H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time) alloc_time = H5D_ALLOC_TIME_INCR; break; + case H5D_VIRTUAL: + alloc_time = H5D_ALLOC_TIME_INCR; + break; + case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index f56692c..c1c6f17 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -354,6 +354,15 @@ H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout); H5_DLL H5D_layout_t H5Pget_layout(hid_t plist_id); H5_DLL herr_t H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]); H5_DLL int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[]/*out*/); +H5_DLL herr_t H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, + const char *src_file_name, const char *src_dset_name, hid_t src_space_id); +H5_DLL herr_t H5Pget_virtual_count(hid_t dcpl_id, size_t *count/*out*/); +H5_DLL hid_t H5Pget_virtual_vspace(hid_t dcpl_id, size_t index); +H5_DLL hid_t H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index); +H5_DLL ssize_t H5Pget_virtual_filename(hid_t dcpl_id, size_t index, + char *name/*out*/, size_t size); +H5_DLL ssize_t H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, + char *name/*out*/, size_t size); H5_DLL herr_t H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size); H5_DLL int H5Pget_external_count(hid_t plist_id); diff --git a/src/H5Sall.c b/src/H5Sall.c index a9e72fb..6ac00d2 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -39,8 +39,8 @@ static herr_t H5S_all_get_seq_list(const H5S_t *space, unsigned flags, static herr_t H5S_all_release(H5S_t *space); static htri_t H5S_all_is_valid(const H5S_t *space); static hssize_t H5S_all_serial_size(const H5S_t *space); -static herr_t H5S_all_serialize(const H5S_t *space, uint8_t *buf); -static herr_t H5S_all_deserialize(H5S_t *space, const uint8_t *buf); +static herr_t H5S_all_serialize(const H5S_t *space, uint8_t **p); +static herr_t H5S_all_deserialize(H5S_t *space, const uint8_t **p); static herr_t H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_all_offset(const H5S_t *space, hsize_t *off); static htri_t H5S_all_is_contiguous(const H5S_t *space); @@ -496,9 +496,11 @@ H5S_all_serial_size (const H5S_t UNUSED *space) PURPOSE Serialize the current selection into a user-provided buffer. USAGE - herr_t H5S_all_serialize(space, buf) - H5S_t *space; IN: Dataspace pointer of selection to serialize - uint8 *buf; OUT: Buffer to put serialized selection into + herr_t H5S_all_serialize(space, p) + const H5S_t *space; IN: Dataspace with selection to serialize + uint8_t **p; OUT: Pointer to buffer to put serialized + selection. Will be advanced to end of + serialized selection. RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -534,9 +536,12 @@ H5S_all_serialize (const H5S_t *space, uint8_t **p) PURPOSE Deserialize the current selection from a user-provided buffer. USAGE - herr_t H5S_all_deserialize(space, buf) - H5S_t *space; IN/OUT: Dataspace pointer to place selection into - uint8 *buf; IN: Buffer to retrieve serialized selection from + herr_t H5S_all_deserialize(space, p) + H5S_t *space; IN/OUT: Dataspace pointer to place + selection into + uint8 **p; OUT: Pointer to buffer holding serialized + selection. Will be advanced to end of + serialized selection. RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -548,9 +553,8 @@ H5S_all_serialize (const H5S_t *space, uint8_t **p) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_all_deserialize(H5S_t **space, const uint8_t **p) +H5S_all_deserialize(H5S_t *space, const uint8_t **p) { - H5S_t *tmp_space; herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_NOAPI(FAIL) @@ -559,31 +563,11 @@ H5S_all_deserialize(H5S_t **space, const uint8_t **p) HDassert(p); HDassert(*p); - /* Allocate space if not provided */ - if(!*space) { - if(NULL == (tmp_space = H5S_create(H5S_SIMPLE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace") - } /* end if */ - else - tmp_space = *space; - - - /* Skip over the remainder of the header */ - *p += 12; - /* Change to "all" selection */ - if(H5S_select_all(tmp_space, TRUE) < 0) + if(H5S_select_all(space, TRUE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") - if(!*space) - *space = tmp_space; - done: - /* Free temporary space if not passed to caller (only happens on error) */ - if(!*space && tmp_space) - if(H5S_close(tmp_space) < 0) - HDONE_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't close dataspace") - FUNC_LEAVE_NOAPI(ret_value) } /* H5S_all_deserialize() */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 02d9359..91f31d2 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -54,8 +54,8 @@ static herr_t H5S_hyper_get_seq_list(const H5S_t *space, unsigned flags, static herr_t H5S_hyper_release(H5S_t *space); static htri_t H5S_hyper_is_valid(const H5S_t *space); static hssize_t H5S_hyper_serial_size(const H5S_t *space); -static herr_t H5S_hyper_serialize(const H5S_t *space, uint8_t *buf); -static herr_t H5S_hyper_deserialize(H5S_t *space, const uint8_t *buf); +static herr_t H5S_hyper_serialize(const H5S_t *space, uint8_t **p); +static herr_t H5S_hyper_deserialize(H5S_t *space, const uint8_t **p); static herr_t H5S_hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_hyper_offset(const H5S_t *space, hsize_t *offset); static htri_t H5S_hyper_is_contiguous(const H5S_t *space); @@ -2055,9 +2055,11 @@ done: PURPOSE Serialize the current selection into a user-provided buffer. USAGE - herr_t H5S_hyper_serialize(space, buf) - H5S_t *space; IN: Dataspace pointer of selection to serialize - uint8 *buf; OUT: Buffer to put serialized selection into + herr_t H5S_hyper_serialize(space, p) + const H5S_t *space; IN: Dataspace with selection to serialize + uint8_t **p; OUT: Pointer to buffer to put serialized + selection. Will be advanced to end of + serialized selection. RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -2096,7 +2098,7 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t **p) *p += 4; /* skip over space for length */ /* Encode number of dimensions */ - UINT32ENCODE(buf, (uint32_t)space->extent.rank); + UINT32ENCODE(*p, (uint32_t)space->extent.rank); len += 4; /* Check for a "regular" hyperslab selection */ @@ -2197,7 +2199,7 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t **p) /* Add 8 bytes times the rank for each hyperslab selected */ H5_CHECK_OVERFLOW((8 * space->extent.rank * block_count), hsize_t, size_t); - len += (size_t)(8 * space->extent.rank * block_count); + len += (uint32_t)(8 * space->extent.rank * block_count); /* Encode each hyperslab in selection */ H5S_hyper_serialize_helper(space->select.sel_info.hslab->span_lst, start, end, (hsize_t)0, p); @@ -2216,9 +2218,12 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t **p) PURPOSE Deserialize the current selection from a user-provided buffer. USAGE - herr_t H5S_hyper_deserialize(space, buf) - H5S_t *space; IN/OUT: Dataspace pointer to place selection into - uint8 *buf; IN: Buffer to retrieve serialized selection from + herr_t H5S_hyper_deserialize(space, p) + H5S_t *space; IN/OUT: Dataspace pointer to place + selection into + uint8 **p; OUT: Pointer to buffer holding serialized + selection. Will be advanced to end of + serialized selection. RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -2230,10 +2235,9 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t **p) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_hyper_deserialize (H5S_t **space, const uint8_t **p) +H5S_hyper_deserialize (H5S_t *space, const uint8_t **p) { - H5S_t *tmp_space; - uint32_t rank; /* rank of points */ + unsigned rank; /* rank of points */ size_t num_elem=0; /* number of elements in selection */ hsize_t start[H5O_LAYOUT_NDIMS]; /* hyperslab start information */ hsize_t end[H5O_LAYOUT_NDIMS]; /* hyperslab end information */ @@ -2256,26 +2260,10 @@ H5S_hyper_deserialize (H5S_t **space, const uint8_t **p) HDassert(*p); /* Deserialize slabs to select */ - *p+=12; /* Skip over remainder of selection header */ - UINT32DECODE(*p,rank); /* decode the rank of the point selection */ + /* The header and rank have already beed decoded */ + rank = space->extent.rank; /* Retrieve rank from space */ UINT32DECODE(*p,num_elem); /* decode the number of points */ - /* Allocate space if not provided */ - if(!*space) { - if(NULL == (tmp_space = H5S_create(H5S_SIMPLE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace") - - /* Set rank of dataspace */ - tmp_space->extent.rank = rank; - } /* end if */ - else { - tmp_space = *space; - - /* Verify rank of dataspace */ - if(rank!=tmp_space->extent.rank) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "rank of pointer does not match dataspace") - } /* end else */ - /* Set the count & stride for all blocks */ for(tcount=count,tstride=stride,j=0; jselect.sel_info.pnt_lst->head; while(curr!=NULL) { /* Add 4 bytes times the rank for each element selected */ - *p+=4*space->extent.rank; + len+=4*space->extent.rank; /* Encode each point */ for(u=0; uextent.rank; u++) @@ -870,9 +872,12 @@ H5S_point_serialize (const H5S_t *space, uint8_t **p) PURPOSE Deserialize the current selection from a user-provided buffer. USAGE - herr_t H5S_point_deserialize(space, buf) - H5S_t *space; IN/OUT: Dataspace pointer to place selection into - uint8 *buf; IN: Buffer to retrieve serialized selection from + herr_t H5S_point_deserialize(space, p) + H5S_t *space; IN/OUT: Dataspace pointer to place + selection into + uint8 **p; OUT: Pointer to buffer holding serialized + selection. Will be advanced to end of + serialized selection. RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -884,11 +889,10 @@ H5S_point_serialize (const H5S_t *space, uint8_t **p) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_point_deserialize (H5S_t **space, const uint8_t **p) +H5S_point_deserialize (H5S_t *space, const uint8_t **p) { - H5S_t *tmp_space; H5S_seloper_t op=H5S_SELECT_SET; /* Selection operation */ - uint32_t rank; /* Rank of points */ + unsigned rank; /* Rank of points */ size_t num_elem=0; /* Number of elements in selection */ hsize_t *coord=NULL, *tcoord; /* Pointer to array of elements */ unsigned i, j; /* local counting variables */ @@ -902,25 +906,9 @@ H5S_point_deserialize (H5S_t **space, const uint8_t **p) HDassert(*p); /* Deserialize points to select */ - *p += 12; /* Skip over remaining selection header */ - UINT32DECODE(*p, rank); /* decode the rank of the point selection */ - UINT32DECODE(*p, num_elem); /* decode the number of points */ - - /* Allocate space if not provided */ - if(!*space) { - if(NULL == (tmp_space = H5S_create(H5S_SIMPLE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace") - - /* Set rank of dataspace */ - tmp_space->extent.rank = rank; - } /* end if */ - else { - tmp_space = *space; - - /* Verify rank of dataspace */ - if(rank!=tmp_space->extent.rank) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "rank of pointer does not match dataspace") - } /* end else */ + /* The header and rank have already beed decoded */ + rank = space->extent.rank; /* Retrieve rank from space */ + UINT32DECODE(*p, num_elem); /* decode the number of points */ /* Allocate space for the coordinates */ if(NULL == (coord = (hsize_t *)H5MM_malloc(num_elem * rank * sizeof(hsize_t)))) @@ -932,18 +920,10 @@ H5S_point_deserialize (H5S_t **space, const uint8_t **p) UINT32DECODE(*p, *tcoord); /* Select points */ - if(H5S_select_elements(tmp_space, op, num_elem, (const hsize_t *)coord) < 0) + if(H5S_select_elements(space, op, num_elem, (const hsize_t *)coord) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") - if(!*space) - *space = tmp_space; - done: - /* Free temporary space if not passed to caller (only happens on error) */ - if(!*space && tmp_space) - if(H5S_close(tmp_space) < 0) - HDONE_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't close dataspace") - /* Free the coordinate array if necessary */ if(coord != NULL) H5MM_xfree(coord); diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 44cd6c3..7b7b8c6 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -206,7 +206,7 @@ H5_DLL int H5S_extent_get_dims(const H5S_extent_t *ext, hsize_t dims[], hsize_t H5_DLL htri_t H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2); /* Operations on selections */ -H5_DLL herr_t H5S_select_deserialize(H5S_t *space, const uint8_t *buf); +H5_DLL herr_t H5S_select_deserialize(H5S_t **space, const uint8_t **p); H5_DLL H5S_sel_type H5S_get_select_type(const H5S_t *space); H5_DLL herr_t H5S_select_iterate(void *buf, hid_t type_id, const H5S_t *space, H5D_operator_t op, void *operator_data); @@ -227,7 +227,7 @@ H5_DLL herr_t H5S_select_get_seq_list(const H5S_t *space, unsigned flags, H5S_sel_iter_t *iter, size_t maxseq, size_t maxbytes, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); H5_DLL hssize_t H5S_select_serial_size(const H5S_t *space); -H5_DLL herr_t H5S_select_serialize(const H5S_t *space, uint8_t *buf); +H5_DLL herr_t H5S_select_serialize(const H5S_t *space, uint8_t **p); H5_DLL htri_t H5S_select_is_contiguous(const H5S_t *space); H5_DLL htri_t H5S_select_is_single(const H5S_t *space); H5_DLL htri_t H5S_select_is_regular(const H5S_t *space); diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 7d22f08..34e9473 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -239,9 +239,11 @@ H5S_select_serial_size(const H5S_t *space) PURPOSE Serialize the selection for a dataspace into a buffer USAGE - herr_t H5S_select_serialize(space, buf) + herr_t H5S_select_serialize(space, p) const H5S_t *space; IN: Dataspace with selection to serialize - uint8_t **p; OUT: Buffer to put serialized selection + uint8_t **p; OUT: Pointer to buffer to put serialized + selection. Will be advanced to end of + serialized selection. RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -263,7 +265,7 @@ H5S_select_serialize(const H5S_t *space, uint8_t **p) FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(space); - HDassert(buf); + HDassert(p); /* Call the selection type's serialize function */ ret_value=(*space->select.type->serialize)(space,p); @@ -428,9 +430,13 @@ H5S_select_valid(const H5S_t *space) Deserialize the current selection from a user-provided buffer into a real selection in the dataspace. USAGE - herr_t H5S_select_deserialize(space, buf) - H5S_t *space; IN/OUT: Dataspace pointer to place selection into - uint8 *buf; IN: Buffer to retrieve serialized selection from + herr_t H5S_select_deserialize(space, p) + H5S_t **space; IN/OUT: Dataspace pointer to place + selection into. Will be allocated if not + provided. + uint8 **p; OUT: Pointer to buffer holding serialized + selection. Will be advanced to end of + serialized selection. RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -446,38 +452,78 @@ H5S_select_valid(const H5S_t *space) herr_t H5S_select_deserialize (H5S_t **space, const uint8_t **p) { - uint32_t sel_type; /* Pointer to the selection type */ + H5S_t *tmp_space; /* Pointer to actual dataspace to use, either + *space or a newly allocated one */ + uint32_t sel_type; /* Pointer to the selection type */ herr_t ret_value=FAIL; /* return value */ FUNC_ENTER_NOAPI(FAIL) HDassert(space); + /* Allocate space if not provided */ + if(!*space) { + if(NULL == (tmp_space = H5S_create(H5S_SIMPLE))) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace") + } /* end if */ + else + tmp_space = *space; + + /* Decode selection type */ UINT32DECODE(*p, sel_type); + + /* Skip over the remainder of the header */ + *p += 12; + + /* Decode and check or patch rank for point and hyperslab selections */ + if((sel_type == H5S_SEL_POINTS) || (sel_type == H5S_SEL_HYPERSLABS)) { + uint32_t rank; /* Rank of dataspace */ + + /* Decode the rank of the point selection */ + UINT32DECODE(*p,rank); + + if(!*space) + /* Patch the rank of the allocated dataspace */ + tmp_space->extent.rank = rank; + else + /* Verify the rank of the provided dataspace */ + if(rank != tmp_space->extent.rank) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "rank of serialized selection does not match dataspace") + } /* end if */ + + /* Make routine for selection type */ switch(sel_type) { case H5S_SEL_POINTS: /* Sequence of points selected */ - ret_value=(*H5S_sel_point->deserialize)(space,p); + ret_value = (*H5S_sel_point->deserialize)(tmp_space, p); break; case H5S_SEL_HYPERSLABS: /* Hyperslab selection defined */ - ret_value=(*H5S_sel_hyper->deserialize)(space,p); + ret_value = (*H5S_sel_hyper->deserialize)(tmp_space, p); break; case H5S_SEL_ALL: /* Entire extent selected */ - ret_value=(*H5S_sel_all->deserialize)(space,p); + ret_value = (*H5S_sel_all->deserialize)(tmp_space, p); break; case H5S_SEL_NONE: /* Nothing selected */ - ret_value=(*H5S_sel_none->deserialize)(space,p); + ret_value = (*H5S_sel_none->deserialize)(tmp_space, p); break; default: break; } - if(ret_value<0) + if(ret_value < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTLOAD, FAIL, "can't deserialize selection") + /* Return space to the caller if allocated */ + if(!*space) + *space = tmp_space; done: + /* Free temporary space if not passed to caller (only happens on error) */ + if(!*space && tmp_space) + if(H5S_close(tmp_space) < 0) + HDONE_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't close dataspace") + FUNC_LEAVE_NOAPI(ret_value) } /* H5S_select_deserialize() */ diff --git a/src/H5trace.c b/src/H5trace.c index 3a84489..08641da 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -524,6 +524,10 @@ H5_trace(const double *returning, const char *func, const char *type, ...) fprintf(out, "H5D_CHUNKED"); break; + case H5D_VIRTUAL: + fprintf(out, "H5D_VIRTUAL"); + break; + case H5D_NLAYOUTS: fprintf(out, "H5D_NLAYOUTS"); break; diff --git a/src/Makefile.in b/src/Makefile.in index 1933734..14ed2af 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -155,50 +155,51 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5Dbtree.lo H5Dchunk.lo H5Dcompact.lo H5Dcontig.lo H5Ddbg.lo \ H5Ddeprec.lo H5Defl.lo H5Dfill.lo H5Dint.lo H5Dio.lo \ H5Dlayout.lo H5Dmpio.lo H5Doh.lo H5Dscatgath.lo H5Dselect.lo \ - H5Dtest.lo H5E.lo H5Edeprec.lo H5Eint.lo H5EA.lo H5EAcache.lo \ - H5EAdbg.lo H5EAdblkpage.lo H5EAdblock.lo H5EAhdr.lo \ - H5EAiblock.lo H5EAint.lo H5EAsblock.lo H5EAstat.lo H5EAtest.lo \ - H5F.lo H5Fint.lo H5Faccum.lo H5Fcwfs.lo H5Fdbg.lo H5Fdeprec.lo \ - H5Fefc.lo H5Ffake.lo H5Fio.lo H5Fmount.lo H5Fmpi.lo \ - H5Fquery.lo H5Fsfile.lo H5Fsuper.lo H5Fsuper_cache.lo \ - H5Ftest.lo H5FA.lo H5FAcache.lo H5FAdbg.lo H5FAdblock.lo \ - H5FAdblkpage.lo H5FAhdr.lo H5FAstat.lo H5FAtest.lo H5FD.lo \ - H5FDcore.lo H5FDdirect.lo H5FDfamily.lo H5FDint.lo H5FDlog.lo \ - H5FDmpi.lo H5FDmpio.lo H5FDmulti.lo H5FDsec2.lo H5FDspace.lo \ - H5FDstdio.lo H5FL.lo H5FO.lo H5FS.lo H5FScache.lo H5FSdbg.lo \ - H5FSsection.lo H5FSstat.lo H5FStest.lo H5G.lo H5Gbtree2.lo \ - H5Gcache.lo H5Gcompact.lo H5Gdense.lo H5Gdeprec.lo H5Gent.lo \ - H5Gint.lo H5Glink.lo H5Gloc.lo H5Gname.lo H5Gnode.lo H5Gobj.lo \ - H5Goh.lo H5Groot.lo H5Gstab.lo H5Gtest.lo H5Gtraverse.lo \ - H5HF.lo H5HFbtree2.lo H5HFcache.lo H5HFdbg.lo H5HFdblock.lo \ - H5HFdtable.lo H5HFhdr.lo H5HFhuge.lo H5HFiblock.lo H5HFiter.lo \ - H5HFman.lo H5HFsection.lo H5HFspace.lo H5HFstat.lo H5HFtest.lo \ - H5HFtiny.lo H5HG.lo H5HGcache.lo H5HGdbg.lo H5HGquery.lo \ - H5HL.lo H5HLcache.lo H5HLdbg.lo H5HLint.lo H5HP.lo H5I.lo \ - H5Itest.lo H5L.lo H5Lexternal.lo H5lib_settings.lo H5MF.lo \ - H5MFaggr.lo H5MFdbg.lo H5MFsection.lo H5MM.lo H5MP.lo \ - H5MPtest.lo H5O.lo H5Oainfo.lo H5Oalloc.lo H5Oattr.lo \ - H5Oattribute.lo H5Obogus.lo H5Obtreek.lo H5Ocache.lo \ - H5Ochunk.lo H5Ocont.lo H5Ocopy.lo H5Odbg.lo H5Odrvinfo.lo \ - H5Odtype.lo H5Oefl.lo H5Ofill.lo H5Ofsinfo.lo H5Oginfo.lo \ - H5Olayout.lo H5Olinfo.lo H5Olink.lo H5Omessage.lo H5Omtime.lo \ - H5Oname.lo H5Onull.lo H5Opline.lo H5Orefcount.lo H5Osdspace.lo \ - H5Oshared.lo H5Ostab.lo H5Oshmesg.lo H5Otest.lo H5Ounknown.lo \ - H5P.lo H5Pacpl.lo H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo \ - H5Pdxpl.lo H5Pencdec.lo H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo \ - H5Pgcpl.lo H5Pint.lo H5Plapl.lo H5Plcpl.lo H5Pocpl.lo \ - H5Pocpypl.lo H5Pstrcpl.lo H5Ptest.lo H5PL.lo H5R.lo \ - H5Rdeprec.lo H5UC.lo H5RS.lo H5S.lo H5Sall.lo H5Sdbg.lo \ - H5Shyper.lo H5Smpio.lo H5Snone.lo H5Spoint.lo H5Sselect.lo \ - H5Stest.lo H5SL.lo H5SM.lo H5SMbtree2.lo H5SMcache.lo \ - H5SMmessage.lo H5SMtest.lo H5ST.lo H5T.lo H5Tarray.lo \ - H5Tbit.lo H5Tcommit.lo H5Tcompound.lo H5Tconv.lo H5Tcset.lo \ - H5Tdbg.lo H5Tdeprec.lo H5Tenum.lo H5Tfields.lo H5Tfixed.lo \ - H5Tfloat.lo H5Tinit.lo H5Tnative.lo H5Toffset.lo H5Toh.lo \ - H5Topaque.lo H5Torder.lo H5Tpad.lo H5Tprecis.lo H5Tstrpad.lo \ - H5Tvisit.lo H5Tvlen.lo H5TS.lo H5VM.lo H5WB.lo H5Z.lo \ - H5Zdeflate.lo H5Zfletcher32.lo H5Znbit.lo H5Zshuffle.lo \ - H5Zszip.lo H5Zscaleoffset.lo H5Ztrans.lo + H5Dtest.lo H5Dvirtual.lo H5E.lo H5Edeprec.lo H5Eint.lo H5EA.lo \ + H5EAcache.lo H5EAdbg.lo H5EAdblkpage.lo H5EAdblock.lo \ + H5EAhdr.lo H5EAiblock.lo H5EAint.lo H5EAsblock.lo H5EAstat.lo \ + H5EAtest.lo H5F.lo H5Fint.lo H5Faccum.lo H5Fcwfs.lo H5Fdbg.lo \ + H5Fdeprec.lo H5Fefc.lo H5Ffake.lo H5Fio.lo H5Fmount.lo \ + H5Fmpi.lo H5Fquery.lo H5Fsfile.lo H5Fsuper.lo \ + H5Fsuper_cache.lo H5Ftest.lo H5FA.lo H5FAcache.lo H5FAdbg.lo \ + H5FAdblock.lo H5FAdblkpage.lo H5FAhdr.lo H5FAstat.lo \ + H5FAtest.lo H5FD.lo H5FDcore.lo H5FDdirect.lo H5FDfamily.lo \ + H5FDint.lo H5FDlog.lo H5FDmpi.lo H5FDmpio.lo H5FDmulti.lo \ + H5FDsec2.lo H5FDspace.lo H5FDstdio.lo H5FL.lo H5FO.lo H5FS.lo \ + H5FScache.lo H5FSdbg.lo H5FSsection.lo H5FSstat.lo H5FStest.lo \ + H5G.lo H5Gbtree2.lo H5Gcache.lo H5Gcompact.lo H5Gdense.lo \ + H5Gdeprec.lo H5Gent.lo H5Gint.lo H5Glink.lo H5Gloc.lo \ + H5Gname.lo H5Gnode.lo H5Gobj.lo H5Goh.lo H5Groot.lo H5Gstab.lo \ + H5Gtest.lo H5Gtraverse.lo H5HF.lo H5HFbtree2.lo H5HFcache.lo \ + H5HFdbg.lo H5HFdblock.lo H5HFdtable.lo H5HFhdr.lo H5HFhuge.lo \ + H5HFiblock.lo H5HFiter.lo H5HFman.lo H5HFsection.lo \ + H5HFspace.lo H5HFstat.lo H5HFtest.lo H5HFtiny.lo H5HG.lo \ + H5HGcache.lo H5HGdbg.lo H5HGquery.lo H5HL.lo H5HLcache.lo \ + H5HLdbg.lo H5HLint.lo H5HP.lo H5I.lo H5Itest.lo H5L.lo \ + H5Lexternal.lo H5lib_settings.lo H5MF.lo H5MFaggr.lo \ + H5MFdbg.lo H5MFsection.lo H5MM.lo H5MP.lo H5MPtest.lo H5O.lo \ + H5Oainfo.lo H5Oalloc.lo H5Oattr.lo H5Oattribute.lo H5Obogus.lo \ + H5Obtreek.lo H5Ocache.lo H5Ochunk.lo H5Ocont.lo H5Ocopy.lo \ + H5Odbg.lo H5Odrvinfo.lo H5Odtype.lo H5Oefl.lo H5Ofill.lo \ + H5Ofsinfo.lo H5Oginfo.lo H5Olayout.lo H5Olinfo.lo H5Olink.lo \ + H5Omessage.lo H5Omtime.lo H5Oname.lo H5Onull.lo H5Opline.lo \ + H5Orefcount.lo H5Osdspace.lo H5Oshared.lo H5Ostab.lo \ + H5Oshmesg.lo H5Otest.lo H5Ounknown.lo H5P.lo H5Pacpl.lo \ + H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo H5Pdxpl.lo H5Pencdec.lo \ + H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo H5Pgcpl.lo H5Pint.lo \ + H5Plapl.lo H5Plcpl.lo H5Pocpl.lo H5Pocpypl.lo H5Pstrcpl.lo \ + H5Ptest.lo H5PL.lo H5R.lo H5Rdeprec.lo H5UC.lo H5RS.lo H5S.lo \ + H5Sall.lo H5Sdbg.lo H5Shyper.lo H5Smpio.lo H5Snone.lo \ + H5Spoint.lo H5Sselect.lo H5Stest.lo H5SL.lo H5SM.lo \ + H5SMbtree2.lo H5SMcache.lo H5SMmessage.lo H5SMtest.lo H5ST.lo \ + H5T.lo H5Tarray.lo H5Tbit.lo H5Tcommit.lo H5Tcompound.lo \ + H5Tconv.lo H5Tcset.lo H5Tdbg.lo H5Tdeprec.lo H5Tenum.lo \ + H5Tfields.lo H5Tfixed.lo H5Tfloat.lo H5Tinit.lo H5Tnative.lo \ + H5Toffset.lo H5Toh.lo H5Topaque.lo H5Torder.lo H5Tpad.lo \ + H5Tprecis.lo H5Tstrpad.lo H5Tvisit.lo H5Tvlen.lo H5TS.lo \ + H5VM.lo H5WB.lo H5Z.lo H5Zdeflate.lo H5Zfletcher32.lo \ + H5Znbit.lo H5Zshuffle.lo H5Zszip.lo H5Zscaleoffset.lo \ + H5Ztrans.lo libhdf5_la_OBJECTS = $(am_libhdf5_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -756,7 +757,7 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5D.c H5Dbtree.c H5Dchunk.c H5Dcompact.c H5Dcontig.c H5Ddbg.c \ H5Ddeprec.c H5Defl.c H5Dfill.c H5Dint.c \ H5Dio.c H5Dlayout.c \ - H5Dmpio.c H5Doh.c H5Dscatgath.c H5Dselect.c H5Dtest.c \ + H5Dmpio.c H5Doh.c H5Dscatgath.c H5Dselect.c H5Dtest.c H5Dvirtual.c \ H5E.c H5Edeprec.c H5Eint.c \ H5EA.c H5EAcache.c H5EAdbg.c H5EAdblkpage.c H5EAdblock.c H5EAhdr.c \ H5EAiblock.c H5EAint.c H5EAsblock.c H5EAstat.c H5EAtest.c \ @@ -1007,6 +1008,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dscatgath.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dselect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dtest.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dvirtual.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5E.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5EA.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5EAcache.Plo@am__quote@ diff --git a/test/Makefile.am b/test/Makefile.am index b5ebcf3..f698282 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -46,7 +46,7 @@ TEST_PROG= testhdf5 lheap ohdr stab gheap cache cache_api cache_tagging \ big mtime fillval mount flush1 flush2 app_ref enum \ set_extent ttsafe enc_dec_plist enc_dec_plist_with_endianess\ getname vfd ntypes dangle dtransform reserved cross_read \ - freespace mf farray earray btree2 fheap file_image unregister + freespace mf vds farray earray btree2 fheap file_image unregister # List programs to be built when testing here. error_test and err_compat are # built at the same time as the other tests, but executed by testerror.sh. @@ -150,7 +150,8 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse earray.h5 efc[0-5].h5 log_vfd_out.log \ new_multi_file_v16-r.h5 new_multi_file_v16-s.h5 \ split_get_file_image_test-m.h5 split_get_file_image_test-r.h5 \ - file_image_core_test.h5.copy unregister_filter_1.h5 unregister_filter_2.h5 + file_image_core_test.h5.copy unregister_filter_1.h5 unregister_filter_2.h5 \ + vds_[1-4].h5 # Sources for testhdf5 executable testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \ diff --git a/test/Makefile.in b/test/Makefile.in index 2a43aaf..3e4fd38 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -193,9 +193,9 @@ am__EXEEXT_1 = testhdf5$(EXEEXT) lheap$(EXEEXT) ohdr$(EXEEXT) \ enc_dec_plist_with_endianess$(EXEEXT) getname$(EXEEXT) \ vfd$(EXEEXT) ntypes$(EXEEXT) dangle$(EXEEXT) \ dtransform$(EXEEXT) reserved$(EXEEXT) cross_read$(EXEEXT) \ - freespace$(EXEEXT) mf$(EXEEXT) farray$(EXEEXT) earray$(EXEEXT) \ - btree2$(EXEEXT) fheap$(EXEEXT) file_image$(EXEEXT) \ - unregister$(EXEEXT) + freespace$(EXEEXT) mf$(EXEEXT) vds$(EXEEXT) farray$(EXEEXT) \ + earray$(EXEEXT) btree2$(EXEEXT) fheap$(EXEEXT) \ + file_image$(EXEEXT) unregister$(EXEEXT) @HAVE_SHARED_CONDITIONAL_TRUE@am__EXEEXT_2 = plugin$(EXEEXT) am__EXEEXT_3 = gen_bad_ohdr$(EXEEXT) gen_bogus$(EXEEXT) \ gen_cross$(EXEEXT) gen_deflate$(EXEEXT) gen_filters$(EXEEXT) \ @@ -518,6 +518,10 @@ unregister_SOURCES = unregister.c unregister_OBJECTS = unregister.$(OBJEXT) unregister_LDADD = $(LDADD) unregister_DEPENDENCIES = libh5test.la $(LIBHDF5) +vds_SOURCES = vds.c +vds_OBJECTS = vds.$(OBJEXT) +vds_LDADD = $(LDADD) +vds_DEPENDENCIES = libh5test.la $(LIBHDF5) vfd_SOURCES = vfd.c vfd_OBJECTS = vfd.$(OBJEXT) vfd_LDADD = $(LDADD) @@ -573,7 +577,7 @@ SOURCES = $(libdynlib1_la_SOURCES) $(libdynlib2_la_SOURCES) \ mount.c mtime.c ntypes.c objcopy.c ohdr.c plugin.c pool.c \ reserved.c set_extent.c space_overflow.c stab.c \ tcheck_version.c $(testhdf5_SOURCES) testmeta.c \ - $(ttsafe_SOURCES) unlink.c unregister.c vfd.c + $(ttsafe_SOURCES) unlink.c unregister.c vds.c vfd.c DIST_SOURCES = $(am__libdynlib1_la_SOURCES_DIST) \ $(am__libdynlib2_la_SOURCES_DIST) \ $(am__libdynlib3_la_SOURCES_DIST) $(libh5test_la_SOURCES) \ @@ -592,7 +596,7 @@ DIST_SOURCES = $(am__libdynlib1_la_SOURCES_DIST) \ mount.c mtime.c ntypes.c objcopy.c ohdr.c plugin.c pool.c \ reserved.c set_extent.c space_overflow.c stab.c \ tcheck_version.c $(testhdf5_SOURCES) testmeta.c \ - $(ttsafe_SOURCES) unlink.c unregister.c vfd.c + $(ttsafe_SOURCES) unlink.c unregister.c vds.c vfd.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -1101,7 +1105,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog accum.h5 cmpd_dset.h5 \ earray.h5 efc[0-5].h5 log_vfd_out.log new_multi_file_v16-r.h5 \ new_multi_file_v16-s.h5 split_get_file_image_test-m.h5 \ split_get_file_image_test-r.h5 file_image_core_test.h5.copy \ - unregister_filter_1.h5 unregister_filter_2.h5 + unregister_filter_1.h5 unregister_filter_2.h5 vds_[1-4].h5 # Test script for error_test and err_compat TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh \ @@ -1123,7 +1127,7 @@ TEST_PROG = testhdf5 lheap ohdr stab gheap cache cache_api cache_tagging \ big mtime fillval mount flush1 flush2 app_ref enum \ set_extent ttsafe enc_dec_plist enc_dec_plist_with_endianess\ getname vfd ntypes dangle dtransform reserved cross_read \ - freespace mf farray earray btree2 fheap file_image unregister + freespace mf vds farray earray btree2 fheap file_image unregister # These programs generate test files for the tests. They don't need to be @@ -1609,6 +1613,10 @@ unregister$(EXEEXT): $(unregister_OBJECTS) $(unregister_DEPENDENCIES) $(EXTRA_un @rm -f unregister$(EXEEXT) $(AM_V_CCLD)$(LINK) $(unregister_OBJECTS) $(unregister_LDADD) $(LIBS) +vds$(EXEEXT): $(vds_OBJECTS) $(vds_DEPENDENCIES) $(EXTRA_vds_DEPENDENCIES) + @rm -f vds$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vds_OBJECTS) $(vds_LDADD) $(LIBS) + vfd$(EXEEXT): $(vfd_OBJECTS) $(vfd_DEPENDENCIES) $(EXTRA_vfd_DEPENDENCIES) @rm -f vfd$(EXEEXT) $(AM_V_CCLD)$(LINK) $(vfd_OBJECTS) $(vfd_LDADD) $(LIBS) @@ -1728,6 +1736,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvltypes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unregister.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vds.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfd.Po@am__quote@ .c.o: @@ -2254,6 +2263,13 @@ mf.log: mf$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +vds.log: vds$(EXEEXT) + @p='vds$(EXEEXT)'; \ + b='vds'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) farray.log: farray$(EXEEXT) @p='farray$(EXEEXT)'; \ b='farray'; \ diff --git a/test/vds.c b/test/vds.c new file mode 100644 index 0000000..0e4997e --- /dev/null +++ b/test/vds.c @@ -0,0 +1,452 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Programmer: Neil Fortner + * Monday, February 16, 2015 + * + * Purpose: Tests datasets with virtual layout. + */ +#include "h5test.h" +#include "H5srcdir.h" + +const char *FILENAME[] = { + "vds_1", + "vds_2", + "vds_3", + "vds_4", + NULL +}; + + +/*------------------------------------------------------------------------- + * Function: test_api + * + * Purpose: Tests API functions related to virtual datasets. + * + * Return: Success: 0 + * + * Failure: number of errors + * + * Programmer: Neil Fortner + * Monday, February 16, 2015 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static int +test_api(void) +{ + hid_t dcpl = -1; /* Dataset creation property list */ + hid_t src_space[4] = {-1, -1, -1, -1}; /* Source dataspaces */ + hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */ + char *src_file[4] = {"src_file1", "src_file2.", "src_file3..", "src_file4..."}; /* Source file names (different lengths) */ + char *src_dset[4] = {"src_dset1....", "src_dset2.....", "src_dset3......", "src_dset4......."}; /* Source dataset names (different lengths) */ + hsize_t dims[2] = {10, 20}; /* Data space current size */ + hsize_t start[2]; /* Hyperslab start */ + hsize_t stride[2]; /* Hyperslab stride */ + hsize_t count[2]; /* Hyperslab count */ + hsize_t block[2]; /* Hyperslab block */ + size_t size_out; + ssize_t ssize_out; + hid_t space_out = -1; + char name_out[32]; + unsigned i; + + TESTING("virtual dataset API functions"); + + /* Create DCPL */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + TEST_ERROR + + /* + * Test 1: All - all selection + */ + /* Create source dataspace */ + if((src_space[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Create virtual dataspace */ + if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select all (should not be necessary, but just to be sure) */ + if(H5Sselect_all(src_space[0]) < 0) + TEST_ERROR + if(H5Sselect_all(vspace[0]) < 0) + TEST_ERROR + + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace[0], src_file[0], src_dset[0], src_space[0]) < 0) + TEST_ERROR + + /* Test H5Pget_virtual_count */ + if(H5Pget_virtual_count(dcpl, &size_out) < 0) + TEST_ERROR + if(size_out != 1) + TEST_ERROR + + /* Test H5Pget_virtual_vspace */ + if((space_out = H5Pget_virtual_vspace(dcpl, 0)) < 0) + TEST_ERROR + if(H5Sget_select_type(space_out) != H5S_SEL_ALL) + TEST_ERROR + if(H5Sclose(space_out) < 0) + TEST_ERROR + space_out = -1; + + /* Test H5Pget_virtual_srcspace */ + if((space_out = H5Pget_virtual_srcspace(dcpl, 0)) < 0) + TEST_ERROR + if(H5Sget_select_type(space_out) != H5S_SEL_ALL) + TEST_ERROR + if(H5Sclose(space_out) < 0) + TEST_ERROR + space_out = -1; + + /* Test H5Pget_virtual_filename */ + if((ssize_out = H5Pget_virtual_filename(dcpl, 0, NULL, 0)) < 0) + TEST_ERROR + if((size_t)ssize_out != HDstrlen(src_file[0])) + TEST_ERROR + HDassert((size_t)ssize_out < sizeof(name_out)); + if((ssize_out = H5Pget_virtual_filename(dcpl, 0, name_out, sizeof(name_out))) < 0) + TEST_ERROR + if((size_t)ssize_out != HDstrlen(src_file[0])) + TEST_ERROR + if(HDstrncmp(name_out, src_file[0], (size_t)ssize_out + 1) != 0) + TEST_ERROR + + /* Test H5Pget_virtual_dsetname */ + if((ssize_out = H5Pget_virtual_dsetname(dcpl, 0, NULL, 0)) < 0) + TEST_ERROR + if((size_t)ssize_out != HDstrlen(src_dset[0])) + TEST_ERROR + HDassert((size_t)ssize_out < sizeof(name_out)); + if((ssize_out = H5Pget_virtual_dsetname(dcpl, 0, name_out, sizeof(name_out))) < 0) + TEST_ERROR + if((size_t)ssize_out != HDstrlen(src_dset[0])) + TEST_ERROR + if(HDstrncmp(name_out, src_dset[0], (size_t)ssize_out + 1) != 0) + TEST_ERROR + + /* Close */ + if(H5Sclose(src_space[0]) < 0) + TEST_ERROR + src_space[0] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + + + /* Close */ + if(H5Pclose(dcpl) < 0) + TEST_ERROR + dcpl = -1; + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + for(i = 0; i < (sizeof(src_space) / sizeof(src_space[0])); i++) { + if(src_space[i] >= 0) + (void)H5Sclose(src_space[i]); + if(vspace[i] >= 0) + (void)H5Sclose(vspace[i]); + } /* end for */ + if(space_out >= 0) + (void)H5Sclose(space_out); + if(dcpl >= 0) + (void)H5Pclose(dcpl); + } H5E_END_TRY; + + return 1; +} /* end test_api() */ + + +/*------------------------------------------------------------------------- + * Function: main + * + * Purpose: Tests datasets with virtual layout + * + * Return: Success: exit(0) + * + * Failure: exit(1) + * + * Programmer: Neil Fortner + * Tuesday, February 17, 2015 + * + *------------------------------------------------------------------------- + */ +int +main(void) +{ + char filename[FILENAME_BUF_SIZE]; + hid_t file, grp, fapl; + int nerrors = 0; + + /* Testing setup */ + h5_reset(); + fapl = h5_fileaccess(); + + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); + + nerrors += test_api(); + + /* Verify symbol table messages are cached */ + //nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0); VDSINC + + if(nerrors) + goto error; + printf("All virtual dataset tests passed.\n"); + //h5_cleanup(FILENAME, fapl); VDSINC + + return 0; + +error: + nerrors = MAX(1, nerrors); + printf("***** %d VIRTUAL DATASET TEST%s FAILED! *****\n", + nerrors, 1 == nerrors ? "" : "S"); + return 1; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Programmer: Neil Fortner + * Monday, February 16, 2015 + * + * Purpose: Tests datasets with virtual layout. + */ +#include "h5test.h" +#include "H5srcdir.h" + +const char *FILENAME[] = { + "vds_1", + "vds_2", + "vds_3", + "vds_4", + NULL +}; + + +/*------------------------------------------------------------------------- + * Function: test_api + * + * Purpose: Tests API functions related to virtual datasets. + * + * Return: Success: 0 + * + * Failure: number of errors + * + * Programmer: Neil Fortner + * Monday, February 16, 2015 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static int +test_api(void) +{ + hid_t dcpl = -1; /* Dataset creation property list */ + hid_t src_space[4] = {-1, -1, -1, -1}; /* Source dataspaces */ + hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */ + char *src_file[4] = {"src_file1", "src_file2.", "src_file3..", "src_file4..."}; /* Source file names (different lengths) */ + char *src_dset[4] = {"src_dset1....", "src_dset2.....", "src_dset3......", "src_dset4......."}; /* Source dataset names (different lengths) */ + hsize_t dims[2] = {10, 20}; /* Data space current size */ + hsize_t start[2]; /* Hyperslab start */ + hsize_t stride[2]; /* Hyperslab stride */ + hsize_t count[2]; /* Hyperslab count */ + hsize_t block[2]; /* Hyperslab block */ + size_t size_out; + ssize_t ssize_out; + hid_t space_out = -1; + char name_out[32]; + unsigned i; + + TESTING("virtual dataset API functions"); + + /* Create DCPL */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + TEST_ERROR + + /* + * Test 1: All - all selection + */ + /* Create source dataspace */ + if((src_space[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Create virtual dataspace */ + if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select all (should not be necessary, but just to be sure) */ + if(H5Sselect_all(src_space[0]) < 0) + TEST_ERROR + if(H5Sselect_all(vspace[0]) < 0) + TEST_ERROR + + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace[0], src_file[0], src_dset[0], src_space[0]) < 0) + TEST_ERROR + + /* Test H5Pget_virtual_count */ + if(H5Pget_virtual_count(dcpl, &size_out) < 0) + TEST_ERROR + if(size_out != 1) + TEST_ERROR + + /* Test H5Pget_virtual_vspace */ + if((space_out = H5Pget_virtual_vspace(dcpl, 0)) < 0) + TEST_ERROR + if(H5Sget_select_type(space_out) != H5S_SEL_ALL) + TEST_ERROR + if(H5Sclose(space_out) < 0) + TEST_ERROR + space_out = -1; + + /* Test H5Pget_virtual_srcspace */ + if((space_out = H5Pget_virtual_srcspace(dcpl, 0)) < 0) + TEST_ERROR + if(H5Sget_select_type(space_out) != H5S_SEL_ALL) + TEST_ERROR + if(H5Sclose(space_out) < 0) + TEST_ERROR + space_out = -1; + + /* Test H5Pget_virtual_filename */ + if((ssize_out = H5Pget_virtual_filename(dcpl, 0, NULL, 0)) < 0) + TEST_ERROR + if((size_t)ssize_out != HDstrlen(src_file[0])) + TEST_ERROR + HDassert((size_t)ssize_out < sizeof(name_out)); + if((ssize_out = H5Pget_virtual_filename(dcpl, 0, name_out, sizeof(name_out))) < 0) + TEST_ERROR + if((size_t)ssize_out != HDstrlen(src_file[0])) + TEST_ERROR + if(HDstrncmp(name_out, src_file[0], (size_t)ssize_out + 1) != 0) + TEST_ERROR + + /* Test H5Pget_virtual_dsetname */ + if((ssize_out = H5Pget_virtual_dsetname(dcpl, 0, NULL, 0)) < 0) + TEST_ERROR + if((size_t)ssize_out != HDstrlen(src_dset[0])) + TEST_ERROR + HDassert((size_t)ssize_out < sizeof(name_out)); + if((ssize_out = H5Pget_virtual_dsetname(dcpl, 0, name_out, sizeof(name_out))) < 0) + TEST_ERROR + if((size_t)ssize_out != HDstrlen(src_dset[0])) + TEST_ERROR + if(HDstrncmp(name_out, src_dset[0], (size_t)ssize_out + 1) != 0) + TEST_ERROR + + /* Close */ + if(H5Sclose(src_space[0]) < 0) + TEST_ERROR + src_space[0] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + + + /* Close */ + if(H5Pclose(dcpl) < 0) + TEST_ERROR + dcpl = -1; + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + for(i = 0; i < (sizeof(src_space) / sizeof(src_space[0])); i++) { + if(src_space[i] >= 0) + (void)H5Sclose(src_space[i]); + if(vspace[i] >= 0) + (void)H5Sclose(vspace[i]); + } /* end for */ + if(space_out >= 0) + (void)H5Sclose(space_out); + if(dcpl >= 0) + (void)H5Pclose(dcpl); + } H5E_END_TRY; + + return 1; +} /* end test_api() */ + + +/*------------------------------------------------------------------------- + * Function: main + * + * Purpose: Tests datasets with virtual layout + * + * Return: Success: exit(0) + * + * Failure: exit(1) + * + * Programmer: Neil Fortner + * Tuesday, February 17, 2015 + * + *------------------------------------------------------------------------- + */ +int +main(void) +{ + char filename[FILENAME_BUF_SIZE]; + hid_t file, grp, fapl; + int nerrors = 0; + + /* Testing setup */ + h5_reset(); + fapl = h5_fileaccess(); + + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); + + nerrors += test_api(); + + /* Verify symbol table messages are cached */ + //nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0); VDSINC + + if(nerrors) + goto error; + printf("All virtual dataset tests passed.\n"); + //h5_cleanup(FILENAME, fapl); VDSINC + + return 0; + +error: + nerrors = MAX(1, nerrors); + printf("***** %d VIRTUAL DATASET TEST%s FAILED! *****\n", + nerrors, 1 == nerrors ? "" : "S"); + return 1; +} + diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c index e9fa0fa..1310fd5 100644 --- a/tools/h5stat/h5stat.c +++ b/tools/h5stat/h5stat.c @@ -1342,8 +1342,8 @@ print_dataset_info(const iter_t *iter) printf("Dataset layout information:\n"); for(u = 0; u < H5D_NLAYOUTS; u++) - printf("\tDataset layout counts[%s]: %lu\n", (u == 0 ? "COMPACT" : - (u == 1 ? "CONTIG" : "CHUNKED")), iter->dset_layouts[u]); + printf("\tDataset layout counts[%s]: %lu\n", (u == H5D_COMPACT ? "COMPACT" : + (u == H5D_CONTIGUOUS ? "CONTIG" : (u == H5D_CHUNKED ? "CHUNKED" : "VIRTUAL"))), iter->dset_layouts[u]); printf("\tNumber of external files : %lu\n", iter->nexternal); printf("Dataset filters information:\n"); diff --git a/tools/h5stat/testfiles/h5stat_dims1.ddl b/tools/h5stat/testfiles/h5stat_dims1.ddl index c285ea4..07b2900 100644 --- a/tools/h5stat/testfiles/h5stat_dims1.ddl +++ b/tools/h5stat/testfiles/h5stat_dims1.ddl @@ -31,6 +31,7 @@ Dataset layout information: Dataset layout counts[COMPACT]: 0 Dataset layout counts[CONTIG]: 23 Dataset layout counts[CHUNKED]: 0 + Dataset layout counts[VIRTUAL]: 0 Number of external files : 0 Dataset filters information: Number of datasets with: diff --git a/tools/h5stat/testfiles/h5stat_dims2.ddl b/tools/h5stat/testfiles/h5stat_dims2.ddl index 769749e..dbccd05 100644 --- a/tools/h5stat/testfiles/h5stat_dims2.ddl +++ b/tools/h5stat/testfiles/h5stat_dims2.ddl @@ -22,6 +22,7 @@ Dataset layout information: Dataset layout counts[COMPACT]: 0 Dataset layout counts[CONTIG]: 23 Dataset layout counts[CHUNKED]: 0 + Dataset layout counts[VIRTUAL]: 0 Number of external files : 0 Dataset filters information: Number of datasets with: diff --git a/tools/h5stat/testfiles/h5stat_filters-d.ddl b/tools/h5stat/testfiles/h5stat_filters-d.ddl index 2e0bd64..6e6dd61 100644 --- a/tools/h5stat/testfiles/h5stat_filters-d.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-d.ddl @@ -18,6 +18,7 @@ Dataset layout information: Dataset layout counts[COMPACT]: 1 Dataset layout counts[CONTIG]: 2 Dataset layout counts[CHUNKED]: 12 + Dataset layout counts[VIRTUAL]: 0 Number of external files : 2 Dataset filters information: Number of datasets with: diff --git a/tools/h5stat/testfiles/h5stat_filters-dT.ddl b/tools/h5stat/testfiles/h5stat_filters-dT.ddl index 9ef3e82..b14ca9f 100644 --- a/tools/h5stat/testfiles/h5stat_filters-dT.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-dT.ddl @@ -18,6 +18,7 @@ Dataset layout information: Dataset layout counts[COMPACT]: 1 Dataset layout counts[CONTIG]: 2 Dataset layout counts[CHUNKED]: 12 + Dataset layout counts[VIRTUAL]: 0 Number of external files : 2 Dataset filters information: Number of datasets with: diff --git a/tools/h5stat/testfiles/h5stat_filters.ddl b/tools/h5stat/testfiles/h5stat_filters.ddl index 24522cd..1a4fd72 100644 --- a/tools/h5stat/testfiles/h5stat_filters.ddl +++ b/tools/h5stat/testfiles/h5stat_filters.ddl @@ -56,6 +56,7 @@ Dataset layout information: Dataset layout counts[COMPACT]: 1 Dataset layout counts[CONTIG]: 2 Dataset layout counts[CHUNKED]: 12 + Dataset layout counts[VIRTUAL]: 0 Number of external files : 2 Dataset filters information: Number of datasets with: diff --git a/tools/h5stat/testfiles/h5stat_links2.ddl b/tools/h5stat/testfiles/h5stat_links2.ddl index 09bf937..4622884 100644 --- a/tools/h5stat/testfiles/h5stat_links2.ddl +++ b/tools/h5stat/testfiles/h5stat_links2.ddl @@ -64,6 +64,7 @@ Dataset layout information: Dataset layout counts[COMPACT]: 0 Dataset layout counts[CONTIG]: 23 Dataset layout counts[CHUNKED]: 0 + Dataset layout counts[VIRTUAL]: 0 Number of external files : 0 Dataset filters information: Number of datasets with: diff --git a/tools/h5stat/testfiles/h5stat_newgrat.ddl b/tools/h5stat/testfiles/h5stat_newgrat.ddl index 33d756b..e305f58 100644 --- a/tools/h5stat/testfiles/h5stat_newgrat.ddl +++ b/tools/h5stat/testfiles/h5stat_newgrat.ddl @@ -54,6 +54,7 @@ Dataset layout information: Dataset layout counts[COMPACT]: 0 Dataset layout counts[CONTIG]: 1 Dataset layout counts[CHUNKED]: 0 + Dataset layout counts[VIRTUAL]: 0 Number of external files : 0 Dataset filters information: Number of datasets with: diff --git a/tools/h5stat/testfiles/h5stat_numattrs2.ddl b/tools/h5stat/testfiles/h5stat_numattrs2.ddl index 1313aec..ccb23c1 100644 --- a/tools/h5stat/testfiles/h5stat_numattrs2.ddl +++ b/tools/h5stat/testfiles/h5stat_numattrs2.ddl @@ -65,6 +65,7 @@ Dataset layout information: Dataset layout counts[COMPACT]: 0 Dataset layout counts[CONTIG]: 23 Dataset layout counts[CHUNKED]: 0 + Dataset layout counts[VIRTUAL]: 0 Number of external files : 0 Dataset filters information: Number of datasets with: diff --git a/tools/h5stat/testfiles/h5stat_tsohm.ddl b/tools/h5stat/testfiles/h5stat_tsohm.ddl index 37de79b..4cf33fc 100644 --- a/tools/h5stat/testfiles/h5stat_tsohm.ddl +++ b/tools/h5stat/testfiles/h5stat_tsohm.ddl @@ -53,6 +53,7 @@ Dataset layout information: Dataset layout counts[COMPACT]: 0 Dataset layout counts[CONTIG]: 0 Dataset layout counts[CHUNKED]: 3 + Dataset layout counts[VIRTUAL]: 0 Number of external files : 0 Dataset filters information: Number of datasets with: -- cgit v0.12 From a5460b731d7f98296a8f76fcca293e6cc9521eb1 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 17 Feb 2015 16:12:58 -0500 Subject: [svn-r26199] INCOMPLETE, UNWORKING CODE Fix doubled vds.c --- test/vds.c | 226 ------------------------------------------------------------- 1 file changed, 226 deletions(-) diff --git a/test/vds.c b/test/vds.c index 0e4997e..2667e6a 100644 --- a/test/vds.c +++ b/test/vds.c @@ -224,229 +224,3 @@ error: return 1; } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* - * Programmer: Neil Fortner - * Monday, February 16, 2015 - * - * Purpose: Tests datasets with virtual layout. - */ -#include "h5test.h" -#include "H5srcdir.h" - -const char *FILENAME[] = { - "vds_1", - "vds_2", - "vds_3", - "vds_4", - NULL -}; - - -/*------------------------------------------------------------------------- - * Function: test_api - * - * Purpose: Tests API functions related to virtual datasets. - * - * Return: Success: 0 - * - * Failure: number of errors - * - * Programmer: Neil Fortner - * Monday, February 16, 2015 - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -static int -test_api(void) -{ - hid_t dcpl = -1; /* Dataset creation property list */ - hid_t src_space[4] = {-1, -1, -1, -1}; /* Source dataspaces */ - hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */ - char *src_file[4] = {"src_file1", "src_file2.", "src_file3..", "src_file4..."}; /* Source file names (different lengths) */ - char *src_dset[4] = {"src_dset1....", "src_dset2.....", "src_dset3......", "src_dset4......."}; /* Source dataset names (different lengths) */ - hsize_t dims[2] = {10, 20}; /* Data space current size */ - hsize_t start[2]; /* Hyperslab start */ - hsize_t stride[2]; /* Hyperslab stride */ - hsize_t count[2]; /* Hyperslab count */ - hsize_t block[2]; /* Hyperslab block */ - size_t size_out; - ssize_t ssize_out; - hid_t space_out = -1; - char name_out[32]; - unsigned i; - - TESTING("virtual dataset API functions"); - - /* Create DCPL */ - if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR - - /* - * Test 1: All - all selection - */ - /* Create source dataspace */ - if((src_space[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR - - /* Create virtual dataspace */ - if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR - - /* Select all (should not be necessary, but just to be sure) */ - if(H5Sselect_all(src_space[0]) < 0) - TEST_ERROR - if(H5Sselect_all(vspace[0]) < 0) - TEST_ERROR - - /* Add virtual layout mapping */ - if(H5Pset_virtual(dcpl, vspace[0], src_file[0], src_dset[0], src_space[0]) < 0) - TEST_ERROR - - /* Test H5Pget_virtual_count */ - if(H5Pget_virtual_count(dcpl, &size_out) < 0) - TEST_ERROR - if(size_out != 1) - TEST_ERROR - - /* Test H5Pget_virtual_vspace */ - if((space_out = H5Pget_virtual_vspace(dcpl, 0)) < 0) - TEST_ERROR - if(H5Sget_select_type(space_out) != H5S_SEL_ALL) - TEST_ERROR - if(H5Sclose(space_out) < 0) - TEST_ERROR - space_out = -1; - - /* Test H5Pget_virtual_srcspace */ - if((space_out = H5Pget_virtual_srcspace(dcpl, 0)) < 0) - TEST_ERROR - if(H5Sget_select_type(space_out) != H5S_SEL_ALL) - TEST_ERROR - if(H5Sclose(space_out) < 0) - TEST_ERROR - space_out = -1; - - /* Test H5Pget_virtual_filename */ - if((ssize_out = H5Pget_virtual_filename(dcpl, 0, NULL, 0)) < 0) - TEST_ERROR - if((size_t)ssize_out != HDstrlen(src_file[0])) - TEST_ERROR - HDassert((size_t)ssize_out < sizeof(name_out)); - if((ssize_out = H5Pget_virtual_filename(dcpl, 0, name_out, sizeof(name_out))) < 0) - TEST_ERROR - if((size_t)ssize_out != HDstrlen(src_file[0])) - TEST_ERROR - if(HDstrncmp(name_out, src_file[0], (size_t)ssize_out + 1) != 0) - TEST_ERROR - - /* Test H5Pget_virtual_dsetname */ - if((ssize_out = H5Pget_virtual_dsetname(dcpl, 0, NULL, 0)) < 0) - TEST_ERROR - if((size_t)ssize_out != HDstrlen(src_dset[0])) - TEST_ERROR - HDassert((size_t)ssize_out < sizeof(name_out)); - if((ssize_out = H5Pget_virtual_dsetname(dcpl, 0, name_out, sizeof(name_out))) < 0) - TEST_ERROR - if((size_t)ssize_out != HDstrlen(src_dset[0])) - TEST_ERROR - if(HDstrncmp(name_out, src_dset[0], (size_t)ssize_out + 1) != 0) - TEST_ERROR - - /* Close */ - if(H5Sclose(src_space[0]) < 0) - TEST_ERROR - src_space[0] = -1; - if(H5Sclose(vspace[0]) < 0) - TEST_ERROR - vspace[0] = -1; - - - /* Close */ - if(H5Pclose(dcpl) < 0) - TEST_ERROR - dcpl = -1; - - PASSED(); - return 0; - -error: - H5E_BEGIN_TRY { - for(i = 0; i < (sizeof(src_space) / sizeof(src_space[0])); i++) { - if(src_space[i] >= 0) - (void)H5Sclose(src_space[i]); - if(vspace[i] >= 0) - (void)H5Sclose(vspace[i]); - } /* end for */ - if(space_out >= 0) - (void)H5Sclose(space_out); - if(dcpl >= 0) - (void)H5Pclose(dcpl); - } H5E_END_TRY; - - return 1; -} /* end test_api() */ - - -/*------------------------------------------------------------------------- - * Function: main - * - * Purpose: Tests datasets with virtual layout - * - * Return: Success: exit(0) - * - * Failure: exit(1) - * - * Programmer: Neil Fortner - * Tuesday, February 17, 2015 - * - *------------------------------------------------------------------------- - */ -int -main(void) -{ - char filename[FILENAME_BUF_SIZE]; - hid_t file, grp, fapl; - int nerrors = 0; - - /* Testing setup */ - h5_reset(); - fapl = h5_fileaccess(); - - h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - - nerrors += test_api(); - - /* Verify symbol table messages are cached */ - //nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0); VDSINC - - if(nerrors) - goto error; - printf("All virtual dataset tests passed.\n"); - //h5_cleanup(FILENAME, fapl); VDSINC - - return 0; - -error: - nerrors = MAX(1, nerrors); - printf("***** %d VIRTUAL DATASET TEST%s FAILED! *****\n", - nerrors, 1 == nerrors ? "" : "S"); - return 1; -} - -- cgit v0.12 From 88b7d8d34cd1c645c22197d440115c05435c816a Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 20 Feb 2015 16:53:35 -0500 Subject: [svn-r26261] Commit working but incomplete prototype. Does not perform I/O. Tested: ummon --- src/H5Dint.c | 3 +- src/H5Dlayout.c | 1 - src/H5Doh.c | 11 +- src/H5Dpkg.h | 3 + src/H5Dprivate.h | 5 - src/H5Dvirtual.c | 33 +++--- src/H5HG.c | 44 ++++++++ src/H5HGprivate.h | 1 + src/H5Olayout.c | 15 +-- src/H5Pdcpl.c | 113 ++++++++----------- test/Makefile.am | 2 +- test/vds.c | 326 +++++++++++++++++++++++++++++++++++++++++++++++++----- 12 files changed, 429 insertions(+), 128 deletions(-) diff --git a/src/H5Dint.c b/src/H5Dint.c index 61a2ed7..056b07b 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1912,9 +1912,10 @@ H5D__get_offset(const H5D_t *dset) HDassert(dset); switch(dset->shared->layout.type) { + case H5D_VIRTUAL: + HDassert(0 && "checking code coverage...");//VDSINC case H5D_CHUNKED: case H5D_COMPACT: - case H5D_VIRTUAL: break; case H5D_CONTIGUOUS: diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index 0dbe4db..5929163 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -174,7 +174,6 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ break; case H5D_VIRTUAL: - HDassert((layout->storage.u.virt.list_nused > 0) && "checking code coverage...");//VDSINC ret_value += H5F_SIZEOF_ADDR(f); /* Address of global heap */ ret_value += 4; /* Global heap index */ break; diff --git a/src/H5Doh.c b/src/H5Doh.c index a688fe7..39a270f 100644 --- a/src/H5Doh.c +++ b/src/H5Doh.c @@ -399,7 +399,16 @@ H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine chunked dataset btree info") } /* end if */ else if(layout.type == H5D_VIRTUAL && H5D__virtual_is_space_alloc(&layout.storage)) { - HDassert(0 && "Not yet implemented...");//VDSINC + size_t virtual_heap_size; + /* Need to write a test for this. No assert here for now because the + * code is reached by h5_verify_cached_stabs() but it is not properly + * tested. VDSINC */ + /* Get size of global heap object for virtual dataset */ + if(H5HG_get_obj_size(f, dxpl_id, &(layout.storage.u.virt.serial_list_hobjid), &virtual_heap_size) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get global heap size for virtual dataset mapping") + + /* Return heap size */ + bh_info->heap_size = (hsize_t)virtual_heap_size; } /* end if */ /* Check for External File List message in the object header */ diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index ac6896f..847cec9 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -654,6 +654,9 @@ H5_DLL herr_t H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src H5O_copy_t *cpy_info, hid_t dxpl_id); /* Functions that operate on virtual dataset storage */ +H5_DLL herr_t H5D__virtual_copy_layout(H5O_layout_t *layout); +H5_DLL herr_t H5D__virtual_reset_layout(H5O_layout_t *layout); +H5_DLL herr_t H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage); H5_DLL herr_t H5D__virtual_copy(H5F_t *f_src, const H5O_storage_virtual_t *storage_src, H5F_t *f_dst, H5O_storage_virtual_t *storage_dst, H5T_t *dt_src, H5O_copy_t *cpy_info, diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index 11c9fac..b2d88ee 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -177,11 +177,6 @@ H5_DLL herr_t H5D_vlen_reclaim(hid_t type_id, H5S_t *space, hid_t plist_id, /* Functions that operate on chunked storage */ H5_DLL herr_t H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr); -/* Functions that operate on virtual storage */ -herr_t H5D_virtual_copy_layout(H5O_layout_t *layout); -herr_t H5D_virtual_reset_layout(H5O_layout_t *layout); -herr_t H5D_virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage); - /* Functions that operate on indexed storage */ H5_DLL herr_t H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int fwidth, unsigned ndims); diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 5e9decd..7e74af7 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -99,7 +99,7 @@ const H5D_layout_ops_t H5D_LOPS_VIRTUAL[1] = {{ /*------------------------------------------------------------------------- - * Function: H5D_virtual_copy_layout + * Function: H5D__virtual_copy_layout * * Purpose: Deep copies virtual storage layout message in memory. * This function assumes that the top-level struct has @@ -114,19 +114,18 @@ const H5D_layout_ops_t H5D_LOPS_VIRTUAL[1] = {{ *------------------------------------------------------------------------- */ herr_t -H5D_virtual_copy_layout(H5O_layout_t *layout) +H5D__virtual_copy_layout(H5O_layout_t *layout) { H5O_storage_virtual_ent_t *orig_list = NULL; size_t i; herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE HDassert(layout); HDassert(layout->type == H5D_VIRTUAL); if(layout->storage.u.virt.list_nused > 0) { - HDassert(0 && "checking code coverage...");//VDSINC HDassert(layout->storage.u.virt.list); /* Save original entry list for use as the "source" */ @@ -164,15 +163,15 @@ done: /* Release allocated resources on failure */ if((ret_value < 0) && orig_list && (orig_list != layout->storage.u.virt.list)) - if(H5D_virtual_reset_layout(layout) < 0) + if(H5D__virtual_reset_layout(layout) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset virtual layout") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D_virtual_copy_layout() */ +} /* end H5D__virtual_copy_layout() */ /*------------------------------------------------------------------------- - * Function: H5D_virtual_reset_layout + * Function: H5D__virtual_reset_layout * * Purpose: Frees internal structures in a virtual storage layout * message in memory. This function is safe to use on @@ -188,12 +187,12 @@ done: *------------------------------------------------------------------------- */ herr_t -H5D_virtual_reset_layout(H5O_layout_t *layout) +H5D__virtual_reset_layout(H5O_layout_t *layout) { size_t i; herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE HDassert(layout); HDassert(layout->type == H5D_VIRTUAL); @@ -215,15 +214,16 @@ H5D_virtual_reset_layout(H5O_layout_t *layout) } /* end for */ /* Free the list */ - layout->storage.u.virt.list = (H5O_storage_virtual_ent_t *)(layout->storage.u.virt.list); + layout->storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_xfree(layout->storage.u.virt.list); -done: + /* Note the lack of a done: label. This is because there are no HGOTO_ERROR + * calls. If one is added, a done: label must also be added */ FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D_virtual_reset_layout() */ +} /* end H5D__virtual_reset_layout() */ /*------------------------------------------------------------------------- - * Function: H5D_virtual_delete + * Function: H5D__virtual_delete * * Purpose: Delete the file space for a virtual dataset * @@ -235,7 +235,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5D_virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage) +H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage) { herr_t ret_value = SUCCEED; /* Return value */ @@ -258,7 +258,7 @@ H5D_virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D_virtual_delete */ +} /* end H5D__virtual_delete */ /*------------------------------------------------------------------------- @@ -279,7 +279,6 @@ H5D__virtual_construct(H5F_t UNUSED *f, H5D_t UNUSED *dset) FUNC_ENTER_STATIC_NOERR /* No-op for now VDSINC */ - HDassert(0 && "checking code coverage...");//VDSINC FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__virtual_construct() */ @@ -306,7 +305,6 @@ H5D__virtual_is_space_alloc(const H5O_storage_t *storage) FUNC_ENTER_PACKAGE_NOERR - HDassert(0 && "checking code coverage...");//VDSINC /* Need to decide what to do here. For now just return TRUE if the global * heap block has been allocated. VDSINC */ ret_value = storage->u.virt.serial_list_hobjid.addr != HADDR_UNDEF; @@ -408,7 +406,6 @@ H5D__virtual_flush(H5D_t UNUSED *dset, hid_t UNUSED dxpl_id) FUNC_ENTER_STATIC_NOERR /* No-op for now VDSINC */ - HDassert(0 && "checking code coverage...");//VDSINC FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__virtual_flush() */ diff --git a/src/H5HG.c b/src/H5HG.c index d55eaab..71520f1 100644 --- a/src/H5HG.c +++ b/src/H5HG.c @@ -718,6 +718,50 @@ done: /*------------------------------------------------------------------------- + * Function: H5HG_get_obj_size + * + * Purpose: Returns the size of a global heap object. + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Neil Fortner + * Thursday, February 12, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5HG_get_obj_size(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, size_t *obj_size) +{ + H5HG_heap_t *heap = NULL; /* Pointer to global heap object */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__GLOBALHEAP_TAG, FAIL) + + /* Check args */ + HDassert(f); + HDassert(hobj); + HDassert(obj_size); + + /* Load the heap */ + if(NULL == (heap = H5HG_protect(f, dxpl_id, hobj->addr, H5AC_READ))) + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap") + + HDassert(hobj->idx < heap->nused); + HDassert(heap->obj[hobj->idx].begin); + + /* Set object size */ + *obj_size = heap->obj[hobj->idx].size; + +done: + if(heap && H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, hobj->addr, heap, H5AC__NO_FLAGS_SET) < 0) + HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release object header") + + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) +} /* end H5HG_get_obj_size() */ + + +/*------------------------------------------------------------------------- * Function: H5HG_remove * * Purpose: Removes the specified object from the global heap. diff --git a/src/H5HGprivate.h b/src/H5HGprivate.h index 3765c47..ad0da76 100644 --- a/src/H5HGprivate.h +++ b/src/H5HGprivate.h @@ -60,6 +60,7 @@ H5_DLL herr_t H5HG_insert(H5F_t *f, hid_t dxpl_id, size_t size, void *obj, H5HG_t *hobj/*out*/); H5_DLL void *H5HG_read(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, void *object, size_t *buf_size/*out*/); H5_DLL int H5HG_link(H5F_t *f, hid_t dxpl_id, const H5HG_t *hobj, int adjust); +H5_DLL herr_t H5HG_get_obj_size(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, size_t *obj_size); H5_DLL herr_t H5HG_remove(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj); /* Support routines */ diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 0e43824..9d4fff7 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -317,6 +317,9 @@ H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "incorrect heap block size") } /* end if */ + /* Set the layout operations */ + mesg->ops = H5D_LOPS_VIRTUAL; + break; case H5D_LAYOUT_ERROR: @@ -333,7 +336,7 @@ done: if(ret_value == NULL) if(mesg) { if(mesg->type == H5D_VIRTUAL) - if(H5D_virtual_reset_layout(mesg) < 0) + if(H5D__virtual_reset_layout(mesg) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, NULL, "unable to reset virtual layout") mesg = H5FL_FREE(H5O_layout_t, mesg); } /* end if */ @@ -596,11 +599,9 @@ H5O_layout_copy(const void *_mesg, void *_dest) H5D_chunk_idx_reset(&dest->storage.u.chunk, FALSE); /* Deep copy the entry list for virtual datasets */ - if(mesg->type == H5D_VIRTUAL) { - HDassert((mesg->storage.u.virt.list_nused > 0) && "checking code coverage...");//VDSINC - if(H5D_virtual_copy_layout(dest) < 0) + if(mesg->type == H5D_VIRTUAL) + if(H5D__virtual_copy_layout(dest) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy virtual layout") - } //VDSINC /* Set return value */ ret_value = dest; @@ -677,7 +678,7 @@ H5O_layout_reset(void *_mesg) mesg->storage.u.compact.buf = H5MM_xfree(mesg->storage.u.compact.buf); else if(H5D_VIRTUAL == mesg->type) /* Free the virtual entry list */ - if(H5D_virtual_reset_layout(mesg) < 0) + if(H5D__virtual_reset_layout(mesg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to reset virtual layout") /* Reset the message */ @@ -768,7 +769,7 @@ H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg) case H5D_VIRTUAL: /* Virtual dataset */ HDassert(0 && "checking code coverage...");//VDSINC /* Free the file space virtual dataset */ - if(H5D_virtual_delete(f, dxpl_id, &mesg->storage) < 0) + if(H5D__virtual_delete(f, dxpl_id, &mesg->storage) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data") break; diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 6abe17d..ebd1e0a 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -85,7 +85,6 @@ #define H5D_CRT_LAYOUT_ENC H5P__dcrt_layout_enc #define H5D_CRT_LAYOUT_DEC H5P__dcrt_layout_dec #define H5D_CRT_LAYOUT_DEL H5P__dcrt_layout_del -#define H5D_CRT_LAYOUT_COPY H5P__dcrt_layout_copy #define H5D_CRT_LAYOUT_CMP H5P__dcrt_layout_cmp #define H5D_CRT_LAYOUT_CLOSE H5P__dcrt_layout_close /* Definitions for fill value. size=0 means fill value will be 0 as @@ -137,7 +136,6 @@ static herr_t H5P__dcrt_close(hid_t dxpl_id, void *close_data); static herr_t H5P__dcrt_layout_enc(const void *value, void **pp, size_t *size); static herr_t H5P__dcrt_layout_dec(const void **pp, void *value); static herr_t H5P__dcrt_layout_del(hid_t prop_id, const char *name, size_t size, void *value); -static herr_t H5P__dcrt_layout_copy(const char *name, size_t size, void *value); static int H5P__dcrt_layout_cmp(const void *value1, const void *value2, size_t size); static herr_t H5P__dcrt_layout_close(const char *name, size_t size, void *value); static herr_t H5P__fill_value_enc(const void *value, void **pp, size_t *size); @@ -226,7 +224,7 @@ H5P__dcrt_reg_prop(H5P_genclass_t *pclass) /* Register the storage layout property */ if(H5P_register_real(pclass, H5D_CRT_LAYOUT_NAME, H5D_CRT_LAYOUT_SIZE, &H5D_def_layout_g, NULL, NULL, NULL, H5D_CRT_LAYOUT_ENC, H5D_CRT_LAYOUT_DEC, - H5D_CRT_LAYOUT_DEL, H5D_CRT_LAYOUT_COPY, H5D_CRT_LAYOUT_CMP, H5D_CRT_LAYOUT_CLOSE) < 0) + H5D_CRT_LAYOUT_DEL, NULL, H5D_CRT_LAYOUT_CMP, H5D_CRT_LAYOUT_CLOSE) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") /* Register the fill value property */ @@ -330,6 +328,7 @@ H5P__dcrt_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data) case H5D_VIRTUAL: dst_layout.storage.u.virt.serial_list_hobjid.addr = HADDR_UNDEF; dst_layout.storage.u.virt.serial_list_hobjid.idx = 0; + break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: @@ -585,58 +584,23 @@ done: static herr_t H5P__dcrt_layout_del(hid_t UNUSED prop_id, const char UNUSED *name, size_t UNUSED size, void *value) { - H5O_layout_t *layout = (H5O_layout_t *)value; /* Create local aliases for values */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC /* Sanity check */ - HDassert(layout); + HDassert(value); - /* Reset the old layout befopre overwriting it if necessary */ - if(layout->type == H5D_VIRTUAL) - if(H5D_virtual_reset_layout(layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "unable to reset virtual layout") + /* Reset the old layout */ + if(((H5O_layout_t *)value)->type == H5D_VIRTUAL) /* Temp hack until proper fix is in trunk */ + if(H5O_msg_reset(H5O_LAYOUT_ID, value) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't release layout message") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dcrt_layout_del() */ -/*-------------------------------------------------------------------------- - * Function: H5P__dcrt_layout_copy - * - * Purpose: Copy the layout property - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Neil Fortner - * Monday, Feb 9, 2015 - * - *-------------------------------------------------------------------------- - */ -static herr_t -H5P__dcrt_layout_copy(const char UNUSED *name, size_t UNUSED size, void *value) -{ - H5O_layout_t *layout = (H5O_layout_t *)value; /* Create local aliases for values */ - herr_t ret_value = SUCCEED; - - FUNC_ENTER_STATIC - - HDassert(layout); - - layout = (H5O_layout_t *)value; - - if(layout->type == H5D_VIRTUAL) - if(H5D_virtual_copy_layout(layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual layout") - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5P__dcrt_layout_copy() */ - - /*------------------------------------------------------------------------- * Function: H5P__dcrt_layout_cmp * @@ -728,18 +692,17 @@ done: static herr_t H5P__dcrt_layout_close(const char UNUSED *name, size_t UNUSED size, void *value) { - H5O_layout_t *layout = (H5O_layout_t *)value; /* Create local aliases for values */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC /* Sanity check */ - HDassert(layout); + HDassert(value); - /* Reset the old layout befopre overwriting it if necessary */ - if(layout->type == H5D_VIRTUAL) - if(H5D_virtual_reset_layout(layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "unable to reset virtual layout") + /* Reset the old layout */ + if(((H5O_layout_t *)value)->type == H5D_VIRTUAL) /* Temp hack until proper fix is in trunk */ + if(H5O_msg_reset(H5O_LAYOUT_ID, value) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't release layout message") done: FUNC_LEAVE_NOAPI(ret_value) @@ -1291,12 +1254,9 @@ H5P__set_layout(H5P_genplist_t *plist, const H5O_layout_t *layout) if(H5P_get(plist, H5D_CRT_LAYOUT_NAME, &old_layout) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get layout") - /* Reset the old layout before overwriting it if necessary */ - if(old_layout.type == H5D_VIRTUAL) { - HDassert((layout->storage.u.virt.list_nused > 0) && "checking code coverage...");//VDSINC - if(H5D_virtual_reset_layout(&old_layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "unable to reset virtual layout") - } //VDSINC + /* Reset the old layout before overwriting it */ + if(H5O_msg_reset(H5O_LAYOUT_ID, &old_layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't release layout message") /* Set layout value */ if(H5P_set(plist, H5D_CRT_LAYOUT_NAME, layout) < 0) @@ -1684,6 +1644,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, /* Allocate initial entry list */ if(NULL == (layout.storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_calloc(H5D_VIRTUAL_DEF_LIST_SIZE * sizeof(H5O_storage_virtual_ent_t)))) HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't allocate virtual dataset mapping list") + layout.storage.u.virt.list_nalloc = H5D_VIRTUAL_DEF_LIST_SIZE; } /* end if */ else if(layout.storage.u.virt.list_nused == layout.storage.u.virt.list_nalloc) { @@ -1708,10 +1669,17 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, layout.storage.u.virt.list_nused++; adding_entry = FALSE; - /* Set chunk information in property list if we are adding a new layout */ - if(new_layout) + /* Set chunk information in property list. If we are adding a new layout, + * use H5P__set_layout so other fields are initialized properly. If we are + * extending the layout, just use H5P_set directly so we don't mess with + * anything else. */ + if(new_layout) { if(H5P__set_layout(plist, &layout) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout") + } /* end if */ + else + if(H5P_set(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout") done: if(adding_entry) { @@ -1752,7 +1720,6 @@ H5Pget_virtual_count(hid_t dcpl_id, size_t *count/*out*/) FUNC_ENTER_API(FAIL) H5TRACE2("e", "ix", dcpl_id, count); - HDassert(0 && "checking code coverage...");//VDSINC if(count) { /* Get the plist structure */ @@ -1791,12 +1758,11 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t index) { H5P_genplist_t *plist; /* Property list pointer */ H5O_layout_t layout; /* Layout information */ - H5S_t *space; /* Dataspace pointer */ + H5S_t *space = NULL; /* Dataspace pointer */ hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("i", "iz", dcpl_id, index); - HDassert(0 && "checking code coverage...");//VDSINC /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) @@ -1809,8 +1775,9 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t index) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") /* Get the virtual space */ - if(index >= layout.storage.u.virt.list_nalloc) + if(index >= layout.storage.u.virt.list_nused) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") + HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].virtual_select, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") @@ -1819,6 +1786,11 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t index) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register data space") done: + /* Free space on failure */ + if((ret_value < 0) && space) + if(H5S_close(space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") + FUNC_LEAVE_API(ret_value) } /* end H5Pget_virtual_vspace() */ @@ -1840,12 +1812,11 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index) { H5P_genplist_t *plist; /* Property list pointer */ H5O_layout_t layout; /* Layout information */ - H5S_t *space; /* Dataspace pointer */ + H5S_t *space = NULL; /* Dataspace pointer */ hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("i", "iz", dcpl_id, index); - HDassert(0 && "checking code coverage...");//VDSINC /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) @@ -1858,8 +1829,9 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") /* Get the virtual space */ - if(index >= layout.storage.u.virt.list_nalloc) + if(index >= layout.storage.u.virt.list_nused) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") + HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].source_select, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection") @@ -1868,6 +1840,11 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register data space") done: + /* Free space on failure */ + if((ret_value < 0) && space) + if(H5S_close(space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") + FUNC_LEAVE_API(ret_value) } /* end H5Pget_virtual_srcspace() */ @@ -1894,7 +1871,6 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name/*out*/, FUNC_ENTER_API(FAIL) H5TRACE4("Zs", "izxz", dcpl_id, index, name, size); - HDassert(0 && "checking code coverage...");//VDSINC /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) @@ -1907,6 +1883,9 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name/*out*/, HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") /* Get the virtual filename */ + if(index >= layout.storage.u.virt.list_nused) + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") + HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); HDassert(layout.storage.u.virt.list[index].source_file_name); if(name && (size > 0)) (void)HDstrncpy(name, layout.storage.u.virt.list[index].source_file_name, size); @@ -1939,7 +1918,6 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name/*out*/, FUNC_ENTER_API(FAIL) H5TRACE4("Zs", "izxz", dcpl_id, index, name, size); - HDassert(0 && "checking code coverage...");//VDSINC /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) @@ -1952,6 +1930,9 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name/*out*/, HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") /* Get the virtual filename */ + if(index >= layout.storage.u.virt.list_nused) + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") + HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); HDassert(layout.storage.u.virt.list[index].source_dset_name); if(name && (size > 0)) (void)HDstrncpy(name, layout.storage.u.virt.list[index].source_dset_name, size); diff --git a/test/Makefile.am b/test/Makefile.am index f698282..1546288 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -151,7 +151,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse new_multi_file_v16-r.h5 new_multi_file_v16-s.h5 \ split_get_file_image_test-m.h5 split_get_file_image_test-r.h5 \ file_image_core_test.h5.copy unregister_filter_1.h5 unregister_filter_2.h5 \ - vds_[1-4].h5 + vds_1.h5 # Sources for testhdf5 executable testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \ diff --git a/test/vds.c b/test/vds.c index 2667e6a..a37f2b0 100644 --- a/test/vds.c +++ b/test/vds.c @@ -21,15 +21,26 @@ */ #include "h5test.h" #include "H5srcdir.h" +#include "H5Dprivate.h" /* For H5D_VIRTUAL_DEF_LIST_SIZE */ + +typedef enum { + TEST_API_BASIC, + TEST_API_COPY_PLIST, + TEST_API_CREATE_DSET, + TEST_API_REOPEN_DSET, + TEST_API_REOPEN_FILE, + TEST_API_NTESTS +} test_api_config_t; const char *FILENAME[] = { "vds_1", - "vds_2", - "vds_3", - "vds_4", NULL }; +#define LIST_DOUBLE_SIZE (H5D_VIRTUAL_DEF_LIST_SIZE + 1) + +#define FILENAME_BUF_SIZE 1024 + /*------------------------------------------------------------------------- * Function: test_api @@ -47,14 +58,102 @@ const char *FILENAME[] = { * *------------------------------------------------------------------------- */ +/* Helper function to get DCPL for examination depending on config */ static int -test_api(void) +test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, + hid_t *ex_dcpl, hid_t vspace, char *filename) { + hid_t file = -1; /* File */ + hid_t dset = -1; /* Virtual dataset */ + + HDassert((config >= TEST_API_BASIC) && (config < TEST_API_NTESTS)); + HDassert(fapl >= 0); + HDassert(dcpl >= 0); + HDassert(ex_dcpl); + HDassert(*ex_dcpl < 0); + HDassert(vspace >= 0); + HDassert(filename); + + /* Take different action depending on test configuration */ + if(config >= TEST_API_CREATE_DSET) { + /* Create file and dataset */ + if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + if((dset = H5Dcreate2(file, "vdset", H5T_NATIVE_INT, vspace, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Reopen dataset if requested */ + if(config >= TEST_API_REOPEN_DSET) { + /* Close dataset */ + if(H5Dclose(dset) < 0) + TEST_ERROR + dset = -1; + + /* Reopen file if requested */ + if(config == TEST_API_REOPEN_FILE) { + if(H5Fclose(file) < 0) + TEST_ERROR + file = -1; + if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Open dataset */ + if((dset = H5Dopen2(file, "vdset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get DCPL from dataset */ + if((*ex_dcpl = H5Dget_create_plist(dset)) < 0) + TEST_ERROR + + /* Close dataset and file */ + if(H5Dclose(dset) < 0) + TEST_ERROR + dset = -1; + if(H5Fclose(file) < 0) + TEST_ERROR + file = -1; + } /* end if */ + else if(config == TEST_API_COPY_PLIST) { + /* Copy property list */ + if((*ex_dcpl = H5Pcopy(dcpl)) < 0) + TEST_ERROR + } /* end if */ + else { + /* Simply copy the id to ex_dcpl and increment the ref count so ex_dcpl + * can be closed */ + if(H5Iinc_ref(dcpl) < 0) + TEST_ERROR + *ex_dcpl = dcpl; + } /* end else */ + + return 0; + +error: + H5E_BEGIN_TRY { + if(file >= 0) + (void)H5Fclose(file); + if(dset >= 0) + (void)H5Dclose(dset); + } H5E_END_TRY; + + return -1; +} /* end test_api_get_ex_dcpl() */ + +/* Main test function */ +static int +test_api(test_api_config_t config, hid_t fapl) +{ + char filename[FILENAME_BUF_SIZE]; hid_t dcpl = -1; /* Dataset creation property list */ - hid_t src_space[4] = {-1, -1, -1, -1}; /* Source dataspaces */ + hid_t ex_dcpl = -1; /* Temporary dcpl for examination */ + hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */ hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */ - char *src_file[4] = {"src_file1", "src_file2.", "src_file3..", "src_file4..."}; /* Source file names (different lengths) */ - char *src_dset[4] = {"src_dset1....", "src_dset2.....", "src_dset3......", "src_dset4......."}; /* Source dataset names (different lengths) */ + const char *src_file[4] = {"src_file1", "src_file2.", "src_file3..", "src_file4..."}; /* Source file names (different lengths) */ + const char *src_dset[4] = {"src_dset1....", "src_dset2.....", "src_dset3......", "src_dset4......."}; /* Source dataset names (different lengths) */ + char tmp_filename[32]; + char tmp_dsetname[32]; hsize_t dims[2] = {10, 20}; /* Data space current size */ hsize_t start[2]; /* Hyperslab start */ hsize_t stride[2]; /* Hyperslab stride */ @@ -64,9 +163,31 @@ test_api(void) ssize_t ssize_out; hid_t space_out = -1; char name_out[32]; + hsize_t blocklist[4]; unsigned i; - TESTING("virtual dataset API functions"); + switch(config) { + case TEST_API_BASIC: + TESTING("virtual dataset API functions") + break; + case TEST_API_COPY_PLIST: + TESTING("virtual dataset API functions with copied plists") + break; + case TEST_API_CREATE_DSET: + TESTING("virtual dataset create") + break; + case TEST_API_REOPEN_DSET: + TESTING("virtual dataset create with reopened dataset") + break; + case TEST_API_REOPEN_FILE: + TESTING("virtual dataset create with reopened file") + break; + case TEST_API_NTESTS: + default: + TEST_ERROR + } /* end switch */ + + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); /* Create DCPL */ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) @@ -76,7 +197,7 @@ test_api(void) * Test 1: All - all selection */ /* Create source dataspace */ - if((src_space[0] = H5Screate_simple(2, dims, NULL)) < 0) + if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR /* Create virtual dataspace */ @@ -84,23 +205,35 @@ test_api(void) TEST_ERROR /* Select all (should not be necessary, but just to be sure) */ - if(H5Sselect_all(src_space[0]) < 0) + if(H5Sselect_all(srcspace[0]) < 0) TEST_ERROR if(H5Sselect_all(vspace[0]) < 0) TEST_ERROR /* Add virtual layout mapping */ - if(H5Pset_virtual(dcpl, vspace[0], src_file[0], src_dset[0], src_space[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[0], src_file[0], src_dset[0], srcspace[0]) < 0) + TEST_ERROR + + /* Get examination DCPL */ + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) TEST_ERROR + /* Close dataspaces */ + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + /* Test H5Pget_virtual_count */ - if(H5Pget_virtual_count(dcpl, &size_out) < 0) + if(H5Pget_virtual_count(ex_dcpl, &size_out) < 0) TEST_ERROR if(size_out != 1) TEST_ERROR /* Test H5Pget_virtual_vspace */ - if((space_out = H5Pget_virtual_vspace(dcpl, 0)) < 0) + if((space_out = H5Pget_virtual_vspace(ex_dcpl, 0)) < 0) TEST_ERROR if(H5Sget_select_type(space_out) != H5S_SEL_ALL) TEST_ERROR @@ -109,7 +242,7 @@ test_api(void) space_out = -1; /* Test H5Pget_virtual_srcspace */ - if((space_out = H5Pget_virtual_srcspace(dcpl, 0)) < 0) + if((space_out = H5Pget_virtual_srcspace(ex_dcpl, 0)) < 0) TEST_ERROR if(H5Sget_select_type(space_out) != H5S_SEL_ALL) TEST_ERROR @@ -118,12 +251,12 @@ test_api(void) space_out = -1; /* Test H5Pget_virtual_filename */ - if((ssize_out = H5Pget_virtual_filename(dcpl, 0, NULL, 0)) < 0) + if((ssize_out = H5Pget_virtual_filename(ex_dcpl, 0, NULL, 0)) < 0) TEST_ERROR if((size_t)ssize_out != HDstrlen(src_file[0])) TEST_ERROR HDassert((size_t)ssize_out < sizeof(name_out)); - if((ssize_out = H5Pget_virtual_filename(dcpl, 0, name_out, sizeof(name_out))) < 0) + if((ssize_out = H5Pget_virtual_filename(ex_dcpl, 0, name_out, sizeof(name_out))) < 0) TEST_ERROR if((size_t)ssize_out != HDstrlen(src_file[0])) TEST_ERROR @@ -131,12 +264,12 @@ test_api(void) TEST_ERROR /* Test H5Pget_virtual_dsetname */ - if((ssize_out = H5Pget_virtual_dsetname(dcpl, 0, NULL, 0)) < 0) + if((ssize_out = H5Pget_virtual_dsetname(ex_dcpl, 0, NULL, 0)) < 0) TEST_ERROR if((size_t)ssize_out != HDstrlen(src_dset[0])) TEST_ERROR HDassert((size_t)ssize_out < sizeof(name_out)); - if((ssize_out = H5Pget_virtual_dsetname(dcpl, 0, name_out, sizeof(name_out))) < 0) + if((ssize_out = H5Pget_virtual_dsetname(ex_dcpl, 0, name_out, sizeof(name_out))) < 0) TEST_ERROR if((size_t)ssize_out != HDstrlen(src_dset[0])) TEST_ERROR @@ -144,13 +277,146 @@ test_api(void) TEST_ERROR /* Close */ - if(H5Sclose(src_space[0]) < 0) + if(H5Pclose(ex_dcpl) < 0) + TEST_ERROR + ex_dcpl = -1; + + + /* + * Test X: Enough Selections to trigger doubling of mapping list + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create source dataspace */ + dims[0] = 1; + if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select all in source space (should not be necessary, but just to be sure) */ + if(H5Sselect_all(srcspace[0]) < 0) TEST_ERROR - src_space[0] = -1; + + /* Create virtual dataspace */ + dims[0] = LIST_DOUBLE_SIZE; + if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Init hyperslab values */ + start[0] = 0; + start[1] = 0; + count[0] = 1; + count[1] = 1; + block[0] = 1; + block[1] = 20; + + /* Build virtual layout */ + for(i = 0; i < LIST_DOUBLE_SIZE; i++) { + /* Select row in virual dataspace */ + start[0] = (hsize_t)i; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, block) < 0) + TEST_ERROR + + /* Create file and dataset names */ + (void)HDsnprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i); + tmp_filename[sizeof(tmp_filename) - 1] = '\0'; + (void)HDsnprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i); + tmp_dsetname[sizeof(tmp_dsetname) - 1] = '\0'; + + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace[0], tmp_filename, tmp_dsetname, srcspace[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Get examination DCPL */ + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + TEST_ERROR + + /* Close dataspaces */ + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; if(H5Sclose(vspace[0]) < 0) TEST_ERROR vspace[0] = -1; + /* Test H5Pget_virtual_count */ + if(H5Pget_virtual_count(ex_dcpl, &size_out) < 0) + TEST_ERROR + if(size_out != LIST_DOUBLE_SIZE) + TEST_ERROR + + /* Verify virtual layout */ + for(i = 0; i < LIST_DOUBLE_SIZE; i++) { + /* Test H5Pget_virtual_vspace */ + if((space_out = H5Pget_virtual_vspace(ex_dcpl, i)) < 0) + TEST_ERROR + if(H5Sget_select_type(space_out) != H5S_SEL_HYPERSLABS) + TEST_ERROR + if((ssize_out = H5Sget_select_hyper_nblocks(space_out)) < 0) + TEST_ERROR + if(ssize_out != 1) + TEST_ERROR + if(H5Sget_select_hyper_blocklist(space_out, 0, 1, blocklist) < 0) + TEST_ERROR + if(blocklist[0] != (hsize_t)i) + TEST_ERROR + if(blocklist[1] != 0) + TEST_ERROR + if(blocklist[2] != (hsize_t)i) + TEST_ERROR + if(blocklist[3] != 19) + TEST_ERROR + if(H5Sclose(space_out) < 0) + TEST_ERROR + space_out = -1; + + /* Test H5Pget_virtual_srcspace */ + if((space_out = H5Pget_virtual_srcspace(ex_dcpl, i)) < 0) + TEST_ERROR + if(H5Sget_select_type(space_out) != H5S_SEL_ALL) + TEST_ERROR + if(H5Sclose(space_out) < 0) + TEST_ERROR + space_out = -1; + + /* Test H5Pget_virtual_filename */ + (void)HDsnprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i); + tmp_filename[sizeof(tmp_filename) - 1] = '\0'; + if((ssize_out = H5Pget_virtual_filename(ex_dcpl, i, NULL, 0)) < 0) + TEST_ERROR + if((size_t)ssize_out != HDstrlen(tmp_filename)) + TEST_ERROR + HDassert((size_t)ssize_out < sizeof(name_out)); + if((ssize_out = H5Pget_virtual_filename(ex_dcpl, i, name_out, sizeof(name_out))) < 0) + TEST_ERROR + if((size_t)ssize_out != HDstrlen(tmp_filename)) + TEST_ERROR + if(HDstrncmp(name_out, tmp_filename, (size_t)ssize_out + 1) != 0) + TEST_ERROR + + /* Test H5Pget_virtual_dsetname */ + (void)HDsnprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i); + tmp_dsetname[sizeof(tmp_dsetname) - 1] = '\0'; + if((ssize_out = H5Pget_virtual_dsetname(ex_dcpl, i, NULL, 0)) < 0) + TEST_ERROR + if((size_t)ssize_out != HDstrlen(tmp_dsetname)) + TEST_ERROR + HDassert((size_t)ssize_out < sizeof(name_out)); + if((ssize_out = H5Pget_virtual_dsetname(ex_dcpl, i, name_out, sizeof(name_out))) < 0) + TEST_ERROR + if((size_t)ssize_out != HDstrlen(tmp_dsetname)) + TEST_ERROR + if(HDstrncmp(name_out, tmp_dsetname, (size_t)ssize_out + 1) != 0) + TEST_ERROR + } /* end if */ + + /* Close */ + if(H5Pclose(ex_dcpl) < 0) + TEST_ERROR + ex_dcpl = -1; + /* Close */ if(H5Pclose(dcpl) < 0) @@ -162,9 +428,9 @@ test_api(void) error: H5E_BEGIN_TRY { - for(i = 0; i < (sizeof(src_space) / sizeof(src_space[0])); i++) { - if(src_space[i] >= 0) - (void)H5Sclose(src_space[i]); + for(i = 0; i < (sizeof(srcspace) / sizeof(srcspace[0])); i++) { + if(srcspace[i] >= 0) + (void)H5Sclose(srcspace[i]); if(vspace[i] >= 0) (void)H5Sclose(vspace[i]); } /* end for */ @@ -172,6 +438,8 @@ error: (void)H5Sclose(space_out); if(dcpl >= 0) (void)H5Pclose(dcpl); + if(ex_dcpl >= 0) + (void)H5Pclose(ex_dcpl); } H5E_END_TRY; return 1; @@ -196,7 +464,8 @@ int main(void) { char filename[FILENAME_BUF_SIZE]; - hid_t file, grp, fapl; + hid_t fapl; + int test_api_config; int nerrors = 0; /* Testing setup */ @@ -205,15 +474,16 @@ main(void) h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - nerrors += test_api(); + for(test_api_config = (int)TEST_API_BASIC; test_api_config < (int)TEST_API_NTESTS; test_api_config++) + nerrors += test_api((test_api_config_t)test_api_config, fapl); /* Verify symbol table messages are cached */ - //nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0); VDSINC + nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0); if(nerrors) goto error; printf("All virtual dataset tests passed.\n"); - //h5_cleanup(FILENAME, fapl); VDSINC + h5_cleanup(FILENAME, fapl); return 0; @@ -222,5 +492,5 @@ error: printf("***** %d VIRTUAL DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); return 1; -} +} -- cgit v0.12 From 7881deb15e681d6cee22b8c0f20257c762d115b7 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Sat, 21 Feb 2015 22:26:08 -0500 Subject: [svn-r26268] Added VDS example. I ran bin/reconfigure on jam and it modified test/Makefile.in. May be Neil fixed Makefile.am, but didn't run reconfigure? Tested on jam. --- MANIFEST | 1 + examples/Makefile.am | 5 +- examples/Makefile.in | 5 +- examples/h5_vds.c | 244 ++++++++++++++++++++++++++++++++++++++++++++++++ examples/run-c-ex.sh.in | 4 +- test/Makefile.in | 2 +- 6 files changed, 255 insertions(+), 6 deletions(-) create mode 100644 examples/h5_vds.c diff --git a/MANIFEST b/MANIFEST index a0737ef..b6a3168 100644 --- a/MANIFEST +++ b/MANIFEST @@ -150,6 +150,7 @@ ./examples/h5_ref2reg.c ./examples/h5_shared_mesg.c ./examples/ph5example.c +./examples/h5_vds.c ./examples/testh5cc.sh.in ./examples/README diff --git a/examples/Makefile.am b/examples/Makefile.am index 5d0da93..419bb7f 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -37,7 +37,7 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \ h5_crtatt h5_crtgrp h5_crtdat \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ - h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg + h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds TEST_SCRIPT=testh5cc.sh TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) @@ -48,7 +48,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_extend.c h5_crtatt.c h5_crtgrp.c h5_crtdat.c \ h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ - h5_ref2reg.c h5_shared_mesg.c ph5example.c + h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c @@ -117,6 +117,7 @@ h5_dtransform: $(srcdir)/h5_dtransform.c h5_extlink: $(srcdir)/h5_extlink.c $(EXTLINK_DIRS) h5_elink_unix2win: $(srcdir)/h5_elink_unix2win.c $(EXTLINK_DIRS) h5_shared_mesg: $(srcdir)/h5_shared_mesg.c +h5_vds: $(srcdir)/h5_vds.c if BUILD_SHARED_SZIP_CONDITIONAL LD_LIBRARY_PATH=$(LL_PATH) diff --git a/examples/Makefile.in b/examples/Makefile.in index 71a9b4c..c4b8e3f 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -624,7 +624,7 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \ h5_crtatt h5_crtgrp h5_crtdat \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ - h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg + h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds TEST_SCRIPT = testh5cc.sh TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) @@ -636,7 +636,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_extend.c h5_crtatt.c h5_crtgrp.c h5_crtdat.c \ h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ - h5_ref2reg.c h5_shared_mesg.c ph5example.c + h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c # The external link examples demonstrate how to use paths; they need @@ -1089,6 +1089,7 @@ h5_dtransform: $(srcdir)/h5_dtransform.c h5_extlink: $(srcdir)/h5_extlink.c $(EXTLINK_DIRS) h5_elink_unix2win: $(srcdir)/h5_elink_unix2win.c $(EXTLINK_DIRS) h5_shared_mesg: $(srcdir)/h5_shared_mesg.c +h5_vds: $(srcdir)/h5_vds.c # How to create EXAMPLEDIR if it doesn't already exist $(EXAMPLEDIR): diff --git a/examples/h5_vds.c b/examples/h5_vds.c new file mode 100644 index 0000000..ed30b5b --- /dev/null +++ b/examples/h5_vds.c @@ -0,0 +1,244 @@ +/************************************************************ + + This example illustrates the concept of the virtual dataset. + The program creates three 1-dim source datasets and writes + data to them. Then it creates 2-dim virtual dataset and + maps the first three rows of the virtual dataset to the data + in the source datasets. Elements of a row are mapped to all + elements of the corresponding source dataset. + The fourth row is not mapped and will be filled with the fill + values when virtual dataset is read back. + + The program closes all datasets, and then reopens the virtual + dataset, and finds and prints its creation properties. + Then it reads the values. + + This file is intended for use with HDF5 Library version 1.10 + + ************************************************************/ + +#include "hdf5.h" +#include +#include + +#define FILE "vds.h5" +#define DATASET "VDS" +#define VDSDIM1 6 +#define VDSDIM0 4 +#define DIM0 6 +#define RANK1 1 +#define RANK2 2 + +const char *SRC_FILE[] = { + "a.h5", + "b.h5", + "c.h5" +}; + +const char *SRC_DATASET[] = { + "A", + "B", + "C" +}; + +int +main (void) +{ + hid_t file, space, src_space, vspace, dset; /* Handles */ + hid_t dcpl; + herr_t status; + hsize_t vdsdims[2] = {VDSDIM0, VDSDIM1}, /* Datasets dimension */ + dims[1] = {DIM0}, + start[2], /* Hyperslab parameters */ + stride[2], + count[2], + block[2]; + int wdata[DIM0], /* Write buffer for source dataset */ + rdata[VDSDIM0][VDSDIM1], /* Read buffer for virtual dataset */ + i, j, k, l; + int fill_value = -1; /* Fill value for VDS */ + H5D_layout_t layout; /* Storage layout */ + size_t num_map; /* Number of mappings */ + ssize_t len; /* Length of the string; also a return value */ + char *filename; + char *dsetname; + hsize_t nblocks; + hsize_t *buf; /* Buffer to hold hyperslab coordinates */ + + /* + * Create source files and datasets. This step is optional. + */ + for (i=0; i < 3; i++) { + /* + * Initialize data for i-th source dataset. + */ + for (j = 0; j < DIM0; j++) wdata[j] = i+1; + + /* + * Create the source files and datasets. Write data to each dataset and + * close all resources. + */ + + file = H5Fcreate (SRC_FILE[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + space = H5Screate_simple (RANK1, dims, NULL); + dset = H5Dcreate (file, SRC_DATASET[i], H5T_NATIVE_INT, space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, + wdata); + status = H5Sclose (space); + status = H5Dclose (dset); + status = H5Fclose (file); + } + + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* Create VDS dataspace. */ + space = H5Screate_simple (RANK2, vdsdims, NULL); + src_space = H5Screate_simple (RANK1, dims, NULL); + + /* Create VDS creation property */ + dcpl = H5Pcreate (H5P_DATASET_CREATE); + status = H5Pset_fill_value (dcpl, H5T_NATIVE_INT, &fill_value); + + /* Initialize hyperslab values */ + start[0] = 0; + start[1] = 0; + count[0] = 1; + count[1] = 1; + block[0] = 1; + block[1] = VDSDIM1; + + /* + * Build the mappings. + * + * Select the first, the second and the third rows and map each row to the data in the + * corresponding source datasets. + */ + for (i = 0; i < 3; i++) { + start[0] = (hsize_t)i; + /* Select i-th row in the virtual dataset; selection in the source datasets is the same. */ + status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block); + status = H5Pset_virtual (dcpl, space, SRC_FILE[i], SRC_DATASET[i], src_space); + status = H5Sselect_none (space); + } + + /* Create a virtual dataset */ + dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, + dcpl, H5P_DEFAULT); + status = H5Sclose (space); + status = H5Sclose (src_space); + status = H5Dclose (dset); + status = H5Fclose (file); + + /* + * Now we begin the read section of this example. + */ + + /* + * Open file and virtual dataset using the default properties. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + + /* + * Get creation property list and mapping properties. + */ + dcpl = H5Dget_create_plist (dset); + + /* + * Get storage layout. + */ + layout = H5Pget_layout (dcpl); + if (H5D_VIRTUAL == layout) + printf(" Dataset has a virtual layout \n"); + else + printf("Wrong layout found \n"); + + /* + * Find number of mappings. + */ + status = H5Pget_virtual_count (dcpl, &num_map); + printf("Number of mappings is %d\n", num_map); + + /* + * Get mapping parameters for each mapping. + */ + for (i = 0; i < (int)num_map; i++) { + printf("Mapping %d \n", i); + printf(" Selection in the virtual dataset "); + /* Get selection in the virttual dataset */ + vspace = H5Pget_virtual_vspace (dcpl, (size_t)i); + + /* Make sure that this is a hyperslab selection and then print information. */ + if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) { + nblocks = H5Sget_select_hyper_nblocks (vspace); + buf = (hsize_t *)malloc(sizeof(hsize_t)*2*RANK2*nblocks); + status = H5Sget_select_hyper_blocklist (vspace, (hsize_t)0, nblocks, buf); + for (l=0; l Date: Sat, 21 Feb 2015 22:38:00 -0500 Subject: [svn-r26269] Minor cleanup in the comments. --- examples/h5_vds.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/examples/h5_vds.c b/examples/h5_vds.c index ed30b5b..4c8e1dd 100644 --- a/examples/h5_vds.c +++ b/examples/h5_vds.c @@ -1,8 +1,8 @@ /************************************************************ - This example illustrates the concept of the virtual dataset. + This example illustrates the concept of virtual dataset. The program creates three 1-dim source datasets and writes - data to them. Then it creates 2-dim virtual dataset and + data to them. Then it creates a 2-dim virtual dataset and maps the first three rows of the virtual dataset to the data in the source datasets. Elements of a row are mapped to all elements of the corresponding source dataset. @@ -74,10 +74,10 @@ main (void) */ for (j = 0; j < DIM0; j++) wdata[j] = i+1; - /* - * Create the source files and datasets. Write data to each dataset and - * close all resources. - */ + /* + * Create the source files and datasets. Write data to each dataset and + * close all resources. + */ file = H5Fcreate (SRC_FILE[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); space = H5Screate_simple (RANK1, dims, NULL); @@ -88,19 +88,19 @@ main (void) status = H5Sclose (space); status = H5Dclose (dset); status = H5Fclose (file); - } - + } + /* Create file in which virtual dataset will be stored. */ file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); /* Create VDS dataspace. */ space = H5Screate_simple (RANK2, vdsdims, NULL); src_space = H5Screate_simple (RANK1, dims, NULL); - /* Create VDS creation property */ + /* Set VDS creation property. */ dcpl = H5Pcreate (H5P_DATASET_CREATE); status = H5Pset_fill_value (dcpl, H5T_NATIVE_INT, &fill_value); - /* Initialize hyperslab values */ + /* Initialize hyperslab values. */ start[0] = 0; start[1] = 0; count[0] = 1; @@ -122,7 +122,7 @@ main (void) status = H5Sselect_none (space); } - /* Create a virtual dataset */ + /* Create a virtual dataset. */ dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); status = H5Sclose (space); @@ -135,7 +135,7 @@ main (void) */ /* - * Open file and virtual dataset using the default properties. + * Open the file and virtual dataset. */ file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); dset = H5Dopen (file, DATASET, H5P_DEFAULT); @@ -155,7 +155,7 @@ main (void) printf("Wrong layout found \n"); /* - * Find number of mappings. + * Find the number of mappings. */ status = H5Pget_virtual_count (dcpl, &num_map); printf("Number of mappings is %d\n", num_map); @@ -186,23 +186,23 @@ main (void) printf ("\n"); } } - /* Get source file name */ + /* Get source file name. */ len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0); filename = (char *)malloc((size_t)len*sizeof(char)+1); H5Pget_virtual_filename (dcpl, (size_t)i, filename, len+1); printf(" Source filename %s\n", filename); - /* Get source dataset name */ + /* Get source dataset name. */ len = H5Pget_virtual_dsetname (dcpl, (size_t)i, NULL, 0); dsetname = (char *)malloc((size_t)len*sizeof(char)+1); H5Pget_virtual_dsetname (dcpl, (size_t)i, dsetname, len+1); printf(" Source dataset name %s\n", dsetname); - /* Get selection in the source dataset */ + /* Get selection in the source dataset. */ printf(" Selection in the source dataset "); src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i); - /* Make sure it is ALL selection and then print the coordinates */ + /* Make sure it is ALL selection and then print the coordinates. */ if(H5Sget_select_type(src_space) == H5S_SEL_ALL) { printf("(0) - (%d)", DIM0-1); printf ("\n"); -- cgit v0.12 From c5da9e327031a233f03648cf47e1b3a020afc0b5 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 23 Feb 2015 11:20:53 -0500 Subject: [svn-r26282] Update source file list and test list --- src/CMakeLists.txt | 1 + test/CMakeLists.txt | 1 + test/CMakeTests.cmake | 1 + 3 files changed, 3 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3ad51b7..1ff03d1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -116,6 +116,7 @@ set (H5D_SRCS ${HDF5_SRC_DIR}/H5Dscatgath.c ${HDF5_SRC_DIR}/H5Dselect.c ${HDF5_SRC_DIR}/H5Dtest.c + ${HDF5_SRC_DIR}/H5Dvirtual.c ) set (H5D_HDRS diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b99447a..255503d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -209,6 +209,7 @@ set (H5_TESTS cross_read freespace mf + vds farray earray btree2 diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index f98ab67..9d48990 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -330,6 +330,7 @@ add_test ( tstint2.h5 unregister_filter_1.h5 unregister_filter_2.h5 + vds_1.h5 WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) -- cgit v0.12 From 8e48921d90677180dfd7309da1e3206f32928031 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 23 Feb 2015 11:54:39 -0500 Subject: [svn-r26283] Correct test folder handling (merge from trunk) --- test/CMakeTests.cmake | 93 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 79 insertions(+), 14 deletions(-) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 9d48990..c01ef61 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -7,8 +7,8 @@ # make test dir file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST") -file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/tesfiles") -file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/tesfiles/plist_files") +file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/testfiles") +file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files") if (HDF5_TEST_VFD) set (VFD_LIST sec2 @@ -606,23 +606,88 @@ if (HDF5_TEST_VFD) set (H5_VFD_TESTS ${H5_VFD_TESTS} big) endif (NOT CYGWIN) - MACRO (ADD_VFD_TEST vfdname resultcode) - foreach (test ${H5_VFD_TESTS}) + MACRO (CHECK_VFD_TEST vfdtest vfdname resultcode) + if (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2") + if (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") + if (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) + add_test ( + NAME VFD-${vfdname}-${vfdtest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdtest}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + else (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) + add_test ( + NAME VFD-${vfdname}-${vfdtest} + COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}" + ) + endif(NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) + else (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") + add_test ( + NAME VFD-${vfdname}-${vfdtest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdtest}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + endif (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") + else (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2") add_test ( - NAME VFD-${vfdname}-${test} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${test}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + NAME VFD-${vfdname}-${vfdtest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdtest}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) - set_tests_properties (VFD-${vfdname}-${test} PROPERTIES + set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) + endif (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2") + ENDMACRO (CHECK_VFD_TEST vfdtest vfdname resultcode) + + MACRO (ADD_VFD_TEST vfdname resultcode) + foreach (test ${H5_VFD_TESTS}) + if (WIN32) + CHECK_VFD_TEST (${test} ${vfdname} ${resultcode}) + else (WIN32) + add_test ( + NAME VFD-${vfdname}-${test} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${test}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${test} PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + endif (WIN32) endforeach (test ${H5_VFD_TESTS}) set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1) set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) -- cgit v0.12 From 46074defaa9db9aa5318d35e1bd3dbfd40fbc24a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 23 Feb 2015 12:07:40 -0500 Subject: [svn-r26284] Add VIRTUAL layout to h5dump - still need a tools testfile created --- tools/lib/h5tools.h | 6 ++- tools/lib/h5tools_dump.c | 127 ++++++++++++++++++++++++++++++++--------------- 2 files changed, 93 insertions(+), 40 deletions(-) diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index d6c3720..a1810e6 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -81,7 +81,7 @@ #define FLETCHER32 "CHECKSUM FLETCHER32" #define SZIP "COMPRESSION SZIP" #define NBIT "COMPRESSION NBIT" -#define SCALEOFFSET "COMPRESSION SCALEOFFSET" +#define SCALEOFFSET "COMPRESSION SCALEOFFSET" #define SCALEOFFSET_MINBIT "MIN BITS" #define STORAGE_LAYOUT "STORAGE_LAYOUT" #define CONTIGUOUS "CONTIGUOUS" @@ -93,6 +93,10 @@ #define PACKED_BITS "PACKED_BITS" #define PACKED_OFFSET "OFFSET" #define PACKED_LENGTH "LENGTH" +#define VDS_VIRTUAL "VIRTUAL" +#define VDS_MAPPING "MAPPING" +#define VDS_HYPERSLAB "HYPERSLAB_SELECTION" +#define VDS_POINT "POINT_SELECTION" #define BEGIN "{" #define END "}" diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index ba1af19..582d878 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2909,7 +2909,8 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, size_t cd_nelmts; /* filter client number of values */ off_t offset; /* offset of external file */ char f_name[256]; /* filter name */ - char name[256]; /* external file name */ + char name[256]; /* external or virtual file name */ + char dsetname[256]; /* virtual datset name */ hsize_t chsize[64]; /* chunk size in elements */ hsize_t size; /* size of external file */ hsize_t storage_size; @@ -2975,18 +2976,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts, cd_values, sizeof(f_name), f_name, NULL); ok = (filtn>=0); - - /* this following code will not show compression ratio for - user defined filter. For example, see HDFFV-8344 --xcao@hdfgroup.org - switch(filtn) { - case H5Z_FILTER_DEFLATE: - case H5Z_FILTER_SZIP: - case H5Z_FILTER_NBIT: - case H5Z_FILTER_SCALEOFFSET: - ok = 1; - break; - } - */ } if(ndims && ok) { @@ -3018,13 +3007,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->indent_level--; - - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); } else if(H5D_COMPACT == H5Pget_layout(dcpl_id)) { ctx->indent_level++; @@ -3044,13 +3026,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->indent_level--; - - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); } else if(H5D_CONTIGUOUS == H5Pget_layout(dcpl_id)) { int next; @@ -3100,13 +3075,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->indent_level--; - - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); } else { haddr_t ioffset; @@ -3115,37 +3083,118 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", CONTIGUOUS); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer,"SIZE " HSIZE_T_FORMAT, storage_size); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); ioffset = H5Dget_offset(obj_id); h5tools_str_append(&buffer,"OFFSET "H5_PRINTF_HADDR_FMT, ioffset); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->indent_level--; + } + } + else if(H5D_VIRTUAL == H5Pget_layout(dcpl_id)) { + int vmaps; + + vmaps = 0;//H5Pget_mapping_count(dcpl_id); + + ctx->indent_level++; + + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s %s", VDS_VIRTUAL, BEGIN); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + + if(vmaps) { + int next; + + ctx->indent_level++; ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s %s", VDS_MAPPING, BEGIN); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + + next = 0;//H5Pget_mapping selection_count(dcpl_id); + + if(next) { + ctx->indent_level++; + for(j = 0; j < (unsigned)next; j++) { + //H5Pget_virtual(dcpl_id, j, sizeof(name), name, &dsetname, &selection); + + //h5tools_dump_virtual_selection(stream, info, ctx, selection); + + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", name); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", dsetname); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + + //h5tools_dump_virtual_selection(stream, info, ctx, selection); + } + ctx->indent_level--; + + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s",END); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + } + + ctx->indent_level--; + + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s",END); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); } + + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s",END); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + + ctx->indent_level--; } - /*------------------------------------------------------------------------- + + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s",END); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + + /*------------------------------------------------------------------------- * FILTERS *------------------------------------------------------------------------- */ -- cgit v0.12 From cd9b96a887b5f9fc9afe343abf794ba317afb965 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 23 Feb 2015 13:41:02 -0500 Subject: [svn-r26285] add virtual mapping output blank selections but actual file and dataset names. --- tools/lib/h5tools.h | 9 ++++ tools/lib/h5tools_dump.c | 111 ++++++++++++++++++++++++++++++++++------------- 2 files changed, 89 insertions(+), 31 deletions(-) diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index a1810e6..6dc93fd 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -186,6 +186,15 @@ typedef struct h5tools_dump_header_t { const char *dataspacedimbegin; const char *dataspacedimend; + const char *virtualselectionbegin; + const char *virtualselectionend; + const char *virtualselectionblockbegin; + const char *virtualselectionblockend; + const char *virtualfilenamebegin; + const char *virtualfilenameend; + const char *virtualdatasetnamebegin; + const char *virtualdatasetnameend; + } h5tools_dump_header_t; /* diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 582d878..6021426 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -179,6 +179,15 @@ BLOCK, /*blockbegin */ "", /*dataspacedescriptionend */ "(", /*dataspacedimbegin */ ")", /*dataspacedimend */ + +"", /*virtualselectionbegin */ +"", /*virtualselectionend */ +"", /*virtualselectionblockbegin */ +";", /*virtualselectionblockend */ +"", /*virtualfilenamebeginbegin */ +";", /*virtualfilenamebeginend */ +"", /*virtualdatasetnamebegin */ +";", /*virtualdtatasetnameend */ }; const h5tools_dump_header_t* h5tools_dump_header_format; @@ -216,6 +225,9 @@ void h5tools_print_dims(h5tools_str_t *buffer, hsize_t *s, int dims); void h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, struct subset_t *sset, int dims); +void h5tools_dump_virtual_selection(FILE *stream, const h5tool_format_t *info, + h5tools_context_t *ctx, hid_t dcpl_id, size_t index); + void h5tools_dump_init(void) { @@ -2841,6 +2853,46 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, h5tools_str_close(&buffer); } +/*------------------------------------------------------------------------- + * Function: dump_virtual_selection + * + * Purpose: Dump the virtual dataset selection. + * + * Return: void + * + * In/Out: h5tools_context_t *ctx + *------------------------------------------------------------------------- + */ +void +h5tools_dump_virtual_selection(FILE *stream, const h5tool_format_t *info, + h5tools_context_t *ctx, hid_t dcpl_id, size_t index) +{ + h5tools_str_t buffer; /* string into which to render */ + size_t ncols = 80; /* available output width */ + hsize_t curr_pos = ctx->sm_pos; /* total data element position */ + /* pass to the prefix in h5tools_simple_prefix the total position + * instead of the current stripmine position i; this is necessary + * to print the array indices + */ + + /* setup */ + HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + + if (info->line_ncols > 0) + ncols = info->line_ncols; + + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); + + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->virtualselectionbegin, h5tools_dump_header_format->virtualselectionblockbegin); + //h5tools_print_selection(&buffer, sset->start.data, dims); + h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->virtualselectionend, h5tools_dump_header_format->virtualselectionblockend); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + + h5tools_str_close(&buffer); +} + /*------------------------------------------------------------------------- * Function: dump_fill_value @@ -2905,7 +2957,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, H5D_fill_value_t fvstatus; H5D_alloc_time_t at; H5D_fill_time_t ft; - size_t ncols = 80; /* available output width */ + size_t ncols = 80; /* available output width */ size_t cd_nelmts; /* filter client number of values */ off_t offset; /* offset of external file */ char f_name[256]; /* filter name */ @@ -2914,8 +2966,8 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, hsize_t chsize[64]; /* chunk size in elements */ hsize_t size; /* size of external file */ hsize_t storage_size; - hsize_t curr_pos = 0; /* total data element position */ - h5tools_str_t buffer; /* string into which to render */ + hsize_t curr_pos = 0; /* total data element position */ + h5tools_str_t buffer; /* string into which to render */ /* setup */ HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -3107,9 +3159,9 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, } } else if(H5D_VIRTUAL == H5Pget_layout(dcpl_id)) { - int vmaps; + size_t vmaps; - vmaps = 0;//H5Pget_mapping_count(dcpl_id); + H5Pget_virtual_count(dcpl_id, &vmaps); ctx->indent_level++; @@ -3121,7 +3173,8 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); if(vmaps) { - int next; + size_t next; + ssize_t ssize_out; ctx->indent_level++; @@ -3132,41 +3185,35 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_str_append(&buffer, "%s %s", VDS_MAPPING, BEGIN); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - next = 0;//H5Pget_mapping selection_count(dcpl_id); - - if(next) { - ctx->indent_level++; - for(j = 0; j < (unsigned)next; j++) { - //H5Pget_virtual(dcpl_id, j, sizeof(name), name, &dsetname, &selection); - - //h5tools_dump_virtual_selection(stream, info, ctx, selection); - - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s", name); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->indent_level++; + for(next = 0; next < (unsigned)vmaps; next++) { + h5tools_dump_virtual_selection(stream, info, ctx, dcpl_id, next); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + ssize_out = H5Pget_virtual_filename(dcpl_id, next, NULL, 0); + H5Pget_virtual_filename(dcpl_id, next, name, sizeof(name)); + ssize_out = H5Pget_virtual_dsetname(dcpl_id, next, NULL, 0); + H5Pget_virtual_dsetname(dcpl_id, next, dsetname, sizeof(dsetname)); - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s", dsetname); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - //h5tools_dump_virtual_selection(stream, info, ctx, selection); - } - ctx->indent_level--; + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s ", h5tools_dump_header_format->virtualfilenamebegin); + h5tools_str_append(&buffer, "%s", name); + h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualfilenameend); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); + h5tools_str_append(&buffer, "%s ", h5tools_dump_header_format->virtualdatasetnamebegin); + h5tools_str_append(&buffer, "%s", dsetname); + h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnameend); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - } + h5tools_dump_virtual_selection(stream, info, ctx, dcpl_id, next); + } ctx->indent_level--; ctx->need_prefix = TRUE; @@ -3175,6 +3222,8 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s",END); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + + ctx->indent_level--; } ctx->need_prefix = TRUE; -- cgit v0.12 From a0ead57cadd26dd8372ae58e74eddc9d87c1b58a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 23 Feb 2015 14:19:19 -0500 Subject: [svn-r26286] Print selection types - no values --- tools/lib/h5tools_dump.c | 81 ++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 6021426..921c3b2 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -181,9 +181,9 @@ BLOCK, /*blockbegin */ ")", /*dataspacedimend */ "", /*virtualselectionbegin */ -"", /*virtualselectionend */ -"", /*virtualselectionblockbegin */ -";", /*virtualselectionblockend */ +";", /*virtualselectionend */ +"{", /*virtualselectionblockbegin */ +"}", /*virtualselectionblockend */ "", /*virtualfilenamebeginbegin */ ";", /*virtualfilenamebeginend */ "", /*virtualdatasetnamebegin */ @@ -225,8 +225,7 @@ void h5tools_print_dims(h5tools_str_t *buffer, hsize_t *s, int dims); void h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, struct subset_t *sset, int dims); -void h5tools_dump_virtual_selection(FILE *stream, const h5tool_format_t *info, - h5tools_context_t *ctx, hid_t dcpl_id, size_t index); +void h5tools_print_virtual_selection(h5tools_str_t *buffer, hid_t vspace, hid_t dcpl_id, size_t index); void h5tools_dump_init(void) @@ -2854,43 +2853,38 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, } /*------------------------------------------------------------------------- - * Function: dump_virtual_selection + * Function: print_virtual_selection * - * Purpose: Dump the virtual dataset selection. + * Purpose: Print the virtual dataset selection. * * Return: void - * - * In/Out: h5tools_context_t *ctx *------------------------------------------------------------------------- */ void -h5tools_dump_virtual_selection(FILE *stream, const h5tool_format_t *info, - h5tools_context_t *ctx, hid_t dcpl_id, size_t index) +h5tools_print_virtual_selection(h5tools_str_t *buffer, hid_t vspace, hid_t dcpl_id, size_t index) { - h5tools_str_t buffer; /* string into which to render */ - size_t ncols = 80; /* available output width */ - hsize_t curr_pos = ctx->sm_pos; /* total data element position */ - /* pass to the prefix in h5tools_simple_prefix the total position - * instead of the current stripmine position i; this is necessary - * to print the array indices - */ - - /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); - - if (info->line_ncols > 0) - ncols = info->line_ncols; - - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->virtualselectionbegin, h5tools_dump_header_format->virtualselectionblockbegin); - //h5tools_print_selection(&buffer, sset->start.data, dims); - h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->virtualselectionend, h5tools_dump_header_format->virtualselectionblockend); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - - h5tools_str_close(&buffer); + h5tools_str_append(buffer, "%s ", h5tools_dump_header_format->virtualselectionbegin); + switch(H5Sget_select_type(vspace)) { + case H5S_SEL_NONE: /* Nothing selected */ + h5tools_str_append(buffer, "NONE"); + break; + case H5S_SEL_POINTS: /* Sequence of points selected */ + h5tools_str_append(buffer, "POINT_SELECTION %s ", h5tools_dump_header_format->virtualselectionblockbegin); + //h5tools_print_selection(&buffer, sset->start.data, dims); + h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); + break; + case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */ + h5tools_str_append(buffer, "HYPERSLAB_SELECTION %s ", h5tools_dump_header_format->virtualselectionblockbegin); + //h5tools_print_selection(&buffer, sset->start.data, dims); + h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); + break; + case H5S_SEL_ALL: /* Entire extent selected */ + h5tools_str_append(buffer, "ALL"); + break; + default: + h5tools_str_append(buffer, "Unknown Selection"); + } + h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionend); } @@ -3187,7 +3181,15 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; for(next = 0; next < (unsigned)vmaps; next++) { - h5tools_dump_virtual_selection(stream, info, ctx, dcpl_id, next); + hid_t virtual_vspace = H5Pget_virtual_vspace(dcpl_id, next); + hid_t virtual_srcspace = H5Pget_virtual_srcspace(dcpl_id, next); + + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(&buffer); + h5tools_print_virtual_selection(&buffer, virtual_vspace, dcpl_id, next); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ssize_out = H5Pget_virtual_filename(dcpl_id, next, NULL, 0); H5Pget_virtual_filename(dcpl_id, next, name, sizeof(name)); @@ -3212,7 +3214,12 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnameend); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - h5tools_dump_virtual_selection(stream, info, ctx, dcpl_id, next); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(&buffer); + h5tools_print_virtual_selection(&buffer, virtual_srcspace, dcpl_id, next); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); } ctx->indent_level--; -- cgit v0.12 From b1251c915ea777e3c84d0934cd713d9dd0aef38f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 23 Feb 2015 15:23:56 -0500 Subject: [svn-r26287] Rename point and block str functions generically. Add info arg to print virtual selection function. --- tools/lib/h5tools_dump.c | 16 ++++++++++------ tools/lib/h5tools_str.c | 32 ++++++++++++++++---------------- tools/lib/h5tools_str.h | 4 ++-- 3 files changed, 28 insertions(+), 24 deletions(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 921c3b2..72de012 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -225,7 +225,7 @@ void h5tools_print_dims(h5tools_str_t *buffer, hsize_t *s, int dims); void h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, struct subset_t *sset, int dims); -void h5tools_print_virtual_selection(h5tools_str_t *buffer, hid_t vspace, hid_t dcpl_id, size_t index); +void h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *info, hid_t vspace, hid_t dcpl_id, size_t index); void h5tools_dump_init(void) @@ -2861,7 +2861,7 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, *------------------------------------------------------------------------- */ void -h5tools_print_virtual_selection(h5tools_str_t *buffer, hid_t vspace, hid_t dcpl_id, size_t index) +h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *info, hid_t vspace, hid_t dcpl_id, size_t index) { h5tools_str_append(buffer, "%s ", h5tools_dump_header_format->virtualselectionbegin); switch(H5Sget_select_type(vspace)) { @@ -2870,12 +2870,16 @@ h5tools_print_virtual_selection(h5tools_str_t *buffer, hid_t vspace, hid_t dcpl_ break; case H5S_SEL_POINTS: /* Sequence of points selected */ h5tools_str_append(buffer, "POINT_SELECTION %s ", h5tools_dump_header_format->virtualselectionblockbegin); - //h5tools_print_selection(&buffer, sset->start.data, dims); + h5tools_str_append(buffer, "{"); + h5tools_str_dump_space_points(buffer, vspace, info); + h5tools_str_append(buffer, "}"); h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */ h5tools_str_append(buffer, "HYPERSLAB_SELECTION %s ", h5tools_dump_header_format->virtualselectionblockbegin); - //h5tools_print_selection(&buffer, sset->start.data, dims); + h5tools_str_append(buffer, "{"); + h5tools_str_dump_space_blocks(buffer, vspace, info); + h5tools_str_append(buffer, "}"); h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_ALL: /* Entire extent selected */ @@ -3188,7 +3192,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_print_virtual_selection(&buffer, virtual_vspace, dcpl_id, next); + h5tools_print_virtual_selection(&buffer, info, virtual_vspace, dcpl_id, next); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ssize_out = H5Pget_virtual_filename(dcpl_id, next, NULL, 0); @@ -3218,7 +3222,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_print_virtual_selection(&buffer, virtual_srcspace, dcpl_id, next); + h5tools_print_virtual_selection(&buffer, info, virtual_srcspace, dcpl_id, next); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); } ctx->indent_level--; diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 3160cfa..45424f6 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -416,9 +416,9 @@ h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info, } /*------------------------------------------------------------------------- - * Function: h5tools_str_dump_region_blocks + * Function: h5tools_str_dump_space_blocks * - * Purpose: Prints information about a dataspace region by appending + * Purpose: Prints information about a dataspace selection by appending * the information to the specified string. * * Return: none @@ -429,19 +429,19 @@ h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info, *------------------------------------------------------------------------- */ void -h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region, +h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, const h5tool_format_t *info) { hssize_t nblocks; hsize_t alloc_size; hsize_t *ptdata; - int ndims = H5Sget_simple_extent_ndims(region); + int ndims = H5Sget_simple_extent_ndims(rspace); /* - * This function fails if the region does not have blocks. + * This function fails if the rspace does not have blocks. */ H5E_BEGIN_TRY { - nblocks = H5Sget_select_hyper_nblocks(region); + nblocks = H5Sget_select_hyper_nblocks(rspace); } H5E_END_TRY; /* Print block information */ @@ -452,7 +452,7 @@ h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region, HDassert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/ ptdata = (hsize_t *)HDmalloc((size_t) alloc_size); H5_CHECK_OVERFLOW(nblocks, hssize_t, hsize_t); - H5Sget_select_hyper_blocklist(region, (hsize_t)0, (hsize_t)nblocks, ptdata); + H5Sget_select_hyper_blocklist(rspace, (hsize_t)0, (hsize_t)nblocks, ptdata); for (i = 0; i < nblocks; i++) { int j; @@ -477,9 +477,9 @@ h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region, } /*------------------------------------------------------------------------- - * Function: h5tools_str_dump_region_points + * Function: h5tools_str_dump_space_points * - * Purpose: Prints information about a dataspace region by appending + * Purpose: Prints information about a dataspace selection by appending * the information to the specified string. * * Return: none @@ -490,19 +490,19 @@ h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region, *------------------------------------------------------------------------- */ void -h5tools_str_dump_region_points(h5tools_str_t *str, hid_t region, +h5tools_str_dump_space_points(h5tools_str_t *str, hid_t rspace, const h5tool_format_t *info) { hssize_t npoints; hsize_t alloc_size; hsize_t *ptdata; - int ndims = H5Sget_simple_extent_ndims(region); + int ndims = H5Sget_simple_extent_ndims(rspace); /* - * This function fails if the region does not have points. + * This function fails if the rspace does not have points. */ H5E_BEGIN_TRY { - npoints = H5Sget_select_elem_npoints(region); + npoints = H5Sget_select_elem_npoints(rspace); } H5E_END_TRY; /* Print point information */ @@ -513,7 +513,7 @@ h5tools_str_dump_region_points(h5tools_str_t *str, hid_t region, HDassert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/ ptdata = (hsize_t *)HDmalloc((size_t) alloc_size); H5_CHECK_OVERFLOW(npoints, hssize_t, hsize_t); - H5Sget_select_elem_pointlist(region, (hsize_t)0, (hsize_t)npoints, ptdata); + H5Sget_select_elem_pointlist(rspace, (hsize_t)0, (hsize_t)npoints, ptdata); for (i = 0; i < npoints; i++) { int j; @@ -1241,9 +1241,9 @@ h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info, region_type = H5Sget_select_type(region); if(region_type==H5S_SEL_POINTS) - h5tools_str_dump_region_points(str, region, info); + h5tools_str_dump_space_points(str, region, info); else - h5tools_str_dump_region_blocks(str, region, info); + h5tools_str_dump_space_blocks(str, region, info); h5tools_str_append(str, "}"); diff --git a/tools/lib/h5tools_str.h b/tools/lib/h5tools_str.h index 38697c6..8d4c042 100644 --- a/tools/lib/h5tools_str.h +++ b/tools/lib/h5tools_str.h @@ -40,8 +40,8 @@ H5TOOLS_DLL char *h5tools_str_prefix(h5tools_str_t *str, const h5tool_format_ H5TOOLS_DLL char *h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info, hsize_t elmtno, hsize_t *ptdata, unsigned ndims, hsize_t max_idx[], h5tools_context_t *ctx); -H5TOOLS_DLL void h5tools_str_dump_region_blocks(h5tools_str_t *, hid_t, const h5tool_format_t *); -H5TOOLS_DLL void h5tools_str_dump_region_points(h5tools_str_t *, hid_t, const h5tool_format_t *); +H5TOOLS_DLL void h5tools_str_dump_space_blocks(h5tools_str_t *, hid_t, const h5tool_format_t *); +H5TOOLS_DLL void h5tools_str_dump_space_points(h5tools_str_t *, hid_t, const h5tool_format_t *); H5TOOLS_DLL void h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info, hid_t container, void *vp); H5TOOLS_DLL char *h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, -- cgit v0.12 From bc888966a9778adb0542e75a8664632767f17ad1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 23 Feb 2015 15:30:53 -0500 Subject: [svn-r26288] remove extra set of brackets --- tools/lib/h5tools_dump.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 72de012..dab1af9 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2870,16 +2870,12 @@ h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *in break; case H5S_SEL_POINTS: /* Sequence of points selected */ h5tools_str_append(buffer, "POINT_SELECTION %s ", h5tools_dump_header_format->virtualselectionblockbegin); - h5tools_str_append(buffer, "{"); h5tools_str_dump_space_points(buffer, vspace, info); - h5tools_str_append(buffer, "}"); h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */ h5tools_str_append(buffer, "HYPERSLAB_SELECTION %s ", h5tools_dump_header_format->virtualselectionblockbegin); - h5tools_str_append(buffer, "{"); h5tools_str_dump_space_blocks(buffer, vspace, info); - h5tools_str_append(buffer, "}"); h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_ALL: /* Entire extent selected */ -- cgit v0.12 From 80e77e7d778ea5d5bfcfc92f9492cdfdc1dd0197 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 23 Feb 2015 16:52:03 -0500 Subject: [svn-r26290] Add H5S prefix to selection name --- tools/lib/h5tools_dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index dab1af9..44093a9 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2866,7 +2866,7 @@ h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *in h5tools_str_append(buffer, "%s ", h5tools_dump_header_format->virtualselectionbegin); switch(H5Sget_select_type(vspace)) { case H5S_SEL_NONE: /* Nothing selected */ - h5tools_str_append(buffer, "NONE"); + h5tools_str_append(buffer, "H5S_NONE"); break; case H5S_SEL_POINTS: /* Sequence of points selected */ h5tools_str_append(buffer, "POINT_SELECTION %s ", h5tools_dump_header_format->virtualselectionblockbegin); @@ -2879,7 +2879,7 @@ h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *in h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_ALL: /* Entire extent selected */ - h5tools_str_append(buffer, "ALL"); + h5tools_str_append(buffer, "H5S_ALL"); break; default: h5tools_str_append(buffer, "Unknown Selection"); -- cgit v0.12 From 28111339143e6c3f9aa8d4f96c771472a1a79c55 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 24 Feb 2015 14:54:48 -0500 Subject: [svn-r26293] Implement patching of virtual dataspace extent in mapping dataspaces when opening virtual dataset. Add tests for this. Tested: ummon --- src/H5Dlayout.c | 10 ++++++++++ src/H5Osdspace.c | 4 ++-- src/H5S.c | 43 ++++++++++++++++++++++++++++++++++++++----- src/H5Spkg.h | 2 +- src/H5Sprivate.h | 1 + test/vds.c | 37 +++++++++++++++++++++---------------- 6 files changed, 73 insertions(+), 24 deletions(-) diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index 5929163..c0e1b20 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -449,6 +449,16 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t break; case H5D_VIRTUAL: + { + size_t i; + + HDassert(!dataset->shared->layout.storage.u.virt.list == (dataset->shared->layout.storage.u.virt.list_nused == 0)); + + /* Patch the virtual selection dataspaces */ + for(i = 0; i < dataset->shared->layout.storage.u.virt.list_nused; i++) + if(H5S_extent_copy(dataset->shared->layout.storage.u.virt.list[i].virtual_select, dataset->shared->space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") + } /* end block */ break; case H5D_LAYOUT_ERROR: diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index 9ca8436..3be5b82 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -312,7 +312,7 @@ H5O_sdspace_copy(const void *_mesg, void *_dest) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Copy extent information */ - if(H5S_extent_copy(dest, mesg, TRUE) < 0) + if(H5S_extent_copy_real(dest, mesg, TRUE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy extent") /* Set return value */ @@ -467,7 +467,7 @@ H5O_sdspace_pre_copy_file(H5F_t UNUSED *file_src, const void *mesg_src, HGOTO_ERROR(H5E_DATASPACE, H5E_NOSPACE, FAIL, "dataspace extent allocation failed") /* Create a copy of the dataspace extent */ - if(H5S_extent_copy(udata->src_space_extent, src_space_extent, TRUE) < 0) + if(H5S_extent_copy_real(udata->src_space_extent, src_space_extent, TRUE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent") } /* end if */ diff --git a/src/H5S.c b/src/H5S.c index 7798049..106d75a 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -479,7 +479,7 @@ H5Sextent_copy(hid_t dst_id,hid_t src_id) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") /* Copy */ - if(H5S_extent_copy(&(dst->extent), &(src->extent), TRUE) < 0) + if(H5S_extent_copy_real(&(dst->extent), &(src->extent), TRUE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent") done: @@ -488,7 +488,40 @@ done: /*------------------------------------------------------------------------- - * Function: H5S_extent_copy + * Function: H5S_extent_copy + * + * Purpose: Copies a dataspace extent + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * Monday, February 23, 2015 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5S_extent_copy(H5S_t *dst, const H5S_t *src) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + HDassert(dst); + HDassert(src); + + /* Copy */ + if(H5S_extent_copy_real(&(dst->extent), &(src->extent), TRUE) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5S_extent_copy() */ + + +/*------------------------------------------------------------------------- + * Function: H5S_extent_copy_real * * Purpose: Copies a dataspace extent * @@ -502,7 +535,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max) +H5S_extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max) { unsigned u; herr_t ret_value = SUCCEED; /* Return value */ @@ -551,7 +584,7 @@ H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5S_extent_copy() */ +} /* end H5S_extent_copy_real() */ /*------------------------------------------------------------------------- @@ -587,7 +620,7 @@ H5S_copy(const H5S_t *src, hbool_t share_selection, hbool_t copy_max) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Copy the source dataspace's extent */ - if(H5S_extent_copy(&(dst->extent), &(src->extent), copy_max) < 0) + if(H5S_extent_copy_real(&(dst->extent), &(src->extent), copy_max) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy extent") /* Copy the source dataspace's selection */ diff --git a/src/H5Spkg.h b/src/H5Spkg.h index 5f84717..f5511fb 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -245,7 +245,7 @@ H5_DLLVAR const H5S_select_class_t H5S_sel_point[1]; /* Extent functions */ H5_DLL herr_t H5S_extent_release(H5S_extent_t *extent); -H5_DLL herr_t H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src, +H5_DLL herr_t H5S_extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max); /* Operations on selections */ diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 7b7b8c6..7cb5285 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -204,6 +204,7 @@ H5_DLL int H5S_extend(H5S_t *space, const hsize_t *size); H5_DLL hsize_t H5S_extent_nelem(const H5S_extent_t *ext); H5_DLL int H5S_extent_get_dims(const H5S_extent_t *ext, hsize_t dims[], hsize_t max_dims[]); H5_DLL htri_t H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2); +H5_DLL herr_t H5S_extent_copy(H5S_t *dst, const H5S_t *src); /* Operations on selections */ H5_DLL herr_t H5S_select_deserialize(H5S_t **space, const uint8_t **p); diff --git a/test/vds.c b/test/vds.c index a37f2b0..42f3f06 100644 --- a/test/vds.c +++ b/test/vds.c @@ -164,6 +164,7 @@ test_api(test_api_config_t config, hid_t fapl) hid_t space_out = -1; char name_out[32]; hsize_t blocklist[4]; + htri_t tri_ret; unsigned i; switch(config) { @@ -218,14 +219,6 @@ test_api(test_api_config_t config, hid_t fapl) if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) TEST_ERROR - /* Close dataspaces */ - if(H5Sclose(srcspace[0]) < 0) - TEST_ERROR - srcspace[0] = -1; - if(H5Sclose(vspace[0]) < 0) - TEST_ERROR - vspace[0] = -1; - /* Test H5Pget_virtual_count */ if(H5Pget_virtual_count(ex_dcpl, &size_out) < 0) TEST_ERROR @@ -235,6 +228,10 @@ test_api(test_api_config_t config, hid_t fapl) /* Test H5Pget_virtual_vspace */ if((space_out = H5Pget_virtual_vspace(ex_dcpl, 0)) < 0) TEST_ERROR + if((tri_ret = H5Sextent_equal(space_out, vspace[0])) < 0) + TEST_ERROR + if(!tri_ret) + TEST_ERROR if(H5Sget_select_type(space_out) != H5S_SEL_ALL) TEST_ERROR if(H5Sclose(space_out) < 0) @@ -277,6 +274,12 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Close */ + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; if(H5Pclose(ex_dcpl) < 0) TEST_ERROR ex_dcpl = -1; @@ -333,14 +336,6 @@ test_api(test_api_config_t config, hid_t fapl) if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) TEST_ERROR - /* Close dataspaces */ - if(H5Sclose(srcspace[0]) < 0) - TEST_ERROR - srcspace[0] = -1; - if(H5Sclose(vspace[0]) < 0) - TEST_ERROR - vspace[0] = -1; - /* Test H5Pget_virtual_count */ if(H5Pget_virtual_count(ex_dcpl, &size_out) < 0) TEST_ERROR @@ -352,6 +347,10 @@ test_api(test_api_config_t config, hid_t fapl) /* Test H5Pget_virtual_vspace */ if((space_out = H5Pget_virtual_vspace(ex_dcpl, i)) < 0) TEST_ERROR + if((tri_ret = H5Sextent_equal(space_out, vspace[0])) < 0) + TEST_ERROR + if(!tri_ret) + TEST_ERROR if(H5Sget_select_type(space_out) != H5S_SEL_HYPERSLABS) TEST_ERROR if((ssize_out = H5Sget_select_hyper_nblocks(space_out)) < 0) @@ -413,6 +412,12 @@ test_api(test_api_config_t config, hid_t fapl) } /* end if */ /* Close */ + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; if(H5Pclose(ex_dcpl) < 0) TEST_ERROR ex_dcpl = -1; -- cgit v0.12 From 3f72ec11cdd07c30ee0340e3c1e9b13d88495807 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 24 Feb 2015 15:39:08 -0500 Subject: [svn-r26295] add space before end bracket of selection --- tools/lib/h5tools_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 44093a9..d2d895b 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2884,7 +2884,7 @@ h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *in default: h5tools_str_append(buffer, "Unknown Selection"); } - h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionend); + h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionend); } -- cgit v0.12 From 99a3f4d8d4ee1ec3f61a377c1a96a3fe35e9990a Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 24 Feb 2015 23:19:41 -0500 Subject: [svn-r26297] Changed example and h5dump according to suggestions at today's code review VDS-176. BNF has been updated too. Now h5dump displays VDS like this: HDF5 "vds.h5" { GROUP "/" { DATASET "VDS" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) } STORAGE_LAYOUT { VIRTUAL { HYPERSLAB { (0,0)-(0,5) }; a.h5; A; ALL; HYPERSLAB { (1,0)-(1,5) }; b.h5; B; ALL; HYPERSLAB { (2,0)-(2,5) }; c.h5; C; ALL; } } } FILTERS { ....... I just commented the code with "EIP" and didn't delete to simplify the review with Allen tomorrow. Tested on jam --- examples/CMakeLists.txt | 1 + examples/h5_vds.c | 31 ++++++++++++++----------------- tools/lib/h5tools.h | 3 +++ tools/lib/h5tools_dump.c | 22 +++++++++++++--------- tools/lib/h5tools_str.c | 2 +- 5 files changed, 32 insertions(+), 27 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index da8174b..b7c9c63 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -34,6 +34,7 @@ set (examples h5_extlink h5_elink_unix2win h5_shared_mesg + h5_vds ) foreach (example ${examples}) diff --git a/examples/h5_vds.c b/examples/h5_vds.c index 4c8e1dd..dea2ee6 100644 --- a/examples/h5_vds.c +++ b/examples/h5_vds.c @@ -47,8 +47,8 @@ main (void) hid_t file, space, src_space, vspace, dset; /* Handles */ hid_t dcpl; herr_t status; - hsize_t vdsdims[2] = {VDSDIM0, VDSDIM1}, /* Datasets dimension */ - dims[1] = {DIM0}, + hsize_t vdsdims[2] = {VDSDIM0, VDSDIM1}, /* Virtual satasets dimension */ + dims[1] = {DIM0}, /* Source datasets dimensions */ start[2], /* Hyperslab parameters */ stride[2], count[2], @@ -89,12 +89,12 @@ main (void) status = H5Dclose (dset); status = H5Fclose (file); } + /* Create file in which virtual dataset will be stored. */ file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); /* Create VDS dataspace. */ space = H5Screate_simple (RANK2, vdsdims, NULL); - src_space = H5Screate_simple (RANK1, dims, NULL); /* Set VDS creation property. */ dcpl = H5Pcreate (H5P_DATASET_CREATE); @@ -110,16 +110,16 @@ main (void) /* * Build the mappings. - * - * Select the first, the second and the third rows and map each row to the data in the - * corresponding source datasets. + * Selections in the source datasets are H5S_ALL. + * In the virtual dataset we select the first, the second and the third rows + * and map each row to the data in the corresponding source dataset. */ + src_space = H5Screate_simple (RANK1, dims, NULL); for (i = 0; i < 3; i++) { start[0] = (hsize_t)i; /* Select i-th row in the virtual dataset; selection in the source datasets is the same. */ status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block); status = H5Pset_virtual (dcpl, space, SRC_FILE[i], SRC_DATASET[i], src_space); - status = H5Sselect_none (space); } /* Create a virtual dataset. */ @@ -176,14 +176,12 @@ main (void) status = H5Sget_select_hyper_blocklist (vspace, (hsize_t)0, nblocks, buf); for (l=0; lvirtualselectionbegin); switch(H5Sget_select_type(vspace)) { case H5S_SEL_NONE: /* Nothing selected */ - h5tools_str_append(buffer, "H5S_NONE"); + h5tools_str_append(buffer, "NONE"); break; case H5S_SEL_POINTS: /* Sequence of points selected */ - h5tools_str_append(buffer, "POINT_SELECTION %s ", h5tools_dump_header_format->virtualselectionblockbegin); + h5tools_str_append(buffer, "POINT %s ", h5tools_dump_header_format->virtualselectionblockbegin); h5tools_str_dump_space_points(buffer, vspace, info); - h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); + h5tools_str_append(buffer, "% s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */ - h5tools_str_append(buffer, "HYPERSLAB_SELECTION %s ", h5tools_dump_header_format->virtualselectionblockbegin); + h5tools_str_append(buffer, "HYPERSLAB %s ", h5tools_dump_header_format->virtualselectionblockbegin); h5tools_str_dump_space_blocks(buffer, vspace, info); - h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); + h5tools_str_append(buffer, "% s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_ALL: /* Entire extent selected */ - h5tools_str_append(buffer, "H5S_ALL"); + h5tools_str_append(buffer, "ALL"); break; default: h5tools_str_append(buffer, "Unknown Selection"); } - h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionend); + h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionend); } @@ -3173,13 +3173,15 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - +/* EIP h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); +*/ h5tools_str_reset(&buffer); +/* EIP h5tools_str_append(&buffer, "%s %s", VDS_MAPPING, BEGIN); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->indent_level++; +*/ for(next = 0; next < (unsigned)vmaps; next++) { hid_t virtual_vspace = H5Pget_virtual_vspace(dcpl_id, next); hid_t virtual_srcspace = H5Pget_virtual_srcspace(dcpl_id, next); @@ -3221,7 +3223,9 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_print_virtual_selection(&buffer, info, virtual_srcspace, dcpl_id, next); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); } +/* EIP ctx->indent_level--; +*/ ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 45424f6..d0ecc6e 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -469,7 +469,7 @@ h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : ")-(", ptdata[i * 2 * ndims + j + ndims]); - h5tools_str_append(str, ")"); + h5tools_str_append(str, ") "); } HDfree(ptdata); -- cgit v0.12 From 45df14138dc66dc5f4995b5da7de99604ab2d09f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 26 Feb 2015 10:59:15 -0500 Subject: [svn-r26318] Update virtual layout to latest changes --- tools/lib/h5tools.h | 8 +- tools/lib/h5tools_dump.c | 550 ++++++++++++++++++++++------------------------- tools/lib/h5tools_str.c | 2 +- 3 files changed, 261 insertions(+), 299 deletions(-) diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 9e1fd55..323425f 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -94,12 +94,8 @@ #define PACKED_OFFSET "OFFSET" #define PACKED_LENGTH "LENGTH" #define VDS_VIRTUAL "VIRTUAL" -/* EIP -#define VDS_MAPPING "MAPPING" -*/ -/* It looks like two definitions below are not used */ -#define VDS_HYPERSLAB "HYPERSLAB_SELECTION" -#define VDS_POINT "POINT_SELECTION" +#define VDS_HYPERSLAB "HYPERSLAB" +#define VDS_POINT "POINT" #define BEGIN "{" #define END "}" diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 3b7b313..84318a1 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -184,10 +184,10 @@ BLOCK, /*blockbegin */ ";", /*virtualselectionend */ "{", /*virtualselectionblockbegin */ "}", /*virtualselectionblockend */ -"", /*virtualfilenamebeginbegin */ -";", /*virtualfilenamebeginend */ -"", /*virtualdatasetnamebegin */ -";", /*virtualdtatasetnameend */ +"\"", /*virtualfilenamebeginbegin */ +"\";", /*virtualfilenamebeginend */ +"\"", /*virtualdatasetnamebegin */ +"\";", /*virtualdtatasetnameend */ }; const h5tools_dump_header_t* h5tools_dump_header_format; @@ -2479,7 +2479,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ /* Close array base type */ if(H5Tclose(super) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed"); - } + } else HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tget_super failed"); @@ -2865,24 +2865,24 @@ h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *in { h5tools_str_append(buffer, "%s ", h5tools_dump_header_format->virtualselectionbegin); switch(H5Sget_select_type(vspace)) { - case H5S_SEL_NONE: /* Nothing selected */ - h5tools_str_append(buffer, "NONE"); - break; - case H5S_SEL_POINTS: /* Sequence of points selected */ - h5tools_str_append(buffer, "POINT %s ", h5tools_dump_header_format->virtualselectionblockbegin); - h5tools_str_dump_space_points(buffer, vspace, info); - h5tools_str_append(buffer, "% s", h5tools_dump_header_format->virtualselectionblockend); - break; - case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */ - h5tools_str_append(buffer, "HYPERSLAB %s ", h5tools_dump_header_format->virtualselectionblockbegin); - h5tools_str_dump_space_blocks(buffer, vspace, info); - h5tools_str_append(buffer, "% s", h5tools_dump_header_format->virtualselectionblockend); - break; - case H5S_SEL_ALL: /* Entire extent selected */ - h5tools_str_append(buffer, "ALL"); - break; - default: - h5tools_str_append(buffer, "Unknown Selection"); + case H5S_SEL_NONE: /* Nothing selected */ + h5tools_str_append(buffer, "NONE"); + break; + case H5S_SEL_POINTS: /* Sequence of points selected */ + h5tools_str_append(buffer, "%s %s ", VDS_POINT, h5tools_dump_header_format->virtualselectionblockbegin); + h5tools_str_dump_space_points(buffer, vspace, info); + h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionblockend); + break; + case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */ + h5tools_str_append(buffer, "%s %s ", VDS_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin); + h5tools_str_dump_space_blocks(buffer, vspace, info); + h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionblockend); + break; + case H5S_SEL_ALL: /* Entire extent selected */ + h5tools_str_append(buffer, "ALL"); + break; + default: + h5tools_str_append(buffer, "Unknown Selection"); } h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionend); } @@ -2894,11 +2894,6 @@ h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *in * Purpose: prints the fill value * * Return: void - * - * Programmer: pvn - * - * Modifications: - * *------------------------------------------------------------------------- */ void @@ -2929,15 +2924,11 @@ h5tools_print_fill_value(h5tools_str_t *buffer/*in,out*/, const h5tool_format_t * Purpose: prints several dataset create property list properties * * Return: void - * - * Modifications: pvn, March 28, 2008 - * Add a COMPRESSION ratio information for cases when filters are present - * *------------------------------------------------------------------------- */ void h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, - h5tools_context_t *ctx, hid_t dcpl_id,hid_t type_id, hid_t obj_id) + h5tools_context_t *ctx, hid_t dcpl_id, hid_t type_id, hid_t obj_id) { int nfilters; /* number of filters */ int rank; /* rank */ @@ -2951,6 +2942,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, H5D_fill_value_t fvstatus; H5D_alloc_time_t at; H5D_fill_time_t ft; + H5D_layout_t stl; size_t ncols = 80; /* available output width */ size_t cd_nelmts; /* filter client number of values */ off_t offset; /* offset of external file */ @@ -2983,275 +2975,251 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_str_append(&buffer, "%s %s", STORAGE_LAYOUT, BEGIN); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - if(H5D_CHUNKED == H5Pget_layout(dcpl_id)) { - ctx->indent_level++; + ctx->indent_level++; - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s ", CHUNKED); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - rank = H5Pget_chunk(dcpl_id,(int)NELMTS(chsize),chsize); - h5tools_str_append(&buffer, "%s " HSIZE_T_FORMAT, h5tools_dump_header_format->dataspacedimbegin, chsize[0]); - for(i = 1; i < rank; i++) - h5tools_str_append(&buffer, ", " HSIZE_T_FORMAT, chsize[i]); - h5tools_str_append(&buffer, " %s", h5tools_dump_header_format->dataspacedimend); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + stl = H5Pget_layout(dcpl_id); + switch (stl) { + case H5D_CHUNKED: + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s ", CHUNKED); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); + rank = H5Pget_chunk(dcpl_id, (int) NELMTS(chsize), chsize); + h5tools_str_append(&buffer, "%s " HSIZE_T_FORMAT, h5tools_dump_header_format->dataspacedimbegin, chsize[0]); + for(i = 1; i < rank; i++) + h5tools_str_append(&buffer, ", " HSIZE_T_FORMAT, chsize[i]); + h5tools_str_append(&buffer, " %s", h5tools_dump_header_format->dataspacedimend); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - /* if there are filters, print a compression ratio */ - if(nfilters) { - hsize_t dims[H5S_MAX_RANK]; - hsize_t nelmts = 1; - double ratio = 0; - int ok = 0; - - hid_t tid = H5Dget_type(obj_id); - hid_t sid = H5Dget_space(obj_id); - size_t datum_size = H5Tget_size(tid); - int ndims = H5Sget_simple_extent_dims(sid, dims, NULL); - - /* only print the compression ratio for these filters */ - for(i = 0; i < nfilters && !ok; i++) { - cd_nelmts = NELMTS(cd_values); - filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts, - cd_values, sizeof(f_name), f_name, NULL); - ok = (filtn>=0); - } + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - if(ndims && ok) { - hsize_t uncomp_size; + h5tools_str_reset(&buffer); - for(i = 0; i < ndims; i++) { - nelmts *= dims[i]; + /* if there are filters, print a compression ratio */ + if (nfilters) { + hsize_t dims[H5S_MAX_RANK]; + hsize_t nelmts = 1; + double ratio = 0; + int ok = 0; + + hid_t tid = H5Dget_type(obj_id); + hid_t sid = H5Dget_space(obj_id); + size_t datum_size = H5Tget_size(tid); + int ndims = H5Sget_simple_extent_dims(sid, dims, NULL); + + /* only print the compression ratio for these filters */ + for (i = 0; i < nfilters && !ok; i++) { + cd_nelmts = NELMTS(cd_values); + filtn = H5Pget_filter2(dcpl_id, (unsigned) i, &filt_flags, &cd_nelmts, cd_values, sizeof(f_name), + f_name, NULL); + ok = (filtn >= 0); } - uncomp_size = nelmts * datum_size; - /* compression ratio = uncompressed size / compressed size */ + if(ndims && ok) { + hsize_t uncomp_size; - if(storage_size != 0) - ratio = (double) uncomp_size / (double) storage_size; + for(i = 0; i < ndims; i++) { + nelmts *= dims[i]; + } + uncomp_size = nelmts * datum_size; - h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT" (%.3f:1 COMPRESSION)", storage_size, ratio); + /* compression ratio = uncompressed size / compressed size */ - } - else - h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); + if(storage_size != 0) + ratio = (double) uncomp_size / (double) storage_size; - H5Sclose(sid); - H5Tclose(tid); + h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT" (%.3f:1 COMPRESSION)", storage_size, ratio); - } - else { - h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); - } - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + } + else + h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); - ctx->indent_level--; - } - else if(H5D_COMPACT == H5Pget_layout(dcpl_id)) { - ctx->indent_level++; + H5Sclose(sid); + H5Tclose(tid); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s", COMPACT); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + } + else { + h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); + } + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + break; + case H5D_COMPACT: + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", COMPACT); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->indent_level--; - } - else if(H5D_CONTIGUOUS == H5Pget_layout(dcpl_id)) { - int next; + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + break; + case H5D_CONTIGUOUS: + { + int next; - next = H5Pget_external_count(dcpl_id); + next = H5Pget_external_count(dcpl_id); - /*------------------------------------------------------------------------- - * EXTERNAL_FILE - *------------------------------------------------------------------------- - */ - if(next) { - ctx->indent_level++; + /*------------------------------------------------------------------------- + * EXTERNAL_FILE + *------------------------------------------------------------------------- + */ + if (next) { + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", CONTIGUOUS); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s", CONTIGUOUS); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s %s", EXTERNAL, BEGIN); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s %s", EXTERNAL, BEGIN); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - ctx->indent_level++; - for(j = 0; j < (unsigned)next; j++) { - H5Pget_external(dcpl_id, j, sizeof(name), name, &offset, &size); + ctx->indent_level++; + for (j = 0; j < (unsigned) next; j++) { + H5Pget_external(dcpl_id, j, sizeof(name), name, &offset, &size); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "FILENAME %s SIZE " HSIZE_T_FORMAT, name, size); - h5tools_str_append(&buffer, " OFFSET %ld", offset); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - } - ctx->indent_level--; + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "FILENAME %s SIZE " HSIZE_T_FORMAT, name, size); + h5tools_str_append(&buffer, " OFFSET %ld", offset); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + } + ctx->indent_level--; - ctx->indent_level--; - } - else { - haddr_t ioffset; + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->indent_level++; + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", END); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + } + else { + haddr_t ioffset; - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", CONTIGUOUS); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s", CONTIGUOUS); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer,"SIZE " HSIZE_T_FORMAT, storage_size); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer,"SIZE " HSIZE_T_FORMAT, storage_size); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_str_reset(&buffer); + ioffset = H5Dget_offset(obj_id); + h5tools_str_append(&buffer, "OFFSET "H5_PRINTF_HADDR_FMT, ioffset); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + } + } + break; + case H5D_VIRTUAL: + { + size_t vmaps; - h5tools_str_reset(&buffer); - ioffset = H5Dget_offset(obj_id); - h5tools_str_append(&buffer,"OFFSET "H5_PRINTF_HADDR_FMT, ioffset); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s %s", VDS_VIRTUAL, BEGIN); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - ctx->indent_level--; - } - } - else if(H5D_VIRTUAL == H5Pget_layout(dcpl_id)) { - size_t vmaps; + H5Pget_virtual_count(dcpl_id, &vmaps); - H5Pget_virtual_count(dcpl_id, &vmaps); + if (vmaps) { + size_t next; + ssize_t ssize_out; - ctx->indent_level++; + ctx->indent_level++; + for (next = 0; next < (unsigned) vmaps; next++) { + hid_t virtual_vspace = H5Pget_virtual_vspace(dcpl_id, next); + hid_t virtual_srcspace = H5Pget_virtual_srcspace(dcpl_id, next); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s %s", VDS_VIRTUAL, BEGIN); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s ", BEGIN); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - if(vmaps) { - size_t next; - ssize_t ssize_out; + ctx->indent_level++; - ctx->indent_level++; + h5tools_str_reset(&buffer); + h5tools_print_virtual_selection(&buffer, info, virtual_vspace, dcpl_id, next); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - ctx->need_prefix = TRUE; -/* EIP h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); -*/ - h5tools_str_reset(&buffer); -/* EIP - h5tools_str_append(&buffer, "%s %s", VDS_MAPPING, BEGIN); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ssize_out = H5Pget_virtual_filename(dcpl_id, next, NULL, 0); + H5Pget_virtual_filename(dcpl_id, next, name, sizeof(name)); + ssize_out = H5Pget_virtual_dsetname(dcpl_id, next, NULL, 0); + H5Pget_virtual_dsetname(dcpl_id, next, dsetname, sizeof(dsetname)); - ctx->indent_level++; -*/ - for(next = 0; next < (unsigned)vmaps; next++) { - hid_t virtual_vspace = H5Pget_virtual_vspace(dcpl_id, next); - hid_t virtual_srcspace = H5Pget_virtual_srcspace(dcpl_id, next); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualfilenamebegin); + h5tools_str_append(&buffer, "%s", name); + h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualfilenameend); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - h5tools_str_reset(&buffer); - h5tools_print_virtual_selection(&buffer, info, virtual_vspace, dcpl_id, next); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ssize_out = H5Pget_virtual_filename(dcpl_id, next, NULL, 0); - H5Pget_virtual_filename(dcpl_id, next, name, sizeof(name)); - ssize_out = H5Pget_virtual_dsetname(dcpl_id, next, NULL, 0); - H5Pget_virtual_dsetname(dcpl_id, next, dsetname, sizeof(dsetname)); + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnamebegin); + h5tools_str_append(&buffer, "%s", dsetname); + h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnameend); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s ", h5tools_dump_header_format->virtualfilenamebegin); - h5tools_str_append(&buffer, "%s", name); - h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualfilenameend); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_reset(&buffer); + h5tools_print_virtual_selection(&buffer, info, virtual_srcspace, dcpl_id, next); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + ctx->indent_level--; - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s ", h5tools_dump_header_format->virtualdatasetnamebegin); - h5tools_str_append(&buffer, "%s", dsetname); - h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnameend); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", END); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + } + ctx->indent_level--; + } ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_print_virtual_selection(&buffer, info, virtual_srcspace, dcpl_id, next); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_append(&buffer, "%s", END); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); } -/* EIP - ctx->indent_level--; -*/ - - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + break; + default: h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - - ctx->indent_level--; - } + h5tools_str_append(&buffer, "%s", "Unknown layout"); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + }/*switch*/ - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - - ctx->indent_level--; - } + ctx->indent_level--; ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); + h5tools_str_append(&buffer, "%s", END); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); /*------------------------------------------------------------------------- @@ -3274,7 +3242,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts, cd_values, sizeof(f_name), f_name, NULL); - if (filtn<0) + if (filtn < 0) continue; /* nothing to print for invalid filter */ ctx->need_prefix = TRUE; @@ -3295,70 +3263,68 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); break; case H5Z_FILTER_SZIP: - { - szip_options_mask = cd_values[0];; - szip_pixels_per_block = cd_values[1]; + szip_options_mask = cd_values[0];; + szip_pixels_per_block = cd_values[1]; - h5tools_str_append(&buffer, "%s %s",SZIP, BEGIN); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_append(&buffer, "%s %s", SZIP, BEGIN); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - ctx->indent_level++; + ctx->indent_level++; - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "PIXELS_PER_BLOCK %d", szip_pixels_per_block); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - if(szip_options_mask & H5_SZIP_CHIP_OPTION_MASK) - h5tools_str_append(&buffer, "MODE %s", "HARDWARE"); - else if(szip_options_mask & H5_SZIP_ALLOW_K13_OPTION_MASK) - h5tools_str_append(&buffer, "MODE %s", "K13"); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "PIXELS_PER_BLOCK %d", szip_pixels_per_block); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - if(szip_options_mask & H5_SZIP_EC_OPTION_MASK) - h5tools_str_append(&buffer, "CODING %s", "ENTROPY"); - else if(szip_options_mask & H5_SZIP_NN_OPTION_MASK) - h5tools_str_append(&buffer, "CODING %s", "NEAREST NEIGHBOUR"); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - if(szip_options_mask & H5_SZIP_LSB_OPTION_MASK) - h5tools_str_append(&buffer, "BYTE_ORDER %s", "LSB"); - else if(szip_options_mask & H5_SZIP_MSB_OPTION_MASK) - h5tools_str_append(&buffer, "BYTE_ORDER %s", "MSB"); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_reset(&buffer); + if(szip_options_mask & H5_SZIP_CHIP_OPTION_MASK) + h5tools_str_append(&buffer, "MODE %s", "HARDWARE"); + else if(szip_options_mask & H5_SZIP_ALLOW_K13_OPTION_MASK) + h5tools_str_append(&buffer, "MODE %s", "K13"); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - if(szip_options_mask & H5_SZIP_RAW_OPTION_MASK) { - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "HEADER %s", "RAW"); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - } + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->indent_level--; + h5tools_str_reset(&buffer); + if(szip_options_mask & H5_SZIP_EC_OPTION_MASK) + h5tools_str_append(&buffer, "CODING %s", "ENTROPY"); + else if(szip_options_mask & H5_SZIP_NN_OPTION_MASK) + h5tools_str_append(&buffer, "CODING %s", "NEAREST NEIGHBOUR"); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_str_reset(&buffer); + if(szip_options_mask & H5_SZIP_LSB_OPTION_MASK) + h5tools_str_append(&buffer, "BYTE_ORDER %s", "LSB"); + else if(szip_options_mask & H5_SZIP_MSB_OPTION_MASK) + h5tools_str_append(&buffer, "BYTE_ORDER %s", "MSB"); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + + if(szip_options_mask & H5_SZIP_RAW_OPTION_MASK) { ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); + h5tools_str_append(&buffer, "HEADER %s", "RAW"); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); } + + ctx->indent_level--; + + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", END); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); break; case H5Z_FILTER_NBIT: h5tools_str_append(&buffer, "%s", NBIT); @@ -3369,7 +3335,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); break; default: - /* filter do not have to be avaiable for showing registered filter info. + /* filters do not have to be available for showing registered filter info. see HDFFV-8346 for details. --xcao@hdfgroup.org if(H5Zfilter_avail(filtn)) h5tools_str_append(&buffer, "%s %s", "USER_REGISTERED_FILTER", BEGIN); diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index d0ecc6e..45424f6 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -469,7 +469,7 @@ h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : ")-(", ptdata[i * 2 * ndims + j + ndims]); - h5tools_str_append(str, ") "); + h5tools_str_append(str, ")"); } HDfree(ptdata); -- cgit v0.12 From a726992cd88fd43f8daa46e057618138ed310795 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Mon, 2 Mar 2015 16:32:27 -0500 Subject: [svn-r26342] Added usage of the new H5S*_regular_hyperslab functions. Tested on jam. --- examples/h5_vds.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/examples/h5_vds.c b/examples/h5_vds.c index dea2ee6..ed6fa55 100644 --- a/examples/h5_vds.c +++ b/examples/h5_vds.c @@ -53,6 +53,10 @@ main (void) stride[2], count[2], block[2]; + hsize_t start_out[2], + stride_out[2], + count_out[2], + block_out[2]; int wdata[DIM0], /* Write buffer for source dataset */ rdata[VDSDIM0][VDSDIM1], /* Read buffer for virtual dataset */ i, j, k, l; @@ -183,6 +187,14 @@ main (void) printf("%d,", (int)buf[RANK2+k]); printf("%d)\n", (int)buf[RANK2+k]); } + /* We also can use new APIs to get start, stride, count and block */ + if (H5Sis_regular_hyperslab(vspace)) { + status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out); + printf("start = [%d, %d] \n", (int)start_out[0], (int)start_out[1]); + printf("stride = [%d, %d] \n", (int)stride_out[0], (int)stride_out[1]); + printf("count = [%d, %d] \n", (int)count_out[0], (int)count_out[1]); + printf("block = [%d, %d] \n", (int)block_out[0], (int)block_out[1]); + } } /* Get source file name. */ len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0); -- cgit v0.12 From 56f74066712e0d61092f9281b99de990ea92eea2 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Mon, 2 Mar 2015 16:34:39 -0500 Subject: [svn-r26343] Improved output. --- examples/h5_vds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/h5_vds.c b/examples/h5_vds.c index ed6fa55..6a20ed3 100644 --- a/examples/h5_vds.c +++ b/examples/h5_vds.c @@ -190,10 +190,10 @@ main (void) /* We also can use new APIs to get start, stride, count and block */ if (H5Sis_regular_hyperslab(vspace)) { status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out); - printf("start = [%d, %d] \n", (int)start_out[0], (int)start_out[1]); - printf("stride = [%d, %d] \n", (int)stride_out[0], (int)stride_out[1]); - printf("count = [%d, %d] \n", (int)count_out[0], (int)count_out[1]); - printf("block = [%d, %d] \n", (int)block_out[0], (int)block_out[1]); + printf(" start = [%d, %d] \n", (int)start_out[0], (int)start_out[1]); + printf(" stride = [%d, %d] \n", (int)stride_out[0], (int)stride_out[1]); + printf(" count = [%d, %d] \n", (int)count_out[0], (int)count_out[1]); + printf(" block = [%d, %d] \n", (int)block_out[0], (int)block_out[1]); } } /* Get source file name. */ -- cgit v0.12 From 79771d3fac06f99485a8201782b638e4c812f0a0 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 3 Mar 2015 12:32:22 -0500 Subject: [svn-r26346] Add more test cases, refactor test code to reduce code duplication. Minor fixes in src. Note make check still fails in h5ls test. Tested: ummon --- src/H5Dlayout.c | 2 +- src/H5Dvirtual.c | 2 +- test/vds.c | 718 +++++++++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 617 insertions(+), 105 deletions(-) diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index c0e1b20..4da0443 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -452,7 +452,7 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t { size_t i; - HDassert(!dataset->shared->layout.storage.u.virt.list == (dataset->shared->layout.storage.u.virt.list_nused == 0)); + HDassert(dataset->shared->layout.storage.u.virt.list || (dataset->shared->layout.storage.u.virt.list_nused == 0)); /* Patch the virtual selection dataspaces */ for(i = 0; i < dataset->shared->layout.storage.u.virt.list_nused; i++) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 7e74af7..1bc4b75 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -239,7 +239,7 @@ H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* check args */ HDassert(f); diff --git a/test/vds.c b/test/vds.c index 42f3f06..039bdc1 100644 --- a/test/vds.c +++ b/test/vds.c @@ -43,6 +43,262 @@ const char *FILENAME[] = { /*------------------------------------------------------------------------- + * Function: vds_select_equal + * + * Purpose: Helper function to check if the selections in the two + * provided dataspaces are the same. + * + * Return: Success: 0 + * + * Failure: -1 + * + * Programmer: Neil Fortner + * Monday, March 2, 2015 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static htri_t +vds_select_equal(hid_t space1, hid_t space2) +{ + H5S_sel_type type1; + H5S_sel_type type2; + hsize_t *buf1 = NULL; + hsize_t *buf2 = NULL; + size_t i; + htri_t ret_value = TRUE; + + /* Get and compare selection types */ + if((type1 = H5Sget_select_type(space1)) < 0) + TEST_ERROR + if((type2 = H5Sget_select_type(space2)) < 0) + TEST_ERROR + if(type1 != type2) + return FALSE; + + /* Check selection type */ + switch(type1) { + case H5S_SEL_NONE: + case H5S_SEL_ALL: + break; + + case H5S_SEL_POINTS: + { + int rank1; + int rank2; + hssize_t npoints1; + hssize_t npoints2; + + /* Get and compare rank */ + if((rank1 = H5Sget_simple_extent_ndims(space1)) < 0) + TEST_ERROR + if((rank2 = H5Sget_simple_extent_ndims(space2)) < 0) + TEST_ERROR + if(rank1 != rank2) + return FALSE; + + /* Get and compare number of points */ + if((npoints1 = H5Sget_select_elem_npoints(space1)) < 0) + TEST_ERROR + if((npoints2 = H5Sget_select_elem_npoints(space2)) < 0) + TEST_ERROR + if(npoints1 != npoints2) + return FALSE; + + /* Allocate point lists. Do not return directly afer + * allocating, to make sure buffers are freed. */ + if(NULL == (buf1 = (hsize_t *)HDmalloc((size_t)rank1 * (size_t)npoints1 * sizeof(hsize_t)))) + TEST_ERROR + if(NULL == (buf2 = (hsize_t *)HDmalloc((size_t)rank1 * (size_t)npoints1 * sizeof(hsize_t)))) + TEST_ERROR + + /* Get and compare point lists */ + if(H5Sget_select_elem_pointlist(space1, (hsize_t)0, (hsize_t)npoints1, buf1) < 0) + TEST_ERROR + if(H5Sget_select_elem_pointlist(space2, (hsize_t)0, (hsize_t)npoints1, buf2) < 0) + TEST_ERROR + for(i = 0; i < ((size_t)rank1 * (size_t)npoints1); i++) + if(buf1[i] != buf2[i]) { + ret_value = FALSE; + break; + } /* end if */ + + /* Free buffers */ + HDfree(buf1); + buf1 = NULL; + HDfree(buf2); + buf2 = NULL; + } /* end block */ + + break; + + case H5S_SEL_HYPERSLABS: + { + int rank1; + int rank2; + hssize_t nblocks1; + hssize_t nblocks2; + + /* Get and compare rank */ + if((rank1 = H5Sget_simple_extent_ndims(space1)) < 0) + TEST_ERROR + if((rank2 = H5Sget_simple_extent_ndims(space2)) < 0) + TEST_ERROR + if(rank1 != rank2) + return FALSE; + + /* Get and compare number of blocks */ + if((nblocks1 = H5Sget_select_hyper_nblocks(space1)) < 0) + TEST_ERROR + if((nblocks2 = H5Sget_select_hyper_nblocks(space2)) < 0) + TEST_ERROR + if(nblocks1 != nblocks2) + return FALSE; + + /* Allocate block lists. Do not return directly afer + * allocating, to make sure buffers are freed. */ + if(NULL == (buf1 = (hsize_t *)HDmalloc((size_t)2 * (size_t)rank1 * (size_t)nblocks1 * sizeof(*buf1)))) + TEST_ERROR + if(NULL == (buf2 = (hsize_t *)HDmalloc((size_t)2 * (size_t)rank1 * (size_t)nblocks1 * sizeof(*buf2)))) + TEST_ERROR + + /* Get and compare block lists */ + if(H5Sget_select_hyper_blocklist(space1, (hsize_t)0, (hsize_t)nblocks1, buf1) < 0) + TEST_ERROR + if(H5Sget_select_hyper_blocklist(space2, (hsize_t)0, (hsize_t)nblocks1, buf2) < 0) + TEST_ERROR + for(i = 0; i < ((size_t)2 * (size_t)rank1 * (size_t)nblocks1); i++) + if(buf1[i] != buf2[i]) { + ret_value = FALSE; + break; + } /* end if */ + + /* Free buffers */ + HDfree(buf1); + buf1 = NULL; + HDfree(buf2); + buf2 = NULL; + } /* end block */ + + break; + + case H5S_SEL_ERROR: + case H5S_SEL_N: + default: + TEST_ERROR + } /* end switch */ + + return ret_value; + +error: + if(buf1) + HDfree(buf1); + if(buf2) + HDfree(buf2); + + return -1; +} /* end vds_select_equal() */ + + +/*------------------------------------------------------------------------- + * Function: vds_check_mapping + * + * Purpose: Helper function to check if the ith virtual mapping in the + * provided dcpl is the same as that described by the other + * parameters. + * + * Return: Success: 0 + * + * Failure: -1 + * + * Programmer: Neil Fortner + * Monday, March 2, 2015 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static int +vds_check_mapping(hid_t dcpl, size_t i, hid_t vspace, hid_t srcspace, + const char *filename, const char *dsetname) +{ + hid_t space_out = -1; + char name_out[32]; + htri_t tri_ret; + ssize_t str_len; + + HDassert(dcpl >= 0); + HDassert(vspace >= 0); + HDassert(srcspace >= 0); + HDassert(filename); + HDassert(dsetname); + + /* Check vspace */ + if((space_out = H5Pget_virtual_vspace(dcpl, i)) < 0) + TEST_ERROR + if((tri_ret = H5Sextent_equal(space_out, vspace)) < 0) + TEST_ERROR + if(!tri_ret) + TEST_ERROR + if((tri_ret = vds_select_equal(space_out, vspace)) < 0) + TEST_ERROR + if(!tri_ret) + TEST_ERROR + if(H5Sclose(space_out) < 0) + TEST_ERROR + space_out = -1; + + /* Check srcspace */ + if((space_out = H5Pget_virtual_srcspace(dcpl, i)) < 0) + TEST_ERROR + if((tri_ret = vds_select_equal(space_out, srcspace)) < 0) + TEST_ERROR + if(!tri_ret) + TEST_ERROR + if(H5Sclose(space_out) < 0) + TEST_ERROR + space_out = -1; + + /* Check filename */ + if((str_len = H5Pget_virtual_filename(dcpl, i, NULL, (size_t)0)) < 0) + TEST_ERROR + if((size_t)str_len != HDstrlen(filename)) + TEST_ERROR + HDassert((size_t)str_len < sizeof(name_out)); + if((str_len = H5Pget_virtual_filename(dcpl, i, name_out, sizeof(name_out))) < 0) + TEST_ERROR + if((size_t)str_len != HDstrlen(filename)) + TEST_ERROR + if(HDstrncmp(name_out, filename, (size_t)str_len + 1) != 0) + TEST_ERROR + + /* Check dsetname */ + if((str_len = H5Pget_virtual_dsetname(dcpl, i, NULL, (size_t)0)) < 0) + TEST_ERROR + if((size_t)str_len != HDstrlen(dsetname)) + TEST_ERROR + HDassert((size_t)str_len < sizeof(name_out)); + if((str_len = H5Pget_virtual_dsetname(dcpl, i, name_out, sizeof(name_out))) < 0) + TEST_ERROR + if((size_t)str_len != HDstrlen(dsetname)) + TEST_ERROR + if(HDstrncmp(name_out, dsetname, (size_t)str_len + 1) != 0) + TEST_ERROR + + return 0; + +error: + H5E_BEGIN_TRY { + if(space_out >= 0) + (void)H5Sclose(space_out); + } H5E_END_TRY + + return -1; +} /* end vds_check_mapping() */ + + +/*------------------------------------------------------------------------- * Function: test_api * * Purpose: Tests API functions related to virtual datasets. @@ -149,7 +405,7 @@ test_api(test_api_config_t config, hid_t fapl) hid_t dcpl = -1; /* Dataset creation property list */ hid_t ex_dcpl = -1; /* Temporary dcpl for examination */ hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */ - hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */ + hid_t vspace[LIST_DOUBLE_SIZE]; /* Virtual dset dataspaces */ const char *src_file[4] = {"src_file1", "src_file2.", "src_file3..", "src_file4..."}; /* Source file names (different lengths) */ const char *src_dset[4] = {"src_dset1....", "src_dset2.....", "src_dset3......", "src_dset4......."}; /* Source dataset names (different lengths) */ char tmp_filename[32]; @@ -159,14 +415,14 @@ test_api(test_api_config_t config, hid_t fapl) hsize_t stride[2]; /* Hyperslab stride */ hsize_t count[2]; /* Hyperslab count */ hsize_t block[2]; /* Hyperslab block */ + hsize_t coord[10]; /* Point selection array */ size_t size_out; - ssize_t ssize_out; - hid_t space_out = -1; - char name_out[32]; - hsize_t blocklist[4]; - htri_t tri_ret; unsigned i; + /* Initialize vspace */ + for(i = 0; i < (unsigned)(sizeof(vspace) / sizeof(vspace[0])); i++) + vspace[i] = -1; + switch(config) { case TEST_API_BASIC: TESTING("virtual dataset API functions") @@ -194,6 +450,7 @@ test_api(test_api_config_t config, hid_t fapl) if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR + /* * Test 1: All - all selection */ @@ -222,55 +479,224 @@ test_api(test_api_config_t config, hid_t fapl) /* Test H5Pget_virtual_count */ if(H5Pget_virtual_count(ex_dcpl, &size_out) < 0) TEST_ERROR - if(size_out != 1) + if(size_out != (size_t)1) + TEST_ERROR + + /* Check that the mapping in the DCPL is correct */ + if(vds_check_mapping(ex_dcpl, (size_t)0, vspace[0], srcspace[0], src_file[0], src_dset[0]) < 0) + TEST_ERROR + + /* Close */ + if(H5Sclose(srcspace[0]) < 0) TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + if(H5Pclose(ex_dcpl) < 0) + TEST_ERROR + ex_dcpl = -1; - /* Test H5Pget_virtual_vspace */ - if((space_out = H5Pget_virtual_vspace(ex_dcpl, 0)) < 0) + + /* + * Test 2: Hyper - hyper selection + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) TEST_ERROR - if((tri_ret = H5Sextent_equal(space_out, vspace[0])) < 0) + + /* Create source dataspace */ + if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR - if(!tri_ret) + + /* Create virtual dataspace */ + if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR - if(H5Sget_select_type(space_out) != H5S_SEL_ALL) + + /* Select regular hyperslab in source space */ + start[0] = 2; + start[1] = 1; + stride[0] = 3; + stride[1] = 5; + count[0] = 2; + count[1] = 3; + block[0] = 2; + block[1] = 4; + if(H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) TEST_ERROR - if(H5Sclose(space_out) < 0) + + /* Select composite hyperslab in virtual space */ + count[0] = 1; + count[1] = 1; + block[0] = 5; + block[1] = 6; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, block) < 0) + TEST_ERROR + start[0] = 7; + start[1] = 0; + block[0] = 1; + block[1] = 18; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, NULL, count, block) < 0) TEST_ERROR - space_out = -1; - /* Test H5Pget_virtual_srcspace */ - if((space_out = H5Pget_virtual_srcspace(ex_dcpl, 0)) < 0) + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace[0], src_file[0], src_dset[0], srcspace[0]) < 0) TEST_ERROR - if(H5Sget_select_type(space_out) != H5S_SEL_ALL) + + /* Get examination DCPL */ + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) TEST_ERROR - if(H5Sclose(space_out) < 0) + + /* Test H5Pget_virtual_count */ + if(H5Pget_virtual_count(ex_dcpl, &size_out) < 0) + TEST_ERROR + if(size_out != (size_t)1) TEST_ERROR - space_out = -1; - /* Test H5Pget_virtual_filename */ - if((ssize_out = H5Pget_virtual_filename(ex_dcpl, 0, NULL, 0)) < 0) + /* Check that the mapping in the DCPL is correct */ + if(vds_check_mapping(ex_dcpl, (size_t)0, vspace[0], srcspace[0], src_file[0], src_dset[0]) < 0) TEST_ERROR - if((size_t)ssize_out != HDstrlen(src_file[0])) + + /* Close */ + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + if(H5Pclose(ex_dcpl) < 0) + TEST_ERROR + ex_dcpl = -1; + + + /* + * Test 3: Point - point selection + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create source dataspace */ + if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Create virtual dataspace */ + if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select points in source space */ + coord[0] = 5; + coord[1] = 15; + coord[2] = 7; + coord[3] = 19; + coord[4] = 8; + coord[5] = 0; + coord[6] = 2; + coord[7] = 14; + coord[8] = 8; + coord[9] = 18; + if(H5Sselect_elements(srcspace[0], H5S_SELECT_SET, (size_t)5, coord) < 0) + TEST_ERROR + + /* Select points in virtual space */ + coord[0] = 3; + coord[1] = 12; + coord[2] = 7; + coord[3] = 11; + coord[4] = 4; + coord[5] = 9; + coord[6] = 7; + coord[7] = 11; + coord[8] = 5; + coord[9] = 5; + if(H5Sselect_elements(vspace[0], H5S_SELECT_SET, (size_t)5, coord) < 0) + TEST_ERROR + + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace[0], src_file[0], src_dset[0], srcspace[0]) < 0) + TEST_ERROR + + /* Get examination DCPL */ + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + TEST_ERROR + + /* Test H5Pget_virtual_count */ + if(H5Pget_virtual_count(ex_dcpl, &size_out) < 0) + TEST_ERROR + if(size_out != (size_t)1) + TEST_ERROR + + /* Check that the mapping in the DCPL is correct */ + if(vds_check_mapping(ex_dcpl, (size_t)0, vspace[0], srcspace[0], src_file[0], src_dset[0]) < 0) + TEST_ERROR + + /* Close */ + if(H5Sclose(srcspace[0]) < 0) TEST_ERROR - HDassert((size_t)ssize_out < sizeof(name_out)); - if((ssize_out = H5Pget_virtual_filename(ex_dcpl, 0, name_out, sizeof(name_out))) < 0) + srcspace[0] = -1; + if(H5Sclose(vspace[0]) < 0) TEST_ERROR - if((size_t)ssize_out != HDstrlen(src_file[0])) + vspace[0] = -1; + if(H5Pclose(ex_dcpl) < 0) TEST_ERROR - if(HDstrncmp(name_out, src_file[0], (size_t)ssize_out + 1) != 0) + ex_dcpl = -1; + + + /* + * Test 4: Point - hyper selection + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) TEST_ERROR - /* Test H5Pget_virtual_dsetname */ - if((ssize_out = H5Pget_virtual_dsetname(ex_dcpl, 0, NULL, 0)) < 0) + /* Create source dataspace */ + if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR - if((size_t)ssize_out != HDstrlen(src_dset[0])) + + /* Create virtual dataspace */ + if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR - HDassert((size_t)ssize_out < sizeof(name_out)); - if((ssize_out = H5Pget_virtual_dsetname(ex_dcpl, 0, name_out, sizeof(name_out))) < 0) + + /* Select hyperslab in source space */ + start[0] = 2; + start[1] = 7; + count[0] = 1; + count[1] = 1; + block[0] = 1; + block[1] = 5; + if(H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, block) < 0) TEST_ERROR - if((size_t)ssize_out != HDstrlen(src_dset[0])) + + /* Select points in virtual space */ + coord[0] = 1; + coord[1] = 1; + coord[2] = 4; + coord[3] = 17; + coord[4] = 3; + coord[5] = 9; + coord[6] = 5; + coord[7] = 13; + coord[8] = 7; + coord[9] = 16; + if(H5Sselect_elements(vspace[0], H5S_SELECT_SET, (size_t)5, coord) < 0) TEST_ERROR - if(HDstrncmp(name_out, src_dset[0], (size_t)ssize_out + 1) != 0) + + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace[0], src_file[0], src_dset[0], srcspace[0]) < 0) + TEST_ERROR + + /* Get examination DCPL */ + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + TEST_ERROR + + /* Test H5Pget_virtual_count */ + if(H5Pget_virtual_count(ex_dcpl, &size_out) < 0) + TEST_ERROR + if(size_out != (size_t)1) + TEST_ERROR + + /* Check that the mapping in the DCPL is correct */ + if(vds_check_mapping(ex_dcpl, (size_t)0, vspace[0], srcspace[0], src_file[0], src_dset[0]) < 0) TEST_ERROR /* Close */ @@ -286,6 +712,142 @@ test_api(test_api_config_t config, hid_t fapl) /* + * Test 5: All previous mappings together + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create dataspaces */ + for(i = 0; i < 4; i++) { + /* Create source dataspace */ + if((srcspace[i] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Create virtual dataspace */ + if((vspace[i] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + } /* end for */ + + /* Select all (should not be necessary, but just to be sure) */ + if(H5Sselect_all(srcspace[0]) < 0) + TEST_ERROR + if(H5Sselect_all(vspace[0]) < 0) + TEST_ERROR + + /* Select regular hyperslab in source space */ + start[0] = 2; + start[1] = 1; + stride[0] = 3; + stride[1] = 5; + count[0] = 2; + count[1] = 3; + block[0] = 2; + block[1] = 4; + if(H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + + /* Select composite hyperslab in virtual space */ + count[0] = 1; + count[1] = 1; + block[0] = 5; + block[1] = 6; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, block) < 0) + TEST_ERROR + start[0] = 7; + start[1] = 0; + block[0] = 1; + block[1] = 18; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, NULL, count, block) < 0) + TEST_ERROR + + /* Select points in source space */ + coord[0] = 5; + coord[1] = 15; + coord[2] = 7; + coord[3] = 19; + coord[4] = 8; + coord[5] = 0; + coord[6] = 2; + coord[7] = 14; + coord[8] = 8; + coord[9] = 18; + if(H5Sselect_elements(srcspace[2], H5S_SELECT_SET, (size_t)5, coord) < 0) + TEST_ERROR + + /* Select points in virtual space */ + coord[0] = 3; + coord[1] = 12; + coord[2] = 7; + coord[3] = 11; + coord[4] = 4; + coord[5] = 9; + coord[6] = 7; + coord[7] = 11; + coord[8] = 5; + coord[9] = 5; + if(H5Sselect_elements(vspace[2], H5S_SELECT_SET, (size_t)5, coord) < 0) + TEST_ERROR + + /* Select hyperslab in source space */ + start[0] = 2; + start[1] = 7; + count[0] = 1; + count[1] = 1; + block[0] = 1; + block[1] = 5; + if(H5Sselect_hyperslab(srcspace[3], H5S_SELECT_SET, start, NULL, count, block) < 0) + TEST_ERROR + + /* Select points in virtual space */ + coord[0] = 1; + coord[1] = 1; + coord[2] = 4; + coord[3] = 17; + coord[4] = 3; + coord[5] = 9; + coord[6] = 5; + coord[7] = 13; + coord[8] = 7; + coord[9] = 16; + if(H5Sselect_elements(vspace[3], H5S_SELECT_SET, (size_t)5, coord) < 0) + TEST_ERROR + + /* Add virtual layout mappings */ + for(i = 0; i < 4; i++) + if(H5Pset_virtual(dcpl, vspace[i], src_file[i], src_dset[i], srcspace[i]) < 0) + TEST_ERROR + + /* Get examination DCPL */ + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + TEST_ERROR + + /* Test H5Pget_virtual_count */ + if(H5Pget_virtual_count(ex_dcpl, &size_out) < 0) + TEST_ERROR + if(size_out != (size_t)4) + TEST_ERROR + + /* Check that the mappings in the DCPL are correct */ + for(i = 0; i < 4; i++) + if(vds_check_mapping(ex_dcpl, (size_t)i, vspace[i], srcspace[i], src_file[i], src_dset[i]) < 0) + TEST_ERROR + + /* Close */ + for(i = 0; i < 4; i++) { + if(H5Sclose(srcspace[i]) < 0) + TEST_ERROR + srcspace[i] = -1; + if(H5Sclose(vspace[i]) < 0) + TEST_ERROR + vspace[i] = -1; + } /* end for */ + if(H5Pclose(ex_dcpl) < 0) + TEST_ERROR + ex_dcpl = -1; + + + /* * Test X: Enough Selections to trigger doubling of mapping list */ /* Clear virtual layout in DCPL */ @@ -301,10 +863,8 @@ test_api(test_api_config_t config, hid_t fapl) if(H5Sselect_all(srcspace[0]) < 0) TEST_ERROR - /* Create virtual dataspace */ + /* Init virtual space extent */ dims[0] = LIST_DOUBLE_SIZE; - if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR /* Init hyperslab values */ start[0] = 0; @@ -316,9 +876,13 @@ test_api(test_api_config_t config, hid_t fapl) /* Build virtual layout */ for(i = 0; i < LIST_DOUBLE_SIZE; i++) { + /* Create virtual dataspace */ + if((vspace[i] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + /* Select row in virual dataspace */ start[0] = (hsize_t)i; - if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, block) < 0) + if(H5Sselect_hyperslab(vspace[i], H5S_SELECT_SET, start, NULL, count, block) < 0) TEST_ERROR /* Create file and dataset names */ @@ -328,7 +892,7 @@ test_api(test_api_config_t config, hid_t fapl) tmp_dsetname[sizeof(tmp_dsetname) - 1] = '\0'; /* Add virtual layout mapping */ - if(H5Pset_virtual(dcpl, vspace[0], tmp_filename, tmp_dsetname, srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[i], tmp_filename, tmp_dsetname, srcspace[0]) < 0) TEST_ERROR } /* end if */ @@ -339,75 +903,21 @@ test_api(test_api_config_t config, hid_t fapl) /* Test H5Pget_virtual_count */ if(H5Pget_virtual_count(ex_dcpl, &size_out) < 0) TEST_ERROR - if(size_out != LIST_DOUBLE_SIZE) + if(size_out != (size_t)LIST_DOUBLE_SIZE) TEST_ERROR /* Verify virtual layout */ for(i = 0; i < LIST_DOUBLE_SIZE; i++) { - /* Test H5Pget_virtual_vspace */ - if((space_out = H5Pget_virtual_vspace(ex_dcpl, i)) < 0) - TEST_ERROR - if((tri_ret = H5Sextent_equal(space_out, vspace[0])) < 0) - TEST_ERROR - if(!tri_ret) - TEST_ERROR - if(H5Sget_select_type(space_out) != H5S_SEL_HYPERSLABS) - TEST_ERROR - if((ssize_out = H5Sget_select_hyper_nblocks(space_out)) < 0) - TEST_ERROR - if(ssize_out != 1) - TEST_ERROR - if(H5Sget_select_hyper_blocklist(space_out, 0, 1, blocklist) < 0) - TEST_ERROR - if(blocklist[0] != (hsize_t)i) - TEST_ERROR - if(blocklist[1] != 0) - TEST_ERROR - if(blocklist[2] != (hsize_t)i) - TEST_ERROR - if(blocklist[3] != 19) - TEST_ERROR - if(H5Sclose(space_out) < 0) - TEST_ERROR - space_out = -1; - - /* Test H5Pget_virtual_srcspace */ - if((space_out = H5Pget_virtual_srcspace(ex_dcpl, i)) < 0) - TEST_ERROR - if(H5Sget_select_type(space_out) != H5S_SEL_ALL) - TEST_ERROR - if(H5Sclose(space_out) < 0) - TEST_ERROR - space_out = -1; - - /* Test H5Pget_virtual_filename */ + /* Generate source file name */ (void)HDsnprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i); tmp_filename[sizeof(tmp_filename) - 1] = '\0'; - if((ssize_out = H5Pget_virtual_filename(ex_dcpl, i, NULL, 0)) < 0) - TEST_ERROR - if((size_t)ssize_out != HDstrlen(tmp_filename)) - TEST_ERROR - HDassert((size_t)ssize_out < sizeof(name_out)); - if((ssize_out = H5Pget_virtual_filename(ex_dcpl, i, name_out, sizeof(name_out))) < 0) - TEST_ERROR - if((size_t)ssize_out != HDstrlen(tmp_filename)) - TEST_ERROR - if(HDstrncmp(name_out, tmp_filename, (size_t)ssize_out + 1) != 0) - TEST_ERROR - /* Test H5Pget_virtual_dsetname */ + /* Generate source dset name */ (void)HDsnprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i); tmp_dsetname[sizeof(tmp_dsetname) - 1] = '\0'; - if((ssize_out = H5Pget_virtual_dsetname(ex_dcpl, i, NULL, 0)) < 0) - TEST_ERROR - if((size_t)ssize_out != HDstrlen(tmp_dsetname)) - TEST_ERROR - HDassert((size_t)ssize_out < sizeof(name_out)); - if((ssize_out = H5Pget_virtual_dsetname(ex_dcpl, i, name_out, sizeof(name_out))) < 0) - TEST_ERROR - if((size_t)ssize_out != HDstrlen(tmp_dsetname)) - TEST_ERROR - if(HDstrncmp(name_out, tmp_dsetname, (size_t)ssize_out + 1) != 0) + + /* Check that the mapping in the DCPL is correct */ + if(vds_check_mapping(ex_dcpl, (size_t)i, vspace[i], srcspace[0], tmp_filename, tmp_dsetname) < 0) TEST_ERROR } /* end if */ @@ -415,9 +925,11 @@ test_api(test_api_config_t config, hid_t fapl) if(H5Sclose(srcspace[0]) < 0) TEST_ERROR srcspace[0] = -1; - if(H5Sclose(vspace[0]) < 0) - TEST_ERROR - vspace[0] = -1; + for(i = 0; i < LIST_DOUBLE_SIZE; i++) { + if(H5Sclose(vspace[i]) < 0) + TEST_ERROR + vspace[i] = -1; + } /* end for */ if(H5Pclose(ex_dcpl) < 0) TEST_ERROR ex_dcpl = -1; @@ -436,11 +948,11 @@ error: for(i = 0; i < (sizeof(srcspace) / sizeof(srcspace[0])); i++) { if(srcspace[i] >= 0) (void)H5Sclose(srcspace[i]); + } /* end for */ + for(i = 0; i < (sizeof(vspace) / sizeof(vspace[0])); i++) { if(vspace[i] >= 0) (void)H5Sclose(vspace[i]); } /* end for */ - if(space_out >= 0) - (void)H5Sclose(space_out); if(dcpl >= 0) (void)H5Pclose(dcpl); if(ex_dcpl >= 0) -- cgit v0.12 From f1c4d0ff3fbdfcebf3a22a24c26f1d69ecb3a5fe Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 4 Mar 2015 08:34:24 -0500 Subject: [svn-r26352] Update h5dump to latest BNF - reg vs irreg hyperslabs. --- tools/lib/h5tools.h | 5 +++- tools/lib/h5tools_dump.c | 28 +++++++++++------- tools/lib/h5tools_str.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++-- tools/lib/h5tools_str.h | 1 + 4 files changed, 96 insertions(+), 13 deletions(-) diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 323425f..7ed60e8 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -94,8 +94,11 @@ #define PACKED_OFFSET "OFFSET" #define PACKED_LENGTH "LENGTH" #define VDS_VIRTUAL "VIRTUAL" -#define VDS_HYPERSLAB "HYPERSLAB" +#define VDS_REG_HYPERSLAB "REGULAR_HYPERSLAB" +#define VDS_IRR_HYPERSLAB "IRREGULAR_HYPERSLAB" #define VDS_POINT "POINT" +#define VDS_SRC_FILE "SRC_FILE" +#define VDS_SRC_DATASET "SRC_DATASET" #define BEGIN "{" #define END "}" diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 84318a1..3fee4d1 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -225,7 +225,8 @@ void h5tools_print_dims(h5tools_str_t *buffer, hsize_t *s, int dims); void h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, struct subset_t *sset, int dims); -void h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *info, hid_t vspace, hid_t dcpl_id, size_t index); +void h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *info, h5tools_context_t *ctx, + hid_t vspace, hid_t dcpl_id, size_t index); void h5tools_dump_init(void) @@ -2861,9 +2862,10 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, *------------------------------------------------------------------------- */ void -h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *info, hid_t vspace, hid_t dcpl_id, size_t index) +h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *info, h5tools_context_t *ctx, + hid_t vspace, hid_t dcpl_id, size_t index) { - h5tools_str_append(buffer, "%s ", h5tools_dump_header_format->virtualselectionbegin); + h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionbegin); switch(H5Sget_select_type(vspace)) { case H5S_SEL_NONE: /* Nothing selected */ h5tools_str_append(buffer, "NONE"); @@ -2874,9 +2876,15 @@ h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *in h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */ - h5tools_str_append(buffer, "%s %s ", VDS_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin); - h5tools_str_dump_space_blocks(buffer, vspace, info); - h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionblockend); + if (H5Sis_regular_hyperslab(vspace)) { + h5tools_str_append(buffer, "%s %s ", VDS_REG_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin); + h5tools_str_dump_space_slabs(buffer, vspace, info, ctx); + } + else { + h5tools_str_append(buffer, "%s %s ", VDS_IRR_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin); + h5tools_str_dump_space_blocks(buffer, vspace, info); + } + h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_ALL: /* Entire extent selected */ h5tools_str_append(buffer, "ALL"); @@ -3154,7 +3162,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; h5tools_str_reset(&buffer); - h5tools_print_virtual_selection(&buffer, info, virtual_vspace, dcpl_id, next); + h5tools_print_virtual_selection(&buffer, info, ctx, virtual_vspace, dcpl_id, next); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ssize_out = H5Pget_virtual_filename(dcpl_id, next, NULL, 0); @@ -3166,7 +3174,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualfilenamebegin); + h5tools_str_append(&buffer, "%s %s", VDS_SRC_FILE, h5tools_dump_header_format->virtualfilenamebegin); h5tools_str_append(&buffer, "%s", name); h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualfilenameend); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); @@ -3175,7 +3183,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnamebegin); + h5tools_str_append(&buffer, "%s %s", VDS_SRC_DATASET, h5tools_dump_header_format->virtualdatasetnamebegin); h5tools_str_append(&buffer, "%s", dsetname); h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnameend); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); @@ -3184,7 +3192,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_print_virtual_selection(&buffer, info, virtual_srcspace, dcpl_id, next); + h5tools_print_virtual_selection(&buffer, info, ctx, virtual_srcspace, dcpl_id, next); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->indent_level--; diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 45424f6..94b0ff2 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -416,7 +416,7 @@ h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info, } /*------------------------------------------------------------------------- - * Function: h5tools_str_dump_space_blocks + * Function: h5tools_str_dump_space_slabs * * Purpose: Prints information about a dataspace selection by appending * the information to the specified string. @@ -429,6 +429,78 @@ h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info, *------------------------------------------------------------------------- */ void +h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace, + const h5tool_format_t *info, h5tools_context_t *ctx) +{ + hsize_t *start; + hsize_t *stride; + hsize_t *count; + hsize_t *block; + int j; + int ndims = H5Sget_simple_extent_ndims(rspace); + + start = (hsize_t *)malloc(sizeof(hsize_t) * ndims); + stride = (hsize_t *)malloc(sizeof(hsize_t) * ndims); + count = (hsize_t *)malloc(sizeof(hsize_t) * ndims); + block = (hsize_t *)malloc(sizeof(hsize_t) * ndims); + + H5Sget_regular_hyperslab(rspace, start, stride, count, block); + + /* Print hyperslab information */ + h5tools_str_append(str, "%s", "\n"); + h5tools_str_indent(str, info, ctx); + + /* Start coordinates */ + h5tools_str_append(str, "%s ", START); + for (j = 0; j < ndims; j++) + h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", start[j]); + h5tools_str_append(str, ");"); + h5tools_str_append(str, "%s", "\n"); + h5tools_str_indent(str, info, ctx); + + /* Stride coordinates */ + h5tools_str_append(str, "%s ", STRIDE); + for (j = 0; j < ndims; j++) + h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", stride[j]); + h5tools_str_append(str, ");"); + h5tools_str_append(str, "%s", "\n"); + h5tools_str_indent(str, info, ctx); + + /* Count coordinates */ + h5tools_str_append(str, "%s ", COUNT); + for (j = 0; j < ndims; j++) + h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", count[j]); + h5tools_str_append(str, ");"); + h5tools_str_append(str, "%s", "\n"); + h5tools_str_indent(str, info, ctx); + + /* Block coordinates */ + h5tools_str_append(str, "%s ", BLOCK); + for (j = 0; j < ndims; j++) + h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", block[j]); + h5tools_str_append(str, ");"); + h5tools_str_append(str, "%s", "\n"); + h5tools_str_indent(str, info, ctx); + + HDfree(block); + HDfree(count); + HDfree(stride); + HDfree(start); +} + +/*------------------------------------------------------------------------- + * Function: h5tools_str_dump_space_blocks + * + * Purpose: Prints information about a dataspace selection by appending + * the information to the specified string. + * + * Return: none + * + * In/Out: + * h5tools_str_t *str + *------------------------------------------------------------------------- + */ +void h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, const h5tool_format_t *info) { @@ -485,7 +557,6 @@ h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, * Return: none * * In/Out: - * h5tools_context_t *ctx * h5tools_str_t *str *------------------------------------------------------------------------- */ diff --git a/tools/lib/h5tools_str.h b/tools/lib/h5tools_str.h index 8d4c042..6173b89 100644 --- a/tools/lib/h5tools_str.h +++ b/tools/lib/h5tools_str.h @@ -40,6 +40,7 @@ H5TOOLS_DLL char *h5tools_str_prefix(h5tools_str_t *str, const h5tool_format_ H5TOOLS_DLL char *h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info, hsize_t elmtno, hsize_t *ptdata, unsigned ndims, hsize_t max_idx[], h5tools_context_t *ctx); +H5TOOLS_DLL void h5tools_str_dump_space_slabs(h5tools_str_t *, hid_t, const h5tool_format_t *, h5tools_context_t *ctx); H5TOOLS_DLL void h5tools_str_dump_space_blocks(h5tools_str_t *, hid_t, const h5tool_format_t *); H5TOOLS_DLL void h5tools_str_dump_space_points(h5tools_str_t *, hid_t, const h5tool_format_t *); H5TOOLS_DLL void h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info, hid_t container, -- cgit v0.12 From 1aa5cd4fa5d87b0a46607caa6323c20f4b922cae Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 4 Mar 2015 09:08:58 -0500 Subject: [svn-r26353] Add VDS selection defines for ALL and NONE --- tools/lib/h5tools.h | 2 ++ tools/lib/h5tools_dump.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 7ed60e8..1ddc584 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -99,6 +99,8 @@ #define VDS_POINT "POINT" #define VDS_SRC_FILE "SRC_FILE" #define VDS_SRC_DATASET "SRC_DATASET" +#define VDS_NONE "SELECTION_NONE" +#define VDS_ALL "SELECTION_ALL" #define BEGIN "{" #define END "}" diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 3fee4d1..5e9cb4c 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2868,7 +2868,7 @@ h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *in h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionbegin); switch(H5Sget_select_type(vspace)) { case H5S_SEL_NONE: /* Nothing selected */ - h5tools_str_append(buffer, "NONE"); + h5tools_str_append(buffer, "%s", VDS_NONE); break; case H5S_SEL_POINTS: /* Sequence of points selected */ h5tools_str_append(buffer, "%s %s ", VDS_POINT, h5tools_dump_header_format->virtualselectionblockbegin); @@ -2887,7 +2887,7 @@ h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *in h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_ALL: /* Entire extent selected */ - h5tools_str_append(buffer, "ALL"); + h5tools_str_append(buffer, "%s", VDS_ALL); break; default: h5tools_str_append(buffer, "Unknown Selection"); -- cgit v0.12 From 026cf21de89aa4625a0fe53dfc3681605be0d35b Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Wed, 4 Mar 2015 12:03:32 -0500 Subject: [svn-r26357] Added mapping example for the Excalibur detector use case. --- examples/h5_vds-exc.c | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) create mode 100644 examples/h5_vds-exc.c diff --git a/examples/h5_vds-exc.c b/examples/h5_vds-exc.c new file mode 100644 index 0000000..124d22b --- /dev/null +++ b/examples/h5_vds-exc.c @@ -0,0 +1,212 @@ +/************************************************************ + + This example illustrates the concept of the virtual dataset. + Excalibur use case with k=2 and m=3. + This file is intended for use with HDF5 Library version 1.10 + + ************************************************************/ + +#include "hdf5.h" +#include +#include + +#define FILE "vds-excalibur.h5" +#define DATASET "VDS-excalibur" +#define VDSDIM1 6 +#define VDSDIM0 15 +#define KDIM0 2 +#define KDIM1 6 +#define NDIM0 3 +#define NDIM1 6 +#define RANK 3 + +const char *SRC_FILE[] = { + "a.h5", + "b.h5", + "c.h5", + "d.h5", + "e.h5", + "f.h5" +}; + +const char *SRC_DATASET[] = { + "A", + "B", + "C", + "D", + "E", + "F" +}; + +int +main (void) +{ + hid_t file, space, ksrc_space, nsrc_space, vspace, + src_space, + dset; /* Handles */ + hid_t dcpl; + herr_t status; + hsize_t vdsdims[3] = {0,VDSDIM0, VDSDIM1}, + vdsdims_max[3] = {H5S_UNLIMITED,VDSDIM0, VDSDIM1}, + kdims[3] = {0, KDIM0, KDIM1}, + kdims_max[3] = {H5S_UNLIMITED, KDIM0, KDIM1}, + ndims[3] = {0, NDIM0, NDIM1}, + ndims_max[3] = {H5S_UNLIMITED, NDIM0, NDIM1}, + start[3], /* Hyperslab parameters */ + stride[3], + count[3], + block[3]; + hsize_t start_out[3], + stride_out[3], + count_out[3], + block_out[3]; + int k = 2; + int n = 3; + int i; + H5D_layout_t layout; /* Storage layout */ + size_t num_map; /* Number of mappings */ + ssize_t len; /* Length of the string; also a return value */ + char *filename; + char *dsetname; + hsize_t nblocks; + hsize_t *buf; /* Buffer to hold hyperslab coordinates */ + + + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* Create VDS dataspace. */ + space = H5Screate_simple (RANK, vdsdims, vdsdims_max); + /* Create dataspaces for A, C, and E datasets. */ + ksrc_space = H5Screate_simple (RANK, kdims, kdims_max); + /* Create dataspaces for B, D, and F datasets. */ + nsrc_space = H5Screate_simple (RANK, ndims, ndims_max); + + /* Create VDS creation property */ + dcpl = H5Pcreate (H5P_DATASET_CREATE); + + /* Initialize hyperslab values */ + + start[0] = 0; + start[1] = 0; + start[2] = 0; + count[0] = H5S_UNLIMITED; + count[1] = 1; + count[2] = 1; + block[0] = 1; + block[1] = k; + block[2] = VDSDIM1; + + /* + * Build the mappings for A, C and E source datasets. + * + */ + for (i = 0; i < 3; i++) { + start[0] = (hsize_t)((k+n)*i); + status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block); + status = H5Pset_virtual (dcpl, space, SRC_FILE[2*i], SRC_DATASET[2*i], ksrc_space); + } + + /* Reinitialize block[1] */ + block[1] = n; + /* + * Build the mappings for B, D and F source datasets. + * + */ + for (i = 0; i < 3; i++) { + start[0] = (hsize_t)(k+(k+n)*i); + status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block); + status = H5Pset_virtual (dcpl, space, SRC_FILE[2*i+1], SRC_DATASET[2*i+1], nsrc_space); + } + + /* Create a virtual dataset */ + dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, + dcpl, H5P_DEFAULT); + status = H5Sclose (space); + status = H5Sclose (nsrc_space); + status = H5Sclose (ksrc_space); + status = H5Dclose (dset); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. + */ + + /* + * Open file and dataset using the default properties. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + + /* + * Get creation property list and mapping properties. + */ + dcpl = H5Dget_create_plist (dset); + + /* + * Get storage layout. + */ + layout = H5Pget_layout (dcpl); + + if (H5D_VIRTUAL == layout) + printf(" Dataset has a virtual layout \n"); + else + printf("Wrong layout found \n"); + + /* + * Find number of mappings. + */ + status = H5Pget_virtual_count (dcpl, &num_map); + printf("Number of mappings is %d\n", num_map); + + /* + * Get mapping parameters for each mapping. + */ + for (i = 0; i < (int)num_map; i++) { + printf("Mapping %d \n", i); + printf(" Selection in the virtual dataset \n"); + /* Get selection in the virttual dataset */ + vspace = H5Pget_virtual_vspace (dcpl, (size_t)i); + if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) { + if (H5Sis_regular_hyperslab(vspace)) { + status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out); + printf(" start = [%d, %d, %d] \n", (int)start_out[0], (int)start_out[1], (int)start_out[2]); + printf(" stride = [%d, %d, %d] \n", (int)stride_out[0], (int)stride_out[1], (int)stride_out[2]); + printf(" count = [%d, %d, %d] \n", (int)count_out[0], (int)count_out[1], (int)count_out[2]); + printf(" block = [%d, %d, %d] \n", (int)block_out[0], (int)block_out[1], (int)block_out[2]); + } + } + /* Get source file name */ + len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0); + filename = (char *)malloc((size_t)len*sizeof(char)+1); + H5Pget_virtual_filename (dcpl, (size_t)i, filename, len+1); + printf(" Source filename %s\n", filename); + + /* Get source dataset name */ + len = H5Pget_virtual_dsetname (dcpl, (size_t)i, NULL, 0); + dsetname = (char *)malloc((size_t)len*sizeof(char)+1); + H5Pget_virtual_dsetname (dcpl, (size_t)i, dsetname, len+1); + printf(" Source dataset name %s\n", dsetname); + + /* Get selection in the source dataset */ + printf(" Selection in the source dataset "); + src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i); + if(H5Sget_select_type(src_space) == H5S_SEL_ALL) { + printf("H5S_ALL \n"); + } + H5Sclose(vspace); + H5Sclose(src_space); + free(filename); + free(dsetname); + } + + /* + * Close and release resources. + */ + status = H5Pclose (dcpl); + status = H5Dclose (dset); + status = H5Fclose (file); + + return 0; +} + -- cgit v0.12 From 3c9c263e5a86cca9094ece751f430b7eacb250a4 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Wed, 4 Mar 2015 12:26:33 -0500 Subject: [svn-r26359] Added h5_vds-exc.c to misc. files and ran bin/reconfigure. Tested on jam. --- MANIFEST | 1 + examples/Makefile.am | 5 +++-- examples/Makefile.in | 5 +++-- examples/run-c-ex.sh.in | 6 ++++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/MANIFEST b/MANIFEST index 9297e1d..49ffcfb 100644 --- a/MANIFEST +++ b/MANIFEST @@ -153,6 +153,7 @@ ./examples/h5_shared_mesg.c ./examples/ph5example.c ./examples/h5_vds.c +./examples/h5_vds-exc.c ./examples/testh5cc.sh.in ./examples/README diff --git a/examples/Makefile.am b/examples/Makefile.am index 419bb7f..5ceb81c 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -37,7 +37,7 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \ h5_crtatt h5_crtgrp h5_crtdat \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ - h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds + h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc TEST_SCRIPT=testh5cc.sh TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) @@ -48,7 +48,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_extend.c h5_crtatt.c h5_crtgrp.c h5_crtdat.c \ h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ - h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c + h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c @@ -118,6 +118,7 @@ h5_extlink: $(srcdir)/h5_extlink.c $(EXTLINK_DIRS) h5_elink_unix2win: $(srcdir)/h5_elink_unix2win.c $(EXTLINK_DIRS) h5_shared_mesg: $(srcdir)/h5_shared_mesg.c h5_vds: $(srcdir)/h5_vds.c +h5_vds-exc: $(srcdir)/h5_vds-exc.c if BUILD_SHARED_SZIP_CONDITIONAL LD_LIBRARY_PATH=$(LL_PATH) diff --git a/examples/Makefile.in b/examples/Makefile.in index 05594cc..183d684 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -625,7 +625,7 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \ h5_crtatt h5_crtgrp h5_crtdat \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ - h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds + h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc TEST_SCRIPT = testh5cc.sh TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) @@ -637,7 +637,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_extend.c h5_crtatt.c h5_crtgrp.c h5_crtdat.c \ h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ - h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c + h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c # The external link examples demonstrate how to use paths; they need @@ -1091,6 +1091,7 @@ h5_extlink: $(srcdir)/h5_extlink.c $(EXTLINK_DIRS) h5_elink_unix2win: $(srcdir)/h5_elink_unix2win.c $(EXTLINK_DIRS) h5_shared_mesg: $(srcdir)/h5_shared_mesg.c h5_vds: $(srcdir)/h5_vds.c +h5_vds-exc: $(srcdir)/h5_vds-exc.c # How to create EXAMPLEDIR if it doesn't already exist $(EXAMPLEDIR): diff --git a/examples/run-c-ex.sh.in b/examples/run-c-ex.sh.in index 9034f5c..c4c87b2 100644 --- a/examples/run-c-ex.sh.in +++ b/examples/run-c-ex.sh.in @@ -125,8 +125,10 @@ then RunTest h5_elink_unix2win &&\ rm h5_elink_unix2win &&\ RunTest h5_shared_mesg &&\ - rm h5_shared_mesg && - RunTest h5_vds && + rm h5_shared_mesg &&\ + RunTest h5_vds-exc &&\ + rm h5_vds-exc&&\ + RunTest h5_vds &&\ rm h5_vds); then EXIT_VALUE=${EXIT_SUCCESS} else -- cgit v0.12 From e2175fd0ca8e00af14c97f4a103c31e8ae19b490 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Wed, 4 Mar 2015 12:29:29 -0500 Subject: [svn-r26360] Modified CMake files to accomodate new h5_vds-exc.c example. --- examples/CMakeLists.txt | 1 + examples/CMakeTests.cmake | 2 ++ 2 files changed, 3 insertions(+) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index b7c9c63..bc97b75 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -34,6 +34,7 @@ set (examples h5_extlink h5_elink_unix2win h5_shared_mesg + h5_vds-exc h5_vds ) diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake index 5a756c8..50da442 100644 --- a/examples/CMakeTests.cmake +++ b/examples/CMakeTests.cmake @@ -42,6 +42,8 @@ blue/prefix_target.h5 red/prefix_target.h5 u2w/u2w_target.h5 + vds.h5 + vds-excalibur.h5 ) if (NOT "${last_test}" STREQUAL "") set_tests_properties (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test}) -- cgit v0.12 From b3c3c8ea724a844ad95d08cf37726791deddb9a3 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 4 Mar 2015 14:14:50 -0500 Subject: [svn-r26361] Added check for unlimited to count/block print selection --- tools/lib/h5tools_str.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 94b0ff2..6aab146 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -468,16 +468,24 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace, /* Count coordinates */ h5tools_str_append(str, "%s ", COUNT); - for (j = 0; j < ndims; j++) - h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", count[j]); + for (j = 0; j < ndims; j++) { + if(count[j] == H5S_UNLIMITED) + h5tools_str_append(str, "%s%s", j ? "," : "(","H5S_UNLIMITED"); + else + h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", count[j]); + } h5tools_str_append(str, ");"); h5tools_str_append(str, "%s", "\n"); h5tools_str_indent(str, info, ctx); /* Block coordinates */ h5tools_str_append(str, "%s ", BLOCK); - for (j = 0; j < ndims; j++) - h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", block[j]); + for (j = 0; j < ndims; j++) { + if(block[j] == H5S_UNLIMITED) + h5tools_str_append(str, "%s%s", j ? "," : "(","H5S_UNLIMITED"); + else + h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", block[j]); + } h5tools_str_append(str, ");"); h5tools_str_append(str, "%s", "\n"); h5tools_str_indent(str, info, ctx); -- cgit v0.12 From 802fac804d69bf7d33043a8d21321640ac1786dd Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Thu, 5 Mar 2015 18:04:57 -0500 Subject: [svn-r26376] Added new examples for fixed-size Excalibur and for Eiger use cases. Fixed several typos. Tested on jam. --- MANIFEST | 2 + examples/CMakeLists.txt | 2 + examples/Makefile.am | 8 +- examples/Makefile.in | 8 +- examples/h5_vds-eiger.c | 175 +++++++++++++++++++++++++++++++++++++ examples/h5_vds-exc.c | 43 ++++----- examples/h5_vds-exclim.c | 220 +++++++++++++++++++++++++++++++++++++++++++++++ examples/run-c-ex.sh.in | 4 + 8 files changed, 437 insertions(+), 25 deletions(-) create mode 100644 examples/h5_vds-eiger.c create mode 100644 examples/h5_vds-exclim.c diff --git a/MANIFEST b/MANIFEST index 49ffcfb..75c9930 100644 --- a/MANIFEST +++ b/MANIFEST @@ -154,6 +154,8 @@ ./examples/ph5example.c ./examples/h5_vds.c ./examples/h5_vds-exc.c +./examples/h5_vds-exclim.c +./examples/h5_vds-eiger.c ./examples/testh5cc.sh.in ./examples/README diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index bc97b75..cfb0e11 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -34,6 +34,8 @@ set (examples h5_extlink h5_elink_unix2win h5_shared_mesg + h5_vds-eiger + h5_vds-exclim h5_vds-exc h5_vds ) diff --git a/examples/Makefile.am b/examples/Makefile.am index 5ceb81c..667fb3a 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -37,7 +37,8 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \ h5_crtatt h5_crtgrp h5_crtdat \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ - h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc + h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc \ + h5_vds-exclim h5_vds-eiger TEST_SCRIPT=testh5cc.sh TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) @@ -48,7 +49,8 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_extend.c h5_crtatt.c h5_crtgrp.c h5_crtdat.c \ h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ - h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c + h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c \ + h5_vds-exclim.c h5_vds-eiger.c @@ -119,6 +121,8 @@ h5_elink_unix2win: $(srcdir)/h5_elink_unix2win.c $(EXTLINK_DIRS) h5_shared_mesg: $(srcdir)/h5_shared_mesg.c h5_vds: $(srcdir)/h5_vds.c h5_vds-exc: $(srcdir)/h5_vds-exc.c +h5_vds-exclim: $(srcdir)/h5_vds-exclim.c +h5_vds-eiger: $(srcdir)/h5_vds-eiger.c if BUILD_SHARED_SZIP_CONDITIONAL LD_LIBRARY_PATH=$(LL_PATH) diff --git a/examples/Makefile.in b/examples/Makefile.in index 183d684..45a9691 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -625,7 +625,8 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \ h5_crtatt h5_crtgrp h5_crtdat \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ - h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc + h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc \ + h5_vds-exclim h5_vds-eiger TEST_SCRIPT = testh5cc.sh TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) @@ -637,7 +638,8 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_extend.c h5_crtatt.c h5_crtgrp.c h5_crtdat.c \ h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ - h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c + h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c \ + h5_vds-exclim.c h5_vds-eiger.c # The external link examples demonstrate how to use paths; they need @@ -1092,6 +1094,8 @@ h5_elink_unix2win: $(srcdir)/h5_elink_unix2win.c $(EXTLINK_DIRS) h5_shared_mesg: $(srcdir)/h5_shared_mesg.c h5_vds: $(srcdir)/h5_vds.c h5_vds-exc: $(srcdir)/h5_vds-exc.c +h5_vds-exclim: $(srcdir)/h5_vds-exclim.c +h5_vds-eiger: $(srcdir)/h5_vds-eiger.c # How to create EXAMPLEDIR if it doesn't already exist $(EXAMPLEDIR): diff --git a/examples/h5_vds-eiger.c b/examples/h5_vds-eiger.c new file mode 100644 index 0000000..d35fc85 --- /dev/null +++ b/examples/h5_vds-eiger.c @@ -0,0 +1,175 @@ +/************************************************************ + + This example illustrates the concept of the virtual dataset. + Eiger use case. Every 5 frames 10x10 are in the source + dataset "/A" in file with the name f-<#>.h5 + This file is intended for use with HDF5 Library version 1.10 + + ************************************************************/ + +#include "hdf5.h" +#include +#include + +#define FILE "vds-eiger.h5" +#define DATASET "VDS-Eiger" +#define VDSDIM0 5 +#define VDSDIM1 10 +#define VDSDIM2 10 +#define DIM0 5 +#define DIM1 10 +#define DIM2 10 +#define RANK 3 + +int +main (void) +{ + hid_t file, src_space, vspace, + dset; /* Handles */ + hid_t dcpl; + herr_t status; + hsize_t vdsdims[3] = {VDSDIM0, VDSDIM1, VDSDIM2}, + vdsdims_max[3] = {H5S_UNLIMITED, VDSDIM1, VDSDIM1}, + dims[3] = {DIM0, DIM1, DIM2}, + start[3], /* Hyperslab parameters */ + stride[3], + count[3], + block[3]; + hsize_t start_out[3], /* Hyperslab parameter out */ + stride_out[3], + count_out[3], + block_out[3]; + int i; + H5D_layout_t layout; /* Storage layout */ + size_t num_map; /* Number of mappings */ + ssize_t len; /* Length of the string; also a return value */ + char *filename; + char *dsetname; + + + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* Create VDS dataspace. */ + vspace = H5Screate_simple (RANK, vdsdims, vdsdims_max); + + /* Create dataspaces for the source dataset. */ + src_space = H5Screate_simple (RANK, dims, NULL); + + /* Create VDS creation property */ + dcpl = H5Pcreate (H5P_DATASET_CREATE); + + /* Initialize hyperslab values */ + + start[0] = 0; + start[1] = 0; + start[2] = 0; + stride[0] = DIM0; + stride[1] = 1; + stride[2] = 1; + count[0] = H5S_UNLIMITED; + count[1] = 1; + count[2] = 1; + block[0] = DIM0; + block[1] = DIM1; + block[2] = DIM2; + + /* + * Build the mappings + * + */ + status = H5Sselect_hyperslab (vspace, H5S_SELECT_SET, start, stride, count, block); + status = H5Pset_virtual (dcpl, vspace, "f-%0b.h5", "/A", src_space); + + + + /* Create a virtual dataset */ + dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, + dcpl, H5P_DEFAULT); + status = H5Sclose (vspace); + status = H5Sclose (src_space); + status = H5Dclose (dset); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. + */ + + /* + * Open file and dataset using the default properties. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + + /* + * Get creation property list and mapping properties. + */ + dcpl = H5Dget_create_plist (dset); + + /* + * Get storage layout. + */ + layout = H5Pget_layout (dcpl); + + if (H5D_VIRTUAL == layout) + printf(" Dataset has a virtual layout \n"); + else + printf(" Wrong layout found \n"); + + /* + * Find number of mappings. + */ + status = H5Pget_virtual_count (dcpl, &num_map); + printf(" Number of mappings is %d\n", num_map); + + /* + * Get mapping parameters for each mapping. + */ + for (i = 0; i < (int)num_map; i++) { + printf(" Mapping %d \n", i); + printf(" Selection in the virtual dataset \n"); + /* Get selection in the virttual dataset */ + vspace = H5Pget_virtual_vspace (dcpl, (size_t)i); + if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) { + if (H5Sis_regular_hyperslab(vspace)) { + status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out); + printf(" start = [%d, %d, %d] \n", (int)start_out[0], (int)start_out[1], (int)start_out[2]); + printf(" stride = [%d, %d, %d] \n", (int)stride_out[0], (int)stride_out[1], (int)stride_out[2]); + printf(" count = [%d, %d, %d] \n", (int)count_out[0], (int)count_out[1], (int)count_out[2]); + printf(" block = [%d, %d, %d] \n", (int)block_out[0], (int)block_out[1], (int)block_out[2]); + } + } + /* Get source file name */ + len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0); + filename = (char *)malloc((size_t)len*sizeof(char)+1); + H5Pget_virtual_filename (dcpl, (size_t)i, filename, len+1); + printf(" Source filename %s\n", filename); + + /* Get source dataset name */ + len = H5Pget_virtual_dsetname (dcpl, (size_t)i, NULL, 0); + dsetname = (char *)malloc((size_t)len*sizeof(char)+1); + H5Pget_virtual_dsetname (dcpl, (size_t)i, dsetname, len+1); + printf(" Source dataset name %s\n", dsetname); + + /* Get selection in the source dataset */ + printf(" Selection in the source dataset "); + src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i); + if(H5Sget_select_type(src_space) == H5S_SEL_ALL) { + printf("H5S_ALL \n"); + } + H5Sclose(vspace); + H5Sclose(src_space); + free(filename); + free(dsetname); + } + + /* + * Close and release resources. + */ + status = H5Pclose (dcpl); + status = H5Dclose (dset); + status = H5Fclose (file); + + return 0; +} + diff --git a/examples/h5_vds-exc.c b/examples/h5_vds-exc.c index 124d22b..ceafe68 100644 --- a/examples/h5_vds-exc.c +++ b/examples/h5_vds-exc.c @@ -10,14 +10,17 @@ #include #include -#define FILE "vds-excalibur.h5" -#define DATASET "VDS-excalibur" -#define VDSDIM1 6 -#define VDSDIM0 15 -#define KDIM0 2 -#define KDIM1 6 -#define NDIM0 3 -#define NDIM1 6 +#define FILE "vds-exc.h5" +#define DATASET "VDS-Excalibur" +#define VDSDIM0 0 +#define VDSDIM1 15 +#define VDSDIM2 6 +#define KDIM0 0 +#define KDIM1 2 +#define KDIM2 6 +#define NDIM0 0 +#define NDIM1 3 +#define NDIM2 6 #define RANK 3 const char *SRC_FILE[] = { @@ -46,12 +49,12 @@ main (void) dset; /* Handles */ hid_t dcpl; herr_t status; - hsize_t vdsdims[3] = {0,VDSDIM0, VDSDIM1}, - vdsdims_max[3] = {H5S_UNLIMITED,VDSDIM0, VDSDIM1}, - kdims[3] = {0, KDIM0, KDIM1}, - kdims_max[3] = {H5S_UNLIMITED, KDIM0, KDIM1}, - ndims[3] = {0, NDIM0, NDIM1}, - ndims_max[3] = {H5S_UNLIMITED, NDIM0, NDIM1}, + hsize_t vdsdims[3] = {VDSDIM0, VDSDIM1, VDSDIM2}, + vdsdims_max[3] = {H5S_UNLIMITED,VDSDIM1, VDSDIM2}, + kdims[3] = {KDIM0, KDIM1, KDIM2}, + kdims_max[3] = {H5S_UNLIMITED, KDIM1, KDIM2}, + ndims[3] = {NDIM0, NDIM1, NDIM2}, + ndims_max[3] = {H5S_UNLIMITED, NDIM1, NDIM2}, start[3], /* Hyperslab parameters */ stride[3], count[3], @@ -68,8 +71,6 @@ main (void) ssize_t len; /* Length of the string; also a return value */ char *filename; char *dsetname; - hsize_t nblocks; - hsize_t *buf; /* Buffer to hold hyperslab coordinates */ file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -94,14 +95,14 @@ main (void) count[2] = 1; block[0] = 1; block[1] = k; - block[2] = VDSDIM1; + block[2] = VDSDIM2; /* * Build the mappings for A, C and E source datasets. * */ for (i = 0; i < 3; i++) { - start[0] = (hsize_t)((k+n)*i); + start[1] = (hsize_t)((k+n)*i); status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block); status = H5Pset_virtual (dcpl, space, SRC_FILE[2*i], SRC_DATASET[2*i], ksrc_space); } @@ -113,7 +114,7 @@ main (void) * */ for (i = 0; i < 3; i++) { - start[0] = (hsize_t)(k+(k+n)*i); + start[1] = (hsize_t)(k+(k+n)*i); status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block); status = H5Pset_virtual (dcpl, space, SRC_FILE[2*i+1], SRC_DATASET[2*i+1], nsrc_space); } @@ -157,13 +158,13 @@ main (void) * Find number of mappings. */ status = H5Pget_virtual_count (dcpl, &num_map); - printf("Number of mappings is %d\n", num_map); + printf(" Number of mappings is %d\n", num_map); /* * Get mapping parameters for each mapping. */ for (i = 0; i < (int)num_map; i++) { - printf("Mapping %d \n", i); + printf(" Mapping %d \n", i); printf(" Selection in the virtual dataset \n"); /* Get selection in the virttual dataset */ vspace = H5Pget_virtual_vspace (dcpl, (size_t)i); diff --git a/examples/h5_vds-exclim.c b/examples/h5_vds-exclim.c new file mode 100644 index 0000000..0d88442 --- /dev/null +++ b/examples/h5_vds-exclim.c @@ -0,0 +1,220 @@ +/************************************************************ + + This example illustrates the concept of the virtual dataset. + Excalibur use case with k=2 and m=3 and only 3 planes in + Z-direction (i.e., not unlimited). + This file is intended for use with HDF5 Library version 1.10 + + ************************************************************/ + +#include "hdf5.h" +#include +#include + +#define FILE "vds-exclim.h5" +#define DATASET "VDS-Excaliburlim" +#define VDSDIM0 3 +#define VDSDIM1 15 +#define VDSDIM2 6 +#define KDIM0 3 +#define KDIM1 2 +#define KDIM2 6 +#define NDIM0 3 +#define NDIM1 3 +#define NDIM2 6 +#define RANK 3 + +const char *SRC_FILE[] = { + "a.h5", + "b.h5", + "c.h5", + "d.h5", + "e.h5", + "f.h5" +}; + +const char *SRC_DATASET[] = { + "A", + "B", + "C", + "D", + "E", + "F" +}; + +int +main (void) +{ + hid_t file, space, ksrc_space, nsrc_space, vspace, + src_space, + dset; /* Handles */ + hid_t dcpl; + herr_t status; + hsize_t vdsdims[3] = {VDSDIM0, VDSDIM1, VDSDIM2}, + kdims[3] = {KDIM0, KDIM1, KDIM2}, + ndims[3] = {NDIM0, NDIM1, NDIM2}, + start[3], /* Hyperslab parameters */ + stride[3], + count[3], + block[3]; + hsize_t start_out[3], + stride_out[3], + count_out[3], + block_out[3]; + int k = 2; + int n = 3; + int i; + H5D_layout_t layout; /* Storage layout */ + size_t num_map; /* Number of mappings */ + ssize_t len; /* Length of the string; also a return value */ + char *filename; + char *dsetname; + + + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* Create VDS dataspace. */ + space = H5Screate_simple (RANK, vdsdims, NULL); + /* Create dataspaces for A, C, and E datasets. */ + ksrc_space = H5Screate_simple (RANK, kdims, NULL); + /* Create dataspaces for B, D, and F datasets. */ + nsrc_space = H5Screate_simple (RANK, ndims, NULL); + + /* Create VDS creation property */ + dcpl = H5Pcreate (H5P_DATASET_CREATE); + + /* Initialize hyperslab values */ + + start[0] = 0; + start[1] = 0; + start[2] = 0; + count[0] = VDSDIM0; + count[1] = 1; + count[2] = 1; + block[0] = 1; + block[1] = k; + block[2] = VDSDIM2; + + /* + * Build the mappings for A, C and E source datasets. + * + */ + status = H5Sselect_hyperslab (ksrc_space, H5S_SELECT_SET, start, NULL, count, block); + for (i = 0; i < 3; i++) { + start[1] = (hsize_t)((k+n)*i); + status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block); + status = H5Pset_virtual (dcpl, space, SRC_FILE[2*i], SRC_DATASET[2*i], ksrc_space); + } + + /* Reinitialize start[0] and block[1] */ + start[0] = 0; + block[1] = n; + /* + * Build the mappings for B, D and F source datasets. + * + */ + status = H5Sselect_hyperslab (nsrc_space, H5S_SELECT_SET, start, NULL, count, block); + for (i = 0; i < 3; i++) { + start[1] = (hsize_t)(k+(k+n)*i); + status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block); + status = H5Pset_virtual (dcpl, space, SRC_FILE[2*i+1], SRC_DATASET[2*i+1], nsrc_space); + } + + /* Create a virtual dataset */ + dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, + dcpl, H5P_DEFAULT); + status = H5Sclose (space); + status = H5Sclose (nsrc_space); + status = H5Sclose (ksrc_space); + status = H5Dclose (dset); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. + */ + + /* + * Open file and dataset using the default properties. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + + /* + * Get creation property list and mapping properties. + */ + dcpl = H5Dget_create_plist (dset); + + /* + * Get storage layout. + */ + layout = H5Pget_layout (dcpl); + + if (H5D_VIRTUAL == layout) + printf(" Dataset has a virtual layout \n"); + else + printf("Wrong layout found \n"); + + /* + * Find number of mappings. + */ + status = H5Pget_virtual_count (dcpl, &num_map); + printf(" Number of mappings is %d\n", num_map); + + /* + * Get mapping parameters for each mapping. + */ + for (i = 0; i < (int)num_map; i++) { + printf(" Mapping %d \n", i); + printf(" Selection in the virtual dataset \n"); + /* Get selection in the virttual dataset */ + vspace = H5Pget_virtual_vspace (dcpl, (size_t)i); + if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) { + if (H5Sis_regular_hyperslab(vspace)) { + status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out); + printf(" start = [%d, %d, %d] \n", (int)start_out[0], (int)start_out[1], (int)start_out[2]); + printf(" stride = [%d, %d, %d] \n", (int)stride_out[0], (int)stride_out[1], (int)stride_out[2]); + printf(" count = [%d, %d, %d] \n", (int)count_out[0], (int)count_out[1], (int)count_out[2]); + printf(" block = [%d, %d, %d] \n", (int)block_out[0], (int)block_out[1], (int)block_out[2]); + } + } + /* Get source file name */ + len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0); + filename = (char *)malloc((size_t)len*sizeof(char)+1); + H5Pget_virtual_filename (dcpl, (size_t)i, filename, len+1); + printf(" Source filename %s\n", filename); + + /* Get source dataset name */ + len = H5Pget_virtual_dsetname (dcpl, (size_t)i, NULL, 0); + dsetname = (char *)malloc((size_t)len*sizeof(char)+1); + H5Pget_virtual_dsetname (dcpl, (size_t)i, dsetname, len+1); + printf(" Source dataset name %s\n", dsetname); + + /* Get selection in the source dataset */ + printf(" Selection in the source dataset \n"); + src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i); + if(H5Sget_select_type(src_space) == H5S_SEL_HYPERSLABS) { + if (H5Sis_regular_hyperslab(vspace)) { + status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out); + printf(" start = [%d, %d, %d] \n", (int)start_out[0], (int)start_out[1], (int)start_out[2]); + printf(" stride = [%d, %d, %d] \n", (int)stride_out[0], (int)stride_out[1], (int)stride_out[2]); + printf(" count = [%d, %d, %d] \n", (int)count_out[0], (int)count_out[1], (int)count_out[2]); + printf(" block = [%d, %d, %d] \n", (int)block_out[0], (int)block_out[1], (int)block_out[2]); + } + } + H5Sclose(vspace); + H5Sclose(src_space); + free(filename); + free(dsetname); + } + + /* + * Close and release resources. + */ + status = H5Pclose (dcpl); + status = H5Dclose (dset); + status = H5Fclose (file); + + return 0; +} + diff --git a/examples/run-c-ex.sh.in b/examples/run-c-ex.sh.in index c4c87b2..b41d89d 100644 --- a/examples/run-c-ex.sh.in +++ b/examples/run-c-ex.sh.in @@ -126,6 +126,10 @@ then rm h5_elink_unix2win &&\ RunTest h5_shared_mesg &&\ rm h5_shared_mesg &&\ + RunTest h5_vds-eiger &&\ + rm h5_vds-eiger&&\ + RunTest h5_vds-exclim &&\ + rm h5_vds-exclim&&\ RunTest h5_vds-exc &&\ rm h5_vds-exc&&\ RunTest h5_vds &&\ -- cgit v0.12 From 9cdf806eec4e66802fb0a544ba19f46a532154bb Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 6 Mar 2015 12:53:56 -0500 Subject: [svn-r26383] Add MAPPING to VDS output --- tools/lib/h5tools.h | 1 + tools/lib/h5tools_dump.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 1ddc584..cf841e5 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -94,6 +94,7 @@ #define PACKED_OFFSET "OFFSET" #define PACKED_LENGTH "LENGTH" #define VDS_VIRTUAL "VIRTUAL" +#define VDS_MAPPING "MAPPING" #define VDS_REG_HYPERSLAB "REGULAR_HYPERSLAB" #define VDS_IRR_HYPERSLAB "IRREGULAR_HYPERSLAB" #define VDS_POINT "POINT" diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 5e9cb4c..3708ce8 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -3156,7 +3156,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s ", BEGIN); + h5tools_str_append(&buffer, "%s %ld %s ", VDS_MAPPING, next, BEGIN); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->indent_level++; -- cgit v0.12 From bfc69905acab1727260af74efa0b119a119ddc6b Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Mon, 9 Mar 2015 16:59:50 -0500 Subject: [svn-r26411] Add support for I/O in very simple cases (virtual mapping and file space are both H5S_ALL). Note make check fails in h5dump test (unrelated to this checkin). Tested: ummon --- src/H5D.c | 44 ++--------- src/H5Dint.c | 80 ++++++++++++++++++- src/H5Dio.c | 5 +- src/H5Dpkg.h | 5 ++ src/H5Dvirtual.c | 235 +++++++++++++++++++++++++++++++++++++++++++++++++++---- src/H5Pdcpl.c | 2 + src/H5Sprivate.h | 3 + src/H5Sselect.c | 93 ++++++++++++++++++++++ test/Makefile.am | 2 +- test/vds.c | 215 +++++++++++++++++++++++++++++++++++++++++++++++++- 10 files changed, 626 insertions(+), 58 deletions(-) diff --git a/src/H5D.c b/src/H5D.c index a81fb8b..d19e3a6 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -323,14 +323,9 @@ hid_t H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id) { H5D_t *dset = NULL; - H5G_loc_t loc; /* Object location of group */ - H5G_loc_t dset_loc; /* Object location of dataset */ - H5G_name_t path; /* Dataset group hier. path */ - H5O_loc_t oloc; /* Dataset object location */ - H5O_type_t obj_type; /* Type of object at location */ - hbool_t loc_found = FALSE; /* Location at 'name' found */ - hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datset */ - hid_t ret_value; + H5G_loc_t loc; /* Object location of group */ + hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datset */ + hid_t ret_value; FUNC_ENTER_API(FAIL) H5TRACE3("i", "i*si", loc_id, name, dapl_id); @@ -348,41 +343,18 @@ H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id) if(TRUE != H5P_isa_class(dapl_id, H5P_DATASET_ACCESS)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset access property list") - /* Set up dataset location to fill in */ - dset_loc.oloc = &oloc; - dset_loc.path = &path; - H5G_loc_reset(&dset_loc); - - /* Find the dataset object */ - if(H5G_loc_find(&loc, name, &dset_loc, dapl_id, dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "not found") - loc_found = TRUE; - - /* Check that the object found is the correct type */ - if(H5O_obj_type(&oloc, &obj_type, dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object type") - if(obj_type != H5O_TYPE_DATASET) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset") - /* Open the dataset */ - if(NULL == (dset = H5D_open(&dset_loc, dapl_id, dxpl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open dataset") + if(NULL == (dset = H5D__open_name(&loc, name, dapl_id, dxpl_id))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset") /* Register an atom for the dataset */ if((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "can't register dataset atom") done: - if(ret_value < 0) { - if(dset) { - if(H5D_close(dset) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset") - } /* end if */ - else { - if(loc_found && H5G_loc_free(&dset_loc) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "can't free location") - } /* end else */ - } /* end if */ + if(ret_value < 0) + if(dset && H5D_close(dset) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset") FUNC_LEAVE_API(ret_value) } /* end H5Dopen2() */ diff --git a/src/H5Dint.c b/src/H5Dint.c index 5035a67..a36b8b3 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1105,6 +1105,69 @@ done: } /* end H5D__create() */ +/*------------------------------------------------------------------------- + * Function: H5D__open_name + * + * Purpose: Opens an existing dataset by name. + * + * Return: Success: Ptr to a new dataset. + * Failure: NULL + * + * Programmer: Neil Fortner + * Friday, March 6, 2015 + * + *------------------------------------------------------------------------- + */ +H5D_t * +H5D__open_name(const H5G_loc_t *loc, const char *name, hid_t dapl_id, + hid_t dxpl_id) +{ + H5D_t *dset = NULL; + H5G_loc_t dset_loc; /* Object location of dataset */ + H5G_name_t path; /* Dataset group hier. path */ + H5O_loc_t oloc; /* Dataset object location */ + H5O_type_t obj_type; /* Type of object at location */ + hbool_t loc_found = FALSE; /* Location at 'name' found */ + H5D_t *ret_value; /* Return value */ + + FUNC_ENTER_PACKAGE + + /* Check args */ + HDassert(loc); + HDassert(name); + + /* Set up dataset location to fill in */ + dset_loc.oloc = &oloc; + dset_loc.path = &path; + H5G_loc_reset(&dset_loc); + + /* Find the dataset object */ + if(H5G_loc_find(loc, name, &dset_loc, dapl_id, dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found") + loc_found = TRUE; + + /* Check that the object found is the correct type */ + if(H5O_obj_type(&oloc, &obj_type, dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't get object type") + if(obj_type != H5O_TYPE_DATASET) + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, NULL, "not a dataset") + + /* Open the dataset */ + if(NULL == (dset = H5D_open(&dset_loc, dapl_id, dxpl_id))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't open dataset") + + /* Set return value */ + ret_value = dset; + +done: + if(!ret_value) + if(loc_found && H5G_loc_free(&dset_loc) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, NULL, "can't free location") + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__open_name() */ + + /* *------------------------------------------------------------------------- * Function: H5D_open @@ -1449,8 +1512,21 @@ H5D_close(H5D_t *dataset) break; case H5D_VIRTUAL: - /* Close datasets here? VDSINC */ - break; + { + size_t i; + + HDassert(dataset->shared->layout.storage.u.virt.list || (dataset->shared->layout.storage.u.virt.list_nused == 0)); + + /* Close source datasets */ + for(i = 0; i < dataset->shared->layout.storage.u.virt.list_nused; i++) + if(dataset->shared->layout.storage.u.virt.list[i].source_dset) { + HDassert(dataset->shared->layout.storage.u.virt.list[i].source_dset != dataset); + if(H5D_close(dataset->shared->layout.storage.u.virt.list[i].source_dset) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to close source dataset") + dataset->shared->layout.storage.u.virt.list[i].source_dset = NULL; + } /* end if */ + } /* end block */ + break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: diff --git a/src/H5Dio.c b/src/H5Dio.c index 88f75b1..296e529 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -52,9 +52,6 @@ /********************/ /* Internal I/O routines */ -static herr_t H5D__write(H5D_t *dataset, hid_t mem_type_id, - const H5S_t *mem_space, const H5S_t *file_space, hid_t dset_xfer_plist, - const void *buf); static herr_t H5D__pre_write(H5D_t *dset, hbool_t direct_write, hid_t mem_type_id, const H5S_t *mem_space, const H5S_t *file_space, hid_t dxpl_id, const void *buf); @@ -586,7 +583,7 @@ done: * *------------------------------------------------------------------------- */ -static herr_t +herr_t H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, const H5S_t *file_space, hid_t dxpl_id, const void *buf) { diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 82c4d2f..d448406 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -536,6 +536,8 @@ H5_DLL H5D_t *H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, H5_DLL H5D_t *H5D__create_named(const H5G_loc_t *loc, const char *name, hid_t type_id, const H5S_t *space, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id); +H5_DLL H5D_t *H5D__open_name(const H5G_loc_t *loc, const char *name, + hid_t dapl_id, hid_t dxpl_id); H5_DLL herr_t H5D__get_space_status(H5D_t *dset, H5D_space_status_t *allocation, hid_t dxpl_id); H5_DLL herr_t H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc, @@ -558,6 +560,9 @@ H5_DLL herr_t H5D__flush_real(H5D_t *dataset, hid_t dxpl_id); H5_DLL herr_t H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, const H5S_t *file_space, hid_t dset_xfer_plist, void *buf/*out*/); +H5_DLL herr_t H5D__write(H5D_t *dataset, hid_t mem_type_id, + const H5S_t *mem_space, const H5S_t *file_space, hid_t dset_xfer_plist, + const void *buf); /* Functions that perform direct serial I/O operations */ H5_DLL herr_t H5D__select_read(const H5D_io_info_t *io_info, diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 1bc4b75..ac7af54 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -35,6 +35,7 @@ #include "H5Dpkg.h" /* Dataset functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* Files */ +#include "H5Gprivate.h" /* Groups */ #include "H5HGprivate.h" /* Global Heaps */ #include "H5MMprivate.h" /* Memory management */ #include "H5Oprivate.h" /* Object headers */ @@ -68,6 +69,10 @@ static herr_t H5D__virtual_write(H5D_io_info_t *io_info, const H5S_t *mem_space, H5D_chunk_map_t *fm); static herr_t H5D__virtual_flush(H5D_t *dset, hid_t dxpl_id); +/* Other functions */ +static htri_t H5D__virtual_open_source_dset(const H5D_t *vdset, + H5O_storage_virtual_ent_t *virtual_ent, hid_t dxpl_id); + /*********************/ /* Package Variables */ @@ -171,6 +176,68 @@ done: /*------------------------------------------------------------------------- + * Function: H5D__virtual_open_source_dset + * + * Purpose: Attempts to open a source dataset. + * + * Return: TRUE: Source dataset opened + * FALSE: Source dataset not opened + * Negative: Error + * + * Programmer: Neil Fortner + * March 6, 2015 + * + *------------------------------------------------------------------------- + */ +static htri_t +H5D__virtual_open_source_dset(const H5D_t *vdset, + H5O_storage_virtual_ent_t *virtual_ent, hid_t dxpl_id) +{ + H5F_t *src_file = NULL; /* Source file */ + hbool_t src_file_open = FALSE; /* Whether we have opened and need to close src_file */ + H5G_loc_t src_root_loc; /* Object location of source file root group */ + htri_t ret_value = TRUE; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity check */ + HDassert(virtual_ent); + HDassert(!virtual_ent->source_dset); + + /* Get dapl and fapl from current (virtual dataset) location? VDSINC */ + /* Write code to check if these exist and return FALSE otherwise VDSINC */ + + /* Check if we need to open the source file */ + if(HDstrcmp(virtual_ent->source_file_name, ".")) { + /* Open the source file */ + if(NULL == (src_file = H5F_open(virtual_ent->source_file_name, H5F_ACC_RDONLY, H5P_FILE_CREATE_DEFAULT, H5P_FILE_ACCESS_DEFAULT, dxpl_id))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENFILE, FAIL, "unable to open source file") + src_file_open = TRUE; + } /* end if */ + else + /* Source file is ".", use the virtual dataset's file */ + src_file = vdset->oloc.file; + + /* Set up the root group in the destination file */ + if(NULL == (src_root_loc.oloc = H5G_oloc(H5G_rootof(src_file)))) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to get object location for root group") + if(NULL == (src_root_loc.path = H5G_nameof(H5G_rootof(src_file)))) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to get path for root group") + + /* Open the source dataset */ + if(NULL == (virtual_ent->source_dset = H5D__open_name(&src_root_loc, virtual_ent->source_dset_name, H5P_DATASET_ACCESS_DEFAULT, dxpl_id))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset") + +done: + if(src_file_open) + if(H5F_try_close(src_file) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEFILE, FAIL, "can't close source file") + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__virtual_open_source_dset() */ + + +/*------------------------------------------------------------------------- * Function: H5D__virtual_reset_layout * * Purpose: Frees internal structures in a virtual storage layout @@ -307,7 +374,7 @@ H5D__virtual_is_space_alloc(const H5O_storage_t *storage) /* Need to decide what to do here. For now just return TRUE if the global * heap block has been allocated. VDSINC */ - ret_value = storage->u.virt.serial_list_hobjid.addr != HADDR_UNDEF; + ret_value = TRUE;//storage->u.virt.serial_list_hobjid.addr != HADDR_UNDEF; FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_is_space_alloc() */ @@ -332,7 +399,7 @@ H5D__virtual_io_init(const H5D_io_info_t UNUSED *io_info, const H5D_type_info_t { FUNC_ENTER_STATIC_NOERR - HDassert(0 && "Not yet implemented...");//VDSINC + /* No-op for now. Delete if we never add anything here. VDSINC */ FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__virtual_io_init() */ @@ -350,16 +417,86 @@ H5D__virtual_io_init(const H5D_io_info_t UNUSED *io_info, const H5D_type_info_t * *------------------------------------------------------------------------- */ -herr_t -H5D__virtual_read(H5D_io_info_t UNUSED *io_info, const H5D_type_info_t UNUSED *type_info, - hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space, +static herr_t +H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, + hsize_t UNUSED nelmts, const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t UNUSED *fm) { - FUNC_ENTER_PACKAGE_NOERR + H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */ + H5S_t *projected_mem_space = NULL; /* Memory space for selection in a single mapping */ + H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */ + hssize_t select_nelmts; /* Number of elements in selection */ + htri_t opened_dset; /* Whether we opened the source dataset */ + size_t i; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity check */ + HDassert(io_info); + HDassert(io_info->u.rbuf); + HDassert(type_info); + HDassert(mem_space); + HDassert(file_space); + + storage = &io_info->dset->shared->layout.storage.u.virt; + + /* Iterate over mappings */ + for(i = 0; i < storage->list_nused; i++) { + /* Project intersection of file space and mapping virtual space onto + * memory space */ + if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].virtual_select, &projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") + + /* Get number of elements in projected dataspace */ + if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(projected_mem_space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + + /* Only perform I/O if there are any elements */ + if(nelmts > 0) { + /* Open source dataset, fail if cannot open */ + if(!storage->list[i].source_dset) { + if((opened_dset = H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], io_info->dxpl_id)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + if(!opened_dset) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "did not open source dataset") + } /* end if */ + + /* Project intersection of file space and mapping virtual space onto + * mapping source space */ + if(H5S_select_project_intersection(storage->list[i].virtual_select, storage->list[i].source_select, file_space, &projected_src_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto source space") + + /* Perform read on source dataset */ + if(H5D__read(storage->list[i].source_dset, type_info->dst_type_id, projected_mem_space, projected_src_space, io_info->dxpl_id, io_info->u.rbuf) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read source dataset") + + /* Close projected_src_space */ + if(H5S_close(projected_src_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") + projected_src_space = NULL; + } /* end if */ + + /* Close projected_mem_space */ + if(H5S_close(projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") + projected_mem_space = NULL; + } /* end for */ - HDassert(0 && "Not yet implemented...");//VDSINC +done: + /* Release allocated resources on failure */ + if(projected_src_space) { + HDassert(ret_value < 0); + if(H5S_close(projected_src_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") + } /* end if */ + if(projected_mem_space) { + HDassert(ret_value < 0); + if(H5S_close(projected_mem_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") + } /* end if */ - FUNC_LEAVE_NOAPI(SUCCEED) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_read() */ @@ -375,16 +512,86 @@ H5D__virtual_read(H5D_io_info_t UNUSED *io_info, const H5D_type_info_t UNUSED *t * *------------------------------------------------------------------------- */ -herr_t -H5D__virtual_write(H5D_io_info_t UNUSED *io_info, const H5D_type_info_t UNUSED *type_info, - hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space, +static herr_t +H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, + hsize_t UNUSED nelmts, const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t UNUSED *fm) { - FUNC_ENTER_PACKAGE_NOERR + H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */ + H5S_t *projected_mem_space = NULL; /* Memory space for selection in a single mapping */ + H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */ + hssize_t select_nelmts; /* Number of elements in selection */ + htri_t opened_dset; /* Whether we opened the source dataset */ + size_t i; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity check */ + HDassert(io_info); + HDassert(io_info->u.rbuf); + HDassert(type_info); + HDassert(mem_space); + HDassert(file_space); + + storage = &io_info->dset->shared->layout.storage.u.virt; + + /* Iterate over mappings */ + for(i = 0; i < storage->list_nused; i++) { + /* Project intersection of file space and mapping virtual space onto + * memory space */ + if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].virtual_select, &projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") + + /* Get number of elements in projected dataspace */ + if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(projected_mem_space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + + /* Only perform I/O if there are any elements */ + if(nelmts > 0) { + /* Open source dataset, fail if cannot open */ + if(!storage->list[i].source_dset) { + if((opened_dset = H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], io_info->dxpl_id)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + if(!opened_dset) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "did not open source dataset") + } /* end if */ + + /* Project intersection of file space and mapping virtual space onto + * mapping source space */ + if(H5S_select_project_intersection(storage->list[i].virtual_select, storage->list[i].source_select, file_space, &projected_src_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto source space") + + /* Perform read on source dataset */ + if(H5D__write(storage->list[i].source_dset, type_info->dst_type_id, projected_mem_space, projected_src_space, io_info->dxpl_id, io_info->u.wbuf) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write to source dataset") + + /* Close projected_src_space */ + if(H5S_close(projected_src_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") + projected_src_space = NULL; + } /* end if */ + + /* Close projected_mem_space */ + if(H5S_close(projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") + projected_mem_space = NULL; + } /* end for */ - HDassert(0 && "Not yet implemented...");//VDSINC +done: + /* Release allocated resources on failure */ + if(projected_src_space) { + HDassert(ret_value < 0); + if(H5S_close(projected_src_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") + } /* end if */ + if(projected_mem_space) { + HDassert(ret_value < 0); + if(H5S_close(projected_mem_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") + } /* end if */ - FUNC_LEAVE_NOAPI(SUCCEED) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_write() */ diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index de3ab86..9c5833d 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1615,6 +1615,8 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, if(NULL == (src_space = (H5S_t *)H5I_object_verify(src_space_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + //VDSINC add check for overlaping virtual spaces + #ifndef H5_HAVE_C99_DESIGNATED_INITIALIZER /* If the compiler doesn't support C99 designated initializers, check if * the default layout structs have been initialized yet or not. *ick* -QAK diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 7cb5285..6ce2821 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -235,6 +235,9 @@ H5_DLL htri_t H5S_select_is_regular(const H5S_t *space); H5_DLL herr_t H5S_select_adjust_u(H5S_t *space, const hsize_t *offset); H5_DLL herr_t H5S_select_project_scalar(const H5S_t *space, hsize_t *offset); H5_DLL herr_t H5S_select_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset); +H5_DLL herr_t H5S_select_project_intersection(const H5S_t *src_space, + const H5S_t *dst_space, const H5S_t *src_intersect_space, + H5S_t **new_space_ptr); /* Operations on all selections */ H5_DLL herr_t H5S_select_all(H5S_t *space, hbool_t rel_prev); diff --git a/src/H5Sselect.c b/src/H5Sselect.c index a4f13d7..4085e7f 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -2101,3 +2101,96 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5S_select_fill() */ + +/*-------------------------------------------------------------------------- + NAME + H5S_select_project_intersection + + PURPOSE + VDSINC + + USAGE + VDSINC + + RETURNS + Non-negative on success/Negative on failure. + + DESCRIPTION + VDSINC + + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, + const H5S_t *src_intersect_space, H5S_t **new_space_ptr) +{ + H5S_t *new_space = NULL; /* New dataspace constructed */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + /* Sanity checks */ + HDassert(src_space); + HDassert(dst_space); + HDassert(src_intersect_space); + HDassert(new_space_ptr); + + /* Create new space, using dst extent. Start wil "all" selection. */ + if(NULL == (new_space = H5S_create(H5S_SIMPLE))) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "unable to create output dataspace") + if(H5S_extent_copy_real(&new_space->extent, &dst_space->extent, TRUE) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy destination space extent") + + /* Check intersecting space's selection type */ + switch(src_intersect_space->select.type->type) { + case H5S_SEL_NONE: + /* Since the intersecting space is "none", the intersection has no + * selection and so does the projection. Change to "none" selection + */ + if(H5S_select_none(new_space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + + break; + + case H5S_SEL_POINTS: + HDassert(0 && "Not yet implemented...");//VDSINC + + break; + + case H5S_SEL_HYPERSLABS: + HDassert(0 && "Not yet implemented...");//VDSINC + + break; + + case H5S_SEL_ALL: + /* Since the intersecting space is "all", the intersection must be + * equal to the source space and the projection must be equal to the + * destination space. Copy the destination selection. + */ + if(H5S_select_copy(new_space, dst_space, FALSE) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy destination space selection") + + break; + + case H5S_SEL_ERROR: + case H5S_SEL_N: + default: + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "invalid source dataspace selection type") + } /* end switch */ + + /* load the address of the new space into *new_space_ptr */ + *new_space_ptr = new_space; + +done: + /* Cleanup on error */ + if(ret_value < 0) { + if(new_space && H5S_close(new_space) < 0) + HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release dataspace") + } /* end if */ + + FUNC_LEAVE_NOAPI(ret_value) +} /* H5S_select_project_intersection() */ + diff --git a/test/Makefile.am b/test/Makefile.am index 1546288..e45fbd3 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -151,7 +151,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse new_multi_file_v16-r.h5 new_multi_file_v16-s.h5 \ split_get_file_image_test-m.h5 split_get_file_image_test-r.h5 \ file_image_core_test.h5.copy unregister_filter_1.h5 unregister_filter_2.h5 \ - vds_1.h5 + vds_[1-2].h5 # Sources for testhdf5 executable testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \ diff --git a/test/vds.c b/test/vds.c index 039bdc1..7376fb8 100644 --- a/test/vds.c +++ b/test/vds.c @@ -34,9 +34,15 @@ typedef enum { const char *FILENAME[] = { "vds_1", + "vds_2", NULL }; +/* I/O test config flags */ +#define TEST_IO_CLOSE_SRC 0x01u +#define TEST_IO_DIFFERENT_FILE 0x02u +#define TEST_IO_NTESTS 0x04u + #define LIST_DOUBLE_SIZE (H5D_VIRTUAL_DEF_LIST_SIZE + 1) #define FILENAME_BUF_SIZE 1024 @@ -848,7 +854,7 @@ test_api(test_api_config_t config, hid_t fapl) /* - * Test X: Enough Selections to trigger doubling of mapping list + * Test 6: Enough Selections to trigger doubling of mapping list */ /* Clear virtual layout in DCPL */ if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) @@ -964,6 +970,208 @@ error: /*------------------------------------------------------------------------- + * Function: test_basic_io + * + * Purpose: Tests VDS I/O without unlimited selections or + * pattern-matching file/dataset strings + * + * Return: Success: 0 + * + * Failure: number of errors + * + * Programmer: Neil Fortner + * Tuesday, March 3, 2015 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static int +test_basic_io(unsigned config, hid_t fapl) +{ + char srcfilename[FILENAME_BUF_SIZE]; + char vfilename[FILENAME_BUF_SIZE]; + hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */ + hid_t vfile = -1; /* File with virtual dset */ + hid_t dcpl = -1; /* Dataset creation property list */ + hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */ + hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */ + hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datsets */ + hid_t vdset = -1; /* Virtual dataset */ + hsize_t dims[2] = {10, 20}; /* Data space current size */ + hsize_t start[2]; /* Hyperslab start */ + hsize_t stride[2]; /* Hyperslab stride */ + hsize_t count[2]; /* Hyperslab count */ + hsize_t block[2]; /* Hyperslab block */ + hsize_t coord[10]; /* Point selection array */ + int buf[10][20]; /* Write and expecte read buffer */ + int rbuf[10][20]; /* Read buffer */ + int i, j; + + TESTING("basic virtual dataset I/O") + + h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename); + h5_fixname(FILENAME[1], fapl, srcfilename, sizeof srcfilename); + + /* Create DCPL */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + TEST_ERROR + + /* + * Test 1: All - all selection + */ + /* Create source dataspace */ + if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Create virtual dataspace */ + if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select all (should not be necessary, but just to be sure) */ + if(H5Sselect_all(srcspace[0]) < 0) + TEST_ERROR + if(H5Sselect_all(vspace[0]) < 0) + TEST_ERROR + + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset", srcspace[0]) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create source dataset */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] = (i * (int)(sizeof(buf[0]) / sizeof(buf[0][0]))) + j; + + /* Write data directly to source dataset */ + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Close srcdset if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + } /* end if */ + + /* Read data through virtual dataset */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + if(H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != buf[i][j]) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Write data through virtual dataset */ + if(H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Reopen srcdset if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Read data directly from source dataset */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + if(H5Dread(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != buf[i][j]) + TEST_ERROR + + /* Close */ + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + + + /* Close */ + if(H5Pclose(dcpl) < 0) + TEST_ERROR + dcpl = -1; + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) { + if(srcdset[i] >= 0) + (void)H5Dclose(srcdset[i]); + } /* end for */ + if(vdset >= 0) + (void)H5Dclose(vdset); + for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++) { + if(srcfile[i] >= 0) + (void)H5Fclose(srcfile[i]); + } /* end for */ + if(vfile >= 0) + (void)H5Fclose(vfile); + for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) { + if(srcspace[i] >= 0) + (void)H5Sclose(srcspace[i]); + } /* end for */ + for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) { + if(vspace[i] >= 0) + (void)H5Sclose(vspace[i]); + } /* end for */ + if(dcpl >= 0) + (void)H5Pclose(dcpl); + } H5E_END_TRY; + + return 1; +} /* end test_basic_io() */ + + +/*------------------------------------------------------------------------- * Function: main * * Purpose: Tests datasets with virtual layout @@ -983,6 +1191,7 @@ main(void) char filename[FILENAME_BUF_SIZE]; hid_t fapl; int test_api_config; + unsigned bit_config; int nerrors = 0; /* Testing setup */ @@ -993,6 +1202,10 @@ main(void) for(test_api_config = (int)TEST_API_BASIC; test_api_config < (int)TEST_API_NTESTS; test_api_config++) nerrors += test_api((test_api_config_t)test_api_config, fapl); + for(bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) { + printf("Config: %s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "", bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file"); + nerrors += test_basic_io(bit_config, fapl); + } /* end for */ /* Verify symbol table messages are cached */ nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0); -- cgit v0.12 From 92d7b82d61458f9576dc30236b9f9ce03adde9c3 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Mar 2015 15:53:57 -0500 Subject: [svn-r26418] Fix initial indent for selection_all --- tools/lib/h5tools_dump.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 3708ce8..366ca81 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -3161,6 +3161,9 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_str_reset(&buffer); h5tools_print_virtual_selection(&buffer, info, ctx, virtual_vspace, dcpl_id, next); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); -- cgit v0.12 From ca2a0b80c5ca46db7b167cf384bd6e32dfe075c5 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 10 Mar 2015 17:15:20 -0500 Subject: [svn-r26420] Added new example for simple I/O. Modified other examples according to the suggestion in H5VDS-7 (see VDS-178) --- MANIFEST | 3 +- examples/Makefile.am | 5 +- examples/Makefile.in | 5 +- examples/h5_vds-eiger.c | 10 ++- examples/h5_vds-exc.c | 10 ++- examples/h5_vds-exclim.c | 10 ++- examples/h5_vds-simpleIO.c | 186 +++++++++++++++++++++++++++++++++++++++++++++ examples/h5_vds.c | 23 +++--- examples/run-c-ex.sh.in | 8 +- 9 files changed, 229 insertions(+), 31 deletions(-) create mode 100644 examples/h5_vds-simpleIO.c diff --git a/MANIFEST b/MANIFEST index 75c9930..462613b 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,4 @@ -# + # Copyright by The HDF Group. # Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. @@ -156,6 +156,7 @@ ./examples/h5_vds-exc.c ./examples/h5_vds-exclim.c ./examples/h5_vds-eiger.c +./examples/h5_vds-simpleIO.c ./examples/testh5cc.sh.in ./examples/README diff --git a/examples/Makefile.am b/examples/Makefile.am index 667fb3a..7c94190 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -38,7 +38,7 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_crtatt h5_crtgrp h5_crtdat \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc \ - h5_vds-exclim h5_vds-eiger + h5_vds-exclim h5_vds-eiger h5_vds-simpleIO TEST_SCRIPT=testh5cc.sh TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) @@ -50,7 +50,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c \ - h5_vds-exclim.c h5_vds-eiger.c + h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c @@ -123,6 +123,7 @@ h5_vds: $(srcdir)/h5_vds.c h5_vds-exc: $(srcdir)/h5_vds-exc.c h5_vds-exclim: $(srcdir)/h5_vds-exclim.c h5_vds-eiger: $(srcdir)/h5_vds-eiger.c +h5_vds-simpleIO: $(srcdir)/h5_vds-simpleIO.c if BUILD_SHARED_SZIP_CONDITIONAL LD_LIBRARY_PATH=$(LL_PATH) diff --git a/examples/Makefile.in b/examples/Makefile.in index 45a9691..b614977 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -626,7 +626,7 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_crtatt h5_crtgrp h5_crtdat \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc \ - h5_vds-exclim h5_vds-eiger + h5_vds-exclim h5_vds-eiger h5_vds-simpleIO TEST_SCRIPT = testh5cc.sh TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) @@ -639,7 +639,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c \ - h5_vds-exclim.c h5_vds-eiger.c + h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c # The external link examples demonstrate how to use paths; they need @@ -1096,6 +1096,7 @@ h5_vds: $(srcdir)/h5_vds.c h5_vds-exc: $(srcdir)/h5_vds-exc.c h5_vds-exclim: $(srcdir)/h5_vds-exclim.c h5_vds-eiger: $(srcdir)/h5_vds-eiger.c +h5_vds-simpleIO: $(srcdir)/h5_vds-simpleIO.c # How to create EXAMPLEDIR if it doesn't already exist $(EXAMPLEDIR): diff --git a/examples/h5_vds-eiger.c b/examples/h5_vds-eiger.c index d35fc85..93b39b2 100644 --- a/examples/h5_vds-eiger.c +++ b/examples/h5_vds-eiger.c @@ -6,6 +6,7 @@ This file is intended for use with HDF5 Library version 1.10 ************************************************************/ +/* EIP Add link to the picture */ #include "hdf5.h" #include @@ -133,10 +134,10 @@ main (void) if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) { if (H5Sis_regular_hyperslab(vspace)) { status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out); - printf(" start = [%d, %d, %d] \n", (int)start_out[0], (int)start_out[1], (int)start_out[2]); - printf(" stride = [%d, %d, %d] \n", (int)stride_out[0], (int)stride_out[1], (int)stride_out[2]); - printf(" count = [%d, %d, %d] \n", (int)count_out[0], (int)count_out[1], (int)count_out[2]); - printf(" block = [%d, %d, %d] \n", (int)block_out[0], (int)block_out[1], (int)block_out[2]); + printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]); + printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]); + printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]); + printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]); } } /* Get source file name */ @@ -157,6 +158,7 @@ main (void) if(H5Sget_select_type(src_space) == H5S_SEL_ALL) { printf("H5S_ALL \n"); } +/* EIP read data back */ H5Sclose(vspace); H5Sclose(src_space); free(filename); diff --git a/examples/h5_vds-exc.c b/examples/h5_vds-exc.c index ceafe68..509b3e1 100644 --- a/examples/h5_vds-exc.c +++ b/examples/h5_vds-exc.c @@ -5,6 +5,7 @@ This file is intended for use with HDF5 Library version 1.10 ************************************************************/ +/* EIP Add link to the picture */ #include "hdf5.h" #include @@ -171,10 +172,10 @@ main (void) if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) { if (H5Sis_regular_hyperslab(vspace)) { status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out); - printf(" start = [%d, %d, %d] \n", (int)start_out[0], (int)start_out[1], (int)start_out[2]); - printf(" stride = [%d, %d, %d] \n", (int)stride_out[0], (int)stride_out[1], (int)stride_out[2]); - printf(" count = [%d, %d, %d] \n", (int)count_out[0], (int)count_out[1], (int)count_out[2]); - printf(" block = [%d, %d, %d] \n", (int)block_out[0], (int)block_out[1], (int)block_out[2]); + printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]); + printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]); + printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]); + printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]); } } /* Get source file name */ @@ -200,6 +201,7 @@ main (void) free(filename); free(dsetname); } +/* EIP read data back */ /* * Close and release resources. diff --git a/examples/h5_vds-exclim.c b/examples/h5_vds-exclim.c index 0d88442..af39c55 100644 --- a/examples/h5_vds-exclim.c +++ b/examples/h5_vds-exclim.c @@ -6,6 +6,7 @@ This file is intended for use with HDF5 Library version 1.10 ************************************************************/ +/* EIP Add link to the picture */ #include "hdf5.h" #include @@ -172,10 +173,10 @@ main (void) if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) { if (H5Sis_regular_hyperslab(vspace)) { status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out); - printf(" start = [%d, %d, %d] \n", (int)start_out[0], (int)start_out[1], (int)start_out[2]); - printf(" stride = [%d, %d, %d] \n", (int)stride_out[0], (int)stride_out[1], (int)stride_out[2]); - printf(" count = [%d, %d, %d] \n", (int)count_out[0], (int)count_out[1], (int)count_out[2]); - printf(" block = [%d, %d, %d] \n", (int)block_out[0], (int)block_out[1], (int)block_out[2]); + printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]); + printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]); + printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]); + printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]); } } /* Get source file name */ @@ -207,6 +208,7 @@ main (void) free(filename); free(dsetname); } +/* EIP read data back */ /* * Close and release resources. diff --git a/examples/h5_vds-simpleIO.c b/examples/h5_vds-simpleIO.c new file mode 100644 index 0000000..801229c --- /dev/null +++ b/examples/h5_vds-simpleIO.c @@ -0,0 +1,186 @@ +/************************************************************ + + This example illustrates the concept of virtual dataset I/O + The program creates 2-dim source dataset and writes + data to it. Then it creates 2-dim virtual dataset that has + the same dimesnion sizes and maps the all elements of the + virtual dataset to all elements of the source dataset. + Then VDS is read back. + + This file is intended for use with HDF5 Library version 1.10 + + ************************************************************/ +/* EIP Add link to the picture */ + +#include "hdf5.h" +#include +#include + +#define FILE "vds-simpleIO.h5" +#define DATASET "VDS" +#define DIM1 6 +#define DIM0 4 +#define RANK 2 + +#define SRC_FILE "a.h5" +#define SRC_DATASET "/A" + + +int +main (void) +{ + hid_t file, space, src_space, vspace, dset; /* Handles */ + hid_t dcpl; + herr_t status; + hsize_t vdsdims[2] = {DIM0, DIM1}, /* Virtual dataset dimension */ + dims[2] = {DIM0, DIM1}; /* Source dataset dimensions */ + int wdata[DIM0][DIM1], /* Write buffer for source dataset */ + rdata[DIM0][DIM1], /* Read buffer for virtual dataset */ + i, j; + H5D_layout_t layout; /* Storage layout */ + size_t num_map; /* Number of mappings */ + ssize_t len; /* Length of the string; also a return value */ + char *filename; + char *dsetname; + /* + * Initialize data. + */ + for (i = 0; i < DIM0; i++) + for (j = 0; j < DIM1; j++) wdata[i][j] = i+1; + + /* + * Create the source file and the dataset. Write data to the source dataset + * and close all resources. + */ + + file = H5Fcreate (SRC_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + space = H5Screate_simple (RANK, dims, NULL); + dset = H5Dcreate (file, SRC_DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, + wdata[0]); + status = H5Sclose (space); + status = H5Dclose (dset); + status = H5Fclose (file); + + /* Create file in which virtual dataset will be stored. */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* Create VDS dataspace. */ + vspace = H5Screate_simple (RANK, vdsdims, NULL); + + /* Set VDS creation property. */ + dcpl = H5Pcreate (H5P_DATASET_CREATE); + + /* + * Build the mappings. + * Selections in the source datasets are H5S_ALL. + * In the virtual dataset we select the first, the second and the third rows + * and map each row to the data in the corresponding source dataset. + */ + src_space = H5Screate_simple (RANK, dims, NULL); + status = H5Pset_virtual (dcpl, vspace, SRC_FILE, SRC_DATASET, src_space); + + /* Create a virtual dataset. */ + dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, + dcpl, H5P_DEFAULT); + status = H5Sclose (vspace); + status = H5Sclose (src_space); + status = H5Dclose (dset); +#ifdef EIP /*Currently the file with VDS should stay open. Neil will fix the issue */ + status = H5Fclose (file); + + /* + * Now we begin the read section of this example. + */ + + /* + * Open the file and virtual dataset. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); +#endif + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + /* + * Get creation property list and mapping properties. + */ + dcpl = H5Dget_create_plist (dset); + + /* + * Get storage layout. + */ + layout = H5Pget_layout (dcpl); + if (H5D_VIRTUAL == layout) + printf(" Dataset has a virtual layout \n"); + else + printf(" Wrong layout found \n"); + + /* + * Find the number of mappings. + */ + status = H5Pget_virtual_count (dcpl, &num_map); + printf(" Number of mappings is %d\n", num_map); + + /* + * Get mapping parameters for each mapping. + */ + for (i = 0; i < (int)num_map; i++) { + printf(" Mapping %d \n", i); + printf(" Selection in the virtual dataset "); + /* Get selection in the virttual dataset */ + vspace = H5Pget_virtual_vspace (dcpl, (size_t)i); + + /* Make sure it is ALL selection and then print selection. */ + if(H5Sget_select_type(vspace) == H5S_SEL_ALL) { + printf("Selection is H5S_ALL \n"); + } + /* Get source file name. */ + len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0); + filename = (char *)malloc((size_t)len*sizeof(char)+1); + H5Pget_virtual_filename (dcpl, (size_t)i, filename, len+1); + printf(" Source filename %s\n", filename); + + /* Get source dataset name. */ + len = H5Pget_virtual_dsetname (dcpl, (size_t)i, NULL, 0); + dsetname = (char *)malloc((size_t)len*sizeof(char)+1); + H5Pget_virtual_dsetname (dcpl, (size_t)i, dsetname, len+1); + printf(" Source dataset name %s\n", dsetname); + + /* Get selection in the source dataset. */ + printf(" Selection in the source dataset "); + src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i); + + /* Make sure it is ALL selection and then print selection. */ + if(H5Sget_select_type(src_space) == H5S_SEL_ALL) { + printf("Selection is H5S_ALL \n"); + } + H5Sclose(vspace); + H5Sclose(src_space); + free(filename); + free(dsetname); + } + /* + * Read the data using the default properties. + */ + status = H5Dread (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, + rdata[0]); + + /* + * Output the data to the screen. + */ + printf (" VDS Data:\n"); + for (i=0; i @@ -47,9 +48,9 @@ main (void) hid_t file, space, src_space, vspace, dset; /* Handles */ hid_t dcpl; herr_t status; - hsize_t vdsdims[2] = {VDSDIM0, VDSDIM1}, /* Virtual satasets dimension */ - dims[1] = {DIM0}, /* Source datasets dimensions */ - start[2], /* Hyperslab parameters */ + hsize_t vdsdims[2] = {VDSDIM0, VDSDIM1}, /* Virtual datasets dimension */ + dims[1] = {DIM0}, /* Source datasets dimensions */ + start[2], /* Hyperslab parameters */ stride[2], count[2], block[2]; @@ -156,19 +157,19 @@ main (void) if (H5D_VIRTUAL == layout) printf(" Dataset has a virtual layout \n"); else - printf("Wrong layout found \n"); + printf(" Wrong layout found \n"); /* * Find the number of mappings. */ status = H5Pget_virtual_count (dcpl, &num_map); - printf("Number of mappings is %d\n", num_map); + printf(" Number of mappings is %d\n", num_map); /* * Get mapping parameters for each mapping. */ for (i = 0; i < (int)num_map; i++) { - printf("Mapping %d \n", i); + printf(" Mapping %d \n", i); printf(" Selection in the virtual dataset "); /* Get selection in the virttual dataset */ vspace = H5Pget_virtual_vspace (dcpl, (size_t)i); @@ -190,10 +191,10 @@ main (void) /* We also can use new APIs to get start, stride, count and block */ if (H5Sis_regular_hyperslab(vspace)) { status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out); - printf(" start = [%d, %d] \n", (int)start_out[0], (int)start_out[1]); - printf(" stride = [%d, %d] \n", (int)stride_out[0], (int)stride_out[1]); - printf(" count = [%d, %d] \n", (int)count_out[0], (int)count_out[1]); - printf(" block = [%d, %d] \n", (int)block_out[0], (int)block_out[1]); + printf(" start = [%llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1]); + printf(" stride = [%llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1]); + printf(" count = [%llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1]); + printf(" block = [%llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1]); } } /* Get source file name. */ @@ -223,7 +224,7 @@ main (void) free(buf); } -#ifdef LATER +#ifdef EIP /* * Read the data using the default properties. */ diff --git a/examples/run-c-ex.sh.in b/examples/run-c-ex.sh.in index b41d89d..6bbd6de 100644 --- a/examples/run-c-ex.sh.in +++ b/examples/run-c-ex.sh.in @@ -127,11 +127,13 @@ then RunTest h5_shared_mesg &&\ rm h5_shared_mesg &&\ RunTest h5_vds-eiger &&\ - rm h5_vds-eiger&&\ + rm h5_vds-eiger &&\ RunTest h5_vds-exclim &&\ - rm h5_vds-exclim&&\ + rm h5_vds-exclim &&\ RunTest h5_vds-exc &&\ - rm h5_vds-exc&&\ + rm h5_vds-exc &&\ + RunTest h5_vds-simpleIO &&\ + rm h5_vds-simpleIO &&\ RunTest h5_vds &&\ rm h5_vds); then EXIT_VALUE=${EXIT_SUCCESS} -- cgit v0.12 From 2c365915e16a5c2d1289dfff4f08ba826fc77e6b Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 10 Mar 2015 17:16:48 -0500 Subject: [svn-r26421] This is Neils' change exposed when I ran bin/reconfigure for examples. --- test/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Makefile.in b/test/Makefile.in index 539bea4..0ca6ff8 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1105,7 +1105,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 accum.h5 \ earray.h5 efc[0-5].h5 log_vfd_out.log new_multi_file_v16-r.h5 \ new_multi_file_v16-s.h5 split_get_file_image_test-m.h5 \ split_get_file_image_test-r.h5 file_image_core_test.h5.copy \ - unregister_filter_1.h5 unregister_filter_2.h5 vds_1.h5 + unregister_filter_1.h5 unregister_filter_2.h5 vds_[1-2].h5 # Test script for error_test and err_compat TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh \ -- cgit v0.12 From e1fed18477d574f41f5151cc7eb67c03d0868e07 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 11 Mar 2015 09:25:20 -0500 Subject: [svn-r26431] Add new example (reorder to match closer to makefile) --- examples/CMakeLists.txt | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index cfb0e11..5a5b8c2 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -10,20 +10,20 @@ add_definitions (${HDF_EXTRA_C_FLAGS}) # Define Sources #----------------------------------------------------------------------------- set (examples - h5_crtdat - h5_rdwt - h5_crtatt - h5_crtgrp - h5_crtgrpar - h5_crtgrpd - h5_cmprss - h5_extend - h5_subset h5_write h5_read h5_extend_write h5_chunk_read h5_compound + h5_crtgrpar + h5_crtgrpd + h5_subset + h5_cmprss + h5_crtdat + h5_rdwt + h5_crtatt + h5_extend + h5_crtgrp h5_group h5_select h5_attribute @@ -34,10 +34,11 @@ set (examples h5_extlink h5_elink_unix2win h5_shared_mesg - h5_vds-eiger - h5_vds-exclim - h5_vds-exc h5_vds + h5_vds-exc + h5_vds-exclim + h5_vds-eiger + h5_vds-simpleIO ) foreach (example ${examples}) -- cgit v0.12 From 4edde43ae55d061314c3ee3ab46d0b98e49539c0 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 12 Mar 2015 16:22:48 -0500 Subject: [svn-r26440] Added new structure, removed ";", used static hyperslab arrays. --- tools/lib/h5tools.h | 13 +++++++------ tools/lib/h5tools_dump.c | 35 +++++++++++++++++++++++++++++++---- tools/lib/h5tools_str.c | 30 ++++++++++-------------------- 3 files changed, 48 insertions(+), 30 deletions(-) diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index cf841e5..6512f9b 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -95,13 +95,14 @@ #define PACKED_LENGTH "LENGTH" #define VDS_VIRTUAL "VIRTUAL" #define VDS_MAPPING "MAPPING" -#define VDS_REG_HYPERSLAB "REGULAR_HYPERSLAB" -#define VDS_IRR_HYPERSLAB "IRREGULAR_HYPERSLAB" +#define VDS_SOURCE "SOURCE" +#define VDS_REG_HYPERSLAB "SELECTION REGULAR_HYPERSLAB" +#define VDS_IRR_HYPERSLAB "SELECTION IRREGULAR_HYPERSLAB" #define VDS_POINT "POINT" -#define VDS_SRC_FILE "SRC_FILE" -#define VDS_SRC_DATASET "SRC_DATASET" -#define VDS_NONE "SELECTION_NONE" -#define VDS_ALL "SELECTION_ALL" +#define VDS_SRC_FILE "FILE" +#define VDS_SRC_DATASET "DATASET" +#define VDS_NONE "SELECTION NONE" +#define VDS_ALL "SELECTION ALL" #define BEGIN "{" #define END "}" diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 366ca81..66d6cea 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -181,13 +181,13 @@ BLOCK, /*blockbegin */ ")", /*dataspacedimend */ "", /*virtualselectionbegin */ -";", /*virtualselectionend */ +"", /*virtualselectionend */ "{", /*virtualselectionblockbegin */ "}", /*virtualselectionblockend */ "\"", /*virtualfilenamebeginbegin */ -"\";", /*virtualfilenamebeginend */ +"\"", /*virtualfilenamebeginend */ "\"", /*virtualdatasetnamebegin */ -"\";", /*virtualdtatasetnameend */ +"\"", /*virtualdtatasetnameend */ }; const h5tools_dump_header_t* h5tools_dump_header_format; @@ -3165,9 +3165,30 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s %s", VDS_VIRTUAL, BEGIN); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + + ctx->indent_level++; + + h5tools_str_reset(&buffer); h5tools_print_virtual_selection(&buffer, info, ctx, virtual_vspace, dcpl_id, next); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + ctx->indent_level--; + + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", END); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s %s", VDS_SOURCE, BEGIN); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + + ctx->indent_level++; + ssize_out = H5Pget_virtual_filename(dcpl_id, next, NULL, 0); H5Pget_virtual_filename(dcpl_id, next, name, sizeof(name)); ssize_out = H5Pget_virtual_dsetname(dcpl_id, next, NULL, 0); @@ -3191,11 +3212,17 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnameend); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + h5tools_str_reset(&buffer); + h5tools_print_virtual_selection(&buffer, info, ctx, virtual_srcspace, dcpl_id, next); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + + ctx->indent_level--; + ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_print_virtual_selection(&buffer, info, ctx, virtual_srcspace, dcpl_id, next); + h5tools_str_append(&buffer, "%s", END); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->indent_level--; diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 6aab146..8302c48 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -432,17 +432,12 @@ void h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace, const h5tool_format_t *info, h5tools_context_t *ctx) { - hsize_t *start; - hsize_t *stride; - hsize_t *count; - hsize_t *block; - int j; - int ndims = H5Sget_simple_extent_ndims(rspace); - - start = (hsize_t *)malloc(sizeof(hsize_t) * ndims); - stride = (hsize_t *)malloc(sizeof(hsize_t) * ndims); - count = (hsize_t *)malloc(sizeof(hsize_t) * ndims); - block = (hsize_t *)malloc(sizeof(hsize_t) * ndims); + hsize_t start[H5S_MAX_RANK]; + hsize_t stride[H5S_MAX_RANK]; + hsize_t count[H5S_MAX_RANK]; + hsize_t block[H5S_MAX_RANK]; + int j; + int ndims = H5Sget_simple_extent_ndims(rspace); H5Sget_regular_hyperslab(rspace, start, stride, count, block); @@ -454,7 +449,7 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace, h5tools_str_append(str, "%s ", START); for (j = 0; j < ndims; j++) h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", start[j]); - h5tools_str_append(str, ");"); + h5tools_str_append(str, ")"); h5tools_str_append(str, "%s", "\n"); h5tools_str_indent(str, info, ctx); @@ -462,7 +457,7 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace, h5tools_str_append(str, "%s ", STRIDE); for (j = 0; j < ndims; j++) h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", stride[j]); - h5tools_str_append(str, ");"); + h5tools_str_append(str, ")"); h5tools_str_append(str, "%s", "\n"); h5tools_str_indent(str, info, ctx); @@ -474,7 +469,7 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace, else h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", count[j]); } - h5tools_str_append(str, ");"); + h5tools_str_append(str, ")"); h5tools_str_append(str, "%s", "\n"); h5tools_str_indent(str, info, ctx); @@ -486,14 +481,9 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace, else h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", block[j]); } - h5tools_str_append(str, ");"); + h5tools_str_append(str, ")"); h5tools_str_append(str, "%s", "\n"); h5tools_str_indent(str, info, ctx); - - HDfree(block); - HDfree(count); - HDfree(stride); - HDfree(start); } /*------------------------------------------------------------------------- -- cgit v0.12 From 66a9948e65001a47f984c8f76a53f46faf9929ec Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 12 Mar 2015 17:29:59 -0500 Subject: [svn-r26442] Removed blank line and fixed ALL output --- tools/lib/h5tools_dump.c | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 66d6cea..96587d7 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -225,8 +225,13 @@ void h5tools_print_dims(h5tools_str_t *buffer, hsize_t *s, int dims); void h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, struct subset_t *sset, int dims); -void h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *info, h5tools_context_t *ctx, - hid_t vspace, hid_t dcpl_id, size_t index); +void h5tools_print_virtual_selection(hid_t vspace, hid_t dcpl_id, size_t index, + FILE *stream, const h5tool_format_t *info, + h5tools_context_t *ctx/*in,out*/, + h5tools_str_t *buffer/*string into which to render */, + hsize_t *curr_pos/*total data element position*/, + size_t ncols, hsize_t region_elmt_counter/*element counter*/, + hsize_t elmt_counter); void h5tools_dump_init(void) @@ -2862,20 +2867,30 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, *------------------------------------------------------------------------- */ void -h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *info, h5tools_context_t *ctx, - hid_t vspace, hid_t dcpl_id, size_t index) +h5tools_print_virtual_selection(hid_t vspace, hid_t dcpl_id, size_t index, + FILE *stream, const h5tool_format_t *info, + h5tools_context_t *ctx/*in,out*/, + h5tools_str_t *buffer/*string into which to render */, + hsize_t *curr_pos/*total data element position*/, + size_t ncols, hsize_t region_elmt_counter/*element counter*/, + hsize_t elmt_counter) { - h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionbegin); switch(H5Sget_select_type(vspace)) { case H5S_SEL_NONE: /* Nothing selected */ + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s", VDS_NONE); break; case H5S_SEL_POINTS: /* Sequence of points selected */ + h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s %s ", VDS_POINT, h5tools_dump_header_format->virtualselectionblockbegin); h5tools_str_dump_space_points(buffer, vspace, info); h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */ + h5tools_str_reset(buffer); if (H5Sis_regular_hyperslab(vspace)) { h5tools_str_append(buffer, "%s %s ", VDS_REG_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin); h5tools_str_dump_space_slabs(buffer, vspace, info, ctx); @@ -2887,12 +2902,16 @@ h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *in h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_ALL: /* Entire extent selected */ + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s", VDS_ALL); break; default: h5tools_str_append(buffer, "Unknown Selection"); } - h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionend); + h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); } @@ -3170,12 +3189,13 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; - h5tools_str_reset(&buffer); - h5tools_print_virtual_selection(&buffer, info, ctx, virtual_vspace, dcpl_id, next); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + h5tools_print_virtual_selection(virtual_vspace, dcpl_id, next, stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->indent_level--; + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", END); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); @@ -3212,9 +3232,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnameend); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - h5tools_str_reset(&buffer); - h5tools_print_virtual_selection(&buffer, info, ctx, virtual_srcspace, dcpl_id, next); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + h5tools_print_virtual_selection(virtual_vspace, dcpl_id, next, stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->indent_level--; -- cgit v0.12 From 424826d0dd492cb734e166b7154e2db456f6a13a Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 17 Mar 2015 15:02:05 -0500 Subject: [svn-r26469] INCOMPLETE, UNWORKING CODE Commit progress through 3/17/15 --- src/H5Ddeprec.c | 48 ++-------- src/H5Dio.c | 2 +- src/H5Dlayout.c | 7 +- src/H5Dvirtual.c | 44 +++++++-- src/H5Oprivate.h | 9 ++ src/H5Pdcpl.c | 7 +- src/H5Shyper.c | 275 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- src/H5Sselect.c | 74 ++++++++------- test/vds.c | 155 +++++++++++++++++++++++++++++++ 9 files changed, 535 insertions(+), 86 deletions(-) diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c index 04cf032..021c8df 100644 --- a/src/H5Ddeprec.c +++ b/src/H5Ddeprec.c @@ -226,15 +226,10 @@ hid_t H5Dopen1(hid_t loc_id, const char *name) { H5D_t *dset = NULL; - H5G_loc_t loc; /* Object location of group */ - H5G_loc_t dset_loc; /* Object location of dataset */ - H5G_name_t path; /* Dataset group hier. path */ - H5O_loc_t oloc; /* Dataset object location */ - H5O_type_t obj_type; /* Type of object at location */ - hbool_t loc_found = FALSE; /* Location at 'name' found */ - hid_t dapl_id = H5P_DATASET_ACCESS_DEFAULT; /* dapl to use to open dataset */ - hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datset */ - hid_t ret_value; + H5G_loc_t loc; /* Object location of group */ + hid_t dapl_id = H5P_DATASET_ACCESS_DEFAULT; /* dapl to use to open dataset */ + hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datset */ + hid_t ret_value; FUNC_ENTER_API(FAIL) H5TRACE2("i", "i*s", loc_id, name); @@ -245,45 +240,22 @@ H5Dopen1(hid_t loc_id, const char *name) if(!name || !*name) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name") - /* Set up dataset location to fill in */ - dset_loc.oloc = &oloc; - dset_loc.path = &path; - H5G_loc_reset(&dset_loc); - - /* Find the dataset object */ - if(H5G_loc_find(&loc, name, &dset_loc, H5P_DEFAULT, dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "not found") - loc_found = TRUE; - - /* Check that the object found is the correct type */ - if(H5O_obj_type(&oloc, &obj_type, dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object type") - if(obj_type != H5O_TYPE_DATASET) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset") - /* Open the dataset */ - if(NULL == (dset = H5D_open(&dset_loc, dapl_id, dxpl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open dataset") + if(NULL == (dset = H5D__open_name(&loc, name, dapl_id, dxpl_id))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset") /* Register an atom for the dataset */ if((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "can't register dataset atom") done: - if(ret_value < 0) { - if(dset != NULL) { - if(H5D_close(dset) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset") - } /* end if */ - else { - if(loc_found && H5G_loc_free(&dset_loc) < 0) - HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location") - } /* end else */ - } /* end if */ + if(ret_value < 0) + if(dset && H5D_close(dset) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset") FUNC_LEAVE_API(ret_value) } /* end H5Dopen1() */ - +#error /*------------------------------------------------------------------------- * Function: H5Dextend diff --git a/src/H5Dio.c b/src/H5Dio.c index 296e529..5ec1db4 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -616,7 +616,7 @@ H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, char fake_char; /* Temporary variable for NULL buffer pointers */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_TAG(dxpl_id, dataset->oloc.addr, FAIL) + FUNC_ENTER_PACKAGE_TAG(dxpl_id, dataset->oloc.addr, FAIL) /* check args */ HDassert(dataset && dataset->oloc.file); diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index 4da0443..fea57fe 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -455,9 +455,12 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t HDassert(dataset->shared->layout.storage.u.virt.list || (dataset->shared->layout.storage.u.virt.list_nused == 0)); /* Patch the virtual selection dataspaces */ - for(i = 0; i < dataset->shared->layout.storage.u.virt.list_nused; i++) + for(i = 0; i < dataset->shared->layout.storage.u.virt.list_nused; i++) { + HDassert(dataset->shared->layout.storage.u.virt.list[i].virtual_space_status == H5O_VIRTUAL_STATUS_INVALID); if(H5S_extent_copy(dataset->shared->layout.storage.u.virt.list[i].virtual_select, dataset->shared->space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") + dataset->shared->layout.storage.u.virt.list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; + } /* end for */ } /* end block */ break; @@ -470,7 +473,7 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__layout_oh_read() */ - +#error /*------------------------------------------------------------------------- * Function: H5D__layout_oh_write diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index ac7af54..cbcb97b 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -228,7 +228,15 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, if(NULL == (virtual_ent->source_dset = H5D__open_name(&src_root_loc, virtual_ent->source_dset_name, H5P_DATASET_ACCESS_DEFAULT, dxpl_id))) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset") + /* Patch the source selection if necessary */ + if(virtual_ent->source_space_status != H5O_VIRTUAL_STATUS_CORRECT) { + if(H5S_extent_copy(virtual_ent->source_select, virtual_ent->source_dset->shared->space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") + virtual_ent->source_space_status = H5O_VIRTUAL_STATUS_CORRECT; + } /* end if */ + done: + /* Close source file */ if(src_file_open) if(H5F_try_close(src_file) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEFILE, FAIL, "can't close source file") @@ -341,13 +349,25 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5D__virtual_construct(H5F_t UNUSED *f, H5D_t UNUSED *dset) +H5D__virtual_construct(H5F_t UNUSED *f, H5D_t *dset) { - FUNC_ENTER_STATIC_NOERR + size_t i; + herr_t ret_value = SUCCEED; - /* No-op for now VDSINC */ + FUNC_ENTER_STATIC - FUNC_LEAVE_NOAPI(SUCCEED) + HDassert(dataset->shared->layout.storage.u.virt.list || (dataset->shared->layout.storage.u.virt.list_nused == 0)); + + /* Patch the virtual selection dataspaces */ + for(i = 0; i < dset->shared->layout.storage.u.virt.list_nused; i++) { + HDassert(dset->shared->layout.storage.u.virt.list[i].virtual_space_status == H5O_VIRTUAL_STATUS_USER); + if(H5S_extent_copy(dset->shared->layout.storage.u.virt.list[i].virtual_select, dset->shared->space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") + dset->shared->layout.storage.u.virt.list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; + } /* end for */ + +done: + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_construct() */ @@ -443,6 +463,10 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) { + /* Sanity check that both spaces have been patched by now */ + HDassert(storage->list[i].source_space_status == H5O_VIRTUAL_STATUS_CORRECT); + HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); + /* Project intersection of file space and mapping virtual space onto * memory space */ if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].virtual_select, &projected_mem_space) < 0) @@ -459,7 +483,8 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, if((opened_dset = H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], io_info->dxpl_id)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") if(!opened_dset) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "did not open source dataset") + /* Fill with fill value */ + HDassert(0 && "Not yet implemented...");//VDSINC } /* end if */ /* Project intersection of file space and mapping virtual space onto @@ -538,12 +563,16 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) { + /* Sanity check that both spaces have been patched by now */ + HDassert(storage->list[i].source_space_status == H5O_VIRTUAL_STATUS_CORRECT); + HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); + /* Project intersection of file space and mapping virtual space onto * memory space */ if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].virtual_select, &projected_mem_space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") - /* Get number of elements in projected dataspace */ + /* Get number of elements in projected dataspace */ if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(projected_mem_space)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") @@ -551,6 +580,7 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, if(nelmts > 0) { /* Open source dataset, fail if cannot open */ if(!storage->list[i].source_dset) { + //VDSINC check all source datasets before any I/O. Also for read? if((opened_dset = H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], io_info->dxpl_id)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") if(!opened_dset) @@ -641,4 +671,4 @@ H5D__virtual_copy(H5F_t UNUSED *f_src, const H5O_storage_virtual_t UNUSED *stora FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__virtual_copy() */ - +#error diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index ac8d02f..7c69a01 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -412,6 +412,13 @@ typedef struct H5O_storage_compact_t { void *buf; /* Buffer for compact dataset */ } H5O_storage_compact_t; +typedef enum H5O_virtual_space_status_t { + H5O_VIRTUAL_STATUS_INVALID = 0, /* Space extent is invalid */ + H5O_VIRTUAL_STATUS_SEL_BOUNDS, /* Space extent set to bounds of selection */ + H5O_VIRTUAL_STATUS_USER, /* Space extent provided by application */ + H5O_VIRTUAL_STATUS_CORRECT /* Space extent matches dataset */ +} H5O_virtual_space_status_t; + typedef struct H5O_storage_virtual_ent_t { /* Stored */ char *source_file_name; /* Source file name used for virtual dataset mapping */ @@ -421,6 +428,8 @@ typedef struct H5O_storage_virtual_ent_t { /* Not stored */ struct H5D_t *source_dset; /* Source dataset */ + H5O_virtual_space_status_t source_space_status; /* Extent patching status of source_select */ + H5O_virtual_space_status_t virtual_space_status; /* Extent patching status of virtual_select */ } H5O_storage_virtual_ent_t; typedef struct H5O_storage_virtual_t { diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 9c5833d..3739be6 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1615,7 +1615,8 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, if(NULL == (src_space = (H5S_t *)H5I_object_verify(src_space_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") - //VDSINC add check for overlaping virtual spaces + //VDSINC add check for overlapping virtual spaces and same number of + // elements in vspace and src_space #ifndef H5_HAVE_C99_DESIGNATED_INITIALIZER /* If the compiler doesn't support C99 designated initializers, check if @@ -1668,6 +1669,8 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection") if(NULL == (layout.storage.u.virt.list[layout.storage.u.virt.list_nused].virtual_select = H5S_copy(vspace, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_space_status = H5O_VIRTUAL_STATUS_USER; + layout.storage.u.virt.list[layout.storage.u.virt.list_nused].virtual_space_status = H5O_VIRTUAL_STATUS_USER; layout.storage.u.virt.list_nused++; adding_entry = FALSE; @@ -1699,7 +1702,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_virtual() */ - +#error /*------------------------------------------------------------------------- * Function: H5Pget_virtual_count diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 9b1562f..b62184a 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -8794,7 +8794,7 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t /* Make certain that we don't write too many */ actual_elem = MIN3(leftover, (size_t)iter->elmt_left, maxelem); - /* initialize row sizes for each dimension */ + /* Initialize row sizes for each dimension */ elem_size = iter->elmt_size; for(i = (int)fast_dim, acc = elem_size; i >= 0; i--) { slab[i] = acc; @@ -8863,6 +8863,279 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t /*-------------------------------------------------------------------------- NAME + H5S__hyper_project_intersection + PURPOSE + Projects the intersection of of the selections of src_space and + src_intersect_space within the selection of src_space as a selection + within the selection of dst_space + USAGE + VDSINC + RETURNS + Non-negative on success/Negative on failure. + DESCRIPTION + Projects the intersection of of the selections of src_space and + src_intersect_space within the selection of src_space as a selection + within the selection of dst_space. The result is placed in the + selection of proj_space. Note src_space, dst_space, and + src_intersect_space do not need to use hyperslab selections, but they + cannot use point selections. The result is always a hyperslab + selection. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, + const H5S_t *src_intersect_space, H5S_t *proj_space) +{ + hsize_t ss_off[H5S_PROJECT_INTERSECT_NSEQS]; + size_t ss_len[H5S_PROJECT_INTERSECT_NSEQS]; + size_t ss_nseq; + size_t ss_i; + H5S_sel_iter_t ss_iter; + hbool_t ss_iter_init = FALSE; + hsize_t ss_sel_off; + hsize_t ds_off[H5S_PROJECT_INTERSECT_NSEQS]; + size_t ds_len[H5S_PROJECT_INTERSECT_NSEQS]; + size_t ds_nseq; + size_t ds_i; + H5S_sel_iter_t ds_iter; + hbool_t ds_iter_init = FALSE; + hsize_t ds_sel_off; + hsize_t sis_off[H5S_PROJECT_INTERSECT_NSEQS]; + size_t sis_len[H5S_PROJECT_INTERSECT_NSEQS]; + size_t sis_nseq; + size_t sis_i; + H5S_sel_iter_t sis_iter; + hbool_t sis_iter_init = FALSE; + hsize_t proj_down_dims[H5S_MAX_RANK]; + H5S_hyper_span_info_t *curr_span_tree[H5S_MAX_RANK]; + H5S_hyper_span_t *prev_span[H5S_MAX_RANK]; + unsigned proj_rank; + unsigned i; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_PACKAGE + + /* Check parameters */ + HDassert(src_space); + HDassert(dst_space); + HDassert(src_intersect_space); + HDassert(proj_space); + + /* Assert that src_space and dst_space have same # of elements in selection, + * src_space and src_intersect_space have same extent, and no point + * selections? */ + + /* Initialize prev_space and curr_span_tree */ + for(i = 0; i < H5S_MAX_RANK; i++) { + curr_span_tree[i] = NULL; + prev_span[i] = NULL; + } /* end for */ + + /* Save rank of projected space */ + proj_rank = proj_space->extent.rank; + HDassert(proj_rank > 0); + + /* Calculate proj_down_dims (note loop relies on unsigned i wrapping around) + */ + proj_down_dims[proj_rank - 1] = proj_space->extend.size[proj_rank - 1]; + if(proj_rank > 1) + for(i = proj_rank - 2; i < proj_rank; i--) + proj_down_dims[i] = proj_space->extend.size[i] * proj_down_dims[i + 1]; + + /* Init, get sequence lists, loop, etc VDSINC */ + /* Remove current selection from proj_space */ + if(H5S_SELECT_RELEASE(proj_space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release hyperslab") + + /* Allocate space for the hyperslab selection information (note this sets + * diminfo_valid to FALSE, diminfo arrays to 0, and span list to NULL) */ + if((proj_space->select.sel_info.hslab = H5FL_CALLOC(H5S_hyper_sel_t))==NULL) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab info") + + /* Set selection type */ + proj_space->select.type = H5S_sel_hyper; + + /* Initialize source space iterator */ + if(H5S_select_iter_init(&ss_iter, src_space, (size_t)1) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") + ss_iter_init = TRUE; + + /* Get sequence list for source space */ + if(H5S_SELECT_GET_SEQ_LIST(src_space, 0u, &ss_iter, H5S_PROJECT_INTERSECT_NSEQS, (size_t)-1, &ss_nseq, &nelem, ss_off, ss_len) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + + /* Initialize destination space iterator */ + if(H5S_select_iter_init(&ds_iter, dst_space, (size_t)1) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") + ds_iter_init = TRUE; + + /* Get sequence list for destination space */ + if(H5S_SELECT_GET_SEQ_LIST(dst_space, 0u, &ds_iter, H5S_PROJECT_INTERSECT_NSEQS, (size_t)-1, &ds_nseq, &nelem, ds_off, ds_len) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") + + /* Initialize source intersect space iterator */ + if(H5S_select_iter_init(&sis_iter, src_intersect_space, (size_t)1) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") + sis_iter_init = TRUE; + + /* Get sequence list for source intersect space */ + if(H5S_SELECT_GET_SEQ_LIST(src_intersect_space, 0u, &sis_iter, H5S_PROJECT_INTERSECT_NSEQS, (size_t)-1, &sis_nseq, &nelem, sis_off, sis_len) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + + /* Make sure all sequences are non-empty */ + if((ss_nseq > 0) && (ds_nseq > 0) && (sis_nseq > 0)) { + /* Loop until we run out of sequences in either the source or source + * intersect space */ + while(1) { + if(ss_off[ss_i] + ss_len[ss_i] <= sis_off[sis_i]) { + /* Sequences do not intersect, advance source space */ + ss_sel_off += (hsize_t)ss_len[ss_i]; + if(++ss_i == ss_nseq) { + /* Try to grab more sequences from src_space. If there are + * no more then we are done, otherwise reset the source + * space index. */ + if(H5S_SELECT_GET_SEQ_LIST(src_space, 0u, &ss_iter, H5S_PROJECT_INTERSECT_NSEQS, (size_t)-1, &ss_nseq, &nelem, ss_off, ss_len) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + if(ss_nseq == 0) + break; + else { + HDassert(0 && "Checking code coverage..."); //VDSINC + ss_i = 0; + } //VDSINC + } /* end if */ + } /* end if */ + else if(sis_off[sis_i] + sis_len[sis_i] <= ss_off[ss_i]) { + if(++sis_i == sis_nseq) { + /* Try to grab more sequences from src_intersect_space. If + * there are no more then we are done, otherwise reset the + * source intersect space index. */ + if(H5S_SELECT_GET_SEQ_LIST(src_intersect_space, 0u, &sis_iter, H5S_PROJECT_INTERSECT_NSEQS, (size_t)-1, &sis_nseq, &nelem, sis_off, sis_len) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + if(sis_nseq == 0) + break; + else { + HDassert(0 && "Checking code coverage..."); //VDSINC + sis_i = 0; + } //VDSINC + } /* end if */ + } /* end if */ + else { + /* Sequences intersect, add intersection to projected space */ + /* Calculate intersection sequence */ + if(ss_off[ss_i] >= sis_off[sis_i]) { + HDassert(0 && "Checking code coverage..."); //VDSINC + int_sel_off = ss_sel_off; + } //VDSINC + else { + HDassert(0 && "Checking code coverage..."); //VDSINC + int_sel_off = sis_off[sis_i] - ss_off[ss_i] + ss_sel_off; + } //VDSINC + int_len = (size_t)(MIN(ss_off[ss_i] + (hsize_t)ss_len[ss_i], + sis_off[sis_i] + (hsize_t)sis_len[sis_i]) - tmp_off); + + /* Project to destination */ + while(int_len > (size_t)0) { + while(ds_sel_off + (hsize_t)ds_len[ds_i] <= int_sel_off) { + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Intersection is not projected to this destination + * sequence, advance destination space */ + ds_sel_off += (hsize_t)ds_len[ds_i]; + if(++ds_i == ds_nseq) { + /* Try to grab more sequences from dst_space. If + * there are no more then we are done, otherwise + * reset the destination space index. */ + if(H5S_SELECT_GET_SEQ_LIST(dst_space, 0u, H5S_sel_iter_t *iter, H5S_PROJECT_INTERSECT_NSEQS, (size_t)-1, &sis_nseq, &nelem, sis_off, sis_len) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + if(sis_nseq == 0) + break; + else { + HDassert(0 && "Checking code coverage..."); //VDSINC + sis_i = 0; + } //VDSINC + } /* end if */ + } /* end while */ + + /* Add sequence to projected space */ + HDassert(ds_sel_off <= int_sel_off); + proj_off = ds_off[ds_i] + int_sel_off - ds_sel_off; + proj_len = (size_t)((hsize_t)ds_len[ds_i] + ds_sel_off + - int_sel_off); + + /* Add to span tree */ + while(proj_len > (size_t)0) { + /* Check for more than one full row (in every dim) and + * append multiple spans at once? -NAF */ + /* Append spans in higher dimensions if we're going + * ouside the plan of the span currently being built + * (i.e. they're finished being built) */ + for(i = proj_rank - 1; ((i > 0) + && ((up_dim = proj_off / proj_down_dims[i]) + != curr_span_dim[i - 1]) + && curr_span_tree[i]); + i--) { + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Append complete lower dimension span tree to + * current dimension */ + if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], up_dim, up_dim, curr_span_tree[i], NULL) < 0) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + + /* Reset lower dimension's span tree and previous + * span since we just committed it and will start + * over with a new one */ + curr_span_tree[i] = NULL; + prev_span[i] = NULL; + } /* end for */ + + /* Compute bounds for new span in lowest dimension */ + low = proj_off % proj_down_dims[proj_rank - 1]; + high = MAX(low + (hsize_t)proj_len, + proj_space->extent.size[proj_rank - 1]); + + /* Append span in lowest dimension */ + if(H5S_hyper_append_span(&prev_span[proj_rank - 1], &curr_span_tree[proj_rank - 1], low, high, NULL, NULL) < 0) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + + /* Update remaining offset and length */ + proj_off += high - low; + proj_len -= (size_t)(high - low); + } /* end while */ + + /* Update intersection sequence */ + int_sel_off += (hsize_t)proj_len; + int_len -= proj_len; + } /* end while */ + } /* end else */ + } /* end while */ + } /* end if */ + + /* Back off proj_off by 1 so it's guaranteed to point to the right dimension + * for the current span tree in every rank except the lowest */ + proj_off--; + + /* Add remaining spans to span tree */ + for(i = proj_rank - 1; i > 0; i--) { + if(curr_span_tree[i]) { + HDassert(prev_span[i]); + up_dim = proj_off / proj_down_dims[i]; + /* Append remaining span tree to higher dimension */ + if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], up_dim, up_dim, curr_span_tree[i], NULL) < 0) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + + /* Reset lower dimension's span tree and previous span since we just + * committed it and will start over with a new one */ + curr_span_tree[i] = NULL; + prev_span[i] = NULL; + + + /* Add span tree to proj_space VDSINC */ + /* If we did not add anything to proj_space, select none instead VDSINC */ + + +/*-------------------------------------------------------------------------- + NAME H5Sis_regular_hyperslab PURPOSE Determine if a hyperslab selection is regular diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 4085e7f..24ec7bb 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -2138,48 +2138,52 @@ H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, HDassert(src_intersect_space); HDassert(new_space_ptr); - /* Create new space, using dst extent. Start wil "all" selection. */ + /* Create new space, using dst extent. Start with "all" selection. */ if(NULL == (new_space = H5S_create(H5S_SIMPLE))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "unable to create output dataspace") if(H5S_extent_copy_real(&new_space->extent, &dst_space->extent, TRUE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy destination space extent") - /* Check intersecting space's selection type */ - switch(src_intersect_space->select.type->type) { - case H5S_SEL_NONE: - /* Since the intersecting space is "none", the intersection has no - * selection and so does the projection. Change to "none" selection - */ - if(H5S_select_none(new_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") - - break; - - case H5S_SEL_POINTS: - HDassert(0 && "Not yet implemented...");//VDSINC - - break; + /* If the intersecting space is "all", the intersection must be equal to the + * source space and the projection must be equal to the destination space */ + if(src_intersect_space->select.type->type == H5S_SEL_ALL) { + /* Copy the destination selection. */ + if(H5S_select_copy(new_space, dst_space, FALSE) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy destination space selection") + } /* end if */ + /* If any of the spaces are "none", the projection must also be "none" */ + else if((src_intersect_space->select.type->type == H5S_SEL_NONE) + || (src_space->select.type->type == H5S_SEL_NONE) + || (dst_space->select.type->type == H5S_SEL_NONE)) { + /* Change to "none" selection */ + if(H5S_select_none(new_space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + } /* end if */ + /* If any of the spaces use point selection, fall back to general algorithm + */ + else if((src_intersect_space->select.type->type == H5S_SEL_POINTS) + || (src_space->select.type->type == H5S_SEL_POINTS) + || (dst_space->select.type->type == H5S_SEL_POINTS)) { + HDassert(0 && "Not yet implemented...");//VDSINC + else { + HDassert(src_intersect_space->select.type->type == H5S_SEL_HYPERSLABS); + /* Intersecting space is hyperslab selection. If source space is set to + * all, use simpler algorithm, otherwise use general hyperslab algorithm + * (in either case if the destination space is al; the hyperslab + * routines will convert the destination selection to a span tree to use + * the same algorithm as with hyperslabs). */ + if(dst_space->select.type->type == H5S_SEL_ALL) { + HDassert(0 && "Checking code coverage...");//VDSINC + /* Project src_intersect_space onto dst_space selection */ + if(H5S_hyper_project_to_hs(src_intersect_space, dst_space, new_space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't project hyperslab ondot destination selection") + } /* end if */ + else { + HDassert(dst_space->select.type->type == H5S_SEL_HYPERSLABS); - case H5S_SEL_HYPERSLABS: HDassert(0 && "Not yet implemented...");//VDSINC - - break; - - case H5S_SEL_ALL: - /* Since the intersecting space is "all", the intersection must be - * equal to the source space and the projection must be equal to the - * destination space. Copy the destination selection. - */ - if(H5S_select_copy(new_space, dst_space, FALSE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy destination space selection") - - break; - - case H5S_SEL_ERROR: - case H5S_SEL_N: - default: - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "invalid source dataspace selection type") - } /* end switch */ + } /* end else */ + } /* end else */ /* load the address of the new space into *new_space_ptr */ *new_space_ptr = new_space; diff --git a/test/vds.c b/test/vds.c index 7376fb8..d261cd5 100644 --- a/test/vds.c +++ b/test/vds.c @@ -42,6 +42,7 @@ const char *FILENAME[] = { #define TEST_IO_CLOSE_SRC 0x01u #define TEST_IO_DIFFERENT_FILE 0x02u #define TEST_IO_NTESTS 0x04u +//VDSINC add close source, virtual file #define LIST_DOUBLE_SIZE (H5D_VIRTUAL_DEF_LIST_SIZE + 1) @@ -1133,6 +1134,160 @@ test_basic_io(unsigned config, hid_t fapl) vspace[0] = -1; + /* + * Test 2: 2 Source datasets, hyperslab virtual mappings + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + if((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Create source dataspace */ + dims[1] = 10; + if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select all in source space (should not be necessary, but just to be sure) + */ + if(H5Sselect_all(srcspace[0]) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual spaces */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + start[1] = 10; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Add virtual layout mappings */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2", srcspace[0]) < 0) + TEST_ERROR + + /* Reset dims */ + dims[1] = 20; + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create source datasets */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] = (i * (int)(sizeof(buf[0]) / sizeof(buf[0][0]))) + j; + + /* Write data directly to source datasets */ + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Close srcdsets if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + } /* end if */ + + /* Read data through virtual dataset */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + if(H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != buf[i][j]) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Write data through virtual dataset */ + if(H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Reopen srcdsets if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Read data directly from source datasets */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + if(H5Dread(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + if(H5Dread(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != buf[i][j]) + TEST_ERROR + + /* Close */ + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + if(H5Sclose(vspace[1]) < 0) + TEST_ERROR + vspace[1] = -1; + + /* Close */ if(H5Pclose(dcpl) < 0) TEST_ERROR -- cgit v0.12 From 4cfe53284bb6c3f7f57ff70af6ceb7396683aaa4 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 18 Mar 2015 16:53:49 -0500 Subject: [svn-r26476] Add support for I/O in all cases with fixed size datasets and no point selections. Add source dataspace extent patching (should allow closing the source file). Note fill values and various other features are not yet supported. Note there are still some code coverage assertions in the selection matching algorithm - if you hit these try taking them out. Note make check still fails in h5dump test (unrelated to this checkin). Tested: ummon --- src/H5Ddeprec.c | 2 +- src/H5Dlayout.c | 13 +-- src/H5Dvirtual.c | 69 ++++++++----- src/H5Pdcpl.c | 2 +- src/H5Sall.c | 1 + src/H5Shyper.c | 309 +++++++++++++++++++++++++++++++++++++------------------ src/H5Spkg.h | 6 ++ src/H5Sselect.c | 28 ++--- 8 files changed, 279 insertions(+), 151 deletions(-) diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c index 021c8df..63df5b7 100644 --- a/src/H5Ddeprec.c +++ b/src/H5Ddeprec.c @@ -255,7 +255,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Dopen1() */ -#error + /*------------------------------------------------------------------------- * Function: H5Dextend diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index fea57fe..87e1bc8 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -454,12 +454,13 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t HDassert(dataset->shared->layout.storage.u.virt.list || (dataset->shared->layout.storage.u.virt.list_nused == 0)); - /* Patch the virtual selection dataspaces */ + /* Patch the virtual selection dataspaces if necessary */ for(i = 0; i < dataset->shared->layout.storage.u.virt.list_nused; i++) { - HDassert(dataset->shared->layout.storage.u.virt.list[i].virtual_space_status == H5O_VIRTUAL_STATUS_INVALID); - if(H5S_extent_copy(dataset->shared->layout.storage.u.virt.list[i].virtual_select, dataset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") - dataset->shared->layout.storage.u.virt.list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; + if(dataset->shared->layout.storage.u.virt.list[i].virtual_space_status != H5O_VIRTUAL_STATUS_CORRECT) { + if(H5S_extent_copy(dataset->shared->layout.storage.u.virt.list[i].virtual_select, dataset->shared->space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") + dataset->shared->layout.storage.u.virt.list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; + } /* end if */ } /* end for */ } /* end block */ break; @@ -473,7 +474,7 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__layout_oh_read() */ -#error + /*------------------------------------------------------------------------- * Function: H5D__layout_oh_write diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index cbcb97b..3d957a2 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -141,7 +141,7 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "unable to allocate memory for virtual dataset entry list") layout->storage.u.virt.list_nalloc = layout->storage.u.virt.list_nused; - /* Copy the list entries */ + /* Copy the list entries, though set source_dset to NULL */ for(i = 0; i < layout->storage.u.virt.list_nused; i++) { if(NULL == (layout->storage.u.virt.list[i].source_file_name = HDstrdup(orig_list[i].source_file_name))) @@ -155,6 +155,9 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) if(NULL == (layout->storage.u.virt.list[i].virtual_select = H5S_copy(orig_list[i].virtual_select, FALSE, TRUE))) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + layout->storage.u.virt.list[i].source_dset = NULL; + layout->storage.u.virt.list[i].source_space_status = orig_list[i].source_space_status; + layout->storage.u.virt.list[i].virtual_space_status = orig_list[i].virtual_space_status; } /* end for */ } /* end if */ else { @@ -356,7 +359,7 @@ H5D__virtual_construct(H5F_t UNUSED *f, H5D_t *dset) FUNC_ENTER_STATIC - HDassert(dataset->shared->layout.storage.u.virt.list || (dataset->shared->layout.storage.u.virt.list_nused == 0)); + HDassert(dset->shared->layout.storage.u.virt.list || (dset->shared->layout.storage.u.virt.list_nused == 0)); /* Patch the virtual selection dataspaces */ for(i = 0; i < dset->shared->layout.storage.u.virt.list_nused; i++) { @@ -386,14 +389,13 @@ done: *------------------------------------------------------------------------- */ hbool_t -H5D__virtual_is_space_alloc(const H5O_storage_t *storage) +H5D__virtual_is_space_alloc(const H5O_storage_t UNUSED *storage) { hbool_t ret_value; /* Return value */ FUNC_ENTER_PACKAGE_NOERR - /* Need to decide what to do here. For now just return TRUE if the global - * heap block has been allocated. VDSINC */ + /* Need to decide what to do here. For now just return TRUE VDSINC */ ret_value = TRUE;//storage->u.virt.serial_list_hobjid.addr != HADDR_UNDEF; FUNC_LEAVE_NOAPI(ret_value) @@ -463,8 +465,7 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) { - /* Sanity check that both spaces have been patched by now */ - HDassert(storage->list[i].source_space_status == H5O_VIRTUAL_STATUS_CORRECT); + /* Sanity check that the virtual space has been patched by now */ HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); /* Project intersection of file space and mapping virtual space onto @@ -478,28 +479,36 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Only perform I/O if there are any elements */ if(nelmts > 0) { - /* Open source dataset, fail if cannot open */ + /* Open source dataset */ if(!storage->list[i].source_dset) { + /* Try to open dataset */ if((opened_dset = H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], io_info->dxpl_id)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") - if(!opened_dset) - /* Fill with fill value */ - HDassert(0 && "Not yet implemented...");//VDSINC - } /* end if */ - /* Project intersection of file space and mapping virtual space onto - * mapping source space */ - if(H5S_select_project_intersection(storage->list[i].virtual_select, storage->list[i].source_select, file_space, &projected_src_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto source space") - - /* Perform read on source dataset */ - if(H5D__read(storage->list[i].source_dset, type_info->dst_type_id, projected_mem_space, projected_src_space, io_info->dxpl_id, io_info->u.rbuf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read source dataset") + if(opened_dset) + /* Sanity check that the source space has been patched by now */ + HDassert(storage->list[i].source_space_status == H5O_VIRTUAL_STATUS_CORRECT); + } /* end if */ - /* Close projected_src_space */ - if(H5S_close(projected_src_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") - projected_src_space = NULL; + /* Check if source dataset is open */ + if(storage->list[i].source_dset) { + /* Project intersection of file space and mapping virtual space onto + * mapping source space */ + if(H5S_select_project_intersection(storage->list[i].virtual_select, storage->list[i].source_select, file_space, &projected_src_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto source space") + + /* Perform read on source dataset */ + if(H5D__read(storage->list[i].source_dset, type_info->dst_type_id, projected_mem_space, projected_src_space, io_info->dxpl_id, io_info->u.rbuf) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read source dataset") + + /* Close projected_src_space */ + if(H5S_close(projected_src_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") + projected_src_space = NULL; + } /* end if */ + else + /* We do not have a source dataset open, fill with fill value */ + HDassert(0 && "Not yet implemented...");//VDSINC } /* end if */ /* Close projected_mem_space */ @@ -563,8 +572,7 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) { - /* Sanity check that both spaces have been patched by now */ - HDassert(storage->list[i].source_space_status == H5O_VIRTUAL_STATUS_CORRECT); + /* Sanity check that virtual space has been patched by now */ HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); /* Project intersection of file space and mapping virtual space onto @@ -580,13 +588,18 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, if(nelmts > 0) { /* Open source dataset, fail if cannot open */ if(!storage->list[i].source_dset) { - //VDSINC check all source datasets before any I/O. Also for read? + //VDSINC check all source datasets before any I/O if((opened_dset = H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], io_info->dxpl_id)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") if(!opened_dset) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "did not open source dataset") + + /* Sanity check that source space has been patched by now */ + HDassert(storage->list[i].source_space_status == H5O_VIRTUAL_STATUS_CORRECT); } /* end if */ + /* Extend source dataset if necessary and there is an unlimited + * dimension VDSINC */ /* Project intersection of file space and mapping virtual space onto * mapping source space */ if(H5S_select_project_intersection(storage->list[i].virtual_select, storage->list[i].source_select, file_space, &projected_src_space) < 0) @@ -671,4 +684,4 @@ H5D__virtual_copy(H5F_t UNUSED *f_src, const H5O_storage_virtual_t UNUSED *stora FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__virtual_copy() */ -#error + diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 3739be6..b9b4653 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1702,7 +1702,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_virtual() */ -#error + /*------------------------------------------------------------------------- * Function: H5Pget_virtual_count diff --git a/src/H5Sall.c b/src/H5Sall.c index 1105915..bbb2935 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -976,6 +976,7 @@ H5S_all_get_seq_list(const H5S_t UNUSED *space, unsigned UNUSED flags, H5S_sel_i /* Determine the actual number of elements to use */ H5_CHECK_OVERFLOW(iter->elmt_left,hsize_t,size_t); elem_used=MIN(maxelem,(size_t)iter->elmt_left); + HDassert(elem_used > 0); /* Compute the offset in the dataset */ off[0]=iter->u.all.byte_offset; diff --git a/src/H5Shyper.c b/src/H5Shyper.c index b62184a..c64f1c9 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -3193,13 +3193,15 @@ H5S_hyper_release(H5S_t *space) space->select.num_elem = 0; /* Release irregular hyperslab information */ - if(space->select.sel_info.hslab->span_lst != NULL) { - if(H5S_hyper_free_span_info(space->select.sel_info.hslab->span_lst) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans") - } /* end if */ + if(space->select.sel_info.hslab) { + if(space->select.sel_info.hslab->span_lst != NULL) { + if(H5S_hyper_free_span_info(space->select.sel_info.hslab->span_lst) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans") + } /* end if */ - /* Release space for the hyperslab selection information */ - space->select.sel_info.hslab = H5FL_FREE(H5S_hyper_sel_t, space->select.sel_info.hslab); + /* Release space for the hyperslab selection information */ + space->select.sel_info.hslab = H5FL_FREE(H5S_hyper_sel_t, space->select.sel_info.hslab); + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -8892,27 +8894,42 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, hsize_t ss_off[H5S_PROJECT_INTERSECT_NSEQS]; size_t ss_len[H5S_PROJECT_INTERSECT_NSEQS]; size_t ss_nseq; - size_t ss_i; + size_t ss_nelem; + size_t ss_i = (size_t)0; + hbool_t advance_ss = FALSE; H5S_sel_iter_t ss_iter; hbool_t ss_iter_init = FALSE; - hsize_t ss_sel_off; + hsize_t ss_sel_off = (hsize_t)0; hsize_t ds_off[H5S_PROJECT_INTERSECT_NSEQS]; size_t ds_len[H5S_PROJECT_INTERSECT_NSEQS]; size_t ds_nseq; - size_t ds_i; + size_t ds_nelem; + size_t ds_i = (size_t)0; H5S_sel_iter_t ds_iter; hbool_t ds_iter_init = FALSE; - hsize_t ds_sel_off; + hsize_t ds_sel_off = (hsize_t)0; hsize_t sis_off[H5S_PROJECT_INTERSECT_NSEQS]; size_t sis_len[H5S_PROJECT_INTERSECT_NSEQS]; size_t sis_nseq; - size_t sis_i; + size_t sis_nelem; + size_t sis_i = (size_t)0; + hbool_t advance_sis = FALSE; H5S_sel_iter_t sis_iter; hbool_t sis_iter_init = FALSE; + hsize_t int_sel_off; + size_t int_len; + hsize_t proj_off; + size_t proj_len; + size_t proj_len_rem; hsize_t proj_down_dims[H5S_MAX_RANK]; H5S_hyper_span_info_t *curr_span_tree[H5S_MAX_RANK]; H5S_hyper_span_t *prev_span[H5S_MAX_RANK]; + hsize_t curr_span_dim[H5S_MAX_RANK]; unsigned proj_rank; + hsize_t low; + hsize_t high; + size_t span_len; + size_t nelem; unsigned i; herr_t ret_value = SUCCEED; @@ -8924,36 +8941,41 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, HDassert(src_intersect_space); HDassert(proj_space); - /* Assert that src_space and dst_space have same # of elements in selection, - * src_space and src_intersect_space have same extent, and no point - * selections? */ + /* Assert that src_space and src_intersect_space have same extent and there + * are no point selections? */ - /* Initialize prev_space and curr_span_tree */ + /* Initialize prev_space, curr_span_tree, and curr_span_dim */ for(i = 0; i < H5S_MAX_RANK; i++) { curr_span_tree[i] = NULL; prev_span[i] = NULL; + curr_span_dim[i] = (hsize_t)0; } /* end for */ /* Save rank of projected space */ proj_rank = proj_space->extent.rank; HDassert(proj_rank > 0); + /* Get numbers of elements */ + ss_nelem = (size_t)H5S_GET_SELECT_NPOINTS(src_space); + ds_nelem = (size_t)H5S_GET_SELECT_NPOINTS(dst_space); + sis_nelem = (size_t)H5S_GET_SELECT_NPOINTS(src_intersect_space); + HDassert(ss_nelem == ds_nelem); + /* Calculate proj_down_dims (note loop relies on unsigned i wrapping around) */ - proj_down_dims[proj_rank - 1] = proj_space->extend.size[proj_rank - 1]; + proj_down_dims[proj_rank - 1] = proj_space->extent.size[proj_rank - 1]; if(proj_rank > 1) for(i = proj_rank - 2; i < proj_rank; i--) - proj_down_dims[i] = proj_space->extend.size[i] * proj_down_dims[i + 1]; + proj_down_dims[i] = proj_space->extent.size[i] * proj_down_dims[i + 1]; - /* Init, get sequence lists, loop, etc VDSINC */ /* Remove current selection from proj_space */ if(H5S_SELECT_RELEASE(proj_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release hyperslab") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection") /* Allocate space for the hyperslab selection information (note this sets * diminfo_valid to FALSE, diminfo arrays to 0, and span list to NULL) */ if((proj_space->select.sel_info.hslab = H5FL_CALLOC(H5S_hyper_sel_t))==NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab info") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info") /* Set selection type */ proj_space->select.type = H5S_sel_hyper; @@ -8964,8 +8986,9 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, ss_iter_init = TRUE; /* Get sequence list for source space */ - if(H5S_SELECT_GET_SEQ_LIST(src_space, 0u, &ss_iter, H5S_PROJECT_INTERSECT_NSEQS, (size_t)-1, &ss_nseq, &nelem, ss_off, ss_len) < 0) + if(H5S_SELECT_GET_SEQ_LIST(src_space, 0u, &ss_iter, H5S_PROJECT_INTERSECT_NSEQS, ss_nelem, &ss_nseq, &nelem, ss_off, ss_len) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + ss_nelem -= nelem; /* Initialize destination space iterator */ if(H5S_select_iter_init(&ds_iter, dst_space, (size_t)1) < 0) @@ -8973,8 +8996,9 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, ds_iter_init = TRUE; /* Get sequence list for destination space */ - if(H5S_SELECT_GET_SEQ_LIST(dst_space, 0u, &ds_iter, H5S_PROJECT_INTERSECT_NSEQS, (size_t)-1, &ds_nseq, &nelem, ds_off, ds_len) < 0) + if(H5S_SELECT_GET_SEQ_LIST(dst_space, 0u, &ds_iter, H5S_PROJECT_INTERSECT_NSEQS, ds_nelem, &ds_nseq, &nelem, ds_off, ds_len) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") + ds_nelem -= nelem; /* Initialize source intersect space iterator */ if(H5S_select_iter_init(&sis_iter, src_intersect_space, (size_t)1) < 0) @@ -8982,125 +9006,166 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, sis_iter_init = TRUE; /* Get sequence list for source intersect space */ - if(H5S_SELECT_GET_SEQ_LIST(src_intersect_space, 0u, &sis_iter, H5S_PROJECT_INTERSECT_NSEQS, (size_t)-1, &sis_nseq, &nelem, sis_off, sis_len) < 0) + if(H5S_SELECT_GET_SEQ_LIST(src_intersect_space, 0u, &sis_iter, H5S_PROJECT_INTERSECT_NSEQS, sis_nelem, &sis_nseq, &nelem, sis_off, sis_len) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + sis_nelem -= nelem; /* Make sure all sequences are non-empty */ if((ss_nseq > 0) && (ds_nseq > 0) && (sis_nseq > 0)) { /* Loop until we run out of sequences in either the source or source * intersect space */ while(1) { - if(ss_off[ss_i] + ss_len[ss_i] <= sis_off[sis_i]) { + if(advance_ss || (ss_off[ss_i] + ss_len[ss_i] <= sis_off[sis_i])) { /* Sequences do not intersect, advance source space */ ss_sel_off += (hsize_t)ss_len[ss_i]; if(++ss_i == ss_nseq) { - /* Try to grab more sequences from src_space. If there are - * no more then we are done, otherwise reset the source - * space index. */ - if(H5S_SELECT_GET_SEQ_LIST(src_space, 0u, &ss_iter, H5S_PROJECT_INTERSECT_NSEQS, (size_t)-1, &ss_nseq, &nelem, ss_off, ss_len) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") - if(ss_nseq == 0) - break; - else { + if(ss_nelem > 0) { HDassert(0 && "Checking code coverage..."); //VDSINC + /* Try to grab more sequences from src_space */ + if(H5S_SELECT_GET_SEQ_LIST(src_space, 0u, &ss_iter, H5S_PROJECT_INTERSECT_NSEQS, ss_nelem, &ss_nseq, &nelem, ss_off, ss_len) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + HDassert(ss_len[0] > 0); + + /* Update ss_nelem */ + HDassert(nelem > 0); + HDassert(nelem <= ss_nelem); + ss_nelem -= nelem; + + /* Reset source space index */ ss_i = 0; - } //VDSINC + } /* end if */ + else + /* There are no more sequences in src_space, so we can + * exit the loop */ + break; } /* end if */ + + /* Reset advance_ss */ + advance_ss = FALSE; } /* end if */ - else if(sis_off[sis_i] + sis_len[sis_i] <= ss_off[ss_i]) { + else if(advance_sis + || (sis_off[sis_i] + sis_len[sis_i] <= ss_off[ss_i])) { if(++sis_i == sis_nseq) { - /* Try to grab more sequences from src_intersect_space. If - * there are no more then we are done, otherwise reset the - * source intersect space index. */ - if(H5S_SELECT_GET_SEQ_LIST(src_intersect_space, 0u, &sis_iter, H5S_PROJECT_INTERSECT_NSEQS, (size_t)-1, &sis_nseq, &nelem, sis_off, sis_len) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") - if(sis_nseq == 0) - break; - else { - HDassert(0 && "Checking code coverage..."); //VDSINC + if(sis_nelem > 0) { + /* Try to grab more sequences from src_intersect_space + */ + if(H5S_SELECT_GET_SEQ_LIST(src_intersect_space, 0u, &sis_iter, H5S_PROJECT_INTERSECT_NSEQS, sis_nelem, &sis_nseq, &nelem, sis_off, sis_len) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + HDassert(sis_len[0] > 0); + + /* Update ss_nelem */ + HDassert(nelem > 0); + HDassert(nelem <= sis_nelem); + sis_nelem -= nelem; + + /* Reset source space index */ sis_i = 0; - } //VDSINC + } /* end if */ + else + /* There are no more sequences in src_intersect_space, + * so we can exit the loop */ + break; } /* end if */ + + /* Reset advance_sis */ + advance_sis = FALSE; } /* end if */ else { /* Sequences intersect, add intersection to projected space */ - /* Calculate intersection sequence */ - if(ss_off[ss_i] >= sis_off[sis_i]) { - HDassert(0 && "Checking code coverage..."); //VDSINC + /* Calculate intersection sequence and advance any sequences we + * complete */ + if(ss_off[ss_i] >= sis_off[sis_i]) int_sel_off = ss_sel_off; - } //VDSINC - else { - HDassert(0 && "Checking code coverage..."); //VDSINC + else int_sel_off = sis_off[sis_i] - ss_off[ss_i] + ss_sel_off; - } //VDSINC - int_len = (size_t)(MIN(ss_off[ss_i] + (hsize_t)ss_len[ss_i], - sis_off[sis_i] + (hsize_t)sis_len[sis_i]) - tmp_off); + if((ss_off[ss_i] + (hsize_t)ss_len[ss_i]) <= (sis_off[sis_i] + + (hsize_t)sis_len[sis_i])) { + int_len = (size_t)(ss_off[ss_i] + (hsize_t)ss_len[ss_i] - int_sel_off); + advance_ss = TRUE; + } /* end if */ + else + int_len = (size_t)(sis_off[sis_i] + (hsize_t)sis_len[sis_i] - int_sel_off); + if((ss_off[ss_i] + (hsize_t)ss_len[ss_i]) >= (sis_off[sis_i] + + (hsize_t)sis_len[sis_i])) + advance_sis = TRUE; /* Project to destination */ while(int_len > (size_t)0) { while(ds_sel_off + (hsize_t)ds_len[ds_i] <= int_sel_off) { - HDassert(0 && "Checking code coverage..."); //VDSINC /* Intersection is not projected to this destination * sequence, advance destination space */ ds_sel_off += (hsize_t)ds_len[ds_i]; if(++ds_i == ds_nseq) { - /* Try to grab more sequences from dst_space. If - * there are no more then we are done, otherwise - * reset the destination space index. */ - if(H5S_SELECT_GET_SEQ_LIST(dst_space, 0u, H5S_sel_iter_t *iter, H5S_PROJECT_INTERSECT_NSEQS, (size_t)-1, &sis_nseq, &nelem, sis_off, sis_len) < 0) + HDassert(0 && "Checking code coverage..."); //VDSINC + HDassert(sis_nelem > 0); + + /* Try to grab more sequences from dst_space */ + if(H5S_SELECT_GET_SEQ_LIST(dst_space, 0u, &ds_iter, H5S_PROJECT_INTERSECT_NSEQS, ds_nelem, &ds_nseq, &nelem, ds_off, ds_len) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") - if(sis_nseq == 0) - break; - else { - HDassert(0 && "Checking code coverage..."); //VDSINC - sis_i = 0; - } //VDSINC + HDassert(ds_len[0] > 0); + + /* Update ss_nelem */ + HDassert(nelem > 0); + HDassert(nelem <= ds_nelem); + ds_nelem -= nelem; + + /* Reset source space index */ + ds_i = 0; } /* end if */ } /* end while */ /* Add sequence to projected space */ HDassert(ds_sel_off <= int_sel_off); proj_off = ds_off[ds_i] + int_sel_off - ds_sel_off; - proj_len = (size_t)((hsize_t)ds_len[ds_i] + ds_sel_off - - int_sel_off); + proj_len = proj_len_rem = MIN(int_len, (size_t)(ds_sel_off + + (hsize_t)ds_len[ds_i] - int_sel_off + (hsize_t)1)); /* Add to span tree */ - while(proj_len > (size_t)0) { + while(proj_len_rem > (size_t)0) { /* Check for more than one full row (in every dim) and * append multiple spans at once? -NAF */ /* Append spans in higher dimensions if we're going * ouside the plan of the span currently being built * (i.e. they're finished being built) */ for(i = proj_rank - 1; ((i > 0) - && ((up_dim = proj_off / proj_down_dims[i]) - != curr_span_dim[i - 1]) - && curr_span_tree[i]); - i--) { - HDassert(0 && "Checking code coverage..."); //VDSINC - /* Append complete lower dimension span tree to - * current dimension */ - if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], up_dim, up_dim, curr_span_tree[i], NULL) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + && ((proj_off / proj_down_dims[i]) + != curr_span_dim[i - 1])); i--) { + if(curr_span_tree[i]) { + HDassert(prev_span[i]); + + /* Append complete lower dimension span tree to + * current dimension */ + if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], curr_span_dim[i - 1], curr_span_dim[i - 1], curr_span_tree[i], NULL) < 0) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + + /* Reset lower dimension's span tree and previous + * span since we just committed it and will start + * over with a new one */ + if(H5S_hyper_free_span_info(curr_span_tree[i]) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't free span info") + curr_span_tree[i] = NULL; + prev_span[i] = NULL; + } /* end if */ - /* Reset lower dimension's span tree and previous - * span since we just committed it and will start - * over with a new one */ - curr_span_tree[i] = NULL; - prev_span[i] = NULL; + /* Update curr_span_dim */ + curr_span_dim[i - 1] = proj_off / proj_down_dims[i]; } /* end for */ /* Compute bounds for new span in lowest dimension */ low = proj_off % proj_down_dims[proj_rank - 1]; - high = MAX(low + (hsize_t)proj_len, - proj_space->extent.size[proj_rank - 1]); + span_len = MIN(proj_len_rem, + (size_t)(proj_space->extent.size[proj_rank - 1] + - low)); + HDassert(proj_len_rem >= span_len); + high = low + (hsize_t)span_len - (hsize_t)1; /* Append span in lowest dimension */ if(H5S_hyper_append_span(&prev_span[proj_rank - 1], &curr_span_tree[proj_rank - 1], low, high, NULL, NULL) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") /* Update remaining offset and length */ - proj_off += high - low; - proj_len -= (size_t)(high - low); + proj_off += (hsize_t)span_len; + proj_len_rem -= span_len; } /* end while */ /* Update intersection sequence */ @@ -9111,27 +9176,75 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, } /* end while */ } /* end if */ - /* Back off proj_off by 1 so it's guaranteed to point to the right dimension - * for the current span tree in every rank except the lowest */ - proj_off--; - /* Add remaining spans to span tree */ - for(i = proj_rank - 1; i > 0; i--) { + for(i = proj_rank - 1; i > 0; i--) if(curr_span_tree[i]) { HDassert(prev_span[i]); - up_dim = proj_off / proj_down_dims[i]; + /* Append remaining span tree to higher dimension */ - if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], up_dim, up_dim, curr_span_tree[i], NULL) < 0) + if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], curr_span_dim[i - 1], curr_span_dim[i - 1], curr_span_tree[i], NULL) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") - /* Reset lower dimension's span tree and previous span since we just - * committed it and will start over with a new one */ + /* Reset span tree */ + if(H5S_hyper_free_span_info(curr_span_tree[i]) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't free span info") curr_span_tree[i] = NULL; - prev_span[i] = NULL; - + } /* end if */ + + /* Add span tree to proj_space */ + if(curr_span_tree[0]) { + proj_space->select.sel_info.hslab->span_lst = curr_span_tree[0]; + curr_span_tree[0] = NULL; - /* Add span tree to proj_space VDSINC */ - /* If we did not add anything to proj_space, select none instead VDSINC */ + /* Set the number of elements in current selection */ + proj_space->select.num_elem = H5S_hyper_spans_nelem(proj_space->select.sel_info.hslab->span_lst); + + /* Attempt to rebuild "optimized" start/stride/count/block information. + * from resulting hyperslab span tree */ + if(H5S_hyper_rebuild(proj_space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't rebuild hyperslab info") + } /* end if */ + else { + HDassert(0 && "Checking code coverage..."); //VDSINC + /* If we did not add anything to proj_space, select none instead */ + if(H5S_select_none(proj_space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection") + } /* end else */ + + +done: + /* Release source selection iterator */ + if(ss_iter_init) + if(H5S_SELECT_ITER_RELEASE(&ss_iter) < 0) + HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection iterator") + + /* Release destination selection iterator */ + if(ds_iter_init) + if(H5S_SELECT_ITER_RELEASE(&ds_iter) < 0) + HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection iterator") + + /* Release source intersect selection iterator */ + if(sis_iter_init) + if(H5S_SELECT_ITER_RELEASE(&sis_iter) < 0) + HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection iterator") + + /* Cleanup on error */ + if(ret_value < 0) { + /* Remove current selection from proj_space */ + if(H5S_SELECT_RELEASE(proj_space) < 0) + HDONE_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection") + + /* Free span trees */ + for(i = 0; i < proj_rank; i++) + if(curr_span_tree[i]) { + if(H5S_hyper_free_span_info(curr_span_tree[i]) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't free span info") + curr_span_tree[i] = NULL; + } /* end if */ + } /* end if */ + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5S__hyper_project_intersection() */ /*-------------------------------------------------------------------------- diff --git a/src/H5Spkg.h b/src/H5Spkg.h index f5511fb..8613fd7 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -34,6 +34,9 @@ #define H5S_VALID_MAX 0x01 #define H5S_VALID_PERM 0x02 +/* Length of stack-allocated sequences for "project intersect" routines */ +#define H5S_PROJECT_INTERSECT_NSEQS 256 + /* Initial version of the dataspace information */ #define H5O_SDSPACE_VERSION_1 1 @@ -249,6 +252,9 @@ H5_DLL herr_t H5S_extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max); /* Operations on selections */ +H5_DLL herr_t H5S__hyper_project_intersection(const H5S_t *src_space, + const H5S_t *dst_space, const H5S_t *src_intersect_space, + H5S_t *proj_space); /* Testing functions */ #ifdef H5S_TESTING diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 24ec7bb..ed384e5 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -2128,6 +2128,7 @@ H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, const H5S_t *src_intersect_space, H5S_t **new_space_ptr) { H5S_t *new_space = NULL; /* New dataspace constructed */ + unsigned i; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -2144,6 +2145,11 @@ H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, if(H5S_extent_copy_real(&new_space->extent, &dst_space->extent, TRUE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy destination space extent") + /* Set offset to zeros */ + for(i = 0; i < new_space->extent.rank; i++) + new_space->select.offset[i] = 0; + new_space->select.offset_changed = FALSE; + /* If the intersecting space is "all", the intersection must be equal to the * source space and the projection must be equal to the destination space */ if(src_intersect_space->select.type->type == H5S_SEL_ALL) { @@ -2163,26 +2169,14 @@ H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, */ else if((src_intersect_space->select.type->type == H5S_SEL_POINTS) || (src_space->select.type->type == H5S_SEL_POINTS) - || (dst_space->select.type->type == H5S_SEL_POINTS)) { + || (dst_space->select.type->type == H5S_SEL_POINTS)) HDassert(0 && "Not yet implemented...");//VDSINC else { HDassert(src_intersect_space->select.type->type == H5S_SEL_HYPERSLABS); - /* Intersecting space is hyperslab selection. If source space is set to - * all, use simpler algorithm, otherwise use general hyperslab algorithm - * (in either case if the destination space is al; the hyperslab - * routines will convert the destination selection to a span tree to use - * the same algorithm as with hyperslabs). */ - if(dst_space->select.type->type == H5S_SEL_ALL) { - HDassert(0 && "Checking code coverage...");//VDSINC - /* Project src_intersect_space onto dst_space selection */ - if(H5S_hyper_project_to_hs(src_intersect_space, dst_space, new_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't project hyperslab ondot destination selection") - } /* end if */ - else { - HDassert(dst_space->select.type->type == H5S_SEL_HYPERSLABS); - - HDassert(0 && "Not yet implemented...");//VDSINC - } /* end else */ + /* Intersecting space is hyperslab selection. Call the hyperslab + * routine to project to another hyperslab selection. */ + if(H5S__hyper_project_intersection(src_space, dst_space, src_intersect_space, new_space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't project hyperslab ondot destination selection") } /* end else */ /* load the address of the new space into *new_space_ptr */ -- cgit v0.12 From 43dec53436614341f3597271603b90d41dac5ac2 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 19 Mar 2015 15:04:36 -0500 Subject: [svn-r26482] Opening source files now reuses the flags from the virtual file. Added tests for I/O on virtual dataset with source datasets in unopened files. Note there are still some code coverage assertions in the selection matching algorithm - if you hit these try taking them out. Note make check still fails in h5dump test (unrelated to this checkin). Tested: ummon --- src/H5Dvirtual.c | 2 +- src/H5Shyper.c | 11 ++++++++--- test/vds.c | 29 ++++++++++++++++++++++++----- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 3d957a2..14efe42 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -213,7 +213,7 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, /* Check if we need to open the source file */ if(HDstrcmp(virtual_ent->source_file_name, ".")) { /* Open the source file */ - if(NULL == (src_file = H5F_open(virtual_ent->source_file_name, H5F_ACC_RDONLY, H5P_FILE_CREATE_DEFAULT, H5P_FILE_ACCESS_DEFAULT, dxpl_id))) + if(NULL == (src_file = H5F_open(virtual_ent->source_file_name, H5F_INTENT(vdset->oloc.file) & H5F_ACC_RDWR, H5P_FILE_CREATE_DEFAULT, H5P_FILE_ACCESS_DEFAULT, dxpl_id))) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENFILE, FAIL, "unable to open source file") src_file_open = TRUE; } /* end if */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index c64f1c9..1fd19fe 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -9016,7 +9016,8 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, * intersect space */ while(1) { if(advance_ss || (ss_off[ss_i] + ss_len[ss_i] <= sis_off[sis_i])) { - /* Sequences do not intersect, advance source space */ + /* Either we finished the current source sequence or the + * sequences do not intersect. Advance source space. */ ss_sel_off += (hsize_t)ss_len[ss_i]; if(++ss_i == ss_nseq) { if(ss_nelem > 0) { @@ -9045,8 +9046,12 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, } /* end if */ else if(advance_sis || (sis_off[sis_i] + sis_len[sis_i] <= ss_off[ss_i])) { + /* Either we finished the current source intersect sequence or + * the sequences do not intersect. Advance source intersect + * space. */ if(++sis_i == sis_nseq) { if(sis_nelem > 0) { + HDassert(0 && "Checking code coverage..."); //VDSINC /* Try to grab more sequences from src_intersect_space */ if(H5S_SELECT_GET_SEQ_LIST(src_intersect_space, 0u, &sis_iter, H5S_PROJECT_INTERSECT_NSEQS, sis_nelem, &sis_nseq, &nelem, sis_off, sis_len) < 0) @@ -9125,8 +9130,8 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, /* Check for more than one full row (in every dim) and * append multiple spans at once? -NAF */ /* Append spans in higher dimensions if we're going - * ouside the plan of the span currently being built - * (i.e. they're finished being built) */ + * ouside the plane of the span currently being built + * (i.e. it's finished being built) */ for(i = proj_rank - 1; ((i > 0) && ((proj_off / proj_down_dims[i]) != curr_span_dim[i - 1])); i--) { diff --git a/test/vds.c b/test/vds.c index d261cd5..cc0a9de 100644 --- a/test/vds.c +++ b/test/vds.c @@ -1071,11 +1071,17 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) TEST_ERROR - /* Close srcdset if config option specified */ + /* Close srcdset and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(H5Dclose(srcdset[0]) < 0) TEST_ERROR srcdset[0] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ } /* end if */ /* Read data through virtual dataset */ @@ -1098,10 +1104,14 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) TEST_ERROR - /* Reopen srcdset if config option specified */ - if(config & TEST_IO_CLOSE_SRC) + /* Reopen srcdset and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0) TEST_ERROR + } /* end if */ /* Read data directly from source dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -1211,7 +1221,7 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) TEST_ERROR - /* Close srcdsets if config option specified */ + /* Close srcdsets and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(H5Dclose(srcdset[0]) < 0) TEST_ERROR @@ -1219,6 +1229,12 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Dclose(srcdset[1]) < 0) TEST_ERROR srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ } /* end if */ /* Read data through virtual dataset */ @@ -1241,8 +1257,11 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) TEST_ERROR - /* Reopen srcdsets if config option specified */ + /* Reopen srcdsets and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) -- cgit v0.12 From 13299383ea1ddd9688f343ced7789a8a39f72099 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 24 Mar 2015 15:21:53 -0500 Subject: [svn-r26557] Removed commented VDS read code. tested on jam. --- examples/h5_vds.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/h5_vds.c b/examples/h5_vds.c index 8d19527..e55f73d 100644 --- a/examples/h5_vds.c +++ b/examples/h5_vds.c @@ -224,7 +224,6 @@ main (void) free(buf); } -#ifdef EIP /* * Read the data using the default properties. */ @@ -241,7 +240,6 @@ main (void) printf (" %3d", rdata[i][j]); printf ("]\n"); } -#endif /* * Close and release resources. */ -- cgit v0.12 From e0db90bcc422a1290286e0cae5d561fe765f2e68 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 24 Mar 2015 16:56:52 -0500 Subject: [svn-r26559] Fix error in H5S_extent_copy (needs testing) - would not patch number of elements selected with "all" slections nor reset sharing state. Fix error in H5S__hyper_project_intersection algorithm. Note there are still some code coverage assertions in the selection matching algorithm - if you hit these try taking them out. Note make check still fails in h5dump test (unrelated to this checkin). Tested: ummon --- src/H5S.c | 12 +++++++++++- src/H5Shyper.c | 6 +++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/H5S.c b/src/H5S.c index a548f13..4d6ef76 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -511,10 +511,20 @@ H5S_extent_copy(H5S_t *dst, const H5S_t *src) HDassert(dst); HDassert(src); - /* Copy */ + /* Copy extent */ if(H5S_extent_copy_real(&(dst->extent), &(src->extent), TRUE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent") + /* If the selection is 'all', update the number of elements selected in the + * destination space */ + if(H5S_SEL_ALL == H5S_GET_SELECT_TYPE(dst)) + if(H5S_select_all(dst, FALSE) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + + /* Mark the destination space as no longer shared if it was before */ + if(H5O_msg_reset_share(H5O_SDSPACE_ID, dst) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRESET, FAIL, "can't stop sharing dataspace") + done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_extent_copy() */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 1fd19fe..51460da 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -9085,11 +9085,11 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, int_sel_off = sis_off[sis_i] - ss_off[ss_i] + ss_sel_off; if((ss_off[ss_i] + (hsize_t)ss_len[ss_i]) <= (sis_off[sis_i] + (hsize_t)sis_len[sis_i])) { - int_len = (size_t)(ss_off[ss_i] + (hsize_t)ss_len[ss_i] - int_sel_off); + int_len = (size_t)((hsize_t)ss_len[ss_i] + ss_sel_off - int_sel_off); advance_ss = TRUE; } /* end if */ else - int_len = (size_t)(sis_off[sis_i] + (hsize_t)sis_len[sis_i] - int_sel_off); + int_len = (size_t)(sis_off[sis_i] + (hsize_t)sis_len[sis_i] - ss_off[ss_i] + ss_sel_off - int_sel_off); if((ss_off[ss_i] + (hsize_t)ss_len[ss_i]) >= (sis_off[sis_i] + (hsize_t)sis_len[sis_i])) advance_sis = TRUE; @@ -9102,7 +9102,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, ds_sel_off += (hsize_t)ds_len[ds_i]; if(++ds_i == ds_nseq) { HDassert(0 && "Checking code coverage..."); //VDSINC - HDassert(sis_nelem > 0); + HDassert(ds_nelem > 0); /* Try to grab more sequences from dst_space */ if(H5S_SELECT_GET_SEQ_LIST(dst_space, 0u, &ds_iter, H5S_PROJECT_INTERSECT_NSEQS, ds_nelem, &ds_nseq, &nelem, ds_off, ds_len) < 0) -- cgit v0.12 From f7c38d0a2d0afb5930653298e6c01e984d243272 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 24 Mar 2015 17:43:43 -0500 Subject: [svn-r26562] Added examples for percival use case. --- examples/h5_vds-percival.c | 245 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 245 insertions(+) create mode 100644 examples/h5_vds-percival.c diff --git a/examples/h5_vds-percival.c b/examples/h5_vds-percival.c new file mode 100644 index 0000000..c065368 --- /dev/null +++ b/examples/h5_vds-percival.c @@ -0,0 +1,245 @@ +/************************************************************ + + This example illustrates the concept of the virtual dataset. + Percival use case. Every fifth 10x10 plane in VDS is stored in + the corresponding 3D unlimited dataset. + EIP: For now we will use finite dimension. + There are 4 source datasets total. + This file is intended for use with HDF5 Library version 1.10 + + ************************************************************/ +/* EIP Add link to the picture */ + +#include "hdf5.h" +#include +#include + +#define FILE "vds-percival.h5" +#define DATASET "VDS-Percival" +/* later +#define VDSDIM0 H5S_UNLIMITED +*/ +#define VDSDIM0 40 +#define VDSDIM1 10 +#define VDSDIM2 10 +/* later +#define DIM0 H5S_UNLIMITED +*/ +#define DIM0 10 +#define DIM1 10 +#define DIM2 10 +#define RANK 3 +#define PLANE_STRIDE 4 + +const char *SRC_FILE[] = { + "a.h5", + "b.h5", + "c.h5", + "d.h5" +}; + +const char *SRC_DATASET[] = { + "A", + "B", + "C", + "D" +}; + +int +main (void) +{ + hid_t file, src_space, vspace, + dset; /* Handles */ + hid_t dcpl; + herr_t status; + hsize_t vdsdims[3] = {VDSDIM0, VDSDIM1, VDSDIM2}, + vdsdims_max[3] = {VDSDIM0, VDSDIM1, VDSDIM2}, + dims[3] = {DIM0, DIM1, DIM2}, + dims_max[3] = {DIM0, DIM1, DIM2}, + start[3], /* Hyperslab start parameter for VDS */ + src_start[3], /* Hyperslab start parameter for source dataset */ + stride[3], + count[3], + src_count[3], + block[3]; + hsize_t start_out[3], /* Hyperslab parameter out */ + stride_out[3], + count_out[3], + block_out[3]; + int i, j; + H5D_layout_t layout; /* Storage layout */ + size_t num_map; /* Number of mappings */ + ssize_t len; /* Length of the string; also a return value */ + char *filename; + char *dsetname; + int wdata[DIM0*DIM1*DIM2]; + + /* + * Create source files and datasets. This step is optional. + */ + for (i=0; i < PLANE_STRIDE; i++) { + /* + * Initialize data for i-th source dataset. + */ + for (j = 0; j < DIM0*DIM1*DIM2; j++) wdata[j] = i+1; + + /* + * Create the source files and datasets. Write data to each dataset and + * close all resources. + */ + + file = H5Fcreate (SRC_FILE[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + src_space = H5Screate_simple (RANK, dims, NULL); + dset = H5Dcreate (file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, + wdata); + status = H5Sclose (src_space); + status = H5Dclose (dset); + status = H5Fclose (file); + } + + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* Create VDS dataspace. */ + vspace = H5Screate_simple (RANK, vdsdims, vdsdims_max); + + /* Create dataspaces for the source dataset. */ + src_space = H5Screate_simple (RANK, dims, dims_max); + + /* Create VDS creation property */ + dcpl = H5Pcreate (H5P_DATASET_CREATE); + + /* Initialize hyperslab values */ + + start[0] = 0; + start[1] = 0; + start[2] = 0; + src_start[0] = 0; + src_start[1] = 0; + src_start[2] = 0; + stride[0] = PLANE_STRIDE; /* we will select every fifth plane in VDS */ + stride[1] = 1; + stride[2] = 1; +/* later + count[0] = H5S_UNLIMITED; +*/ + count[0] = VDSDIM0/4; + count[1] = 1; + count[2] = 1; +/* later + src_count[0] = H5S_UNLIMITED; +*/ + src_count[0] = DIM0; + src_count[1] = 1; + src_count[2] = 1; + block[0] = 1; + block[1] = DIM1; + block[2] = DIM2; + + /* + * Build the mappings + * + */ + for (i=0; i < PLANE_STRIDE; i++) { + status = H5Sselect_hyperslab (vspace, H5S_SELECT_SET, start, stride, count, block); + status = H5Sselect_hyperslab (src_space, H5S_SELECT_SET, src_start, NULL, src_count, block); + status = H5Pset_virtual (dcpl, vspace, SRC_FILE[i], SRC_DATASET[i], src_space); + start[0]++; + } + + + /* Create a virtual dataset */ + dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, + dcpl, H5P_DEFAULT); + status = H5Sclose (vspace); + status = H5Sclose (src_space); + status = H5Dclose (dset); + status = H5Fclose (file); + + /* + * Now we begin the read section of this example. + */ + + /* + * Open file and dataset using the default properties. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + + /* + * Get creation property list and mapping properties. + */ + dcpl = H5Dget_create_plist (dset); + + /* + * Get storage layout. + */ + layout = H5Pget_layout (dcpl); + + if (H5D_VIRTUAL == layout) + printf(" Dataset has a virtual layout \n"); + else + printf(" Wrong layout found \n"); + + /* + * Find number of mappings. + */ + status = H5Pget_virtual_count (dcpl, &num_map); + printf(" Number of mappings is %d\n", num_map); + + /* + * Get mapping parameters for each mapping. + */ + for (i = 0; i < (int)num_map; i++) { + printf(" Mapping %d \n", i); + printf(" Selection in the virtual dataset \n"); + /* Get selection in the virttual dataset */ + vspace = H5Pget_virtual_vspace (dcpl, (size_t)i); + if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) { + if (H5Sis_regular_hyperslab(vspace)) { + status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out); + printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]); + printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]); + printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]); + printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]); + } + } + /* Get source file name */ + len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0); + filename = (char *)malloc((size_t)len*sizeof(char)+1); + H5Pget_virtual_filename (dcpl, (size_t)i, filename, len+1); + printf(" Source filename %s\n", filename); + + /* Get source dataset name */ + len = H5Pget_virtual_dsetname (dcpl, (size_t)i, NULL, 0); + dsetname = (char *)malloc((size_t)len*sizeof(char)+1); + H5Pget_virtual_dsetname (dcpl, (size_t)i, dsetname, len+1); + printf(" Source dataset name %s\n", dsetname); + + /* Get selection in the source dataset */ + printf(" Selection in the source dataset \n"); + src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i); + if (H5Sget_select_type(src_space) == H5S_SEL_HYPERSLABS) { + if (H5Sis_regular_hyperslab(src_space)) { + status = H5Sget_regular_hyperslab (src_space, start_out, stride_out, count_out, block_out); + printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]); + printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]); + printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]); + printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]); + } + } + H5Sclose(vspace); + H5Sclose(src_space); + free(filename); + free(dsetname); + } + /* + * Close and release resources. + */ + status = H5Pclose (dcpl); + status = H5Dclose (dset); + status = H5Fclose (file); + return 0; +} + -- cgit v0.12 From 1df431a1f430536a6879df5977c44c01bc3bdd06 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 24 Mar 2015 17:44:43 -0500 Subject: [svn-r26563] Added new percival example to MANFEST. --- MANIFEST | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST b/MANIFEST index 462613b..36dc9e3 100644 --- a/MANIFEST +++ b/MANIFEST @@ -157,6 +157,7 @@ ./examples/h5_vds-exclim.c ./examples/h5_vds-eiger.c ./examples/h5_vds-simpleIO.c +./examples/h5_vds-percival.c ./examples/testh5cc.sh.in ./examples/README -- cgit v0.12 From dd5a13708383634f052ba2c85c8dab21993c6a35 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 24 Mar 2015 17:56:24 -0500 Subject: [svn-r26564] Modified related files after adding example/h5_vds-percival.c Tested on jam. --- examples/CMakeLists.txt | 1 + examples/CMakeTests.cmake | 4 ++++ examples/Makefile.am | 5 +++-- examples/Makefile.in | 5 +++-- examples/run-c-ex.sh.in | 2 ++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 5a5b8c2..50d865b 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -39,6 +39,7 @@ set (examples h5_vds-exclim h5_vds-eiger h5_vds-simpleIO + h5_vds-percival ) foreach (example ${examples}) diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake index 50da442..2d1a828 100644 --- a/examples/CMakeTests.cmake +++ b/examples/CMakeTests.cmake @@ -44,6 +44,10 @@ u2w/u2w_target.h5 vds.h5 vds-excalibur.h5 + vds-exclim.h5 + vds-percival.h5 + vds-simpleIO.h5 + vds-eiger.h5 ) if (NOT "${last_test}" STREQUAL "") set_tests_properties (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test}) diff --git a/examples/Makefile.am b/examples/Makefile.am index 7c94190..b67a788 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -38,7 +38,7 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_crtatt h5_crtgrp h5_crtdat \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc \ - h5_vds-exclim h5_vds-eiger h5_vds-simpleIO + h5_vds-exclim h5_vds-eiger h5_vds-simpleIO h5_vds-percival TEST_SCRIPT=testh5cc.sh TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) @@ -50,7 +50,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c \ - h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c + h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c h5_vds-percival.c @@ -124,6 +124,7 @@ h5_vds-exc: $(srcdir)/h5_vds-exc.c h5_vds-exclim: $(srcdir)/h5_vds-exclim.c h5_vds-eiger: $(srcdir)/h5_vds-eiger.c h5_vds-simpleIO: $(srcdir)/h5_vds-simpleIO.c +h5_vds-percival: $(srcdir)/h5_vds-percival.c if BUILD_SHARED_SZIP_CONDITIONAL LD_LIBRARY_PATH=$(LL_PATH) diff --git a/examples/Makefile.in b/examples/Makefile.in index b614977..b1958d8 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -626,7 +626,7 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_crtatt h5_crtgrp h5_crtdat \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc \ - h5_vds-exclim h5_vds-eiger h5_vds-simpleIO + h5_vds-exclim h5_vds-eiger h5_vds-simpleIO h5_vds-percival TEST_SCRIPT = testh5cc.sh TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) @@ -639,7 +639,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c \ - h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c + h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c h5_vds-percival.c # The external link examples demonstrate how to use paths; they need @@ -1097,6 +1097,7 @@ h5_vds-exc: $(srcdir)/h5_vds-exc.c h5_vds-exclim: $(srcdir)/h5_vds-exclim.c h5_vds-eiger: $(srcdir)/h5_vds-eiger.c h5_vds-simpleIO: $(srcdir)/h5_vds-simpleIO.c +h5_vds-percival: $(srcdir)/h5_vds-percival.c # How to create EXAMPLEDIR if it doesn't already exist $(EXAMPLEDIR): diff --git a/examples/run-c-ex.sh.in b/examples/run-c-ex.sh.in index 6bbd6de..0d4ada4 100644 --- a/examples/run-c-ex.sh.in +++ b/examples/run-c-ex.sh.in @@ -134,6 +134,8 @@ then rm h5_vds-exc &&\ RunTest h5_vds-simpleIO &&\ rm h5_vds-simpleIO &&\ + RunTest h5_vds-percival &&\ + rm h5_vds-percival &&\ RunTest h5_vds &&\ rm h5_vds); then EXIT_VALUE=${EXIT_SUCCESS} -- cgit v0.12 From b8551d25ccecf49e3541b0087b8649f0ef572b54 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 24 Mar 2015 18:02:37 -0500 Subject: [svn-r26565] Since fill values for VDS do not work at this point initialized the read buffer to show that VDS data is read correctly, leaving unmapped data untouched. Tested on jam. --- examples/h5_vds.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/h5_vds.c b/examples/h5_vds.c index e55f73d..7e128db 100644 --- a/examples/h5_vds.c +++ b/examples/h5_vds.c @@ -223,6 +223,11 @@ main (void) free(dsetname); free(buf); } + /* EIP Initialize read buffer with -2 since fille values for VDS are not implemented yet */ + for (i=0; i Date: Tue, 24 Mar 2015 18:23:18 -0500 Subject: [svn-r26566] Fix error in H5S__hyper_project_intersection algorithm. Note there are still some code coverage assertions in the selection matching algorithm - if you hit these try taking them out. Note make check still fails in h5dump test (unrelated to this checkin). Tested: ummon --- src/H5Shyper.c | 13 ++--- test/vds.c | 164 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 171 insertions(+), 6 deletions(-) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 51460da..f866e5d 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -9077,8 +9077,8 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, } /* end if */ else { /* Sequences intersect, add intersection to projected space */ - /* Calculate intersection sequence and advance any sequences we - * complete */ + /* Calculate intersection sequence in terms of offset within + * source selection and advance any sequences we complete */ if(ss_off[ss_i] >= sis_off[sis_i]) int_sel_off = ss_sel_off; else @@ -9094,7 +9094,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, + (hsize_t)sis_len[sis_i])) advance_sis = TRUE; - /* Project to destination */ + /* Project intersection sequence to destination selection */ while(int_len > (size_t)0) { while(ds_sel_off + (hsize_t)ds_len[ds_i] <= int_sel_off) { /* Intersection is not projected to this destination @@ -9133,7 +9133,8 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, * ouside the plane of the span currently being built * (i.e. it's finished being built) */ for(i = proj_rank - 1; ((i > 0) - && ((proj_off / proj_down_dims[i]) + && (((proj_off / proj_down_dims[i]) + % proj_space->extent.size[i]) != curr_span_dim[i - 1])); i--) { if(curr_span_tree[i]) { HDassert(prev_span[i]); @@ -9153,11 +9154,11 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, } /* end if */ /* Update curr_span_dim */ - curr_span_dim[i - 1] = proj_off / proj_down_dims[i]; + curr_span_dim[i - 1] = (proj_off / proj_down_dims[i]) % proj_space->extent.size[i]; } /* end for */ /* Compute bounds for new span in lowest dimension */ - low = proj_off % proj_down_dims[proj_rank - 1]; + low = proj_off % proj_space->extent.size[proj_rank - 1]; span_len = MIN(proj_len_rem, (size_t)(proj_space->extent.size[proj_rank - 1] - low)); diff --git a/test/vds.c b/test/vds.c index cc0a9de..40aa183 100644 --- a/test/vds.c +++ b/test/vds.c @@ -1306,6 +1306,170 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR vspace[1] = -1; +#if 0 + /* + * Test 3: 2 Source datasets, compound hyperslab virtual mappings and + * selections + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + if((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Create source dataspace */ + dims[1] = 10; + if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select all in source space (should not be necessary, but just to be sure) + */ + if(H5Sselect_all(srcspace[0]) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual spaces */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + start[1] = 10; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Add virtual layout mappings */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2", srcspace[0]) < 0) + TEST_ERROR + + /* Reset dims */ + dims[1] = 20; + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create source datasets */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] = (i * (int)(sizeof(buf[0]) / sizeof(buf[0][0]))) + j; + + /* Write data directly to source datasets */ + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Read data through virtual dataset */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + if(H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != buf[i][j]) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Write data through virtual dataset */ + if(H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Reopen srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Read data directly from source datasets */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + if(H5Dread(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + if(H5Dread(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != buf[i][j]) + TEST_ERROR + + /* Close */ + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + if(H5Sclose(vspace[1]) < 0) + TEST_ERROR + vspace[1] = -1; +#endif /* Close */ if(H5Pclose(dcpl) < 0) -- cgit v0.12 From dd0e7540b6c5b9a49c23783f32ebab0a5214374b Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 24 Mar 2015 18:31:00 -0500 Subject: [svn-r26567] h5dump was nopt displaying source selection correctly due to a type; fixed. --- tools/lib/h5tools_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 96587d7..a315b49 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -3232,7 +3232,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnameend); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - h5tools_print_virtual_selection(virtual_vspace, dcpl_id, next, stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + h5tools_print_virtual_selection(virtual_srcspace, dcpl_id, next, stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->indent_level--; -- cgit v0.12 From 1f9bf8d63b071cfc286dd276f11cfe98a10fe1df Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 24 Mar 2015 18:42:14 -0500 Subject: [svn-r26568] Simplified percival example. --- examples/h5_vds-percival.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/examples/h5_vds-percival.c b/examples/h5_vds-percival.c index c065368..ba9e13f 100644 --- a/examples/h5_vds-percival.c +++ b/examples/h5_vds-percival.c @@ -57,7 +57,6 @@ main (void) dims[3] = {DIM0, DIM1, DIM2}, dims_max[3] = {DIM0, DIM1, DIM2}, start[3], /* Hyperslab start parameter for VDS */ - src_start[3], /* Hyperslab start parameter for source dataset */ stride[3], count[3], src_count[3], @@ -115,9 +114,6 @@ main (void) start[0] = 0; start[1] = 0; start[2] = 0; - src_start[0] = 0; - src_start[1] = 0; - src_start[2] = 0; stride[0] = PLANE_STRIDE; /* we will select every fifth plane in VDS */ stride[1] = 1; stride[2] = 1; @@ -141,21 +137,22 @@ main (void) * Build the mappings * */ + status = H5Sselect_hyperslab (src_space, H5S_SELECT_SET, start, NULL, src_count, block); for (i=0; i < PLANE_STRIDE; i++) { status = H5Sselect_hyperslab (vspace, H5S_SELECT_SET, start, stride, count, block); - status = H5Sselect_hyperslab (src_space, H5S_SELECT_SET, src_start, NULL, src_count, block); status = H5Pset_virtual (dcpl, vspace, SRC_FILE[i], SRC_DATASET[i], src_space); start[0]++; } + H5Sselect_none(vspace); - /* Create a virtual dataset */ - dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, - dcpl, H5P_DEFAULT); - status = H5Sclose (vspace); - status = H5Sclose (src_space); - status = H5Dclose (dset); - status = H5Fclose (file); + /* Create a virtual dataset */ + dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, + dcpl, H5P_DEFAULT); + status = H5Sclose (vspace); + status = H5Sclose (src_space); + status = H5Dclose (dset); + status = H5Fclose (file); /* * Now we begin the read section of this example. -- cgit v0.12 From 1180e6f96ddada00645cf085a402b215431cae28 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 24 Mar 2015 23:08:59 -0500 Subject: [svn-r26570] Commented lineis that print extra "VIRTUAL" keyword and blank lines for demo on 3/25/2015. Allen will need to review it. --- tools/lib/h5tools_dump.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index a315b49..a6cca94 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -3156,8 +3156,10 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, { size_t vmaps; +/* EIP h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", VDS_VIRTUAL, BEGIN); +*/ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); H5Pget_virtual_count(dcpl_id, &vmaps); @@ -3248,8 +3250,10 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); +/*EIP h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", END); +*/ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); } ctx->indent_level--; -- cgit v0.12 From e26999516d0db4701dcc1fa7711bb3a6751b48e8 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Thu, 26 Mar 2015 17:03:45 -0500 Subject: [svn-r26609] Neil fixed a bug that caused a failure when a source file was closed. Removed comments from the example. Tested on jam. --- examples/h5_vds-simpleIO.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/h5_vds-simpleIO.c b/examples/h5_vds-simpleIO.c index 801229c..e4b0018 100644 --- a/examples/h5_vds-simpleIO.c +++ b/examples/h5_vds-simpleIO.c @@ -87,7 +87,6 @@ main (void) status = H5Sclose (vspace); status = H5Sclose (src_space); status = H5Dclose (dset); -#ifdef EIP /*Currently the file with VDS should stay open. Neil will fix the issue */ status = H5Fclose (file); /* @@ -98,7 +97,6 @@ main (void) * Open the file and virtual dataset. */ file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); -#endif dset = H5Dopen (file, DATASET, H5P_DEFAULT); /* * Get creation property list and mapping properties. -- cgit v0.12 From e270981617f5e1edec5318b4ed9680eb87940027 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 27 Mar 2015 09:23:24 -0500 Subject: [svn-r26611] Remove complete section of VIRTUAL output. --- tools/lib/h5tools_dump.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index a6cca94..7d25c7a 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -3156,12 +3156,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, { size_t vmaps; -/* EIP - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s %s", VDS_VIRTUAL, BEGIN); -*/ - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - H5Pget_virtual_count(dcpl_id, &vmaps); if (vmaps) { -- cgit v0.12 From 904c84b2a2590124713f4187a074c8d89c79b2c1 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Mon, 30 Mar 2015 17:11:58 -0500 Subject: [svn-r26668] Fix error in H5D__virtual_read/write that prevented short circuit. Fix off by 1 error in H5S__hyper_project_intersection algorithm. Add many tests for fixed size hyperslab I/O. Note make check still fails in h5dump test (unrelated to this checkin). Tested: ummon --- src/H5Dvirtual.c | 9 +- src/H5Shyper.c | 285 +++++++------- test/vds.c | 1098 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 1217 insertions(+), 175 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 14efe42..698aea8 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -473,12 +472,12 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].virtual_select, &projected_mem_space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") - /* Get number of elements in projected dataspace */ + /* Get number of elements in projected dataspace */ if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(projected_mem_space)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") /* Only perform I/O if there are any elements */ - if(nelmts > 0) { + if(select_nelmts > 0) { /* Open source dataset */ if(!storage->list[i].source_dset) { /* Try to open dataset */ @@ -585,7 +584,7 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") /* Only perform I/O if there are any elements */ - if(nelmts > 0) { + if(select_nelmts > 0) { /* Open source dataset, fail if cannot open */ if(!storage->list[i].source_dset) { //VDSINC check all source datasets before any I/O @@ -655,6 +654,8 @@ H5D__virtual_flush(H5D_t UNUSED *dset, hid_t UNUSED dxpl_id) { FUNC_ENTER_STATIC_NOERR + /* Need to decide what to do here - flush only open datasets, try to flush + * all, or do nothing and rely on source datasets to flush themselves? */ /* No-op for now VDSINC */ FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index f866e5d..13573e1 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -9010,48 +9010,50 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") sis_nelem -= nelem; - /* Make sure all sequences are non-empty */ - if((ss_nseq > 0) && (ds_nseq > 0) && (sis_nseq > 0)) { - /* Loop until we run out of sequences in either the source or source - * intersect space */ - while(1) { - if(advance_ss || (ss_off[ss_i] + ss_len[ss_i] <= sis_off[sis_i])) { - /* Either we finished the current source sequence or the - * sequences do not intersect. Advance source space. */ - ss_sel_off += (hsize_t)ss_len[ss_i]; - if(++ss_i == ss_nseq) { - if(ss_nelem > 0) { - HDassert(0 && "Checking code coverage..."); //VDSINC - /* Try to grab more sequences from src_space */ - if(H5S_SELECT_GET_SEQ_LIST(src_space, 0u, &ss_iter, H5S_PROJECT_INTERSECT_NSEQS, ss_nelem, &ss_nseq, &nelem, ss_off, ss_len) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") - HDassert(ss_len[0] > 0); - - /* Update ss_nelem */ - HDassert(nelem > 0); - HDassert(nelem <= ss_nelem); - ss_nelem -= nelem; - - /* Reset source space index */ - ss_i = 0; - } /* end if */ - else - /* There are no more sequences in src_space, so we can - * exit the loop */ - break; + /* If any sequences are empty, skip the main loop */ + if((ss_nseq == 0) || (ds_nseq == 0) || (sis_nseq == 0)) + goto loop_end; + + /* Loop until we run out of sequences in either the source or source + * intersect space */ + while(1) { + while(advance_ss || (ss_off[ss_i] + ss_len[ss_i] <= sis_off[sis_i])) { + /* Either we finished the current source sequence or the + * sequences do not intersect. Advance source space. */ + ss_sel_off += (hsize_t)ss_len[ss_i]; + if(++ss_i == ss_nseq) { + if(ss_nelem > 0) { + /* Try to grab more sequences from src_space */ + if(H5S_SELECT_GET_SEQ_LIST(src_space, 0u, &ss_iter, H5S_PROJECT_INTERSECT_NSEQS, ss_nelem, &ss_nseq, &nelem, ss_off, ss_len) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + HDassert(ss_len[0] > 0); + + /* Update ss_nelem */ + HDassert(nelem > 0); + HDassert(nelem <= ss_nelem); + ss_nelem -= nelem; + + /* Reset source space index */ + ss_i = 0; } /* end if */ - - /* Reset advance_ss */ - advance_ss = FALSE; + else + /* There are no more sequences in src_space, so we can exit + * the loop. Use goto instead of break so we exit the outer + * loop. */ + goto loop_end; } /* end if */ - else if(advance_sis - || (sis_off[sis_i] + sis_len[sis_i] <= ss_off[ss_i])) { + + /* Reset advance_ss */ + advance_ss = FALSE; + } /* end if */ + if(advance_sis + || (sis_off[sis_i] + sis_len[sis_i] <= ss_off[ss_i])) { + do { /* Either we finished the current source intersect sequence or * the sequences do not intersect. Advance source intersect * space. */ if(++sis_i == sis_nseq) { if(sis_nelem > 0) { - HDassert(0 && "Checking code coverage..."); //VDSINC /* Try to grab more sequences from src_intersect_space */ if(H5S_SELECT_GET_SEQ_LIST(src_intersect_space, 0u, &sis_iter, H5S_PROJECT_INTERSECT_NSEQS, sis_nelem, &sis_nseq, &nelem, sis_off, sis_len) < 0) @@ -9068,120 +9070,122 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, } /* end if */ else /* There are no more sequences in src_intersect_space, - * so we can exit the loop */ - break; + * so we can exit the loop. Use goto instead of break + * so we exit the outer loop. */ + goto loop_end; } /* end if */ + } while(sis_off[sis_i] + sis_len[sis_i] <= ss_off[ss_i]); - /* Reset advance_sis */ - advance_sis = FALSE; + /* Reset advance_sis */ + advance_sis = FALSE; + } /* end if */ + else { + /* Sequences intersect, add intersection to projected space */ + /* Calculate intersection sequence in terms of offset within source + * selection and advance any sequences we complete */ + if(ss_off[ss_i] >= sis_off[sis_i]) + int_sel_off = ss_sel_off; + else + int_sel_off = sis_off[sis_i] - ss_off[ss_i] + ss_sel_off; + if((ss_off[ss_i] + (hsize_t)ss_len[ss_i]) <= (sis_off[sis_i] + + (hsize_t)sis_len[sis_i])) { + int_len = (size_t)((hsize_t)ss_len[ss_i] + ss_sel_off - int_sel_off); + advance_ss = TRUE; } /* end if */ - else { - /* Sequences intersect, add intersection to projected space */ - /* Calculate intersection sequence in terms of offset within - * source selection and advance any sequences we complete */ - if(ss_off[ss_i] >= sis_off[sis_i]) - int_sel_off = ss_sel_off; - else - int_sel_off = sis_off[sis_i] - ss_off[ss_i] + ss_sel_off; - if((ss_off[ss_i] + (hsize_t)ss_len[ss_i]) <= (sis_off[sis_i] - + (hsize_t)sis_len[sis_i])) { - int_len = (size_t)((hsize_t)ss_len[ss_i] + ss_sel_off - int_sel_off); - advance_ss = TRUE; - } /* end if */ - else - int_len = (size_t)(sis_off[sis_i] + (hsize_t)sis_len[sis_i] - ss_off[ss_i] + ss_sel_off - int_sel_off); - if((ss_off[ss_i] + (hsize_t)ss_len[ss_i]) >= (sis_off[sis_i] - + (hsize_t)sis_len[sis_i])) - advance_sis = TRUE; - - /* Project intersection sequence to destination selection */ - while(int_len > (size_t)0) { - while(ds_sel_off + (hsize_t)ds_len[ds_i] <= int_sel_off) { - /* Intersection is not projected to this destination - * sequence, advance destination space */ - ds_sel_off += (hsize_t)ds_len[ds_i]; - if(++ds_i == ds_nseq) { - HDassert(0 && "Checking code coverage..."); //VDSINC - HDassert(ds_nelem > 0); - - /* Try to grab more sequences from dst_space */ - if(H5S_SELECT_GET_SEQ_LIST(dst_space, 0u, &ds_iter, H5S_PROJECT_INTERSECT_NSEQS, ds_nelem, &ds_nseq, &nelem, ds_off, ds_len) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") - HDassert(ds_len[0] > 0); - - /* Update ss_nelem */ - HDassert(nelem > 0); - HDassert(nelem <= ds_nelem); - ds_nelem -= nelem; - - /* Reset source space index */ - ds_i = 0; - } /* end if */ - } /* end while */ + else + int_len = (size_t)(sis_off[sis_i] + (hsize_t)sis_len[sis_i] - ss_off[ss_i] + ss_sel_off - int_sel_off); + if((ss_off[ss_i] + (hsize_t)ss_len[ss_i]) >= (sis_off[sis_i] + + (hsize_t)sis_len[sis_i])) + advance_sis = TRUE; + + /* Project intersection sequence to destination selection */ + while(int_len > (size_t)0) { + while(ds_sel_off + (hsize_t)ds_len[ds_i] <= int_sel_off) { + /* Intersection is not projected to this destination + * sequence, advance destination space */ + ds_sel_off += (hsize_t)ds_len[ds_i]; + if(++ds_i == ds_nseq) { + HDassert(ds_nelem > 0); + + /* Try to grab more sequences from dst_space */ + if(H5S_SELECT_GET_SEQ_LIST(dst_space, 0u, &ds_iter, H5S_PROJECT_INTERSECT_NSEQS, ds_nelem, &ds_nseq, &nelem, ds_off, ds_len) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + HDassert(ds_len[0] > 0); - /* Add sequence to projected space */ - HDassert(ds_sel_off <= int_sel_off); - proj_off = ds_off[ds_i] + int_sel_off - ds_sel_off; - proj_len = proj_len_rem = MIN(int_len, (size_t)(ds_sel_off - + (hsize_t)ds_len[ds_i] - int_sel_off + (hsize_t)1)); - - /* Add to span tree */ - while(proj_len_rem > (size_t)0) { - /* Check for more than one full row (in every dim) and - * append multiple spans at once? -NAF */ - /* Append spans in higher dimensions if we're going - * ouside the plane of the span currently being built - * (i.e. it's finished being built) */ - for(i = proj_rank - 1; ((i > 0) - && (((proj_off / proj_down_dims[i]) - % proj_space->extent.size[i]) - != curr_span_dim[i - 1])); i--) { - if(curr_span_tree[i]) { - HDassert(prev_span[i]); - - /* Append complete lower dimension span tree to - * current dimension */ - if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], curr_span_dim[i - 1], curr_span_dim[i - 1], curr_span_tree[i], NULL) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") - - /* Reset lower dimension's span tree and previous - * span since we just committed it and will start - * over with a new one */ - if(H5S_hyper_free_span_info(curr_span_tree[i]) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't free span info") - curr_span_tree[i] = NULL; - prev_span[i] = NULL; - } /* end if */ + /* Update ss_nelem */ + HDassert(nelem > 0); + HDassert(nelem <= ds_nelem); + ds_nelem -= nelem; - /* Update curr_span_dim */ - curr_span_dim[i - 1] = (proj_off / proj_down_dims[i]) % proj_space->extent.size[i]; - } /* end for */ + /* Reset source space index */ + ds_i = 0; + } /* end if */ + } /* end while */ - /* Compute bounds for new span in lowest dimension */ - low = proj_off % proj_space->extent.size[proj_rank - 1]; - span_len = MIN(proj_len_rem, - (size_t)(proj_space->extent.size[proj_rank - 1] - - low)); - HDassert(proj_len_rem >= span_len); - high = low + (hsize_t)span_len - (hsize_t)1; + /* Add sequence to projected space */ + HDassert(ds_sel_off <= int_sel_off); + proj_off = ds_off[ds_i] + int_sel_off - ds_sel_off; + proj_len = proj_len_rem = (size_t)MIN(int_len, + (size_t)(ds_sel_off + (hsize_t)ds_len[ds_i] + - int_sel_off)); + + /* Add to span tree */ + while(proj_len_rem > (size_t)0) { + /* Check for more than one full row (in every dim) and + * append multiple spans at once? -NAF */ + /* Append spans in higher dimensions if we're going ouside + * the plane of the span currently being built (i.e. it's + * finished being built) */ + for(i = proj_rank - 1; ((i > 0) + && (((proj_off / proj_down_dims[i]) + % proj_space->extent.size[i]) + != curr_span_dim[i - 1])); i--) { + if(curr_span_tree[i]) { + HDassert(prev_span[i]); + + /* Append complete lower dimension span tree to + * current dimension */ + if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], curr_span_dim[i - 1], curr_span_dim[i - 1], curr_span_tree[i], NULL) < 0) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") - /* Append span in lowest dimension */ - if(H5S_hyper_append_span(&prev_span[proj_rank - 1], &curr_span_tree[proj_rank - 1], low, high, NULL, NULL) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + /* Reset lower dimension's span tree and previous + * span since we just committed it and will start + * over with a new one */ + if(H5S_hyper_free_span_info(curr_span_tree[i]) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't free span info") + curr_span_tree[i] = NULL; + prev_span[i] = NULL; + } /* end if */ - /* Update remaining offset and length */ - proj_off += (hsize_t)span_len; - proj_len_rem -= span_len; - } /* end while */ + /* Update curr_span_dim */ + curr_span_dim[i - 1] = (proj_off / proj_down_dims[i]) % proj_space->extent.size[i]; + } /* end for */ + + /* Compute bounds for new span in lowest dimension */ + low = proj_off % proj_space->extent.size[proj_rank - 1]; + span_len = MIN(proj_len_rem, + (size_t)(proj_space->extent.size[proj_rank - 1] + - low)); + HDassert(proj_len_rem >= span_len); + high = low + (hsize_t)span_len - (hsize_t)1; + + /* Append span in lowest dimension */ + if(H5S_hyper_append_span(&prev_span[proj_rank - 1], &curr_span_tree[proj_rank - 1], low, high, NULL, NULL) < 0) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") - /* Update intersection sequence */ - int_sel_off += (hsize_t)proj_len; - int_len -= proj_len; + /* Update remaining offset and length */ + proj_off += (hsize_t)span_len; + proj_len_rem -= span_len; } /* end while */ - } /* end else */ - } /* end while */ - } /* end if */ + /* Update intersection sequence */ + int_sel_off += (hsize_t)proj_len; + int_len -= proj_len; + } /* end while */ + } /* end else */ + } /* end while */ + +loop_end: /* Add remaining spans to span tree */ for(i = proj_rank - 1; i > 0; i--) if(curr_span_tree[i]) { @@ -9210,13 +9214,10 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, if(H5S_hyper_rebuild(proj_space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't rebuild hyperslab info") } /* end if */ - else { - HDassert(0 && "Checking code coverage..."); //VDSINC + else /* If we did not add anything to proj_space, select none instead */ if(H5S_select_none(proj_space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection") - } /* end else */ - done: /* Release source selection iterator */ diff --git a/test/vds.c b/test/vds.c index 40aa183..abb52fc 100644 --- a/test/vds.c +++ b/test/vds.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -417,11 +416,11 @@ test_api(test_api_config_t config, hid_t fapl) const char *src_dset[4] = {"src_dset1....", "src_dset2.....", "src_dset3......", "src_dset4......."}; /* Source dataset names (different lengths) */ char tmp_filename[32]; char tmp_dsetname[32]; - hsize_t dims[2] = {10, 20}; /* Data space current size */ - hsize_t start[2]; /* Hyperslab start */ - hsize_t stride[2]; /* Hyperslab stride */ - hsize_t count[2]; /* Hyperslab count */ - hsize_t block[2]; /* Hyperslab block */ + hsize_t dims[4] = {10, 20, 0, 0}; /* Data space current size */ + hsize_t start[4]; /* Hyperslab start */ + hsize_t stride[4]; /* Hyperslab stride */ + hsize_t count[4]; /* Hyperslab count */ + hsize_t block[4]; /* Hyperslab block */ hsize_t coord[10]; /* Point selection array */ size_t size_out; unsigned i; @@ -997,16 +996,19 @@ test_basic_io(unsigned config, hid_t fapl) hid_t dcpl = -1; /* Dataset creation property list */ hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */ hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */ + hid_t memspace = -1; /* Memory dataspace */ hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datsets */ hid_t vdset = -1; /* Virtual dataset */ - hsize_t dims[2] = {10, 20}; /* Data space current size */ - hsize_t start[2]; /* Hyperslab start */ - hsize_t stride[2]; /* Hyperslab stride */ - hsize_t count[2]; /* Hyperslab count */ - hsize_t block[2]; /* Hyperslab block */ + hsize_t dims[2] = {10, 26}; /* Data space current size */ + hsize_t start[4]; /* Hyperslab start */ + hsize_t stride[4]; /* Hyperslab stride */ + hsize_t count[4]; /* Hyperslab count */ + hsize_t block[4]; /* Hyperslab block */ hsize_t coord[10]; /* Point selection array */ - int buf[10][20]; /* Write and expecte read buffer */ - int rbuf[10][20]; /* Read buffer */ + int buf[10][26]; /* Write and expecte read buffer */ + int rbuf[10][26]; /* Read buffer */ + int evbuf[10][26]; /* Expected VDS "buffer" */ + int erbuf[10][26]; /* Expected read buffer */ int i, j; TESTING("basic virtual dataset I/O") @@ -1158,7 +1160,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR /* Create source dataspace */ - dims[1] = 10; + dims[1] = 13; if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR @@ -1172,7 +1174,7 @@ test_basic_io(unsigned config, hid_t fapl) start[1] = 0; if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) TEST_ERROR - start[1] = 10; + start[1] = 13; if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) TEST_ERROR @@ -1183,7 +1185,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR /* Reset dims */ - dims[1] = 20; + dims[1] = 26; /* Create virtual file */ if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) @@ -1306,10 +1308,10 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR vspace[1] = -1; -#if 0 + /* - * Test 3: 2 Source datasets, compound hyperslab virtual mappings and - * selections + * Test 3: 2 Source datasets, hyperslab virtual mappings on one mapping at a + * time */ /* Clear virtual layout in DCPL */ if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) @@ -1322,7 +1324,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR /* Create source dataspace */ - dims[1] = 10; + dims[1] = 13; if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR @@ -1336,7 +1338,7 @@ test_basic_io(unsigned config, hid_t fapl) start[1] = 0; if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) TEST_ERROR - start[1] = 10; + start[1] = 13; if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) TEST_ERROR @@ -1347,7 +1349,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR /* Reset dims */ - dims[1] = 20; + dims[1] = 26; /* Create virtual file */ if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) @@ -1401,15 +1403,28 @@ test_basic_io(unsigned config, hid_t fapl) } /* end if */ } /* end if */ - /* Read data through virtual dataset */ + /* Read first source dataset through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); - if(H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + if(H5Dread(vdset, H5T_NATIVE_INT, vspace[0], vspace[0], H5P_DEFAULT, rbuf[0]) < 0) TEST_ERROR /* Verify read data */ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) - if(rbuf[i][j] != buf[i][j]) + if(rbuf[i][j] != (j < (int)(sizeof(buf[0]) / sizeof(buf[0][0]) / 2) + ? buf[i][j] : 0)) + TEST_ERROR + + /* Read second source dataset through virtual dataset */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + if(H5Dread(vdset, H5T_NATIVE_INT, vspace[1], vspace[1], H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != (j < (int)(sizeof(buf[0]) / sizeof(buf[0][0]) / 2) + ? 0 : buf[i][j])) TEST_ERROR /* Adjust write buffer */ @@ -1417,8 +1432,17 @@ test_basic_io(unsigned config, hid_t fapl) for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); - /* Write data through virtual dataset */ - if(H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + /* Write first source dataset through virtual dataset */ + if(H5Dwrite(vdset, H5T_NATIVE_INT, vspace[0], vspace[0], H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Write second source dataset through virtual dataset */ + if(H5Dwrite(vdset, H5T_NATIVE_INT, vspace[1], vspace[1], H5P_DEFAULT, buf[0]) < 0) TEST_ERROR /* Reopen srcdsets and srcfile if config option specified */ @@ -1442,7 +1466,272 @@ test_basic_io(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) - if(rbuf[i][j] != buf[i][j]) + if(rbuf[i][j] != (j < (int)(sizeof(buf[0]) / sizeof(buf[0][0]) / 2) + ? (buf[i][j] - (int)(sizeof(buf) / sizeof(buf[0][0]))) + : buf[i][j])) + TEST_ERROR + + /* Close */ + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + if(H5Sclose(vspace[1]) < 0) + TEST_ERROR + vspace[1] = -1; + + + /* + * Test 4: 2 Source datasets, hyperslab virtual mappings and selections + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + if((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Create source dataspaces */ + if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + if((srcspace[1] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select hyperslabs in source space */ + start[0] = 0; + start[1] = 0; + count[0] = 10; + count[1] = 13; + if(H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + start[1] = 13; + if(H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual spaces */ + start[0] = 0; + start[1] = 0; + count[0] = 5; + count[1] = 26; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + start[0] = 5; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Add virtual layout mappings */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2", srcspace[1]) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create source datasets */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] = (i * (int)(sizeof(buf[0]) / sizeof(buf[0][0]))) + j; + + /* Write data directly to source datasets */ + /* Write first dataset */ + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update evbuf */ + for(i = 0; i < 5; i++) { + for(j = 0; j < 13; j++) + evbuf[i][j] = buf[2 * i][j]; + for(/* j = 13 */; j < 26; j++) + evbuf[i][j] = buf[2 * i + 1][j - 13]; + } /* end for */ + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Write second dataset */ + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update evbuf */ + for(i = 0; i < 5; i++) { + for(j = 0; j < 13; j++) + evbuf[i + 5][j] = buf[2 * i][j + 13]; + for(/* j = 13 */; j < 26; j++) + evbuf[i + 5][j] = buf[2 * i + 1][j]; + } /* end for */ + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Read data through virtual dataset by hyperslab */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Read first slice */ + if(H5Dread(vdset, H5T_NATIVE_INT, vspace[0], srcspace[0], H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 5; i++) { + for(j = 0; j < 13; j++) + erbuf[i][j] = evbuf[2 * i][j]; + for(/* j = 13 */; j < 26; j++) + erbuf[i][j] = evbuf[2 * i + 1][j - 13]; + } /* end for */ + + /* Read second slice */ + if(H5Dread(vdset, H5T_NATIVE_INT, vspace[1], srcspace[1], H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 5; i++) { + for(j = 0; j < 13; j++) + erbuf[i + 5][j] = evbuf[2 * i][j + 13]; + for(/* j = 13 */; j < 26; j++) + erbuf[i + 5][j] = evbuf[2 * i + 1][j]; + } /* end for */ + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Write data through virtual dataset */ + /* Write first slice */ + if(H5Dwrite(vdset, H5T_NATIVE_INT, vspace[0], srcspace[0], H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update evbuf */ + for(i = 0; i < 5; i++) { + for(j = 0; j < 13; j++) + evbuf[2 * i][j] = buf[i][j]; + for(/* j = 13 */; j < 26; j++) + evbuf[2 * i + 1][j - 13] = buf[i][j]; + } /* end for */ + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Write second slice */ + if(H5Dwrite(vdset, H5T_NATIVE_INT, vspace[1], srcspace[1], H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update evbuf */ + for(i = 0; i < 5; i++) { + for(j = 0; j < 13; j++) + evbuf[2 * i][j + 13] = buf[i + 5][j]; + for(/* j = 13 */; j < 26; j++) + evbuf[2 * i + 1][j] = buf[i + 5][j]; + } /* end for */ + + /* Reopen srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Read data directly from source datasets */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Read first dataset */ + if(H5Dread(srcdset[0], H5T_NATIVE_INT, srcspace[0], srcspace[0], H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 5; i++) { + for(j = 0; j < 13; j++) + erbuf[2 * i][j] = evbuf[i][j]; + for(/* j = 13 */; j < 26; j++) + erbuf[2 * i + 1][j - 13] = evbuf[i][j]; + } /* end for */ + + /* Read second dataset */ + if(H5Dread(srcdset[1], H5T_NATIVE_INT, srcspace[1], srcspace[1], H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 5; i++) { + for(j = 0; j < 13; j++) + erbuf[2 * i][j + 13] = evbuf[i + 5][j]; + for(/* j = 13 */; j < 26; j++) + erbuf[2 * i + 1][j] = evbuf[i + 5][j]; + } /* end for */ + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR /* Close */ @@ -1463,13 +1752,762 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Sclose(srcspace[0]) < 0) TEST_ERROR srcspace[0] = -1; + if(H5Sclose(srcspace[1]) < 0) + TEST_ERROR + srcspace[1] = -1; if(H5Sclose(vspace[0]) < 0) TEST_ERROR vspace[0] = -1; if(H5Sclose(vspace[1]) < 0) TEST_ERROR vspace[1] = -1; -#endif + + + /* + * Test 5: 2 Source datasets, checkerboard/stripe pattern to trigger + * sequence list refresh internally + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create memory dataspace */ + if((memspace = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + dims[1] = 52; + if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + if((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Create source dataspace and file space for second operation (srcspace[1]) + */ + if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + if((srcspace[1] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Reset dims */ + dims[1] = 26; + + /* Select hyperslabs (stripe) in source space and file space for second + * operation (srcspace[1]) */ + start[0] = 0; + start[1] = 0; + stride[0] = 1; + stride[1] = 2; + count[0] = 1; + count[1] = 26; + block[0] = 10; + block[1] = 1; + if(H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + start[1] = 1; + if(H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + + /* Select hyperslabs (checkerboard) in virtual spaces */ + start[0] = 0; + start[1] = 0; + stride[0] = 2; + stride[1] = 2; + count[0] = 5; + count[1] = 26; + block[0] = 1; + block[1] = 1; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + start[0] = 1; + start[1] = 1; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride, count, block) < 0) + TEST_ERROR + start[0] = 0; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + start[0] = 1; + start[1] = 0; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0) + TEST_ERROR + + /* Add virtual layout mappings */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2", srcspace[0]) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create source datasets */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] = (i * (int)(sizeof(buf[0]) / sizeof(buf[0][0]))) + j; + + /* Write data directly to source datasets */ + /* Write first dataset */ + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i += 2) + for(j = 0; j < 26; j++) + erbuf[i][j] = buf[i][j]; + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Write second dataset */ + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 1; i < 10; i += 2) + for(j = 0; j < 26; j++) + erbuf[i][j] = buf[i][j]; + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Read data through virtual dataset by hyperslab */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Read first stripe pattern */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Read second stripe pattern */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, srcspace[1], H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i += 2) + for(j = 0; j < 26; j++) { + erbuf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + erbuf[i + 1][j] -= (int)(sizeof(buf) / sizeof(buf[0][0])); + } /* end for */ + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Write data through virtual dataset */ + /* Write first slice */ + if(H5Dwrite(vdset, H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i += 2) + for(j = 0; j < 26; j++) + erbuf[i][j] = buf[i][j]; + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Write second slice */ + if(H5Dwrite(vdset, H5T_NATIVE_INT, memspace, srcspace[1], H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 1; i < 10; i += 2) + for(j = 0; j < 26; j++) + erbuf[i][j] = buf[i][j]; + + /* Reopen srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Read data directly from source datasets */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Read first dataset */ + if(H5Dread(srcdset[0], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i += 2) + for(j = 0; j < 26; j++) { + erbuf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + erbuf[i + 1][j] -= (int)(sizeof(buf) / sizeof(buf[0][0])); + } /* end for */ + + /* Read second dataset */ + if(H5Dread(srcdset[1], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close */ + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(srcspace[1]) < 0) + TEST_ERROR + srcspace[1] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + if(H5Sclose(vspace[1]) < 0) + TEST_ERROR + vspace[1] = -1; + if(H5Sclose(memspace) < 0) + TEST_ERROR + memspace = -1; + + + /* + * Test 6: 1 Source dataset, two mappings, 4 dimensional virtual dataset + * and 3 dimensional source dataset + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create memory dataspace */ + if((memspace = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + dims[0] = 3; + dims[1] = 3; + dims[2] = 3; + dims[3] = 3; + if((vspace[0] = H5Screate_simple(4, dims, NULL)) < 0) + TEST_ERROR + if((vspace[1] = H5Screate_simple(4, dims, NULL)) < 0) + TEST_ERROR + + /* Create source dataspaces */ + dims[0] = 2; + dims[1] = 4; + dims[2] = 4; + if((srcspace[0] = H5Screate_simple(3, dims, NULL)) < 0) + TEST_ERROR + if((srcspace[1] = H5Screate_simple(3, dims, NULL)) < 0) + TEST_ERROR + + /* Reset dims */ + dims[0] = 10; + dims[1] = 26; + + /* Select hyperslabs (stripes) in source spaces */ + start[0] = 0; + start[1] = 0; + start[2] = 0; + stride[0] = 1; + stride[1] = 2; + stride[2] = 1; + count[0] = 1; + count[1] = 2; + count[2] = 1; + block[0] = 2; + block[1] = 1; + block[2] = 4; + if(H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + start[1] = 1; + if(H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + + /* Select hyperslabs (corners) in first virtual space */ + start[0] = 0; + start[1] = 0; + start[2] = 0; + start[3] = 0; + stride[0] = 2; + stride[1] = 2; + stride[2] = 2; + stride[3] = 2; + count[0] = 2; + count[1] = 2; + count[2] = 2; + count[3] = 2; + block[0] = 1; + block[1] = 1; + block[2] = 1; + block[3] = 1; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + + /* Select hyperslabs ("+" pattern) in second virtual space */ + start[0] = 1; + start[1] = 1; + start[2] = 0; + start[3] = 0; + stride[0] = 2; + stride[1] = 2; + stride[2] = 2; + stride[3] = 2; + count[0] = 1; + count[1] = 1; + count[2] = 2; + count[3] = 2; + block[0] = 1; + block[1] = 1; + block[2] = 1; + block[3] = 1; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + start[1] = 0; + start[2] = 1; + count[1] = 2; + count[2] = 1; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0) + TEST_ERROR + start[0] = 0; + start[1] = 1; + count[0] = 2; + count[1] = 1; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0) + TEST_ERROR + start[0] = 1; + count[0] = 1; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0) + TEST_ERROR + start[1] = 0; + start[3] = 1; + count[1] = 2; + count[3] = 1; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0) + TEST_ERROR + + /* Add virtual layout mappings */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[1]) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create source dataset */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] = (i * (int)(sizeof(buf[0]) / sizeof(buf[0][0]))) + j; + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + count[0] = 2; + count[1] = 16; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL ,count, NULL) < 0) + TEST_ERROR + + /* Write data directly to source dataset */ + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Close srcdset and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + count[0] = 3; + count[1] = 9; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL ,count, NULL) < 0) + TEST_ERROR + + /* Read data through virtual dataset by hyperslab */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select stripe */ + start[0] = 0; + start[1] = 0; + start[2] = 0; + start[3] = 0; + count[0] = 3; + count[1] = 3; + count[2] = 1; + count[3] = 3; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL ,count, NULL) < 0) + TEST_ERROR + + /* Read first stripe pattern */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + HDmemset(erbuf, 0, sizeof(erbuf)); + erbuf[0][0] = buf[0][0]; + erbuf[0][2] = buf[0][1]; + erbuf[0][6] = buf[0][8]; + erbuf[0][8] = buf[0][9]; + erbuf[2][0] = buf[1][0]; + erbuf[2][2] = buf[1][1]; + erbuf[2][6] = buf[1][8]; + erbuf[2][8] = buf[1][9]; + erbuf[1][3] = buf[0][13]; + erbuf[1][5] = buf[0][14]; + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select stripe */ + start[0] = 0; + start[1] = 0; + start[2] = 1; + start[3] = 0; + count[0] = 3; + count[1] = 3; + count[2] = 1; + count[3] = 3; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL ,count, NULL) < 0) + TEST_ERROR + + /* Read second stripe pattern */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + HDmemset(erbuf, 0, sizeof(erbuf)); + erbuf[0][3] = buf[0][4]; + erbuf[0][5] = buf[0][5]; + erbuf[1][0] = buf[0][6]; + erbuf[1][1] = buf[0][7]; + erbuf[1][2] = buf[0][12]; + erbuf[1][3] = buf[0][15]; + erbuf[1][5] = buf[1][4]; + erbuf[1][6] = buf[1][7]; + erbuf[1][7] = buf[1][12]; + erbuf[1][8] = buf[1][13]; + erbuf[2][3] = buf[1][14]; + erbuf[2][5] = buf[1][15]; + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select stripe */ + start[0] = 0; + start[1] = 0; + start[2] = 2; + start[3] = 0; + count[0] = 3; + count[1] = 3; + count[2] = 1; + count[3] = 3; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL ,count, NULL) < 0) + TEST_ERROR + + /* Read third stripe pattern */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + HDmemset(erbuf, 0, sizeof(erbuf)); + erbuf[0][0] = buf[0][2]; + erbuf[0][2] = buf[0][3]; + erbuf[0][6] = buf[0][10]; + erbuf[0][8] = buf[0][11]; + erbuf[2][0] = buf[1][2]; + erbuf[2][2] = buf[1][3]; + erbuf[2][6] = buf[1][10]; + erbuf[2][8] = buf[1][11]; + erbuf[1][3] = buf[1][5]; + erbuf[1][5] = buf[1][6]; + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Write data through virtual dataset by hyperslab */ + /* Select stripe */ + start[0] = 0; + start[1] = 0; + start[2] = 0; + start[3] = 0; + count[0] = 3; + count[1] = 3; + count[2] = 1; + count[3] = 3; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL ,count, NULL) < 0) + TEST_ERROR + + /* Write data through virtual dataset by hyperslab */ + /* Write first stripe pattern */ + if(H5Dwrite(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + HDmemset(erbuf, 0, sizeof(erbuf)); + erbuf[0][0] = buf[0][0]; + erbuf[0][1] = buf[0][2]; + erbuf[0][8] = buf[0][6]; + erbuf[0][9] = buf[0][8]; + erbuf[1][0] = buf[2][0]; + erbuf[1][1] = buf[2][2]; + erbuf[1][8] = buf[2][6]; + erbuf[1][9] = buf[2][8]; + erbuf[0][13] = buf[1][3]; + erbuf[0][14] = buf[1][5]; + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Select stripe */ + start[0] = 0; + start[1] = 0; + start[2] = 1; + start[3] = 0; + count[0] = 3; + count[1] = 3; + count[2] = 1; + count[3] = 3; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL ,count, NULL) < 0) + TEST_ERROR + + /* Write second slice */ + if(H5Dwrite(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + erbuf[0][4] = buf[0][3]; + erbuf[0][5] = buf[0][5]; + erbuf[0][6] = buf[1][0]; + erbuf[0][7] = buf[1][1]; + erbuf[0][12] = buf[1][2]; + erbuf[0][15] = buf[1][3]; + erbuf[1][4] = buf[1][5]; + erbuf[1][7] = buf[1][6]; + erbuf[1][12] = buf[1][7]; + erbuf[1][13] = buf[1][8]; + erbuf[1][14] = buf[2][3]; + erbuf[1][15] = buf[2][5]; + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Select stripe */ + start[0] = 0; + start[1] = 0; + start[2] = 2; + start[3] = 0; + count[0] = 3; + count[1] = 3; + count[2] = 1; + count[3] = 3; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL ,count, NULL) < 0) + TEST_ERROR + + /* Write third slice */ + if(H5Dwrite(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + erbuf[0][2] = buf[0][0]; + erbuf[0][3] = buf[0][2]; + erbuf[0][10] = buf[0][6]; + erbuf[0][11] = buf[0][8]; + erbuf[1][2] = buf[2][0]; + erbuf[1][3] = buf[2][2]; + erbuf[1][10] = buf[2][6]; + erbuf[1][11] = buf[2][8]; + erbuf[1][5] = buf[1][3]; + erbuf[1][6] = buf[1][5]; + + /* Reopen srcdset and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ +# + /* Read data directly from source dataset */ + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + count[0] = 2; + count[1] = 16; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL ,count, NULL) < 0) + TEST_ERROR + + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Read dataset */ + if(H5Dread(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close */ + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(srcspace[1]) < 0) + TEST_ERROR + srcspace[1] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + if(H5Sclose(vspace[1]) < 0) + TEST_ERROR + vspace[1] = -1; + if(H5Sclose(memspace) < 0) + TEST_ERROR + memspace = -1; + /* Close */ if(H5Pclose(dcpl) < 0) @@ -1501,6 +2539,8 @@ error: if(vspace[i] >= 0) (void)H5Sclose(vspace[i]); } /* end for */ + if(memspace >= 0) + (void)H5Sclose(memspace); if(dcpl >= 0) (void)H5Pclose(dcpl); } H5E_END_TRY; -- cgit v0.12 From 95983cbdfe74dc991c190cb04e2ff76202cac31c Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 31 Mar 2015 15:20:10 -0500 Subject: [svn-r26680] Implement minor suggestions from 3/26/15 code review. Note make check still fails in h5dump test (unrelated to this checkin). Tested: ummon --- src/H5Dvirtual.c | 39 +++++++++++++++++++-------------------- src/H5S.c | 6 +----- src/H5Shyper.c | 10 ++++------ src/H5Sselect.c | 4 +--- 4 files changed, 25 insertions(+), 34 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 698aea8..3643c53 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -69,7 +69,7 @@ static herr_t H5D__virtual_write(H5D_io_info_t *io_info, static herr_t H5D__virtual_flush(H5D_t *dset, hid_t dxpl_id); /* Other functions */ -static htri_t H5D__virtual_open_source_dset(const H5D_t *vdset, +static herr_t H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *virtual_ent, hid_t dxpl_id); @@ -191,14 +191,14 @@ done: * *------------------------------------------------------------------------- */ -static htri_t +static herr_t H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *virtual_ent, hid_t dxpl_id) { H5F_t *src_file = NULL; /* Source file */ hbool_t src_file_open = FALSE; /* Whether we have opened and need to close src_file */ H5G_loc_t src_root_loc; /* Object location of source file root group */ - htri_t ret_value = TRUE; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -207,7 +207,8 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, HDassert(!virtual_ent->source_dset); /* Get dapl and fapl from current (virtual dataset) location? VDSINC */ - /* Write code to check if these exist and return FALSE otherwise VDSINC */ + /* Write code to check if these exist and return without opening dset + * otherwise VDSINC */ /* Check if we need to open the source file */ if(HDstrcmp(virtual_ent->source_file_name, ".")) { @@ -447,7 +448,6 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5S_t *projected_mem_space = NULL; /* Memory space for selection in a single mapping */ H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */ hssize_t select_nelmts; /* Number of elements in selection */ - htri_t opened_dset; /* Whether we opened the source dataset */ size_t i; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -479,18 +479,16 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Only perform I/O if there are any elements */ if(select_nelmts > 0) { /* Open source dataset */ - if(!storage->list[i].source_dset) { + if(!storage->list[i].source_dset) /* Try to open dataset */ - if((opened_dset = H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], io_info->dxpl_id)) < 0) + if(H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], io_info->dxpl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") - if(opened_dset) - /* Sanity check that the source space has been patched by now */ - HDassert(storage->list[i].source_space_status == H5O_VIRTUAL_STATUS_CORRECT); - } /* end if */ - /* Check if source dataset is open */ if(storage->list[i].source_dset) { + /* Sanity check that the source space has been patched by now */ + HDassert(storage->list[i].source_space_status == H5O_VIRTUAL_STATUS_CORRECT); + /* Project intersection of file space and mapping virtual space onto * mapping source space */ if(H5S_select_project_intersection(storage->list[i].virtual_select, storage->list[i].source_select, file_space, &projected_src_space) < 0) @@ -516,6 +514,9 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, projected_mem_space = NULL; } /* end for */ + /* Fill unmapped part of buffer with fill value. Keep track of total number + * elements written to memory buffer and assert that it == nelmts */ + done: /* Release allocated resources on failure */ if(projected_src_space) { @@ -554,7 +555,6 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5S_t *projected_mem_space = NULL; /* Memory space for selection in a single mapping */ H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */ hssize_t select_nelmts; /* Number of elements in selection */ - htri_t opened_dset; /* Whether we opened the source dataset */ size_t i; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -588,15 +588,15 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Open source dataset, fail if cannot open */ if(!storage->list[i].source_dset) { //VDSINC check all source datasets before any I/O - if((opened_dset = H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], io_info->dxpl_id)) < 0) + if(H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], io_info->dxpl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") - if(!opened_dset) + if(!storage->list[i].source_dset) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "did not open source dataset") - - /* Sanity check that source space has been patched by now */ - HDassert(storage->list[i].source_space_status == H5O_VIRTUAL_STATUS_CORRECT); } /* end if */ + /* Sanity check that source space has been patched by now */ + HDassert(storage->list[i].source_space_status == H5O_VIRTUAL_STATUS_CORRECT); + /* Extend source dataset if necessary and there is an unlimited * dimension VDSINC */ /* Project intersection of file space and mapping virtual space onto @@ -654,8 +654,7 @@ H5D__virtual_flush(H5D_t UNUSED *dset, hid_t UNUSED dxpl_id) { FUNC_ENTER_STATIC_NOERR - /* Need to decide what to do here - flush only open datasets, try to flush - * all, or do nothing and rely on source datasets to flush themselves? */ + /* Flush only open datasets */ /* No-op for now VDSINC */ FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5S.c b/src/H5S.c index 4d6ef76..717374c 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -479,7 +479,7 @@ H5Sextent_copy(hid_t dst_id,hid_t src_id) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") /* Copy */ - if(H5S_extent_copy_real(&(dst->extent), &(src->extent), TRUE) < 0) + if(H5S_extent_copy(dst, src) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent") done: @@ -521,10 +521,6 @@ H5S_extent_copy(H5S_t *dst, const H5S_t *src) if(H5S_select_all(dst, FALSE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") - /* Mark the destination space as no longer shared if it was before */ - if(H5O_msg_reset_share(H5O_SDSPACE_ID, dst) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRESET, FAIL, "can't stop sharing dataspace") - done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_extent_copy() */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 13573e1..51194f9 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -8963,10 +8963,8 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, /* Calculate proj_down_dims (note loop relies on unsigned i wrapping around) */ - proj_down_dims[proj_rank - 1] = proj_space->extent.size[proj_rank - 1]; - if(proj_rank > 1) - for(i = proj_rank - 2; i < proj_rank; i--) - proj_down_dims[i] = proj_space->extent.size[i] * proj_down_dims[i + 1]; + if(H5VM_array_down(proj_rank, proj_space->extent.size, proj_down_dims) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't compute 'down' chunk size value") /* Remove current selection from proj_space */ if(H5S_SELECT_RELEASE(proj_space) < 0) @@ -9137,7 +9135,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, * the plane of the span currently being built (i.e. it's * finished being built) */ for(i = proj_rank - 1; ((i > 0) - && (((proj_off / proj_down_dims[i]) + && (((proj_off / proj_down_dims[i - 1]) % proj_space->extent.size[i]) != curr_span_dim[i - 1])); i--) { if(curr_span_tree[i]) { @@ -9158,7 +9156,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, } /* end if */ /* Update curr_span_dim */ - curr_span_dim[i - 1] = (proj_off / proj_down_dims[i]) % proj_space->extent.size[i]; + curr_span_dim[i - 1] = (proj_off / proj_down_dims[i - 1]) % proj_space->extent.size[i]; } /* end for */ /* Compute bounds for new span in lowest dimension */ diff --git a/src/H5Sselect.c b/src/H5Sselect.c index ed384e5..b62186b 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -2128,7 +2128,6 @@ H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, const H5S_t *src_intersect_space, H5S_t **new_space_ptr) { H5S_t *new_space = NULL; /* New dataspace constructed */ - unsigned i; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -2146,8 +2145,7 @@ H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy destination space extent") /* Set offset to zeros */ - for(i = 0; i < new_space->extent.rank; i++) - new_space->select.offset[i] = 0; + (void)HDmemset(new_space->select.offset, 0, (size_t)new_space->extent.rank * sizeof(new_space->select.offset[0])); new_space->select.offset_changed = FALSE; /* If the intersecting space is "all", the intersection must be equal to the -- cgit v0.12 From 7a4b02567e4de16d7478c10ffa07562b0daf320b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 9 Apr 2015 15:52:06 -0500 Subject: [svn-r26775] Update error file with new item. --- tools/h5dump/errfiles/tdset-2.err | 13 ++++++++----- tools/h5dump/errfiles/tperror.err | 13 ++++++++----- tools/h5dump/errfiles/tslink-D.err | 19 +++++++++++-------- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/tools/h5dump/errfiles/tdset-2.err b/tools/h5dump/errfiles/tdset-2.err index d9b92f3..775351e 100644 --- a/tools/h5dump/errfiles/tdset-2.err +++ b/tools/h5dump/errfiles/tdset-2.err @@ -1,17 +1,20 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dopen2(): not found + #000: (file name) line (number) in H5Dopen2(): unable to open dataset + major: Dataset + minor: Can't open object + #001: (file name) line (number) in H5D__open_name(): not found major: Dataset minor: Object not found - #001: (file name) line (number) in H5G_loc_find(): can't find object + #002: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #002: (file name) line (number) in H5G_traverse(): internal path traversal failed + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed + #004: (file name) line (number) in H5G_traverse_real(): traversal operator failed major: Symbol table minor: Callback failed - #004: (file name) line (number) in H5G_loc_find_cb(): object 'dset3' doesn't exist + #005: (file name) line (number) in H5G_loc_find_cb(): object 'dset3' doesn't exist major: Symbol table minor: Object not found HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): diff --git a/tools/h5dump/errfiles/tperror.err b/tools/h5dump/errfiles/tperror.err index 19a7a73..29f9e7f 100644 --- a/tools/h5dump/errfiles/tperror.err +++ b/tools/h5dump/errfiles/tperror.err @@ -1,17 +1,20 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dopen2(): not found + #000: (file name) line (number) in H5Dopen2(): unable to open dataset + major: Dataset + minor: Can't open object + #001: (file name) line (number) in H5D__open_name(): not found major: Dataset minor: Object not found - #001: (file name) line (number) in H5G_loc_find(): can't find object + #002: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #002: (file name) line (number) in H5G_traverse(): internal path traversal failed + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed + #004: (file name) line (number) in H5G_traverse_real(): traversal operator failed major: Symbol table minor: Callback failed - #004: (file name) line (number) in H5G_loc_find_cb(): object 'bogus' doesn't exist + #005: (file name) line (number) in H5G_loc_find_cb(): object 'bogus' doesn't exist major: Symbol table minor: Object not found HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): diff --git a/tools/h5dump/errfiles/tslink-D.err b/tools/h5dump/errfiles/tslink-D.err index b98e324..924e9cf 100644 --- a/tools/h5dump/errfiles/tslink-D.err +++ b/tools/h5dump/errfiles/tslink-D.err @@ -1,25 +1,28 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dopen2(): not found + #000: (file name) line (number) in H5Dopen2(): unable to open dataset + major: Dataset + minor: Can't open object + #001: (file name) line (number) in H5D__open_name(): not found major: Dataset minor: Object not found - #001: (file name) line (number) in H5G_loc_find(): can't find object + #002: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #002: (file name) line (number) in H5G_traverse(): internal path traversal failed + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #003: (file name) line (number) in H5G_traverse_real(): special link traversal failed + #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed major: Links minor: Link traversal failure - #004: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed + #005: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed major: Links minor: Link traversal failure - #005: (file name) line (number) in H5G_traverse_slink(): unable to follow symbolic link + #006: (file name) line (number) in H5G_traverse_slink(): unable to follow symbolic link major: Symbol table minor: Object not found - #006: (file name) line (number) in H5G_traverse_real(): traversal operator failed + #007: (file name) line (number) in H5G_traverse_real(): traversal operator failed major: Symbol table minor: Callback failed - #007: (file name) line (number) in H5G_traverse_slink_cb(): component not found + #008: (file name) line (number) in H5G_traverse_slink_cb(): component not found major: Symbol table minor: Object not found -- cgit v0.12 From 26e709edc65f279cb4a9fbd4e31a9531ce62a8b7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 13 Apr 2015 15:15:00 -0500 Subject: [svn-r26794] Fix formatting for selection. Irregular reuses blocks and points for datasets however indentation after line breaks are an issue. --- tools/lib/h5tools_dump.c | 34 ++++++++++++++++++---------------- tools/lib/h5tools_str.c | 9 ++------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 29a6d68..54b7015 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2890,15 +2890,33 @@ h5tools_print_virtual_selection(hid_t vspace, hid_t dcpl_id, size_t index, h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */ + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_str_reset(buffer); if (H5Sis_regular_hyperslab(vspace)) { h5tools_str_append(buffer, "%s %s ", VDS_REG_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin); + h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + + h5tools_str_reset(buffer); h5tools_str_dump_space_slabs(buffer, vspace, info, ctx); } else { h5tools_str_append(buffer, "%s %s ", VDS_IRR_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin); + h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + ctx->indent_level++; + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(buffer); h5tools_str_dump_space_blocks(buffer, vspace, info); + ctx->indent_level--; } + h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_ALL: /* Entire extent selected */ @@ -3001,11 +3019,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_str_append(&buffer, "%s %s", STORAGE_LAYOUT, BEGIN); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - ctx->indent_level++; - - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - stl = H5Pget_layout(dcpl_id); switch (stl) { case H5D_CHUNKED: @@ -3243,21 +3256,12 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); -/*EIP h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", END); -*/ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); } ctx->indent_level--; } - - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s", END); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); } break; default: @@ -3266,8 +3270,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); }/*switch*/ - ctx->indent_level--; - ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 4381df8..cd1bec8 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -438,11 +438,9 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace, H5Sget_regular_hyperslab(rspace, start, stride, count, block); /* Print hyperslab information */ - h5tools_str_append(str, "%s", "\n"); - h5tools_str_indent(str, info, ctx); /* Start coordinates */ - h5tools_str_append(str, "%s ", START); + h5tools_str_append(str, "%s%s ", info->line_indent, START); for (j = 0; j < ndims; j++) h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", start[j]); h5tools_str_append(str, ")"); @@ -478,8 +476,6 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace, h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", block[j]); } h5tools_str_append(str, ")"); - h5tools_str_append(str, "%s", "\n"); - h5tools_str_indent(str, info, ctx); } /*------------------------------------------------------------------------- @@ -523,8 +519,7 @@ h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, for (i = 0; i < nblocks; i++) { int j; - h5tools_str_append(str, info->dset_blockformat_pre, i ? "," OPTIONAL_LINE_BREAK " " : "", - (unsigned long)i); + h5tools_str_append(str, info->dset_blockformat_pre, i ? "," OPTIONAL_LINE_BREAK " " : "", (unsigned long)i); /* Start coordinates and opposite corner */ for (j = 0; j < ndims; j++) -- cgit v0.12 From 11efaf4ff7d49c9242f832db4394376ba2541ab0 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 13 Apr 2015 15:47:03 -0500 Subject: [svn-r26798] Fix other storage layout whitespace --- tools/lib/h5tools_dump.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 54b7015..96be6a2 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -3022,6 +3022,10 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, stl = H5Pget_layout(dcpl_id); switch (stl) { case H5D_CHUNKED: + ctx->indent_level++; + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s ", CHUNKED); @@ -3084,8 +3088,13 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); } h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + ctx->indent_level--; break; case H5D_COMPACT: + ctx->indent_level++; + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", COMPACT); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); @@ -3096,6 +3105,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + ctx->indent_level--; break; case H5D_CONTIGUOUS: { @@ -3107,7 +3117,11 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, * EXTERNAL_FILE *------------------------------------------------------------------------- */ + ctx->indent_level++; if (next) { + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", CONTIGUOUS); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); @@ -3143,6 +3157,9 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, else { haddr_t ioffset; + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", CONTIGUOUS); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); @@ -3162,6 +3179,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_str_append(&buffer, "OFFSET "H5_PRINTF_HADDR_FMT, ioffset); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); } + ctx->indent_level--; } break; case H5D_VIRTUAL: -- cgit v0.12 From f53cfbe9d66c87b414bb759b91d7c32eb28fa88f Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 16 Apr 2015 15:57:26 -0500 Subject: [svn-r26828] Implement support for unlimited selections (not supported by VDS code yet). Add tests for unlimited selections. Various other minor changes. Tested: ummon --- src/H5Fint.c | 127 +++++++++++++++ src/H5Fprivate.h | 6 + src/H5Olayout.c | 8 +- src/H5Pdcpl.c | 6 +- src/H5R.c | 4 +- src/H5S.c | 22 ++- src/H5Sall.c | 11 +- src/H5Shyper.c | 465 ++++++++++++++++++++++++++++++++++++++++++++++++------- src/H5Snone.c | 11 +- src/H5Spkg.h | 20 ++- src/H5Spoint.c | 11 +- src/H5Sprivate.h | 12 +- src/H5Spublic.h | 2 +- src/H5Sselect.c | 48 ++++-- src/H5public.h | 1 + test/tselect.c | 392 ++++++++++++++++++++++++++++++++++++++++++++++ test/vds.c | 12 +- 17 files changed, 1056 insertions(+), 102 deletions(-) diff --git a/src/H5Fint.c b/src/H5Fint.c index 31f4176..3600476 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -1644,6 +1644,9 @@ done: * then increments the pointer to the first byte after the * address. An undefined value is stored as all 1's. * + * Note this function is almost identical to H5F_size_encode. + * Changes should be made in both places. + * * Return: void * * Programmer: Robb Matzke @@ -1716,6 +1719,9 @@ H5F_addr_encode(const H5F_t *f, uint8_t **pp/*in,out*/, haddr_t addr) * If the value read is all 1's then the address is returned * with an undefined value. * + * Note this function is almost identical to H5F_size_decode. + * Changes should be made in both places. + * * Return: void * * Programmer: Robb Matzke @@ -1806,6 +1812,127 @@ H5F_addr_decode(const H5F_t *f, const uint8_t **pp/*in,out*/, haddr_t *addr_p/*o /*------------------------------------------------------------------------- + * Function: H5F_size_encode + * + * Purpose: Encodes a size into the buffer pointed to by *PP and then + * increments the pointer to the first byte after the size. + * An undefined value is stored as all 1's. If size cannot + * be HSIZE_UNDEF, then you can use H5F_ENCODE_LENGTH + * instead. + * + * Note this function is almost identical to H5F_addr_encode + * and H5F_addr_encode_len. Changes should be made in both + * places. + * + * Return: void + * + * Programmer: Neil Fortner + * Friday, April 10, 2015 + * + *------------------------------------------------------------------------- + */ +void +H5F_size_encode(const H5F_t *f, uint8_t **pp/*in,out*/, hsize_t size) +{ + unsigned u; /* Local index variable */ + + /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOERR + + HDassert(f); + HDassert(pp && *pp); + + if(size != HSIZE_UNDEF) { + for(u = 0; u < H5F_SIZEOF_SIZE(f); u++) { + *(*pp)++ = (uint8_t)(size & 0xff); + size >>= 8; + } /* end for */ + HDassert("overflow" && 0 == size); + } /* end if */ + else { + for(u = 0; u < H5F_SIZEOF_SIZE(f); u++) + *(*pp)++ = 0xff; + } /* end else */ + + FUNC_LEAVE_NOAPI_VOID +} /* end H5F_size_encode() */ + + +/*------------------------------------------------------------------------- + * Function: H5F_size_decode + * + * Purpose: Decodes a size from the buffer pointed to by *PP and + * updates the pointer to point to the next byte after the + * size. + * + * If the value read is all 1's then the size is returned + * with an undefined value. If size cannot be HSIZE_UNDEF, + * then you can use H5F_DECODE_LENGTH instead. + * + * Note this function is almost identical to H5F_addr_decode + * and H5F_addr_decode_len. Changes should be made in both + * places. + * + * Return: void + * + * Programmer: Neil Fortner + * Friday, April 10, 2015 + * + *------------------------------------------------------------------------- + */ +void +H5F_size_decode(const H5F_t *f, const uint8_t **pp/*in,out*/, + hsize_t *size_p/*out*/) +{ + hbool_t all_zero = TRUE; /* True if address was all zeroes */ + unsigned u; /* Local index variable */ + + /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOERR + + HDassert(f); + HDassert(pp && *pp); + HDassert(size_p); + + /* Reset value in destination */ + *size_p = 0; + + /* Decode bytes from size */ + for(u = 0; u < H5F_SIZEOF_SIZE(f); u++) { + uint8_t c; /* Local decoded byte */ + + /* Get decoded byte (and advance pointer) */ + c = *(*pp)++; + + /* Check for non-undefined size byte value */ + if(c != 0xff) + all_zero = FALSE; + + if(u < sizeof(*size_p)) { + haddr_t tmp = c; /* Local copy of size, for casting */ + + /* Shift decoded byte to correct position */ + tmp <<= (u * 8); /*use tmp to get casting right */ + + /* Merge into already decoded bytes */ + *size_p |= tmp; + } /* end if */ + else + if(!all_zero) + HDassert(0 == **pp); /*overflow */ + } /* end for */ + + /* If 'all_zero' is still TRUE, the size_p was entirely composed of '0xff' + * bytes, which is the encoded form of 'HSIZE_UNDEF', so set the destination + * to that value */ + if(all_zero) + *size_p = HSIZE_UNDEF; + + FUNC_LEAVE_NOAPI_VOID +} /* end H5F_size_decode() */ + + +/*------------------------------------------------------------------------- * Function: H5F_set_grp_btree_shared * * Purpose: Set the grp_btree_shared field with a valid ref-count pointer. diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 4cd8c69..ab07526 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -662,6 +662,12 @@ H5_DLL void H5F_addr_encode_len(size_t addr_len, uint8_t **pp, haddr_t addr); H5_DLL void H5F_addr_decode(const H5F_t *f, const uint8_t **pp, haddr_t *addr_p); H5_DLL void H5F_addr_decode_len(size_t addr_len, const uint8_t **pp, haddr_t *addr_p); +/* Size-related functions */ +H5_DLL void H5F_size_encode(const H5F_t *f, uint8_t **pp/*in,out*/, + hsize_t size); +H5_DLL void H5F_size_decode(const H5F_t *f, const uint8_t **pp/*in,out*/, + hsize_t *size_p/*out*/); + /* File access property list callbacks */ H5_DLL herr_t H5P_facc_close(hid_t dxpl_id, void *close_data); diff --git a/src/H5Olayout.c b/src/H5Olayout.c index ac5219d..b3987e8 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -294,11 +294,11 @@ H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, heap_block_p += tmp_size; /* Source selection */ - if(H5S_SELECT_DESERIALIZE(&(mesg->storage.u.virt.list[i].source_select), &heap_block_p) < 0) + if(H5S_SELECT_DESERIALIZE(f, &(mesg->storage.u.virt.list[i].source_select), &heap_block_p) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode source space selection") /* Virtual selection */ - if(H5S_SELECT_DESERIALIZE(&(mesg->storage.u.virt.list[i].virtual_select), &heap_block_p) < 0) + if(H5S_SELECT_DESERIALIZE(f, &(mesg->storage.u.virt.list[i].virtual_select), &heap_block_p) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode virtual space selection") } /* end for */ @@ -510,11 +510,11 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi heap_block_p += str_size[(2 * i) + 1]; /* Source selection */ - if(H5S_SELECT_SERIALIZE(mesg->storage.u.virt.list[i].source_select, &heap_block_p) < 0) + if(H5S_SELECT_SERIALIZE(f, mesg->storage.u.virt.list[i].source_select, &heap_block_p) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize source selection") /* Virtual selection */ - if(H5S_SELECT_SERIALIZE(mesg->storage.u.virt.list[i].virtual_select, &heap_block_p) < 0) + if(H5S_SELECT_SERIALIZE(f, mesg->storage.u.virt.list[i].virtual_select, &heap_block_p) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize virtual selection") } /* end for */ diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index b9b4653..60241a0 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1833,7 +1833,11 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index) if(H5D_VIRTUAL != layout.type) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") - /* Get the virtual space */ + /* Attempt to open source dataset and patch extent if extent status is not + * H5O_VIRTUAL_STATUS_CORRECT, otherwise if status is + * H5O_VIRTUAL_STATUS_INVALID, patch with bounds of selection VDSINC */ + + /* Get the source space */ if(index >= layout.storage.u.virt.list_nused) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); diff --git a/src/H5R.c b/src/H5R.c index d96f5e6..aa819f2 100644 --- a/src/H5R.c +++ b/src/H5R.c @@ -291,7 +291,7 @@ H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5 H5F_addr_encode(loc->oloc->file, &p, obj_loc.oloc->addr); /* Serialize the selection into heap buffer */ - if(H5S_SELECT_SERIALIZE(space, &p) < 0) + if(H5S_SELECT_SERIALIZE(loc->oloc->file, space, &p) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Unable to serialize selection") /* Save the serialized buffer for later */ @@ -668,7 +668,7 @@ H5R_get_region(H5F_t *file, hid_t dxpl_id, const void *_ref) HGOTO_ERROR(H5E_DATASPACE, H5E_NOTFOUND, NULL, "not found") /* Unserialize the selection */ - if(H5S_SELECT_DESERIALIZE(&ret_value, &p) < 0) + if(H5S_SELECT_DESERIALIZE(file, &ret_value, &p) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, NULL, "can't deserialize selection") done: diff --git a/src/H5S.c b/src/H5S.c index 717374c..57e3b86 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -521,6 +521,12 @@ H5S_extent_copy(H5S_t *dst, const H5S_t *src) if(H5S_select_all(dst, FALSE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + /* If the selection is 'hyper', update the selection due to changed extent + */ + if(H5S_GET_SELECT_TYPE(dst) == H5S_SEL_HYPERSLABS) + if(H5S__hyper_update_extent_offset(dst) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") + done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_extent_copy() */ @@ -1356,6 +1362,12 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, if(H5S_select_all(space, FALSE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + /* If the selection is 'hyper', update the selection due to changed + * extent */ + if(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS) + if(H5S__hyper_update_extent_offset(space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") + done: FUNC_LEAVE_NOAPI(ret_value) } /* H5S_set_extent_simple() */ @@ -1579,7 +1591,7 @@ H5S_encode(H5S_t *obj, unsigned char *buf, size_t *nalloc) buf += extent_size; /* Encode the selection part of dataspace. */ - if(H5S_SELECT_SERIALIZE(obj, &buf) < 0) + if(H5S_SELECT_SERIALIZE(f, obj, &buf) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode select space") } /* end else */ @@ -1698,7 +1710,7 @@ H5S_decode(const unsigned char *buf) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection") /* Decode the select part of dataspace. I believe this part always exists. */ - if(H5S_SELECT_DESERIALIZE(&ds, &buf) < 0) + if(H5S_SELECT_DESERIALIZE(f, &ds, &buf) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode space selection") /* Set return value */ @@ -1989,6 +2001,12 @@ H5S_set_extent_real(H5S_t *space, const hsize_t *size) if(H5S_select_all(space, FALSE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + /* If the selection is 'hyper', update the selection due to changed + * extent */ + if(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS) + if(H5S__hyper_update_extent_offset(space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") + /* Mark the dataspace as no longer shared if it was before */ if(H5O_msg_reset_share(H5O_SDSPACE_ID, space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRESET, FAIL, "can't stop sharing dataspace") diff --git a/src/H5Sall.c b/src/H5Sall.c index bbb2935..505e4cf 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -39,8 +39,10 @@ static herr_t H5S_all_get_seq_list(const H5S_t *space, unsigned flags, static herr_t H5S_all_release(H5S_t *space); static htri_t H5S_all_is_valid(const H5S_t *space); static hssize_t H5S_all_serial_size(const H5S_t *space); -static herr_t H5S_all_serialize(const H5S_t *space, uint8_t **p); -static herr_t H5S_all_deserialize(H5S_t *space, const uint8_t **p); +static herr_t H5S_all_serialize(const H5F_t *f, const H5S_t *space, + uint8_t **p); +static herr_t H5S_all_deserialize(const H5F_t *f, H5S_t *space, + uint32_t version, uint8_t flags, const uint8_t **p); static herr_t H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_all_offset(const H5S_t *space, hsize_t *off); static htri_t H5S_all_is_contiguous(const H5S_t *space); @@ -512,7 +514,7 @@ H5S_all_serial_size (const H5S_t UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_all_serialize (const H5S_t *space, uint8_t **p) +H5S_all_serialize(const H5F_t UNUSED *f, const H5S_t *space, uint8_t **p) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -553,7 +555,8 @@ H5S_all_serialize (const H5S_t *space, uint8_t **p) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_all_deserialize(H5S_t *space, const uint8_t UNUSED **p) +H5S_all_deserialize(const H5F_t UNUSED *f, H5S_t *space, + uint32_t UNUSED version, uint8_t UNUSED flags, const uint8_t UNUSED **p) { herr_t ret_value = SUCCEED; /* return value */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 51194f9..32b6fe9 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -54,8 +54,10 @@ static herr_t H5S_hyper_get_seq_list(const H5S_t *space, unsigned flags, static herr_t H5S_hyper_release(H5S_t *space); static htri_t H5S_hyper_is_valid(const H5S_t *space); static hssize_t H5S_hyper_serial_size(const H5S_t *space); -static herr_t H5S_hyper_serialize(const H5S_t *space, uint8_t **p); -static herr_t H5S_hyper_deserialize(H5S_t *space, const uint8_t **p); +static herr_t H5S_hyper_serialize(const H5F_t *f, const H5S_t *space, + uint8_t **p); +static herr_t H5S_hyper_deserialize(const H5F_t *f, H5S_t *space, + uint32_t version, uint8_t flags, const uint8_t **p); static herr_t H5S_hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_hyper_offset(const H5S_t *space, hsize_t *offset); static htri_t H5S_hyper_is_contiguous(const H5S_t *space); @@ -1644,6 +1646,16 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection) dst_hslab->app_diminfo[u]=src_hslab->app_diminfo[u]; } /* end for */ } /* end if */ + dst_hslab->unlim_dim = src_hslab->unlim_dim; + if(src_hslab->unlim_dim >= 0) { + size_t u; /* Local index variable */ + + for(u = 0; u < src->extent.rank; u++) { + dst_hslab->opt_unlim_diminfo[u] = src_hslab->opt_unlim_diminfo[u]; + dst_hslab->app_diminfo[u] = src_hslab->app_diminfo[u]; + } /* end for */ + } /* end for */ + dst_hslab->num_elem_non_unlim = src_hslab->num_elem_non_unlim; dst->select.sel_info.hslab->span_lst=src->select.sel_info.hslab->span_lst; /* Check if there is hyperslab span information to copy */ @@ -1658,6 +1670,21 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection) dst->select.sel_info.hslab->span_lst = H5S_hyper_copy_span(src->select.sel_info.hslab->span_lst); } /* end if */ + /* If there is an unlimited dimension, we must update the selection if the + * extent changed */ + if(dst_hslab->unlim_dim >= 0) { + htri_t extent_equal; + + /* Check if the extent changed */ + if((extent_equal = H5S_extent_equal(src, dst)) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "dataspace comparison failed") + + if(!extent_equal) + /* Update selection due to changed extent */ + if(H5S__hyper_update_extent_offset(dst) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") + } /* end if */ + done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_copy() */ @@ -1866,15 +1893,26 @@ H5S_get_select_hyper_nblocks(H5S_t *space) /* Check for a "regular" hyperslab selection */ if(space->select.sel_info.hslab->diminfo_valid) { + const H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */ unsigned u; /* Local index variable */ + /* Set diminfo based on whether this is an unlimited selection */ + if(space->select.sel_info.hslab->unlim_dim >= 0) + diminfo = space->select.sel_info.hslab->opt_diminfo; + else + diminfo = space->select.sel_info.hslab->app_diminfo; + /* Check each dimension */ - for(ret_value = 1, u = 0; u < space->extent.rank; u++) - ret_value *= space->select.sel_info.hslab->app_diminfo[u].count; + for(ret_value = 1, u = 0; u < space->extent.rank; u++) { + if(diminfo[u].block == (hsize_t)0) + HGOTO_DONE((hsize_t)0) + ret_value *= diminfo[u].count;; + } /* end for */ } /* end if */ else ret_value = H5S_hyper_span_nblocks(space->select.sel_info.hslab->span_lst); +done: FUNC_LEAVE_NOAPI(ret_value) } /* H5S_get_select_hyper_nblocks() */ @@ -2071,7 +2109,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_hyper_serialize (const H5S_t *space, uint8_t **p) +H5S_hyper_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p) { const H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */ hsize_t tmp_count[H5O_LAYOUT_NDIMS]; /* Temporary hyperslab counts */ @@ -2081,6 +2119,8 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t **p) hsize_t temp_off; /* Offset in a given dimension */ uint8_t *lenp; /* pointer to length location for later storage */ uint32_t len = 0; /* number of bytes used */ + uint32_t version; /* Version number */ + uint8_t flags = 0; /* Flags for message */ hsize_t block_count; /* block counter for regular hyperslabs */ unsigned fast_dim; /* Rank of the fastest changing dimension for the dataspace */ unsigned ndims; /* Rank of the dataspace */ @@ -2090,10 +2130,21 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t **p) HDassert(space); + /* Calculate version */ + if(space->select.sel_info.hslab->unlim_dim >= 0) { + version = 2; + flags |= H5S_SELECT_FLAG_UNLIM; + } /* end if */ + else + version = 1; + /* Store the preamble information */ - UINT32ENCODE(*p, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ - UINT32ENCODE(*p, (uint32_t)1); /* Store the version number */ - UINT32ENCODE(*p, (uint32_t)0); /* Store the un-used padding */ + UINT32ENCODE(*p, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ + UINT32ENCODE(*p, version); /* Store the version number */ + if(version >= 2) + *(*p)++ = flags; /* Store the flags */ + else + UINT32ENCODE(*p, (uint32_t)0); /* Store the un-used padding */ lenp = *p; /* keep the pointer to the length location for later */ *p += 4; /* skip over space for length */ @@ -2101,8 +2152,23 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t **p) UINT32ENCODE(*p, (uint32_t)space->extent.rank); len += 4; + /* If there is an unlimited dimension, only encode opt_unlim_diminfo */ + if(flags & H5S_SELECT_FLAG_UNLIM) { + unsigned i; + + HDassert(H5S_UNLIMITED == HSIZE_UNDEF); + + /* Iterate over dimensions */ + for(i = 0; i < space->extent.rank; i++) { + /* Encode start/stride/block/count */ + H5F_size_encode(f, p, space->select.sel_info.hslab->opt_unlim_diminfo[i].start); + H5F_size_encode(f, p, space->select.sel_info.hslab->opt_unlim_diminfo[i].stride); + H5F_size_encode(f, p, space->select.sel_info.hslab->opt_unlim_diminfo[i].count); + H5F_size_encode(f, p, space->select.sel_info.hslab->opt_unlim_diminfo[i].block); + } /* end for */ + } /* end if */ /* Check for a "regular" hyperslab selection */ - if(space->select.sel_info.hslab->diminfo_valid) { + else if(space->select.sel_info.hslab->diminfo_valid) { unsigned u; /* Local counting variable */ /* Set some convienence values */ @@ -2154,7 +2220,8 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t **p) /* Work on other dimensions if necessary */ if(fast_dim > 0) { - int temp_dim; /* Temporary rank holder */ + int + temp_dim; /* Temporary rank holder */ /* Reset the block counts */ tmp_count[fast_dim]=diminfo[fast_dim].count; @@ -2235,7 +2302,8 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t **p) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_hyper_deserialize (H5S_t *space, const uint8_t **p) +H5S_hyper_deserialize(const H5F_t *f, H5S_t *space, uint32_t UNUSED version, + uint8_t flags, const uint8_t **p) { unsigned rank; /* rank of points */ size_t num_elem=0; /* number of elements in selection */ @@ -2262,32 +2330,68 @@ H5S_hyper_deserialize (H5S_t *space, const uint8_t **p) /* Deserialize slabs to select */ /* (The header and rank have already beed decoded) */ rank = space->extent.rank; /* Retrieve rank from space */ - UINT32DECODE(*p,num_elem); /* decode the number of points */ - /* Set the count & stride for all blocks */ - for(tcount=count,tstride=stride,j=0; j= 2); + + /* Iterate over dimensions */ + for(i = 0; i < space->extent.rank; i++) { + /* Decode start/stride/block/count */ + H5F_size_decode(f, p, &space->select.sel_info.hslab->opt_unlim_diminfo[i].start); + H5F_size_decode(f, p, &space->select.sel_info.hslab->opt_unlim_diminfo[i].stride); + H5F_size_decode(f, p, &space->select.sel_info.hslab->opt_unlim_diminfo[i].count); + if(space->select.sel_info.hslab->opt_unlim_diminfo[i].count == H5S_UNLIMITED) { + if(space->select.sel_info.hslab->unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot have more than one unlimited dimension in selection") + space->select.sel_info.hslab->unlim_dim = (int)i; + } /* end if */ + H5F_size_decode(f, p, &space->select.sel_info.hslab->opt_unlim_diminfo[i].block); + if(space->select.sel_info.hslab->opt_unlim_diminfo[i].block == H5S_UNLIMITED) { + if(space->select.sel_info.hslab->unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot have more than one unlimited dimension in selection") + space->select.sel_info.hslab->unlim_dim = (int)i; + } /* end if */ + } /* end for */ + + /* Copy opt_unlim_diminfo to app_diminfo */ + HDassert(sizeof(space->select.sel_info.hslab->app_diminfo) == sizeof(space->select.sel_info.hslab->opt_unlim_diminfo)); + HDmemcpy(space->select.sel_info.hslab->app_diminfo, space->select.sel_info.hslab->opt_unlim_diminfo, sizeof(space->select.sel_info.hslab->app_diminfo)); - /* Retrieve the coordinates from the buffer */ - for(i=0; iselect.sel_info.hslab->opt_diminfo; else - /* - * Use the "application dimension information" to pass back to the user - * the blocks they set, not the optimized, internal information. - */ - diminfo = space->select.sel_info.hslab->app_diminfo; + if(space->select.sel_info.hslab->unlim_dim >= 0) + /* + * There is an unlimited dimension so we must use opt_diminfo as + * it has been "clipped" to the current extent. + */ + diminfo = space->select.sel_info.hslab->opt_diminfo; + else + /* + * Use the "application dimension information" to pass back to + * the user the blocks they set, not the optimized, internal + * information. + */ + diminfo = space->select.sel_info.hslab->app_diminfo; /* Build the tables of count sizes as well as the initial offset */ for(u = 0; u < ndims; u++) { @@ -3148,7 +3260,8 @@ H5S_hyper_is_regular(const H5S_t *space) HDassert(space); /* Only simple check for regular hyperslabs for now... */ - if(space->select.sel_info.hslab->diminfo_valid) + if(space->select.sel_info.hslab->diminfo_valid + || (space->select.sel_info.hslab->unlim_dim >= 0)) ret_value=TRUE; else ret_value=FALSE; @@ -6031,6 +6144,12 @@ H5S_hyper_generate_spans(H5S_t *space) /* Get the diminfo */ for(u=0; uextent.rank; u++) { + /* Check for unlimited dimension and return error */ + if(space->select.sel_info.hslab->opt_diminfo[u].count == H5S_UNLIMITED) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "can't generate spans with unlimited count (only H5S_SELECT_SET supported)") + if(space->select.sel_info.hslab->opt_diminfo[u].block == H5S_UNLIMITED) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "can't generate spans with unlimited block (only H5S_SELECT_SET supported)") + tmp_start[u]=space->select.sel_info.hslab->opt_diminfo[u].start; tmp_stride[u]=space->select.sel_info.hslab->opt_diminfo[u].stride; tmp_count[u]=space->select.sel_info.hslab->opt_diminfo[u].count; @@ -6318,6 +6437,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, const hsize_t *opt_count; /* Optimized count information */ const hsize_t *opt_block; /* Optimized block information */ unsigned u; /* Counters */ + int unlim_dim = -1; /* Unlimited dimension in selection, of -1 if none */ herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -6336,6 +6456,20 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, if(block==NULL) block = _ones; + /* Check for unlimited dimension */ + for(u = 0; uextent.rank; u++) + if((count[u] == H5S_UNLIMITED) || (block[u] == H5S_UNLIMITED)) { + if(unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot have more than one unlimited dimension in selection") + else { + if(op != H5S_SELECT_SET) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot use unlimited selection to modify existing selection") + if(count[u] == block[u] /* == H5S_UNLIMITED */) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "count and block cannot both be unlimited") + unlim_dim = (int)u; + } /* end else */ + } /* end if */ + /* * Check new selection. */ @@ -6385,12 +6519,26 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, for(u=0; uextent.rank; u++) { /* contiguous hyperslabs have the block size equal to the stride */ if(stride[u]==block[u]) { - int_count[u]=1; - int_stride[u]=1; - if(block[u]==1) - int_block[u]=count[u]; - else - int_block[u]=block[u]*count[u]; + if(count[u] == H5S_UNLIMITED) { + if(block[u] == 1) { + int_block[u] = H5S_UNLIMITED; + int_count[u] = 1; + int_stride[u] = 1; + } /* end if */ + else { + int_block[u] = block[u]; + int_count[u] = H5S_UNLIMITED; + int_stride[u] = stride[u]; + } /* end else */ + } /* end if */ + else { + int_count[u]=1; + int_stride[u]=1; + if(block[u]==1) + int_block[u]=count[u]; + else + int_block[u]=block[u]*count[u]; + } /* end else */ } /* end if */ else { if(count[u]==1) @@ -6524,16 +6672,41 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, space->select.num_elem *= (opt_count[u] * opt_block[u]); } /* end for */ + /* Save unlim_dim */ + space->select.sel_info.hslab->unlim_dim = unlim_dim; + /* Indicate that the dimension information is valid */ space->select.sel_info.hslab->diminfo_valid = TRUE; /* Indicate that there's no slab information */ space->select.sel_info.hslab->span_lst = NULL; + + /* Handle unlimited selections */ + if(unlim_dim >= 0) { + space->select.sel_info.hslab->num_elem_non_unlim = (hsize_t)1; + for(u = 0; u < space->extent.rank; u++) { + space->select.sel_info.hslab->opt_unlim_diminfo[u].start = start[u]; + space->select.sel_info.hslab->opt_unlim_diminfo[u].stride = opt_stride[u]; + space->select.sel_info.hslab->opt_unlim_diminfo[u].count = opt_count[u]; + space->select.sel_info.hslab->opt_unlim_diminfo[u].block = opt_block[u]; + + if((int)u != unlim_dim) + space->select.sel_info.hslab->num_elem_non_unlim *= (opt_count[u] * opt_block[u]); + } /* end for */ + + /* Set opt_diminfo or span tree based on extent */ + if(H5S__hyper_update_extent_offset(space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't set selection based on extent") + } /* end if */ } /* end if */ else if(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA) { /* Sanity check */ HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS); + /* Cannot modify unlimited selections */ + if(space->select.sel_info.hslab->unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection") + /* Check if there's no hyperslab span information currently */ if(NULL == space->select.sel_info.hslab->span_lst) if(H5S_hyper_generate_spans(space) < 0) @@ -6927,6 +7100,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, const hsize_t *opt_count; /* Optimized count information */ const hsize_t *opt_block; /* Optimized block information */ unsigned u; /* Counters */ + int unlim_dim = -1; /* Unlimited dimension in selection, of -1 if none */ herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -6945,6 +7119,20 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, if(block==NULL) block = _ones; + /* Check for unlimited dimension */ + for(u = 0; uextent.rank; u++) + if((count[u] == H5S_UNLIMITED) || (block[u] == H5S_UNLIMITED)) { + if(unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot have more than one unlimited dimension in selection") + else { + if(op != H5S_SELECT_SET) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot use unlimited selection to modify existing selection") + if(count[u] == block[u] /* == H5S_UNLIMITED */) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "count and block cannot both be unlimited") + unlim_dim = (int)u; + } /* end else */ + } /* end if */ + /* * Check new selection. */ @@ -6990,12 +7178,26 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, for(u=0; uextent.rank; u++) { /* contiguous hyperslabs have the block size equal to the stride */ if(stride[u]==block[u]) { - int_count[u]=1; - int_stride[u]=1; - if(block[u]==1) - int_block[u]=count[u]; - else - int_block[u]=block[u]*count[u]; + if(count[u] == H5S_UNLIMITED) { + if(block[u] == 1) { + int_block[u] = H5S_UNLIMITED; + int_count[u] = 1; + int_stride[u] = 1; + } /* end if */ + else { + int_block[u] = block[u]; + int_count[u] = H5S_UNLIMITED; + int_stride[u] = stride[u]; + } /* end else */ + } /* end if */ + else { + int_count[u]=1; + int_stride[u]=1; + if(block[u]==1) + int_block[u]=count[u]; + else + int_block[u]=block[u]*count[u]; + } /* end else */ } /* end if */ else { if(count[u]==1) @@ -7120,16 +7322,41 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, space->select.num_elem*=(opt_count[u]*opt_block[u]); } /* end for */ + /* Save unlim_dim */ + space->select.sel_info.hslab->unlim_dim = unlim_dim; + /* Indicate that the dimension information is valid */ space->select.sel_info.hslab->diminfo_valid=TRUE; /* Indicate that there's no slab information */ space->select.sel_info.hslab->span_lst=NULL; + + /* Handle unlimited selections */ + if(unlim_dim >= 0) { + space->select.sel_info.hslab->num_elem_non_unlim = (hsize_t)1; + for(u = 0; u < space->extent.rank; u++) { + space->select.sel_info.hslab->opt_unlim_diminfo[u].start = start[u]; + space->select.sel_info.hslab->opt_unlim_diminfo[u].stride = opt_stride[u]; + space->select.sel_info.hslab->opt_unlim_diminfo[u].count = opt_count[u]; + space->select.sel_info.hslab->opt_unlim_diminfo[u].block = opt_block[u]; + + if((int)u != unlim_dim) + space->select.sel_info.hslab->num_elem_non_unlim *= (opt_count[u] * opt_block[u]); + } /* end for */ + + /* Set opt_diminfo or span tree based on extent */ + if(H5S__hyper_update_extent_offset(space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't set selection based on extent") + } /* end if */ } /* end if */ else if(op>=H5S_SELECT_OR && op<=H5S_SELECT_NOTA) { /* Sanity check */ HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS); + /* Cannot modify unlimited selections */ + if(space->select.sel_info.hslab->unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection") + /* Check if there's no hyperslab span information currently */ if(space->select.sel_info.hslab->span_lst==NULL) if(H5S_hyper_generate_spans(space)<0) @@ -9254,6 +9481,127 @@ done: /*-------------------------------------------------------------------------- NAME + H5S__hyper_update_extent_offset + PURPOSE + Updates the hyperslab selection after a change to the dataspace extent + or offset + USAGE + VDSINC + RETURNS + Non-negative on success/Negative on failure. + DESCRIPTION + since unlimited selections are internally described as limited + selections with maximal size, these internal selections need to be + updated whenever the maximum size changes. This function + recaluculates the unlimited dimension (if any) of the hyperslab + selection when the extent or offset is changed. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5S__hyper_update_extent_offset(H5S_t *space) +{ + H5S_hyper_sel_t *hslab; /* Convenience pointer to hyperslab info */ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_PACKAGE + + /* Check parameters */ + HDassert(space); + hslab = space->select.sel_info.hslab; + HDassert(hslab); + + /* Check for unlimited dimension */ + if(hslab->unlim_dim < 0) + HGOTO_DONE(SUCCEED) + + /* Free previous spans, if any */ + if(hslab->span_lst != NULL) { + if(H5S_hyper_free_span_info(hslab->span_lst) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans") + hslab->span_lst = NULL; + } /* end if */ + + /* Initialize opt_diminfo wit opt_unlim_diminfo */ + hslab->opt_diminfo[hslab->unlim_dim] = hslab->opt_unlim_diminfo[hslab->unlim_dim]; + + /* Check for selection outside extent */ + if((hsize_t)((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start + + space->select.offset[hslab->unlim_dim]) + >= space->extent.size[hslab->unlim_dim]) { + if(hslab->opt_diminfo[hslab->unlim_dim].block == H5S_UNLIMITED) + hslab->opt_diminfo[hslab->unlim_dim].block = 0; + else + hslab->opt_diminfo[hslab->unlim_dim].count = 0; + + space->select.num_elem = (hsize_t)0; + + /* Mark that opt_diminfo is valid */ + hslab->diminfo_valid = TRUE; + + HGOTO_DONE(SUCCEED) + } /* end if */ + + /* Check for single block in unlimited dimension */ + if(hslab->opt_diminfo[hslab->unlim_dim].count == (hsize_t)1) { + HDassert(hslab->opt_diminfo[hslab->unlim_dim].block = H5S_UNLIMITED); + + /* Calculate actual block size for this extent */ + hslab->opt_diminfo[hslab->unlim_dim].block = + (hsize_t)((hssize_t)space->extent.size[hslab->unlim_dim] + - ((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start + + space->select.offset[hslab->unlim_dim])); + + /* Calculate number of elements */ + space->select.num_elem = hslab->opt_diminfo[hslab->unlim_dim].block + * hslab->num_elem_non_unlim; + + /* Mark that opt_diminfo is valid */ + hslab->diminfo_valid = TRUE; + } /* end if */ + else { + HDassert(hslab->opt_diminfo[hslab->unlim_dim].count == H5S_UNLIMITED); + HDassert(hslab->opt_diminfo[hslab->unlim_dim].block != H5S_UNLIMITED); + + /* Calculate initial count (last block may be partial) */ + hslab->opt_diminfo[hslab->unlim_dim].count = + ((hsize_t)((hssize_t)space->extent.size[hslab->unlim_dim] + - ((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start + + space->select.offset[hslab->unlim_dim]) + + (hssize_t)hslab->opt_diminfo[hslab->unlim_dim].stride + - (hssize_t)1) + / hslab->opt_diminfo[hslab->unlim_dim].stride); + HDassert(hslab->opt_diminfo[hslab->unlim_dim].count > (hsize_t)0); + + /* Calculate number of elements */ + space->select.num_elem = hslab->opt_diminfo[hslab->unlim_dim].count + * hslab->opt_diminfo[hslab->unlim_dim].block + * hslab->num_elem_non_unlim; + + /* Check if last block is partial */ + if(((hslab->opt_diminfo[hslab->unlim_dim].stride + * (hslab->opt_diminfo[hslab->unlim_dim].count - (hsize_t)1)) + + hslab->opt_diminfo[hslab->unlim_dim].block - (hsize_t)1) + > ((hsize_t)((hssize_t)space->extent.size[hslab->unlim_dim] + - (hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start + + space->select.offset[hslab->unlim_dim]))) { + /* Last block is partial, need to construct compound selection */ + HDassert(0 && "Not yet implemented...");//VDSINC + } /* end if */ + else + /* Last block is complete, simply mark that opt_diminfo is valid */ + hslab->diminfo_valid = TRUE; + } /* end else */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5S__hyper_update_extent_offset() */ + + +/*-------------------------------------------------------------------------- + NAME H5Sis_regular_hyperslab PURPOSE Determine if a hyperslab selection is regular @@ -9325,6 +9673,7 @@ H5Sget_regular_hyperslab(hid_t spaceid, hsize_t start[], hsize_t stride[], hsize_t count[], hsize_t block[]) { H5S_t *space; /* Dataspace to query */ + H5S_hyper_dim_t *diminfo; /* Pointer to diminfo to return */ unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -9339,19 +9688,27 @@ H5Sget_regular_hyperslab(hid_t spaceid, hsize_t start[], hsize_t stride[], if(TRUE != H5S_hyper_is_regular(space)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a regular hyperslab selection") + /* Determine which diminfo to return */ + if(space->select.sel_info.hslab->diminfo_valid) + diminfo = space->select.sel_info.hslab->app_diminfo; + else { + HDassert(space->select.sel_info.hslab->unlim_dim >= 0); + diminfo = space->select.sel_info.hslab->opt_unlim_diminfo; + } /* end else */ + /* Retrieve hyperslab parameters */ if(start) for(u = 0; u < space->extent.rank; u++) - start[u] = space->select.sel_info.hslab->app_diminfo[u].start; + start[u] = diminfo[u].start; if(stride) for(u = 0; u < space->extent.rank; u++) - stride[u] = space->select.sel_info.hslab->app_diminfo[u].stride; + stride[u] = diminfo[u].stride; if(count) for(u = 0; u < space->extent.rank; u++) - count[u] = space->select.sel_info.hslab->app_diminfo[u].count; + count[u] = diminfo[u].count; if(block) for(u = 0; u < space->extent.rank; u++) - block[u] = space->select.sel_info.hslab->app_diminfo[u].block; + block[u] = diminfo[u].block; done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Snone.c b/src/H5Snone.c index c5ec2de..28c1ffb 100644 --- a/src/H5Snone.c +++ b/src/H5Snone.c @@ -40,8 +40,10 @@ static herr_t H5S_none_get_seq_list(const H5S_t *space, unsigned flags, static herr_t H5S_none_release(H5S_t *space); static htri_t H5S_none_is_valid(const H5S_t *space); static hssize_t H5S_none_serial_size(const H5S_t *space); -static herr_t H5S_none_serialize(const H5S_t *space, uint8_t **p); -static herr_t H5S_none_deserialize(H5S_t *space, const uint8_t **p); +static herr_t H5S_none_serialize(const H5F_t *f, const H5S_t *space, + uint8_t **p); +static herr_t H5S_none_deserialize(const H5F_t *f, H5S_t *space, + uint32_t version, uint8_t flags, const uint8_t **p); static herr_t H5S_none_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_none_offset(const H5S_t *space, hsize_t *off); static htri_t H5S_none_is_contiguous(const H5S_t *space); @@ -480,7 +482,7 @@ H5S_none_serial_size(const H5S_t UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_none_serialize(const H5S_t *space, uint8_t **p) +H5S_none_serialize(const H5F_t UNUSED *f, const H5S_t *space, uint8_t **p) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -519,7 +521,8 @@ H5S_none_serialize(const H5S_t *space, uint8_t **p) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_none_deserialize(H5S_t *space, const uint8_t UNUSED **p) +H5S_none_deserialize(const H5F_t UNUSED *f, H5S_t *space, + uint32_t UNUSED version, uint8_t UNUSED flags, const uint8_t UNUSED **p) { herr_t ret_value = SUCCEED; /* return value */ diff --git a/src/H5Spkg.h b/src/H5Spkg.h index 8613fd7..c8993dc 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -34,6 +34,10 @@ #define H5S_VALID_MAX 0x01 #define H5S_VALID_PERM 0x02 +/* Flags for serialization of selections */ +#define H5S_SELECT_FLAG_UNLIM 0x01 +#define H5S_SELECT_FLAG_BITS (H5S_SELECT_FLAG_UNLIM) + /* Length of stack-allocated sequences for "project intersect" routines */ #define H5S_PROJECT_INTERSECT_NSEQS 256 @@ -109,13 +113,18 @@ struct H5S_hyper_span_info_t { typedef struct { hbool_t diminfo_valid; /* Whether the dataset has valid diminfo */ H5S_hyper_dim_t opt_diminfo[H5S_MAX_RANK]; /* per-dim selection info */ + H5S_hyper_dim_t opt_unlim_diminfo[H5S_MAX_RANK]; /* per-dim selections info */ H5S_hyper_dim_t app_diminfo[H5S_MAX_RANK]; /* per-dim selection info */ /* 'opt_diminfo' points to a [potentially] optimized version of the user's * hyperslab information. 'app_diminfo' points to the actual parameters * that the application used for setting the hyperslab selection. These * are only used for re-gurgitating the original values used to set the * hyperslab to the application when it queries the hyperslab selection - * information. */ + * information. 'opt_unlim_diminfo' is similar to opt_diminfo but + * contains H5S_UNLIMITED in the count or block of the unlimited + * dimension (if any). */ + int unlim_dim; /* Dimension where selection is unlimited, or -1 if none */ + hsize_t num_elem_non_unlim; /* # of elements in a "slice" excluding the unlimited dimension */ H5S_hyper_span_info_t *span_lst; /* List of hyperslab span information */ } H5S_hyper_sel_t; @@ -133,9 +142,11 @@ typedef htri_t (*H5S_sel_is_valid_func_t)(const H5S_t *space); /* Method to determine number of bytes required to store current selection */ typedef hssize_t (*H5S_sel_serial_size_func_t)(const H5S_t *space); /* Method to store current selection in "serialized" form (a byte sequence suitable for storing on disk) */ -typedef herr_t (*H5S_sel_serialize_func_t)(const H5S_t *space, uint8_t **p); -/* Method to store create selection from "serialized" form (a byte sequence suitable for storing on disk) */ -typedef herr_t (*H5S_sel_deserialize_func_t)(H5S_t *space, const uint8_t **p); +typedef herr_t (*H5S_sel_serialize_func_t)(const H5F_t *f, const H5S_t *space, + uint8_t **p); +/* Method to create selection from "serialized" form (a byte sequence suitable for storing on disk) */ +typedef herr_t (*H5S_sel_deserialize_func_t)(const H5F_t *f, H5S_t *space, + uint32_t version, uint8_t flags, const uint8_t **p); /* Method to determine smallest n-D bounding box containing the current selection */ typedef herr_t (*H5S_sel_bounds_func_t)(const H5S_t *space, hsize_t *start, hsize_t *end); /* Method to determine linear offset of initial element in selection within dataspace */ @@ -255,6 +266,7 @@ H5_DLL herr_t H5S_extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, H5_DLL herr_t H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, const H5S_t *src_intersect_space, H5S_t *proj_space); +H5_DLL herr_t H5S__hyper_update_extent_offset(H5S_t *space); /* Testing functions */ #ifdef H5S_TESTING diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 44e0510..66fbb03 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -41,8 +41,10 @@ static herr_t H5S_point_get_seq_list(const H5S_t *space, unsigned flags, static herr_t H5S_point_release(H5S_t *space); static htri_t H5S_point_is_valid(const H5S_t *space); static hssize_t H5S_point_serial_size(const H5S_t *space); -static herr_t H5S_point_serialize(const H5S_t *space, uint8_t **p); -static herr_t H5S_point_deserialize(H5S_t *space, const uint8_t **p); +static herr_t H5S_point_serialize(const H5F_t *f, const H5S_t *space, + uint8_t **p); +static herr_t H5S_point_deserialize(const H5F_t *f, H5S_t *space, + uint32_t version, uint8_t flags, const uint8_t **p); static herr_t H5S_point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_point_offset(const H5S_t *space, hsize_t *off); static htri_t H5S_point_is_contiguous(const H5S_t *space); @@ -820,7 +822,7 @@ H5S_point_serial_size (const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_point_serialize (const H5S_t *space, uint8_t **p) +H5S_point_serialize(const H5F_t UNUSED *f, const H5S_t *space, uint8_t **p) { H5S_pnt_node_t *curr; /* Point information nodes */ uint8_t *lenp; /* pointer to length location for later storage */ @@ -889,7 +891,8 @@ H5S_point_serialize (const H5S_t *space, uint8_t **p) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_point_deserialize (H5S_t *space, const uint8_t **p) +H5S_point_deserialize(const H5F_t UNUSED *f, H5S_t *space, + uint32_t UNUSED version, uint8_t UNUSED flags, const uint8_t **p) { H5S_seloper_t op=H5S_SELECT_SET; /* Selection operation */ unsigned rank; /* Rank of points */ diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 6ce2821..d037b03 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -126,7 +126,7 @@ typedef struct H5S_sel_iter_t { #define H5S_SELECT_VALID(S) ((*(S)->select.type->is_valid)(S)) #define H5S_SELECT_RELEASE(S) ((*(S)->select.type->release)(S)) #define H5S_SELECT_SERIAL_SIZE(S) ((*(S)->select.type->serial_size)(S)) -#define H5S_SELECT_SERIALIZE(S,BUF) ((*(S)->select.type->serialize)(S,BUF)) +#define H5S_SELECT_SERIALIZE(F,S,BUF) ((*(S)->select.type->serialize)(F,S,BUF)) #define H5S_SELECT_BOUNDS(S,START,END) ((*(S)->select.type->bounds)(S,START,END)) #define H5S_SELECT_OFFSET(S, OFFSET) ((*(S)->select.type->offset)(S, OFFSET)) #define H5S_SELECT_IS_CONTIGUOUS(S) ((*(S)->select.type->is_contiguous)(S)) @@ -152,7 +152,7 @@ typedef struct H5S_sel_iter_t { #define H5S_SELECT_VALID(S) (H5S_select_valid(S)) #define H5S_SELECT_RELEASE(S) (H5S_select_release(S)) #define H5S_SELECT_SERIAL_SIZE(S) (H5S_select_serial_size(S)) -#define H5S_SELECT_SERIALIZE(S,BUF) (H5S_select_serialize(S,BUF)) +#define H5S_SELECT_SERIALIZE(F,S,BUF) (H5S_select_serialize(F,S,BUF)) #define H5S_SELECT_BOUNDS(S,START,END) (H5S_get_select_bounds(S,START,END)) #define H5S_SELECT_OFFSET(S, OFFSET) (H5S_get_select_offset(S, OFFSET)) #define H5S_SELECT_IS_CONTIGUOUS(S) (H5S_select_is_contiguous(S)) @@ -171,7 +171,7 @@ typedef struct H5S_sel_iter_t { #endif /* H5S_PACKAGE */ /* Handle these two callbacks in a special way, since they have prologs that need to be executed */ #define H5S_SELECT_COPY(DST,SRC,SHARE) (H5S_select_copy(DST,SRC,SHARE)) -#define H5S_SELECT_DESERIALIZE(S,BUF) (H5S_select_deserialize(S,BUF)) +#define H5S_SELECT_DESERIALIZE(F,S,BUF) (H5S_select_deserialize(F,S,BUF)) /* Operations on dataspaces */ @@ -207,7 +207,8 @@ H5_DLL htri_t H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2); H5_DLL herr_t H5S_extent_copy(H5S_t *dst, const H5S_t *src); /* Operations on selections */ -H5_DLL herr_t H5S_select_deserialize(H5S_t **space, const uint8_t **p); +H5_DLL herr_t H5S_select_deserialize(const H5F_t *f, H5S_t **space, + const uint8_t **p); H5_DLL H5S_sel_type H5S_get_select_type(const H5S_t *space); H5_DLL herr_t H5S_select_iterate(void *buf, hid_t type_id, const H5S_t *space, H5D_operator_t op, void *operator_data); @@ -228,7 +229,8 @@ H5_DLL herr_t H5S_select_get_seq_list(const H5S_t *space, unsigned flags, H5S_sel_iter_t *iter, size_t maxseq, size_t maxbytes, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); H5_DLL hssize_t H5S_select_serial_size(const H5S_t *space); -H5_DLL herr_t H5S_select_serialize(const H5S_t *space, uint8_t **p); +H5_DLL herr_t H5S_select_serialize(const H5F_t *f, const H5S_t *space, + uint8_t **p); H5_DLL htri_t H5S_select_is_contiguous(const H5S_t *space); H5_DLL htri_t H5S_select_is_single(const H5S_t *space); H5_DLL htri_t H5S_select_is_regular(const H5S_t *space); diff --git a/src/H5Spublic.h b/src/H5Spublic.h index 37d3866..721c4bf 100644 --- a/src/H5Spublic.h +++ b/src/H5Spublic.h @@ -25,7 +25,7 @@ /* Define atomic datatypes */ #define H5S_ALL (hid_t)0 -#define H5S_UNLIMITED ((hsize_t)(hssize_t)(-1)) +#define H5S_UNLIMITED HSIZE_UNDEF /* Define user-level maximum number of dimensions */ #define H5S_MAX_RANK 32 diff --git a/src/H5Sselect.c b/src/H5Sselect.c index b62186b..a703cc3 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -63,7 +63,9 @@ static herr_t H5S_select_iter_next_block(H5S_sel_iter_t *iter); herr_t H5S_select_offset(H5S_t *space, const hssize_t *offset) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI(FAIL) /* Check args */ HDassert(space); @@ -76,7 +78,14 @@ H5S_select_offset(H5S_t *space, const hssize_t *offset) /* Indicate that the offset was changed */ space->select.offset_changed = TRUE; - FUNC_LEAVE_NOAPI(SUCCEED) + /* If the selection is 'hyper', update the selection due to changed offset + */ + if(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS) + if(H5S__hyper_update_extent_offset(space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") + +done: + FUNC_LEAVE_NOAPI(ret_value) } /* H5S_select_offset() */ @@ -258,7 +267,7 @@ H5S_select_serial_size(const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_select_serialize(const H5S_t *space, uint8_t **p) +H5S_select_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p) { herr_t ret_value=SUCCEED; /* Return value */ @@ -268,7 +277,7 @@ H5S_select_serialize(const H5S_t *space, uint8_t **p) HDassert(p); /* Call the selection type's serialize function */ - ret_value=(*space->select.type->serialize)(space,p); + ret_value = (*space->select.type->serialize)(f, space, p); FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_select_serialize() */ @@ -450,11 +459,13 @@ H5S_select_valid(const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_select_deserialize (H5S_t **space, const uint8_t **p) +H5S_select_deserialize(const H5F_t *f, H5S_t **space, const uint8_t **p) { H5S_t *tmp_space; /* Pointer to actual dataspace to use, either *space or a newly allocated one */ uint32_t sel_type; /* Pointer to the selection type */ + uint32_t version; /* Version number */ + uint8_t flags = 0; /* Flags */ herr_t ret_value=FAIL; /* return value */ FUNC_ENTER_NOAPI(FAIL) @@ -472,8 +483,23 @@ H5S_select_deserialize (H5S_t **space, const uint8_t **p) /* Decode selection type */ UINT32DECODE(*p, sel_type); - /* Skip over the remainder of the header */ - *p += 12; + /* Decode version */ + UINT32DECODE(*p, version); + + if(version >= (uint32_t)2) { + /* Decode flags */ + flags = *(*p)++; + + /* Check for unknown flags */ + if(flags & ~H5S_SELECT_FLAG_BITS) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTLOAD, FAIL, "unknown flag for selection") + + /* Skip over the remainder of the header */ + *p += 4; + } /* end if */ + else + /* Skip over the remainder of the header */ + *p += 8; /* Decode and check or patch rank for point and hyperslab selections */ if((sel_type == H5S_SEL_POINTS) || (sel_type == H5S_SEL_HYPERSLABS)) { @@ -494,19 +520,19 @@ H5S_select_deserialize (H5S_t **space, const uint8_t **p) /* Make routine for selection type */ switch(sel_type) { case H5S_SEL_POINTS: /* Sequence of points selected */ - ret_value = (*H5S_sel_point->deserialize)(tmp_space, p); + ret_value = (*H5S_sel_point->deserialize)(f, tmp_space, version, flags, p); break; case H5S_SEL_HYPERSLABS: /* Hyperslab selection defined */ - ret_value = (*H5S_sel_hyper->deserialize)(tmp_space, p); + ret_value = (*H5S_sel_hyper->deserialize)(f, tmp_space, version, flags, p); break; case H5S_SEL_ALL: /* Entire extent selected */ - ret_value = (*H5S_sel_all->deserialize)(tmp_space, p); + ret_value = (*H5S_sel_all->deserialize)(f, tmp_space, version, flags, p); break; case H5S_SEL_NONE: /* Nothing selected */ - ret_value = (*H5S_sel_none->deserialize)(tmp_space, p); + ret_value = (*H5S_sel_none->deserialize)(f, tmp_space, version, flags, p); break; default: diff --git a/src/H5public.h b/src/H5public.h index 7bacb3d..3b89879 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -176,6 +176,7 @@ H5_GCC_DIAG_ON(long-long) #else # error "nothing appropriate for hsize_t" #endif +#define HSIZE_UNDEF ((hsize_t)(hssize_t)(-1)) /* * File addresses have their own types. diff --git a/test/tselect.c b/test/tselect.c index b34d095..df67ff6 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -13230,6 +13230,395 @@ test_hyper_regular(void) /**************************************************************** ** +** test_hyper_unlim(): Tests unlimited hyperslab selections +** +****************************************************************/ +static void +test_hyper_unlim(void) +{ + hid_t sid; + hsize_t dims[3] = {4, 4, 7}; + hsize_t mdims[3] = {4, H5S_UNLIMITED, 7}; + hsize_t start[3] = {1, 2, 1}; + hsize_t stride[3] = {1, 1, 3}; + hsize_t count[3] = {1, 1, 2}; + hsize_t block[3] = {2, H5S_UNLIMITED, 2}; + hsize_t blocklist[12]; + hsize_t eblock1[6] = {1, 2, 1, 2, 3, 2}; + hsize_t eblock2[6] = {1, 2, 4, 2, 3, 5}; + hssize_t offset[3] = {0, -1, 0}; + hssize_t npoints; + hssize_t nblocks; + herr_t ret; + + /* Output message about test being performed */ + MESSAGE(6, ("Testing unlimited hyperslab selections\n")); + + /* Create dataspace */ + sid = H5Screate_simple(3, dims, mdims); + CHECK(sid, FAIL, "H5Screate_simple"); + + /* Select unlimited hyperslab */ + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + + /* Check number of elements */ + npoints = H5Sget_select_npoints(sid); + CHECK(npoints, FAIL, "H5Sget_select_npoints"); + VERIFY(npoints, (hssize_t)16, "H5Sget_select_npoints"); + + /* Get blocklist */ + nblocks = H5Sget_select_hyper_nblocks(sid); + CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); + VERIFY(nblocks, (hssize_t)2, "H5Sget_select_hyper_nblocks"); + ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); + CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); + + /* Verify blocklist */ + if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { + if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) + ERROR("H5Sget_select_hyper_blocklist"); + if(HDmemcmp(&blocklist[6], eblock1, sizeof(eblock1))) + ERROR("H5Sget_select_hyper_blocklist"); + } /* end if */ + else + if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) + ERROR("H5Sget_select_hyper_blocklist"); + + /* Shrink dataspace */ + dims[1] = 3; + ret = H5Sset_extent_simple(sid, 3, dims, mdims); + CHECK(ret, FAIL, "H5Sset_extent_simple"); + + /* Check number of elements */ + npoints = H5Sget_select_npoints(sid); + CHECK(npoints, FAIL, "H5Sget_select_npoints"); + VERIFY(npoints, (hssize_t)8, "H5Sget_select_npoints"); + + /* Get blocklist */ + nblocks = H5Sget_select_hyper_nblocks(sid); + CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); + VERIFY(nblocks, (hssize_t)2, "H5Sget_select_hyper_nblocks"); + ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); + CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); + + /* Verify blocklist */ + eblock1[4] = 2; + eblock2[4] = 2; + if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { + if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) + ERROR("H5Sget_select_hyper_blocklist"); + if(HDmemcmp(&blocklist[6], eblock1, sizeof(eblock1))) + ERROR("H5Sget_select_hyper_blocklist"); + } /* end if */ + else + if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) + ERROR("H5Sget_select_hyper_blocklist"); + + /* Shrink dataspace */ + dims[1] = 2; + ret = H5Sset_extent_simple(sid, 3, dims, mdims); + CHECK(ret, FAIL, "H5Sset_extent_simple"); + + /* Check number of elements */ + npoints = H5Sget_select_npoints(sid); + CHECK(npoints, FAIL, "H5Sget_select_npoints"); + VERIFY(npoints, (hssize_t)0, "H5Sget_select_npoints"); + + /* Make sure there are no blocks */ + nblocks = H5Sget_select_hyper_nblocks(sid); + CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); + VERIFY(nblocks, (hssize_t)0, "H5Sget_select_hyper_nblocks"); + + /* Shrink dataspace */ + dims[1] = 1; + ret = H5Sset_extent_simple(sid, 3, dims, mdims); + CHECK(ret, FAIL, "H5Sset_extent_simple"); + + /* Check number of elements */ + npoints = H5Sget_select_npoints(sid); + CHECK(npoints, FAIL, "H5Sget_select_npoints"); + VERIFY(npoints, (hssize_t)0, "H5Sget_select_npoints"); + + /* Make sure there are no blocks */ + nblocks = H5Sget_select_hyper_nblocks(sid); + CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); + VERIFY(nblocks, (hssize_t)0, "H5Sget_select_hyper_nblocks"); + + /* Extend dataspace */ + dims[1] = 7; + ret = H5Sset_extent_simple(sid, 3, dims, mdims); + CHECK(ret, FAIL, "H5Sset_extent_simple"); + + /* Check number of elements */ + npoints = H5Sget_select_npoints(sid); + CHECK(npoints, FAIL, "H5Sget_select_npoints"); + VERIFY(npoints, (hssize_t)40, "H5Sget_select_npoints"); + + /* Get blocklist */ + nblocks = H5Sget_select_hyper_nblocks(sid); + CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); + VERIFY(nblocks, (hssize_t)2, "H5Sget_select_hyper_nblocks"); + ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); + CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); + + /* Verify blocklist */ + eblock1[4] = 6; + eblock2[4] = 6; + if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { + if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) + ERROR("H5Sget_select_hyper_blocklist"); + if(HDmemcmp(&blocklist[6], eblock1, sizeof(eblock1))) + ERROR("H5Sget_select_hyper_blocklist"); + } /* end if */ + else + if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) + ERROR("H5Sget_select_hyper_blocklist"); + +#if 0 //VDSINC + /* Set offset of selection */ + ret = H5Soffset_simple(sid, offset); + CHECK(ret, FAIL, "H5Soffset_simple"); + + /* Check number of elements */ + npoints = H5Sget_select_npoints(sid); + CHECK(npoints, FAIL, "H5Sget_select_npoints"); + VERIFY(npoints, (hssize_t)48, "H5Sget_select_npoints"); + + /* Get blocklist */ + nblocks = H5Sget_select_hyper_nblocks(sid); + CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); + VERIFY(nblocks, (hssize_t)2, "H5Sget_select_hyper_nblocks"); + ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); + CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); + + /* Verify blocklist */ + eblock1[1] = 1; + eblock1[4] = 6; + eblock2[1] = 1; + eblock2[4] = 6; + if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { + if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) + ERROR("H5Sget_select_hyper_blocklist"); + if(HDmemcmp(&blocklist[6], eblock1, sizeof(eblock1))) + ERROR("H5Sget_select_hyper_blocklist"); + } /* end if */ + else + if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) + ERROR("H5Sget_select_hyper_blocklist"); + + /* Reset offset of selection */ + ret = H5Soffset_simple(sid, NULL); + CHECK(ret, FAIL, "H5Soffset_simple"); +#endif + + /* + * Now try with multiple blocks in unlimited dimension + */ + stride[1] = 3; + stride[2] = 1; + count[1] = H5S_UNLIMITED; + count[2] = 1; + block[1] = 2; + + /* Select unlimited hyperslab */ + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + + /* Check number of elements */ + npoints = H5Sget_select_npoints(sid); + CHECK(npoints, FAIL, "H5Sget_select_npoints"); + VERIFY(npoints, (hssize_t)16, "H5Sget_select_npoints"); + + /* Get blocklist */ + nblocks = H5Sget_select_hyper_nblocks(sid); + CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); + VERIFY(nblocks, (hssize_t)2, "H5Sget_select_hyper_nblocks"); + ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); + CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); + + /* Verify blocklist */ + eblock1[1] = 2; + eblock1[4] = 3; + eblock2[1] = 5; + eblock2[2] = 1; + eblock2[4] = 6; + eblock2[5] = 2; + if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { + if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) + ERROR("H5Sget_select_hyper_blocklist"); + if(HDmemcmp(&blocklist[6], eblock1, sizeof(eblock1))) + ERROR("H5Sget_select_hyper_blocklist"); + } /* end if */ + else + if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) + ERROR("H5Sget_select_hyper_blocklist"); + +#if 0 //VDSINC + /* Shrink dataspace */ + dims[1] = 3; + ret = H5Sset_extent_simple(sid, 3, dims, mdims); + CHECK(ret, FAIL, "H5Sset_extent_simple"); + + /* Check number of elements */ + npoints = H5Sget_select_npoints(sid); + CHECK(npoints, FAIL, "H5Sget_select_npoints"); + VERIFY(npoints, (hssize_t)4, "H5Sget_select_npoints"); + + /* Get blocklist */ + nblocks = H5Sget_select_hyper_nblocks(sid); + CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); + VERIFY(nblocks, (hssize_t)1, "H5Sget_select_hyper_nblocks"); + ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); + CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); + + /* Verify blocklist */ + eblock1[4] = 2; + if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) + ERROR("H5Sget_select_hyper_blocklist"); +#endif //VDSINC + + /* Extend dataspace */ + dims[1] = 4; + ret = H5Sset_extent_simple(sid, 3, dims, mdims); + CHECK(ret, FAIL, "H5Sset_extent_simple"); + + /* Check number of elements */ + npoints = H5Sget_select_npoints(sid); + CHECK(npoints, FAIL, "H5Sget_select_npoints"); + VERIFY(npoints, (hssize_t)8, "H5Sget_select_npoints"); + + /* Get blocklist */ + nblocks = H5Sget_select_hyper_nblocks(sid); + CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); + VERIFY(nblocks, (hssize_t)1, "H5Sget_select_hyper_nblocks"); + ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); + CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); + + /* Verify blocklist */ + eblock1[4] = 3; + if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) + ERROR("H5Sget_select_hyper_blocklist"); + + /* Extend dataspace */ + dims[1] = 5; + ret = H5Sset_extent_simple(sid, 3, dims, mdims); + CHECK(ret, FAIL, "H5Sset_extent_simple"); + + /* Check number of elements */ + npoints = H5Sget_select_npoints(sid); + CHECK(npoints, FAIL, "H5Sget_select_npoints"); + VERIFY(npoints, (hssize_t)8, "H5Sget_select_npoints"); + + /* Get blocklist */ + nblocks = H5Sget_select_hyper_nblocks(sid); + CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); + VERIFY(nblocks, (hssize_t)1, "H5Sget_select_hyper_nblocks"); + ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); + CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); + + /* Verify blocklist */ + if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) + ERROR("H5Sget_select_hyper_blocklist"); + +#if 0 //VDSINC + /* Extend dataspace */ + dims[1] = 6; + ret = H5Sset_extent_simple(sid, 3, dims, mdims); + CHECK(ret, FAIL, "H5Sset_extent_simple"); + + /* Check number of elements */ + npoints = H5Sget_select_npoints(sid); + CHECK(npoints, FAIL, "H5Sget_select_npoints"); + VERIFY(npoints, (hssize_t)12, "H5Sget_select_npoints"); + + /* Get blocklist */ + nblocks = H5Sget_select_hyper_nblocks(sid); + CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); + VERIFY(nblocks, (hssize_t)2, "H5Sget_select_hyper_nblocks"); + ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); + CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); + + /* Verify blocklist */ + eblock2[4] = 5; + if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { + if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) + ERROR("H5Sget_select_hyper_blocklist"); + if(HDmemcmp(&blocklist[6], eblock1, sizeof(eblock1))) + ERROR("H5Sget_select_hyper_blocklist"); + } /* end if */ + else + if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) + ERROR("H5Sget_select_hyper_blocklist"); + + /* Set offset of selection */ + ret = H5Soffset_simple(sid, offset); + CHECK(ret, FAIL, "H5Soffset_simple"); + + /* Check number of elements */ + npoints = H5Sget_select_npoints(sid); + CHECK(npoints, FAIL, "H5Sget_select_npoints"); + VERIFY(npoints, (hssize_t)16, "H5Sget_select_npoints"); + + /* Get blocklist */ + nblocks = H5Sget_select_hyper_nblocks(sid); + CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); + VERIFY(nblocks, (hssize_t)2, "H5Sget_select_hyper_nblocks"); + ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); + CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); + + /* Verify blocklist */ + eblock1[1] = 1; + eblock1[4] = 2; + eblock2[1] = 4; + eblock2[4] = 5; + if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { + if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) + ERROR("H5Sget_select_hyper_blocklist"); + if(HDmemcmp(&blocklist[6], eblock1, sizeof(eblock1))) + ERROR("H5Sget_select_hyper_blocklist"); + } /* end if */ + else + if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) + ERROR("H5Sget_select_hyper_blocklist"); + + /* Set offset of selection */ + offset[1] = (hssize_t)3; + ret = H5Soffset_simple(sid, offset); + CHECK(ret, FAIL, "H5Soffset_simple"); + + /* Check number of elements */ + npoints = H5Sget_select_npoints(sid); + CHECK(npoints, FAIL, "H5Sget_select_npoints"); + VERIFY(npoints, (hssize_t)4, "H5Sget_select_npoints"); + + /* Get blocklist */ + nblocks = H5Sget_select_hyper_nblocks(sid); + CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); + VERIFY(nblocks, (hssize_t)1, "H5Sget_select_hyper_nblocks"); + ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); + CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); + + /* Verify blocklist */ + eblock1[1] = 5; + eblock1[4] = 5; + if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) + ERROR("H5Sget_select_hyper_blocklist"); + + /* Reset offset of selection */ + ret = H5Soffset_simple(sid, NULL); + CHECK(ret, FAIL, "H5Soffset_simple"); +#endif //VDSINC + + //VDSINC write test saving unlim selection to file as region reference + + /* Close the dataspace */ + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); +} /* end test_hyper_unlim() */ + +/**************************************************************** +** ** test_select(): Main H5S selection testing routine. ** ****************************************************************/ @@ -13392,6 +13781,9 @@ test_select(void) /* Test 'regular' hyperslab query routines */ test_hyper_regular(); + /* Test unlimited hyperslab selections */ + test_hyper_unlim(); + } /* test_select() */ diff --git a/test/vds.c b/test/vds.c index abb52fc..5092d1e 100644 --- a/test/vds.c +++ b/test/vds.c @@ -416,11 +416,11 @@ test_api(test_api_config_t config, hid_t fapl) const char *src_dset[4] = {"src_dset1....", "src_dset2.....", "src_dset3......", "src_dset4......."}; /* Source dataset names (different lengths) */ char tmp_filename[32]; char tmp_dsetname[32]; - hsize_t dims[4] = {10, 20, 0, 0}; /* Data space current size */ - hsize_t start[4]; /* Hyperslab start */ - hsize_t stride[4]; /* Hyperslab stride */ - hsize_t count[4]; /* Hyperslab count */ - hsize_t block[4]; /* Hyperslab block */ + hsize_t dims[2] = {10, 20}; /* Data space current size */ + hsize_t start[2]; /* Hyperslab start */ + hsize_t stride[2]; /* Hyperslab stride */ + hsize_t count[2]; /* Hyperslab count */ + hsize_t block[2]; /* Hyperslab block */ hsize_t coord[10]; /* Point selection array */ size_t size_out; unsigned i; @@ -2457,7 +2457,7 @@ test_basic_io(unsigned config, hid_t fapl) if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR } /* end if */ -# + /* Read data directly from source dataset */ /* Select hyperslab in memory space */ start[0] = 0; -- cgit v0.12 From b31103b33225c39fe0ddaa0c3fa1cdaae64f7cbc Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 21 Apr 2015 10:07:21 -0500 Subject: [svn-r26862] Fix bug in H5D__get_storage_size where it would issue an error unnecessarily for virtual datasets. Tested: ummon --- src/H5Dint.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/H5Dint.c b/src/H5Dint.c index a36b8b3..d7ef991 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1957,6 +1957,7 @@ H5D__get_storage_size(H5D_t *dset, hid_t dxpl_id, hsize_t *storage_size) case H5D_VIRTUAL: /* Just set to 0 until private data is implemented VDSINC */ *storage_size = 0; + break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: -- cgit v0.12 From 0a3151792fed6457cbd8092018b891f7f2b9653e Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 21 Apr 2015 17:42:33 -0500 Subject: [svn-r26878] Fix errors in unlimited selection serialize/deserialize Other minor fixes Tested: jam --- examples/h5_vds-eiger.c | 2 +- src/H5Olayout.c | 4 +-- src/H5R.c | 2 +- src/H5S.c | 18 +++++------ src/H5Sall.c | 4 +-- src/H5Shyper.c | 83 +++++++++++++++++++++++++------------------------ src/H5Snone.c | 4 +-- src/H5Spkg.h | 4 ++- src/H5Spoint.c | 4 +-- src/H5Sprivate.h | 6 ++-- src/H5Sselect.c | 13 +++++--- 11 files changed, 76 insertions(+), 68 deletions(-) diff --git a/examples/h5_vds-eiger.c b/examples/h5_vds-eiger.c index 93b39b2..c459aa4 100644 --- a/examples/h5_vds-eiger.c +++ b/examples/h5_vds-eiger.c @@ -121,7 +121,7 @@ main (void) * Find number of mappings. */ status = H5Pget_virtual_count (dcpl, &num_map); - printf(" Number of mappings is %d\n", num_map); + printf(" Number of mappings is %d\n", (int)num_map); /* * Get mapping parameters for each mapping. diff --git a/src/H5Olayout.c b/src/H5Olayout.c index b3987e8..a20b6d4 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -473,12 +473,12 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi block_size += str_size[(2 * i) + 1]; /* Source selection */ - if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virt.list[i].source_select)) < 0) + if((select_serial_size = H5S_SELECT_SERIAL_SIZE(f, mesg->storage.u.virt.list[i].source_select)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") block_size += (size_t)select_serial_size; /* Virtual dataset selection */ - if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virt.list[i].virtual_select)) < 0) + if((select_serial_size = H5S_SELECT_SERIAL_SIZE(f, mesg->storage.u.virt.list[i].virtual_select)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") block_size += (size_t)select_serial_size; } /* end for */ diff --git a/src/H5R.c b/src/H5R.c index aa819f2..c9474c7 100644 --- a/src/H5R.c +++ b/src/H5R.c @@ -275,7 +275,7 @@ H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5 HDmemset(ref, 0, H5R_DSET_REG_REF_BUF_SIZE); /* Get the amount of space required to serialize the selection */ - if((buf_size = H5S_SELECT_SERIAL_SIZE(space)) < 0) + if((buf_size = H5S_SELECT_SERIAL_SIZE(loc->oloc->file, space)) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "Invalid amount of space for serializing selection") /* Increase buffer size to allow for the dataset OID */ diff --git a/src/H5S.c b/src/H5S.c index 57e3b86..e24879c 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -52,8 +52,6 @@ /********************/ /* Local Prototypes */ /********************/ -static herr_t H5S_set_extent_simple (H5S_t *space, unsigned rank, - const hsize_t *dims, const hsize_t *max); static htri_t H5S_is_simple(const H5S_t *sdim); static herr_t H5S_encode(H5S_t *obj, unsigned char *buf, size_t *nalloc); static H5S_t *H5S_decode(const unsigned char *buf); @@ -1278,7 +1276,7 @@ H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[/*rank*/], } /* Do it */ - if (H5S_set_extent_simple(space, (unsigned)rank, dims, max)<0) + if (H5S__set_extent_simple(space, (unsigned)rank, dims, max)<0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set simple extent") done: @@ -1287,7 +1285,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5S_set_extent_simple + * Function: H5S__set_extent_simple * * Purpose: This is where the real work happens for * H5Sset_extent_simple(). @@ -1301,14 +1299,14 @@ done: * *------------------------------------------------------------------------- */ -static herr_t -H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, +herr_t +H5S__set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, const hsize_t *max) { unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_PACKAGE /* Check args */ HDassert(rank <= H5S_MAX_RANK); @@ -1370,7 +1368,7 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5S_set_extent_simple() */ +} /* H5S__set_extent_simple() */ /*------------------------------------------------------------------------- @@ -1481,7 +1479,7 @@ H5S_create_simple(unsigned rank, const hsize_t dims[/*rank*/], /* Create the space and set the extent */ if(NULL==(ret_value=H5S_create(H5S_SIMPLE))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "can't create simple dataspace") - if(H5S_set_extent_simple(ret_value,rank,dims,maxdims)<0) + if(H5S__set_extent_simple(ret_value,rank,dims,maxdims)<0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "can't set dimensions") done: @@ -1564,7 +1562,7 @@ H5S_encode(H5S_t *obj, unsigned char *buf, size_t *nalloc) HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace size") /* Find out the size of buffer needed for selection */ - if((sselect_size = H5S_SELECT_SERIAL_SIZE(obj)) < 0) + if((sselect_size = H5S_SELECT_SERIAL_SIZE(f, obj)) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace selection size") H5_ASSIGN_OVERFLOW(select_size, sselect_size, hssize_t, size_t); diff --git a/src/H5Sall.c b/src/H5Sall.c index 505e4cf..cb7e6f2 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -38,7 +38,7 @@ static herr_t H5S_all_get_seq_list(const H5S_t *space, unsigned flags, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); static herr_t H5S_all_release(H5S_t *space); static htri_t H5S_all_is_valid(const H5S_t *space); -static hssize_t H5S_all_serial_size(const H5S_t *space); +static hssize_t H5S_all_serial_size(const H5F_t *f, const H5S_t *space); static herr_t H5S_all_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p); static herr_t H5S_all_deserialize(const H5F_t *f, H5S_t *space, @@ -478,7 +478,7 @@ H5S_all_is_valid (const H5S_t UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ static hssize_t -H5S_all_serial_size (const H5S_t UNUSED *space) +H5S_all_serial_size(const H5F_t UNUSED *f, const H5S_t UNUSED *space) { FUNC_ENTER_NOAPI_NOINIT_NOERR diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 32b6fe9..0886b23 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -53,7 +53,7 @@ static herr_t H5S_hyper_get_seq_list(const H5S_t *space, unsigned flags, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); static herr_t H5S_hyper_release(H5S_t *space); static htri_t H5S_hyper_is_valid(const H5S_t *space); -static hssize_t H5S_hyper_serial_size(const H5S_t *space); +static hssize_t H5S_hyper_serial_size(const H5F_t *f, const H5S_t *space); static herr_t H5S_hyper_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p); static herr_t H5S_hyper_deserialize(const H5F_t *f, H5S_t *space, @@ -1976,7 +1976,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ static hssize_t -H5S_hyper_serial_size(const H5S_t *space) +H5S_hyper_serial_size(const H5F_t *f, const H5S_t *space) { unsigned u; /* Counter */ hsize_t block_count; /* block counter for regular hyperslabs */ @@ -1986,24 +1986,41 @@ H5S_hyper_serial_size(const H5S_t *space) HDassert(space); - /* Basic number of bytes required to serialize hyperslab selection: - * + + + - * + + <# of blocks (4 bytes)> = 24 bytes - */ - ret_value = 24; + /* Check for version (right now, an unlimited dimension is the only thing + * that would bump the version) */ + if(space->select.sel_info.hslab->unlim_dim >= 0) + /* Version 2 */ + /* Size required is always: + * + + + + * + + + * (4 * * ) = + * 17 + (4 * sizeof_size) bytes + */ + ret_value = (hssize_t)17 + ((hssize_t)4 * (hssize_t)space->extent.rank + * (hssize_t)H5F_SIZEOF_SIZE(f)); + else { + /* Version 1 */ + /* Basic number of bytes required to serialize hyperslab selection: + * + + + + * + + <# of blocks (4 bytes)> + * = 24 bytes + */ + ret_value = 24; - /* Check for a "regular" hyperslab selection */ - if(space->select.sel_info.hslab->diminfo_valid) { - /* Check each dimension */ - for(block_count = 1, u = 0; u < space->extent.rank; u++) - block_count *= space->select.sel_info.hslab->opt_diminfo[u].count; - } /* end if */ - else - /* Spin through hyperslab spans, adding 8 * rank bytes for each block */ - block_count = H5S_hyper_span_nblocks(space->select.sel_info.hslab->span_lst); + /* Check for a "regular" hyperslab selection */ + if(space->select.sel_info.hslab->diminfo_valid) { + /* Check each dimension */ + for(block_count = 1, u = 0; u < space->extent.rank; u++) + block_count *= space->select.sel_info.hslab->opt_diminfo[u].count; + } /* end if */ + else + /* Spin through hyperslab spans, adding 8 * rank bytes for each + * block */ + block_count = H5S_hyper_span_nblocks(space->select.sel_info.hslab->span_lst); - H5_CHECK_OVERFLOW((8 * space->extent.rank * block_count), hsize_t, hssize_t); - ret_value += (hssize_t)(8 * block_count * space->extent.rank); + H5_CHECK_OVERFLOW((8 * space->extent.rank * block_count), hsize_t, hssize_t); + ret_value += (hssize_t)(8 * block_count * space->extent.rank); + } /* end else */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_serial_size() */ @@ -2339,29 +2356,15 @@ H5S_hyper_deserialize(const H5F_t *f, H5S_t *space, uint32_t UNUSED version, /* Iterate over dimensions */ for(i = 0; i < space->extent.rank; i++) { /* Decode start/stride/block/count */ - H5F_size_decode(f, p, &space->select.sel_info.hslab->opt_unlim_diminfo[i].start); - H5F_size_decode(f, p, &space->select.sel_info.hslab->opt_unlim_diminfo[i].stride); - H5F_size_decode(f, p, &space->select.sel_info.hslab->opt_unlim_diminfo[i].count); - if(space->select.sel_info.hslab->opt_unlim_diminfo[i].count == H5S_UNLIMITED) { - if(space->select.sel_info.hslab->unlim_dim >= 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot have more than one unlimited dimension in selection") - space->select.sel_info.hslab->unlim_dim = (int)i; - } /* end if */ - H5F_size_decode(f, p, &space->select.sel_info.hslab->opt_unlim_diminfo[i].block); - if(space->select.sel_info.hslab->opt_unlim_diminfo[i].block == H5S_UNLIMITED) { - if(space->select.sel_info.hslab->unlim_dim >= 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot have more than one unlimited dimension in selection") - space->select.sel_info.hslab->unlim_dim = (int)i; - } /* end if */ + H5F_size_decode(f, p, &start[i]); + H5F_size_decode(f, p, &stride[i]); + H5F_size_decode(f, p, &count[i]); + H5F_size_decode(f, p, &block[i]); } /* end for */ - /* Copy opt_unlim_diminfo to app_diminfo */ - HDassert(sizeof(space->select.sel_info.hslab->app_diminfo) == sizeof(space->select.sel_info.hslab->opt_unlim_diminfo)); - HDmemcpy(space->select.sel_info.hslab->app_diminfo, space->select.sel_info.hslab->opt_unlim_diminfo, sizeof(space->select.sel_info.hslab->app_diminfo)); - - /* Update selection due to match current extent */ - if(H5S__hyper_update_extent_offset(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") + /* Select the hyperslab to the current selection */ + if((ret_value = H5S_select_hyperslab(space, H5S_SELECT_SET, start, stride, count, block)) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") } /* end if */ else { /* decode the number of points */ @@ -9546,7 +9549,7 @@ H5S__hyper_update_extent_offset(H5S_t *space) /* Check for single block in unlimited dimension */ if(hslab->opt_diminfo[hslab->unlim_dim].count == (hsize_t)1) { - HDassert(hslab->opt_diminfo[hslab->unlim_dim].block = H5S_UNLIMITED); + HDassert(hslab->opt_diminfo[hslab->unlim_dim].block == H5S_UNLIMITED); /* Calculate actual block size for this extent */ hslab->opt_diminfo[hslab->unlim_dim].block = diff --git a/src/H5Snone.c b/src/H5Snone.c index 28c1ffb..11c4912 100644 --- a/src/H5Snone.c +++ b/src/H5Snone.c @@ -39,7 +39,7 @@ static herr_t H5S_none_get_seq_list(const H5S_t *space, unsigned flags, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); static herr_t H5S_none_release(H5S_t *space); static htri_t H5S_none_is_valid(const H5S_t *space); -static hssize_t H5S_none_serial_size(const H5S_t *space); +static hssize_t H5S_none_serial_size(const H5F_t *f, const H5S_t *space); static herr_t H5S_none_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p); static herr_t H5S_none_deserialize(const H5F_t *f, H5S_t *space, @@ -446,7 +446,7 @@ H5S_none_is_valid(const H5S_t UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ static hssize_t -H5S_none_serial_size(const H5S_t UNUSED *space) +H5S_none_serial_size(const H5F_t UNUSED *f, const H5S_t UNUSED *space) { FUNC_ENTER_NOAPI_NOINIT_NOERR diff --git a/src/H5Spkg.h b/src/H5Spkg.h index c8993dc..e28c118 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -140,7 +140,7 @@ typedef herr_t (*H5S_sel_release_func_t)(H5S_t *space); /* Method to determine if current selection is valid for dataspace */ typedef htri_t (*H5S_sel_is_valid_func_t)(const H5S_t *space); /* Method to determine number of bytes required to store current selection */ -typedef hssize_t (*H5S_sel_serial_size_func_t)(const H5S_t *space); +typedef hssize_t (*H5S_sel_serial_size_func_t)(const H5F_t *f, const H5S_t *space); /* Method to store current selection in "serialized" form (a byte sequence suitable for storing on disk) */ typedef herr_t (*H5S_sel_serialize_func_t)(const H5F_t *f, const H5S_t *space, uint8_t **p); @@ -258,6 +258,8 @@ H5_DLLVAR const H5S_select_class_t H5S_sel_none[1]; H5_DLLVAR const H5S_select_class_t H5S_sel_point[1]; /* Extent functions */ +H5_DLL herr_t H5S__set_extent_simple(H5S_t *space, unsigned rank, + const hsize_t *dims, const hsize_t *max); H5_DLL herr_t H5S_extent_release(H5S_extent_t *extent); H5_DLL herr_t H5S_extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max); diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 66fbb03..a7421de 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -40,7 +40,7 @@ static herr_t H5S_point_get_seq_list(const H5S_t *space, unsigned flags, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); static herr_t H5S_point_release(H5S_t *space); static htri_t H5S_point_is_valid(const H5S_t *space); -static hssize_t H5S_point_serial_size(const H5S_t *space); +static hssize_t H5S_point_serial_size(const H5F_t *f, const H5S_t *space); static herr_t H5S_point_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p); static herr_t H5S_point_deserialize(const H5F_t *f, H5S_t *space, @@ -773,7 +773,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ static hssize_t -H5S_point_serial_size (const H5S_t *space) +H5S_point_serial_size(const H5F_t UNUSED *f, const H5S_t *space) { H5S_pnt_node_t *curr; /* Point information nodes */ hssize_t ret_value; /* return value */ diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index d037b03..8f9b530 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -125,7 +125,7 @@ typedef struct H5S_sel_iter_t { #define H5S_SELECT_GET_SEQ_LIST(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN) ((*(S)->select.type->get_seq_list)(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN)) #define H5S_SELECT_VALID(S) ((*(S)->select.type->is_valid)(S)) #define H5S_SELECT_RELEASE(S) ((*(S)->select.type->release)(S)) -#define H5S_SELECT_SERIAL_SIZE(S) ((*(S)->select.type->serial_size)(S)) +#define H5S_SELECT_SERIAL_SIZE(F,S) ((*(S)->select.type->serial_size)(F,S)) #define H5S_SELECT_SERIALIZE(F,S,BUF) ((*(S)->select.type->serialize)(F,S,BUF)) #define H5S_SELECT_BOUNDS(S,START,END) ((*(S)->select.type->bounds)(S,START,END)) #define H5S_SELECT_OFFSET(S, OFFSET) ((*(S)->select.type->offset)(S, OFFSET)) @@ -151,7 +151,7 @@ typedef struct H5S_sel_iter_t { #define H5S_SELECT_GET_SEQ_LIST(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN) (H5S_select_get_seq_list(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN)) #define H5S_SELECT_VALID(S) (H5S_select_valid(S)) #define H5S_SELECT_RELEASE(S) (H5S_select_release(S)) -#define H5S_SELECT_SERIAL_SIZE(S) (H5S_select_serial_size(S)) +#define H5S_SELECT_SERIAL_SIZE(F,S) (H5S_select_serial_size(F,S)) #define H5S_SELECT_SERIALIZE(F,S,BUF) (H5S_select_serialize(F,S,BUF)) #define H5S_SELECT_BOUNDS(S,START,END) (H5S_get_select_bounds(S,START,END)) #define H5S_SELECT_OFFSET(S, OFFSET) (H5S_get_select_offset(S, OFFSET)) @@ -228,7 +228,7 @@ H5_DLL herr_t H5S_select_release(H5S_t *ds); H5_DLL herr_t H5S_select_get_seq_list(const H5S_t *space, unsigned flags, H5S_sel_iter_t *iter, size_t maxseq, size_t maxbytes, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); -H5_DLL hssize_t H5S_select_serial_size(const H5S_t *space); +H5_DLL hssize_t H5S_select_serial_size(const H5F_t *f, const H5S_t *space); H5_DLL herr_t H5S_select_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p); H5_DLL htri_t H5S_select_is_contiguous(const H5S_t *space); diff --git a/src/H5Sselect.c b/src/H5Sselect.c index a703cc3..52273c7 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -227,7 +227,7 @@ H5S_select_get_seq_list(const H5S_t *space, unsigned flags, *------------------------------------------------------------------------- */ hssize_t -H5S_select_serial_size(const H5S_t *space) +H5S_select_serial_size(const H5F_t *f, const H5S_t *space) { hssize_t ret_value; /* Return value */ @@ -236,7 +236,7 @@ H5S_select_serial_size(const H5S_t *space) HDassert(space); /* Call the selection type's serial_size function */ - ret_value=(*space->select.type->serial_size)(space); + ret_value=(*space->select.type->serial_size)(f, space); FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_select_serial_size() */ @@ -508,9 +508,14 @@ H5S_select_deserialize(const H5F_t *f, H5S_t **space, const uint8_t **p) /* Decode the rank of the point selection */ UINT32DECODE(*p,rank); - if(!*space) + if(!*space) { + hsize_t dims[H5S_MAX_RANK]; + /* Patch the rank of the allocated dataspace */ - tmp_space->extent.rank = rank; + (void)HDmemset(dims, 0, (size_t)rank * sizeof(dims[0])); + if(H5S__set_extent_simple(tmp_space, rank, dims, NULL) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set dimensions") + } /* end if */ else /* Verify the rank of the provided dataspace */ if(rank != tmp_space->extent.rank) -- cgit v0.12 From a2475e33a2e79a34405ed0f3c210ae2713105178 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 22 Apr 2015 08:29:03 -0500 Subject: [svn-r26879] Removed printf size_t warnings from VDS examples. size_t parameters are now printed using lu after being cast to unsigned long (safe for C89). Tested on: 64-bit linux VM --- examples/h5_vds-exc.c | 2 +- examples/h5_vds-exclim.c | 2 +- examples/h5_vds-percival.c | 2 +- examples/h5_vds-simpleIO.c | 2 +- examples/h5_vds.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/h5_vds-exc.c b/examples/h5_vds-exc.c index 509b3e1..4a30d91 100644 --- a/examples/h5_vds-exc.c +++ b/examples/h5_vds-exc.c @@ -159,7 +159,7 @@ main (void) * Find number of mappings. */ status = H5Pget_virtual_count (dcpl, &num_map); - printf(" Number of mappings is %d\n", num_map); + printf(" Number of mappings is %lu\n", (unsigned long)num_map); /* * Get mapping parameters for each mapping. diff --git a/examples/h5_vds-exclim.c b/examples/h5_vds-exclim.c index af39c55..b24927b 100644 --- a/examples/h5_vds-exclim.c +++ b/examples/h5_vds-exclim.c @@ -160,7 +160,7 @@ main (void) * Find number of mappings. */ status = H5Pget_virtual_count (dcpl, &num_map); - printf(" Number of mappings is %d\n", num_map); + printf(" Number of mappings is %lu\n", (unsigned long)num_map); /* * Get mapping parameters for each mapping. diff --git a/examples/h5_vds-percival.c b/examples/h5_vds-percival.c index ba9e13f..79bb6b1 100644 --- a/examples/h5_vds-percival.c +++ b/examples/h5_vds-percival.c @@ -183,7 +183,7 @@ main (void) * Find number of mappings. */ status = H5Pget_virtual_count (dcpl, &num_map); - printf(" Number of mappings is %d\n", num_map); + printf(" Number of mappings is %lu\n", (unsigned long)num_map); /* * Get mapping parameters for each mapping. diff --git a/examples/h5_vds-simpleIO.c b/examples/h5_vds-simpleIO.c index e4b0018..795a87c 100644 --- a/examples/h5_vds-simpleIO.c +++ b/examples/h5_vds-simpleIO.c @@ -116,7 +116,7 @@ main (void) * Find the number of mappings. */ status = H5Pget_virtual_count (dcpl, &num_map); - printf(" Number of mappings is %d\n", num_map); + printf(" Number of mappings is %lu\n", (unsigned long)num_map); /* * Get mapping parameters for each mapping. diff --git a/examples/h5_vds.c b/examples/h5_vds.c index 7e128db..79a3f01 100644 --- a/examples/h5_vds.c +++ b/examples/h5_vds.c @@ -163,7 +163,7 @@ main (void) * Find the number of mappings. */ status = H5Pget_virtual_count (dcpl, &num_map); - printf(" Number of mappings is %d\n", num_map); + printf(" Number of mappings is %lu\n", (unsigned long)num_map); /* * Get mapping parameters for each mapping. -- cgit v0.12 From 7b4a24f2f8682814d0f36f77e7fe951b10be8f72 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 22 Apr 2015 08:30:42 -0500 Subject: [svn-r26880] Fix errors where unlim_dim was not initialized in several places in H5Shyper.c Tested: Home computer --- src/H5Shyper.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 0886b23..6c553d3 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -3692,6 +3692,9 @@ H5S_hyper_add_span_element(H5S_t *space, unsigned rank, hsize_t *coords) /* Reset "regular" hyperslab flag */ space->select.sel_info.hslab->diminfo_valid = FALSE; + /* Set unlim_dim */ + space->select.sel_info.hslab->unlim_dim = -1; + /* Set # of elements in selection */ space->select.num_elem = 1; } /* end if */ @@ -4401,6 +4404,9 @@ H5S_hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *off if(NULL == (new_space->select.sel_info.hslab = H5FL_MALLOC(H5S_hyper_sel_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info") + /* Set unlim_dim */ + new_space->select.sel_info.hslab->unlim_dim = -1; + /* Check for a "regular" hyperslab selection */ if(base_space->select.sel_info.hslab->diminfo_valid) { unsigned base_space_dim; /* Current dimension in the base dataspace */ @@ -7056,6 +7062,9 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op, /* Allocate space for the hyperslab selection information */ if((space->select.sel_info.hslab=H5FL_MALLOC(H5S_hyper_sel_t))==NULL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info") + + /* Set unlim_dim */ + space->select.sel_info.hslab->unlim_dim = -1; } /* end if */ /* Combine tmp_space (really space) & new_space, with the result in space */ @@ -7565,6 +7574,9 @@ H5S_combine_select (H5S_t *space1, H5S_seloper_t op, H5S_t *space2) if((new_space->select.sel_info.hslab=H5FL_CALLOC(H5S_hyper_sel_t))==NULL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab info") + /* Set unlim_dim */ + new_space->select.sel_info.hslab->unlim_dim = -1; + /* Combine space1 & space2, with the result in new_space */ if(H5S_operate_hyperslab(new_space,space1->select.sel_info.hslab->span_lst,op,space2->select.sel_info.hslab->span_lst,FALSE,&span2_owned)<0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, NULL, "can't clip hyperslab information") @@ -7694,6 +7706,9 @@ H5S_select_select (H5S_t *space1, H5S_seloper_t op, H5S_t *space2) if((space1->select.sel_info.hslab=H5FL_CALLOC(H5S_hyper_sel_t))==NULL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info") + /* Set unlim_dim */ + space1->select.sel_info.hslab->unlim_dim = -1; + /* Combine tmp_spans (from space1) & spans from space2, with the result in space1 */ if(H5S_operate_hyperslab(space1,tmp_spans,op,space2->select.sel_info.hslab->span_lst,FALSE,&span2_owned)<0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information") @@ -9202,12 +9217,15 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, /* Allocate space for the hyperslab selection information (note this sets * diminfo_valid to FALSE, diminfo arrays to 0, and span list to NULL) */ - if((proj_space->select.sel_info.hslab = H5FL_CALLOC(H5S_hyper_sel_t))==NULL) + if((proj_space->select.sel_info.hslab = H5FL_CALLOC(H5S_hyper_sel_t)) == NULL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info") /* Set selection type */ proj_space->select.type = H5S_sel_hyper; + /* Set unlim_dim */ + proj_space->select.sel_info.hslab->unlim_dim = -1; + /* Initialize source space iterator */ if(H5S_select_iter_init(&ss_iter, src_space, (size_t)1) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") -- cgit v0.12 From 0308a17597f802e3a9a2eb46f4884792cc895bbd Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 22 Apr 2015 11:01:33 -0500 Subject: [svn-r26883] Fix bug in H5S__hyper_project_intersection that could cause an incorrect result. Tested: ummon --- src/H5Shyper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 6c553d3..4a10ffc 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -9384,7 +9384,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, * finished being built) */ for(i = proj_rank - 1; ((i > 0) && (((proj_off / proj_down_dims[i - 1]) - % proj_space->extent.size[i]) + % proj_space->extent.size[i - 1]) != curr_span_dim[i - 1])); i--) { if(curr_span_tree[i]) { HDassert(prev_span[i]); @@ -9404,7 +9404,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, } /* end if */ /* Update curr_span_dim */ - curr_span_dim[i - 1] = (proj_off / proj_down_dims[i - 1]) % proj_space->extent.size[i]; + curr_span_dim[i - 1] = (proj_off / proj_down_dims[i - 1]) % proj_space->extent.size[i - 1]; } /* end for */ /* Compute bounds for new span in lowest dimension */ -- cgit v0.12 From f1d1d415af3fa7ca829a9ff9e5467df1fc0b1b17 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 22 Apr 2015 15:50:56 -0500 Subject: [svn-r26891] Fix bug in H5S__hyper_project_intersection that could cause an incorrect result. Fix typos. Tested: ummon --- src/H5Shyper.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 4a10ffc..d9bde55 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -2237,8 +2237,7 @@ H5S_hyper_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p) /* Work on other dimensions if necessary */ if(fast_dim > 0) { - int - temp_dim; /* Temporary rank holder */ + int temp_dim; /* Temporary rank holder */ /* Reset the block counts */ tmp_count[fast_dim]=diminfo[fast_dim].count; @@ -9169,7 +9168,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, hsize_t proj_down_dims[H5S_MAX_RANK]; H5S_hyper_span_info_t *curr_span_tree[H5S_MAX_RANK]; H5S_hyper_span_t *prev_span[H5S_MAX_RANK]; - hsize_t curr_span_dim[H5S_MAX_RANK]; + hsize_t curr_span_up_dim[H5S_MAX_RANK]; unsigned proj_rank; hsize_t low; hsize_t high; @@ -9189,11 +9188,11 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, /* Assert that src_space and src_intersect_space have same extent and there * are no point selections? */ - /* Initialize prev_space, curr_span_tree, and curr_span_dim */ + /* Initialize prev_space, curr_span_tree, and curr_span_up_dim */ for(i = 0; i < H5S_MAX_RANK; i++) { curr_span_tree[i] = NULL; prev_span[i] = NULL; - curr_span_dim[i] = (hsize_t)0; + curr_span_up_dim[i] = (hsize_t)0; } /* end for */ /* Save rank of projected space */ @@ -9383,15 +9382,15 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, * the plane of the span currently being built (i.e. it's * finished being built) */ for(i = proj_rank - 1; ((i > 0) - && (((proj_off / proj_down_dims[i - 1]) - % proj_space->extent.size[i - 1]) - != curr_span_dim[i - 1])); i--) { + && ((proj_off / proj_down_dims[i - 1]) + != curr_span_up_dim[i - 1])); i--) { if(curr_span_tree[i]) { HDassert(prev_span[i]); /* Append complete lower dimension span tree to * current dimension */ - if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], curr_span_dim[i - 1], curr_span_dim[i - 1], curr_span_tree[i], NULL) < 0) + low = curr_span_up_dim[i - 1] % proj_space->extent.size[i - 1]; + if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], low, low, curr_span_tree[i], NULL) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") /* Reset lower dimension's span tree and previous @@ -9403,8 +9402,8 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, prev_span[i] = NULL; } /* end if */ - /* Update curr_span_dim */ - curr_span_dim[i - 1] = (proj_off / proj_down_dims[i - 1]) % proj_space->extent.size[i - 1]; + /* Update curr_span_up_dim */ + curr_span_up_dim[i - 1] = proj_off / proj_down_dims[i - 1]; } /* end for */ /* Compute bounds for new span in lowest dimension */ @@ -9438,7 +9437,8 @@ loop_end: HDassert(prev_span[i]); /* Append remaining span tree to higher dimension */ - if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], curr_span_dim[i - 1], curr_span_dim[i - 1], curr_span_tree[i], NULL) < 0) + low = curr_span_up_dim[i - 1] % proj_space->extent.size[i - 1]; + if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], low, low, curr_span_tree[i], NULL) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") /* Reset span tree */ @@ -9545,7 +9545,7 @@ H5S__hyper_update_extent_offset(H5S_t *space) hslab->span_lst = NULL; } /* end if */ - /* Initialize opt_diminfo wit opt_unlim_diminfo */ + /* Initialize opt_diminfo with opt_unlim_diminfo */ hslab->opt_diminfo[hslab->unlim_dim] = hslab->opt_unlim_diminfo[hslab->unlim_dim]; /* Check for selection outside extent */ -- cgit v0.12 From 80f27eb1f44b6f5ccd47b4ad15b17e618683b859 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 23 Apr 2015 15:13:12 -0500 Subject: [svn-r26909] Convert layout to switch and add virtual. Print number of maps and file names only. Tested: local linux --- tools/h5ls/h5ls.c | 143 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 87 insertions(+), 56 deletions(-) diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index d0dd216..46999b6 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1764,6 +1764,7 @@ dataset_list2(hid_t dset, const char UNUSED *name) double utilization; /* percent utilization of storage */ H5T_class_t tclass; /* datatype class identifier */ int i; + H5D_layout_t stl; hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ @@ -1779,20 +1780,93 @@ dataset_list2(hid_t dset, const char UNUSED *name) space = H5Dget_space(dset); type = H5Dget_type(dset); - /* Print information about chunked storage */ - if (H5D_CHUNKED==H5Pget_layout(dcpl)) { - hsize_t chsize[64]; /* chunk size in elements */ - - ndims = H5Pget_chunk(dcpl, (int)NELMTS(chsize), chsize/*out*/); - h5tools_str_append(&buffer, " %-10s {", "Chunks:"); - total = H5Tget_size(type); - for (i=0; i 0) { + for(i = 0, max_len = 0; i < nf; i++) { + if(H5Pget_external(dcpl, (unsigned)i, sizeof(f_name), f_name, NULL, NULL) < 0) + continue; + n = print_string(NULL, f_name, TRUE); + max_len = MAX(max_len, n); + } /* end for */ + h5tools_str_append(&buffer, " %-10s %d external file%s\n", + "Extern:", nf, 1==nf?"":"s"); + h5tools_str_append(&buffer, " %4s %10s %10s %10s %s\n", + "ID", "DSet-Addr", "File-Addr", "Bytes", "File"); + h5tools_str_append(&buffer, " %4s %10s %10s %10s ", + "----", "----------", "----------", "----------"); + for (i=0; i 0) { - for(i = 0, max_len = 0; i < nf; i++) { - if(H5Pget_external(dcpl, (unsigned)i, sizeof(f_name), f_name, NULL, NULL) < 0) - continue; - n = print_string(NULL, f_name, TRUE); - max_len = MAX(max_len, n); - } /* end for */ - h5tools_str_append(&buffer, " %-10s %d external file%s\n", - "Extern:", nf, 1==nf?"":"s"); - h5tools_str_append(&buffer, " %4s %10s %10s %10s %s\n", - "ID", "DSet-Addr", "File-Addr", "Bytes", "File"); - h5tools_str_append(&buffer, " %4s %10s %10s %10s ", - "----", "----------", "----------", "----------"); - for (i=0; i 0) { for(i = 0; i < nf; i++) { -- cgit v0.12 From d292908e6f18ed329c1f4fd4b09f1bcfccb92c3e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 23 Apr 2015 15:16:22 -0500 Subject: [svn-r26910] Add clarification that the files are Source --- tools/h5ls/h5ls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index 46999b6..2f5412b 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1852,7 +1852,7 @@ dataset_list2(hid_t dset, const char UNUSED *name) size_t next; ssize_t ssize_out; - h5tools_str_append(&buffer, " %-10s {%ld} Files {\n", "Maps:", vmaps); + h5tools_str_append(&buffer, " %-10s {%ld} Source Files {\n", "Maps:", vmaps); for (next = 0; next < (unsigned) vmaps; next++) { ssize_out = H5Pget_virtual_filename(dcpl, next, NULL, 0); H5Pget_virtual_filename(dcpl, next, f_name, sizeof(f_name)); -- cgit v0.12 From 2417fd7b63d59eef4d3fc1cd5a61c0fd0bbb526f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 27 Apr 2015 16:08:53 -0500 Subject: [svn-r26935] Add dataset name to mapping output --- tools/h5ls/h5ls.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index 2f5412b..74f17d5 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1755,6 +1755,7 @@ dataset_list2(hid_t dset, const char UNUSED *name) size_t cd_nelmts; /* filter client number of values */ size_t cd_num; /* filter client data counter */ char f_name[256]; /* filter/file name */ + char dset_name[256]; /* filter/file name */ char s[64]; /* temporary string buffer */ off_t f_offset; /* offset in external file */ hsize_t f_size; /* bytes used in external file */ @@ -1856,8 +1857,12 @@ dataset_list2(hid_t dset, const char UNUSED *name) for (next = 0; next < (unsigned) vmaps; next++) { ssize_out = H5Pget_virtual_filename(dcpl, next, NULL, 0); H5Pget_virtual_filename(dcpl, next, f_name, sizeof(f_name)); + ssize_out = H5Pget_virtual_dsetname(dcpl, next, NULL, 0); + H5Pget_virtual_dsetname(dcpl, next, dset_name, sizeof(dset_name)); h5tools_str_append(&buffer, " %-10s ", " "); print_string(&buffer, f_name, TRUE); + h5tools_str_append(&buffer, " "); + print_string(&buffer, dset_name, TRUE); h5tools_str_append(&buffer, "\n"); } h5tools_str_append(&buffer, " %-10s}\n", " "); -- cgit v0.12 From 1c30759aae4106504dd5f67ac4543c6c1be66203 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 28 Apr 2015 16:46:56 -0500 Subject: [svn-r26959] Fixed ERTERN print format and remove "Files" from virtual. --- tools/h5ls/h5ls.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index 74f17d5..aa23dd7 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1819,17 +1819,17 @@ dataset_list2(hid_t dset, const char UNUSED *name) for (i=0, total=0; i Date: Tue, 28 Apr 2015 18:23:02 -0500 Subject: [svn-r26960] Added example of unlimited VDS using Percival use case. --- examples/h5_vds-percival-unlim.c | 293 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 293 insertions(+) create mode 100644 examples/h5_vds-percival-unlim.c diff --git a/examples/h5_vds-percival-unlim.c b/examples/h5_vds-percival-unlim.c new file mode 100644 index 0000000..1911e6d --- /dev/null +++ b/examples/h5_vds-percival-unlim.c @@ -0,0 +1,293 @@ +/************************************************************ + + This example illustrates the concept of the virtual dataset. + Percival use case. Every fifth 10x10 plane in VDS is stored in + the corresponding 3D unlimited dataset. + There are 4 source datasets total. + This file is intended for use with HDF5 Library version 1.10 + + ************************************************************/ +/* EIP Add link to the picture */ + +#include "hdf5.h" +#include +#include + +#define FILE "vds-percival-unlim.h5" +#define DATASET "VDS-Percival-unlim" +#define VDSDIM0 H5S_UNLIMITED +#define VDSDIM1 10 +#define VDSDIM2 10 + +#define DIM0 H5S_UNLIMITED +#define DIM0_1 10 /* Initial size of the datasets */ +#define DIM1 10 +#define DIM2 10 +#define RANK 3 +#define PLANE_STRIDE 4 + +const char *SRC_FILE[] = { + "a.h5", + "b.h5", + "c.h5", + "d.h5" +}; + +const char *SRC_DATASET[] = { + "A", + "B", + "C", + "D" +}; + +int +main (void) +{ + hid_t vfile, file, src_space, mem_space, vspace, + vdset, dset; /* Handles */ + hid_t dcpl; + herr_t status; + hsize_t vdsdims[3] = {4*DIM0_1, VDSDIM1, VDSDIM2}, + vdsdims_max[3] = {VDSDIM0, VDSDIM1, VDSDIM2}, + dims[3] = {DIM0_1, DIM1, DIM2}, + extdims[3] = {2*DIM0_1, DIM1, DIM2}, + chunk_dims[3] = {DIM0_1, DIM1, DIM2}, + dims_max[3] = {DIM0, DIM1, DIM2}, + vdsdims_out[3], + vdsdims_max_out[3], + start[3], /* Hyperslab parameters */ + stride[3], + count[3], + src_count[3], + block[3]; + hsize_t start_out[3], /* Hyperslab parameter out */ + stride_out[3], + count_out[3], + block_out[3]; + int i, j; + H5D_layout_t layout; /* Storage layout */ + size_t num_map; /* Number of mappings */ + ssize_t len; /* Length of the string; also a return value */ + char *filename; + char *dsetname; + int wdata[DIM0_1*DIM1*DIM2]; + + /* + * Create source files and datasets. This step is optional. + */ + for (i=0; i < PLANE_STRIDE; i++) { + /* + * Initialize data for i-th source dataset. + */ + for (j = 0; j < DIM0_1*DIM1*DIM2; j++) wdata[j] = i+1; + + /* + * Create the source files and datasets. Write data to each dataset and + * close all resources. + */ + + file = H5Fcreate (SRC_FILE[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + src_space = H5Screate_simple (RANK, dims, dims_max); + dcpl = H5Pcreate(H5P_DATASET_CREATE); + status = H5Pset_chunk (dcpl, RANK, chunk_dims); + dset = H5Dcreate (file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT, + dcpl, H5P_DEFAULT); + status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, + wdata); + status = H5Sclose (src_space); + status = H5Pclose (dcpl); + status = H5Dclose (dset); + status = H5Fclose (file); + } + + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* Create VDS dataspace. */ + vspace = H5Screate_simple (RANK, vdsdims, vdsdims_max); + + /* Create dataspaces for the source dataset. */ + src_space = H5Screate_simple (RANK, dims, dims_max); + + /* Create VDS creation property */ + dcpl = H5Pcreate (H5P_DATASET_CREATE); + + /* Initialize hyperslab values */ + + start[0] = 0; + start[1] = 0; + start[2] = 0; + stride[0] = PLANE_STRIDE; /* we will select every fifth plane in VDS */ + stride[1] = 1; + stride[2] = 1; + count[0] = H5S_UNLIMITED; + count[1] = 1; + count[2] = 1; + src_count[0] = H5S_UNLIMITED; + src_count[1] = 1; + src_count[2] = 1; + block[0] = 1; + block[1] = DIM1; + block[2] = DIM2; + + /* + * Build the mappings + * + */ + status = H5Sselect_hyperslab (src_space, H5S_SELECT_SET, start, NULL, src_count, block); + for (i=0; i < PLANE_STRIDE; i++) { + status = H5Sselect_hyperslab (vspace, H5S_SELECT_SET, start, stride, count, block); + status = H5Pset_virtual (dcpl, vspace, SRC_FILE[i], SRC_DATASET[i], src_space); + start[0]++; + } + + H5Sselect_none(vspace); + + /* Create a virtual dataset */ + vdset = H5Dcreate (vfile, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, + dcpl, H5P_DEFAULT); + status = H5Sclose (vspace); + status = H5Sclose (src_space); + /* Let's get space of the VDS and its dimension; we should get 40x10x10 */ + vspace = H5Dget_space (vdset); + H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out); + printf ("VDS dimensions first time \n"); + printf (" Current: "); + for (i=0; i Date: Tue, 28 Apr 2015 22:22:55 -0500 Subject: [svn-r26962] Add support for unlimited selections to VDS code. Not tested (except for percival-unlim example) Fix percival-unlim example Other bug fixes/cleanup Tested: Fedora 64 --- examples/h5_vds-percival-unlim.c | 10 +- src/H5Dint.c | 7 + src/H5Dpkg.h | 2 +- src/H5Dprivate.h | 3 + src/H5Dvirtual.c | 271 ++++++++++++++++++++++++++++++++++++++- src/H5Olayout.c | 15 ++- src/H5Oprivate.h | 8 ++ src/H5Pdcpl.c | 29 ++++- src/H5S.c | 26 ++-- src/H5Sall.c | 27 ++++ src/H5Shyper.c | 248 +++++++++++++++++++++++++++++++---- src/H5Snone.c | 27 ++++ src/H5Spkg.h | 5 +- src/H5Spoint.c | 27 ++++ src/H5Sprivate.h | 5 + src/H5Sselect.c | 40 +++++- 16 files changed, 696 insertions(+), 54 deletions(-) diff --git a/examples/h5_vds-percival-unlim.c b/examples/h5_vds-percival-unlim.c index 1911e6d..eaa83b4 100644 --- a/examples/h5_vds-percival-unlim.c +++ b/examples/h5_vds-percival-unlim.c @@ -13,7 +13,7 @@ #include #include -#define FILE "vds-percival-unlim.h5" +#define VFILE "vds-percival-unlim.h5" #define DATASET "VDS-Percival-unlim" #define VDSDIM0 H5S_UNLIMITED #define VDSDIM1 10 @@ -100,7 +100,7 @@ main (void) status = H5Fclose (file); } - file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + vfile = H5Fcreate (VFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); /* Create VDS dataspace. */ vspace = H5Screate_simple (RANK, vdsdims, vdsdims_max); @@ -147,6 +147,7 @@ main (void) dcpl, H5P_DEFAULT); status = H5Sclose (vspace); status = H5Sclose (src_space); + status = H5Pclose (dcpl); /* Let's get space of the VDS and its dimension; we should get 40x10x10 */ vspace = H5Dget_space (vdset); H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out); @@ -188,13 +189,12 @@ main (void) status = H5Dwrite (dset, H5T_NATIVE_INT, mem_space, src_space, H5P_DEFAULT, wdata); status = H5Sclose (src_space); - status = H5Pclose (dcpl); status = H5Dclose (dset); status = H5Fclose (file); } /* Let's get space of the VDS and its dimension; we should get 80x10x10 */ - vspace = H5Dget_space (dset); + vspace = H5Dget_space (vdset); H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out); printf ("VDS dimensions second time \n"); printf (" Current: "); @@ -212,7 +212,7 @@ main (void) /* * Open file and dataset using the default properties. */ - vfile = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + vfile = H5Fopen (VFILE, H5F_ACC_RDONLY, H5P_DEFAULT); vdset = H5Dopen (vfile, DATASET, H5P_DEFAULT); /* diff --git a/src/H5Dint.c b/src/H5Dint.c index d7ef991..1757665 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -2346,6 +2346,8 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id) HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty") } /* end if */ + /* Make this function work with virtual layout VDSINC */ + done: FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5D__set_extent() */ @@ -2767,6 +2769,11 @@ H5D_get_space(H5D_t *dset) FUNC_ENTER_NOAPI_NOINIT + /* If the layout is virtual, update the extent */ + if(dset->shared->layout.type == H5D_VIRTUAL) + if(H5D__virtual_set_extent_unlim(dset, H5AC_ind_dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update virtual dataset extent") + /* Read the data space message and return a data space object */ if(NULL == (space = H5S_copy(dset->shared->space, FALSE, TRUE))) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get data space") diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 1e5038b..978936b 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -611,7 +611,6 @@ H5_DLL herr_t H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage H5_DLL herr_t H5D__contig_delete(H5F_t *f, hid_t dxpl_id, const H5O_storage_t *store); - /* Functions that operate on chunked dataset storage */ H5_DLL htri_t H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr, hbool_t write_op); @@ -660,6 +659,7 @@ H5_DLL herr_t H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src /* Functions that operate on virtual dataset storage */ H5_DLL herr_t H5D__virtual_copy_layout(H5O_layout_t *layout); +H5_DLL herr_t H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id); H5_DLL herr_t H5D__virtual_reset_layout(H5O_layout_t *layout); H5_DLL herr_t H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage); H5_DLL herr_t H5D__virtual_copy(H5F_t *f_src, diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index b2d88ee..5f588fd 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -177,6 +177,9 @@ H5_DLL herr_t H5D_vlen_reclaim(hid_t type_id, H5S_t *space, hid_t plist_id, /* Functions that operate on chunked storage */ H5_DLL herr_t H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr); +/* Functions that operate on virtual storage */ +H5_DLL herr_t H5D_virtual_update_min_dims(H5O_layout_t *layout, size_t idx); + /* Functions that operate on indexed storage */ H5_DLL herr_t H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int fwidth, unsigned ndims); diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 3643c53..67f405f 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -155,6 +155,12 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) = H5S_copy(orig_list[i].virtual_select, FALSE, TRUE))) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") layout->storage.u.virt.list[i].source_dset = NULL; + layout->storage.u.virt.list[i].unlim_dim_source = orig_list[i].unlim_dim_source; + layout->storage.u.virt.list[i].unlim_dim_virtual = orig_list[i].unlim_dim_virtual; + layout->storage.u.virt.list[i].unlim_extent_source = orig_list[i].unlim_extent_source; + layout->storage.u.virt.list[i].unlim_extent_virtual = orig_list[i].unlim_extent_virtual; + layout->storage.u.virt.list[i].clip_size_source = orig_list[i].clip_size_source; + layout->storage.u.virt.list[i].clip_size_virtual = orig_list[i].clip_size_virtual; layout->storage.u.virt.list[i].source_space_status = orig_list[i].source_space_status; layout->storage.u.virt.list[i].virtual_space_status = orig_list[i].virtual_space_status; } /* end for */ @@ -178,13 +184,71 @@ done: /*------------------------------------------------------------------------- + * Function: H5D_virtual_update_min_dims + * + * Purpose: Updates the virtual layout's "min_dims" field to take into + * account the "idx"th entry in the mapping list. The entry + * must be complete, though top level fields list_nused does + * (and of course min_dims) do not need to take it into + * account. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * February 10, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D_virtual_update_min_dims(H5O_layout_t *layout, size_t idx) +{ + H5S_sel_type sel_type; + int rank; + hsize_t bounds_start[H5S_MAX_RANK]; + hsize_t bounds_end[H5S_MAX_RANK]; + int i; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI(FAIL) + + HDassert(layout); + HDassert(layout->type == H5D_VIRTUAL); + HDassert(idx < layout->storage.u.virt.list_nalloc); + + /* Get type of selection */ + if(H5S_SEL_ERROR == (sel_type = H5S_GET_SELECT_TYPE(layout->storage.u.virt.list[idx].virtual_select))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection type") + + /* Do not update min_dims for "all" or "none" selections */ + if((sel_type == H5S_SEL_ALL) || (sel_type == H5S_SEL_NONE)) + HGOTO_DONE(SUCCEED) + + /* Get rank of vspace */ + if((rank = H5S_GET_EXTENT_NDIMS(layout->storage.u.virt.list[idx].virtual_select)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions") + + /* Get selection bounds */ + if(H5S_SELECT_BOUNDS(layout->storage.u.virt.list[idx].virtual_select, bounds_start, bounds_end) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") + + /* Update min_dims */ + for(i = 0; i < rank; i++) + /* Don't check unlimited dimensions in the selection */ + if((i != layout->storage.u.virt.list[idx].unlim_dim_virtual) + && (bounds_end[i] > layout->storage.u.virt.min_dims[i])) + layout->storage.u.virt.min_dims[i] = bounds_end[i]; + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D_virtual_update_min_dims() */ + + +/*------------------------------------------------------------------------- * Function: H5D__virtual_open_source_dset * * Purpose: Attempts to open a source dataset. * - * Return: TRUE: Source dataset opened - * FALSE: Source dataset not opened - * Negative: Error + * Return: Non-negative on success/Negative on failure * * Programmer: Neil Fortner * March 6, 2015 @@ -234,7 +298,7 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, /* Patch the source selection if necessary */ if(virtual_ent->source_space_status != H5O_VIRTUAL_STATUS_CORRECT) { if(H5S_extent_copy(virtual_ent->source_select, virtual_ent->source_dset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent") virtual_ent->source_space_status = H5O_VIRTUAL_STATUS_CORRECT; } /* end if */ @@ -249,6 +313,193 @@ done: /*------------------------------------------------------------------------- + * Function: H5D__virtual_set_extent_unlim + * + * Purpose: Sets the extent of the virtual dataset by checking the + * extents of source datasets where an unlimited selection + * matching. Dimensions that are not unlimited in any + * virtual mapping selections are not affected. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * April 22, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) +{ + H5O_storage_virtual_t *storage; + hsize_t new_dims[H5S_MAX_RANK]; + hsize_t curr_dims[H5S_MAX_RANK]; + hsize_t clip_size; + int rank; + hbool_t changed = FALSE; /* Whether the VDS extent changed */ + size_t i; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_PACKAGE + + /* Sanity check */ + HDassert(dset); + storage = &dset->shared->layout.storage.u.virt; + HDassert(dset->shared->layout.storage.type == H5D_VIRTUAL); + + /* Get rank of VDS */ + if((rank = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions") + + /* Initialize new_dims to HSIZE_UNDEF */ + for(i = 0; i < (size_t)rank; i++) + new_dims[i] = HSIZE_UNDEF; + + /* Iterate over mappings */ + for(i = 0; i < storage->list_nalloc; i++) + /* Check for unlimited dimension */ + if(storage->list[i].unlim_dim_virtual >= 0) { + HDassert(storage->list[i].unlim_dim_source >= 0); + + /* Open source dataset */ + if(!storage->list[i].source_dset) + if(H5D__virtual_open_source_dset(dset, &storage->list[i], dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + + /* Check if source dataset is open */ + if(storage->list[i].source_dset) { + /* Retrieve current source dataset extent and patch mapping. + * Note this will clip the source selection to the extent. */ + if(H5S_extent_copy(storage->list[i].source_select, storage->list[i].source_dset->shared->space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent") + + /* Get source space dimenstions */ + if(H5S_get_simple_extent_dims(storage->list[i].source_select, curr_dims, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get source space dimensions") + + /* Check if the source extent in the unlimited dimension + * changed since the last time the VDS extent/mapping + * was updated */ + if(curr_dims[storage->list[i].unlim_dim_source] + == storage->list[i].unlim_extent_source) + /* Use cached result for clip size */ + clip_size = storage->list[i].clip_size_virtual; + else { + /* Get size that virtual selection would be clipped + * to to match size of source selection */ + if(H5S_hyper_get_clip_extent(storage->list[i].virtual_select, storage->list[i].source_select, &clip_size) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") + + /* If we are setting the extent by the maximum of all + * mappings, clip virtual_select. Note that if we used the + * cached clip_size above, the selection will already be + * clipped to the correct size. */ + if(storage->set_extent_max) + if(H5S_hyper_clip_unlim(storage->list[i].virtual_select, clip_size)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + + /* Update cached values unlim_extent_source and + * clip_size_virtual */ + storage->list[i].unlim_extent_source = curr_dims[storage->list[i].unlim_dim_source]; + storage->list[i].clip_size_virtual = clip_size; + } /* end else */ + + /* Update new_dims */ + if((new_dims[storage->list[i].unlim_dim_virtual] == HSIZE_UNDEF) + || (storage->set_extent_max ? (clip_size + > (hsize_t)new_dims[storage->list[i].unlim_dim_virtual]) + : (clip_size + < (hsize_t)new_dims[storage->list[i].unlim_dim_virtual]))) + new_dims[storage->list[i].unlim_dim_virtual] = clip_size; + } /* end if */ + } /* end if */ + + /* Get current VDS dimensions */ + if(H5S_get_simple_extent_dims(dset->shared->space, curr_dims, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions") + + /* Calculate new extent */ + for(i = 0; i < (size_t)rank; i++) { + if((new_dims[i] != HSIZE_UNDEF) && (new_dims[i] != curr_dims[i])) { + changed = TRUE; + curr_dims[i] = new_dims[i]; + } /* end if */ + if(storage->min_dims[i] > curr_dims[i]) { + HDassert(0 && "Checking code coverage..."); //VDSINC + changed = TRUE; + curr_dims[i] = storage->min_dims[i]; + } /* end if */ + } /* end for */ + + /* If we did not change the VDS dimensions and we are setting the extent by + * maximum, there is nothing more to update */ + if(changed || !storage->set_extent_max) { + /* Update VDS extent */ + if(changed) + if(H5S_set_extent(dset->shared->space, curr_dims) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + + /* Iterate over mappings again to update source selections and virtual + * mapping extents */ + for(i = 0; i < storage->list_nalloc; i++) + /* Check for unlimited dimension */ + if((storage->list[i].unlim_dim_source >= 0) + && (storage->list[i].source_dset)) { + HDassert(storage->list[i].unlim_dim_virtual >= 0); + + /* Update virtual mapping extent. Note this function does not + * clip the selection. */ + if(changed) + if(H5S_set_extent(storage->list[i].virtual_select, curr_dims) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + + /* Check if we are setting extent by the minimum of mappings */ + if(!storage->set_extent_max) { + /* Clip virtual selection to extent (only necessary if the + * extent changed, otherwise it will already be clipped to + * the extent) */ + if(changed) { + HDassert(0 && "Checking code coverage..."); //VDSINC + if(H5S_hyper_clip_to_extent(storage->list[i].virtual_select)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + } //VDSINC + + /* Check if the virtual extent in the unlimited dimension + * changed since the last time the VDS extent/mapping was + * updated */ + if(curr_dims[storage->list[i].unlim_dim_virtual] + == storage->list[i].unlim_extent_virtual) { + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Use cached result for clip size */ + clip_size = storage->list[i].clip_size_source; + } //VDSINC + else { + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Get size that source selection will be clipped to to + * match size of virtual selection */ + if(H5S_hyper_get_clip_extent(storage->list[i].source_select, storage->list[i].virtual_select, &clip_size) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") + + /* Update cached values unlim_extent_virtual and + * clip_size_source */ + storage->list[i].unlim_extent_virtual = curr_dims[storage->list[i].unlim_dim_virtual]; + storage->list[i].clip_size_source = clip_size; + } /* end else */ + + /* Clip source_select */ + if(H5S_hyper_clip_unlim(storage->list[i].source_select, clip_size)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + } /* end if */ + } /* end if */ + } /* end if */ + + /* Call H5D__mark so dataspace is updated on disk? VDSINC */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__virtual_set_extent_unlim() */ + + +/*------------------------------------------------------------------------- * Function: H5D__virtual_reset_layout * * Purpose: Frees internal structures in a virtual storage layout @@ -462,6 +713,11 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, storage = &io_info->dset->shared->layout.storage.u.virt; + /* Update VDS extent due to unlimited selections */ + /* Don't call if there is no unlimited selection? VDSINC */ + if(H5D__virtual_set_extent_unlim(io_info->dset, io_info->dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update virtual dataset extent") + /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) { /* Sanity check that the virtual space has been patched by now */ @@ -515,7 +771,7 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, } /* end for */ /* Fill unmapped part of buffer with fill value. Keep track of total number - * elements written to memory buffer and assert that it == nelmts */ + * elements written to memory buffer and assert that it == nelmts VDSINC */ done: /* Release allocated resources on failure */ @@ -569,6 +825,11 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, storage = &io_info->dset->shared->layout.storage.u.virt; + /* Update VDS extent due to unlimited selections */ + /* Don't call if there is no unlimited selection? VDSINC */ + if(H5D__virtual_set_extent_unlim(io_info->dset, io_info->dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update virtual dataset extent") + /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) { /* Sanity check that virtual space has been patched by now */ diff --git a/src/H5Olayout.c b/src/H5Olayout.c index a20b6d4..fb9bb9c 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -191,7 +191,7 @@ H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, } /* end if */ else { /* Layout class */ - mesg->type = (H5D_layout_t)*p++; + mesg->type = mesg->storage.type = (H5D_layout_t)*p++; /* Interpret the rest of the message according to the layout class */ switch(mesg->type) { @@ -251,6 +251,7 @@ H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, mesg->storage.u.virt.list_nused = 0; mesg->storage.u.virt.list = NULL; mesg->storage.u.virt.list_nalloc = 0; + mesg->storage.u.virt.set_extent_max = TRUE; /* Decode heap block if it exists */ if(mesg->storage.u.virt.serial_list_hobjid.addr != HADDR_UNDEF) { @@ -300,6 +301,18 @@ H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, /* Virtual selection */ if(H5S_SELECT_DESERIALIZE(f, &(mesg->storage.u.virt.list[i].virtual_select), &heap_block_p) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode virtual space selection") + + /* unlim_dim fields */ + mesg->storage.u.virt.list[i].unlim_dim_source = H5S_get_select_unlim_dim(mesg->storage.u.virt.list[i].source_select); + mesg->storage.u.virt.list[i].unlim_dim_virtual = H5S_get_select_unlim_dim(mesg->storage.u.virt.list[i].virtual_select); + mesg->storage.u.virt.list[i].unlim_extent_source = HSIZE_UNDEF; + mesg->storage.u.virt.list[i].unlim_extent_virtual = HSIZE_UNDEF; + mesg->storage.u.virt.list[i].clip_size_source = HSIZE_UNDEF; + mesg->storage.u.virt.list[i].clip_size_virtual = HSIZE_UNDEF; + + /* Update min_dims */ + if(H5D_virtual_update_min_dims(mesg, i) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to update virtual dataset minimum dimensions") } /* end for */ /* Read stored checksum */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 7c69a01..74cc9a4 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -428,6 +428,12 @@ typedef struct H5O_storage_virtual_ent_t { /* Not stored */ struct H5D_t *source_dset; /* Source dataset */ + int unlim_dim_source; /* Unlimited dimension in source_select */ + int unlim_dim_virtual; /* Unlimited dimension in virtual_select */ + hsize_t unlim_extent_source; /* Extent of unlimited dimension in source dset last time virtual_select was patched to match selection */ + hsize_t unlim_extent_virtual; /* Extent of unlimited dimension in virtual dset last time source_select was patched to match selection */ + hsize_t clip_size_virtual; /* Size selection would be clipped to in virtual selection, ignoring other mappings, when source extent == unlim_extent_source */ + hsize_t clip_size_source; /* Size selection would be clipped to in source selection when virtual extent == unlim_extent_virtual */ H5O_virtual_space_status_t source_space_status; /* Extent patching status of source_select */ H5O_virtual_space_status_t virtual_space_status; /* Extent patching status of virtual_select */ } H5O_storage_virtual_ent_t; @@ -442,6 +448,8 @@ typedef struct H5O_storage_virtual_t { /* Not stored */ size_t list_nalloc; /* Number of slots allocated */ + hsize_t min_dims[H5S_MAX_RANK]; /* Minimum extent of VDS (maximum of all non-unlimited selection bounds) */ + hbool_t set_extent_max; /* Whether we set the extent by the maximum (TRUE) or minimum (FALSE) of unlimited selections */ } H5O_storage_virtual_t; typedef struct H5O_storage_t { diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 60241a0..575de9c 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -43,6 +43,7 @@ #include "H5MMprivate.h" /* Memory management */ #include "H5Oprivate.h" /* Object headers */ #include "H5Ppkg.h" /* Property lists */ +#include "H5Sprivate.h" /* Dataspaces */ #include "H5Tprivate.h" /* Datatypes */ #include "H5Zpkg.h" /* Data filters */ @@ -56,12 +57,12 @@ #define H5D_DEF_STORAGE_CONTIG_INIT {HADDR_UNDEF, (hsize_t)0} #define H5D_DEF_STORAGE_CHUNK_INIT {H5D_CHUNK_IDX_BTREE, HADDR_UNDEF, NULL, {{HADDR_UNDEF, NULL}}} #define H5D_DEF_LAYOUT_CHUNK_INIT {(unsigned)0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, (uint32_t)0, (hsize_t)0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}} -#define H5D_DEF_STORAGE_VIRTUAL_INIT {{HADDR_UNDEF, 0}, 0, NULL, 0} +#define H5D_DEF_STORAGE_VIRTUAL_INIT {{HADDR_UNDEF, 0}, 0, NULL, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, TRUE} #ifdef H5_HAVE_C99_DESIGNATED_INITIALIZER #define H5D_DEF_STORAGE_COMPACT {H5D_COMPACT, { .compact = H5D_DEF_STORAGE_COMPACT_INIT }} #define H5D_DEF_STORAGE_CONTIG {H5D_CONTIGUOUS, { .contig = H5D_DEF_STORAGE_CONTIG_INIT }} #define H5D_DEF_STORAGE_CHUNK {H5D_CHUNKED, { .chunk = H5D_DEF_STORAGE_CHUNK_INIT }} -#define H5D_DEF_STORAGE_VIRTUAL {H5D_CHUNKED, { .virt = H5D_DEF_STORAGE_VIRTUAL_INIT }} +#define H5D_DEF_STORAGE_VIRTUAL {H5D_VIRTUAL, { .virt = H5D_DEF_STORAGE_VIRTUAL_INIT }} #define H5D_DEF_LAYOUT_COMPACT {H5D_COMPACT, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, H5D_DEF_STORAGE_COMPACT} #define H5D_DEF_LAYOUT_CONTIG {H5D_CONTIGUOUS, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, H5D_DEF_STORAGE_CONTIG} #define H5D_DEF_LAYOUT_CHUNK {H5D_CHUNKED, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, H5D_DEF_STORAGE_CHUNK} @@ -75,7 +76,7 @@ #define H5D_DEF_LAYOUT_COMPACT {H5D_COMPACT, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, {H5D_CONTIGUOUS, H5D_DEF_STORAGE_CONTIG_INIT}} #define H5D_DEF_LAYOUT_CONTIG {H5D_CONTIGUOUS, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, {H5D_CONTIGUOUS, H5D_DEF_STORAGE_CONTIG_INIT}} #define H5D_DEF_LAYOUT_CHUNK {H5D_CHUNKED, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, {H5D_CONTIGUOUS, H5D_DEF_STORAGE_CONTIG_INIT}} -#define H5D_DEF_LAYOUT_VIRTUAL {H5D_CHUNKED, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, {H5D_CONTIGUOUS, H5D_DEF_STORAGE_CONTIG_INIT}} +#define H5D_DEF_LAYOUT_VIRTUAL {H5D_VIRTUAL, H5O_LAYOUT_VERSION_3, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, {H5D_CONTIGUOUS, H5D_DEF_STORAGE_CONTIG_INIT}} #endif /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ /* ======== Dataset creation properties ======== */ @@ -1669,8 +1670,20 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection") if(NULL == (layout.storage.u.virt.list[layout.storage.u.virt.list_nused].virtual_select = H5S_copy(vspace, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + layout.storage.u.virt.list[layout.storage.u.virt.list_nused].unlim_dim_source = H5S_get_select_unlim_dim(src_space); + layout.storage.u.virt.list[layout.storage.u.virt.list_nused].unlim_dim_virtual = H5S_get_select_unlim_dim(vspace); + layout.storage.u.virt.list[layout.storage.u.virt.list_nused].unlim_extent_source = HSIZE_UNDEF; + layout.storage.u.virt.list[layout.storage.u.virt.list_nused].unlim_extent_virtual = HSIZE_UNDEF; + layout.storage.u.virt.list[layout.storage.u.virt.list_nused].clip_size_source = HSIZE_UNDEF; + layout.storage.u.virt.list[layout.storage.u.virt.list_nused].clip_size_virtual = HSIZE_UNDEF; layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_space_status = H5O_VIRTUAL_STATUS_USER; layout.storage.u.virt.list[layout.storage.u.virt.list_nused].virtual_space_status = H5O_VIRTUAL_STATUS_USER; + + /* Update min_dims */ + if(H5D_virtual_update_min_dims(&layout, layout.storage.u.virt.list_nused) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to update virtual dataset minimum dimensions") + + /* Finish adding entry */ layout.storage.u.virt.list_nused++; adding_entry = FALSE; @@ -1786,6 +1799,11 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t index) if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].virtual_select, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + /* Clip selection to extent */ + if(H5S_get_select_unlim_dim(space) >= 0) + if(H5S_hyper_clip_to_extent(space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + /* Register ID */ if((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register data space") @@ -1844,6 +1862,11 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index) if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].source_select, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection") + /* Clip selection to extent */ + if(H5S_get_select_unlim_dim(space) >= 0) + if(H5S_hyper_clip_to_extent(space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + /* Register ID */ if((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register data space") diff --git a/src/H5S.c b/src/H5S.c index e24879c..045ab51 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -522,7 +522,7 @@ H5S_extent_copy(H5S_t *dst, const H5S_t *src) /* If the selection is 'hyper', update the selection due to changed extent */ if(H5S_GET_SELECT_TYPE(dst) == H5S_SEL_HYPERSLABS) - if(H5S__hyper_update_extent_offset(dst) < 0) + if(H5S_hyper_clip_to_extent(dst) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") done: @@ -1363,7 +1363,7 @@ H5S__set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, /* If the selection is 'hyper', update the selection due to changed * extent */ if(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS) - if(H5S__hyper_update_extent_offset(space) < 0) + if(H5S_hyper_clip_to_extent(space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") done: @@ -1883,7 +1883,14 @@ done: /*------------------------------------------------------------------------- * Function: H5S_set_extent * - * Purpose: Modify the dimensions of a dataspace. Based on H5S_extend + * Purpose: Modify the dimensions of a dataspace. Based on H5S_extend. + * + * Note that this function does *not* clip unlimited + * selections, because it is not currently necessary to do + * that anywhere this function is called. If this becomes + * necessary (if the selection could be unlimited and the + * clip size is not being handled separately), this function + * must be updated to (optionally) clip the selection. * * Return: Success: Non-negative * Failure: Negative @@ -1966,6 +1973,13 @@ H5S_has_extent(const H5S_t *ds) * * Purpose: Modify the dimensions of a dataspace. Based on H5S_extend * + * Note that this function does *not* clip unlimited + * selections, because it is not currently necessary to do + * that anywhere this function is called. If this becomes + * necessary (if the selection could be unlimited and the + * clip size is not being handled separately), this function + * must be updated to (optionally) clip the selection. + * * Return: Success: Non-negative * Failure: Negative * @@ -1999,12 +2013,6 @@ H5S_set_extent_real(H5S_t *space, const hsize_t *size) if(H5S_select_all(space, FALSE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") - /* If the selection is 'hyper', update the selection due to changed - * extent */ - if(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS) - if(H5S__hyper_update_extent_offset(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") - /* Mark the dataspace as no longer shared if it was before */ if(H5O_msg_reset_share(H5O_SDSPACE_ID, space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRESET, FAIL, "can't stop sharing dataspace") diff --git a/src/H5Sall.c b/src/H5Sall.c index cb7e6f2..94eb5f5 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -45,6 +45,7 @@ static herr_t H5S_all_deserialize(const H5F_t *f, H5S_t *space, uint32_t version, uint8_t flags, const uint8_t **p); static herr_t H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_all_offset(const H5S_t *space, hsize_t *off); +static int H5S_all_unlim_dim(const H5S_t *space); static htri_t H5S_all_is_contiguous(const H5S_t *space); static htri_t H5S_all_is_single(const H5S_t *space); static htri_t H5S_all_is_regular(const H5S_t *space); @@ -76,6 +77,7 @@ const H5S_select_class_t H5S_sel_all[1] = {{ H5S_all_deserialize, H5S_all_bounds, H5S_all_offset, + H5S_all_unlim_dim, H5S_all_is_contiguous, H5S_all_is_single, H5S_all_is_regular, @@ -662,6 +664,31 @@ H5S_all_offset(const H5S_t UNUSED *space, hsize_t *offset) /*-------------------------------------------------------------------------- NAME + H5S_all_unlim_dim + PURPOSE + Return unlimited dimension of selection, or -1 if none + USAGE + VDSINC + RETURNS + Unlimited dimension of selection, or -1 if none (never fails). + DESCRIPTION + VDSINC + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static int +H5S_all_unlim_dim(const H5S_t UNUSED *space) +{ + FUNC_ENTER_NOAPI_NOERR + + FUNC_LEAVE_NOAPI(-1) +} /* end H5S_all_unlim_dim() */ + + +/*-------------------------------------------------------------------------- + NAME H5S_all_is_contiguous PURPOSE Check if a "all" selection is contiguous within the dataspace extent. diff --git a/src/H5Shyper.c b/src/H5Shyper.c index d9bde55..81306c9 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -60,6 +60,7 @@ static herr_t H5S_hyper_deserialize(const H5F_t *f, H5S_t *space, uint32_t version, uint8_t flags, const uint8_t **p); static herr_t H5S_hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_hyper_offset(const H5S_t *space, hsize_t *offset); +static int H5S_hyper_unlim_dim(const H5S_t *space); static htri_t H5S_hyper_is_contiguous(const H5S_t *space); static htri_t H5S_hyper_is_single(const H5S_t *space); static htri_t H5S_hyper_is_regular(const H5S_t *space); @@ -96,6 +97,7 @@ const H5S_select_class_t H5S_sel_hyper[1] = {{ H5S_hyper_deserialize, H5S_hyper_bounds, H5S_hyper_offset, + H5S_hyper_unlim_dim, H5S_hyper_is_contiguous, H5S_hyper_is_single, H5S_hyper_is_regular, @@ -1655,6 +1657,7 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection) dst_hslab->app_diminfo[u] = src_hslab->app_diminfo[u]; } /* end for */ } /* end for */ + dst_hslab->unlim_dim_clip_size = src_hslab->unlim_dim_clip_size; dst_hslab->num_elem_non_unlim = src_hslab->num_elem_non_unlim; dst->select.sel_info.hslab->span_lst=src->select.sel_info.hslab->span_lst; @@ -1681,7 +1684,7 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection) if(!extent_equal) /* Update selection due to changed extent */ - if(H5S__hyper_update_extent_offset(dst) < 0) + if(H5S_hyper_clip_to_extent(dst) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") } /* end if */ @@ -1906,7 +1909,7 @@ H5S_get_select_hyper_nblocks(H5S_t *space) for(ret_value = 1, u = 0; u < space->extent.rank; u++) { if(diminfo[u].block == (hsize_t)0) HGOTO_DONE((hsize_t)0) - ret_value *= diminfo[u].count;; + ret_value *= diminfo[u].count; } /* end for */ } /* end if */ else @@ -2980,6 +2983,31 @@ done: /*-------------------------------------------------------------------------- NAME + H5S_hyper_unlim_dim + PURPOSE + Return unlimited dimension of selection, or -1 if none + USAGE + VDSINC + RETURNS + Unlimited dimension of selection, or -1 if none (never fails). + DESCRIPTION + VDSINC + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static int +H5S_hyper_unlim_dim(const H5S_t *space) +{ + FUNC_ENTER_NOAPI_NOERR + + FUNC_LEAVE_NOAPI(space->select.sel_info.hslab->unlim_dim) +} /* end H5S_hyper_get_unlim_dim() */ + + +/*-------------------------------------------------------------------------- + NAME H5S_hyper_is_contiguous PURPOSE Check if a hyperslab selection is contiguous within the dataspace extent. @@ -6683,6 +6711,10 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Save unlim_dim */ space->select.sel_info.hslab->unlim_dim = unlim_dim; + /* Initialize unlim_dim_clip_size to H5S_UNLIMITED so the selection is + * clipped by H5S__hyper_clip_unlim() no matter what the extent is */ + space->select.sel_info.hslab->unlim_dim_clip_size = H5S_UNLIMITED; + /* Indicate that the dimension information is valid */ space->select.sel_info.hslab->diminfo_valid = TRUE; @@ -6693,17 +6725,24 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, if(unlim_dim >= 0) { space->select.sel_info.hslab->num_elem_non_unlim = (hsize_t)1; for(u = 0; u < space->extent.rank; u++) { + /* Save start/stride/count/block */ space->select.sel_info.hslab->opt_unlim_diminfo[u].start = start[u]; space->select.sel_info.hslab->opt_unlim_diminfo[u].stride = opt_stride[u]; space->select.sel_info.hslab->opt_unlim_diminfo[u].count = opt_count[u]; space->select.sel_info.hslab->opt_unlim_diminfo[u].block = opt_block[u]; + /* Calculate num_elem_non_unlim */ if((int)u != unlim_dim) space->select.sel_info.hslab->num_elem_non_unlim *= (opt_count[u] * opt_block[u]); } /* end for */ + /* Initialize unlim_dim_clip_size to H5S_UNLIMITED so the selection + * is clipped by H5S__hyper_clip_to_extent() no matter what the + * extent is */ + space->select.sel_info.hslab->unlim_dim_clip_size = H5S_UNLIMITED; + /* Set opt_diminfo or span tree based on extent */ - if(H5S__hyper_update_extent_offset(space) < 0) + if(H5S_hyper_clip_to_extent(space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't set selection based on extent") } /* end if */ } /* end if */ @@ -7133,13 +7172,19 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Check for unlimited dimension */ for(u = 0; uextent.rank; u++) if((count[u] == H5S_UNLIMITED) || (block[u] == H5S_UNLIMITED)) { - if(unlim_dim >= 0) + if(unlim_dim >= 0) { + HDassert(0 && "Checking code coverage..."); //VDSINC HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot have more than one unlimited dimension in selection") + } //VDSINC else { - if(op != H5S_SELECT_SET) + if(op != H5S_SELECT_SET) { + HDassert(0 && "Checking code coverage..."); //VDSINC HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot use unlimited selection to modify existing selection") - if(count[u] == block[u] /* == H5S_UNLIMITED */) + } //VDSINC + if(count[u] == block[u] /* == H5S_UNLIMITED */) { + HDassert(0 && "Checking code coverage..."); //VDSINC HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "count and block cannot both be unlimited") + } //VDSINC unlim_dim = (int)u; } /* end else */ } /* end if */ @@ -7336,6 +7381,11 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Save unlim_dim */ space->select.sel_info.hslab->unlim_dim = unlim_dim; + /* Initialize unlim_dim_clip_size to H5S_UNLIMITED so the selection is + * clipped by H5S__hyper_clip_to_extent() no matter what the extent is + */ + space->unlim_dim_clip_size = H5S_UNLIMITED; + /* Indicate that the dimension information is valid */ space->select.sel_info.hslab->diminfo_valid=TRUE; @@ -7356,7 +7406,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, } /* end for */ /* Set opt_diminfo or span tree based on extent */ - if(H5S__hyper_update_extent_offset(space) < 0) + if(H5S__hyper_clip_to_extent(space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't set selection based on extent") } /* end if */ } /* end if */ @@ -7365,8 +7415,10 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS); /* Cannot modify unlimited selections */ - if(space->select.sel_info.hslab->unlim_dim >= 0) + if(space->select.sel_info.hslab->unlim_dim >= 0) { + HDassert(0 && "Checking code coverage..."); //VDSINC HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection") + } //VDSINC /* Check if there's no hyperslab span information currently */ if(space->select.sel_info.hslab->span_lst==NULL) @@ -9502,40 +9554,39 @@ done: /*-------------------------------------------------------------------------- NAME - H5S__hyper_update_extent_offset + H5S_hyper_clip_unlim PURPOSE - Updates the hyperslab selection after a change to the dataspace extent - or offset + Clips the unlimited dimension of the hyperslab selection to the + specified size USAGE VDSINC RETURNS Non-negative on success/Negative on failure. DESCRIPTION - since unlimited selections are internally described as limited - selections with maximal size, these internal selections need to be - updated whenever the maximum size changes. This function - recaluculates the unlimited dimension (if any) of the hyperslab - selection when the extent or offset is changed. + This function recalculates the internal description of the hyperslab + to make the unlimited dimension extend to the specified extent. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS + Note this function takes the offset into account. EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S__hyper_update_extent_offset(H5S_t *space) +H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) { H5S_hyper_sel_t *hslab; /* Convenience pointer to hyperslab info */ herr_t ret_value = SUCCEED; - FUNC_ENTER_PACKAGE + FUNC_ENTER_NOAPI(FAIL) /* Check parameters */ HDassert(space); hslab = space->select.sel_info.hslab; HDassert(hslab); + HDassert(hslab->unlim_dim >= 0); - /* Check for unlimited dimension */ - if(hslab->unlim_dim < 0) + /* Check for no need to change size */ + if(clip_size == hslab->unlim_dim_clip_size) HGOTO_DONE(SUCCEED) /* Free previous spans, if any */ @@ -9548,10 +9599,10 @@ H5S__hyper_update_extent_offset(H5S_t *space) /* Initialize opt_diminfo with opt_unlim_diminfo */ hslab->opt_diminfo[hslab->unlim_dim] = hslab->opt_unlim_diminfo[hslab->unlim_dim]; - /* Check for selection outside extent */ + /* Check for selection outside clip size */ if((hsize_t)((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start + space->select.offset[hslab->unlim_dim]) - >= space->extent.size[hslab->unlim_dim]) { + >= clip_size) { if(hslab->opt_diminfo[hslab->unlim_dim].block == H5S_UNLIMITED) hslab->opt_diminfo[hslab->unlim_dim].block = 0; else @@ -9569,11 +9620,11 @@ H5S__hyper_update_extent_offset(H5S_t *space) if(hslab->opt_diminfo[hslab->unlim_dim].count == (hsize_t)1) { HDassert(hslab->opt_diminfo[hslab->unlim_dim].block == H5S_UNLIMITED); - /* Calculate actual block size for this extent */ + /* Calculate actual block size for this clip size */ hslab->opt_diminfo[hslab->unlim_dim].block = (hsize_t)((hssize_t)space->extent.size[hslab->unlim_dim] - - ((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start - + space->select.offset[hslab->unlim_dim])); + - ((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start) + + space->select.offset[hslab->unlim_dim]); /* Calculate number of elements */ space->select.num_elem = hslab->opt_diminfo[hslab->unlim_dim].block @@ -9588,7 +9639,7 @@ H5S__hyper_update_extent_offset(H5S_t *space) /* Calculate initial count (last block may be partial) */ hslab->opt_diminfo[hslab->unlim_dim].count = - ((hsize_t)((hssize_t)space->extent.size[hslab->unlim_dim] + ((hsize_t)((hssize_t)clip_size - ((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start + space->select.offset[hslab->unlim_dim]) + (hssize_t)hslab->opt_diminfo[hslab->unlim_dim].stride @@ -9605,7 +9656,7 @@ H5S__hyper_update_extent_offset(H5S_t *space) if(((hslab->opt_diminfo[hslab->unlim_dim].stride * (hslab->opt_diminfo[hslab->unlim_dim].count - (hsize_t)1)) + hslab->opt_diminfo[hslab->unlim_dim].block - (hsize_t)1) - > ((hsize_t)((hssize_t)space->extent.size[hslab->unlim_dim] + > ((hsize_t)((hssize_t)clip_size - (hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start + space->select.offset[hslab->unlim_dim]))) { /* Last block is partial, need to construct compound selection */ @@ -9616,9 +9667,150 @@ H5S__hyper_update_extent_offset(H5S_t *space) hslab->diminfo_valid = TRUE; } /* end else */ + /* Save clip size */ + hslab->unlim_dim_clip_size = clip_size; + done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5S__hyper_update_extent_offset() */ +} /* end H5S_hyper_clip_unlim() */ + + +/*-------------------------------------------------------------------------- + NAME + H5S_hyper_clip_to_extent + PURPOSE + Updates the hyperslab selection after a change to the dataspace extent + or offset + USAGE + VDSINC + RETURNS + Non-negative on success/Negative on failure. + DESCRIPTION + Since unlimited selections are internally described as limited + selections with maximal size, these internal selections need to be + updated whenever the maximum size changes. This function + recaluculates the unlimited dimension (if any) of the hyperslab + selection when the extent or offset is changed. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + Note this function takes the offset into account. + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5S_hyper_clip_to_extent(H5S_t *space) +{ + H5S_hyper_sel_t *hslab; /* Convenience pointer to hyperslab info */ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI(FAIL) + + /* Check parameters */ + HDassert(space); + hslab = space->select.sel_info.hslab; + HDassert(hslab); + + /* Check for unlimited dimension */ + if(hslab->unlim_dim < 0) + HGOTO_DONE(SUCCEED) + + /* Clip unlimited selection to extent */ + if(H5S_hyper_clip_unlim(space, space->extent.size[hslab->unlim_dim]) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5S_hyper_clip_to_extent() */ + + +/*-------------------------------------------------------------------------- + NAME + H5S_hyper_get_clip_extent + PURPOSE + VDSINC + USAGE + VDSINC + RETURNS + Non-negative on success/Negative on failure. + DESCRIPTION + VDSINC + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + Note this assumes the offset has been normalized. + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5S_hyper_get_clip_extent(const H5S_t *clip_space, + const H5S_t *match_space, hsize_t *clip_space_unlim_extent) +{ + const H5S_hyper_sel_t *clip_hslab; /* Convenience pointer to hyperslab info */ + const H5S_hyper_sel_t *match_hslab; /* Convenience pointer to hyperslab info */ + hsize_t num_slices; + hsize_t count; + hsize_t rem_slices; + + FUNC_ENTER_NOAPI_NOERR + + /* Check parameters */ + HDassert(clip_space); + clip_hslab = clip_space->select.sel_info.hslab; + HDassert(clip_hslab); + HDassert(match_space); + match_hslab = match_space->select.sel_info.hslab; + HDassert(match_space); + HDassert(clip_space_unlim_extent); + HDassert(clip_hslab->unlim_dim >= 0); + HDassert(match_hslab->unlim_dim >= 0); + HDassert(clip_hslab->num_elem_non_unlim == match_hslab->num_elem_non_unlim); + + /* Calculate number of slices */ + num_slices = match_space->select.num_elem / match_hslab->num_elem_non_unlim; + + if(num_slices == 0) + *clip_space_unlim_extent = 0; + else if(clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block == H5S_UNLIMITED) { + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Unlimited block, just set the extent large enough for the block size + * to match num_slices */ + HDassert(clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].count == (hsize_t)1); + + *clip_space_unlim_extent = + clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start + + num_slices; + } /* end if */ + else { + /* Unlimited count, need to match extent so a block (possibly) gets cut + * off so the number of slices matches num_slices */ + HDassert(clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].count == H5S_UNLIMITED); + + /* Calculate number of complete blocks in clip_space */ + count = num_slices / clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block; + + /* Calculate slices remaining */ + rem_slices = num_slices - (count + * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block); + + if(rem_slices > 0) { + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Must end extent in middle of partial block */ + *clip_space_unlim_extent = + clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start + + (count + * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride) + + rem_slices; + } //VDSINC + else + /* End extent at end of last block */ + *clip_space_unlim_extent = + clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start + + ((count - (hsize_t)1) + * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride) + + clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block; + } /* end else */ + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5S_hyper_get_clip_extent() */ /*-------------------------------------------------------------------------- diff --git a/src/H5Snone.c b/src/H5Snone.c index 11c4912..e9ea5e1 100644 --- a/src/H5Snone.c +++ b/src/H5Snone.c @@ -46,6 +46,7 @@ static herr_t H5S_none_deserialize(const H5F_t *f, H5S_t *space, uint32_t version, uint8_t flags, const uint8_t **p); static herr_t H5S_none_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_none_offset(const H5S_t *space, hsize_t *off); +static int H5S_none_unlim_dim(const H5S_t *space); static htri_t H5S_none_is_contiguous(const H5S_t *space); static htri_t H5S_none_is_single(const H5S_t *space); static htri_t H5S_none_is_regular(const H5S_t *space); @@ -77,6 +78,7 @@ const H5S_select_class_t H5S_sel_none[1] = {{ H5S_none_deserialize, H5S_none_bounds, H5S_none_offset, + H5S_none_unlim_dim, H5S_none_is_contiguous, H5S_none_is_single, H5S_none_is_regular, @@ -613,6 +615,31 @@ H5S_none_offset(const H5S_t UNUSED *space, hsize_t UNUSED *offset) /*-------------------------------------------------------------------------- NAME + H5S_none_unlim_dim + PURPOSE + Return unlimited dimension of selection, or -1 if none + USAGE + VDSINC + RETURNS + Unlimited dimension of selection, or -1 if none (never fails). + DESCRIPTION + VDSINC + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static int +H5S_none_unlim_dim(const H5S_t UNUSED *space) +{ + FUNC_ENTER_NOAPI_NOERR + + FUNC_LEAVE_NOAPI(-1) +} /* end H5S_none_unlim_dim() */ + + +/*-------------------------------------------------------------------------- + NAME H5S_none_is_contiguous PURPOSE Check if a "none" selection is contiguous within the dataspace extent. diff --git a/src/H5Spkg.h b/src/H5Spkg.h index e28c118..226edf1 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -124,6 +124,7 @@ typedef struct { * contains H5S_UNLIMITED in the count or block of the unlimited * dimension (if any). */ int unlim_dim; /* Dimension where selection is unlimited, or -1 if none */ + hsize_t unlim_dim_clip_size; /* Size to which the selection is clipped in unlimited dimension */ hsize_t num_elem_non_unlim; /* # of elements in a "slice" excluding the unlimited dimension */ H5S_hyper_span_info_t *span_lst; /* List of hyperslab span information */ } H5S_hyper_sel_t; @@ -151,6 +152,8 @@ typedef herr_t (*H5S_sel_deserialize_func_t)(const H5F_t *f, H5S_t *space, typedef herr_t (*H5S_sel_bounds_func_t)(const H5S_t *space, hsize_t *start, hsize_t *end); /* Method to determine linear offset of initial element in selection within dataspace */ typedef herr_t (*H5S_sel_offset_func_t)(const H5S_t *space, hsize_t *offset); +/* Method to get unlimited dimension of selection (or -1 for none) */ +typedef int (*H5S_sel_unlim_dim_func_t)(const H5S_t *space); /* Method to determine if current selection is contiguous */ typedef htri_t (*H5S_sel_is_contiguous_func_t)(const H5S_t *space); /* Method to determine if current selection is a single block */ @@ -180,6 +183,7 @@ typedef struct { H5S_sel_deserialize_func_t deserialize; /* Method to store create selection from "serialized" form (a byte sequence suitable for storing on disk) */ H5S_sel_bounds_func_t bounds; /* Method to determine to smallest n-D bounding box containing the current selection */ H5S_sel_offset_func_t offset; /* Method to determine linear offset of initial element in selection within dataspace */ + H5S_sel_unlim_dim_func_t unlim_dim; /* Method to get unlimited dimension of selection (or -1 for none) */ H5S_sel_is_contiguous_func_t is_contiguous; /* Method to determine if current selection is contiguous */ H5S_sel_is_single_func_t is_single; /* Method to determine if current selection is a single block */ H5S_sel_is_regular_func_t is_regular; /* Method to determine if current selection is "regular" */ @@ -268,7 +272,6 @@ H5_DLL herr_t H5S_extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, H5_DLL herr_t H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, const H5S_t *src_intersect_space, H5S_t *proj_space); -H5_DLL herr_t H5S__hyper_update_extent_offset(H5S_t *space); /* Testing functions */ #ifdef H5S_TESTING diff --git a/src/H5Spoint.c b/src/H5Spoint.c index a7421de..50b8550 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -47,6 +47,7 @@ static herr_t H5S_point_deserialize(const H5F_t *f, H5S_t *space, uint32_t version, uint8_t flags, const uint8_t **p); static herr_t H5S_point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_point_offset(const H5S_t *space, hsize_t *off); +static int H5S_point_unlim_dim(const H5S_t *space); static htri_t H5S_point_is_contiguous(const H5S_t *space); static htri_t H5S_point_is_single(const H5S_t *space); static htri_t H5S_point_is_regular(const H5S_t *space); @@ -78,6 +79,7 @@ const H5S_select_class_t H5S_sel_point[1] = {{ H5S_point_deserialize, H5S_point_bounds, H5S_point_offset, + H5S_point_unlim_dim, H5S_point_is_contiguous, H5S_point_is_single, H5S_point_is_regular, @@ -1189,6 +1191,31 @@ done: /*-------------------------------------------------------------------------- NAME + H5S_point_unlim_dim + PURPOSE + Return unlimited dimension of selection, or -1 if none + USAGE + VDSINC + RETURNS + Unlimited dimension of selection, or -1 if none (never fails). + DESCRIPTION + VDSINC + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static int +H5S_point_unlim_dim(const H5S_t UNUSED *space) +{ + FUNC_ENTER_NOAPI_NOERR + + FUNC_LEAVE_NOAPI(-1) +} /* end H5S_point_unlim_dim() */ + + +/*-------------------------------------------------------------------------- + NAME H5S_point_is_contiguous PURPOSE Check if a point selection is contiguous within the dataspace extent. diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 8f9b530..ebfa88e 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -218,6 +218,7 @@ H5_DLL htri_t H5S_select_valid(const H5S_t *space); H5_DLL hssize_t H5S_get_select_npoints(const H5S_t *space); H5_DLL herr_t H5S_get_select_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); H5_DLL herr_t H5S_get_select_offset(const H5S_t *space, hsize_t *offset); +H5_DLL int H5S_get_select_unlim_dim(const H5S_t *space); H5_DLL herr_t H5S_select_offset(H5S_t *space, const hssize_t *offset); H5_DLL herr_t H5S_select_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection); H5_DLL htri_t H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2); @@ -265,6 +266,10 @@ H5_DLL htri_t H5S_hyper_intersect_block (H5S_t *space, hsize_t *start, hsize_t * H5_DLL herr_t H5S_hyper_adjust_s(H5S_t *space, const hssize_t *offset); H5_DLL htri_t H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset); H5_DLL herr_t H5S_hyper_denormalize_offset(H5S_t *space, const hssize_t *old_offset); +H5_DLL herr_t H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size); +H5_DLL herr_t H5S_hyper_clip_to_extent(H5S_t *space); +H5_DLL herr_t H5S_hyper_get_clip_extent(const H5S_t *clip_space, + const H5S_t *match_space, hsize_t *clip_space_unlim_extent); /* Operations on selection iterators */ H5_DLL herr_t H5S_select_iter_init(H5S_sel_iter_t *iter, const H5S_t *space, size_t elmt_size); diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 52273c7..b22ea64 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -81,7 +81,7 @@ H5S_select_offset(H5S_t *space, const hssize_t *offset) /* If the selection is 'hyper', update the selection due to changed offset */ if(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS) - if(H5S__hyper_update_extent_offset(space) < 0) + if(H5S_hyper_clip_to_extent(space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") done: @@ -699,6 +699,44 @@ H5S_get_select_offset(const H5S_t *space, hsize_t *offset) /*-------------------------------------------------------------------------- NAME + H5S_get_select_unlim_dim + PURPOSE + Gets the unlimited dimension in the selection, or -1 if there is no + unlimited dimension. + USAGE + int H5S_get_select_unlim_dim(space) + const H5S_t *space; IN: Dataspace pointer of selection to query + RETURNS + Unlimited dimension in the selection, or -1 if there is no unlimited + dimension (never fails) + DESCRIPTION + Gets the unlimited dimension in the selection, or -1 if there is no + unlimited dimension. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + Currently only implemented for hyperslab selections, all others + simply return -1. + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +int +H5S_get_select_unlim_dim(const H5S_t *space) +{ + herr_t ret_value; /* return value */ + + FUNC_ENTER_NOAPI_NOINIT_NOERR + + /* Check args */ + HDassert(space); + + ret_value = (*space->select.type->unlim_dim)(space); + + FUNC_LEAVE_NOAPI(ret_value) +} /* H5S_get_select_unlim_dim() */ + + +/*-------------------------------------------------------------------------- + NAME H5S_select_is_contiguous PURPOSE Determines if a selection is contiguous in the dataspace -- cgit v0.12 From f395c2bb032888fbca30de953b41b44517d49089 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 29 Apr 2015 12:04:10 -0500 Subject: [svn-r26967] Refactor VDS unlimited dimension code to correctly handle case where selections have discrete blocks and the extent is set by the minimum (untested, and there is still no way to set that preference). Tested: ummon --- src/H5Dvirtual.c | 137 +++++++++++++++++++++++++++++++++++++------------------ src/H5Olayout.c | 1 + src/H5Oprivate.h | 1 + src/H5Pdcpl.c | 1 + src/H5Shyper.c | 46 ++++++++++++++----- src/H5Sprivate.h | 3 +- 6 files changed, 131 insertions(+), 58 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 67f405f..40fe7ac 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -161,6 +161,7 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) layout->storage.u.virt.list[i].unlim_extent_virtual = orig_list[i].unlim_extent_virtual; layout->storage.u.virt.list[i].clip_size_source = orig_list[i].clip_size_source; layout->storage.u.virt.list[i].clip_size_virtual = orig_list[i].clip_size_virtual; + layout->storage.u.virt.list[i].clip_size_virtual_incl_trail = orig_list[i].clip_size_virtual_incl_trail; layout->storage.u.virt.list[i].source_space_status = orig_list[i].source_space_status; layout->storage.u.virt.list[i].virtual_space_status = orig_list[i].virtual_space_status; } /* end for */ @@ -332,8 +333,10 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) { H5O_storage_virtual_t *storage; hsize_t new_dims[H5S_MAX_RANK]; + hsize_t max_dims[H5S_MAX_RANK]; hsize_t curr_dims[H5S_MAX_RANK]; hsize_t clip_size; + hsize_t clip_size_incl_trail; int rank; hbool_t changed = FALSE; /* Whether the VDS extent changed */ size_t i; @@ -350,9 +353,11 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if((rank = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions") - /* Initialize new_dims to HSIZE_UNDEF */ - for(i = 0; i < (size_t)rank; i++) + /* Initialize new_dims and max_dims to HSIZE_UNDEF */ + for(i = 0; i < (size_t)rank; i++) { new_dims[i] = HSIZE_UNDEF; + max_dims[i] = HSIZE_UNDEF; + } /* end for */ /* Iterate over mappings */ for(i = 0; i < storage->list_nalloc; i++) @@ -376,40 +381,78 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if(H5S_get_simple_extent_dims(storage->list[i].source_select, curr_dims, NULL) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get source space dimensions") - /* Check if the source extent in the unlimited dimension - * changed since the last time the VDS extent/mapping - * was updated */ - if(curr_dims[storage->list[i].unlim_dim_source] - == storage->list[i].unlim_extent_source) - /* Use cached result for clip size */ - clip_size = storage->list[i].clip_size_virtual; - else { - /* Get size that virtual selection would be clipped - * to to match size of source selection */ - if(H5S_hyper_get_clip_extent(storage->list[i].virtual_select, storage->list[i].source_select, &clip_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") - - /* If we are setting the extent by the maximum of all - * mappings, clip virtual_select. Note that if we used the - * cached clip_size above, the selection will already be - * clipped to the correct size. */ - if(storage->set_extent_max) + /* Check if we are setting extent by maximum or minimum of + * mappings */ + if(storage->set_extent_max) { + /* Check if the source extent in the unlimited dimension + * changed since the last time the VDS extent/mapping + * was updated */ + if(curr_dims[storage->list[i].unlim_dim_source] + == storage->list[i].unlim_extent_source) + /* Use cached result for clip size */ + clip_size = storage->list[i].clip_size_virtual; + else { + /* Get size that virtual selection would be clipped to + * to match size of source selection */ + if(H5S_hyper_get_clip_extent(storage->list[i].virtual_select, storage->list[i].source_select, &clip_size, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") + + /* Clip virtual_select. Note that if we used the cached + * clip_size above, the selection will already be + * clipped to the correct size. */ if(H5S_hyper_clip_unlim(storage->list[i].virtual_select, clip_size)) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") - /* Update cached values unlim_extent_source and - * clip_size_virtual */ - storage->list[i].unlim_extent_source = curr_dims[storage->list[i].unlim_dim_source]; - storage->list[i].clip_size_virtual = clip_size; - } /* end else */ + /* Update cached values unlim_extent_source and + * clip_size_virtual */ + storage->list[i].unlim_extent_source = curr_dims[storage->list[i].unlim_dim_source]; + storage->list[i].clip_size_virtual = clip_size; + } /* end else */ - /* Update new_dims */ - if((new_dims[storage->list[i].unlim_dim_virtual] == HSIZE_UNDEF) - || (storage->set_extent_max ? (clip_size - > (hsize_t)new_dims[storage->list[i].unlim_dim_virtual]) - : (clip_size - < (hsize_t)new_dims[storage->list[i].unlim_dim_virtual]))) - new_dims[storage->list[i].unlim_dim_virtual] = clip_size; + /* Update new_dims */ + if((new_dims[storage->list[i].unlim_dim_virtual] == HSIZE_UNDEF) + || (clip_size + > (hsize_t)new_dims[storage->list[i].unlim_dim_virtual])) + new_dims[storage->list[i].unlim_dim_virtual] = clip_size; + } /* end if */ + else { + /* Check if the source extent in the unlimited dimension + * changed since the last time the VDS extent/mapping was + * updated */ + if(curr_dims[storage->list[i].unlim_dim_source] + == storage->list[i].unlim_extent_source) { + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Use cached result for clip size */ + clip_size = storage->list[i].clip_size_virtual; + clip_size_incl_trail = storage->list[i].clip_size_virtual_incl_trail; + } //VDSINC + else { + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Get size that virtual selection would be clipped to + * to match size of source selection. Also get the clip + * size including the trailing space (gap between + * blocks). */ + if(H5S_hyper_get_clip_extent(storage->list[i].virtual_select, storage->list[i].source_select, &clip_size, &clip_size_incl_trail) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") + + /* Update cached values unlim_extent_source, + * clip_size_virtual, and clip_size_virtual_incl_trail + */ + storage->list[i].unlim_extent_source = curr_dims[storage->list[i].unlim_dim_source]; + storage->list[i].clip_size_virtual = clip_size; + storage->list[i].clip_size_virtual_incl_trail = clip_size_incl_trail; + } /* end else */ + + /* Update new_dims and max_dims */ + if((new_dims[storage->list[i].unlim_dim_virtual] == HSIZE_UNDEF) + || (clip_size_incl_trail + < (hsize_t)new_dims[storage->list[i].unlim_dim_virtual])) + new_dims[storage->list[i].unlim_dim_virtual] = clip_size_incl_trail; + if((max_dims[storage->list[i].unlim_dim_virtual] == HSIZE_UNDEF) + || (clip_size + > (hsize_t)max_dims[storage->list[i].unlim_dim_virtual])) + max_dims[storage->list[i].unlim_dim_virtual] = clip_size; + } /* end else */ } /* end if */ } /* end if */ @@ -417,17 +460,21 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if(H5S_get_simple_extent_dims(dset->shared->space, curr_dims, NULL) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions") - /* Calculate new extent */ + /* Calculate new extent. Apply max_dims first, so min_dims takes precedent. + */ for(i = 0; i < (size_t)rank; i++) { - if((new_dims[i] != HSIZE_UNDEF) && (new_dims[i] != curr_dims[i])) { - changed = TRUE; - curr_dims[i] = new_dims[i]; - } /* end if */ - if(storage->min_dims[i] > curr_dims[i]) { + if(new_dims[i] == HSIZE_UNDEF) + new_dims[i] = curr_dims[i]; + if((max_dims[i] != HSIZE_UNDEF) && (new_dims[i] > max_dims[i])) { + HDassert(0 && "Checking code coverage..."); //VDSINC + new_dims[i] = max_dims[i]; + } //VDSINC + if(new_dims[i] < storage->min_dims[i]) { HDassert(0 && "Checking code coverage..."); //VDSINC + new_dims[i] = storage->min_dims[i]; + } //VDSINC + if(new_dims[i] != curr_dims[i]) changed = TRUE; - curr_dims[i] = storage->min_dims[i]; - } /* end if */ } /* end for */ /* If we did not change the VDS dimensions and we are setting the extent by @@ -435,7 +482,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if(changed || !storage->set_extent_max) { /* Update VDS extent */ if(changed) - if(H5S_set_extent(dset->shared->space, curr_dims) < 0) + if(H5S_set_extent(dset->shared->space, new_dims) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") /* Iterate over mappings again to update source selections and virtual @@ -449,7 +496,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) /* Update virtual mapping extent. Note this function does not * clip the selection. */ if(changed) - if(H5S_set_extent(storage->list[i].virtual_select, curr_dims) < 0) + if(H5S_set_extent(storage->list[i].virtual_select, new_dims) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") /* Check if we are setting extent by the minimum of mappings */ @@ -466,7 +513,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) /* Check if the virtual extent in the unlimited dimension * changed since the last time the VDS extent/mapping was * updated */ - if(curr_dims[storage->list[i].unlim_dim_virtual] + if(new_dims[storage->list[i].unlim_dim_virtual] == storage->list[i].unlim_extent_virtual) { HDassert(0 && "Checking code coverage..."); //VDSINC /* Use cached result for clip size */ @@ -476,12 +523,12 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) HDassert(0 && "Checking code coverage..."); //VDSINC /* Get size that source selection will be clipped to to * match size of virtual selection */ - if(H5S_hyper_get_clip_extent(storage->list[i].source_select, storage->list[i].virtual_select, &clip_size) < 0) + if(H5S_hyper_get_clip_extent(storage->list[i].source_select, storage->list[i].virtual_select, &clip_size, NULL) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") /* Update cached values unlim_extent_virtual and * clip_size_source */ - storage->list[i].unlim_extent_virtual = curr_dims[storage->list[i].unlim_dim_virtual]; + storage->list[i].unlim_extent_virtual = new_dims[storage->list[i].unlim_dim_virtual]; storage->list[i].clip_size_source = clip_size; } /* end else */ diff --git a/src/H5Olayout.c b/src/H5Olayout.c index fb9bb9c..cf5b3d2 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -309,6 +309,7 @@ H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, mesg->storage.u.virt.list[i].unlim_extent_virtual = HSIZE_UNDEF; mesg->storage.u.virt.list[i].clip_size_source = HSIZE_UNDEF; mesg->storage.u.virt.list[i].clip_size_virtual = HSIZE_UNDEF; + mesg->storage.u.virt.list[i].clip_size_virtual_incl_trail = HSIZE_UNDEF; /* Update min_dims */ if(H5D_virtual_update_min_dims(mesg, i) < 0) diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 74cc9a4..0211093 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -433,6 +433,7 @@ typedef struct H5O_storage_virtual_ent_t { hsize_t unlim_extent_source; /* Extent of unlimited dimension in source dset last time virtual_select was patched to match selection */ hsize_t unlim_extent_virtual; /* Extent of unlimited dimension in virtual dset last time source_select was patched to match selection */ hsize_t clip_size_virtual; /* Size selection would be clipped to in virtual selection, ignoring other mappings, when source extent == unlim_extent_source */ + hsize_t clip_size_virtual_incl_trail; /* Like above, but includes gap after last block */ hsize_t clip_size_source; /* Size selection would be clipped to in source selection when virtual extent == unlim_extent_virtual */ H5O_virtual_space_status_t source_space_status; /* Extent patching status of source_select */ H5O_virtual_space_status_t virtual_space_status; /* Extent patching status of virtual_select */ diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 575de9c..8f400cf 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1676,6 +1676,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, layout.storage.u.virt.list[layout.storage.u.virt.list_nused].unlim_extent_virtual = HSIZE_UNDEF; layout.storage.u.virt.list[layout.storage.u.virt.list_nused].clip_size_source = HSIZE_UNDEF; layout.storage.u.virt.list[layout.storage.u.virt.list_nused].clip_size_virtual = HSIZE_UNDEF; + layout.storage.u.virt.list[layout.storage.u.virt.list_nused].clip_size_virtual_incl_trail = HSIZE_UNDEF; layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_space_status = H5O_VIRTUAL_STATUS_USER; layout.storage.u.virt.list[layout.storage.u.virt.list_nused].virtual_space_status = H5O_VIRTUAL_STATUS_USER; diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 81306c9..6bff292 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -9741,8 +9741,8 @@ done: REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_hyper_get_clip_extent(const H5S_t *clip_space, - const H5S_t *match_space, hsize_t *clip_space_unlim_extent) +H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, + hsize_t *clip_size, hsize_t *clip_size_incl_trail) { const H5S_hyper_sel_t *clip_hslab; /* Convenience pointer to hyperslab info */ const H5S_hyper_sel_t *match_hslab; /* Convenience pointer to hyperslab info */ @@ -9759,7 +9759,7 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, HDassert(match_space); match_hslab = match_space->select.sel_info.hslab; HDassert(match_space); - HDassert(clip_space_unlim_extent); + HDassert(clip_size); HDassert(clip_hslab->unlim_dim >= 0); HDassert(match_hslab->unlim_dim >= 0); HDassert(clip_hslab->num_elem_non_unlim == match_hslab->num_elem_non_unlim); @@ -9767,17 +9767,25 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, /* Calculate number of slices */ num_slices = match_space->select.num_elem / match_hslab->num_elem_non_unlim; - if(num_slices == 0) - *clip_space_unlim_extent = 0; + if(num_slices == 0) { + *clip_size = 0; + if(clip_size_incl_trail) { + HDassert(0 && "Checking code coverage..."); //VDSINC + *clip_size_incl_trail = clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start; + } //VDSINC + } /* end if */ else if(clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block == H5S_UNLIMITED) { - HDassert(0 && "Checking code coverage..."); //VDSINC /* Unlimited block, just set the extent large enough for the block size * to match num_slices */ HDassert(clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].count == (hsize_t)1); - *clip_space_unlim_extent = + *clip_size = clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start + num_slices; + if(clip_size_incl_trail) { + HDassert(0 && "Checking code coverage..."); //VDSINC + *clip_size_incl_trail = *clip_size; + } //VDSINC } /* end if */ else { /* Unlimited count, need to match extent so a block (possibly) gets cut @@ -9793,20 +9801,34 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, if(rem_slices > 0) { HDassert(0 && "Checking code coverage..."); //VDSINC - /* Must end extent in middle of partial block */ - *clip_space_unlim_extent = + /* Must end extent in middle of partial block (or beginning of empty + * block if include_trailing_space and rem_slices == 0) */ + *clip_size = clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start + (count * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride) + rem_slices; - } //VDSINC - else + if(clip_size_incl_trail) { + HDassert(0 && "Checking code coverage..."); //VDSINC + *clip_size_incl_trail = *clip_size; + } //VDSINC + } /* end if */ + else { /* End extent at end of last block */ - *clip_space_unlim_extent = + *clip_size = clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start + ((count - (hsize_t)1) * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride) + clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block; + if(clip_size_incl_trail) { + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Include gap after last block */ + *clip_size_incl_trail = + clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start + + (count + * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride); + } //VDSINC + } /* end else */ } /* end else */ FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index ebfa88e..2900839 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -269,7 +269,8 @@ H5_DLL herr_t H5S_hyper_denormalize_offset(H5S_t *space, const hssize_t *old_off H5_DLL herr_t H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size); H5_DLL herr_t H5S_hyper_clip_to_extent(H5S_t *space); H5_DLL herr_t H5S_hyper_get_clip_extent(const H5S_t *clip_space, - const H5S_t *match_space, hsize_t *clip_space_unlim_extent); + const H5S_t *match_space, hsize_t *clip_size, + hsize_t *clip_size_incl_trail); /* Operations on selection iterators */ H5_DLL herr_t H5S_select_iter_init(H5S_sel_iter_t *iter, const H5S_t *space, size_t elmt_size); -- cgit v0.12 From c1e74850e7961cf8fe29a52e041650d74cc97ebf Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 30 Apr 2015 12:29:25 -0500 Subject: [svn-r26984] Add support for unlimited selection being clipped in the middle of a block. Add tests for this (pure selection tests, needs testing with VDS). Various bug fixes. Tested: ummon --- src/H5Shyper.c | 61 ++++++++++++++++++++++++++++++++++++++++------------------ src/H5Spkg.h | 6 +++++- test/tselect.c | 33 +++++++++++++++---------------- 3 files changed, 62 insertions(+), 38 deletions(-) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 6bff292..9b854c0 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -6711,9 +6711,9 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Save unlim_dim */ space->select.sel_info.hslab->unlim_dim = unlim_dim; - /* Initialize unlim_dim_clip_size to H5S_UNLIMITED so the selection is + /* Initialize unlim_dim_clip_size to HSSIZET_MIN so the selection is * clipped by H5S__hyper_clip_unlim() no matter what the extent is */ - space->select.sel_info.hslab->unlim_dim_clip_size = H5S_UNLIMITED; + space->select.sel_info.hslab->unlim_dim_clip_size = HSSIZET_MIN; /* Indicate that the dimension information is valid */ space->select.sel_info.hslab->diminfo_valid = TRUE; @@ -6736,11 +6736,6 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, space->select.sel_info.hslab->num_elem_non_unlim *= (opt_count[u] * opt_block[u]); } /* end for */ - /* Initialize unlim_dim_clip_size to H5S_UNLIMITED so the selection - * is clipped by H5S__hyper_clip_to_extent() no matter what the - * extent is */ - space->select.sel_info.hslab->unlim_dim_clip_size = H5S_UNLIMITED; - /* Set opt_diminfo or span tree based on extent */ if(H5S_hyper_clip_to_extent(space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't set selection based on extent") @@ -7381,10 +7376,10 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Save unlim_dim */ space->select.sel_info.hslab->unlim_dim = unlim_dim; - /* Initialize unlim_dim_clip_size to H5S_UNLIMITED so the selection is + /* Initialize unlim_dim_clip_size to HSSIZET_MIN so the selection is * clipped by H5S__hyper_clip_to_extent() no matter what the extent is */ - space->unlim_dim_clip_size = H5S_UNLIMITED; + space->unlim_dim_clip_size = HSSIZET_MIN; /* Indicate that the dimension information is valid */ space->select.sel_info.hslab->diminfo_valid=TRUE; @@ -9586,7 +9581,8 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) HDassert(hslab->unlim_dim >= 0); /* Check for no need to change size */ - if(clip_size == hslab->unlim_dim_clip_size) + if(((hssize_t)clip_size - space->select.offset[hslab->unlim_dim]) + == hslab->unlim_dim_clip_size) HGOTO_DONE(SUCCEED) /* Free previous spans, if any */ @@ -9623,8 +9619,8 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) /* Calculate actual block size for this clip size */ hslab->opt_diminfo[hslab->unlim_dim].block = (hsize_t)((hssize_t)space->extent.size[hslab->unlim_dim] - - ((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start) - + space->select.offset[hslab->unlim_dim]); + - ((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start + + space->select.offset[hslab->unlim_dim])); /* Calculate number of elements */ space->select.num_elem = hslab->opt_diminfo[hslab->unlim_dim].block @@ -9636,15 +9632,16 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) else { HDassert(hslab->opt_diminfo[hslab->unlim_dim].count == H5S_UNLIMITED); HDassert(hslab->opt_diminfo[hslab->unlim_dim].block != H5S_UNLIMITED); + HDassert((hssize_t)clip_size > space->select.offset[hslab->unlim_dim]); /* Calculate initial count (last block may be partial) */ hslab->opt_diminfo[hslab->unlim_dim].count = - ((hsize_t)((hssize_t)clip_size + (hsize_t)((hssize_t)clip_size - ((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start + space->select.offset[hslab->unlim_dim]) + (hssize_t)hslab->opt_diminfo[hslab->unlim_dim].stride - (hssize_t)1) - / hslab->opt_diminfo[hslab->unlim_dim].stride); + / hslab->opt_diminfo[hslab->unlim_dim].stride; HDassert(hslab->opt_diminfo[hslab->unlim_dim].count > (hsize_t)0); /* Calculate number of elements */ @@ -9655,12 +9652,37 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) /* Check if last block is partial */ if(((hslab->opt_diminfo[hslab->unlim_dim].stride * (hslab->opt_diminfo[hslab->unlim_dim].count - (hsize_t)1)) - + hslab->opt_diminfo[hslab->unlim_dim].block - (hsize_t)1) + + hslab->opt_diminfo[hslab->unlim_dim].block) > ((hsize_t)((hssize_t)clip_size - - (hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start - + space->select.offset[hslab->unlim_dim]))) { + - ((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start + + space->select.offset[hslab->unlim_dim])))) { + hsize_t start[H5S_MAX_RANK]; + hsize_t block[H5S_MAX_RANK]; + unsigned i; + /* Last block is partial, need to construct compound selection */ - HDassert(0 && "Not yet implemented...");//VDSINC + /* Fill start with zeros */ + HDmemset(start, 0, sizeof(start)); + + /* Set block to clip_size in unlimited dimension, H5S_MAX_SIZE in + * others so only unlimited dimension is clipped */ + for(i = 0; i < space->extent.rank; i++) + if((int)i == hslab->unlim_dim) + block[i] = (hsize_t)((hssize_t)clip_size + - space->select.offset[hslab->unlim_dim]); + else + block[i] = H5S_MAX_SIZE; + + /* Generate span tree in selection */ + if(H5S_hyper_generate_spans(space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to generate span tree") + + /* Indicate that the regular dimensions are no longer valid */ + hslab->diminfo_valid = FALSE; + + /* "And" selection with calculate block to perform clip operation */ + if(H5S_generate_hyperslab(space, H5S_SELECT_AND, start, _ones, _ones, block) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs") } /* end if */ else /* Last block is complete, simply mark that opt_diminfo is valid */ @@ -9668,7 +9690,8 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) } /* end else */ /* Save clip size */ - hslab->unlim_dim_clip_size = clip_size; + hslab->unlim_dim_clip_size = (hssize_t)clip_size + - space->select.offset[hslab->unlim_dim]; done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Spkg.h b/src/H5Spkg.h index 226edf1..77ca954 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -55,6 +55,10 @@ * and 'size' callbacks for places to change when updating this. */ #define H5O_SDSPACE_VERSION_LATEST H5O_SDSPACE_VERSION_2 +/* Maximum dimension size (highest value that is not a special value e.g. + * H5S_UNLIMITED) */ +#define H5S_MAX_SIZE ((hsize_t)(hssize_t)(-2)) + /* * Dataspace extent information @@ -124,7 +128,7 @@ typedef struct { * contains H5S_UNLIMITED in the count or block of the unlimited * dimension (if any). */ int unlim_dim; /* Dimension where selection is unlimited, or -1 if none */ - hsize_t unlim_dim_clip_size; /* Size to which the selection is clipped in unlimited dimension */ + hssize_t unlim_dim_clip_size; /* Size to which the selection is clipped in unlimited dimension */ hsize_t num_elem_non_unlim; /* # of elements in a "slice" excluding the unlimited dimension */ H5S_hyper_span_info_t *span_lst; /* List of hyperslab span information */ } H5S_hyper_sel_t; diff --git a/test/tselect.c b/test/tselect.c index df67ff6..5190223 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -13375,7 +13375,6 @@ test_hyper_unlim(void) if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) ERROR("H5Sget_select_hyper_blocklist"); -#if 0 //VDSINC /* Set offset of selection */ ret = H5Soffset_simple(sid, offset); CHECK(ret, FAIL, "H5Soffset_simple"); @@ -13393,10 +13392,10 @@ test_hyper_unlim(void) CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); /* Verify blocklist */ - eblock1[1] = 1; - eblock1[4] = 6; - eblock2[1] = 1; - eblock2[4] = 6; + eblock1[1] = 2; + eblock1[4] = 7; + eblock2[1] = 2; + eblock2[4] = 7; if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) ERROR("H5Sget_select_hyper_blocklist"); @@ -13408,9 +13407,9 @@ test_hyper_unlim(void) ERROR("H5Sget_select_hyper_blocklist"); /* Reset offset of selection */ - ret = H5Soffset_simple(sid, NULL); + offset[1] = (hssize_t)0; + ret = H5Soffset_simple(sid, offset); CHECK(ret, FAIL, "H5Soffset_simple"); -#endif /* * Now try with multiple blocks in unlimited dimension @@ -13454,7 +13453,6 @@ test_hyper_unlim(void) if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) ERROR("H5Sget_select_hyper_blocklist"); -#if 0 //VDSINC /* Shrink dataspace */ dims[1] = 3; ret = H5Sset_extent_simple(sid, 3, dims, mdims); @@ -13476,7 +13474,6 @@ test_hyper_unlim(void) eblock1[4] = 2; if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) ERROR("H5Sget_select_hyper_blocklist"); -#endif //VDSINC /* Extend dataspace */ dims[1] = 4; @@ -13521,7 +13518,6 @@ test_hyper_unlim(void) if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) ERROR("H5Sget_select_hyper_blocklist"); -#if 0 //VDSINC /* Extend dataspace */ dims[1] = 6; ret = H5Sset_extent_simple(sid, 3, dims, mdims); @@ -13552,6 +13548,7 @@ test_hyper_unlim(void) ERROR("H5Sget_select_hyper_blocklist"); /* Set offset of selection */ + offset[1] = (hssize_t)-1; ret = H5Soffset_simple(sid, offset); CHECK(ret, FAIL, "H5Soffset_simple"); @@ -13568,10 +13565,10 @@ test_hyper_unlim(void) CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); /* Verify blocklist */ - eblock1[1] = 1; - eblock1[4] = 2; - eblock2[1] = 4; - eblock2[4] = 5; + eblock1[1] = 2; + eblock1[4] = 3; + eblock2[1] = 5; + eblock2[4] = 6; if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) ERROR("H5Sget_select_hyper_blocklist"); @@ -13600,15 +13597,15 @@ test_hyper_unlim(void) CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); /* Verify blocklist */ - eblock1[1] = 5; - eblock1[4] = 5; + eblock1[1] = 2; + eblock1[4] = 2; if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) ERROR("H5Sget_select_hyper_blocklist"); /* Reset offset of selection */ - ret = H5Soffset_simple(sid, NULL); + offset[1] = (hssize_t)0; + ret = H5Soffset_simple(sid, offset); CHECK(ret, FAIL, "H5Soffset_simple"); -#endif //VDSINC //VDSINC write test saving unlim selection to file as region reference -- cgit v0.12 From 95b63ae6852efb6346366aa576457078ceffa240 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 5 May 2015 12:57:44 -0500 Subject: [svn-r27017] Modified Percival example to have different extents for the source datasets for quick testing of H5Pset_virtual_dataspace_bounds. Tested on jam that the source datasets are extended and data is added as intended. --- examples/h5_vds-percival-unlim-maxmin.c | 300 ++++++++++++++++++++++++++++++++ 1 file changed, 300 insertions(+) create mode 100644 examples/h5_vds-percival-unlim-maxmin.c diff --git a/examples/h5_vds-percival-unlim-maxmin.c b/examples/h5_vds-percival-unlim-maxmin.c new file mode 100644 index 0000000..2c2c6dd --- /dev/null +++ b/examples/h5_vds-percival-unlim-maxmin.c @@ -0,0 +1,300 @@ +/************************************************************ + + This example illustrates the concept of the virtual dataset. + Percival use case. Every fifth 10x10 plane in VDS is stored in + the corresponding 3D unlimited dataset. + There are 4 source datasets total. + Each of the source datasets is extended to different sizes. + VDS access property can be used to get max and min extent. + This file is intended for use with HDF5 Library version 1.10 + + ************************************************************/ +/* EIP Add link to the picture */ + +#include "hdf5.h" +#include +#include + +#define VFILE "vds-percival-unlim-maxmin.h5" +#define DATASET "VDS-Percival-unlim-maxmin" +#define VDSDIM0 H5S_UNLIMITED +#define VDSDIM1 10 +#define VDSDIM2 10 + +#define DIM0 H5S_UNLIMITED +#define DIM0_1 4 /* Initial size of the source datasets */ +#define DIM1 10 +#define DIM2 10 +#define RANK 3 +#define PLANE_STRIDE 4 + +const char *SRC_FILE[] = { + "a.h5", + "b.h5", + "c.h5", + "d.h5" +}; + +const char *SRC_DATASET[] = { + "A", + "B", + "C", + "D" +}; + +int +main (void) +{ + hid_t vfile, file, src_space, mem_space, vspace, + vdset, dset; /* Handles */ + hid_t dcpl, dapl; + herr_t status; + hsize_t vdsdims[3] = {4*DIM0_1, VDSDIM1, VDSDIM2}, + vdsdims_max[3] = {VDSDIM0, VDSDIM1, VDSDIM2}, + dims[3] = {DIM0_1, DIM1, DIM2}, + memdims[3] = {DIM0_1, DIM1, DIM2}, + extdims[3] = {0, DIM1, DIM2}, /* Dimensions of the extended source datasets */ + chunk_dims[3] = {DIM0_1, DIM1, DIM2}, + dims_max[3] = {DIM0, DIM1, DIM2}, + vdsdims_out[3], + vdsdims_max_out[3], + start[3], /* Hyperslab parameters */ + stride[3], + count[3], + src_count[3], + block[3]; + hsize_t start_out[3], /* Hyperslab parameter out */ + stride_out[3], + count_out[3], + block_out[3]; + int i, j; + H5D_layout_t layout; /* Storage layout */ + size_t num_map; /* Number of mappings */ + ssize_t len; /* Length of the string; also a return value */ + char *filename; + char *dsetname; + int wdata[DIM0_1*DIM1*DIM2]; + + /* + * Create source files and datasets. This step is optional. + */ + for (i=0; i < PLANE_STRIDE; i++) { + /* + * Initialize data for i-th source dataset. + */ + for (j = 0; j < DIM0_1*DIM1*DIM2; j++) wdata[j] = i+1; + + /* + * Create the source files and datasets. Write data to each dataset and + * close all resources. + */ + + file = H5Fcreate (SRC_FILE[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + src_space = H5Screate_simple (RANK, dims, dims_max); + dcpl = H5Pcreate(H5P_DATASET_CREATE); + status = H5Pset_chunk (dcpl, RANK, chunk_dims); + dset = H5Dcreate (file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT, + dcpl, H5P_DEFAULT); + status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, + wdata); + status = H5Sclose (src_space); + status = H5Pclose (dcpl); + status = H5Dclose (dset); + status = H5Fclose (file); + } + + vfile = H5Fcreate (VFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* Create VDS dataspace. */ + vspace = H5Screate_simple (RANK, vdsdims, vdsdims_max); + + /* Create dataspaces for the source dataset. */ + src_space = H5Screate_simple (RANK, dims, dims_max); + + /* Create VDS creation property */ + dcpl = H5Pcreate (H5P_DATASET_CREATE); + + /* Initialize hyperslab values */ + + start[0] = 0; + start[1] = 0; + start[2] = 0; + stride[0] = PLANE_STRIDE; /* we will select every fifth plane in VDS */ + stride[1] = 1; + stride[2] = 1; + count[0] = H5S_UNLIMITED; + count[1] = 1; + count[2] = 1; + src_count[0] = H5S_UNLIMITED; + src_count[1] = 1; + src_count[2] = 1; + block[0] = 1; + block[1] = DIM1; + block[2] = DIM2; + + /* + * Build the mappings + * + */ + status = H5Sselect_hyperslab (src_space, H5S_SELECT_SET, start, NULL, src_count, block); + for (i=0; i < PLANE_STRIDE; i++) { + status = H5Sselect_hyperslab (vspace, H5S_SELECT_SET, start, stride, count, block); + status = H5Pset_virtual (dcpl, vspace, SRC_FILE[i], SRC_DATASET[i], src_space); + start[0]++; + } + + H5Sselect_none(vspace); + + /* Create a virtual dataset */ + vdset = H5Dcreate (vfile, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, + dcpl, H5P_DEFAULT); + status = H5Sclose (vspace); + status = H5Sclose (src_space); + status = H5Pclose (dcpl); + + /* Let's add data to the source datasets and check new dimensions for VDS */ + /* We will add only one plane to the first source dataset, two planes to the + second one, three to the third, and four to the forth. */ + + for (i=0; i < PLANE_STRIDE; i++) { + /* + * Initialize data for i-th source dataset. + */ + for (j = 0; j < (i+1)*DIM1*DIM2; j++) wdata[j] = 10*(i+1); + + /* + * Open the source files and datasets. Appen data to each dataset and + * close all resources. + */ + + file = H5Fopen (SRC_FILE[i], H5F_ACC_RDWR, H5P_DEFAULT); + dset = H5Dopen (file, SRC_DATASET[i], H5P_DEFAULT); + extdims[0] = DIM0_1+i+1; + status = H5Dset_extent (dset, extdims); + src_space = H5Dget_space (dset); + start[0] = DIM0_1; + start[1] = 0; + start[2] = 0; + count[0] = 1; + count[1] = 1; + count[2] = 1; + block[0] = i+1; + block[1] = DIM1; + block[2] = DIM2; + + memdims[0] = i+1; + mem_space = H5Screate_simple(RANK, memdims, NULL); + status = H5Sselect_hyperslab (src_space, H5S_SELECT_SET, start, NULL, count, block); + status = H5Dwrite (dset, H5T_NATIVE_INT, mem_space, src_space, H5P_DEFAULT, + wdata); + status = H5Sclose (src_space); + status = H5Dclose (dset); + status = H5Fclose (file); + } + + status = H5Dclose (vdset); + status = H5Fclose (vfile); + + /* + * Now we begin the read section of this example. + */ + + /* + * Open file and dataset using the default properties. + */ + vfile = H5Fopen (VFILE, H5F_ACC_RDONLY, H5P_DEFAULT); + + /* + * Open VDS using different access properties to use max or + * min extents depending on the sizes of the underlying datasets + */ + dapl = H5Pcreate (H5P_DATASET_ACCESS); + //status = H5Pset_virtual_dataset_bounds (dapl, H5D_VDS_MAX); + //status = H5Pset_virtual_dataset_bounds (dapl, H5D_VDS_MIN); + vdset = H5Dopen (vfile, DATASET, dapl); + + /* Let's get space of the VDS and its dimension; we should get 32(16)x10x10 */ + vspace = H5Dget_space (vdset); + H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out); + printf ("VDS dimensions: "); + for (i=0; i Date: Tue, 5 May 2015 13:07:15 -0500 Subject: [svn-r27018] Fixed a comment for the expected VDS sizes. --- examples/h5_vds-percival-unlim-maxmin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/h5_vds-percival-unlim-maxmin.c b/examples/h5_vds-percival-unlim-maxmin.c index 2c2c6dd..c89dbac 100644 --- a/examples/h5_vds-percival-unlim-maxmin.c +++ b/examples/h5_vds-percival-unlim-maxmin.c @@ -213,7 +213,7 @@ main (void) //status = H5Pset_virtual_dataset_bounds (dapl, H5D_VDS_MIN); vdset = H5Dopen (vfile, DATASET, dapl); - /* Let's get space of the VDS and its dimension; we should get 32(16)x10x10 */ + /* Let's get space of the VDS and its dimension; we should get 32(or 17)x10x10 */ vspace = H5Dget_space (vdset); H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out); printf ("VDS dimensions: "); -- cgit v0.12 From 8fe3dfbf9410ad5acabeaeb187bfb5f7b489042e Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 5 May 2015 15:15:40 -0500 Subject: [svn-r27022] Add new functions H5Pset_virtual_dataspace_bounds and H5Pget_virtual_dataspace_bounds. Minor refactor of dataset initialization code to make this cleaner. Update h5_vds-percival-unlim-maxmin.c Other minor fixes/cleanup. Tested: ummon --- examples/h5_vds-percival-unlim-maxmin.c | 31 ++++--- src/H5Dint.c | 2 +- src/H5Dlayout.c | 126 ++++++++++--------------- src/H5Dpkg.h | 2 + src/H5Dprivate.h | 1 + src/H5Dpublic.h | 7 ++ src/H5Dvirtual.c | 69 +++++++------- src/H5Olayout.c | 2 +- src/H5Oprivate.h | 2 +- src/H5Pdapl.c | 160 +++++++++++++++++++++++++++++++- src/H5Ppublic.h | 3 + src/H5Shyper.c | 21 +---- 12 files changed, 283 insertions(+), 143 deletions(-) diff --git a/examples/h5_vds-percival-unlim-maxmin.c b/examples/h5_vds-percival-unlim-maxmin.c index c89dbac..4640b94 100644 --- a/examples/h5_vds-percival-unlim-maxmin.c +++ b/examples/h5_vds-percival-unlim-maxmin.c @@ -209,18 +209,27 @@ main (void) * min extents depending on the sizes of the underlying datasets */ dapl = H5Pcreate (H5P_DATASET_ACCESS); - //status = H5Pset_virtual_dataset_bounds (dapl, H5D_VDS_MAX); - //status = H5Pset_virtual_dataset_bounds (dapl, H5D_VDS_MIN); - vdset = H5Dopen (vfile, DATASET, dapl); - - /* Let's get space of the VDS and its dimension; we should get 32(or 17)x10x10 */ - vspace = H5Dget_space (vdset); - H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out); - printf ("VDS dimensions: "); - for (i=0; ishared->layout.ops->construct)(file, new_dset) < 0) + if(new_dset->shared->layout.ops->construct && (new_dset->shared->layout.ops->construct)(file, new_dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to construct layout information") /* Update the dataset's object header info. */ diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index 87e1bc8..cb8b27d 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -391,85 +391,55 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t if(H5D_CHUNKED == dataset->shared->layout.type) dataset->shared->layout.u.chunk.ndims++; - switch(dataset->shared->layout.type) { - case H5D_CONTIGUOUS: - { - hsize_t tmp_size; /* Temporary holder for raw data size */ - size_t tmp_sieve_buf_size; /* Temporary holder for sieve buffer size */ - - /* Compute the size of the contiguous storage for versions of the - * layout message less than version 3 because versions 1 & 2 would - * truncate the dimension sizes to 32-bits of information. - QAK 5/26/04 - */ - if(dataset->shared->layout.version < 3) { - hssize_t snelmts; /* Temporary holder for number of elements in dataspace */ - hsize_t nelmts; /* Number of elements in dataspace */ - size_t dt_size; /* Size of datatype */ - - /* Retrieve the number of elements in the dataspace */ - if((snelmts = H5S_GET_EXTENT_NPOINTS(dataset->shared->space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve number of elements in dataspace") - nelmts = (hsize_t)snelmts; - - /* Get the datatype's size */ - if(0 == (dt_size = H5T_GET_SIZE(dataset->shared->type))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve size of datatype") - - /* Compute the size of the dataset's contiguous storage */ - tmp_size = nelmts * dt_size; - - /* Check for overflow during multiplication */ - if(nelmts != (tmp_size / dt_size)) - HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed") - - /* Assign the dataset's contiguous storage size */ - dataset->shared->layout.storage.u.contig.size = tmp_size; - } else - tmp_size = dataset->shared->layout.storage.u.contig.size; - - /* Get the sieve buffer size for the file */ - tmp_sieve_buf_size = H5F_SIEVE_BUF_SIZE(dataset->oloc.file); - - /* Adjust the sieve buffer size to the smaller one between the dataset size and the buffer size - * from the file access property. (SLU - 2012/3/30) */ - if(tmp_size < tmp_sieve_buf_size) - dataset->shared->cache.contig.sieve_buf_size = tmp_size; - else - dataset->shared->cache.contig.sieve_buf_size = tmp_sieve_buf_size; - } - break; - - case H5D_CHUNKED: - /* Initialize the chunk cache for the dataset */ - if(H5D__chunk_init(dataset->oloc.file, dxpl_id, dataset, dapl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize chunk cache") - break; - - case H5D_COMPACT: - break; - - case H5D_VIRTUAL: - { - size_t i; - - HDassert(dataset->shared->layout.storage.u.virt.list || (dataset->shared->layout.storage.u.virt.list_nused == 0)); - - /* Patch the virtual selection dataspaces if necessary */ - for(i = 0; i < dataset->shared->layout.storage.u.virt.list_nused; i++) { - if(dataset->shared->layout.storage.u.virt.list[i].virtual_space_status != H5O_VIRTUAL_STATUS_CORRECT) { - if(H5S_extent_copy(dataset->shared->layout.storage.u.virt.list[i].virtual_select, dataset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") - dataset->shared->layout.storage.u.virt.list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; - } /* end if */ - } /* end for */ - } /* end block */ - break; + if(H5D_CONTIGUOUS == dataset->shared->layout.type) { + hsize_t tmp_size; /* Temporary holder for raw data size */ + size_t tmp_sieve_buf_size; /* Temporary holder for sieve buffer size */ + + /* Compute the size of the contiguous storage for versions of the + * layout message less than version 3 because versions 1 & 2 would + * truncate the dimension sizes to 32-bits of information. - QAK 5/26/04 + */ + if(dataset->shared->layout.version < 3) { + hssize_t snelmts; /* Temporary holder for number of elements in dataspace */ + hsize_t nelmts; /* Number of elements in dataspace */ + size_t dt_size; /* Size of datatype */ + + /* Retrieve the number of elements in the dataspace */ + if((snelmts = H5S_GET_EXTENT_NPOINTS(dataset->shared->space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve number of elements in dataspace") + nelmts = (hsize_t)snelmts; + + /* Get the datatype's size */ + if(0 == (dt_size = H5T_GET_SIZE(dataset->shared->type))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve size of datatype") + + /* Compute the size of the dataset's contiguous storage */ + tmp_size = nelmts * dt_size; + + /* Check for overflow during multiplication */ + if(nelmts != (tmp_size / dt_size)) + HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed") + + /* Assign the dataset's contiguous storage size */ + dataset->shared->layout.storage.u.contig.size = tmp_size; + } /* end if */ + else + tmp_size = dataset->shared->layout.storage.u.contig.size; + + /* Get the sieve buffer size for the file */ + tmp_sieve_buf_size = H5F_SIEVE_BUF_SIZE(dataset->oloc.file); + + /* Adjust the sieve buffer size to the smaller one between the dataset size and the buffer size + * from the file access property. (SLU - 2012/3/30) */ + if(tmp_size < tmp_sieve_buf_size) + dataset->shared->cache.contig.sieve_buf_size = tmp_size; + else + dataset->shared->cache.contig.sieve_buf_size = tmp_sieve_buf_size; + } /* end if */ - case H5D_LAYOUT_ERROR: - case H5D_NLAYOUTS: - default: - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unknown storage method") - } /* end switch */ /*lint !e788 All appropriate cases are covered */ + /* Initialize the layout information for the new dataset */ + if(dataset->shared->layout.ops->init && (dataset->shared->layout.ops->init)(dataset->oloc.file, dxpl_id, dataset, dapl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize layout information") done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 978936b..d3cea4c 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -666,6 +666,8 @@ H5_DLL herr_t H5D__virtual_copy(H5F_t *f_src, const H5O_storage_virtual_t *storage_src, H5F_t *f_dst, H5O_storage_virtual_t *storage_dst, H5T_t *dt_src, H5O_copy_t *cpy_info, hid_t dxpl_id); +H5_DLL herr_t H5D__virtual_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, + hid_t dapl_id); H5_DLL hbool_t H5D__virtual_is_space_alloc(const H5O_storage_t *storage); /* Functions that operate on EFL (External File List)*/ diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index 5f588fd..a89f937 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -52,6 +52,7 @@ #define H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME "rdcc_nslots" /* Size of raw data chunk cache(slots) */ #define H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME "rdcc_nbytes" /* Size of raw data chunk cache(bytes) */ #define H5D_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */ +#define H5D_ACS_VDS_BOUNDS_NAME "vds_bounds" /* VDS bounds option */ /* ======== Data transfer properties ======== */ #define H5D_XFER_MAX_TEMP_BUF_NAME "max_temp_buf" /* Maximum temp buffer size */ diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index a08ea3d..e4b1311 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -94,6 +94,13 @@ typedef enum H5D_fill_value_t { H5D_FILL_VALUE_USER_DEFINED =2 } H5D_fill_value_t; +/* Values for VDS bounds option */ +typedef enum H5D_vds_bounds_t { + H5D_VDS_ERROR = -1, + H5D_VDS_MAX = 0, + H5D_VDS_MIN = 1 +} H5D_vds_bounds_t; + /********************/ /* Public Variables */ /********************/ diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 40fe7ac..109078f 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -36,6 +36,7 @@ #include "H5Fprivate.h" /* Files */ #include "H5Gprivate.h" /* Groups */ #include "H5HGprivate.h" /* Global Heaps */ +#include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Oprivate.h" /* Object headers */ #include "H5Sprivate.h" /* Dataspaces */ @@ -56,7 +57,6 @@ /********************/ /* Layout operation callbacks */ -static herr_t H5D__virtual_construct(H5F_t *f, H5D_t *dset); static herr_t H5D__virtual_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *cm); @@ -79,8 +79,8 @@ static herr_t H5D__virtual_open_source_dset(const H5D_t *vdset, /* Contiguous storage layout I/O ops */ const H5D_layout_ops_t H5D_LOPS_VIRTUAL[1] = {{ - H5D__virtual_construct, NULL, + H5D__virtual_init, H5D__virtual_is_space_alloc, H5D__virtual_io_init, H5D__virtual_read, @@ -348,6 +348,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) HDassert(dset); storage = &dset->shared->layout.storage.u.virt; HDassert(dset->shared->layout.storage.type == H5D_VIRTUAL); + HDassert((storage->bounds == H5D_VDS_MAX) || (storage->bounds == H5D_VDS_MIN)); /* Get rank of VDS */ if((rank = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0) @@ -383,7 +384,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) /* Check if we are setting extent by maximum or minimum of * mappings */ - if(storage->set_extent_max) { + if(storage->bounds == H5D_VDS_MAX) { /* Check if the source extent in the unlimited dimension * changed since the last time the VDS extent/mapping * was updated */ @@ -427,7 +428,6 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) clip_size_incl_trail = storage->list[i].clip_size_virtual_incl_trail; } //VDSINC else { - HDassert(0 && "Checking code coverage..."); //VDSINC /* Get size that virtual selection would be clipped to * to match size of source selection. Also get the clip * size including the trailing space (gap between @@ -479,7 +479,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) /* If we did not change the VDS dimensions and we are setting the extent by * maximum, there is nothing more to update */ - if(changed || !storage->set_extent_max) { + if(changed || (storage->bounds == H5D_VDS_MIN)) { /* Update VDS extent */ if(changed) if(H5S_set_extent(dset->shared->space, new_dims) < 0) @@ -500,15 +500,13 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") /* Check if we are setting extent by the minimum of mappings */ - if(!storage->set_extent_max) { + if(storage->bounds == H5D_VDS_MIN) { /* Clip virtual selection to extent (only necessary if the * extent changed, otherwise it will already be clipped to * the extent) */ - if(changed) { - HDassert(0 && "Checking code coverage..."); //VDSINC + if(changed) if(H5S_hyper_clip_to_extent(storage->list[i].virtual_select)) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") - } //VDSINC /* Check if the virtual extent in the unlimited dimension * changed since the last time the VDS extent/mapping was @@ -520,7 +518,6 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) clip_size = storage->list[i].clip_size_source; } //VDSINC else { - HDassert(0 && "Checking code coverage..."); //VDSINC /* Get size that source selection will be clipped to to * match size of virtual selection */ if(H5S_hyper_get_clip_extent(storage->list[i].source_select, storage->list[i].virtual_select, &clip_size, NULL) < 0) @@ -638,38 +635,52 @@ done: /*------------------------------------------------------------------------- - * Function: H5D__virtual_construct + * Function: H5D__virtual_init * - * Purpose: Constructs new virtual layout information for dataset + * Purpose: Initialize the virtual layout information for a dataset. + * This is called when the dataset is initialized. * * Return: Non-negative on success/Negative on failure * * Programmer: Neil Fortner - * Monday, February 2, 2015 + * Thursday, April 30, 2015 * *------------------------------------------------------------------------- */ -static herr_t -H5D__virtual_construct(H5F_t UNUSED *f, H5D_t *dset) +herr_t +H5D__virtual_init(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5D_t *dset, + hid_t dapl_id) { - size_t i; - herr_t ret_value = SUCCEED; + H5P_genplist_t *dapl; /* Data access property list object pointer */ + size_t i; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC + FUNC_ENTER_PACKAGE + /* Sanity check */ + HDassert(dset); HDassert(dset->shared->layout.storage.u.virt.list || (dset->shared->layout.storage.u.virt.list_nused == 0)); /* Patch the virtual selection dataspaces */ for(i = 0; i < dset->shared->layout.storage.u.virt.list_nused; i++) { - HDassert(dset->shared->layout.storage.u.virt.list[i].virtual_space_status == H5O_VIRTUAL_STATUS_USER); - if(H5S_extent_copy(dset->shared->layout.storage.u.virt.list[i].virtual_select, dset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") - dset->shared->layout.storage.u.virt.list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; + if(dset->shared->layout.storage.u.virt.list[i].virtual_space_status != H5O_VIRTUAL_STATUS_CORRECT) { + if(H5S_extent_copy(dset->shared->layout.storage.u.virt.list[i].virtual_select, dset->shared->space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") + dset->shared->layout.storage.u.virt.list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; + } /* end if */ } /* end for */ + /* Get dataset access property list */ + if(NULL == (dapl = (H5P_genplist_t *)H5I_object(dapl_id))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for dapl ID") + + /* Get bounds option */ + if(H5P_get(dapl, H5D_ACS_VDS_BOUNDS_NAME, &dset->shared->layout.storage.u.virt.bounds) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get data cache number of slots") + done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D__virtual_construct() */ +} /* end H5D__virtual_init() */ /*------------------------------------------------------------------------- @@ -759,11 +770,7 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, HDassert(file_space); storage = &io_info->dset->shared->layout.storage.u.virt; - - /* Update VDS extent due to unlimited selections */ - /* Don't call if there is no unlimited selection? VDSINC */ - if(H5D__virtual_set_extent_unlim(io_info->dset, io_info->dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update virtual dataset extent") + HDassert((storage->bounds == H5D_VDS_MAX) || (storage->bounds == H5D_VDS_MIN)); /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) { @@ -871,11 +878,7 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, HDassert(file_space); storage = &io_info->dset->shared->layout.storage.u.virt; - - /* Update VDS extent due to unlimited selections */ - /* Don't call if there is no unlimited selection? VDSINC */ - if(H5D__virtual_set_extent_unlim(io_info->dset, io_info->dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update virtual dataset extent") + HDassert((storage->bounds == H5D_VDS_MAX) || (storage->bounds == H5D_VDS_MIN)); /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) { diff --git a/src/H5Olayout.c b/src/H5Olayout.c index cf5b3d2..9f1afb3 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -251,7 +251,7 @@ H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, mesg->storage.u.virt.list_nused = 0; mesg->storage.u.virt.list = NULL; mesg->storage.u.virt.list_nalloc = 0; - mesg->storage.u.virt.set_extent_max = TRUE; + mesg->storage.u.virt.bounds = H5D_VDS_ERROR; /* Decode heap block if it exists */ if(mesg->storage.u.virt.serial_list_hobjid.addr != HADDR_UNDEF) { diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 0211093..fcb0649 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -450,7 +450,7 @@ typedef struct H5O_storage_virtual_t { /* Not stored */ size_t list_nalloc; /* Number of slots allocated */ hsize_t min_dims[H5S_MAX_RANK]; /* Minimum extent of VDS (maximum of all non-unlimited selection bounds) */ - hbool_t set_extent_max; /* Whether we set the extent by the maximum (TRUE) or minimum (FALSE) of unlimited selections */ + H5D_vds_bounds_t bounds; /* Whether we set the extent by the maximum (TRUE) or minimum (FALSE) of unlimited selections */ } H5O_storage_virtual_t; typedef struct H5O_storage_t { diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index 93d16bb..fbd83a6 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -61,6 +61,11 @@ #define H5D_ACS_PREEMPT_READ_CHUNKS_DEF H5D_CHUNK_CACHE_W0_DEFAULT #define H5D_ACS_PREEMPT_READ_CHUNKS_ENC H5P__encode_double #define H5D_ACS_PREEMPT_READ_CHUNKS_DEC H5P__decode_double +/* Definitions for VDS bounds option */ +#define H5D_ACS_VDS_BOUNDS_SIZE sizeof(H5D_vds_bounds_t) +#define H5D_ACS_VDS_BOUNDS_DEF H5D_VDS_MAX +#define H5D_ACS_VDS_BOUNDS_ENC H5P__dacc_vds_bounds_enc +#define H5D_ACS_VDS_BOUNDS_DEC H5P__dacc_vds_bounds_dec /******************/ /* Local Typedefs */ @@ -79,6 +84,10 @@ /* Property class callbacks */ static herr_t H5P__dacc_reg_prop(H5P_genclass_t *pclass); +/* Property list callbacks */ +static herr_t H5P__dacc_vds_bounds_enc(const void *value, void **pp, size_t *size); +static herr_t H5P__dacc_vds_bounds_dec(const void **pp, void *value); + /*********************/ /* Package Variables */ @@ -133,6 +142,7 @@ H5P__dacc_reg_prop(H5P_genclass_t *pclass) size_t rdcc_nslots = H5D_ACS_DATA_CACHE_NUM_SLOTS_DEF; /* Default raw data chunk cache # of slots */ size_t rdcc_nbytes = H5D_ACS_DATA_CACHE_BYTE_SIZE_DEF; /* Default raw data chunk cache # of bytes */ double rdcc_w0 = H5D_ACS_PREEMPT_READ_CHUNKS_DEF; /* Default raw data chunk cache dirty ratio */ + H5D_vds_bounds_t bounds_option = H5D_ACS_VDS_BOUNDS_DEF; /* Default VDS bounds option */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -152,6 +162,12 @@ H5P__dacc_reg_prop(H5P_genclass_t *pclass) NULL, NULL, NULL, H5D_ACS_PREEMPT_READ_CHUNKS_ENC, H5D_ACS_PREEMPT_READ_CHUNKS_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + /* Register the VDS bounds option */ + if(H5P_register_real(pclass, H5D_ACS_VDS_BOUNDS_NAME, H5D_ACS_VDS_BOUNDS_SIZE, &bounds_option, + NULL, NULL, NULL, H5D_ACS_VDS_BOUNDS_ENC, H5D_ACS_VDS_BOUNDS_DEC, + NULL, NULL, NULL, NULL) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dacc_reg_prop() */ @@ -282,5 +298,147 @@ H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots, size_t *rdcc_nbytes, doub done: FUNC_LEAVE_API(ret_value) -} +} /* end H5Pget_chunk_cache() */ + + +/*------------------------------------------------------------------------- + * Function: H5Pset_virtual_dataspace_bounds + * + * Purpose: VDSINC + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * May 4, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5Pset_virtual_dataspace_bounds(hid_t plist_id, H5D_vds_bounds_t bounds_option) +{ + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value = SUCCEED; /* return value */ + + FUNC_ENTER_API(FAIL) + + /* Check argument */ + if((bounds_option != H5D_VDS_MAX) && (bounds_option != H5D_VDS_MIN)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid bounds option") + + /* Get the plist structure */ + if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + + /* Update property list */ + if(H5P_set(plist, H5D_ACS_VDS_BOUNDS_NAME, &bounds_option) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Pset_virtual_dataspace_bounds() */ + + +/*------------------------------------------------------------------------- + * Function: H5Pget_virtual_dataspace_bounds + * + * Purpose: VDSINC + * + * Return: Success: H5D_VDS_MAX or H5D_VDS_MIN + * Failure: H5D_VDS_ERROR + * + * Programmer: Neil Fortner + * May 4, 2015 + * + *------------------------------------------------------------------------- + */ +H5D_vds_bounds_t +H5Pget_virtual_dataspace_bounds(hid_t plist_id) +{ + H5P_genplist_t *plist; /* Property list pointer */ + H5D_vds_bounds_t ret_value; /* Return value */ + + FUNC_ENTER_API(H5D_VDS_ERROR) + + /* Get the plist structure */ + if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5D_VDS_ERROR, "can't find object for ID") + + /* Get value from property list */ + if(H5P_get(plist, H5D_ACS_VDS_BOUNDS_NAME, &ret_value) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5D_VDS_ERROR, "unable to set value") + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Pget_virtual_dataspace_bounds() */ + + +/*------------------------------------------------------------------------- + * Function: H5P__dacc_vds_bounds_enc + * + * Purpose: Callback routine which is called whenever the vds bounds + * property in the dataset access property list is encoded. + * + * Return: Success: Non-negative + * Failure: Negative + * + * Programmer: Neil Fortner + * Tuesday, May 5, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5P__dacc_vds_bounds_enc(const void *value, void **_pp, size_t *size) +{ + const H5D_vds_bounds_t *bounds = (const H5D_vds_bounds_t *)value; /* Create local alias for values */ + uint8_t **pp = (uint8_t **)_pp; + + FUNC_ENTER_STATIC_NOERR + + /* Sanity check */ + HDassert(bounds); + HDassert(size); + + if(NULL != *pp) + /* Encode EDC property */ + *(*pp)++ = (uint8_t)*bounds; + + /* Size of EDC property */ + (*size)++; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5P__dacc_vds_bounds_enc() */ + + +/*------------------------------------------------------------------------- + * Function: H5P__dacc_vds_bounds_dec + * + * Purpose: Callback routine which is called whenever the vds bounds + * property in the dataset access property list is encoded. + * + * Return: Success: Non-negative + * Failure: Negative + * + * Programmer: Neil Fortner + * Tuesday, May 5, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5P__dacc_vds_bounds_dec(const void **_pp, void *_value) +{ + H5D_vds_bounds_t *bounds = (H5D_vds_bounds_t *)_value; /* EDC property */ + const uint8_t **pp = (const uint8_t **)_pp; + + FUNC_ENTER_STATIC_NOERR + + /* Sanity checks */ + HDassert(pp); + HDassert(*pp); + HDassert(bounds); + + /* Decode EDC property */ + *bounds = (H5D_vds_bounds_t)*(*pp)++; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* end H5P__dacc_vds_bounds_dec() */ diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index c1c6f17..7932716 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -393,6 +393,9 @@ H5_DLL herr_t H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots/*out*/, size_t *rdcc_nbytes/*out*/, double *rdcc_w0/*out*/); +H5_DLL herr_t H5Pset_virtual_dataspace_bounds(hid_t plist_id, + H5D_vds_bounds_t bounds_option); +H5_DLL H5D_vds_bounds_t H5Pget_virtual_dataspace_bounds(hid_t plist_id); /* Dataset xfer property list (DXPL) routines */ H5_DLL herr_t H5Pset_data_transform(hid_t plist_id, const char* expression); diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 9b854c0..5667cbd 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -1673,20 +1673,9 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection) dst->select.sel_info.hslab->span_lst = H5S_hyper_copy_span(src->select.sel_info.hslab->span_lst); } /* end if */ - /* If there is an unlimited dimension, we must update the selection if the - * extent changed */ - if(dst_hslab->unlim_dim >= 0) { - htri_t extent_equal; - - /* Check if the extent changed */ - if((extent_equal = H5S_extent_equal(src, dst)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "dataspace comparison failed") - - if(!extent_equal) - /* Update selection due to changed extent */ - if(H5S_hyper_clip_to_extent(dst) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") - } /* end if */ + /* If there is an unlimited dimension, we must update the selection */ + if(H5S_hyper_clip_to_extent(dst) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") done: FUNC_LEAVE_NOAPI(ret_value) @@ -9843,14 +9832,12 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, + ((count - (hsize_t)1) * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride) + clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block; - if(clip_size_incl_trail) { - HDassert(0 && "Checking code coverage..."); //VDSINC + if(clip_size_incl_trail) /* Include gap after last block */ *clip_size_incl_trail = clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start + (count * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride); - } //VDSINC } /* end else */ } /* end else */ -- cgit v0.12 From eda6bf097aec520926d91e10319420edef1fc95b Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 5 May 2015 15:41:21 -0500 Subject: [svn-r27024] Modified Percival example to read VDS data. First, the example reads all VDS data, then the data that is in the first source dataset. Tested on jam. --- examples/h5_vds-percival-unlim.c | 79 +++++++++++++++++++++++++++++++++++----- 1 file changed, 69 insertions(+), 10 deletions(-) diff --git a/examples/h5_vds-percival-unlim.c b/examples/h5_vds-percival-unlim.c index eaa83b4..b1acae1 100644 --- a/examples/h5_vds-percival-unlim.c +++ b/examples/h5_vds-percival-unlim.c @@ -64,13 +64,15 @@ main (void) stride_out[3], count_out[3], block_out[3]; - int i, j; + int i, j, k; H5D_layout_t layout; /* Storage layout */ size_t num_map; /* Number of mappings */ ssize_t len; /* Length of the string; also a return value */ char *filename; char *dsetname; int wdata[DIM0_1*DIM1*DIM2]; + int rdata[80][10][10]; + int a_rdata[20][10][10]; /* * Create source files and datasets. This step is optional. @@ -193,15 +195,6 @@ main (void) status = H5Fclose (file); } - /* Let's get space of the VDS and its dimension; we should get 80x10x10 */ - vspace = H5Dget_space (vdset); - H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out); - printf ("VDS dimensions second time \n"); - printf (" Current: "); - for (i=0; i Date: Tue, 5 May 2015 16:35:10 -0500 Subject: [svn-r27025] Enabled compilation and run for the new vds examples for "make installcheck"; added to MANIFET. --- MANIFEST | 2 ++ examples/CMakeLists.txt | 2 ++ examples/CMakeTests.cmake | 6 ++++++ examples/Makefile.am | 8 ++++++-- examples/Makefile.in | 8 ++++++-- examples/run-c-ex.sh.in | 4 ++++ 6 files changed, 26 insertions(+), 4 deletions(-) diff --git a/MANIFEST b/MANIFEST index 1d0e021..c20bae0 100644 --- a/MANIFEST +++ b/MANIFEST @@ -152,6 +152,8 @@ ./examples/h5_vds-eiger.c ./examples/h5_vds-simpleIO.c ./examples/h5_vds-percival.c +./examples/h5_vds-percival-unlim.c +./examples/h5_vds-percival-unlim-maxmin.c ./examples/testh5cc.sh.in ./examples/README diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index f22e355..7add410 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -40,6 +40,8 @@ set (examples h5_vds-eiger h5_vds-simpleIO h5_vds-percival + h5_vds-percival-unlim + h5_vds-percival-unlim-maxmin ) foreach (example ${examples}) diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake index 2d1a828..342bc2e 100644 --- a/examples/CMakeTests.cmake +++ b/examples/CMakeTests.cmake @@ -46,6 +46,12 @@ vds-excalibur.h5 vds-exclim.h5 vds-percival.h5 + vds-percival-unlim.h5 + vds-percival-unlim-maxmin.h5 + a.h5 + b.h5 + c.h5 + d.h5 vds-simpleIO.h5 vds-eiger.h5 ) diff --git a/examples/Makefile.am b/examples/Makefile.am index b67a788..883b99d 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -38,7 +38,8 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_crtatt h5_crtgrp h5_crtdat \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc \ - h5_vds-exclim h5_vds-eiger h5_vds-simpleIO h5_vds-percival + h5_vds-exclim h5_vds-eiger h5_vds-simpleIO h5_vds-percival \ + h5_vds-percival-unlim h5_vds-percival-unlim-maxmin TEST_SCRIPT=testh5cc.sh TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES) @@ -50,7 +51,8 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c \ - h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c h5_vds-percival.c + h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c h5_vds-percival.c \ + h5_vds-percival-unlim.c h5_vds-percival-unlim-maxmin.c @@ -125,6 +127,8 @@ h5_vds-exclim: $(srcdir)/h5_vds-exclim.c h5_vds-eiger: $(srcdir)/h5_vds-eiger.c h5_vds-simpleIO: $(srcdir)/h5_vds-simpleIO.c h5_vds-percival: $(srcdir)/h5_vds-percival.c +h5_vds-percival-unlim: $(srcdir)/h5_vds-percival-unlim.c +h5_vds-percival-unlim-maxmin: $(srcdir)/h5_vds-percival-unlim-maxmin.c if BUILD_SHARED_SZIP_CONDITIONAL LD_LIBRARY_PATH=$(LL_PATH) diff --git a/examples/Makefile.in b/examples/Makefile.in index 9a57439..0840b94 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -616,7 +616,8 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_crtatt h5_crtgrp h5_crtdat \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc \ - h5_vds-exclim h5_vds-eiger h5_vds-simpleIO h5_vds-percival + h5_vds-exclim h5_vds-eiger h5_vds-simpleIO h5_vds-percival \ + h5_vds-percival-unlim h5_vds-percival-unlim-maxmin TEST_SCRIPT = testh5cc.sh TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) @@ -629,7 +630,8 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c \ - h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c h5_vds-percival.c + h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c h5_vds-percival.c \ + h5_vds-percival-unlim.c h5_vds-percival-unlim-maxmin.c # The external link examples demonstrate how to use paths; they need @@ -1088,6 +1090,8 @@ h5_vds-exclim: $(srcdir)/h5_vds-exclim.c h5_vds-eiger: $(srcdir)/h5_vds-eiger.c h5_vds-simpleIO: $(srcdir)/h5_vds-simpleIO.c h5_vds-percival: $(srcdir)/h5_vds-percival.c +h5_vds-percival-unlim: $(srcdir)/h5_vds-percival-unlim.c +h5_vds-percival-unlim-maxmin: $(srcdir)/h5_vds-percival-unlim-maxmin.c # How to create EXAMPLEDIR if it doesn't already exist $(EXAMPLEDIR): diff --git a/examples/run-c-ex.sh.in b/examples/run-c-ex.sh.in index fe19bc8..1661344 100644 --- a/examples/run-c-ex.sh.in +++ b/examples/run-c-ex.sh.in @@ -136,6 +136,10 @@ then rm h5_vds-simpleIO &&\ RunTest h5_vds-percival &&\ rm h5_vds-percival &&\ + RunTest h5_vds-percival-unlim &&\ + rm h5_vds-percival-unlim &&\ + RunTest h5_vds-percival-unlim-maxmin&&\ + rm h5_vds-percival-unlim-maxmin &&\ RunTest h5_vds &&\ rm h5_vds); then EXIT_VALUE=${EXIT_SUCCESS} -- cgit v0.12 From 0c49a918c4fc842edeb53fc98c30bf2a89200470 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 6 May 2015 14:47:45 -0500 Subject: [svn-r27028] Merge revisions 26305 through 26780 from trunk to vds branch. Tested: ummon --- src/H5Shyper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 5667cbd..e177d7d 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -9607,7 +9607,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) /* Calculate actual block size for this clip size */ hslab->opt_diminfo[hslab->unlim_dim].block = - (hsize_t)((hssize_t)space->extent.size[hslab->unlim_dim] + (hsize_t)((hssize_t)clip_size - ((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start + space->select.offset[hslab->unlim_dim])); -- cgit v0.12 From 5b92a99024214884428796394fef7376c2d09f3f Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Mon, 11 May 2015 14:01:42 -0500 Subject: [svn-r27049] Rename H5Pset/get_virtual_dataspace_bounds to H5Pset/get_virtual_view and rename enum argument. Add support for AND and NOTA/NOTB operations with unlimited selections. Add some tests for unlimited selections. Other minor fixes/cleanup. Note: "clipped" status of unlimited selections is not properly updated with H5Sselect_copy. This is a deliberate omission since fixing it would take work and we are planning to eliminate the clipped status anyways. Tested: ummon --- src/H5Dprivate.h | 2 +- src/H5Dpublic.h | 10 +- src/H5Dvirtual.c | 133 ++---- src/H5Olayout.c | 3 +- src/H5Oprivate.h | 3 +- src/H5Pdapl.c | 69 +-- src/H5Pdcpl.c | 1 - src/H5Ppublic.h | 5 +- src/H5Shyper.c | 321 ++++++++++---- src/H5Sprivate.h | 3 +- test/vds.c | 1295 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 11 files changed, 1614 insertions(+), 231 deletions(-) diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index a89f937..88a04ec 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -52,7 +52,7 @@ #define H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME "rdcc_nslots" /* Size of raw data chunk cache(slots) */ #define H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME "rdcc_nbytes" /* Size of raw data chunk cache(bytes) */ #define H5D_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */ -#define H5D_ACS_VDS_BOUNDS_NAME "vds_bounds" /* VDS bounds option */ +#define H5D_ACS_VDS_VIEW_NAME "vds_view" /* VDS view option */ /* ======== Data transfer properties ======== */ #define H5D_XFER_MAX_TEMP_BUF_NAME "max_temp_buf" /* Maximum temp buffer size */ diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index e4b1311..a1f87e3 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -95,11 +95,11 @@ typedef enum H5D_fill_value_t { } H5D_fill_value_t; /* Values for VDS bounds option */ -typedef enum H5D_vds_bounds_t { - H5D_VDS_ERROR = -1, - H5D_VDS_MAX = 0, - H5D_VDS_MIN = 1 -} H5D_vds_bounds_t; +typedef enum H5D_vds_view_t { + H5D_VDS_ERROR = -1, + H5D_VDS_FIRST_MISSING = 0, + H5D_VDS_LAST_AVAILABLE = 1 +} H5D_vds_view_t; /********************/ /* Public Variables */ diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 109078f..6415afd 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -161,7 +161,6 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) layout->storage.u.virt.list[i].unlim_extent_virtual = orig_list[i].unlim_extent_virtual; layout->storage.u.virt.list[i].clip_size_source = orig_list[i].clip_size_source; layout->storage.u.virt.list[i].clip_size_virtual = orig_list[i].clip_size_virtual; - layout->storage.u.virt.list[i].clip_size_virtual_incl_trail = orig_list[i].clip_size_virtual_incl_trail; layout->storage.u.virt.list[i].source_space_status = orig_list[i].source_space_status; layout->storage.u.virt.list[i].virtual_space_status = orig_list[i].virtual_space_status; } /* end for */ @@ -333,10 +332,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) { H5O_storage_virtual_t *storage; hsize_t new_dims[H5S_MAX_RANK]; - hsize_t max_dims[H5S_MAX_RANK]; hsize_t curr_dims[H5S_MAX_RANK]; hsize_t clip_size; - hsize_t clip_size_incl_trail; int rank; hbool_t changed = FALSE; /* Whether the VDS extent changed */ size_t i; @@ -348,17 +345,15 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) HDassert(dset); storage = &dset->shared->layout.storage.u.virt; HDassert(dset->shared->layout.storage.type == H5D_VIRTUAL); - HDassert((storage->bounds == H5D_VDS_MAX) || (storage->bounds == H5D_VDS_MIN)); + HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); /* Get rank of VDS */ if((rank = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions") - /* Initialize new_dims and max_dims to HSIZE_UNDEF */ - for(i = 0; i < (size_t)rank; i++) { + /* Initialize new_dims to HSIZE_UNDEF */ + for(i = 0; i < (size_t)rank; i++) new_dims[i] = HSIZE_UNDEF; - max_dims[i] = HSIZE_UNDEF; - } /* end for */ /* Iterate over mappings */ for(i = 0; i < storage->list_nalloc; i++) @@ -382,77 +377,40 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if(H5S_get_simple_extent_dims(storage->list[i].source_select, curr_dims, NULL) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get source space dimensions") - /* Check if we are setting extent by maximum or minimum of - * mappings */ - if(storage->bounds == H5D_VDS_MAX) { - /* Check if the source extent in the unlimited dimension - * changed since the last time the VDS extent/mapping - * was updated */ - if(curr_dims[storage->list[i].unlim_dim_source] - == storage->list[i].unlim_extent_source) - /* Use cached result for clip size */ - clip_size = storage->list[i].clip_size_virtual; - else { - /* Get size that virtual selection would be clipped to - * to match size of source selection */ - if(H5S_hyper_get_clip_extent(storage->list[i].virtual_select, storage->list[i].source_select, &clip_size, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") - - /* Clip virtual_select. Note that if we used the cached - * clip_size above, the selection will already be - * clipped to the correct size. */ + /* Check if the source extent in the unlimited dimension + * changed since the last time the VDS extent/mapping + * was updated */ + if(curr_dims[storage->list[i].unlim_dim_source] + == storage->list[i].unlim_extent_source) + /* Use cached result for clip size */ + clip_size = storage->list[i].clip_size_virtual; + else { + /* Get size that virtual selection would be clipped to + * to match size of source selection */ + if(H5S_hyper_get_clip_extent(storage->list[i].virtual_select, storage->list[i].source_select, &clip_size, storage->view == H5D_VDS_FIRST_MISSING) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") + + /* If we are setting the extent by the last available data, + * clip virtual_select. Note that if we used the cached + * clip_size above, the selection will already be clipped to + * the correct size. */ + if(storage->view == H5D_VDS_LAST_AVAILABLE) if(H5S_hyper_clip_unlim(storage->list[i].virtual_select, clip_size)) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") - /* Update cached values unlim_extent_source and - * clip_size_virtual */ - storage->list[i].unlim_extent_source = curr_dims[storage->list[i].unlim_dim_source]; - storage->list[i].clip_size_virtual = clip_size; - } /* end else */ - - /* Update new_dims */ - if((new_dims[storage->list[i].unlim_dim_virtual] == HSIZE_UNDEF) - || (clip_size - > (hsize_t)new_dims[storage->list[i].unlim_dim_virtual])) - new_dims[storage->list[i].unlim_dim_virtual] = clip_size; - } /* end if */ - else { - /* Check if the source extent in the unlimited dimension - * changed since the last time the VDS extent/mapping was - * updated */ - if(curr_dims[storage->list[i].unlim_dim_source] - == storage->list[i].unlim_extent_source) { - HDassert(0 && "Checking code coverage..."); //VDSINC - /* Use cached result for clip size */ - clip_size = storage->list[i].clip_size_virtual; - clip_size_incl_trail = storage->list[i].clip_size_virtual_incl_trail; - } //VDSINC - else { - /* Get size that virtual selection would be clipped to - * to match size of source selection. Also get the clip - * size including the trailing space (gap between - * blocks). */ - if(H5S_hyper_get_clip_extent(storage->list[i].virtual_select, storage->list[i].source_select, &clip_size, &clip_size_incl_trail) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") - - /* Update cached values unlim_extent_source, - * clip_size_virtual, and clip_size_virtual_incl_trail - */ - storage->list[i].unlim_extent_source = curr_dims[storage->list[i].unlim_dim_source]; - storage->list[i].clip_size_virtual = clip_size; - storage->list[i].clip_size_virtual_incl_trail = clip_size_incl_trail; - } /* end else */ - - /* Update new_dims and max_dims */ - if((new_dims[storage->list[i].unlim_dim_virtual] == HSIZE_UNDEF) - || (clip_size_incl_trail - < (hsize_t)new_dims[storage->list[i].unlim_dim_virtual])) - new_dims[storage->list[i].unlim_dim_virtual] = clip_size_incl_trail; - if((max_dims[storage->list[i].unlim_dim_virtual] == HSIZE_UNDEF) - || (clip_size - > (hsize_t)max_dims[storage->list[i].unlim_dim_virtual])) - max_dims[storage->list[i].unlim_dim_virtual] = clip_size; + /* Update cached values unlim_extent_source and + * clip_size_virtual */ + storage->list[i].unlim_extent_source = curr_dims[storage->list[i].unlim_dim_source]; + storage->list[i].clip_size_virtual = clip_size; } /* end else */ + + /* Update new_dims */ + if((new_dims[storage->list[i].unlim_dim_virtual] == HSIZE_UNDEF) + || (storage->view == H5D_VDS_FIRST_MISSING ? (clip_size + < (hsize_t)new_dims[storage->list[i].unlim_dim_virtual]) + : (clip_size + > (hsize_t)new_dims[storage->list[i].unlim_dim_virtual]))) + new_dims[storage->list[i].unlim_dim_virtual] = clip_size; } /* end if */ } /* end if */ @@ -460,15 +418,10 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if(H5S_get_simple_extent_dims(dset->shared->space, curr_dims, NULL) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions") - /* Calculate new extent. Apply max_dims first, so min_dims takes precedent. - */ + /* Calculate new extent */ for(i = 0; i < (size_t)rank; i++) { if(new_dims[i] == HSIZE_UNDEF) new_dims[i] = curr_dims[i]; - if((max_dims[i] != HSIZE_UNDEF) && (new_dims[i] > max_dims[i])) { - HDassert(0 && "Checking code coverage..."); //VDSINC - new_dims[i] = max_dims[i]; - } //VDSINC if(new_dims[i] < storage->min_dims[i]) { HDassert(0 && "Checking code coverage..."); //VDSINC new_dims[i] = storage->min_dims[i]; @@ -479,7 +432,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) /* If we did not change the VDS dimensions and we are setting the extent by * maximum, there is nothing more to update */ - if(changed || (storage->bounds == H5D_VDS_MIN)) { + if(changed || (storage->view == H5D_VDS_FIRST_MISSING)) { /* Update VDS extent */ if(changed) if(H5S_set_extent(dset->shared->space, new_dims) < 0) @@ -500,7 +453,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") /* Check if we are setting extent by the minimum of mappings */ - if(storage->bounds == H5D_VDS_MIN) { + if(storage->view == H5D_VDS_FIRST_MISSING) { /* Clip virtual selection to extent (only necessary if the * extent changed, otherwise it will already be clipped to * the extent) */ @@ -512,15 +465,13 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) * changed since the last time the VDS extent/mapping was * updated */ if(new_dims[storage->list[i].unlim_dim_virtual] - == storage->list[i].unlim_extent_virtual) { - HDassert(0 && "Checking code coverage..."); //VDSINC + == storage->list[i].unlim_extent_virtual) /* Use cached result for clip size */ clip_size = storage->list[i].clip_size_source; - } //VDSINC else { /* Get size that source selection will be clipped to to * match size of virtual selection */ - if(H5S_hyper_get_clip_extent(storage->list[i].source_select, storage->list[i].virtual_select, &clip_size, NULL) < 0) + if(H5S_hyper_get_clip_extent(storage->list[i].source_select, storage->list[i].virtual_select, &clip_size, FALSE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") /* Update cached values unlim_extent_virtual and @@ -675,8 +626,8 @@ H5D__virtual_init(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5D_t *dset, HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for dapl ID") /* Get bounds option */ - if(H5P_get(dapl, H5D_ACS_VDS_BOUNDS_NAME, &dset->shared->layout.storage.u.virt.bounds) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get data cache number of slots") + if(H5P_get(dapl, H5D_ACS_VDS_VIEW_NAME, &dset->shared->layout.storage.u.virt.view) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get virtual view option") done: FUNC_LEAVE_NOAPI(ret_value) @@ -770,7 +721,7 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, HDassert(file_space); storage = &io_info->dset->shared->layout.storage.u.virt; - HDassert((storage->bounds == H5D_VDS_MAX) || (storage->bounds == H5D_VDS_MIN)); + HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) { @@ -878,7 +829,7 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, HDassert(file_space); storage = &io_info->dset->shared->layout.storage.u.virt; - HDassert((storage->bounds == H5D_VDS_MAX) || (storage->bounds == H5D_VDS_MIN)); + HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) { diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 9f1afb3..dce41cf 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -251,7 +251,7 @@ H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, mesg->storage.u.virt.list_nused = 0; mesg->storage.u.virt.list = NULL; mesg->storage.u.virt.list_nalloc = 0; - mesg->storage.u.virt.bounds = H5D_VDS_ERROR; + mesg->storage.u.virt.view = H5D_VDS_ERROR; /* Decode heap block if it exists */ if(mesg->storage.u.virt.serial_list_hobjid.addr != HADDR_UNDEF) { @@ -309,7 +309,6 @@ H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, mesg->storage.u.virt.list[i].unlim_extent_virtual = HSIZE_UNDEF; mesg->storage.u.virt.list[i].clip_size_source = HSIZE_UNDEF; mesg->storage.u.virt.list[i].clip_size_virtual = HSIZE_UNDEF; - mesg->storage.u.virt.list[i].clip_size_virtual_incl_trail = HSIZE_UNDEF; /* Update min_dims */ if(H5D_virtual_update_min_dims(mesg, i) < 0) diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index fcb0649..09a5b9c 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -433,7 +433,6 @@ typedef struct H5O_storage_virtual_ent_t { hsize_t unlim_extent_source; /* Extent of unlimited dimension in source dset last time virtual_select was patched to match selection */ hsize_t unlim_extent_virtual; /* Extent of unlimited dimension in virtual dset last time source_select was patched to match selection */ hsize_t clip_size_virtual; /* Size selection would be clipped to in virtual selection, ignoring other mappings, when source extent == unlim_extent_source */ - hsize_t clip_size_virtual_incl_trail; /* Like above, but includes gap after last block */ hsize_t clip_size_source; /* Size selection would be clipped to in source selection when virtual extent == unlim_extent_virtual */ H5O_virtual_space_status_t source_space_status; /* Extent patching status of source_select */ H5O_virtual_space_status_t virtual_space_status; /* Extent patching status of virtual_select */ @@ -450,7 +449,7 @@ typedef struct H5O_storage_virtual_t { /* Not stored */ size_t list_nalloc; /* Number of slots allocated */ hsize_t min_dims[H5S_MAX_RANK]; /* Minimum extent of VDS (maximum of all non-unlimited selection bounds) */ - H5D_vds_bounds_t bounds; /* Whether we set the extent by the maximum (TRUE) or minimum (FALSE) of unlimited selections */ + H5D_vds_view_t view; /* Method for calculating the extent of the virtual dataset with unlimited selections */ } H5O_storage_virtual_t; typedef struct H5O_storage_t { diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index fbd83a6..af4b988 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -62,10 +62,10 @@ #define H5D_ACS_PREEMPT_READ_CHUNKS_ENC H5P__encode_double #define H5D_ACS_PREEMPT_READ_CHUNKS_DEC H5P__decode_double /* Definitions for VDS bounds option */ -#define H5D_ACS_VDS_BOUNDS_SIZE sizeof(H5D_vds_bounds_t) -#define H5D_ACS_VDS_BOUNDS_DEF H5D_VDS_MAX -#define H5D_ACS_VDS_BOUNDS_ENC H5P__dacc_vds_bounds_enc -#define H5D_ACS_VDS_BOUNDS_DEC H5P__dacc_vds_bounds_dec +#define H5D_ACS_VDS_VIEW_SIZE sizeof(H5D_vds_view_t) +#define H5D_ACS_VDS_VIEW_DEF H5D_VDS_LAST_AVAILABLE +#define H5D_ACS_VDS_VIEW_ENC H5P__dacc_vds_view_enc +#define H5D_ACS_VDS_VIEW_DEC H5P__dacc_vds_view_dec /******************/ /* Local Typedefs */ @@ -85,8 +85,8 @@ static herr_t H5P__dacc_reg_prop(H5P_genclass_t *pclass); /* Property list callbacks */ -static herr_t H5P__dacc_vds_bounds_enc(const void *value, void **pp, size_t *size); -static herr_t H5P__dacc_vds_bounds_dec(const void **pp, void *value); +static herr_t H5P__dacc_vds_view_enc(const void *value, void **pp, size_t *size); +static herr_t H5P__dacc_vds_view_dec(const void **pp, void *value); /*********************/ @@ -142,7 +142,7 @@ H5P__dacc_reg_prop(H5P_genclass_t *pclass) size_t rdcc_nslots = H5D_ACS_DATA_CACHE_NUM_SLOTS_DEF; /* Default raw data chunk cache # of slots */ size_t rdcc_nbytes = H5D_ACS_DATA_CACHE_BYTE_SIZE_DEF; /* Default raw data chunk cache # of bytes */ double rdcc_w0 = H5D_ACS_PREEMPT_READ_CHUNKS_DEF; /* Default raw data chunk cache dirty ratio */ - H5D_vds_bounds_t bounds_option = H5D_ACS_VDS_BOUNDS_DEF; /* Default VDS bounds option */ + H5D_vds_view_t virtual_view = H5D_ACS_VDS_VIEW_DEF; /* Default VDS view option */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -162,9 +162,9 @@ H5P__dacc_reg_prop(H5P_genclass_t *pclass) NULL, NULL, NULL, H5D_ACS_PREEMPT_READ_CHUNKS_ENC, H5D_ACS_PREEMPT_READ_CHUNKS_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") - /* Register the VDS bounds option */ - if(H5P_register_real(pclass, H5D_ACS_VDS_BOUNDS_NAME, H5D_ACS_VDS_BOUNDS_SIZE, &bounds_option, - NULL, NULL, NULL, H5D_ACS_VDS_BOUNDS_ENC, H5D_ACS_VDS_BOUNDS_DEC, + /* Register the VDS view option */ + if(H5P_register_real(pclass, H5D_ACS_VDS_VIEW_NAME, H5D_ACS_VDS_VIEW_SIZE, &virtual_view, + NULL, NULL, NULL, H5D_ACS_VDS_VIEW_ENC, H5D_ACS_VDS_VIEW_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") @@ -302,7 +302,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5Pset_virtual_dataspace_bounds + * Function: H5Pset_virtual_view * * Purpose: VDSINC * @@ -314,7 +314,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Pset_virtual_dataspace_bounds(hid_t plist_id, H5D_vds_bounds_t bounds_option) +H5Pset_virtual_view(hid_t plist_id, H5D_vds_view_t view) { H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value = SUCCEED; /* return value */ @@ -322,7 +322,7 @@ H5Pset_virtual_dataspace_bounds(hid_t plist_id, H5D_vds_bounds_t bounds_option) FUNC_ENTER_API(FAIL) /* Check argument */ - if((bounds_option != H5D_VDS_MAX) && (bounds_option != H5D_VDS_MIN)) + if((view != H5D_VDS_FIRST_MISSING) && (view != H5D_VDS_LAST_AVAILABLE)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid bounds option") /* Get the plist structure */ @@ -330,20 +330,21 @@ H5Pset_virtual_dataspace_bounds(hid_t plist_id, H5D_vds_bounds_t bounds_option) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Update property list */ - if(H5P_set(plist, H5D_ACS_VDS_BOUNDS_NAME, &bounds_option) < 0) + if(H5P_set(plist, H5D_ACS_VDS_VIEW_NAME, &view) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_API(ret_value) -} /* end H5Pset_virtual_dataspace_bounds() */ +} /* end H5Pset_virtual_view() */ /*------------------------------------------------------------------------- - * Function: H5Pget_virtual_dataspace_bounds + * Function: H5Pget_virtual_view * * Purpose: VDSINC * - * Return: Success: H5D_VDS_MAX or H5D_VDS_MIN + * Return: Success: H5D_VDS_FIRST_MISSING or + * H5D_VDS_LAST_AVAILABLE * Failure: H5D_VDS_ERROR * * Programmer: Neil Fortner @@ -351,11 +352,11 @@ done: * *------------------------------------------------------------------------- */ -H5D_vds_bounds_t -H5Pget_virtual_dataspace_bounds(hid_t plist_id) +H5D_vds_view_t +H5Pget_virtual_view(hid_t plist_id) { H5P_genplist_t *plist; /* Property list pointer */ - H5D_vds_bounds_t ret_value; /* Return value */ + H5D_vds_view_t ret_value; /* Return value */ FUNC_ENTER_API(H5D_VDS_ERROR) @@ -364,16 +365,16 @@ H5Pget_virtual_dataspace_bounds(hid_t plist_id) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5D_VDS_ERROR, "can't find object for ID") /* Get value from property list */ - if(H5P_get(plist, H5D_ACS_VDS_BOUNDS_NAME, &ret_value) < 0) + if(H5P_get(plist, H5D_ACS_VDS_VIEW_NAME, &ret_value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5D_VDS_ERROR, "unable to set value") done: FUNC_LEAVE_API(ret_value) -} /* end H5Pget_virtual_dataspace_bounds() */ +} /* end H5Pget_virtual_view() */ /*------------------------------------------------------------------------- - * Function: H5P__dacc_vds_bounds_enc + * Function: H5P__dacc_vds_view_enc * * Purpose: Callback routine which is called whenever the vds bounds * property in the dataset access property list is encoded. @@ -387,30 +388,30 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5P__dacc_vds_bounds_enc(const void *value, void **_pp, size_t *size) +H5P__dacc_vds_view_enc(const void *value, void **_pp, size_t *size) { - const H5D_vds_bounds_t *bounds = (const H5D_vds_bounds_t *)value; /* Create local alias for values */ + const H5D_vds_view_t *view = (const H5D_vds_view_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR /* Sanity check */ - HDassert(bounds); + HDassert(view); HDassert(size); if(NULL != *pp) /* Encode EDC property */ - *(*pp)++ = (uint8_t)*bounds; + *(*pp)++ = (uint8_t)*view; /* Size of EDC property */ (*size)++; FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5P__dacc_vds_bounds_enc() */ +} /* end H5P__dacc_vds_view_enc() */ /*------------------------------------------------------------------------- - * Function: H5P__dacc_vds_bounds_dec + * Function: H5P__dacc_vds_view_dec * * Purpose: Callback routine which is called whenever the vds bounds * property in the dataset access property list is encoded. @@ -424,9 +425,9 @@ H5P__dacc_vds_bounds_enc(const void *value, void **_pp, size_t *size) *------------------------------------------------------------------------- */ static herr_t -H5P__dacc_vds_bounds_dec(const void **_pp, void *_value) +H5P__dacc_vds_view_dec(const void **_pp, void *_value) { - H5D_vds_bounds_t *bounds = (H5D_vds_bounds_t *)_value; /* EDC property */ + H5D_vds_view_t *view = (H5D_vds_view_t *)_value; const uint8_t **pp = (const uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR @@ -434,11 +435,11 @@ H5P__dacc_vds_bounds_dec(const void **_pp, void *_value) /* Sanity checks */ HDassert(pp); HDassert(*pp); - HDassert(bounds); + HDassert(view); /* Decode EDC property */ - *bounds = (H5D_vds_bounds_t)*(*pp)++; + *view = (H5D_vds_view_t)*(*pp)++; FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5P__dacc_vds_bounds_dec() */ +} /* end H5P__dacc_vds_view_dec() */ diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 8f400cf..575de9c 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1676,7 +1676,6 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, layout.storage.u.virt.list[layout.storage.u.virt.list_nused].unlim_extent_virtual = HSIZE_UNDEF; layout.storage.u.virt.list[layout.storage.u.virt.list_nused].clip_size_source = HSIZE_UNDEF; layout.storage.u.virt.list[layout.storage.u.virt.list_nused].clip_size_virtual = HSIZE_UNDEF; - layout.storage.u.virt.list[layout.storage.u.virt.list_nused].clip_size_virtual_incl_trail = HSIZE_UNDEF; layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_space_status = H5O_VIRTUAL_STATUS_USER; layout.storage.u.virt.list[layout.storage.u.virt.list_nused].virtual_space_status = H5O_VIRTUAL_STATUS_USER; diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 7932716..5ea857a 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -393,9 +393,8 @@ H5_DLL herr_t H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots/*out*/, size_t *rdcc_nbytes/*out*/, double *rdcc_w0/*out*/); -H5_DLL herr_t H5Pset_virtual_dataspace_bounds(hid_t plist_id, - H5D_vds_bounds_t bounds_option); -H5_DLL H5D_vds_bounds_t H5Pget_virtual_dataspace_bounds(hid_t plist_id); +H5_DLL herr_t H5Pset_virtual_view(hid_t plist_id, H5D_vds_view_t view); +H5_DLL H5D_vds_view_t H5Pget_virtual_view(hid_t plist_id); /* Dataset xfer property list (DXPL) routines */ H5_DLL herr_t H5Pset_data_transform(hid_t plist_id, const char* expression); diff --git a/src/H5Shyper.c b/src/H5Shyper.c index e177d7d..468f87e 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -45,6 +45,8 @@ static herr_t H5S_hyper_generate_spans(H5S_t *space); #ifdef NEW_HYPERSLAB_API static herr_t H5S_select_select (H5S_t *space1, H5S_seloper_t op, H5S_t *space2); #endif /*NEW_HYPERSLAB_API*/ +static void H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, + hsize_t *count, hsize_t *block, hssize_t offset, hsize_t clip_size); /* Selection callbacks */ static herr_t H5S_hyper_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection); @@ -1674,8 +1676,11 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection) } /* end if */ /* If there is an unlimited dimension, we must update the selection */ - if(H5S_hyper_clip_to_extent(dst) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") + /* Disabled to make chunk I/O work. This is a quick hack - no sense in a + * proper fix since we are planning to change how unlimited selections work + * anyways. VDSINC */ + /*if(H5S_hyper_clip_to_extent(dst) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab")*/ done: FUNC_LEAVE_NOAPI(ret_value) @@ -6484,13 +6489,15 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Check for unlimited dimension */ for(u = 0; uextent.rank; u++) if((count[u] == H5S_UNLIMITED) || (block[u] == H5S_UNLIMITED)) { - if(unlim_dim >= 0) + if(unlim_dim >= 0) { + HDassert(0 && "Checking code coverage..."); //VDSINC HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot have more than one unlimited dimension in selection") + } //VDSINC else { - if(op != H5S_SELECT_SET) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot use unlimited selection to modify existing selection") - if(count[u] == block[u] /* == H5S_UNLIMITED */) + if(count[u] == block[u] /* == H5S_UNLIMITED */) { + HDassert(0 && "Checking code coverage..."); //VDSINC HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "count and block cannot both be unlimited") + } //VDSINC unlim_dim = (int)u; } /* end else */ } /* end if */ @@ -6734,9 +6741,65 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Sanity check */ HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS); - /* Cannot modify unlimited selections */ - if(space->select.sel_info.hslab->unlim_dim >= 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection") + /* Handle unlimited selections */ + if(unlim_dim >= 0) { + hsize_t bounds_start[H5S_MAX_RANK]; + hsize_t bounds_end[H5S_MAX_RANK]; + hsize_t tmp_count = opt_count[unlim_dim]; + hsize_t tmp_block = opt_block[unlim_dim]; + + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Check for invalid operation */ + if(space->select.sel_info.hslab->unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection with another unlimited selection") + if(!((op == H5S_SELECT_AND) || (op == H5S_SELECT_NOTB))) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unsupported operation with unlimited selection") + + /* Get bounds of existing selection */ + if(H5S_hyper_bounds(space, bounds_start, bounds_end) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds") + + /* Patch count and block to remove unlimited and include the + * existing selection */ + H5S__hyper_get_clip_diminfo(start[unlim_dim], opt_stride[unlim_dim], &tmp_count, &tmp_block, space->select.offset[unlim_dim], bounds_end[unlim_dim]); + HDassert((tmp_count == 1) || (opt_count != _ones)); + HDassert((tmp_block == 1) || (opt_block != _ones)); + if(opt_count != _ones) { + HDassert(opt_count == int_count); + int_count[unlim_dim] = tmp_count; + } /* end if */ + if(opt_block != _ones) { + HDassert(opt_block == int_block); + int_block[unlim_dim] = tmp_block; + } /* end if */ + } /* end if */ + else if(space->select.sel_info.hslab->unlim_dim >= 0) { + /* Check for invalid operation */ + if(unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection with another unlimited selection") + if(!((op == H5S_SELECT_AND) || (op == H5S_SELECT_NOTA))) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unsupported operation on unlimited selection") + + /* Convert to limited selection */ + space->select.sel_info.hslab->unlim_dim = -1; + + /* Currently just use the existing clip size. This is not ideal and + * may give surprising results. Note this will work differently + * when we switch to the new way of handling unlimited selections + * (unlimited selections have no clip size or clipped version). See + * below. VDSINC */ +#if 0 //VDSINC + /* Clip unlimited selection to include new selection */ + if(H5S_hyper_clip_unlim(space, + (hsize_t)((hssize_t)start[space->select.sel_info.hslab->unlim_dim] + + space->select.offset[space->select.sel_info.hslab->unlim_dim] + + (((hssize_t)opt_count[space->select.sel_info.hslab->unlim_dim] + - (hssize_t)1) + * (hssize_t)opt_stride[space->select.sel_info.hslab->unlim_dim]) + + (hssize_t)opt_block[space->select.sel_info.hslab->unlim_dim])) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") +#endif + } /* end if */ /* Check if there's no hyperslab span information currently */ if(NULL == space->select.sel_info.hslab->span_lst) @@ -7161,10 +7224,6 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot have more than one unlimited dimension in selection") } //VDSINC else { - if(op != H5S_SELECT_SET) { - HDassert(0 && "Checking code coverage..."); //VDSINC - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot use unlimited selection to modify existing selection") - } //VDSINC if(count[u] == block[u] /* == H5S_UNLIMITED */) { HDassert(0 && "Checking code coverage..."); //VDSINC HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "count and block cannot both be unlimited") @@ -7343,8 +7402,8 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release hyperslab") /* Allocate space for the hyperslab selection information */ - if((space->select.sel_info.hslab=H5FL_MALLOC(H5S_hyper_sel_t))==NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab info") + if(NULL == (space->select.sel_info.hslab = H5FL_MALLOC(H5S_hyper_sel_t))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info") /* Save the diminfo */ space->select.num_elem=1; @@ -7368,23 +7427,25 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Initialize unlim_dim_clip_size to HSSIZET_MIN so the selection is * clipped by H5S__hyper_clip_to_extent() no matter what the extent is */ - space->unlim_dim_clip_size = HSSIZET_MIN; + space->select.sel_info.hslab->unlim_dim_clip_size = HSSIZET_MIN; /* Indicate that the dimension information is valid */ - space->select.sel_info.hslab->diminfo_valid=TRUE; + space->select.sel_info.hslab->diminfo_valid = TRUE; /* Indicate that there's no slab information */ - space->select.sel_info.hslab->span_lst=NULL; + space->select.sel_info.hslab->span_lst = NULL; /* Handle unlimited selections */ if(unlim_dim >= 0) { space->select.sel_info.hslab->num_elem_non_unlim = (hsize_t)1; for(u = 0; u < space->extent.rank; u++) { + /* Save start/stride/count/block */ space->select.sel_info.hslab->opt_unlim_diminfo[u].start = start[u]; space->select.sel_info.hslab->opt_unlim_diminfo[u].stride = opt_stride[u]; space->select.sel_info.hslab->opt_unlim_diminfo[u].count = opt_count[u]; space->select.sel_info.hslab->opt_unlim_diminfo[u].block = opt_block[u]; + /* Calculate num_elem_non_unlim */ if((int)u != unlim_dim) space->select.sel_info.hslab->num_elem_non_unlim *= (opt_count[u] * opt_block[u]); } /* end for */ @@ -7398,29 +7459,83 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Sanity check */ HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS); - /* Cannot modify unlimited selections */ - if(space->select.sel_info.hslab->unlim_dim >= 0) { + /* Handle unlimited selections */ + if(unlim_dim >= 0) { + hsize_t bounds_start[H5S_MAX_RANK]; + hsize_t bounds_end[H5S_MAX_RANK]; + hsize_t tmp_count = opt_count[unlim_dim]; + hsize_t tmp_block = opt_block[unlim_dim]; + HDassert(0 && "Checking code coverage..."); //VDSINC - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection") - } //VDSINC + /* Check for invalid operation */ + if(space->select.sel_info.hslab->unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection with another unlimited selection") + if(!((op == H5S_SELECT_AND) || (op == H5S_SELECT_NOTB))) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unsupported operation with unlimited selection") + + /* Get bounds of existing selection */ + if(H5S_hyper_bounds(space, bounds_start, bounds_end) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds") + + /* Patch count and block to remove unlimited and include the + * existing selection */ + H5S__hyper_get_clip_diminfo(start[unlim_dim], opt_stride[unlim_dim], &tmp_count, &tmp_block, space->select.offset[unlim_dim], bounds_end[unlim_dim]); + HDassert((tmp_count == 1) || (opt_count != _ones)); + HDassert((tmp_block == 1) || (opt_block != _ones)); + if(opt_count != _ones) { + HDassert(opt_count == int_count); + int_count[unlim_dim] = tmp_count; + } /* end if */ + if(opt_block != _ones) { + HDassert(opt_block == int_block); + int_block[unlim_dim] = tmp_block; + } /* end if */ + } /* end if */ + else if(space->select.sel_info.hslab->unlim_dim >= 0) { + /* Check for invalid operation */ + if(unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection with another unlimited selection") + if(!((op == H5S_SELECT_AND) || (op == H5S_SELECT_NOTA))) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unsupported operation on unlimited selection") + + /* Convert to limited selection */ + space->select.sel_info.hslab->unlim_dim = -1; + + /* Currently just use the existing clip size. This is not ideal and + * may give surprising results. Note this will work differently + * when we switch to the new way of handling unlimited selections + * (unlimited selections have no clip size or clipped version). See + * below. VDSINC */ +#if 0 //VDSINC + /* Clip unlimited selection to include new selection */ + if(H5S_hyper_clip_unlim(space, + (hsize_t)((hssize_t)start[space->select.sel_info.hslab->unlim_dim] + + space->select.offset[space->select.sel_info.hslab->unlim_dim] + + (((hssize_t)opt_count[space->select.sel_info.hslab->unlim_dim] + - (hssize_t)1) + * (hssize_t)opt_stride[space->select.sel_info.hslab->unlim_dim]) + + (hssize_t)opt_block[space->select.sel_info.hslab->unlim_dim])) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") +#endif + } /* end if */ /* Check if there's no hyperslab span information currently */ - if(space->select.sel_info.hslab->span_lst==NULL) - if(H5S_hyper_generate_spans(space)<0) + if(NULL == space->select.sel_info.hslab->span_lst) + if(H5S_hyper_generate_spans(space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree") + /* Indicate that the regular dimensions are no longer valid */ + space->select.sel_info.hslab->diminfo_valid = FALSE; + /* Add in the new hyperslab information */ if(H5S_generate_hyperslab (space, op, start, opt_stride, opt_count, opt_block)<0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs") - - /* Indicate that the regular dimensions are no longer valid */ - space->select.sel_info.hslab->diminfo_valid=FALSE; } /* end if */ else HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") /* Set selection type */ - space->select.type=H5S_sel_hyper; + space->select.type = H5S_sel_hyper; done: FUNC_LEAVE_NOAPI(ret_value) @@ -9538,6 +9653,63 @@ done: /*-------------------------------------------------------------------------- NAME + H5S__hyper_get_clip_diminfo + PURPOSE + Calculates the count and block required to clip the specified + unlimited dimension to include clip_size. The returned selection may + extent beyond clip_size. + USAGE + VDSINC + RETURNS + Non-negative on success/Negative on failure. + DESCRIPTION + This function recalculates the internal description of the hyperslab + to make the unlimited dimension extend to the specified extent. if + superset is TRUE, then the hyperslab can be clipped to a size equal to + or greater than clip_size. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + Note this function takes the offset into account. + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static void +H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, + hsize_t *block, hssize_t offset, hsize_t clip_size) +{ + FUNC_ENTER_PACKAGE_NOERR + + /* Check for selection outside clip size */ + if((hsize_t)((hssize_t)start + offset) >= clip_size) { + if(*block == H5S_UNLIMITED) + *block = 0; + else + *count = 0; + } /* end if */ + /* Check for single block in unlimited dimension */ + else if(*count == (hsize_t)1) { + HDassert(*block == H5S_UNLIMITED); + + /* Calculate actual block size for this clip size */ + *block = (hsize_t)((hssize_t)clip_size - ((hssize_t)start + offset)); + } /* end if */ + else { + HDassert(*count == H5S_UNLIMITED); + HDassert(*block != H5S_UNLIMITED); + HDassert((hssize_t)clip_size > offset); + + /* Calculate initial count (last block may be partial) */ + *count = (hsize_t)((hssize_t)clip_size - ((hssize_t)start + offset) + + (hssize_t)stride - (hssize_t)1) / stride; + HDassert(*count > (hsize_t)0); + } /* end else */ + + FUNC_LEAVE_NOAPI_VOID +} /* end H5S__hyper_get_clip_diminfo() */ + + +/*-------------------------------------------------------------------------- + NAME H5S_hyper_clip_unlim PURPOSE Clips the unlimited dimension of the hyperslab selection to the @@ -9548,7 +9720,10 @@ done: Non-negative on success/Negative on failure. DESCRIPTION This function recalculates the internal description of the hyperslab - to make the unlimited dimension extend to the specified extent. + to make the unlimited dimension extend to the specified extent. if + superset is TRUE, then the hyperslab can be clipped to a size equal to + or greater than clip_size. If include_offset is TRUE, then the offset + is taken into account. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS Note this function takes the offset into account. @@ -9584,33 +9759,20 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) /* Initialize opt_diminfo with opt_unlim_diminfo */ hslab->opt_diminfo[hslab->unlim_dim] = hslab->opt_unlim_diminfo[hslab->unlim_dim]; - /* Check for selection outside clip size */ - if((hsize_t)((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start - + space->select.offset[hslab->unlim_dim]) - >= clip_size) { - if(hslab->opt_diminfo[hslab->unlim_dim].block == H5S_UNLIMITED) - hslab->opt_diminfo[hslab->unlim_dim].block = 0; - else - hslab->opt_diminfo[hslab->unlim_dim].count = 0; + /* Get initial diminfo */ + H5S__hyper_get_clip_diminfo(hslab->opt_diminfo[hslab->unlim_dim].start, hslab->opt_diminfo[hslab->unlim_dim].stride, &hslab->opt_diminfo[hslab->unlim_dim].count, &hslab->opt_diminfo[hslab->unlim_dim].block, space->select.offset[hslab->unlim_dim], clip_size); + /* Check for nothing returned */ + if((hslab->opt_diminfo[hslab->unlim_dim].block == 0) + || (hslab->opt_diminfo[hslab->unlim_dim].count == 0)) { + /* Set num_elem */ space->select.num_elem = (hsize_t)0; /* Mark that opt_diminfo is valid */ hslab->diminfo_valid = TRUE; - - HGOTO_DONE(SUCCEED) } /* end if */ - /* Check for single block in unlimited dimension */ - if(hslab->opt_diminfo[hslab->unlim_dim].count == (hsize_t)1) { - HDassert(hslab->opt_diminfo[hslab->unlim_dim].block == H5S_UNLIMITED); - - /* Calculate actual block size for this clip size */ - hslab->opt_diminfo[hslab->unlim_dim].block = - (hsize_t)((hssize_t)clip_size - - ((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start - + space->select.offset[hslab->unlim_dim])); - + else if(hslab->opt_unlim_diminfo[hslab->unlim_dim].count == (hsize_t)1) { /* Calculate number of elements */ space->select.num_elem = hslab->opt_diminfo[hslab->unlim_dim].block * hslab->num_elem_non_unlim; @@ -9619,26 +9781,13 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) hslab->diminfo_valid = TRUE; } /* end if */ else { - HDassert(hslab->opt_diminfo[hslab->unlim_dim].count == H5S_UNLIMITED); - HDassert(hslab->opt_diminfo[hslab->unlim_dim].block != H5S_UNLIMITED); - HDassert((hssize_t)clip_size > space->select.offset[hslab->unlim_dim]); - - /* Calculate initial count (last block may be partial) */ - hslab->opt_diminfo[hslab->unlim_dim].count = - (hsize_t)((hssize_t)clip_size - - ((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start - + space->select.offset[hslab->unlim_dim]) - + (hssize_t)hslab->opt_diminfo[hslab->unlim_dim].stride - - (hssize_t)1) - / hslab->opt_diminfo[hslab->unlim_dim].stride; - HDassert(hslab->opt_diminfo[hslab->unlim_dim].count > (hsize_t)0); - /* Calculate number of elements */ space->select.num_elem = hslab->opt_diminfo[hslab->unlim_dim].count * hslab->opt_diminfo[hslab->unlim_dim].block * hslab->num_elem_non_unlim; - /* Check if last block is partial */ + /* Check if last block is partial. If superset is set, just keep the + * last block complete to speed computation. */ if(((hslab->opt_diminfo[hslab->unlim_dim].stride * (hslab->opt_diminfo[hslab->unlim_dim].count - (hsize_t)1)) + hslab->opt_diminfo[hslab->unlim_dim].block) @@ -9754,7 +9903,7 @@ done: --------------------------------------------------------------------------*/ herr_t H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, - hsize_t *clip_size, hsize_t *clip_size_incl_trail) + hsize_t *clip_size, hbool_t incl_trail) { const H5S_hyper_sel_t *clip_hslab; /* Convenience pointer to hyperslab info */ const H5S_hyper_sel_t *match_hslab; /* Convenience pointer to hyperslab info */ @@ -9780,12 +9929,12 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, num_slices = match_space->select.num_elem / match_hslab->num_elem_non_unlim; if(num_slices == 0) { - *clip_size = 0; - if(clip_size_incl_trail) { - HDassert(0 && "Checking code coverage..."); //VDSINC - *clip_size_incl_trail = clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start; - } //VDSINC - } /* end if */ + HDassert(incl_trail && "Checking code coverage..."); //VDSINC + HDassert(!incl_trail && "Checking code coverage..."); //VDSINC + *clip_size = incl_trail + ? clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start + : 0; + } //VDSINC else if(clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block == H5S_UNLIMITED) { /* Unlimited block, just set the extent large enough for the block size * to match num_slices */ @@ -9794,10 +9943,6 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, *clip_size = clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start + num_slices; - if(clip_size_incl_trail) { - HDassert(0 && "Checking code coverage..."); //VDSINC - *clip_size_incl_trail = *clip_size; - } //VDSINC } /* end if */ else { /* Unlimited count, need to match extent so a block (possibly) gets cut @@ -9812,7 +9957,8 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block); if(rem_slices > 0) { - HDassert(0 && "Checking code coverage..."); //VDSINC + HDassert(incl_trail && "Checking code coverage..."); //VDSINC + HDassert(!incl_trail && "Checking code coverage..."); //VDSINC /* Must end extent in middle of partial block (or beginning of empty * block if include_trailing_space and rem_slices == 0) */ *clip_size = @@ -9820,24 +9966,21 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, + (count * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride) + rem_slices; - if(clip_size_incl_trail) { - HDassert(0 && "Checking code coverage..."); //VDSINC - *clip_size_incl_trail = *clip_size; - } //VDSINC } /* end if */ else { - /* End extent at end of last block */ - *clip_size = - clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start - + ((count - (hsize_t)1) - * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride) - + clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block; - if(clip_size_incl_trail) - /* Include gap after last block */ - *clip_size_incl_trail = + if(incl_trail) + /* End extent just before first missing block */ + *clip_size = clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start + (count * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride); + else + /* End extent at end of last block */ + *clip_size = + clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start + + ((count - (hsize_t)1) + * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride) + + clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block; } /* end else */ } /* end else */ diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 2900839..c796c31 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -269,8 +269,7 @@ H5_DLL herr_t H5S_hyper_denormalize_offset(H5S_t *space, const hssize_t *old_off H5_DLL herr_t H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size); H5_DLL herr_t H5S_hyper_clip_to_extent(H5S_t *space); H5_DLL herr_t H5S_hyper_get_clip_extent(const H5S_t *clip_space, - const H5S_t *match_space, hsize_t *clip_size, - hsize_t *clip_size_incl_trail); + const H5S_t *match_space, hsize_t *clip_size, hbool_t incl_trail); /* Operations on selection iterators */ H5_DLL herr_t H5S_select_iter_init(H5S_sel_iter_t *iter, const H5S_t *space, size_t elmt_size); diff --git a/test/vds.c b/test/vds.c index 5092d1e..033c228 100644 --- a/test/vds.c +++ b/test/vds.c @@ -1005,7 +1005,7 @@ test_basic_io(unsigned config, hid_t fapl) hsize_t count[4]; /* Hyperslab count */ hsize_t block[4]; /* Hyperslab block */ hsize_t coord[10]; /* Point selection array */ - int buf[10][26]; /* Write and expecte read buffer */ + int buf[10][26]; /* Write and expected read buffer */ int rbuf[10][26]; /* Read buffer */ int evbuf[10][26]; /* Expected VDS "buffer" */ int erbuf[10][26]; /* Expected read buffer */ @@ -1135,6 +1135,7 @@ test_basic_io(unsigned config, hid_t fapl) vdset = -1; if(H5Fclose(srcfile[0]) < 0) TEST_ERROR + srcfile[0] = -1; if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; @@ -1295,6 +1296,7 @@ test_basic_io(unsigned config, hid_t fapl) vdset = -1; if(H5Fclose(srcfile[0]) < 0) TEST_ERROR + srcfile[0] = -1; if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; @@ -1483,6 +1485,7 @@ test_basic_io(unsigned config, hid_t fapl) vdset = -1; if(H5Fclose(srcfile[0]) < 0) TEST_ERROR + srcfile[0] = -1; if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; @@ -1746,6 +1749,7 @@ test_basic_io(unsigned config, hid_t fapl) vdset = -1; if(H5Fclose(srcfile[0]) < 0) TEST_ERROR + srcfile[0] = -1; if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; @@ -2021,6 +2025,7 @@ test_basic_io(unsigned config, hid_t fapl) vdset = -1; if(H5Fclose(srcfile[0]) < 0) TEST_ERROR + srcfile[0] = -1; if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; @@ -2489,6 +2494,7 @@ test_basic_io(unsigned config, hid_t fapl) vdset = -1; if(H5Fclose(srcfile[0]) < 0) TEST_ERROR + srcfile[0] = -1; if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; @@ -2550,6 +2556,1292 @@ error: /*------------------------------------------------------------------------- + * Function: test_unlim + * + * Purpose: Tests VDS with unlimited selections + * + * Return: Success: 0 + * + * Failure: number of errors + * + * Programmer: Neil Fortner + * Thursday, April 30, 2015 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static int +test_unlim(unsigned config, hid_t fapl) +{ + char srcfilename[FILENAME_BUF_SIZE]; + char vfilename[FILENAME_BUF_SIZE]; + hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */ + hid_t vfile = -1; /* File with virtual dset */ + hid_t dcpl = -1; /* Dataset creation property list */ + hid_t srcdcpl = -1; /* DCPL for source dset */ + hid_t dapl = -1; /* Dataset access property list */ + hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */ + hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */ + hid_t memspace = -1; /* Memory dataspace */ + hid_t filespace = -1; /* File dataspace */ + hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datsets */ + hid_t vdset = -1; /* Virtual dataset */ + hsize_t dims[2] = {10, 10}; /* Data space current size */ + hsize_t mdims[2] = {10, 20}; /* Data space maximum size */ + hsize_t cdims[2] = {4, 4}; /* Chunk dimensions */ + hsize_t start[4]; /* Hyperslab start */ + hsize_t stride[4]; /* Hyperslab stride */ + hsize_t count[4]; /* Hyperslab count */ + hsize_t block[4]; /* Hyperslab block */ + hsize_t coord[10]; /* Point selection array */ + int buf[10][20]; /* Write and expected read buffer */ + int rbuf[10][20]; /* Read buffer */ + int erbuf[10][20]; /* Expected read buffer */ + int ndims; /* Number of dimensions */ + int i, j; + + TESTING("virtual dataset I/O with unlimited selections") + + h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename); + h5_fixname(FILENAME[1], fapl, srcfilename, sizeof srcfilename); + + /* Create DCPLs */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + TEST_ERROR + if((srcdcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + TEST_ERROR + + /* Create DAPL */ + if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0) + TEST_ERROR + + /* Set chunk dimensions */ + if(H5Pset_chunk(srcdcpl, 2, cdims) < 0) + TEST_ERROR + + /* Create memory space */ + if((memspace = H5Screate_simple(2, mdims, NULL)) < 0) + TEST_ERROR + + + /* + * Test 1: 2 Source datasets, single unlimited hyperslab virtual mappings + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + if((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + + /* Create source dataspace */ + dims[0] = 5; + mdims[0] = 5; + if((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + mdims[0] = 10; + + /* Select hyperslab in source space */ + start[0] = 0; + start[1] = 0; + count[0] = 5; + count[1] = H5S_UNLIMITED; + if(H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual spaces */ + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + start[0] = 5; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Add virtual layout mappings */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2", srcspace[0]) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create source datasets */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] = (i * (int)mdims[1]) + j; + + /* Initialize erbuf */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + erbuf[i][j] = -1; + + /* Write data directly to source datasets */ + /* Select hyperslab in memory */ + start[0] = 0; + count[1] = 10; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Write first dataset */ + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 5; i++) + for(j = 0; j < 10; j++) + erbuf[i][j] = buf[i][j]; + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write second dataset */ + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 5; i++) + for(j = 0; j < 10; j++) + erbuf[i + 5][j] = buf[i][j]; + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + start[0] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Reopen srcdset[0] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Extend srcdset[0] */ + dims[0] = 5; + dims[1] = 15; + if(H5Dset_extent(srcdset[0], dims) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to new area of srcdset */ + count[1] = 5; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if((filespace = H5Dget_space(srcdset[0])) < 0) + TEST_ERROR + start[1] = 10; + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Close srcdset[0] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions. Note that since we are using + * H5D_VDS_FIRST_MISSING and we only extended one source dataset the + * dimensions will not have changed. */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Update erbuf to reflect new data that is now visible due to the change to + * H5D_VDS_LAST_AVAILABLE */ + for(i = 0; i < 5; i++) + for(j = 0; j < 5; j++) + erbuf[i][j + 10] = buf[i][j]; + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 15) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Reopen srcdset[1] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Extend srcdset[1] */ + dims[0] = 5; + dims[1] = 20; + if(H5Dset_extent(srcdset[1], dims) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to new area of srcdset */ + count[1] = 10; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if((filespace = H5Dget_space(srcdset[1])) < 0) + TEST_ERROR + start[1] = 10; + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 5; i++) + for(j = 0; j < 10; j++) + erbuf[i + 5][j + 10] = buf[i][j]; + + /* Close srcdset[1] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions. Note that since we are using + * H5D_VDS_FIRST_MISSING and we only extended one source dataset the + * dimensions will not have changed. */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 20) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Update erbuf to reflect new data that is no longer visible due to the + * change to H5D_VDS_FIRST_MISSING */ + for(i = 5; i < 10; i++) + for(j = 15; j < 20; j++) + erbuf[i][j] = -1; + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 15) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close */ + if(!(config & TEST_IO_CLOSE_SRC)) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + else if(!(config & TEST_IO_DIFFERENT_FILE)) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + if(H5Sclose(vspace[1]) < 0) + TEST_ERROR + vspace[1] = -1; + + + /* + * Test 2: 2 Source datasets, interleaved slices, single element wide + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + dims[0] = 10; + dims[1] = 10; + if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + if((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + + /* Create source dataspace */ + dims[1] = 5; + mdims[1] = 10; + if((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + mdims[1] = 20; + + /* Select hyperslab in source space */ + start[0] = 0; + start[1] = 0; + count[0] = 10; + count[1] = H5S_UNLIMITED; + if(H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual spaces */ + start[0] = 0; + start[1] = 0; + stride[0] = 1; + stride[1] = 2; + count[0] = 1; + count[1] = H5S_UNLIMITED; + block[0] = 10; + block[1] = 1; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + start[1] = 1; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + + /* Add virtual layout mappings */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2", srcspace[0]) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create source datasets */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] = (i * (int)mdims[1]) + j; + + /* Initialize erbuf */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + erbuf[i][j] = -1; + + /* Write data directly to source datasets */ + /* Select hyperslab in memory */ + start[0] = 0; + start[1] = 0; + count[0] = 10; + count[1] = 5; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Write first dataset */ + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + erbuf[i][2 * j] = buf[i][j]; + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write second dataset */ + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + erbuf[i][(2 * j) + 1] = buf[i][j]; + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Reopen srcdset[0] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Extend srcdset[0] */ + dims[1] = 7; + if(H5Dset_extent(srcdset[0], dims) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to new area of srcdset */ + count[1] = 2; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if((filespace = H5Dget_space(srcdset[0])) < 0) + TEST_ERROR + start[1] = 5; + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf to reflect only new data that is now visible under + * H5D_VDS_FIRST_MISSING (first slice) */ + for(i = 0; i < 10; i++) + erbuf[i][10] = buf[i][0]; + + /* Close srcdset[0] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions. Note that since we are using + * H5D_VDS_FIRST_MISSING and we only extended one source dataset the + * dimension will only changed to add one more slice. */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 11) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Update erbuf to reflect new data that is now visible due to the change to + * H5D_VDS_LAST_AVAILABLE (second new slice) */ + for(i = 0; i < 10; i++) + erbuf[i][12] = buf[i][1]; + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 13) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Reopen srcdset[1] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Extend srcdset[1] */ + dims[1] = 10; + if(H5Dset_extent(srcdset[1], dims) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to new area of srcdset */ + count[1] = 5; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if((filespace = H5Dget_space(srcdset[1])) < 0) + TEST_ERROR + start[1] = 5; + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + erbuf[i][(2 * j) + 11] = buf[i][j]; + + /* Close srcdset[1] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions. Note that since we are using + * H5D_VDS_FIRST_MISSING and we only extended one source dataset the + * dimensions will not have changed. */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 20) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Update erbuf to reflect new data that is no longer visible due to the + * change to H5D_VDS_FIRST_MISSING */ + for(i = 0; i < 10; i++) + for(j = 15; j < 20; j += 2) + erbuf[i][j] = -1; + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 14) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close */ + if(!(config & TEST_IO_CLOSE_SRC)) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + else if(!(config & TEST_IO_DIFFERENT_FILE)) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + if(H5Sclose(vspace[1]) < 0) + TEST_ERROR + vspace[1] = -1; + + + /* Close */ + if(H5Pclose(dcpl) < 0) + TEST_ERROR + dcpl = -1; + if(H5Pclose(srcdcpl) < 0) + TEST_ERROR + dcpl = -1; + if(H5Pclose(dapl) < 0) + TEST_ERROR + dapl = -1; + if(H5Sclose(memspace) < 0) + TEST_ERROR + memspace = -1; + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) { + if(srcdset[i] >= 0) + (void)H5Dclose(srcdset[i]); + } /* end for */ + if(vdset >= 0) + (void)H5Dclose(vdset); + for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++) { + if(srcfile[i] >= 0) + (void)H5Fclose(srcfile[i]); + } /* end for */ + if(vfile >= 0) + (void)H5Fclose(vfile); + for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) { + if(srcspace[i] >= 0) + (void)H5Sclose(srcspace[i]); + } /* end for */ + for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) { + if(vspace[i] >= 0) + (void)H5Sclose(vspace[i]); + } /* end for */ + if(filespace >= 0) + (void)H5Sclose(filespace); + if(memspace >= 0) + (void)H5Sclose(memspace); + if(dcpl >= 0) + (void)H5Pclose(dcpl); + if(srcdcpl >= 0) + (void)H5Pclose(srcdcpl); + if(dapl >= 0) + (void)H5Pclose(dapl); + } H5E_END_TRY; + + return 1; +} /* end test_unlim() */ + + +/*------------------------------------------------------------------------- * Function: main * * Purpose: Tests datasets with virtual layout @@ -2583,6 +3875,7 @@ main(void) for(bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) { printf("Config: %s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "", bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file"); nerrors += test_basic_io(bit_config, fapl); + nerrors += test_unlim(bit_config, fapl); } /* end for */ /* Verify symbol table messages are cached */ -- cgit v0.12 From f7e10b55ab75857e8a5bade01749842b060b5783 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 12 May 2015 10:39:10 -0500 Subject: [svn-r27053] Add more tests for unlimited selections. Fix off by 1 error involving minimum extent of VDS. Other minor fixes/cleanup. Tested: ummon --- examples/h5_vds-percival-unlim-maxmin.c | 4 +- src/H5Dvirtual.c | 8 +- src/H5Shyper.c | 5 +- test/vds.c | 894 +++++++++++++++++++++++++++++++- 4 files changed, 888 insertions(+), 23 deletions(-) diff --git a/examples/h5_vds-percival-unlim-maxmin.c b/examples/h5_vds-percival-unlim-maxmin.c index 4640b94..feace69 100644 --- a/examples/h5_vds-percival-unlim-maxmin.c +++ b/examples/h5_vds-percival-unlim-maxmin.c @@ -211,13 +211,13 @@ main (void) dapl = H5Pcreate (H5P_DATASET_ACCESS); for(i = 0; i < 2; i++) { - status = H5Pset_virtual_dataspace_bounds (dapl, i ? H5D_VDS_MAX : H5D_VDS_MIN); + status = H5Pset_virtual_view (dapl, i ? H5D_VDS_LAST_AVAILABLE : H5D_VDS_FIRST_MISSING); vdset = H5Dopen (vfile, DATASET, dapl); /* Let's get space of the VDS and its dimension; we should get 32(or 20)x10x10 */ vspace = H5Dget_space (vdset); H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out); - printf ("VDS dimensions, bounds = H5D_VDS_M%s: ", i ? "AX" : "IN"); + printf ("VDS dimensions, bounds = H5D_VDS_%s: ", i ? "LAST_AVAILABLE" : "FIRST_MISSING"); for (j=0; jstorage.u.virt.list[idx].unlim_dim_virtual) - && (bounds_end[i] > layout->storage.u.virt.min_dims[i])) - layout->storage.u.virt.min_dims[i] = bounds_end[i]; + && (bounds_end[i] >= layout->storage.u.virt.min_dims[i])) + layout->storage.u.virt.min_dims[i] = bounds_end[i] + (hsize_t)1; done: FUNC_LEAVE_NOAPI(ret_value) @@ -422,8 +422,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) for(i = 0; i < (size_t)rank; i++) { if(new_dims[i] == HSIZE_UNDEF) new_dims[i] = curr_dims[i]; - if(new_dims[i] < storage->min_dims[i]) { - HDassert(0 && "Checking code coverage..."); //VDSINC + else if(new_dims[i] < storage->min_dims[i]) { + //HDassert(0 && "Checking code coverage..."); //VDSINC new_dims[i] = storage->min_dims[i]; } //VDSINC if(new_dims[i] != curr_dims[i]) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 468f87e..4e82aed 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -9956,9 +9956,7 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, rem_slices = num_slices - (count * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block); - if(rem_slices > 0) { - HDassert(incl_trail && "Checking code coverage..."); //VDSINC - HDassert(!incl_trail && "Checking code coverage..."); //VDSINC + if(rem_slices > 0) /* Must end extent in middle of partial block (or beginning of empty * block if include_trailing_space and rem_slices == 0) */ *clip_size = @@ -9966,7 +9964,6 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, + (count * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride) + rem_slices; - } /* end if */ else { if(incl_trail) /* End extent just before first missing block */ diff --git a/test/vds.c b/test/vds.c index 033c228..40d2f8d 100644 --- a/test/vds.c +++ b/test/vds.c @@ -2594,7 +2594,6 @@ test_unlim(unsigned config, hid_t fapl) hsize_t stride[4]; /* Hyperslab stride */ hsize_t count[4]; /* Hyperslab count */ hsize_t block[4]; /* Hyperslab block */ - hsize_t coord[10]; /* Point selection array */ int buf[10][20]; /* Write and expected read buffer */ int rbuf[10][20]; /* Read buffer */ int erbuf[10][20]; /* Expected read buffer */ @@ -3103,6 +3102,30 @@ test_unlim(unsigned config, hid_t fapl) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR + /* Now just read middle 2 rows */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + start[0] = 4; + count[0] = 2; + count[1] = 20; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, memspace, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data - algorithmically check for only 2 middle rows being + * read so we don't have to wipe out erbuf and then restore it afterwards */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if((i == 4) || (i == 5)) { + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != -1) + TEST_ERROR + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING */ if(H5Dclose(vdset) < 0) TEST_ERROR @@ -3151,6 +3174,7 @@ test_unlim(unsigned config, hid_t fapl) rbuf[i][j] = -1; /* Select hyperslab in memory space */ + start[0] = 0; start[1] = 0; if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) TEST_ERROR @@ -3230,8 +3254,6 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR /* Select hyperslabs in virtual spaces */ - start[0] = 0; - start[1] = 0; stride[0] = 1; stride[1] = 2; count[0] = 1; @@ -3243,6 +3265,7 @@ test_unlim(unsigned config, hid_t fapl) start[1] = 1; if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) TEST_ERROR + start[1] = 0; /* Add virtual layout mappings */ if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) @@ -3287,8 +3310,6 @@ test_unlim(unsigned config, hid_t fapl) /* Write data directly to source datasets */ /* Select hyperslab in memory */ - start[0] = 0; - start[1] = 0; count[0] = 10; count[1] = 5; if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) @@ -3459,6 +3480,7 @@ test_unlim(unsigned config, hid_t fapl) start[1] = 5; if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) TEST_ERROR + start[1] = 0; if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) TEST_ERROR @@ -3486,7 +3508,7 @@ test_unlim(unsigned config, hid_t fapl) /* Get VDS space dimensions. Note that since we are using * H5D_VDS_FIRST_MISSING and we only extended one source dataset the - * dimension will only changed to add one more slice. */ + * dimension will only have changed to add one more slice. */ if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) TEST_ERROR if(ndims != 2) @@ -3516,7 +3538,6 @@ test_unlim(unsigned config, hid_t fapl) rbuf[i][j] = -1; /* Select hyperslab in memory space */ - start[1] = 0; if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) TEST_ERROR @@ -3577,7 +3598,6 @@ test_unlim(unsigned config, hid_t fapl) rbuf[i][j] = -1; /* Select hyperslab in memory space */ - start[1] = 0; if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) TEST_ERROR @@ -3619,6 +3639,7 @@ test_unlim(unsigned config, hid_t fapl) start[1] = 5; if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) TEST_ERROR + start[1] = 0; if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) TEST_ERROR @@ -3644,9 +3665,7 @@ test_unlim(unsigned config, hid_t fapl) if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR - /* Get VDS space dimensions. Note that since we are using - * H5D_VDS_FIRST_MISSING and we only extended one source dataset the - * dimensions will not have changed. */ + /* Get VDS space dimensions */ if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) TEST_ERROR if(ndims != 2) @@ -3676,7 +3695,6 @@ test_unlim(unsigned config, hid_t fapl) rbuf[i][j] = -1; /* Select hyperslab in memory space */ - start[1] = 0; if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) TEST_ERROR @@ -3690,6 +3708,31 @@ test_unlim(unsigned config, hid_t fapl) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR + /* Now just read middle 2 rows */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + start[0] = 4; + count[0] = 2; + count[1] = 20; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + start[0] = 0; + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, memspace, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data - algorithmically check for only 2 middle rows being + * read so we don't have to wipe out erbuf and then restore it afterwards */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if((i == 4) || (i == 5)) { + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != -1) + TEST_ERROR + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING */ if(H5Dclose(vdset) < 0) TEST_ERROR @@ -3738,7 +3781,6 @@ test_unlim(unsigned config, hid_t fapl) rbuf[i][j] = -1; /* Select hyperslab in memory space */ - start[1] = 0; if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) TEST_ERROR @@ -3786,6 +3828,832 @@ test_unlim(unsigned config, hid_t fapl) vspace[1] = -1; + /* + * Test 3: 3 Source datasets, interleaved slices, two elements wide + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + dims[0] = 10; + dims[1] = 10; + if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + if((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + if((vspace[2] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + + /* Create source dataspaces */ + dims[1] = 4; + mdims[1] = 8; + if((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + dims[1] = 4; + mdims[1] = 6; + if((srcspace[1] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + dims[1] = 2; + mdims[1] = 6; + if((srcspace[2] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + mdims[1] = 20; + + /* Select hyperslab in source spaces */ + start[0] = 0; + start[1] = 0; + count[0] = 10; + count[1] = H5S_UNLIMITED; + if(H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if(H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if(H5Sselect_hyperslab(srcspace[2], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual spaces */ + stride[0] = 1; + stride[1] = 6; + count[0] = 1; + count[1] = H5S_UNLIMITED; + block[0] = 10; + block[1] = 2; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + start[1] = 2; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + start[1] = 4; + if(H5Sselect_hyperslab(vspace[2], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + start[1] = 0; + + /* Add virtual layout mappings */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2", srcspace[1]) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[2], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset3", srcspace[2]) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create source datasets */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset3", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] = (i * (int)mdims[1]) + j; + + /* Initialize erbuf */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + erbuf[i][j] = -1; + + /* Write data directly to source datasets */ + /* Select hyperslab in memory */ + count[0] = 10; + count[1] = 4; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Write first dataset */ + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 2; j++) { + erbuf[i][6 * j] = buf[i][2 * j]; + erbuf[i][(6 * j) + 1] = buf[i][(2 * j) + 1]; + } /* end for */ + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write second dataset */ + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 2; j++) { + erbuf[i][(6 * j) + 2] = buf[i][2 * j]; + erbuf[i][(6 * j) + 3] = buf[i][(2 * j) + 1]; + } /* end for */ + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Select hyperslab in memory */ + count[0] = 10; + count[1] = 2; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Write third dataset */ + if(H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) { + erbuf[i][4] = buf[i][0]; + erbuf[i][5] = buf[i][1]; + } /* end for */ + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Dclose(srcdset[2]) < 0) + TEST_ERROR + srcdset[2] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Reopen srcdset[0] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Extend srcdset[0] */ + dims[1] = 7; + if(H5Dset_extent(srcdset[0], dims) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to new area of srcdset */ + count[1] = 3; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if((filespace = H5Dget_space(srcdset[0])) < 0) + TEST_ERROR + start[1] = 4; + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + start[1] = 0; + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Close srcdset[0] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions. Note that since we are using + * H5D_VDS_FIRST_MISSING the size will not have changed. */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Update erbuf to reflect new data that is now visible due to the change to + * H5D_VDS_LAST_AVAILABLE (second new slice) */ + /* Update erbuf to reflect only new data that is now visible under + * H5D_VDS_FIRST_MISSING (first slice) */ + for(i = 0; i < 10; i++) { + erbuf[i][12] = buf[i][0]; + erbuf[i][13] = buf[i][1]; + erbuf[i][18] = buf[i][2]; + } /* end for */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 19) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Reopen srcdset[2] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[2] = H5Dopen2(srcfile[0], "src_dset3", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Extend srcdset[2] */ + dims[1] = 5; + if(H5Dset_extent(srcdset[2], dims) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to new area of srcdset */ + count[1] = 3; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if((filespace = H5Dget_space(srcdset[2])) < 0) + TEST_ERROR + start[1] = 2; + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + start[1] = 0; + if(H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) { + erbuf[i][10] = buf[i][0]; + erbuf[i][11] = buf[i][1]; + erbuf[i][16] = buf[i][2]; + } /* end for */ + + /* Close srcdset[2] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[2]) < 0) + TEST_ERROR + srcdset[2] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions. Note that the dimensions will not have + * changed. */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 19) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 14) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data - algorithmically check for no data past the extent so + * we don't have to wipe out erbuf and then restore it afterwards */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(j < 14) { + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != -1) + TEST_ERROR + + /* Reopen srcdset[1] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Extend srcdset[1] */ + dims[1] = 6; + if(H5Dset_extent(srcdset[1], dims) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to new area of srcdset */ + count[1] = 2; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if((filespace = H5Dget_space(srcdset[1])) < 0) + TEST_ERROR + start[1] = 4; + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + start[1] = 0; + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) { + erbuf[i][14] = buf[i][0]; + erbuf[i][15] = buf[i][1]; + } /* end for */ + + /* Close srcdset[1] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 17) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data - algorithmically check for no data past the extent so + * we don't have to wipe out erbuf and then restore it afterwards */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(j < 17) { + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != -1) + TEST_ERROR + + /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 19) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Now just read middle 2 rows */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + start[0] = 4; + count[0] = 2; + count[1] = 19; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + start[0] = 0; + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Verify read data - algorithmically check for only 2 middle rows being + * read so we don't have to wipe out erbuf and then restore it afterwards */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if((i == 4) || (i == 5)) { + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != -1) + TEST_ERROR + + /* Close */ + if(!(config & TEST_IO_CLOSE_SRC)) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Dclose(srcdset[2]) < 0) + TEST_ERROR + srcdset[2] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + else if(!(config & TEST_IO_DIFFERENT_FILE)) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(srcspace[1]) < 0) + TEST_ERROR + srcspace[1] = -1; + if(H5Sclose(srcspace[2]) < 0) + TEST_ERROR + srcspace[2] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + if(H5Sclose(vspace[1]) < 0) + TEST_ERROR + vspace[1] = -1; + + /* Close */ if(H5Pclose(dcpl) < 0) TEST_ERROR -- cgit v0.12 From 9a8c664ff0d9884b8ce2bde543685245cb73f6bb Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 22 May 2015 11:35:58 -0500 Subject: [svn-r27104] Add support for printf-style source dataset name resolution. Passes use case test, no regression tests yet. Add functions H5Pset/get_virtual_printf_gap (not tested yet). Other minor fixes/cleanup. Tested: ummon --- src/H5Dint.c | 25 +- src/H5Dprivate.h | 6 + src/H5Dvirtual.c | 1392 ++++++++++++++++++++++++++++++++++++++++-------------- src/H5Olayout.c | 41 +- src/H5Oprivate.h | 27 +- src/H5Pdapl.c | 94 +++- src/H5Pdcpl.c | 124 +++-- src/H5Ppublic.h | 2 + src/H5Shyper.c | 88 +++- src/H5Sprivate.h | 2 + 10 files changed, 1378 insertions(+), 423 deletions(-) diff --git a/src/H5Dint.c b/src/H5Dint.c index c1e3ad0..c3c13ef 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1556,18 +1556,30 @@ H5D_close(H5D_t *dataset) case H5D_VIRTUAL: { - size_t i; + size_t i, j; HDassert(dataset->shared->layout.storage.u.virt.list || (dataset->shared->layout.storage.u.virt.list_nused == 0)); /* Close source datasets */ - for(i = 0; i < dataset->shared->layout.storage.u.virt.list_nused; i++) - if(dataset->shared->layout.storage.u.virt.list[i].source_dset) { - HDassert(dataset->shared->layout.storage.u.virt.list[i].source_dset != dataset); - if(H5D_close(dataset->shared->layout.storage.u.virt.list[i].source_dset) < 0) + for(i = 0; i < dataset->shared->layout.storage.u.virt.list_nused; i++) { + /* Close source dataset */ + if(dataset->shared->layout.storage.u.virt.list[i].source_dset.dset) { + HDassert(dataset->shared->layout.storage.u.virt.list[i].source_dset.dset != dataset); + if(H5D_close(dataset->shared->layout.storage.u.virt.list[i].source_dset.dset) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to close source dataset") - dataset->shared->layout.storage.u.virt.list[i].source_dset = NULL; + dataset->shared->layout.storage.u.virt.list[i].source_dset.dset = NULL; } /* end if */ + + /* Close sub datasets */ + for(j = 0; j < dataset->shared->layout.storage.u.virt.list[i].sub_dset_nused; j++) + if(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + HDassert(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset != dataset); + if(H5D_close(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to close source dataset") + dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset = NULL; + } /* end if */ + } /* end for */ } /* end block */ break; @@ -2921,3 +2933,4 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D_get_type() */ + diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index 35927ff..27585ba 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -53,6 +53,7 @@ #define H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME "rdcc_nbytes" /* Size of raw data chunk cache(bytes) */ #define H5D_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */ #define H5D_ACS_VDS_VIEW_NAME "vds_view" /* VDS view option */ +#define H5D_ACS_VDS_PRINTF_GAP_NAME "vds_printf_gap" /* VDS printf gap size */ /* ======== Data transfer properties ======== */ #define H5D_XFER_MAX_TEMP_BUF_NAME "max_temp_buf" /* Maximum temp buffer size */ @@ -180,6 +181,11 @@ H5_DLL herr_t H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_ad /* Functions that operate on virtual storage */ H5_DLL herr_t H5D_virtual_update_min_dims(H5O_layout_t *layout, size_t idx); +H5_DLL herr_t H5D_virtual_parse_source_name(const char *source_name, + H5O_storage_virtual_name_seg_t **parsed_name, size_t *static_strlen, + size_t *nsubs); +H5_DLL void H5D_virtual_free_parsed_name( + H5O_storage_virtual_name_seg_t *name_seg); /* Functions that operate on indexed storage */ H5_DLL herr_t H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 9bc154c..87cbd21 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -34,6 +34,7 @@ #include "H5Dpkg.h" /* Dataset functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* Files */ +#include "H5FLprivate.h" /* Free Lists */ #include "H5Gprivate.h" /* Groups */ #include "H5HGprivate.h" /* Global Heaps */ #include "H5Iprivate.h" /* IDs */ @@ -46,6 +47,9 @@ /* Local Macros */ /****************/ +/* Default size for sub_dset array */ +#define H5D_VIRTUAL_DEF_SUB_DSET_SIZE 128 + /******************/ /* Local Typedefs */ @@ -70,7 +74,26 @@ static herr_t H5D__virtual_flush(H5D_t *dset, hid_t dxpl_id); /* Other functions */ static herr_t H5D__virtual_open_source_dset(const H5D_t *vdset, - H5O_storage_virtual_ent_t *virtual_ent, hid_t dxpl_id); + H5O_storage_virtual_ent_t *virtual_ent, + H5O_storage_virtual_srcdset_t *source_dset, hid_t dxpl_id); +static herr_t H5D__virtual_reset_source_dset( + H5O_storage_virtual_ent_t *virtual_ent, + H5O_storage_virtual_srcdset_t *source_dset); +static herr_t H5D__virtual_str_append(const char *src, size_t src_len, char **p, + char **buf, size_t *buf_size); +static herr_t H5D__virtual_copy_parsed_name( + H5O_storage_virtual_name_seg_t **dst, H5O_storage_virtual_name_seg_t *src); +static herr_t H5D__virtual_build_source_name(char *source_name, + const H5O_storage_virtual_name_seg_t *parsed_name, size_t static_strlen, + size_t nsubs, hsize_t blockno, char **built_name); +static herr_t H5D__virtual_read_one(H5D_io_info_t *io_info, + const H5D_type_info_t *type_info, const H5S_t *file_space, + const H5S_t *mem_space, H5O_storage_virtual_ent_t *virtual_ent, + H5O_storage_virtual_srcdset_t *source_dset); +static herr_t H5D__virtual_write_one(H5D_io_info_t *io_info, + const H5D_type_info_t *type_info, const H5S_t *file_space, + const H5S_t *mem_space, H5O_storage_virtual_ent_t *virtual_ent, + H5O_storage_virtual_srcdset_t *source_dset); /*********************/ @@ -100,6 +123,69 @@ const H5D_layout_ops_t H5D_LOPS_VIRTUAL[1] = {{ /* Local Variables */ /*******************/ +/* Declare a free list to manage the H5O_storage_virtual_name_seg_t struct */ +H5FL_DEFINE(H5O_storage_virtual_name_seg_t); + + + +/*------------------------------------------------------------------------- + * Function: H5D_virtual_update_min_dims + * + * Purpose: Updates the virtual layout's "min_dims" field to take into + * account the "idx"th entry in the mapping list. The entry + * must be complete, though top level fields list_nused does + * (and of course min_dims) do not need to take it into + * account. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * February 10, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D_virtual_update_min_dims(H5O_layout_t *layout, size_t idx) +{ + H5S_sel_type sel_type; + int rank; + hsize_t bounds_start[H5S_MAX_RANK]; + hsize_t bounds_end[H5S_MAX_RANK]; + int i; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI(FAIL) + + HDassert(layout); + HDassert(layout->type == H5D_VIRTUAL); + HDassert(idx < layout->storage.u.virt.list_nalloc); + + /* Get type of selection */ + if(H5S_SEL_ERROR == (sel_type = H5S_GET_SELECT_TYPE(layout->storage.u.virt.list[idx].source_dset.virtual_select))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection type") + + /* Do not update min_dims for "all" or "none" selections */ + if((sel_type == H5S_SEL_ALL) || (sel_type == H5S_SEL_NONE)) + HGOTO_DONE(SUCCEED) + + /* Get rank of vspace */ + if((rank = H5S_GET_EXTENT_NDIMS(layout->storage.u.virt.list[idx].source_dset.virtual_select)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions") + + /* Get selection bounds */ + if(H5S_SELECT_BOUNDS(layout->storage.u.virt.list[idx].source_dset.virtual_select, bounds_start, bounds_end) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") + + /* Update min_dims */ + for(i = 0; i < rank; i++) + /* Don't check unlimited dimensions in the selection */ + if((i != layout->storage.u.virt.list[idx].unlim_dim_virtual) + && (bounds_end[i] >= layout->storage.u.virt.min_dims[i])) + layout->storage.u.virt.min_dims[i] = bounds_end[i] + (hsize_t)1; + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D_virtual_update_min_dims() */ /*------------------------------------------------------------------------- @@ -140,21 +226,29 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "unable to allocate memory for virtual dataset entry list") layout->storage.u.virt.list_nalloc = layout->storage.u.virt.list_nused; - /* Copy the list entries, though set source_dset to NULL */ + /* Copy the list entries, though set source_dset.dset and sub_dset to + * NULL */ for(i = 0; i < layout->storage.u.virt.list_nused; i++) { - if(NULL == (layout->storage.u.virt.list[i].source_file_name - = HDstrdup(orig_list[i].source_file_name))) + if(NULL == (layout->storage.u.virt.list[i].source_dset.file_name + = HDstrdup(orig_list[i].source_dset.file_name))) HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source file name") - if(NULL == (layout->storage.u.virt.list[i].source_dset_name - = HDstrdup(orig_list[i].source_dset_name))) + if(NULL == (layout->storage.u.virt.list[i].source_dset.dset_name + = HDstrdup(orig_list[i].source_dset.dset_name))) HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source dataset name") + if(NULL == (layout->storage.u.virt.list[i].source_dset.virtual_select + = H5S_copy(orig_list[i].source_dset.virtual_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") if(NULL == (layout->storage.u.virt.list[i].source_select = H5S_copy(orig_list[i].source_select, FALSE, TRUE))) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") - if(NULL == (layout->storage.u.virt.list[i].virtual_select - = H5S_copy(orig_list[i].virtual_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") - layout->storage.u.virt.list[i].source_dset = NULL; + if(H5D__virtual_copy_parsed_name(&layout->storage.u.virt.list[i].parsed_source_file_name, orig_list[i].parsed_source_file_name) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy parsed source file name") + layout->storage.u.virt.list[i].psfn_static_strlen = orig_list[i].psfn_static_strlen; + layout->storage.u.virt.list[i].psfn_nsubs = orig_list[i].psfn_nsubs; + if(H5D__virtual_copy_parsed_name(&layout->storage.u.virt.list[i].parsed_source_dset_name, orig_list[i].parsed_source_dset_name) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy parsed source dataset name") + layout->storage.u.virt.list[i].psdn_static_strlen = orig_list[i].psdn_static_strlen; + layout->storage.u.virt.list[i].psdn_nsubs = orig_list[i].psdn_nsubs; layout->storage.u.virt.list[i].unlim_dim_source = orig_list[i].unlim_dim_source; layout->storage.u.virt.list[i].unlim_dim_virtual = orig_list[i].unlim_dim_virtual; layout->storage.u.virt.list[i].unlim_extent_source = orig_list[i].unlim_extent_source; @@ -184,132 +278,624 @@ done: /*------------------------------------------------------------------------- - * Function: H5D_virtual_update_min_dims + * Function: H5D__virtual_reset_layout * - * Purpose: Updates the virtual layout's "min_dims" field to take into - * account the "idx"th entry in the mapping list. The entry - * must be complete, though top level fields list_nused does - * (and of course min_dims) do not need to take it into - * account. + * Purpose: Frees internal structures in a virtual storage layout + * message in memory. This function is safe to use on + * incomplete structures (for recovery from failure) provided + * the internal structures are initialized with all bytes set + * to 0. * * Return: Non-negative on success/Negative on failure * * Programmer: Neil Fortner - * February 10, 2015 + * February 11, 2015 * *------------------------------------------------------------------------- */ herr_t -H5D_virtual_update_min_dims(H5O_layout_t *layout, size_t idx) +H5D__virtual_reset_layout(H5O_layout_t *layout) { - H5S_sel_type sel_type; - int rank; - hsize_t bounds_start[H5S_MAX_RANK]; - hsize_t bounds_end[H5S_MAX_RANK]; - int i; + size_t i, j; herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE HDassert(layout); HDassert(layout->type == H5D_VIRTUAL); - HDassert(idx < layout->storage.u.virt.list_nalloc); - /* Get type of selection */ - if(H5S_SEL_ERROR == (sel_type = H5S_GET_SELECT_TYPE(layout->storage.u.virt.list[idx].virtual_select))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection type") + /* Free the list entries. Note we always attempt to free everything even in + * the case of a failure. Because of this, and because we free the list + * afterwards, we do not need to zero out the memory in the list. */ + for(i = 0; i < layout->storage.u.virt.list_nused; i++) { + /* Free source_dset */ + if(H5D__virtual_reset_source_dset(&layout->storage.u.virt.list[i], &layout->storage.u.virt.list[i].source_dset) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset source dataset") - /* Do not update min_dims for "all" or "none" selections */ - if((sel_type == H5S_SEL_ALL) || (sel_type == H5S_SEL_NONE)) - HGOTO_DONE(SUCCEED) + /* Free source_select */ + if(layout->storage.u.virt.list[i].source_select) + if(H5S_close(layout->storage.u.virt.list[i].source_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") - /* Get rank of vspace */ - if((rank = H5S_GET_EXTENT_NDIMS(layout->storage.u.virt.list[idx].virtual_select)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions") + /* Free sub_dset */ + for(j = 0; j < layout->storage.u.virt.list[i].sub_dset_nalloc; j++) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + if(H5D__virtual_reset_source_dset(&layout->storage.u.virt.list[i], &layout->storage.u.virt.list[i].sub_dset[j]) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset source dataset") + } //VDSINC + layout->storage.u.virt.list[i].sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_xfree(layout->storage.u.virt.list[i].sub_dset); - /* Get selection bounds */ - if(H5S_SELECT_BOUNDS(layout->storage.u.virt.list[idx].virtual_select, bounds_start, bounds_end) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") + /* Free parsed_source_file_name */ + H5D_virtual_free_parsed_name(layout->storage.u.virt.list[i].parsed_source_file_name); - /* Update min_dims */ - for(i = 0; i < rank; i++) - /* Don't check unlimited dimensions in the selection */ - if((i != layout->storage.u.virt.list[idx].unlim_dim_virtual) - && (bounds_end[i] >= layout->storage.u.virt.min_dims[i])) - layout->storage.u.virt.min_dims[i] = bounds_end[i] + (hsize_t)1; + /* Free parsed_source_dset_name */ + H5D_virtual_free_parsed_name(layout->storage.u.virt.list[i].parsed_source_dset_name); + } /* end for */ + + /* Free the list */ + layout->storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_xfree(layout->storage.u.virt.list); + layout->storage.u.virt.list_nalloc = (size_t)0; + layout->storage.u.virt.list_nused = (size_t)0; + (void)HDmemset(layout->storage.u.virt.min_dims, 0, sizeof(layout->storage.u.virt.min_dims)); + + /* Note the lack of a done: label. This is because there are no HGOTO_ERROR + * calls. If one is added, a done: label must also be added */ + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__virtual_reset_layout() */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_delete + * + * Purpose: Delete the file space for a virtual dataset + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * February 6, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_PACKAGE + + /* check args */ + HDassert(f); + HDassert(storage); + HDassert(storage->type == H5D_VIRTUAL); + + /* Delete the global heap block */ + if(H5HG_remove(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "Unable to remove heap object") + + /* Clear global heap ID in storage */ + storage->u.virt.serial_list_hobjid.addr = HADDR_UNDEF; + storage->u.virt.serial_list_hobjid.idx = 0; done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D_virtual_update_min_dims() */ +} /* end H5D__virtual_delete */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_open_source_dset + * + * Purpose: Attempts to open a source dataset. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * March 6, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5D__virtual_open_source_dset(const H5D_t *vdset, + H5O_storage_virtual_ent_t *virtual_ent, + H5O_storage_virtual_srcdset_t *source_dset, hid_t dxpl_id) +{ + H5F_t *src_file = NULL; /* Source file */ + hbool_t src_file_open = FALSE; /* Whether we have opened and need to close src_file */ + H5G_loc_t src_root_loc; /* Object location of source file root group */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity check */ + HDassert(vdset); + HDassert(source_dset); + HDassert(!source_dset->dset); + HDassert(source_dset->file_name); + HDassert(source_dset->dset_name); + + /* Get dapl and fapl from current (virtual dataset) location? VDSINC */ + /* Write code to check if these exist and return without opening dset + * otherwise VDSINC */ + + /* Check if we need to open the source file */ + if(HDstrcmp(source_dset->file_name, ".")) { + /* Open the source file */ + if(NULL == (src_file = H5F_open(source_dset->file_name, H5F_INTENT(vdset->oloc.file) & H5F_ACC_RDWR, H5P_FILE_CREATE_DEFAULT, H5P_FILE_ACCESS_DEFAULT, dxpl_id))) + H5E_clear_stack(NULL); //Quick hack until proper support for H5Fopen with missing file is implemented VDSINC HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENFILE, FAIL, "unable to open source file") + else + src_file_open = TRUE; + } /* end if */ + else + /* Source file is ".", use the virtual dataset's file */ + src_file = vdset->oloc.file; + + if(src_file) { + /* Set up the root group in the destination file */ + if(NULL == (src_root_loc.oloc = H5G_oloc(H5G_rootof(src_file)))) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to get object location for root group") + if(NULL == (src_root_loc.path = H5G_nameof(H5G_rootof(src_file)))) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to get path for root group") + + /* Open the source dataset */ + if(NULL == (source_dset->dset = H5D__open_name(&src_root_loc, source_dset->dset_name, H5P_DATASET_ACCESS_DEFAULT, dxpl_id))) + H5E_clear_stack(NULL); //Quick hack until proper support for H5Fopen with missing file is implemented VDSINC HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset") + else + /* Patch the source selection if necessary */ + if(virtual_ent->source_space_status != H5O_VIRTUAL_STATUS_CORRECT) { + if(H5S_extent_copy(virtual_ent->source_select, source_dset->dset->shared->space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent") + virtual_ent->source_space_status = H5O_VIRTUAL_STATUS_CORRECT; + } /* end if */ + } /* end if */ + +done: + /* Close source file */ + if(src_file_open) + if(H5F_try_close(src_file) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEFILE, FAIL, "can't close source file") + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__virtual_open_source_dset() */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_reset_source_dset + * + * Purpose: Frees space reference by a source dataset struct. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * May 20, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent, + H5O_storage_virtual_srcdset_t *source_dset) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity check */ + HDassert(source_dset); + + /* Free dataset */ + if(source_dset->dset) { + if(H5D_close(source_dset->dset) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to close source dataset") + source_dset->dset = NULL; + } /* end if */ + + /* Free file name */ + if((source_dset == &virtual_ent->source_dset) + || virtual_ent->parsed_source_file_name) + source_dset->file_name = (char *)H5MM_xfree(source_dset->file_name); + + /* Free dataset name */ + if((source_dset == &virtual_ent->source_dset) + || virtual_ent->parsed_source_dset_name) + source_dset->dset_name = (char *)H5MM_xfree(source_dset->dset_name); + + /* Free virtual selection */ + if(source_dset->virtual_select) { + if(H5S_close(source_dset->virtual_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release virtual selection") + source_dset->virtual_select = NULL; + } /* end if */ + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__virtual_reset_source_dset() */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_str_append + * + * Purpose: Appends src_len bytes of the string src to the position *p + * in the buffer *buf (allocating *buf if necessary). + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * May 19, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf, + size_t *buf_size) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity check */ + HDassert(src); + HDassert(src_len > 0); + HDassert(p); + HDassert(buf); + HDassert(*p >= *buf); + HDassert(buf_size); + + /* Allocate or extend buffer if necessary */ + if(!*buf) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + HDassert(!*p); + HDassert(*buf_size == 0); + + /* Allocate buffer */ + if(NULL == (*buf = (char *)H5MM_malloc(src_len + (size_t)1))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate name segment struct") + *buf_size = src_len + (size_t)1; + *p = *buf; + } /* end if */ + else if(((size_t)(*p - *buf) + src_len + (size_t)1) > *buf_size) { + HDassert(0 && "Checking code coverage..."); //VDSINC + char *tmp_buf; + size_t tmp_buf_size; + + /* Calculate new size of buffer */ + tmp_buf_size = MAX((size_t)(*p - *buf) + src_len + (size_t)1, + *buf_size * (size_t)2); + + /* Reallocate buffer */ + if(NULL == (tmp_buf = (char *)H5MM_realloc(*buf, tmp_buf_size))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to reallocate name segment buffer") + *buf = tmp_buf; + *buf_size = tmp_buf_size; + } /* end if */ + + /* Copy string to *p. Note that since src in not NULL terminated, we must + * use memcpy */ + (void)HDmemcpy(*p, src, src_len); + + /* Advance *p */ + *p += src_len; + + /* Add NULL terminator */ + **p = '\0'; + +done: + FUNC_LEAVE_NOAPI(ret_value); +} /* end H5D__virtual_str_append() */ + + +/*------------------------------------------------------------------------- + * Function: H5D_virtual_parse_source_name + * + * Purpose: Parses a source file or dataset name. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * May 18, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D_virtual_parse_source_name(const char *source_name, + H5O_storage_virtual_name_seg_t **parsed_name, size_t *static_strlen, + size_t *nsubs) +{ + H5O_storage_virtual_name_seg_t *tmp_parsed_name = NULL; + H5O_storage_virtual_name_seg_t **tmp_parsed_name_p = &tmp_parsed_name; + size_t tmp_static_strlen; + size_t tmp_strlen; + size_t tmp_nsubs = 0; + const char *p; + const char *pct; + char *name_seg_p = NULL; + size_t name_seg_size = 0; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + /* Sanity check */ + HDassert(source_name); + HDassert(parsed_name); + HDassert(static_strlen); + HDassert(nsubs); + + /* Initialize p and tmp_static_strlen */ + p = source_name; + tmp_static_strlen = tmp_strlen = HDstrlen(source_name); + + /* Iterate over name */ + /* Note this will not work with UTF-8! We should support this eventually + * -NAF 5/18/2015 */ + while((pct = HDstrchr(p, '%'))) { + HDassert(pct >= p); + + /* Allocate name segment struct if necessary */ + if(!*tmp_parsed_name_p) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + if(NULL == (*tmp_parsed_name_p = H5FL_CALLOC(H5O_storage_virtual_name_seg_t))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate name segment struct") + } //VDSINC + + /* Check for type of format specifier */ + if(pct[1] == 'b') { + /* Check for blank string before specifier */ + if(pct != p) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + /* Append string to name segment */ + if(H5D__virtual_str_append(p, (size_t)(pct - p), &name_seg_p, &(*tmp_parsed_name_p)->name_segment, + &name_seg_size) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to append name segment") + } //VDSINC + + /* Update other variables */ + tmp_parsed_name_p = &(*tmp_parsed_name_p)->next; + tmp_static_strlen -= 2; + tmp_nsubs++; + name_seg_p = NULL; + name_seg_size = 0; + } /* end if */ + else if(pct[1] == '%') { + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Append string to name segment (include first '%') */ + if(H5D__virtual_str_append(p, (size_t)(pct - p) + (size_t)1, &name_seg_p, &(*tmp_parsed_name_p)->name_segment, +&name_seg_size) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to append name segment") + + /* Update other variables */ + tmp_static_strlen -= 1; + } /* end else */ + else + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid format specifier") + + p = pct + 2; + } /* end while */ + + /* Copy last segment of name, if any, unless there were no substitutions */ + if(tmp_nsubs > 0) { + HDassert(p >= source_name); + if(*p == '\0') { + HDassert(0 && "Checking code coverage..."); //VDSINC + HDassert((size_t)(p - source_name) == tmp_strlen); + } //VDSINC + else { + HDassert((size_t)(p - source_name) < tmp_strlen); + + /* Allocate name segment struct if necessary */ + if(!*tmp_parsed_name_p) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + if(NULL == (*tmp_parsed_name_p = H5FL_CALLOC(H5O_storage_virtual_name_seg_t))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate name segment struct") + } /* end if */ + + /* Append string to name segment */ + if(H5D__virtual_str_append(p, tmp_strlen - (size_t)(p - source_name), &name_seg_p, &(*tmp_parsed_name_p)->name_segment, + &name_seg_size) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to append name segment") + } /* end else */ + } /* end if */ + + /* Set return values */ + *parsed_name = tmp_parsed_name; + tmp_parsed_name = NULL; + *static_strlen = tmp_static_strlen; + *nsubs = tmp_nsubs; + +done: + if(tmp_parsed_name) { + HDassert(ret_value < 0); + H5D_virtual_free_parsed_name(tmp_parsed_name); + } /* end if */ + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D_virtual_parse_source_name() */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_copy_parsed_name + * + * Purpose: Deep copies a parsed source file or dataset name. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * May 19, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst, + H5O_storage_virtual_name_seg_t *src) +{ + H5O_storage_virtual_name_seg_t *tmp_dst = NULL; + H5O_storage_virtual_name_seg_t *p_src = src; + H5O_storage_virtual_name_seg_t **p_dst = &tmp_dst; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_STATIC + + /* Sanity check */ + HDassert(dst); + + /* Walk over parsed name, duplicating it */ + while(p_src) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + /* Allocate name segment struct */ + if(NULL == (*p_dst = H5FL_CALLOC(H5O_storage_virtual_name_seg_t))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate name segment struct") + + /* Duplicate name segment */ + if(NULL == ((*p_dst)->name_segment = HDstrdup(p_src->name_segment))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to duplicate name segment") + + /* Advance pointers */ + p_src = p_src->next; + p_dst = &(*p_dst)->next; + } /* end while */ + + /* Set dst */ + *dst = tmp_dst; + tmp_dst = NULL; + +done: + if(tmp_dst) { + HDassert(ret_value < 0); + H5D_virtual_free_parsed_name(tmp_dst); + } /* end if */ + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__virtual_copy_parsed_name() */ + + +/*------------------------------------------------------------------------- + * Function: H5D_virtual_free_parsed_name + * + * Purpose: Frees the provided parsed name. + * + * Return: void + * + * Programmer: Neil Fortner + * May 19, 2015 + * + *------------------------------------------------------------------------- + */ +void +H5D_virtual_free_parsed_name(H5O_storage_virtual_name_seg_t *name_seg) +{ + H5O_storage_virtual_name_seg_t *next_seg; + + FUNC_ENTER_NOAPI_NOERR + + /* Walk name segments, freeing them */ + while(name_seg) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + (void)H5MM_xfree(name_seg->name_segment); + next_seg = name_seg->next; + (void)H5FL_FREE(H5O_storage_virtual_name_seg_t, name_seg); + name_seg = next_seg; + } /* end while */ + + FUNC_LEAVE_NOAPI_VOID +} /* end H5D_virtual_free_parsed_name() */ /*------------------------------------------------------------------------- - * Function: H5D__virtual_open_source_dset + * Function: H5D__virtual_build_source_name * - * Purpose: Attempts to open a source dataset. + * Purpose: Builds a source file or dataset name from a parsed name. * * Return: Non-negative on success/Negative on failure * * Programmer: Neil Fortner - * March 6, 2015 + * May 18, 2015 * *------------------------------------------------------------------------- */ static herr_t -H5D__virtual_open_source_dset(const H5D_t *vdset, - H5O_storage_virtual_ent_t *virtual_ent, hid_t dxpl_id) +H5D__virtual_build_source_name(char *source_name, + const H5O_storage_virtual_name_seg_t *parsed_name, size_t static_strlen, + size_t nsubs, hsize_t blockno, char **built_name) { - H5F_t *src_file = NULL; /* Source file */ - hbool_t src_file_open = FALSE; /* Whether we have opened and need to close src_file */ - H5G_loc_t src_root_loc; /* Object location of source file root group */ + char *tmp_name = NULL; /* Name buffer */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC /* Sanity check */ - HDassert(virtual_ent); - HDassert(!virtual_ent->source_dset); + HDassert(source_name); + HDassert(built_name); + + /* Check for static name */ + if(nsubs == 0) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + HDassert(!parsed_name); + *built_name = source_name; + } /* end if */ + else { + const H5O_storage_virtual_name_seg_t *name_seg = parsed_name; + char *p; + hsize_t blockno_down = blockno; + size_t blockno_len = 1; + size_t name_len; + size_t name_len_rem; + size_t seg_len; + size_t nsubs_rem = nsubs; + + HDassert(parsed_name); + + /* Calculate length of printed block number */ + do { + blockno_down /= (hsize_t)10; + if(blockno_down == 0) + break; + blockno_len++; + } while(1); + + /* Calculate length of name buffer */ + name_len_rem = name_len = static_strlen + (nsubs * blockno_len) + (size_t)1; + + /* Allocate name buffer */ + if(NULL == (tmp_name = (char *)H5MM_malloc(name_len))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate name buffer") + p = tmp_name; + + /* Build name */ + do { + /* Add name segment */ + if(name_seg->name_segment) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + seg_len = HDstrlen(name_seg->name_segment); + HDassert(seg_len > 0); + HDassert(seg_len < name_len_rem); + HDstrncpy(p, name_seg->name_segment, name_len_rem); + name_len_rem -= seg_len; + p += seg_len; + } /* end if */ - /* Get dapl and fapl from current (virtual dataset) location? VDSINC */ - /* Write code to check if these exist and return without opening dset - * otherwise VDSINC */ + /* Add block number */ + if(nsubs_rem > 0) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + HDassert(blockno_len < name_len_rem); + if(HDsnprintf(p, name_len_rem, "%llu", (long long unsigned)blockno) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write block number to string") + name_len_rem -= blockno_len; + p += blockno_len; + nsubs_rem--; + } /* end if */ - /* Check if we need to open the source file */ - if(HDstrcmp(virtual_ent->source_file_name, ".")) { - /* Open the source file */ - if(NULL == (src_file = H5F_open(virtual_ent->source_file_name, H5F_INTENT(vdset->oloc.file) & H5F_ACC_RDWR, H5P_FILE_CREATE_DEFAULT, H5P_FILE_ACCESS_DEFAULT, dxpl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENFILE, FAIL, "unable to open source file") - src_file_open = TRUE; - } /* end if */ - else - /* Source file is ".", use the virtual dataset's file */ - src_file = vdset->oloc.file; + /* Advance name_seg */ + name_seg = name_seg->next; + } while(name_seg); - /* Set up the root group in the destination file */ - if(NULL == (src_root_loc.oloc = H5G_oloc(H5G_rootof(src_file)))) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to get object location for root group") - if(NULL == (src_root_loc.path = H5G_nameof(H5G_rootof(src_file)))) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to get path for root group") - - /* Open the source dataset */ - if(NULL == (virtual_ent->source_dset = H5D__open_name(&src_root_loc, virtual_ent->source_dset_name, H5P_DATASET_ACCESS_DEFAULT, dxpl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset") - - /* Patch the source selection if necessary */ - if(virtual_ent->source_space_status != H5O_VIRTUAL_STATUS_CORRECT) { - if(H5S_extent_copy(virtual_ent->source_select, virtual_ent->source_dset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent") - virtual_ent->source_space_status = H5O_VIRTUAL_STATUS_CORRECT; - } /* end if */ + /* Assign built_name */ + *built_name = tmp_name; + tmp_name = NULL; + } /* end else */ done: - /* Close source file */ - if(src_file_open) - if(H5F_try_close(src_file) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEFILE, FAIL, "can't close source file") + if(tmp_name) { + HDassert(ret_value < 0); + H5MM_free(tmp_name); + } /* end if */ FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D__virtual_open_source_dset() */ +} /* end H5D__virtual_build_source_name() */ /*------------------------------------------------------------------------- @@ -359,59 +945,173 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) for(i = 0; i < storage->list_nalloc; i++) /* Check for unlimited dimension */ if(storage->list[i].unlim_dim_virtual >= 0) { - HDassert(storage->list[i].unlim_dim_source >= 0); - - /* Open source dataset */ - if(!storage->list[i].source_dset) - if(H5D__virtual_open_source_dset(dset, &storage->list[i], dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") - - /* Check if source dataset is open */ - if(storage->list[i].source_dset) { - /* Retrieve current source dataset extent and patch mapping. - * Note this will clip the source selection to the extent. */ - if(H5S_extent_copy(storage->list[i].source_select, storage->list[i].source_dset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent") + /* Check for "printf" source dataset resolution */ + if(storage->list[i].parsed_source_file_name + || storage->list[i].parsed_source_dset_name) { + hsize_t first_missing = 0; /* First missing dataset in the current block of missing datasets */ + hsize_t j; + + /* Search for source datasets */ + HDassert(storage->printf_gap != HSIZE_UNDEF); + for(j = 0; j <= (storage->printf_gap + first_missing); j++) { + /* Check for running out of space in sub_dset array */ + if(j >= (hsize_t)storage->list[i].sub_dset_nalloc) { + if(storage->list[i].sub_dset_nalloc == 0) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + /* Allocate sub_dset */ + if(NULL == (storage->list[i].sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_calloc(H5D_VIRTUAL_DEF_SUB_DSET_SIZE * sizeof(H5O_storage_virtual_srcdset_t)))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate sub dataset array") + storage->list[i].sub_dset_nalloc = H5D_VIRTUAL_DEF_SUB_DSET_SIZE; + } /* end if */ + else { + H5O_storage_virtual_srcdset_t *tmp_sub_dset; + + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Extend sub_dset */ + if(NULL == (tmp_sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_realloc(storage->list[i].sub_dset, 2 * storage->list[i].sub_dset_nalloc * sizeof(H5O_storage_virtual_srcdset_t)))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend sub dataset array") + + /* Clear new space in sub_dset */ + (void)HDmemset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0, storage->list[i].sub_dset_nalloc * sizeof(H5O_storage_virtual_srcdset_t)); + + /* Update sub_dset_nalloc */ + storage->list[i].sub_dset_nalloc *= 2; + } /* end else */ + } /* end if */ + + /* Check if the dataset is already open */ + if(storage->list[i].sub_dset[j].dset) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + first_missing = j + 1; + } //VDSINC + else { + /* Resolve file name */ + if(!storage->list[i].sub_dset[j].file_name) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + if(H5D__virtual_build_source_name(storage->list[i].source_dset.file_name, storage->list[i].parsed_source_file_name, storage->list[i].psfn_static_strlen, storage->list[i].psfn_nsubs, j, &storage->list[i].sub_dset[j].file_name) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source file name") + } //VDSINC + + /* Resolve dset name */ + if(!storage->list[i].sub_dset[j].dset_name) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + if(H5D__virtual_build_source_name(storage->list[i].source_dset.dset_name, storage->list[i].parsed_source_dset_name, storage->list[i].psdn_static_strlen, storage->list[i].psdn_nsubs, j, &storage->list[i].sub_dset[j].dset_name) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source dataset name") + } //VDSINC + + /* Resolve virtual selection for block */ + if(!storage->list[i].sub_dset[j].virtual_select) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + if(NULL == (storage->list[i].sub_dset[j].virtual_select = H5S_hyper_get_unlim_block(storage->list[i].source_dset.virtual_select, j))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get block in unlimited selection") + } //VDSINC + + /* Open source dataset */ + if(H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].sub_dset[j], dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + + /* Update first_missing */ + if(storage->list[i].sub_dset[j].dset) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + first_missing = j + 1; + } //VDSINC + } /* end else */ + } /* end for */ + + /* Check if the size changed */ + if(first_missing != (hsize_t)storage->list[i].sub_dset_nused) { + /* Check for no datasets */ + if(first_missing == 0) { + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Set clip size to 0 */ + clip_size = (hsize_t)0; + } //VDSINC + else { + hsize_t bounds_start[H5S_MAX_RANK]; + hsize_t bounds_end[H5S_MAX_RANK]; - /* Get source space dimenstions */ - if(H5S_get_simple_extent_dims(storage->list[i].source_select, curr_dims, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get source space dimensions") + //HDassert(0 && "Checking code coverage..."); //VDSINC + /* Get bounds from last valid virtual selection */ + if(H5S_SELECT_BOUNDS(storage->list[i].sub_dset[first_missing - (hsize_t)1].virtual_select, bounds_start, bounds_end) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") - /* Check if the source extent in the unlimited dimension - * changed since the last time the VDS extent/mapping - * was updated */ - if(curr_dims[storage->list[i].unlim_dim_source] - == storage->list[i].unlim_extent_source) - /* Use cached result for clip size */ - clip_size = storage->list[i].clip_size_virtual; - else { - /* Get size that virtual selection would be clipped to - * to match size of source selection */ - if(H5S_hyper_get_clip_extent(storage->list[i].virtual_select, storage->list[i].source_select, &clip_size, storage->view == H5D_VDS_FIRST_MISSING) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") - - /* If we are setting the extent by the last available data, - * clip virtual_select. Note that if we used the cached - * clip_size above, the selection will already be clipped to - * the correct size. */ - if(storage->view == H5D_VDS_LAST_AVAILABLE) - if(H5S_hyper_clip_unlim(storage->list[i].virtual_select, clip_size)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + /* Set clip_size to bounds_end in unlimited dimension */ + clip_size = bounds_end[storage->list[i].unlim_dim_virtual] + + (hsize_t)1; + } /* end else */ - /* Update cached values unlim_extent_source and - * clip_size_virtual */ - storage->list[i].unlim_extent_source = curr_dims[storage->list[i].unlim_dim_source]; + /* Clip entry root virtual select (virtual_select for all + * sub dsets) */ + if(H5S_hyper_clip_unlim(storage->list[i].source_dset.virtual_select, clip_size)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + + /* Set sub_dset_nused and clip_size_virtual */ + storage->list[i].sub_dset_nused = (size_t)first_missing; storage->list[i].clip_size_virtual = clip_size; - } /* end else */ - - /* Update new_dims */ - if((new_dims[storage->list[i].unlim_dim_virtual] == HSIZE_UNDEF) - || (storage->view == H5D_VDS_FIRST_MISSING ? (clip_size - < (hsize_t)new_dims[storage->list[i].unlim_dim_virtual]) - : (clip_size - > (hsize_t)new_dims[storage->list[i].unlim_dim_virtual]))) - new_dims[storage->list[i].unlim_dim_virtual] = clip_size; + } /* end if */ + else { + //HDassert(0 && "Checking code coverage..."); //VDSINC + /* Use cached clip_size */ + clip_size = storage->list[i].clip_size_virtual; + } //VDSINC } /* end if */ + else { + HDassert(storage->list[i].unlim_dim_source >= 0); + + /* Open source dataset */ + if(!storage->list[i].source_dset.dset) + if(H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].source_dset, dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + + /* Check if source dataset is open */ + if(storage->list[i].source_dset.dset) { + /* Retrieve current source dataset extent and patch mapping. + * Note this will clip the source selection to the extent. */ + if(H5S_extent_copy(storage->list[i].source_select, storage->list[i].source_dset.dset->shared->space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent") + + /* Get source space dimenstions */ + if(H5S_get_simple_extent_dims(storage->list[i].source_select, curr_dims, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get source space dimensions") + + /* Check if the source extent in the unlimited dimension + * changed since the last time the VDS extent/mapping + * was updated */ + if(curr_dims[storage->list[i].unlim_dim_source] + == storage->list[i].unlim_extent_source) + /* Use cached result for clip size */ + clip_size = storage->list[i].clip_size_virtual; + else { + /* Get size that virtual selection would be clipped to + * to match size of source selection */ + if(H5S_hyper_get_clip_extent(storage->list[i].source_dset.virtual_select, storage->list[i].source_select, &clip_size, storage->view == H5D_VDS_FIRST_MISSING) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") + + /* If we are setting the extent by the last available data, + * clip virtual_select. Note that if we used the cached + * clip_size above, the selection will already be clipped to + * the correct size. */ + if(storage->view == H5D_VDS_LAST_AVAILABLE) + if(H5S_hyper_clip_unlim(storage->list[i].source_dset.virtual_select, clip_size)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + + /* Update cached values unlim_extent_source and + * clip_size_virtual */ + storage->list[i].unlim_extent_source = curr_dims[storage->list[i].unlim_dim_source]; + storage->list[i].clip_size_virtual = clip_size; + } /* end else */ + } /* end if */ + else + clip_size = 0; + } /* end else */ + + /* Update new_dims */ + if((new_dims[storage->list[i].unlim_dim_virtual] == HSIZE_UNDEF) + || (storage->view == H5D_VDS_FIRST_MISSING ? (clip_size + < (hsize_t)new_dims[storage->list[i].unlim_dim_virtual]) + : (clip_size + > (hsize_t)new_dims[storage->list[i].unlim_dim_virtual]))) + new_dims[storage->list[i].unlim_dim_virtual] = clip_size; } /* end if */ /* Get current VDS dimensions */ @@ -442,14 +1142,13 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) * mapping extents */ for(i = 0; i < storage->list_nalloc; i++) /* Check for unlimited dimension */ - if((storage->list[i].unlim_dim_source >= 0) - && (storage->list[i].source_dset)) { + if(storage->list[i].unlim_dim_source >= 0) { HDassert(storage->list[i].unlim_dim_virtual >= 0); /* Update virtual mapping extent. Note this function does not * clip the selection. */ if(changed) - if(H5S_set_extent(storage->list[i].virtual_select, new_dims) < 0) + if(H5S_set_extent(storage->list[i].source_dset.virtual_select, new_dims) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") /* Check if we are setting extent by the minimum of mappings */ @@ -458,7 +1157,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) * extent changed, otherwise it will already be clipped to * the extent) */ if(changed) - if(H5S_hyper_clip_to_extent(storage->list[i].virtual_select)) + if(H5S_hyper_clip_to_extent(storage->list[i].source_dset.virtual_select)) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") /* Check if the virtual extent in the unlimited dimension @@ -471,7 +1170,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) else { /* Get size that source selection will be clipped to to * match size of virtual selection */ - if(H5S_hyper_get_clip_extent(storage->list[i].source_select, storage->list[i].virtual_select, &clip_size, FALSE) < 0) + if(H5S_hyper_get_clip_extent(storage->list[i].source_select, storage->list[i].source_dset.virtual_select, &clip_size, FALSE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") /* Update cached values unlim_extent_virtual and @@ -495,97 +1194,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5D__virtual_reset_layout - * - * Purpose: Frees internal structures in a virtual storage layout - * message in memory. This function is safe to use on - * incomplete structures (for recovery from failure) provided - * the internal structures are initialized with all bytes set - * to 0. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Neil Fortner - * February 11, 2015 - * - *------------------------------------------------------------------------- - */ -herr_t -H5D__virtual_reset_layout(H5O_layout_t *layout) -{ - size_t i; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_PACKAGE - - HDassert(layout); - HDassert(layout->type == H5D_VIRTUAL); - - /* Free the list entries. Note we always attempt to free everything even in - * the case of a failure. */ - for(i = 0; i < layout->storage.u.virt.list_nused; i++) { - layout->storage.u.virt.list[i].source_file_name = (char *)H5MM_xfree(layout->storage.u.virt.list[i].source_file_name); - layout->storage.u.virt.list[i].source_dset_name = (char *)H5MM_xfree(layout->storage.u.virt.list[i].source_dset_name); - if(layout->storage.u.virt.list[i].source_select - && H5S_close(layout->storage.u.virt.list[i].source_select) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") - layout->storage.u.virt.list[i].source_select = NULL; - if(layout->storage.u.virt.list[i].virtual_select - && H5S_close(layout->storage.u.virt.list[i].virtual_select) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release virtual selection") - layout->storage.u.virt.list[i].virtual_select = NULL; - /* Close dataset here? VDSINC */ - } /* end for */ - - /* Free the list */ - layout->storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_xfree(layout->storage.u.virt.list); - - /* Note the lack of a done: label. This is because there are no HGOTO_ERROR - * calls. If one is added, a done: label must also be added */ - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D__virtual_reset_layout() */ - - -/*------------------------------------------------------------------------- - * Function: H5D__virtual_delete - * - * Purpose: Delete the file space for a virtual dataset - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Neil Fortner - * February 6, 2015 - * - *------------------------------------------------------------------------- - */ -herr_t -H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE - - /* check args */ - HDassert(f); - HDassert(storage); - HDassert(storage->type == H5D_VIRTUAL); - - /* Need to add stuff for private data here VDSINC */ - - /* Delete the global heap block */ - if(H5HG_remove(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "Unable to remove heap object") - - /* Clear global heap ID in storage */ - storage->u.virt.serial_list_hobjid.addr = HADDR_UNDEF; - storage->u.virt.serial_list_hobjid.idx = 0; - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D__virtual_delete */ - - -/*------------------------------------------------------------------------- * Function: H5D__virtual_init * * Purpose: Initialize the virtual layout information for a dataset. @@ -615,7 +1223,7 @@ H5D__virtual_init(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5D_t *dset, /* Patch the virtual selection dataspaces */ for(i = 0; i < dset->shared->layout.storage.u.virt.list_nused; i++) { if(dset->shared->layout.storage.u.virt.list[i].virtual_space_status != H5O_VIRTUAL_STATUS_CORRECT) { - if(H5S_extent_copy(dset->shared->layout.storage.u.virt.list[i].virtual_select, dset->shared->space) < 0) + if(H5S_extent_copy(dset->shared->layout.storage.u.virt.list[i].source_dset.virtual_select, dset->shared->space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") dset->shared->layout.storage.u.virt.list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; } /* end if */ @@ -625,10 +1233,14 @@ H5D__virtual_init(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5D_t *dset, if(NULL == (dapl = (H5P_genplist_t *)H5I_object(dapl_id))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for dapl ID") - /* Get bounds option */ + /* Get view option */ if(H5P_get(dapl, H5D_ACS_VDS_VIEW_NAME, &dset->shared->layout.storage.u.virt.view) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get virtual view option") + /* Get printf gap */ + if(H5P_get(dapl, H5D_ACS_VDS_PRINTF_GAP_NAME, &dset->shared->layout.storage.u.virt.printf_gap) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get virtual printf gap") + done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_init() */ @@ -688,6 +1300,94 @@ H5D__virtual_io_init(const H5D_io_info_t UNUSED *io_info, const H5D_type_info_t /*------------------------------------------------------------------------- + * Function: H5D__virtual_read_one + * + * Purpose: Read from a singe source dataset in a virtual dataset. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * May 15, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, + const H5S_t *file_space, const H5S_t *mem_space, + H5O_storage_virtual_ent_t *virtual_ent, + H5O_storage_virtual_srcdset_t *source_dset) +{ + H5S_t *projected_mem_space = NULL; /* Memory space for selection in a single mapping */ + H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */ + hssize_t select_nelmts; /* Number of elements in selection */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + HDassert(virtual_ent); + HDassert(source_dset); + + /* Project intersection of file space and mapping virtual space onto + * memory space */ + if(H5S_select_project_intersection(file_space, mem_space, source_dset->virtual_select, &projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") + + /* Get number of elements in projected dataspace */ + if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(projected_mem_space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + + /* Only perform I/O if there are any elements */ + if(select_nelmts > 0) { + /* Open source dataset */ + if(!source_dset->dset) + /* Try to open dataset */ + if(H5D__virtual_open_source_dset(io_info->dset, virtual_ent, source_dset, io_info->dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + + /* Check if source dataset is open */ + if(source_dset->dset) { + /* Sanity check that the source space has been patched by now */ + HDassert(virtual_ent->source_space_status == H5O_VIRTUAL_STATUS_CORRECT); + + /* Project intersection of file space and mapping virtual space onto + * mapping source space */ + if(H5S_select_project_intersection(source_dset->virtual_select, virtual_ent->source_select, file_space, &projected_src_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto source space") + + /* Perform read on source dataset */ + if(H5D__read(source_dset->dset, type_info->dst_type_id, projected_mem_space, projected_src_space, io_info->dxpl_id, io_info->u.rbuf) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read source dataset") + + /* Close projected_src_space */ + if(H5S_close(projected_src_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") + projected_src_space = NULL; + } /* end if */ + } /* end if */ + + /* Close projected_mem_space */ + if(H5S_close(projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") + projected_mem_space = NULL; + +done: + /* Release allocated resources on failure */ + if(projected_src_space) { + HDassert(ret_value < 0); + if(H5S_close(projected_src_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") + } /* end if */ + if(projected_mem_space) { + HDassert(ret_value < 0); + if(H5S_close(projected_mem_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") + } /* end if */ + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__virtual_read_one() */ + + +/*------------------------------------------------------------------------- * Function: H5D__virtual_read * * Purpose: Read from a virtual dataset. @@ -701,14 +1401,11 @@ H5D__virtual_io_init(const H5D_io_info_t UNUSED *io_info, const H5D_type_info_t */ static herr_t H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, - hsize_t UNUSED nelmts, const H5S_t *file_space, const H5S_t *mem_space, + hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t UNUSED *fm) { H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */ - H5S_t *projected_mem_space = NULL; /* Memory space for selection in a single mapping */ - H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */ - hssize_t select_nelmts; /* Number of elements in selection */ - size_t i; /* Local index variable */ + size_t i, j; /* Local index variables */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -728,57 +1425,104 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Sanity check that the virtual space has been patched by now */ HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); - /* Project intersection of file space and mapping virtual space onto - * memory space */ - if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].virtual_select, &projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") - - /* Get number of elements in projected dataspace */ - if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(projected_mem_space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") - - /* Only perform I/O if there are any elements */ - if(select_nelmts > 0) { - /* Open source dataset */ - if(!storage->list[i].source_dset) - /* Try to open dataset */ - if(H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], io_info->dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") - - /* Check if source dataset is open */ - if(storage->list[i].source_dset) { - /* Sanity check that the source space has been patched by now */ - HDassert(storage->list[i].source_space_status == H5O_VIRTUAL_STATUS_CORRECT); - - /* Project intersection of file space and mapping virtual space onto - * mapping source space */ - if(H5S_select_project_intersection(storage->list[i].virtual_select, storage->list[i].source_select, file_space, &projected_src_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto source space") - - /* Perform read on source dataset */ - if(H5D__read(storage->list[i].source_dset, type_info->dst_type_id, projected_mem_space, projected_src_space, io_info->dxpl_id, io_info->u.rbuf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read source dataset") - - /* Close projected_src_space */ - if(H5S_close(projected_src_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") - projected_src_space = NULL; - } /* end if */ - else - /* We do not have a source dataset open, fill with fill value */ - HDassert(0 && "Not yet implemented...");//VDSINC + /* Check for "printf" source dataset resolution */ + if(storage->list[i].parsed_source_file_name + || storage->list[i].parsed_source_dset_name) { + /* Iterate over sub-source dsets */ + for(j = 0; j < storage->list[i].sub_dset_nused; j++) { + //HDassert(0 && "Checking code coverage..."); //VDSINC + if(H5D__virtual_read_one(io_info, type_info, file_space, mem_space, &storage->list[i], &storage->list[i].sub_dset[j]) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read source dataset") + } //VDSINC } /* end if */ - - /* Close projected_mem_space */ - if(H5S_close(projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") - projected_mem_space = NULL; + else + /* Read from source dataset */ + if(H5D__virtual_read_one(io_info, type_info, file_space, mem_space, &storage->list[i], &storage->list[i].source_dset) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read source dataset") } /* end for */ /* Fill unmapped part of buffer with fill value. Keep track of total number * elements written to memory buffer and assert that it == nelmts VDSINC */ done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__virtual_read() */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_write_one + * + * Purpose: Write to a singe source dataset in a virtual dataset. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * May 15, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5D__virtual_write_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, + const H5S_t *file_space, const H5S_t *mem_space, + H5O_storage_virtual_ent_t *virtual_ent, + H5O_storage_virtual_srcdset_t *source_dset) +{ + H5S_t *projected_mem_space = NULL; /* Memory space for selection in a single mapping */ + H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */ + hssize_t select_nelmts; /* Number of elements in selection */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + HDassert(virtual_ent); + HDassert(source_dset); + + /* Project intersection of file space and mapping virtual space onto + * memory space */ + if(H5S_select_project_intersection(file_space, mem_space, source_dset->virtual_select, &projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") + + /* Get number of elements in projected dataspace */ + if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(projected_mem_space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + + /* Only perform I/O if there are any elements */ + if(select_nelmts > 0) { + /* Open source dataset */ + if(!source_dset->dset) { + /* Try to open dataset */ + if(H5D__virtual_open_source_dset(io_info->dset, virtual_ent, source_dset, io_info->dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + if(!source_dset->dset) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "did not open source dataset") + } /* end if */ + + /* Sanity check that the source space has been patched by now */ + HDassert(virtual_ent->source_space_status == H5O_VIRTUAL_STATUS_CORRECT); + + /* Extend source dataset if necessary and there is an unlimited + * dimension VDSINC */ + /* Project intersection of file space and mapping virtual space onto + * mapping source space */ + if(H5S_select_project_intersection(source_dset->virtual_select, virtual_ent->source_select, file_space, &projected_src_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto source space") + + /* Perform write on source dataset */ + if(H5D__write(source_dset->dset, type_info->dst_type_id, projected_mem_space, projected_src_space, io_info->dxpl_id, io_info->u.wbuf) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write to source dataset") + + /* Close projected_src_space */ + if(H5S_close(projected_src_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") + projected_src_space = NULL; + } /* end if */ + + /* Close projected_mem_space */ + if(H5S_close(projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") + projected_mem_space = NULL; + +done: /* Release allocated resources on failure */ if(projected_src_space) { HDassert(ret_value < 0); @@ -792,7 +1536,7 @@ done: } /* end if */ FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D__virtual_read() */ +} /* end H5D__virtual_write_one() */ /*------------------------------------------------------------------------- @@ -809,21 +1553,18 @@ done: */ static herr_t H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, - hsize_t UNUSED nelmts, const H5S_t *file_space, const H5S_t *mem_space, + hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t UNUSED *fm) { H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */ - H5S_t *projected_mem_space = NULL; /* Memory space for selection in a single mapping */ - H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */ - hssize_t select_nelmts; /* Number of elements in selection */ - size_t i; /* Local index variable */ + size_t i, j; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC /* Sanity check */ HDassert(io_info); - HDassert(io_info->u.rbuf); + HDassert(io_info->u.wbuf); HDassert(type_info); HDassert(mem_space); HDassert(file_space); @@ -836,65 +1577,26 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Sanity check that virtual space has been patched by now */ HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); - /* Project intersection of file space and mapping virtual space onto - * memory space */ - if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].virtual_select, &projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") - - /* Get number of elements in projected dataspace */ - if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(projected_mem_space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") - - /* Only perform I/O if there are any elements */ - if(select_nelmts > 0) { - /* Open source dataset, fail if cannot open */ - if(!storage->list[i].source_dset) { - //VDSINC check all source datasets before any I/O - if(H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], io_info->dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") - if(!storage->list[i].source_dset) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "did not open source dataset") - } /* end if */ - - /* Sanity check that source space has been patched by now */ - HDassert(storage->list[i].source_space_status == H5O_VIRTUAL_STATUS_CORRECT); - - /* Extend source dataset if necessary and there is an unlimited - * dimension VDSINC */ - /* Project intersection of file space and mapping virtual space onto - * mapping source space */ - if(H5S_select_project_intersection(storage->list[i].virtual_select, storage->list[i].source_select, file_space, &projected_src_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto source space") - - /* Perform read on source dataset */ - if(H5D__write(storage->list[i].source_dset, type_info->dst_type_id, projected_mem_space, projected_src_space, io_info->dxpl_id, io_info->u.wbuf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write to source dataset") - - /* Close projected_src_space */ - if(H5S_close(projected_src_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") - projected_src_space = NULL; + /* Check for "printf" source dataset resolution */ + if(storage->list[i].parsed_source_file_name + || storage->list[i].parsed_source_dset_name) { + /* Iterate over sub-source dsets */ + for(j = 0; j < storage->list[i].sub_dset_nused; j++) { + HDassert(0 && "Checking code coverage..."); //VDSINC + if(H5D__virtual_write_one(io_info, type_info, file_space, mem_space, &storage->list[i], &storage->list[i].sub_dset[j]) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to write to source dataset") + } //VDSINC } /* end if */ - - /* Close projected_mem_space */ - if(H5S_close(projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") - projected_mem_space = NULL; + else + /* Write to source dataset */ + if(H5D__virtual_write_one(io_info, type_info, file_space, mem_space, &storage->list[i], &storage->list[i].source_dset) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to write to source dataset") } /* end for */ -done: - /* Release allocated resources on failure */ - if(projected_src_space) { - HDassert(ret_value < 0); - if(H5S_close(projected_src_space) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") - } /* end if */ - if(projected_mem_space) { - HDassert(ret_value < 0); - if(H5S_close(projected_mem_space) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") - } /* end if */ + /* Keep track of total number elements written to disk buffer and issure + * error if it != nelmts VDSINC */ +done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_write() */ diff --git a/src/H5Olayout.c b/src/H5Olayout.c index dce41cf..849c072 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -252,6 +252,7 @@ H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, mesg->storage.u.virt.list = NULL; mesg->storage.u.virt.list_nalloc = 0; mesg->storage.u.virt.view = H5D_VDS_ERROR; + mesg->storage.u.virt.printf_gap = HSIZE_UNDEF; /* Decode heap block if it exists */ if(mesg->storage.u.virt.serial_list_hobjid.addr != HADDR_UNDEF) { @@ -282,16 +283,16 @@ H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, for(i = 0; i < mesg->storage.u.virt.list_nused; i++) { /* Source file name */ tmp_size = HDstrlen((const char *)heap_block_p) + 1; - if(NULL == (mesg->storage.u.virt.list[i].source_file_name = (char *)H5MM_malloc(tmp_size))) + if(NULL == (mesg->storage.u.virt.list[i].source_dset.file_name = (char *)H5MM_malloc(tmp_size))) HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, NULL, "unable to allocate memory for source file name") - (void)HDmemcpy(mesg->storage.u.virt.list[i].source_file_name, heap_block_p, tmp_size); + (void)HDmemcpy(mesg->storage.u.virt.list[i].source_dset.file_name, heap_block_p, tmp_size); heap_block_p += tmp_size; /* Source dataset name */ tmp_size = HDstrlen((const char *)heap_block_p) + 1; - if(NULL == (mesg->storage.u.virt.list[i].source_dset_name = (char *)H5MM_malloc(tmp_size))) + if(NULL == (mesg->storage.u.virt.list[i].source_dset.dset_name = (char *)H5MM_malloc(tmp_size))) HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, NULL, "unable to allocate memory for source dataset name") - (void)HDmemcpy(mesg->storage.u.virt.list[i].source_dset_name, heap_block_p, tmp_size); + (void)HDmemcpy(mesg->storage.u.virt.list[i].source_dset.dset_name, heap_block_p, tmp_size); heap_block_p += tmp_size; /* Source selection */ @@ -299,12 +300,19 @@ H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode source space selection") /* Virtual selection */ - if(H5S_SELECT_DESERIALIZE(f, &(mesg->storage.u.virt.list[i].virtual_select), &heap_block_p) < 0) + if(H5S_SELECT_DESERIALIZE(f, &(mesg->storage.u.virt.list[i].source_dset.virtual_select), &heap_block_p) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode virtual space selection") + /* Parse source file and dataset names for "printf" + * style format specifiers */ + if(H5D_virtual_parse_source_name(mesg->storage.u.virt.list[i].source_dset.file_name, &mesg->storage.u.virt.list[i].parsed_source_file_name, &mesg->storage.u.virt.list[i].psfn_static_strlen, &mesg->storage.u.virt.list[i].psfn_nsubs) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't parse source file name") + if(H5D_virtual_parse_source_name(mesg->storage.u.virt.list[i].source_dset.dset_name, &mesg->storage.u.virt.list[i].parsed_source_dset_name, &mesg->storage.u.virt.list[i].psdn_static_strlen, &mesg->storage.u.virt.list[i].psdn_nsubs) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't parse source dataset name") + /* unlim_dim fields */ mesg->storage.u.virt.list[i].unlim_dim_source = H5S_get_select_unlim_dim(mesg->storage.u.virt.list[i].source_select); - mesg->storage.u.virt.list[i].unlim_dim_virtual = H5S_get_select_unlim_dim(mesg->storage.u.virt.list[i].virtual_select); + mesg->storage.u.virt.list[i].unlim_dim_virtual = H5S_get_select_unlim_dim(mesg->storage.u.virt.list[i].source_dset.virtual_select); mesg->storage.u.virt.list[i].unlim_extent_source = HSIZE_UNDEF; mesg->storage.u.virt.list[i].unlim_extent_virtual = HSIZE_UNDEF; mesg->storage.u.virt.list[i].clip_size_source = HSIZE_UNDEF; @@ -472,17 +480,17 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi /* Calculate size of each entry */ for(i = 0; i < mesg->storage.u.virt.list_nused; i++) { - HDassert(mesg->storage.u.virt.list[i].source_file_name); - HDassert(mesg->storage.u.virt.list[i].source_dset_name); + HDassert(mesg->storage.u.virt.list[i].source_dset.file_name); + HDassert(mesg->storage.u.virt.list[i].source_dset.dset_name); HDassert(mesg->storage.u.virt.list[i].source_select); - HDassert(mesg->storage.u.virt.list[i].virtual_select); + HDassert(mesg->storage.u.virt.list[i].source_dset.virtual_select); /* Source file name */ - str_size[2 * i] = HDstrlen(mesg->storage.u.virt.list[i].source_file_name) + (size_t)1; + str_size[2 * i] = HDstrlen(mesg->storage.u.virt.list[i].source_dset.file_name) + (size_t)1; block_size += str_size[2 * i]; /* Source dset name */ - str_size[(2 * i) + 1] = HDstrlen(mesg->storage.u.virt.list[i].source_dset_name) + (size_t)1; + str_size[(2 * i) + 1] = HDstrlen(mesg->storage.u.virt.list[i].source_dset.dset_name) + (size_t)1; block_size += str_size[(2 * i) + 1]; /* Source selection */ @@ -491,7 +499,7 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi block_size += (size_t)select_serial_size; /* Virtual dataset selection */ - if((select_serial_size = H5S_SELECT_SERIAL_SIZE(f, mesg->storage.u.virt.list[i].virtual_select)) < 0) + if((select_serial_size = H5S_SELECT_SERIAL_SIZE(f, mesg->storage.u.virt.list[i].source_dset.virtual_select)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") block_size += (size_t)select_serial_size; } /* end for */ @@ -515,11 +523,11 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi /* Encode each entry */ for(i = 0; i < mesg->storage.u.virt.list_nused; i++) { /* Source file name */ - (void)HDstrcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_file_name); + (void)HDstrcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_dset.file_name); heap_block_p += str_size[2 * i]; /* Source dataset name */ - (void)HDstrcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_dset_name); + (void)HDstrcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_dset.dset_name); heap_block_p += str_size[(2 * i) + 1]; /* Source selection */ @@ -527,7 +535,7 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize source selection") /* Virtual selection */ - if(H5S_SELECT_SERIALIZE(f, mesg->storage.u.virt.list[i].virtual_select, &heap_block_p) < 0) + if(H5S_SELECT_SERIALIZE(f, mesg->storage.u.virt.list[i].source_dset.virtual_select, &heap_block_p) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize virtual selection") } /* end for */ @@ -536,8 +544,7 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi UINT32ENCODE(heap_block_p, chksum) /* Insert block into global heap */ - /* Casting away const OK --NAF */ - if(H5HG_insert(f, H5AC_ind_dxpl_id, block_size, heap_block, &((H5O_layout_t *)mesg)->storage.u.virt.serial_list_hobjid) < 0) + if(H5HG_insert(f, H5AC_ind_dxpl_id, block_size, heap_block, &((H5O_layout_t *)mesg)->storage.u.virt.serial_list_hobjid) < 0) /* Casting away const OK --NAF */ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to insert virtual dataset heap block") } /* end if */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 1059e8b..6351dd5 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -412,6 +412,18 @@ typedef struct H5O_storage_compact_t { void *buf; /* Buffer for compact dataset */ } H5O_storage_compact_t; +typedef struct H5O_storage_virtual_srcdset_t { + struct H5D_t *dset; /* Source dataset */ + char *file_name; /* Source file name used for virtual dataset mapping */ + char *dset_name; /* Source dataset name used for virtual dataset mapping */ + struct H5S_t *virtual_select; /* Selection in the virtual dataset that is mapped to source selection */ +} H5O_storage_virtual_srcdset_t; + +typedef struct H5O_storage_virtual_name_seg_t { + char *name_segment; + struct H5O_storage_virtual_name_seg_t *next; +} H5O_storage_virtual_name_seg_t; + typedef enum H5O_virtual_space_status_t { H5O_VIRTUAL_STATUS_INVALID = 0, /* Space extent is invalid */ H5O_VIRTUAL_STATUS_SEL_BOUNDS, /* Space extent set to bounds of selection */ @@ -421,13 +433,19 @@ typedef enum H5O_virtual_space_status_t { typedef struct H5O_storage_virtual_ent_t { /* Stored */ - char *source_file_name; /* Source file name used for virtual dataset mapping */ - char *source_dset_name; /* Source dataset name used for virtual dataset mapping */ + H5O_storage_virtual_srcdset_t source_dset; /* Information about the source dataset */ struct H5S_t *source_select; /* Selection in the source dataset for mapping */ - struct H5S_t *virtual_select; /* Selection in the virtual dataset that is mapped to source_select */ /* Not stored */ - struct H5D_t *source_dset; /* Source dataset */ + H5O_storage_virtual_srcdset_t *sub_dset; /* Array of sub-source dataset info structs */ + size_t sub_dset_nalloc; + size_t sub_dset_nused; + H5O_storage_virtual_name_seg_t *parsed_source_file_name; + size_t psfn_static_strlen; + size_t psfn_nsubs; + H5O_storage_virtual_name_seg_t *parsed_source_dset_name; + size_t psdn_static_strlen; + size_t psdn_nsubs; int unlim_dim_source; /* Unlimited dimension in source_select */ int unlim_dim_virtual; /* Unlimited dimension in virtual_select */ hsize_t unlim_extent_source; /* Extent of unlimited dimension in source dset last time virtual_select was patched to match selection */ @@ -450,6 +468,7 @@ typedef struct H5O_storage_virtual_t { size_t list_nalloc; /* Number of slots allocated */ hsize_t min_dims[H5S_MAX_RANK]; /* Minimum extent of VDS (maximum of all non-unlimited selection bounds) */ H5D_vds_view_t view; /* Method for calculating the extent of the virtual dataset with unlimited selections */ + hsize_t printf_gap; /* Maximum number of sequential missing source datasets before terminating the search for more */ } H5O_storage_virtual_t; typedef struct H5O_storage_t { diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index af4b988..c11d22f 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -61,11 +61,16 @@ #define H5D_ACS_PREEMPT_READ_CHUNKS_DEF H5D_CHUNK_CACHE_W0_DEFAULT #define H5D_ACS_PREEMPT_READ_CHUNKS_ENC H5P__encode_double #define H5D_ACS_PREEMPT_READ_CHUNKS_DEC H5P__decode_double -/* Definitions for VDS bounds option */ +/* Definitions for VDS view option */ #define H5D_ACS_VDS_VIEW_SIZE sizeof(H5D_vds_view_t) #define H5D_ACS_VDS_VIEW_DEF H5D_VDS_LAST_AVAILABLE #define H5D_ACS_VDS_VIEW_ENC H5P__dacc_vds_view_enc #define H5D_ACS_VDS_VIEW_DEC H5P__dacc_vds_view_dec +/* Definitions for VDS printf gap */ +#define H5D_ACS_VDS_PRINTF_GAP_SIZE sizeof(hsize_t) +#define H5D_ACS_VDS_PRINTF_GAP_DEF (hsize_t)0 +#define H5D_ACS_VDS_PRINTF_GAP_ENC H5P__encode_hsize_t +#define H5D_ACS_VDS_PRINTF_GAP_DEC H5P__decode_hsize_t /******************/ /* Local Typedefs */ @@ -143,6 +148,7 @@ H5P__dacc_reg_prop(H5P_genclass_t *pclass) size_t rdcc_nbytes = H5D_ACS_DATA_CACHE_BYTE_SIZE_DEF; /* Default raw data chunk cache # of bytes */ double rdcc_w0 = H5D_ACS_PREEMPT_READ_CHUNKS_DEF; /* Default raw data chunk cache dirty ratio */ H5D_vds_view_t virtual_view = H5D_ACS_VDS_VIEW_DEF; /* Default VDS view option */ + hsize_t printf_gap = H5D_ACS_VDS_PRINTF_GAP_DEF; /* Default VDS printf gap */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -168,6 +174,12 @@ H5P__dacc_reg_prop(H5P_genclass_t *pclass) NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + /* Register the VDS printf gap */ + if(H5P_register_real(pclass, H5D_ACS_VDS_PRINTF_GAP_NAME, H5D_ACS_VDS_PRINTF_GAP_SIZE, &printf_gap, + NULL, NULL, NULL, H5D_ACS_VDS_PRINTF_GAP_ENC, H5D_ACS_VDS_PRINTF_GAP_DEC, + NULL, NULL, NULL, NULL) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dacc_reg_prop() */ @@ -366,7 +378,7 @@ H5Pget_virtual_view(hid_t plist_id) /* Get value from property list */ if(H5P_get(plist, H5D_ACS_VDS_VIEW_NAME, &ret_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5D_VDS_ERROR, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5D_VDS_ERROR, "unable to get value") done: FUNC_LEAVE_API(ret_value) @@ -376,7 +388,7 @@ done: /*------------------------------------------------------------------------- * Function: H5P__dacc_vds_view_enc * - * Purpose: Callback routine which is called whenever the vds bounds + * Purpose: Callback routine which is called whenever the vds view * property in the dataset access property list is encoded. * * Return: Success: Non-negative @@ -413,7 +425,7 @@ H5P__dacc_vds_view_enc(const void *value, void **_pp, size_t *size) /*------------------------------------------------------------------------- * Function: H5P__dacc_vds_view_dec * - * Purpose: Callback routine which is called whenever the vds bounds + * Purpose: Callback routine which is called whenever the vds view * property in the dataset access property list is encoded. * * Return: Success: Non-negative @@ -443,3 +455,77 @@ H5P__dacc_vds_view_dec(const void **_pp, void *_value) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dacc_vds_view_dec() */ + +/*------------------------------------------------------------------------- + * Function: H5Pset_virtual_printf_gap + * + * Purpose: VDSINC + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * May 21, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5Pset_virtual_printf_gap(hid_t plist_id, hsize_t gap_size) +{ + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(FAIL) + + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Check argument */ + if(gap_size == HSIZE_UNDEF) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid printf gap size") + + /* Get the plist structure */ + if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + + /* Update property list */ + if(H5P_set(plist, H5D_ACS_VDS_PRINTF_GAP_NAME, &gap_size) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Pset_virtual_printf_gap() */ + + +/*------------------------------------------------------------------------- + * Function: H5Pget_virtual_printf_gap + * + * Purpose: VDSINC + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * May 21, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size) +{ + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(H5D_VDS_ERROR) + + /* Get the plist structure */ + if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5D_VDS_ERROR, "can't find object for ID") + + /* Get value from property list */ + if(gap_size) { + HDassert(0 && "Checking code coverage..."); //VDSINC + if(H5P_get(plist, H5D_ACS_VDS_PRINTF_GAP_NAME, gap_size) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5D_VDS_ERROR, "unable to get value") + } //VDSINC + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Pget_virtual_printf_gap() */ + diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 575de9c..e647f29 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -57,7 +57,7 @@ #define H5D_DEF_STORAGE_CONTIG_INIT {HADDR_UNDEF, (hsize_t)0} #define H5D_DEF_STORAGE_CHUNK_INIT {H5D_CHUNK_IDX_BTREE, HADDR_UNDEF, NULL, {{HADDR_UNDEF, NULL}}} #define H5D_DEF_LAYOUT_CHUNK_INIT {(unsigned)0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, (uint32_t)0, (hsize_t)0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}} -#define H5D_DEF_STORAGE_VIRTUAL_INIT {{HADDR_UNDEF, 0}, 0, NULL, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, TRUE} +#define H5D_DEF_STORAGE_VIRTUAL_INIT {{HADDR_UNDEF, 0}, 0, NULL, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, H5D_VDS_ERROR, HSIZE_UNDEF} #ifdef H5_HAVE_C99_DESIGNATED_INITIALIZER #define H5D_DEF_STORAGE_COMPACT {H5D_COMPACT, { .compact = H5D_DEF_STORAGE_COMPACT_INIT }} #define H5D_DEF_STORAGE_CONTIG {H5D_CONTIGUOUS, { .contig = H5D_DEF_STORAGE_CONTIG_INIT }} @@ -1599,7 +1599,9 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, H5S_t *vspace; /* Virtual dataset space selection */ H5S_t *src_space; /* Source dataset space selection */ hbool_t new_layout = FALSE; /* Whether we are adding a new virtual layout message to plist */ + H5O_storage_virtual_ent_t *ent = NULL; /* Convenience pointer to new VDS entry */ hbool_t adding_entry = FALSE; /* Whether we are in the middle of adding an entry */ + H5O_storage_virtual_ent_t *old_list = NULL; /* List pointer previously on property list */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -1638,16 +1640,22 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, /* If the layout was not already virtual, Start with default virtual layout. * Otherwise, add the mapping to the current list. */ - if(layout.type != H5D_VIRTUAL) { + if(layout.type == H5D_VIRTUAL) + /* Save old list pointer for error recovery */ + old_list = layout.storage.u.virt.list; + else { new_layout = TRUE; HDmemcpy(&layout, &H5D_def_layout_virtual_g, sizeof(H5D_def_layout_virtual_g)); - } /* end if */ + + HDassert(layout.storage.u.virt.list_nalloc == 0); + } /* end else */ /* Expand list if necessary */ if(layout.storage.u.virt.list_nalloc == 0) { /* Allocate initial entry list */ if(NULL == (layout.storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_calloc(H5D_VIRTUAL_DEF_LIST_SIZE * sizeof(H5O_storage_virtual_ent_t)))) HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't allocate virtual dataset mapping list") + adding_entry = TRUE; layout.storage.u.virt.list_nalloc = H5D_VIRTUAL_DEF_LIST_SIZE; } /* end if */ else if(layout.storage.u.virt.list_nused @@ -1656,28 +1664,34 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, /* Double size of entry list. Make sure to zero out new memory. */ if(NULL == (layout.storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_realloc(layout.storage.u.virt.list, (size_t)2 * layout.storage.u.virt.list_nalloc * sizeof(H5O_storage_virtual_ent_t)))) HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't reallocate virtual dataset mapping list") + adding_entry = TRUE; (void)HDmemset(layout.storage.u.virt.list + layout.storage.u.virt.list_nalloc, 0, layout.storage.u.virt.list_nalloc * sizeof(H5O_storage_virtual_ent_t)); layout.storage.u.virt.list_nalloc *= (size_t)2; } /* end if */ /* Add virtual dataset mapping entry */ - if(NULL == (layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_file_name = HDstrdup(src_file_name))) + ent = &layout.storage.u.virt.list[layout.storage.u.virt.list_nused]; + if(NULL == (ent->source_dset.file_name = HDstrdup(src_file_name))) HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name") adding_entry = TRUE; - if(NULL == (layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_dset_name = HDstrdup(src_dset_name))) + if(NULL == (ent->source_dset.dset_name = HDstrdup(src_dset_name))) HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name") - if(NULL == (layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_select = H5S_copy(src_space, FALSE, TRUE))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection") - if(NULL == (layout.storage.u.virt.list[layout.storage.u.virt.list_nused].virtual_select = H5S_copy(vspace, FALSE, TRUE))) + if(NULL == (ent->source_dset.virtual_select = H5S_copy(vspace, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") - layout.storage.u.virt.list[layout.storage.u.virt.list_nused].unlim_dim_source = H5S_get_select_unlim_dim(src_space); - layout.storage.u.virt.list[layout.storage.u.virt.list_nused].unlim_dim_virtual = H5S_get_select_unlim_dim(vspace); - layout.storage.u.virt.list[layout.storage.u.virt.list_nused].unlim_extent_source = HSIZE_UNDEF; - layout.storage.u.virt.list[layout.storage.u.virt.list_nused].unlim_extent_virtual = HSIZE_UNDEF; - layout.storage.u.virt.list[layout.storage.u.virt.list_nused].clip_size_source = HSIZE_UNDEF; - layout.storage.u.virt.list[layout.storage.u.virt.list_nused].clip_size_virtual = HSIZE_UNDEF; - layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_space_status = H5O_VIRTUAL_STATUS_USER; - layout.storage.u.virt.list[layout.storage.u.virt.list_nused].virtual_space_status = H5O_VIRTUAL_STATUS_USER; + if(NULL == (ent->source_select = H5S_copy(src_space, FALSE, TRUE))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection") + if(H5D_virtual_parse_source_name(ent->source_dset.file_name, &ent->parsed_source_file_name, &ent->psfn_static_strlen, &ent->psfn_nsubs) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source file name") + if(H5D_virtual_parse_source_name(ent->source_dset.dset_name, &ent->parsed_source_dset_name, &ent->psdn_static_strlen, &ent->psdn_nsubs) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source dataset name") + ent->unlim_dim_source = H5S_get_select_unlim_dim(src_space); + ent->unlim_dim_virtual = H5S_get_select_unlim_dim(vspace); + ent->unlim_extent_source = HSIZE_UNDEF; + ent->unlim_extent_virtual = HSIZE_UNDEF; + ent->clip_size_source = HSIZE_UNDEF; + ent->clip_size_virtual = HSIZE_UNDEF; + ent->source_space_status = H5O_VIRTUAL_STATUS_USER; + ent->virtual_space_status = H5O_VIRTUAL_STATUS_USER; /* Update min_dims */ if(H5D_virtual_update_min_dims(&layout, layout.storage.u.virt.list_nused) < 0) @@ -1685,32 +1699,52 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, /* Finish adding entry */ layout.storage.u.virt.list_nused++; - adding_entry = FALSE; - - /* Set chunk information in property list. If we are adding a new layout, - * use H5P__set_layout so other fields are initialized properly. If we are - * extending the layout, just use H5P_set directly so we don't mess with - * anything else. */ - if(new_layout) { - if(H5P__set_layout(plist, &layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout") - } /* end if */ - else - if(H5P_set(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout") done: + /* Only need to do things if we started to add an entry */ if(adding_entry) { - HDassert(ret_value < 0); + hbool_t free_list = FALSE; + + /* Set chunk information in property list. If we are adding a new layout, + * use H5P__set_layout so other fields are initialized properly. If we are + * extending the layout, just use H5P_set directly so we don't mess with + * anything else. */ + if(new_layout) { + if(H5P__set_layout(plist, &layout) < 0) { + HDONE_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout") + free_list = TRUE; + } /* end if */ + } /* end if */ + else + if(H5P_set(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) { + HDONE_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout") + if(old_list != layout.storage.u.virt.list) + free_list = TRUE; + } /* end if */ - /* Free incomplete entry */ - layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_file_name = (char *)H5MM_xfree(layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_file_name); - layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_dset_name = (char *)H5MM_xfree(layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_dset_name); - if(layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_select - && H5S_close(layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_select) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") - layout.storage.u.virt.list[layout.storage.u.virt.list_nused].source_select = NULL; - HDassert(layout.storage.u.virt.list[layout.storage.u.virt.list_nused].virtual_select == NULL); + /* Check if the entry has been partly allocated but not added to the + * property list or not included in list_nused */ + if((ret_value < 0) && ent) { + HDassert(ret_value < 0); + + /* Free incomplete entry */ + ent->source_dset.file_name = (char *)H5MM_xfree(ent->source_dset.file_name); + ent->source_dset.dset_name = (char *)H5MM_xfree(ent->source_dset.dset_name); + if(ent->source_dset.virtual_select && H5S_close(ent->source_dset.virtual_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release virtual selection") + ent->source_dset.virtual_select = NULL; + if(ent->source_select && H5S_close(ent->source_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") + ent->source_select = NULL; + H5D_virtual_free_parsed_name(ent->parsed_source_file_name); + ent->parsed_source_file_name = NULL; + H5D_virtual_free_parsed_name(ent->parsed_source_dset_name); + ent->parsed_source_dset_name = NULL; + + /* Free list if necessary */ + if(free_list) + layout.storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_xfree(layout.storage.u.virt.list); + } /* end if */ } /* end if */ FUNC_LEAVE_API(ret_value) @@ -1796,7 +1830,7 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t index) if(index >= layout.storage.u.virt.list_nused) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); - if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].virtual_select, FALSE, TRUE))) + if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].source_dset.virtual_select, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") /* Clip selection to extent */ @@ -1918,10 +1952,10 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name/*out*/, if(index >= layout.storage.u.virt.list_nused) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); - HDassert(layout.storage.u.virt.list[index].source_file_name); + HDassert(layout.storage.u.virt.list[index].source_dset.file_name); if(name && (size > 0)) - (void)HDstrncpy(name, layout.storage.u.virt.list[index].source_file_name, size); - ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[index].source_file_name); + (void)HDstrncpy(name, layout.storage.u.virt.list[index].source_dset.file_name, size); + ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[index].source_dset.file_name); done: FUNC_LEAVE_API(ret_value) @@ -1965,10 +1999,10 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name/*out*/, if(index >= layout.storage.u.virt.list_nused) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); - HDassert(layout.storage.u.virt.list[index].source_dset_name); + HDassert(layout.storage.u.virt.list[index].source_dset.dset_name); if(name && (size > 0)) - (void)HDstrncpy(name, layout.storage.u.virt.list[index].source_dset_name, size); - ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[index].source_dset_name); + (void)HDstrncpy(name, layout.storage.u.virt.list[index].source_dset.dset_name, size); + ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[index].source_dset.dset_name); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 5ea857a..f1db483 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -395,6 +395,8 @@ H5_DLL herr_t H5Pget_chunk_cache(hid_t dapl_id, double *rdcc_w0/*out*/); H5_DLL herr_t H5Pset_virtual_view(hid_t plist_id, H5D_vds_view_t view); H5_DLL H5D_vds_view_t H5Pget_virtual_view(hid_t plist_id); +H5_DLL herr_t H5Pset_virtual_printf_gap(hid_t plist_id, hsize_t gap_size); +H5_DLL herr_t H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size); /* Dataset xfer property list (DXPL) routines */ H5_DLL herr_t H5Pset_data_transform(hid_t plist_id, const char* expression); diff --git a/src/H5Shyper.c b/src/H5Shyper.c index a483c21..a3e6781 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -9812,8 +9812,9 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) block[i] = H5S_MAX_SIZE; /* Generate span tree in selection */ - if(H5S_hyper_generate_spans(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to generate span tree") + if(!hslab->span_lst) + if(H5S_hyper_generate_spans(space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to generate span tree") /* Indicate that the regular dimensions are no longer valid */ hslab->diminfo_valid = FALSE; @@ -9987,6 +9988,89 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, /*-------------------------------------------------------------------------- NAME + H5S_hyper_get_unlim_block + PURPOSE + VDSINC + USAGE + VDSINC + RETURNS + New space on success/NULL on failure. + DESCRIPTION + VDSINC + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + Note this assumes the offset has been normalized. + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +H5S_t * +H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index) +{ + H5S_hyper_sel_t *hslab; /* Convenience pointer to hyperslab info */ + H5S_t *space_out = NULL; + hsize_t start[H5S_MAX_RANK]; + hsize_t stride[H5S_MAX_RANK]; + hsize_t count[H5S_MAX_RANK]; + hsize_t block[H5S_MAX_RANK]; + unsigned i; + H5S_t *ret_value = NULL; + + FUNC_ENTER_NOAPI(NULL) + + /* Check parameters */ + HDassert(space); + hslab = space->select.sel_info.hslab; + HDassert(hslab); + HDassert(hslab->unlim_dim >= 0); + HDassert(hslab->opt_unlim_diminfo[hslab->unlim_dim].count == H5S_UNLIMITED); + + /* Set block to clip_size in unlimited dimension, H5S_MAX_SIZE in + * others so only unlimited dimension is clipped */ + for(i = 0; i < space->extent.rank; i++) { + if((int)i == hslab->unlim_dim){ + //HDassert(0 && "Checking code coverage..."); //VDSINC + start[i] = hslab->opt_unlim_diminfo[i].start + (block_index + * hslab->opt_unlim_diminfo[i].stride); + count[i] = (hsize_t)1; + } /* end if */ + else { + //HDassert(0 && "Checking code coverage..."); //VDSINC + start[i] = hslab->opt_unlim_diminfo[i].start; + count[i] = hslab->opt_unlim_diminfo[i].count; + } /* end else */ + stride[i] = hslab->opt_unlim_diminfo[i].stride; + block[i] = hslab->opt_unlim_diminfo[i].block; + } /* end for */ + + /* Create output space, copy extent */ + if(NULL == (space_out = H5S_create(H5S_SIMPLE))) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "unable to create output dataspace") + if(H5S_extent_copy_real(&space_out->extent, &space->extent, TRUE) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "unable to copy destination space extent") + + /* Set offset to zeros */ + (void)HDmemset(space_out->select.offset, 0, (size_t)space_out->extent.rank * sizeof(space_out->select.offset[0])); + space_out->select.offset_changed = FALSE; + + /* "And" selection with calculate block to perform clip operation */ + if(H5S_select_hyperslab(space_out, H5S_SELECT_SET, start, stride, count, block) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "can't select hyperslab") + + /* Set return value */ + ret_value = space_out; + +done: + /* Free space on error */ + if(!ret_value) + if(space_out && H5S_close(space_out) < 0) + HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, NULL, "unable to release dataspace") + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5S_hyper_get_unlim_block */ + + +/*-------------------------------------------------------------------------- + NAME H5Sis_regular_hyperslab PURPOSE Determine if a hyperslab selection is regular diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index c796c31..342a9cc 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -270,6 +270,8 @@ H5_DLL herr_t H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size); H5_DLL herr_t H5S_hyper_clip_to_extent(H5S_t *space); H5_DLL herr_t H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, hsize_t *clip_size, hbool_t incl_trail); +H5_DLL H5S_t *H5S_hyper_get_unlim_block(const H5S_t *space, + hsize_t block_index); /* Operations on selection iterators */ H5_DLL herr_t H5S_select_iter_init(H5S_sel_iter_t *iter, const H5S_t *space, size_t elmt_size); -- cgit v0.12 From 5d12a79db20305b7c08e505a683a4c1e38e9039a Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 3 Jun 2015 13:00:58 -0500 Subject: [svn-r27145] Add some testing for printf-style source dataset name resolution. Various bug fixes, including a temporary fix for printf with FIRST_MISSING view. Other cleanup. Tested: ummon --- src/H5Dint.c | 1 - src/H5Dvirtual.c | 301 +++--- src/H5Oprivate.h | 29 +- src/H5Pdapl.c | 1 - src/H5Pdcpl.c | 32 +- src/H5Shyper.c | 155 ++- test/Makefile.am | 2 +- test/h5test.c | 109 ++- test/h5test.h | 1 + test/vds.c | 2784 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 10 files changed, 3090 insertions(+), 325 deletions(-) diff --git a/src/H5Dint.c b/src/H5Dint.c index c3c13ef..69f2d81 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1573,7 +1573,6 @@ H5D_close(H5D_t *dataset) /* Close sub datasets */ for(j = 0; j < dataset->shared->layout.storage.u.virt.list[i].sub_dset_nused; j++) if(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset) { - //HDassert(0 && "Checking code coverage..."); //VDSINC HDassert(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset != dataset); if(H5D_close(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to close source dataset") diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 87cbd21..baaea16 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -223,7 +223,7 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) /* Allocate memory for the list */ if(NULL == (layout->storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_calloc(layout->storage.u.virt.list_nused * sizeof(H5O_storage_virtual_ent_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "unable to allocate memory for virtual dataset entry list") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate memory for virtual dataset entry list") layout->storage.u.virt.list_nalloc = layout->storage.u.virt.list_nused; /* Copy the list entries, though set source_dset.dset and sub_dset to @@ -318,11 +318,9 @@ H5D__virtual_reset_layout(H5O_layout_t *layout) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") /* Free sub_dset */ - for(j = 0; j < layout->storage.u.virt.list[i].sub_dset_nalloc; j++) { - //HDassert(0 && "Checking code coverage..."); //VDSINC + for(j = 0; j < layout->storage.u.virt.list[i].sub_dset_nalloc; j++) if(H5D__virtual_reset_source_dset(&layout->storage.u.virt.list[i], &layout->storage.u.virt.list[i].sub_dset[j]) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset source dataset") - } //VDSINC layout->storage.u.virt.list[i].sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_xfree(layout->storage.u.virt.list[i].sub_dset); /* Free parsed_source_file_name */ @@ -525,6 +523,7 @@ static herr_t H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf, size_t *buf_size) { + size_t p_offset; /* Offset of p within buf */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -539,30 +538,30 @@ H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf, /* Allocate or extend buffer if necessary */ if(!*buf) { - //HDassert(0 && "Checking code coverage..."); //VDSINC HDassert(!*p); HDassert(*buf_size == 0); /* Allocate buffer */ if(NULL == (*buf = (char *)H5MM_malloc(src_len + (size_t)1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate name segment struct") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name segment struct") *buf_size = src_len + (size_t)1; *p = *buf; } /* end if */ - else if(((size_t)(*p - *buf) + src_len + (size_t)1) > *buf_size) { - HDassert(0 && "Checking code coverage..."); //VDSINC + else if(((p_offset = (size_t)(*p - *buf)) + src_len + (size_t)1) + > *buf_size) { char *tmp_buf; size_t tmp_buf_size; /* Calculate new size of buffer */ - tmp_buf_size = MAX((size_t)(*p - *buf) + src_len + (size_t)1, + tmp_buf_size = MAX(p_offset + src_len + (size_t)1, *buf_size * (size_t)2); /* Reallocate buffer */ if(NULL == (tmp_buf = (char *)H5MM_realloc(*buf, tmp_buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to reallocate name segment buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to reallocate name segment buffer") *buf = tmp_buf; *buf_size = tmp_buf_size; + *p = *buf + p_offset; } /* end if */ /* Copy string to *p. Note that since src in not NULL terminated, we must @@ -627,22 +626,18 @@ H5D_virtual_parse_source_name(const char *source_name, HDassert(pct >= p); /* Allocate name segment struct if necessary */ - if(!*tmp_parsed_name_p) { - //HDassert(0 && "Checking code coverage..."); //VDSINC + if(!*tmp_parsed_name_p) if(NULL == (*tmp_parsed_name_p = H5FL_CALLOC(H5O_storage_virtual_name_seg_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate name segment struct") - } //VDSINC + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name segment struct") /* Check for type of format specifier */ if(pct[1] == 'b') { /* Check for blank string before specifier */ - if(pct != p) { - //HDassert(0 && "Checking code coverage..."); //VDSINC + if(pct != p) /* Append string to name segment */ if(H5D__virtual_str_append(p, (size_t)(pct - p), &name_seg_p, &(*tmp_parsed_name_p)->name_segment, &name_seg_size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to append name segment") - } //VDSINC /* Update other variables */ tmp_parsed_name_p = &(*tmp_parsed_name_p)->next; @@ -652,7 +647,6 @@ H5D_virtual_parse_source_name(const char *source_name, name_seg_size = 0; } /* end if */ else if(pct[1] == '%') { - HDassert(0 && "Checking code coverage..."); //VDSINC /* Append string to name segment (include first '%') */ if(H5D__virtual_str_append(p, (size_t)(pct - p) + (size_t)1, &name_seg_p, &(*tmp_parsed_name_p)->name_segment, &name_seg_size) < 0) @@ -670,19 +664,15 @@ H5D_virtual_parse_source_name(const char *source_name, /* Copy last segment of name, if any, unless there were no substitutions */ if(tmp_nsubs > 0) { HDassert(p >= source_name); - if(*p == '\0') { - HDassert(0 && "Checking code coverage..."); //VDSINC + if(*p == '\0') HDassert((size_t)(p - source_name) == tmp_strlen); - } //VDSINC else { HDassert((size_t)(p - source_name) < tmp_strlen); /* Allocate name segment struct if necessary */ - if(!*tmp_parsed_name_p) { - //HDassert(0 && "Checking code coverage..."); //VDSINC + if(!*tmp_parsed_name_p) if(NULL == (*tmp_parsed_name_p = H5FL_CALLOC(H5O_storage_virtual_name_seg_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate name segment struct") - } /* end if */ + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name segment struct") /* Append string to name segment */ if(H5D__virtual_str_append(p, tmp_strlen - (size_t)(p - source_name), &name_seg_p, &(*tmp_parsed_name_p)->name_segment, @@ -735,14 +725,13 @@ H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst, /* Walk over parsed name, duplicating it */ while(p_src) { - //HDassert(0 && "Checking code coverage..."); //VDSINC /* Allocate name segment struct */ if(NULL == (*p_dst = H5FL_CALLOC(H5O_storage_virtual_name_seg_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate name segment struct") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name segment struct") /* Duplicate name segment */ if(NULL == ((*p_dst)->name_segment = HDstrdup(p_src->name_segment))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to duplicate name segment") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to duplicate name segment") /* Advance pointers */ p_src = p_src->next; @@ -784,7 +773,6 @@ H5D_virtual_free_parsed_name(H5O_storage_virtual_name_seg_t *name_seg) /* Walk name segments, freeing them */ while(name_seg) { - //HDassert(0 && "Checking code coverage..."); //VDSINC (void)H5MM_xfree(name_seg->name_segment); next_seg = name_seg->next; (void)H5FL_FREE(H5O_storage_virtual_name_seg_t, name_seg); @@ -823,7 +811,6 @@ H5D__virtual_build_source_name(char *source_name, /* Check for static name */ if(nsubs == 0) { - //HDassert(0 && "Checking code coverage..."); //VDSINC HDassert(!parsed_name); *built_name = source_name; } /* end if */ @@ -852,14 +839,13 @@ H5D__virtual_build_source_name(char *source_name, /* Allocate name buffer */ if(NULL == (tmp_name = (char *)H5MM_malloc(name_len))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate name buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name buffer") p = tmp_name; /* Build name */ do { /* Add name segment */ if(name_seg->name_segment) { - //HDassert(0 && "Checking code coverage..."); //VDSINC seg_len = HDstrlen(name_seg->name_segment); HDassert(seg_len > 0); HDassert(seg_len < name_len_rem); @@ -870,7 +856,6 @@ H5D__virtual_build_source_name(char *source_name, /* Add block number */ if(nsubs_rem > 0) { - //HDassert(0 && "Checking code coverage..."); //VDSINC HDassert(blockno_len < name_len_rem); if(HDsnprintf(p, name_len_rem, "%llu", (long long unsigned)blockno) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write block number to string") @@ -922,7 +907,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) hsize_t clip_size; int rank; hbool_t changed = FALSE; /* Whether the VDS extent changed */ - size_t i; + size_t i, j; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -949,7 +934,6 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if(storage->list[i].parsed_source_file_name || storage->list[i].parsed_source_dset_name) { hsize_t first_missing = 0; /* First missing dataset in the current block of missing datasets */ - hsize_t j; /* Search for source datasets */ HDassert(storage->printf_gap != HSIZE_UNDEF); @@ -957,10 +941,9 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) /* Check for running out of space in sub_dset array */ if(j >= (hsize_t)storage->list[i].sub_dset_nalloc) { if(storage->list[i].sub_dset_nalloc == 0) { - //HDassert(0 && "Checking code coverage..."); //VDSINC /* Allocate sub_dset */ if(NULL == (storage->list[i].sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_calloc(H5D_VIRTUAL_DEF_SUB_DSET_SIZE * sizeof(H5O_storage_virtual_srcdset_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate sub dataset array") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate sub dataset array") storage->list[i].sub_dset_nalloc = H5D_VIRTUAL_DEF_SUB_DSET_SIZE; } /* end if */ else { @@ -969,7 +952,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) HDassert(0 && "Checking code coverage..."); //VDSINC /* Extend sub_dset */ if(NULL == (tmp_sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_realloc(storage->list[i].sub_dset, 2 * storage->list[i].sub_dset_nalloc * sizeof(H5O_storage_virtual_srcdset_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend sub dataset array") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to extend sub dataset array") /* Clear new space in sub_dset */ (void)HDmemset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0, storage->list[i].sub_dset_nalloc * sizeof(H5O_storage_virtual_srcdset_t)); @@ -980,80 +963,84 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) } /* end if */ /* Check if the dataset is already open */ - if(storage->list[i].sub_dset[j].dset) { - //HDassert(0 && "Checking code coverage..."); //VDSINC + if(storage->list[i].sub_dset[j].dset) first_missing = j + 1; - } //VDSINC else { /* Resolve file name */ - if(!storage->list[i].sub_dset[j].file_name) { - //HDassert(0 && "Checking code coverage..."); //VDSINC + if(!storage->list[i].sub_dset[j].file_name) if(H5D__virtual_build_source_name(storage->list[i].source_dset.file_name, storage->list[i].parsed_source_file_name, storage->list[i].psfn_static_strlen, storage->list[i].psfn_nsubs, j, &storage->list[i].sub_dset[j].file_name) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source file name") - } //VDSINC /* Resolve dset name */ - if(!storage->list[i].sub_dset[j].dset_name) { - //HDassert(0 && "Checking code coverage..."); //VDSINC + if(!storage->list[i].sub_dset[j].dset_name) if(H5D__virtual_build_source_name(storage->list[i].source_dset.dset_name, storage->list[i].parsed_source_dset_name, storage->list[i].psdn_static_strlen, storage->list[i].psdn_nsubs, j, &storage->list[i].sub_dset[j].dset_name) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source dataset name") - } //VDSINC /* Resolve virtual selection for block */ - if(!storage->list[i].sub_dset[j].virtual_select) { - //HDassert(0 && "Checking code coverage..."); //VDSINC + if(!storage->list[i].sub_dset[j].virtual_select) if(NULL == (storage->list[i].sub_dset[j].virtual_select = H5S_hyper_get_unlim_block(storage->list[i].source_dset.virtual_select, j))) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get block in unlimited selection") - } //VDSINC /* Open source dataset */ if(H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].sub_dset[j], dxpl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") /* Update first_missing */ - if(storage->list[i].sub_dset[j].dset) { - //HDassert(0 && "Checking code coverage..."); //VDSINC + if(storage->list[i].sub_dset[j].dset) first_missing = j + 1; - } //VDSINC } /* end else */ } /* end for */ /* Check if the size changed */ - if(first_missing != (hsize_t)storage->list[i].sub_dset_nused) { + if((first_missing == (hsize_t)storage->list[i].sub_dset_nused) + && (storage->list[i].clip_size_virtual != HSIZE_UNDEF)) + /* Use cached clip_size */ + clip_size = storage->list[i].clip_size_virtual; + else { /* Check for no datasets */ - if(first_missing == 0) { - HDassert(0 && "Checking code coverage..."); //VDSINC + if(first_missing == 0) /* Set clip size to 0 */ clip_size = (hsize_t)0; - } //VDSINC else { hsize_t bounds_start[H5S_MAX_RANK]; hsize_t bounds_end[H5S_MAX_RANK]; - //HDassert(0 && "Checking code coverage..."); //VDSINC - /* Get bounds from last valid virtual selection */ - if(H5S_SELECT_BOUNDS(storage->list[i].sub_dset[first_missing - (hsize_t)1].virtual_select, bounds_start, bounds_end) < 0) + /* Get clip size from selection */ + if(storage->view == H5D_VDS_LAST_AVAILABLE) { + /* Get bounds from last valid virtual selection */ + if(H5S_SELECT_BOUNDS(storage->list[i].sub_dset[first_missing - (hsize_t)1].virtual_select, bounds_start, bounds_end) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") - /* Set clip_size to bounds_end in unlimited dimension */ - clip_size = bounds_end[storage->list[i].unlim_dim_virtual] - + (hsize_t)1; + /* Set clip_size to bounds_end in unlimited + * dimension */ + clip_size = bounds_end[storage->list[i].unlim_dim_virtual] + + (hsize_t)1; + } /* end if */ + else { + /* Get bounds from first missing virtual selection + */ + if(H5S_SELECT_BOUNDS(storage->list[i].sub_dset[first_missing].virtual_select, bounds_start, bounds_end) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") + + /* Set clip_size to bounds_start in unlimited + * dimension */ + clip_size = bounds_start[storage->list[i].unlim_dim_virtual]; + } /* end else */ } /* end else */ /* Clip entry root virtual select (virtual_select for all - * sub dsets) */ - if(H5S_hyper_clip_unlim(storage->list[i].source_dset.virtual_select, clip_size)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + * sub dsets) if we are setting the extent by the last + * available data. Note that if we used the cached + * clip_size above, the selection will already be clipped to + * the correct size. */ + if(storage->view == H5D_VDS_LAST_AVAILABLE) + if(H5S_hyper_clip_unlim(storage->list[i].source_dset.virtual_select, clip_size)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") /* Set sub_dset_nused and clip_size_virtual */ storage->list[i].sub_dset_nused = (size_t)first_missing; storage->list[i].clip_size_virtual = clip_size; - } /* end if */ - else { - //HDassert(0 && "Checking code coverage..."); //VDSINC - /* Use cached clip_size */ - clip_size = storage->list[i].clip_size_virtual; - } //VDSINC + } /* end else */ } /* end if */ else { HDassert(storage->list[i].unlim_dim_source >= 0); @@ -1123,7 +1110,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if(new_dims[i] == HSIZE_UNDEF) new_dims[i] = curr_dims[i]; else if(new_dims[i] < storage->min_dims[i]) { - //HDassert(0 && "Checking code coverage..."); //VDSINC + HDassert(0 && "Checking code coverage..."); //VDSINC new_dims[i] = storage->min_dims[i]; } //VDSINC if(new_dims[i] != curr_dims[i]) @@ -1140,17 +1127,23 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) /* Iterate over mappings again to update source selections and virtual * mapping extents */ - for(i = 0; i < storage->list_nalloc; i++) - /* Check for unlimited dimension */ - if(storage->list[i].unlim_dim_source >= 0) { - HDassert(storage->list[i].unlim_dim_virtual >= 0); - - /* Update virtual mapping extent. Note this function does not - * clip the selection. */ - if(changed) - if(H5S_set_extent(storage->list[i].source_dset.virtual_select, new_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + for(i = 0; i < storage->list_nalloc; i++) { + /* Update virtual mapping extent. Note this function does not clip + * the selection. */ + if(changed) { + /* Update top level virtual_select */ + if(H5S_set_extent(storage->list[i].source_dset.virtual_select, new_dims) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + + /* Update sub dataset virtual_selects */ + for(j = 0; j < storage->list[i].sub_dset_nalloc; j++) + if(storage->list[i].sub_dset[j].virtual_select) + if(H5S_set_extent(storage->list[i].sub_dset[j].virtual_select, new_dims) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + } /* end if */ + /* Check for unlimited dimension */ + if(storage->list[i].unlim_dim_virtual >= 0) { /* Check if we are setting extent by the minimum of mappings */ if(storage->view == H5D_VDS_FIRST_MISSING) { /* Clip virtual selection to extent (only necessary if the @@ -1160,30 +1153,36 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if(H5S_hyper_clip_to_extent(storage->list[i].source_dset.virtual_select)) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") - /* Check if the virtual extent in the unlimited dimension - * changed since the last time the VDS extent/mapping was - * updated */ - if(new_dims[storage->list[i].unlim_dim_virtual] - == storage->list[i].unlim_extent_virtual) - /* Use cached result for clip size */ - clip_size = storage->list[i].clip_size_source; - else { - /* Get size that source selection will be clipped to to - * match size of virtual selection */ - if(H5S_hyper_get_clip_extent(storage->list[i].source_select, storage->list[i].source_dset.virtual_select, &clip_size, FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") - - /* Update cached values unlim_extent_virtual and - * clip_size_source */ - storage->list[i].unlim_extent_virtual = new_dims[storage->list[i].unlim_dim_virtual]; - storage->list[i].clip_size_source = clip_size; - } /* end else */ + /* Only clip source_select if this is not a "printf" style + * mapping */ + if(!(storage->list[i].parsed_source_file_name + || storage->list[i].parsed_source_dset_name)) { + /* Check if the virtual extent in the unlimited + * dimension changed since the last time the VDS + * extent/mapping was updated */ + if(new_dims[storage->list[i].unlim_dim_virtual] + == storage->list[i].unlim_extent_virtual) + /* Use cached result for clip size */ + clip_size = storage->list[i].clip_size_source; + else { + /* Get size that source selection will be clipped to + * to match size of virtual selection */ + if(H5S_hyper_get_clip_extent(storage->list[i].source_select, storage->list[i].source_dset.virtual_select, &clip_size, FALSE) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") + + /* Update cached values unlim_extent_virtual and + * clip_size_source */ + storage->list[i].unlim_extent_virtual = new_dims[storage->list[i].unlim_dim_virtual]; + storage->list[i].clip_size_source = clip_size; + } /* end else */ - /* Clip source_select */ - if(H5S_hyper_clip_unlim(storage->list[i].source_select, clip_size)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + /* Clip source_select */ + if(H5S_hyper_clip_unlim(storage->list[i].source_select, clip_size)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + } /* end if */ } /* end if */ } /* end if */ + } /* end for */ } /* end if */ /* Call H5D__mark so dataspace is updated on disk? VDSINC */ @@ -1210,22 +1209,25 @@ herr_t H5D__virtual_init(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5D_t *dset, hid_t dapl_id) { + H5O_storage_virtual_t *storage; /* Convenience pointer */ H5P_genplist_t *dapl; /* Data access property list object pointer */ - size_t i; /* Local index variable */ + size_t i; /* Local index variables */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE /* Sanity check */ HDassert(dset); - HDassert(dset->shared->layout.storage.u.virt.list || (dset->shared->layout.storage.u.virt.list_nused == 0)); + storage = &dset->shared->layout.storage.u.virt; + HDassert(storage->list || (storage->list_nused == 0)); /* Patch the virtual selection dataspaces */ - for(i = 0; i < dset->shared->layout.storage.u.virt.list_nused; i++) { - if(dset->shared->layout.storage.u.virt.list[i].virtual_space_status != H5O_VIRTUAL_STATUS_CORRECT) { - if(H5S_extent_copy(dset->shared->layout.storage.u.virt.list[i].source_dset.virtual_select, dset->shared->space) < 0) + for(i = 0; i < storage->list_nused; i++) { + if(storage->list[i].virtual_space_status != H5O_VIRTUAL_STATUS_CORRECT) { + if(H5S_extent_copy(storage->list[i].source_dset.virtual_select, dset->shared->space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") - dset->shared->layout.storage.u.virt.list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; + storage->list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; + HDassert(storage->list[i].sub_dset_nalloc == 0); } /* end if */ } /* end for */ @@ -1234,12 +1236,16 @@ H5D__virtual_init(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5D_t *dset, HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for dapl ID") /* Get view option */ - if(H5P_get(dapl, H5D_ACS_VDS_VIEW_NAME, &dset->shared->layout.storage.u.virt.view) < 0) + if(H5P_get(dapl, H5D_ACS_VDS_VIEW_NAME, &storage->view) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get virtual view option") - /* Get printf gap */ - if(H5P_get(dapl, H5D_ACS_VDS_PRINTF_GAP_NAME, &dset->shared->layout.storage.u.virt.printf_gap) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get virtual printf gap") + /* Get printf gap if view is H5D_VDS_LAST_AVAILABLE, otherwise set to 0 */ + if(storage->view == H5D_VDS_LAST_AVAILABLE) { + if(H5P_get(dapl, H5D_ACS_VDS_PRINTF_GAP_NAME, &storage->printf_gap) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get virtual printf gap") + } /* end if */ + else + storage->printf_gap = (hsize_t)0; done: FUNC_LEAVE_NOAPI(ret_value) @@ -1320,6 +1326,8 @@ H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5S_t *projected_mem_space = NULL; /* Memory space for selection in a single mapping */ H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */ hssize_t select_nelmts; /* Number of elements in selection */ + H5S_t *tmp_space = NULL; /* Copied virtual_select VDSINC */ + H5S_t *virtual_select; /* Pointer to real virtual_select VDSINC */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1327,9 +1335,41 @@ H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, HDassert(virtual_ent); HDassert(source_dset); + /* Quick hack to make this work with printf VDSINC */ + if(source_dset == &virtual_ent->source_dset) { + virtual_select = source_dset->virtual_select; + } /* end if */ + else { + hsize_t start[H5S_MAX_RANK]; + hsize_t count[H5S_MAX_RANK]; + + /* Copy virtual selection */ + if(NULL == (tmp_space = H5S_copy(source_dset->virtual_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual selection") + + /* Get virtual extent dimensions */ + if(H5S_get_simple_extent_dims(tmp_space, count, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get virtual dataspace dimensions") + + /* Set start to zeroes */ + (void)HDmemset(start, 0, sizeof(start)); + + /* Clip tmp_space selection to extent */ + if(H5S_select_hyperslab(tmp_space, H5S_SELECT_AND, start, NULL, count, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't clip selection to extent") + + /* Check for no elements selected */ + if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(tmp_space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + if(select_nelmts == 0) + HGOTO_DONE(SUCCEED) + + virtual_select = tmp_space; + } /* end else */ + /* Project intersection of file space and mapping virtual space onto * memory space */ - if(H5S_select_project_intersection(file_space, mem_space, source_dset->virtual_select, &projected_mem_space) < 0) + if(H5S_select_project_intersection(file_space, mem_space, virtual_select, &projected_mem_space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") /* Get number of elements in projected dataspace */ @@ -1351,7 +1391,7 @@ H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Project intersection of file space and mapping virtual space onto * mapping source space */ - if(H5S_select_project_intersection(source_dset->virtual_select, virtual_ent->source_select, file_space, &projected_src_space) < 0) + if(H5S_select_project_intersection(virtual_select, virtual_ent->source_select, file_space, &projected_src_space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto source space") /* Perform read on source dataset */ @@ -1372,16 +1412,23 @@ H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, done: /* Release allocated resources on failure */ - if(projected_src_space) { - HDassert(ret_value < 0); - if(H5S_close(projected_src_space) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") - } /* end if */ - if(projected_mem_space) { - HDassert(ret_value < 0); - if(H5S_close(projected_mem_space) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") + if(ret_value < 0) { + if(projected_src_space) + if(H5S_close(projected_src_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") + if(projected_mem_space) + if(H5S_close(projected_mem_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") } /* end if */ + else { + HDassert(!projected_src_space); + HDassert(!projected_mem_space); + } /* end else */ + + /* Release tmp_space VDSINC */ + if(tmp_space) + if(H5S_close(tmp_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close temporary space") FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_read_one() */ @@ -1429,11 +1476,9 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, if(storage->list[i].parsed_source_file_name || storage->list[i].parsed_source_dset_name) { /* Iterate over sub-source dsets */ - for(j = 0; j < storage->list[i].sub_dset_nused; j++) { - //HDassert(0 && "Checking code coverage..."); //VDSINC + for(j = 0; j < storage->list[i].sub_dset_nused; j++) if(H5D__virtual_read_one(io_info, type_info, file_space, mem_space, &storage->list[i], &storage->list[i].sub_dset[j]) < 0) HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read source dataset") - } //VDSINC } /* end if */ else /* Read from source dataset */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 6351dd5..6dc39d4 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -413,22 +413,25 @@ typedef struct H5O_storage_compact_t { } H5O_storage_compact_t; typedef struct H5O_storage_virtual_srcdset_t { - struct H5D_t *dset; /* Source dataset */ + /* Stored */ char *file_name; /* Source file name used for virtual dataset mapping */ char *dset_name; /* Source dataset name used for virtual dataset mapping */ struct H5S_t *virtual_select; /* Selection in the virtual dataset that is mapped to source selection */ + + /* Not stored */ + struct H5D_t *dset; /* Source dataset */ } H5O_storage_virtual_srcdset_t; typedef struct H5O_storage_virtual_name_seg_t { - char *name_segment; - struct H5O_storage_virtual_name_seg_t *next; + char *name_segment; /* String for this name segment */ + struct H5O_storage_virtual_name_seg_t *next; /* Next name segment */ } H5O_storage_virtual_name_seg_t; typedef enum H5O_virtual_space_status_t { - H5O_VIRTUAL_STATUS_INVALID = 0, /* Space extent is invalid */ + H5O_VIRTUAL_STATUS_INVALID = 0, /* Space extent is invalid */ H5O_VIRTUAL_STATUS_SEL_BOUNDS, /* Space extent set to bounds of selection */ H5O_VIRTUAL_STATUS_USER, /* Space extent provided by application */ - H5O_VIRTUAL_STATUS_CORRECT /* Space extent matches dataset */ + H5O_VIRTUAL_STATUS_CORRECT /* Space extent matches dataset */ } H5O_virtual_space_status_t; typedef struct H5O_storage_virtual_ent_t { @@ -438,14 +441,14 @@ typedef struct H5O_storage_virtual_ent_t { /* Not stored */ H5O_storage_virtual_srcdset_t *sub_dset; /* Array of sub-source dataset info structs */ - size_t sub_dset_nalloc; - size_t sub_dset_nused; - H5O_storage_virtual_name_seg_t *parsed_source_file_name; - size_t psfn_static_strlen; - size_t psfn_nsubs; - H5O_storage_virtual_name_seg_t *parsed_source_dset_name; - size_t psdn_static_strlen; - size_t psdn_nsubs; + size_t sub_dset_nalloc; /* Number of slots allocated in sub_dset */ + size_t sub_dset_nused; /* Number of slots "used" in sub_dset - essentially the farthest sub dataset in the extent */ + H5O_storage_virtual_name_seg_t *parsed_source_file_name; /* Parsed version of source_dset.file_name */ + size_t psfn_static_strlen; /* Length of parsed_source_file_name without block number substitutions */ + size_t psfn_nsubs; /* Number of block number substitutions in parsed_source_file_name */ + H5O_storage_virtual_name_seg_t *parsed_source_dset_name; /* Parsed version of source_dset.dset_name */ + size_t psdn_static_strlen; /* Length of parsed_source_dset_name without block number substitutions */ + size_t psdn_nsubs; /* Number of block number substitutions in parsed_source_dset_name */ int unlim_dim_source; /* Unlimited dimension in source_select */ int unlim_dim_virtual; /* Unlimited dimension in virtual_select */ hsize_t unlim_extent_source; /* Extent of unlimited dimension in source dset last time virtual_select was patched to match selection */ diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index c11d22f..dea45f2 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -476,7 +476,6 @@ H5Pset_virtual_printf_gap(hid_t plist_id, hsize_t gap_size) FUNC_ENTER_API(FAIL) - HDassert(0 && "Checking code coverage..."); //VDSINC /* Check argument */ if(gap_size == HSIZE_UNDEF) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid printf gap size") diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index e647f29..ff7098d 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1724,22 +1724,22 @@ done: /* Check if the entry has been partly allocated but not added to the * property list or not included in list_nused */ - if((ret_value < 0) && ent) { - HDassert(ret_value < 0); - - /* Free incomplete entry */ - ent->source_dset.file_name = (char *)H5MM_xfree(ent->source_dset.file_name); - ent->source_dset.dset_name = (char *)H5MM_xfree(ent->source_dset.dset_name); - if(ent->source_dset.virtual_select && H5S_close(ent->source_dset.virtual_select) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release virtual selection") - ent->source_dset.virtual_select = NULL; - if(ent->source_select && H5S_close(ent->source_select) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") - ent->source_select = NULL; - H5D_virtual_free_parsed_name(ent->parsed_source_file_name); - ent->parsed_source_file_name = NULL; - H5D_virtual_free_parsed_name(ent->parsed_source_dset_name); - ent->parsed_source_dset_name = NULL; + if(ret_value < 0) { + /* Free incomplete entry if present */ + if(ent) { + ent->source_dset.file_name = (char *)H5MM_xfree(ent->source_dset.file_name); + ent->source_dset.dset_name = (char *)H5MM_xfree(ent->source_dset.dset_name); + if(ent->source_dset.virtual_select && H5S_close(ent->source_dset.virtual_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release virtual selection") + ent->source_dset.virtual_select = NULL; + if(ent->source_select && H5S_close(ent->source_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") + ent->source_select = NULL; + H5D_virtual_free_parsed_name(ent->parsed_source_file_name); + ent->parsed_source_file_name = NULL; + H5D_virtual_free_parsed_name(ent->parsed_source_dset_name); + ent->parsed_source_dset_name = NULL; + } /* end if */ /* Free list if necessary */ if(free_list) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index a3e6781..399d009 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -6550,33 +6550,20 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, opt_block = int_block; for(u=0; uextent.rank; u++) { /* contiguous hyperslabs have the block size equal to the stride */ - if(stride[u]==block[u]) { - if(count[u] == H5S_UNLIMITED) { - if(block[u] == 1) { - int_block[u] = H5S_UNLIMITED; - int_count[u] = 1; - int_stride[u] = 1; - } /* end if */ - else { - int_block[u] = block[u]; - int_count[u] = H5S_UNLIMITED; - int_stride[u] = stride[u]; - } /* end else */ - } /* end if */ - else { - int_count[u]=1; - int_stride[u]=1; - if(block[u]==1) - int_block[u]=count[u]; - else - int_block[u]=block[u]*count[u]; - } /* end else */ + if((stride[u] == block[u]) && (count[u] != H5S_UNLIMITED)) { + int_count[u]=1; + int_stride[u]=1; + if(block[u]==1) + int_block[u]=count[u]; + else + int_block[u]=block[u]*count[u]; } /* end if */ else { if(count[u]==1) int_stride[u]=1; else { - HDassert(stride[u] > block[u]); + HDassert((stride[u] > block[u]) || ((stride[u] == block[u]) + && (count[u] == H5S_UNLIMITED))); int_stride[u]=stride[u]; } /* end else */ int_count[u]=count[u]; @@ -6761,7 +6748,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Patch count and block to remove unlimited and include the * existing selection */ - H5S__hyper_get_clip_diminfo(start[unlim_dim], opt_stride[unlim_dim], &tmp_count, &tmp_block, space->select.offset[unlim_dim], bounds_end[unlim_dim]); + H5S__hyper_get_clip_diminfo(start[unlim_dim], opt_stride[unlim_dim], &tmp_count, &tmp_block, space->select.offset[unlim_dim], bounds_end[unlim_dim] + (hsize_t)1); HDassert((tmp_count == 1) || (opt_count != _ones)); HDassert((tmp_block == 1) || (opt_block != _ones)); if(opt_count != _ones) { @@ -7276,33 +7263,20 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, opt_block = int_block; for(u=0; uextent.rank; u++) { /* contiguous hyperslabs have the block size equal to the stride */ - if(stride[u]==block[u]) { - if(count[u] == H5S_UNLIMITED) { - if(block[u] == 1) { - int_block[u] = H5S_UNLIMITED; - int_count[u] = 1; - int_stride[u] = 1; - } /* end if */ - else { - int_block[u] = block[u]; - int_count[u] = H5S_UNLIMITED; - int_stride[u] = stride[u]; - } /* end else */ - } /* end if */ - else { - int_count[u]=1; - int_stride[u]=1; - if(block[u]==1) - int_block[u]=count[u]; - else - int_block[u]=block[u]*count[u]; - } /* end else */ + if((stride[u] == block[u]) && (count[u] != H5S_UNLIMITED)) { + int_count[u]=1; + int_stride[u]=1; + if(block[u]==1) + int_block[u]=count[u]; + else + int_block[u]=block[u]*count[u]; } /* end if */ else { if(count[u]==1) int_stride[u]=1; else { - HDassert(stride[u] > block[u]); + HDassert((stride[u] > block[u]) || ((stride[u] == block[u]) + && (count[u] == H5S_UNLIMITED))); int_stride[u]=stride[u]; } /* end else */ int_count[u]=count[u]; @@ -7479,7 +7453,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Patch count and block to remove unlimited and include the * existing selection */ - H5S__hyper_get_clip_diminfo(start[unlim_dim], opt_stride[unlim_dim], &tmp_count, &tmp_block, space->select.offset[unlim_dim], bounds_end[unlim_dim]); + H5S__hyper_get_clip_diminfo(start[unlim_dim], opt_stride[unlim_dim], &tmp_count, &tmp_block, space->select.offset[unlim_dim], bounds_end[unlim_dim] + (hsize_t)1); HDassert((tmp_count == 1) || (opt_count != _ones)); HDassert((tmp_block == 1) || (opt_block != _ones)); if(opt_count != _ones) { @@ -9368,7 +9342,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, /* Allocate space for the hyperslab selection information (note this sets * diminfo_valid to FALSE, diminfo arrays to 0, and span list to NULL) */ if((proj_space->select.sel_info.hslab = H5FL_CALLOC(H5S_hyper_sel_t)) == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab info") /* Set selection type */ proj_space->select.type = H5S_sel_hyper; @@ -9542,7 +9516,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, * current dimension */ low = curr_span_up_dim[i - 1] % proj_space->extent.size[i - 1]; if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], low, low, curr_span_tree[i], NULL) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSELECT, FAIL, "can't allocate hyperslab span") /* Reset lower dimension's span tree and previous * span since we just committed it and will start @@ -9567,7 +9541,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, /* Append span in lowest dimension */ if(H5S_hyper_append_span(&prev_span[proj_rank - 1], &curr_span_tree[proj_rank - 1], low, high, NULL, NULL) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSELECT, FAIL, "can't allocate hyperslab span") /* Update remaining offset and length */ proj_off += (hsize_t)span_len; @@ -9590,7 +9564,7 @@ loop_end: /* Append remaining span tree to higher dimension */ low = curr_span_up_dim[i - 1] % proj_space->extent.size[i - 1]; if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], low, low, curr_span_tree[i], NULL) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSELECT, FAIL, "can't allocate hyperslab span") /* Reset span tree */ if(H5S_hyper_free_span_info(curr_span_tree[i]) < 0) @@ -9687,15 +9661,13 @@ H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, *count = 0; } /* end if */ /* Check for single block in unlimited dimension */ - else if(*count == (hsize_t)1) { - HDassert(*block == H5S_UNLIMITED); - + else if((*block == H5S_UNLIMITED) || (*block == stride)) { /* Calculate actual block size for this clip size */ *block = (hsize_t)((hssize_t)clip_size - ((hssize_t)start + offset)); + *count = (hsize_t)1; } /* end if */ else { HDassert(*count == H5S_UNLIMITED); - HDassert(*block != H5S_UNLIMITED); HDassert((hssize_t)clip_size > offset); /* Calculate initial count (last block may be partial) */ @@ -9734,6 +9706,8 @@ herr_t H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) { H5S_hyper_sel_t *hslab; /* Convenience pointer to hyperslab info */ + + H5S_hyper_dim_t *diminfo; /* Convenience pointer to opt_diminfo in unlimited dimension */ herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI(FAIL) @@ -9744,6 +9718,8 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) HDassert(hslab); HDassert(hslab->unlim_dim >= 0); + diminfo = &hslab->opt_diminfo[hslab->unlim_dim]; + /* Check for no need to change size */ if(((hssize_t)clip_size - space->select.offset[hslab->unlim_dim]) == hslab->unlim_dim_clip_size) @@ -9757,14 +9733,14 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) } /* end if */ /* Initialize opt_diminfo with opt_unlim_diminfo */ - hslab->opt_diminfo[hslab->unlim_dim] = hslab->opt_unlim_diminfo[hslab->unlim_dim]; + *diminfo = hslab->opt_unlim_diminfo[hslab->unlim_dim]; /* Get initial diminfo */ - H5S__hyper_get_clip_diminfo(hslab->opt_diminfo[hslab->unlim_dim].start, hslab->opt_diminfo[hslab->unlim_dim].stride, &hslab->opt_diminfo[hslab->unlim_dim].count, &hslab->opt_diminfo[hslab->unlim_dim].block, space->select.offset[hslab->unlim_dim], clip_size); + H5S__hyper_get_clip_diminfo(diminfo->start, diminfo->stride, &diminfo->count, &diminfo->block, space->select.offset[hslab->unlim_dim], clip_size); /* Check for nothing returned */ - if((hslab->opt_diminfo[hslab->unlim_dim].block == 0) - || (hslab->opt_diminfo[hslab->unlim_dim].count == 0)) { + if((diminfo->block == 0) + || (diminfo->count == 0)) { /* Set num_elem */ space->select.num_elem = (hsize_t)0; @@ -9774,25 +9750,20 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) /* Check for single block in unlimited dimension */ else if(hslab->opt_unlim_diminfo[hslab->unlim_dim].count == (hsize_t)1) { /* Calculate number of elements */ - space->select.num_elem = hslab->opt_diminfo[hslab->unlim_dim].block - * hslab->num_elem_non_unlim; + space->select.num_elem = diminfo->block * hslab->num_elem_non_unlim; /* Mark that opt_diminfo is valid */ hslab->diminfo_valid = TRUE; } /* end if */ else { /* Calculate number of elements */ - space->select.num_elem = hslab->opt_diminfo[hslab->unlim_dim].count - * hslab->opt_diminfo[hslab->unlim_dim].block + space->select.num_elem = diminfo->count * diminfo->block * hslab->num_elem_non_unlim; /* Check if last block is partial. If superset is set, just keep the * last block complete to speed computation. */ - if(((hslab->opt_diminfo[hslab->unlim_dim].stride - * (hslab->opt_diminfo[hslab->unlim_dim].count - (hsize_t)1)) - + hslab->opt_diminfo[hslab->unlim_dim].block) - > ((hsize_t)((hssize_t)clip_size - - ((hssize_t)hslab->opt_diminfo[hslab->unlim_dim].start + if(((diminfo->stride * (diminfo->count - (hsize_t)1)) + diminfo->block) + > ((hsize_t)((hssize_t)clip_size - ((hssize_t)diminfo->start + space->select.offset[hslab->unlim_dim])))) { hsize_t start[H5S_MAX_RANK]; hsize_t block[H5S_MAX_RANK]; @@ -9908,6 +9879,7 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, { const H5S_hyper_sel_t *clip_hslab; /* Convenience pointer to hyperslab info */ const H5S_hyper_sel_t *match_hslab; /* Convenience pointer to hyperslab info */ + const H5S_hyper_dim_t *diminfo; /* Convenience pointer to opt_unlim_diminfo in unlimited dimension */ hsize_t num_slices; hsize_t count; hsize_t rem_slices; @@ -9926,59 +9898,45 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, HDassert(match_hslab->unlim_dim >= 0); HDassert(clip_hslab->num_elem_non_unlim == match_hslab->num_elem_non_unlim); + diminfo = &clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim]; + /* Calculate number of slices */ num_slices = match_space->select.num_elem / match_hslab->num_elem_non_unlim; if(num_slices == 0) { HDassert(incl_trail && "Checking code coverage..."); //VDSINC HDassert(!incl_trail && "Checking code coverage..."); //VDSINC - *clip_size = incl_trail - ? clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start - : 0; + *clip_size = incl_trail ? diminfo->start : 0; } //VDSINC - else if(clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block == H5S_UNLIMITED) { + else if((diminfo->block == H5S_UNLIMITED) + || (diminfo->block == diminfo->stride)) /* Unlimited block, just set the extent large enough for the block size * to match num_slices */ - HDassert(clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].count == (hsize_t)1); - - *clip_size = - clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start - + num_slices; - } /* end if */ + *clip_size = diminfo->start + num_slices; else { /* Unlimited count, need to match extent so a block (possibly) gets cut * off so the number of slices matches num_slices */ - HDassert(clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].count == H5S_UNLIMITED); + HDassert(diminfo->count == H5S_UNLIMITED); /* Calculate number of complete blocks in clip_space */ - count = num_slices / clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block; + count = num_slices / diminfo->block; /* Calculate slices remaining */ - rem_slices = num_slices - (count - * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block); + rem_slices = num_slices - (count * diminfo->block); if(rem_slices > 0) /* Must end extent in middle of partial block (or beginning of empty * block if include_trailing_space and rem_slices == 0) */ - *clip_size = - clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start - + (count - * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride) + *clip_size = diminfo->start + (count * diminfo->stride) + rem_slices; else { if(incl_trail) /* End extent just before first missing block */ - *clip_size = - clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start - + (count - * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride); + *clip_size = diminfo->start + (count * diminfo->stride); else /* End extent at end of last block */ - *clip_size = - clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].start - + ((count - (hsize_t)1) - * clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].stride) - + clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim].block; + *clip_size = diminfo->start + ((count - (hsize_t)1) + * diminfo->stride) + diminfo->block; } /* end else */ } /* end else */ @@ -10024,17 +9982,16 @@ H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index) HDassert(hslab->unlim_dim >= 0); HDassert(hslab->opt_unlim_diminfo[hslab->unlim_dim].count == H5S_UNLIMITED); - /* Set block to clip_size in unlimited dimension, H5S_MAX_SIZE in - * others so only unlimited dimension is clipped */ + /* Set start to select block_indexth block in unlimited dimension and set + * count to 1 in that dimension to only select that block. Copy all other + * diminfo parameters. */ for(i = 0; i < space->extent.rank; i++) { if((int)i == hslab->unlim_dim){ - //HDassert(0 && "Checking code coverage..."); //VDSINC start[i] = hslab->opt_unlim_diminfo[i].start + (block_index * hslab->opt_unlim_diminfo[i].stride); count[i] = (hsize_t)1; } /* end if */ else { - //HDassert(0 && "Checking code coverage..."); //VDSINC start[i] = hslab->opt_unlim_diminfo[i].start; count[i] = hslab->opt_unlim_diminfo[i].count; } /* end else */ @@ -10052,7 +10009,7 @@ H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index) (void)HDmemset(space_out->select.offset, 0, (size_t)space_out->extent.rank * sizeof(space_out->select.offset[0])); space_out->select.offset_changed = FALSE; - /* "And" selection with calculate block to perform clip operation */ + /* Select block as defined by start/stride/count/block computed above */ if(H5S_select_hyperslab(space_out, H5S_SELECT_SET, start, stride, count, block) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "can't select hyperslab") diff --git a/test/Makefile.am b/test/Makefile.am index e45fbd3..7588dc0 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -151,7 +151,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse new_multi_file_v16-r.h5 new_multi_file_v16-s.h5 \ split_get_file_image_test-m.h5 split_get_file_image_test-r.h5 \ file_image_core_test.h5.copy unregister_filter_1.h5 unregister_filter_2.h5 \ - vds_[1-2].h5 + vds_virt.h5 vds_src_[0-1].h5 # Sources for testhdf5 executable testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \ diff --git a/test/h5test.c b/test/h5test.c index 693760c..88a8afa 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -122,69 +122,94 @@ h5_errors(hid_t estack, void UNUSED *client_data) /*------------------------------------------------------------------------- - * Function: h5_cleanup + * Function: h5_close_files * - * Purpose: Cleanup temporary test files. + * Purpose: Cleanup temporary test files (always closes). * base_name contains the list of test file names. - * The file access property list is also closed. * - * Return: Non-zero if cleanup actions were performed; zero otherwise. + * Return: void * - * Programmer: Albert Cheng + * Programmer: Neil Fortner + * June 1, 2015 + * Original: Albert Cheng * May 28, 1998 * *------------------------------------------------------------------------- */ -int -h5_cleanup(const char *base_name[], hid_t fapl) +void +h5_close_files(const char *base_name[], hid_t fapl) { - int retval = 0; + int i; - if(GetTestCleanup()) { - int i; + for(i = 0; base_name[i]; i++) { + char filename[1024]; + char temp[2048]; + hid_t driver; - for(i = 0; base_name[i]; i++) { - char filename[1024]; - char temp[2048]; - hid_t driver; + if(NULL == h5_fixname(base_name[i], fapl, filename, sizeof(filename))) + continue; - if(NULL == h5_fixname(base_name[i], fapl, filename, sizeof(filename))) - continue; + driver = H5Pget_driver(fapl); - driver = H5Pget_driver(fapl); + if(driver == H5FD_FAMILY) { + int j; - if(driver == H5FD_FAMILY) { - int j; + for(j = 0; /*void*/; j++) { + HDsnprintf(temp, sizeof temp, filename, j); - for(j = 0; /*void*/; j++) { - HDsnprintf(temp, sizeof temp, filename, j); + if(HDaccess(temp, F_OK) < 0) + break; - if(HDaccess(temp, F_OK) < 0) - break; + HDremove(temp); + } /* end for */ + } else if(driver == H5FD_CORE) { + hbool_t backing; /* Whether the core file has backing store */ - HDremove(temp); - } /* end for */ - } else if(driver == H5FD_CORE) { - hbool_t backing; /* Whether the core file has backing store */ + H5Pget_fapl_core(fapl, NULL, &backing); - H5Pget_fapl_core(fapl, NULL, &backing); + /* If the file was stored to disk with bacing store, remove it */ + if(backing) + HDremove(filename); + } else if (driver == H5FD_MULTI) { + H5FD_mem_t mt; - /* If the file was stored to disk with bacing store, remove it */ - if(backing) - HDremove(filename); - } else if (driver == H5FD_MULTI) { - H5FD_mem_t mt; + HDassert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES); - HDassert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES); + for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) { + HDsnprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]); + HDremove(temp); /*don't care if it fails*/ + } /* end for */ + } else { + HDremove(filename); + } + } /* end for */ - for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) { - HDsnprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]); - HDremove(temp); /*don't care if it fails*/ - } /* end for */ - } else { - HDremove(filename); - } - } /* end for */ + return; +} /* end h5_close_files() */ + + +/*------------------------------------------------------------------------- + * Function: h5_cleanup + * + * Purpose: Cleanup temporary test files. + * base_name contains the list of test file names. + * The file access property list is also closed. + * + * Return: Non-zero if cleanup actions were performed; zero otherwise. + * + * Programmer: Albert Cheng + * May 28, 1998 + * + *------------------------------------------------------------------------- + */ +int +h5_cleanup(const char *base_name[], hid_t fapl) +{ + int retval = 0; + + if(GetTestCleanup()) { + /* Close files in base_name */ + h5_close_files(base_name, fapl); retval = 1; } /* end if */ diff --git a/test/h5test.h b/test/h5test.h index ce224d8..e033322 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -142,6 +142,7 @@ extern "C" { /* Generally useful testing routines */ H5TEST_DLL int h5_cleanup(const char *base_name[], hid_t fapl); +H5TEST_DLL void h5_close_files(const char *base_name[], hid_t fapl); H5TEST_DLL char *h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size); H5TEST_DLL char *h5_fixname_no_suffix(const char *base_name, hid_t fapl, char *fullname, size_t size); H5TEST_DLL hid_t h5_fileaccess(void); diff --git a/test/vds.c b/test/vds.c index 40d2f8d..6d93e82 100644 --- a/test/vds.c +++ b/test/vds.c @@ -32,15 +32,17 @@ typedef enum { } test_api_config_t; const char *FILENAME[] = { - "vds_1", - "vds_2", + "vds_virt", + "vds_src_0", + "vds_src_1", NULL }; /* I/O test config flags */ #define TEST_IO_CLOSE_SRC 0x01u #define TEST_IO_DIFFERENT_FILE 0x02u -#define TEST_IO_NTESTS 0x04u +#define TEST_IO_REOPEN_VIRT 0x04u +#define TEST_IO_NTESTS 0x08u //VDSINC add close source, virtual file #define LIST_DOUBLE_SIZE (H5D_VIRTUAL_DEF_LIST_SIZE + 1) @@ -996,7 +998,7 @@ test_basic_io(unsigned config, hid_t fapl) hid_t dcpl = -1; /* Dataset creation property list */ hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */ hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */ - hid_t memspace = -1; /* Memory dataspace */ + hid_t memspace = -1; /* Memory dataspace */ hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datsets */ hid_t vdset = -1; /* Virtual dataset */ hsize_t dims[2] = {10, 26}; /* Data space current size */ @@ -1086,6 +1088,20 @@ test_basic_io(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + /* Read data through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if(H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) @@ -1240,6 +1256,20 @@ test_basic_io(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + /* Read data through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if(H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) @@ -1405,6 +1435,20 @@ test_basic_io(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + /* Read first source dataset through virtual dataset */ HDmemset(rbuf[0], 0, sizeof(rbuf)); if(H5Dread(vdset, H5T_NATIVE_INT, vspace[0], vspace[0], H5P_DEFAULT, rbuf[0]) < 0) @@ -1623,6 +1667,20 @@ test_basic_io(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + /* Read data through virtual dataset by hyperslab */ /* Reset rbuf */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -1911,6 +1969,20 @@ test_basic_io(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + /* Read data through virtual dataset by hyperslab */ /* Reset rbuf */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -2221,6 +2293,20 @@ test_basic_io(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + /* Read data through virtual dataset */ /* Reset rbuf */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -2583,7 +2669,7 @@ test_unlim(unsigned config, hid_t fapl) hid_t dapl = -1; /* Dataset access property list */ hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */ hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */ - hid_t memspace = -1; /* Memory dataspace */ + hid_t memspace = -1; /* Memory dataspace */ hid_t filespace = -1; /* File dataspace */ hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datsets */ hid_t vdset = -1; /* Virtual dataset */ @@ -2746,6 +2832,20 @@ test_unlim(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR @@ -2794,11 +2894,19 @@ test_unlim(unsigned config, hid_t fapl) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING */ + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file + * as well if config option specified */ if(H5Dclose(vdset) < 0) TEST_ERROR if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -2890,6 +2998,20 @@ test_unlim(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR @@ -2940,11 +3062,19 @@ test_unlim(unsigned config, hid_t fapl) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE */ + /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file + * as well if config option specified */ if(H5Dclose(vdset) < 0) TEST_ERROR if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -3052,13 +3182,25 @@ test_unlim(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR - /* Get VDS space dimensions. Note that since we are using - * H5D_VDS_FIRST_MISSING and we only extended one source dataset the - * dimensions will not have changed. */ + /* Get VDS space dimensions */ if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) TEST_ERROR if(ndims != 2) @@ -3126,11 +3268,19 @@ test_unlim(unsigned config, hid_t fapl) if(rbuf[i][j] != -1) TEST_ERROR - /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING */ + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file + * as well if config option specified */ if(H5Dclose(vdset) < 0) TEST_ERROR if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -3354,6 +3504,20 @@ test_unlim(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR @@ -3401,11 +3565,19 @@ test_unlim(unsigned config, hid_t fapl) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING */ + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file + * as well if config option specified */ if(H5Dclose(vdset) < 0) TEST_ERROR if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -3502,6 +3674,20 @@ test_unlim(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR @@ -3551,11 +3737,19 @@ test_unlim(unsigned config, hid_t fapl) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE */ + /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file + * as well if config option specified */ if(H5Dclose(vdset) < 0) TEST_ERROR if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -3661,6 +3855,20 @@ test_unlim(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR @@ -3733,11 +3941,19 @@ test_unlim(unsigned config, hid_t fapl) if(rbuf[i][j] != -1) TEST_ERROR - /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING */ + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file + * as well if config option specified */ if(H5Dclose(vdset) < 0) TEST_ERROR if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -4008,6 +4224,20 @@ test_unlim(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR @@ -4055,11 +4285,19 @@ test_unlim(unsigned config, hid_t fapl) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING */ + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file + * as well if config option specified */ if(H5Dclose(vdset) < 0) TEST_ERROR if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -4151,6 +4389,20 @@ test_unlim(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR @@ -4199,18 +4451,24 @@ test_unlim(unsigned config, hid_t fapl) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE */ + /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file + * as well if config option specified */ if(H5Dclose(vdset) < 0) TEST_ERROR if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR /* Update erbuf to reflect new data that is now visible due to the change to - * H5D_VDS_LAST_AVAILABLE (second new slice) */ - /* Update erbuf to reflect only new data that is now visible under - * H5D_VDS_FIRST_MISSING (first slice) */ + * H5D_VDS_LAST_AVAILABLE */ for(i = 0; i < 10; i++) { erbuf[i][12] = buf[i][0]; erbuf[i][13] = buf[i][1]; @@ -4316,6 +4574,20 @@ test_unlim(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR @@ -4364,11 +4636,19 @@ test_unlim(unsigned config, hid_t fapl) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR - /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING */ + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file + * as well if config option specified */ if(H5Dclose(vdset) < 0) TEST_ERROR if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -4476,6 +4756,20 @@ test_unlim(unsigned config, hid_t fapl) } /* end if */ } /* end if */ + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR @@ -4529,11 +4823,19 @@ test_unlim(unsigned config, hid_t fapl) if(rbuf[i][j] != -1) TEST_ERROR - /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE */ + /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file + * as well if config option specified */ if(H5Dclose(vdset) < 0) TEST_ERROR if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -4600,7 +4902,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR /* Verify read data - algorithmically check for only 2 middle rows being - * read so we don't have to wipe out erbuf and then restore it afterwards */ + * read */ for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) if((i == 4) || (i == 5)) { @@ -4710,6 +5012,2439 @@ error: /*------------------------------------------------------------------------- + * Function: test_printf + * + * Purpose: Tests VDS with unlimited selections and printf style + * source dataset resolution + * + * Return: Success: 0 + * + * Failure: number of errors + * + * Programmer: Neil Fortner + * Tuesday, May 26, 2015 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static int +test_printf(unsigned config, hid_t fapl) +{ + char srcfilename[FILENAME_BUF_SIZE]; + char srcfilename2[FILENAME_BUF_SIZE]; + char vfilename[FILENAME_BUF_SIZE]; + char printf_srcfilename[FILENAME_BUF_SIZE]; + const char *printf_srcfilename_fmt = "vds_src_%b"; + hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */ + hid_t vfile = -1; /* File with virtual dset */ + hid_t dcpl = -1; /* Dataset creation property list */ + hid_t dapl = -1; /* Dataset access property list */ + hid_t srcspace = -1; /* Source dataspaces */ + hid_t vspace[2] = {-1, -1}; /* Virtual dset dataspaces */ + hid_t memspace = -1; /* Memory dataspace */ + hid_t filespace = -1; /* File dataspace */ + hid_t srcdset[6] = {-1, -1, -1, -1, -1, -1}; /* Source datsets */ + hid_t vdset = -1; /* Virtual dataset */ + hsize_t dims[2] = {10, 0}; /* Data space current size */ + hsize_t mdims[2] = {10, 20}; /* Data space maximum size */ + hsize_t start[4] = {0, 0}; /* Hyperslab start */ + hsize_t stride[4]; /* Hyperslab stride */ + hsize_t count[4]; /* Hyperslab count */ + hsize_t block[4]; /* Hyperslab block */ + int buf[10][20]; /* Write and expected read buffer */ + int rbuf[10][20]; /* Read buffer */ + int erbuf[10][20]; /* Expected read buffer */ + int ndims; /* Number of dimensions */ + int i, j; + + TESTING("virtual dataset I/O with printf source") + + h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename); + h5_fixname(FILENAME[1], fapl, srcfilename, sizeof srcfilename); + h5_fixname(FILENAME[2], fapl, srcfilename2, sizeof srcfilename2); + h5_fixname(printf_srcfilename_fmt, fapl, printf_srcfilename, sizeof printf_srcfilename); + + /* Create DCPL */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + TEST_ERROR + + /* Create DAPL */ + if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0) + TEST_ERROR + + /* Create memory space */ + if((memspace = H5Screate_simple(2, mdims, NULL)) < 0) + TEST_ERROR + + + /* + * Test 1: 1 Source dataset mapping, 10x5 blocks + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + + /* Create source dataspace */ + dims[1] = 5; + if((srcspace = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual space */ + stride[0] = 1; + stride[1] = 5; + count[0] = 1; + count[1] = H5S_UNLIMITED; + block[0] = 10; + block[1] = 5; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset%b", srcspace) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) + TEST_ERROR + + /* Close srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 0) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Reopen srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create 2 source datasets */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] = (i * (int)mdims[1]) + j; + + /* Initialize erbuf */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + erbuf[i][j] = -1; + + /* Write to srcdset[0] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + erbuf[i][j] = buf[i][j]; + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[1] */ + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + erbuf[i][j + 5] = buf[i][j]; + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Reopen srcfile if config option specified */ + if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create 3rd source dataset */ + if((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[2] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + erbuf[i][j + 10] = buf[i][j]; + + /* Close srcdset[2] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[2]) < 0) + TEST_ERROR + srcdset[2] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 15) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close */ + if(!(config & TEST_IO_CLOSE_SRC)) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Dclose(srcdset[2]) < 0) + TEST_ERROR + srcdset[2] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + else if(!(config & TEST_IO_DIFFERENT_FILE)) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace) < 0) + TEST_ERROR + srcspace = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + + + /* + * Test 2: 1 Source dataset mapping, 10x1 blocks, test printf gap setting + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + + /* Create source dataspace */ + dims[1] = 1; + if((srcspace = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual space */ + stride[0] = 1; + stride[1] = 1; + count[0] = 1; + count[1] = H5S_UNLIMITED; + block[0] = 10; + block[1] = 1; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset%b", srcspace) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) + TEST_ERROR + + /* Close srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 0) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Reopen srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create source datasets in a pattern with increasing gaps: + * XX-X--X---X----X */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset3", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[3] = H5Dcreate2(srcfile[0], "src_dset6", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[4] = H5Dcreate2(srcfile[0], "src_dset10", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[5] = H5Dcreate2(srcfile[0], "src_dset15", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] = (i * (int)mdims[1]) + j; + + /* Initialize erbuf */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + erbuf[i][j] = -1; + + /* Write to srcdset[0] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + erbuf[i][0] = buf[i][0]; + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[1] */ + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + erbuf[i][1] = buf[i][0]; + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[2] */ + if(H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + erbuf[i][3] = buf[i][0]; + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[3] */ + if(H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + erbuf[i][6] = buf[i][0]; + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[4] */ + if(H5Dwrite(srcdset[4], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + erbuf[i][10] = buf[i][0]; + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[5] */ + if(H5Dwrite(srcdset[5], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + erbuf[i][15] = buf[i][0]; + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + for(i = 0; i < 6; i++) { + if(H5Dclose(srcdset[i]) < 0) + TEST_ERROR + srcdset[i] = -1; + } /* end for */ + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 2) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != -1) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Close VDS and reopen with printf gap set to 1, reopen file as well if + * config option specified */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_printf_gap(dapl, (size_t)1) < 0) + TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 4) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != -1) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Close VDS and reopen with printf gap set to 2, reopen file as well if + * config option specified */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_printf_gap(dapl, (size_t)2) < 0) + TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 7) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != -1) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Close VDS and reopen with printf gap set to 3, reopen file as well if + * config option specified */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_printf_gap(dapl, (size_t)3) < 0) + TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 11) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != -1) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Close VDS and reopen with printf gap set to 4, reopen file as well if + * config option specified */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_printf_gap(dapl, (size_t)4) < 0) + TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 16) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != -1) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file + * as well if config option specified */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) + TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 2) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != -1) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Reset dapl */ + if(H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) + TEST_ERROR + + /* Close */ + if(!(config & TEST_IO_CLOSE_SRC)) { + for(i = 0; i < 6; i++) { + if(H5Dclose(srcdset[i]) < 0) + TEST_ERROR + srcdset[i] = -1; + } /* end for */ + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + else if(!(config & TEST_IO_DIFFERENT_FILE)) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace) < 0) + TEST_ERROR + srcspace = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + + + /* + * Test 3: 1 Source dataset mapping, 10x5 blocks, printf source file + */ + /* Clean up files so the source files do not exist yet */ + h5_close_files(FILENAME, fapl); + + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + + /* Create source dataspace */ + dims[1] = 5; + if((srcspace = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual space */ + stride[0] = 1; + stride[1] = 5; + count[0] = 1; + count[1] = H5S_UNLIMITED; + block[0] = 10; + block[1] = 5; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace[0], printf_srcfilename, "src_dset", srcspace) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) + TEST_ERROR + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 0) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Create 2 source files, one source dataset */ + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] = (i * (int)mdims[1]) + j; + + /* Initialize erbuf */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + erbuf[i][j] = -1; + + /* Write to srcdset[0] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + erbuf[i][j] = buf[i][j]; + + /* Close srcdset and srcfiles if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + if(H5Fclose(srcfile[1]) < 0) + TEST_ERROR + srcfile[1] = -1; + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 5) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Reopen srcfile[1] if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create 2nd source dataset */ + if((srcdset[1] = H5Dcreate2(srcfile[1], "src_dset", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[1] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + erbuf[i][j + 5] = buf[i][j]; + + /* Close srcdset[1] and srcfile[1] if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Fclose(srcfile[1]) < 0) + TEST_ERROR + srcfile[1] = -1; + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close */ + if(!(config & TEST_IO_CLOSE_SRC)) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + if(H5Fclose(srcfile[1]) < 0) + TEST_ERROR + srcfile[1] = -1; + } /* end if */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace) < 0) + TEST_ERROR + srcspace = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + + + /* + * Test 4: 1 Source dataset mapping, 10x5 blocks, printf source file and + * source dset, extra %%s in source dataset name + */ + /* Clean up files so the source files do not exist yet */ + h5_close_files(FILENAME, fapl); + + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + + /* Create source dataspace */ + dims[1] = 5; + if((srcspace = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual space */ + stride[0] = 1; + stride[1] = 5; + count[0] = 1; + count[1] = H5S_UNLIMITED; + block[0] = 10; + block[1] = 5; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace[0], printf_srcfilename, "%%src%%_dset%%%b", srcspace) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) + TEST_ERROR + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 0) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Create 2 source files, one source dataset */ + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dcreate2(srcfile[0], "%src%_dset%0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] = (i * (int)mdims[1]) + j; + + /* Initialize erbuf */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + erbuf[i][j] = -1; + + /* Write to srcdset[0] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + erbuf[i][j] = buf[i][j]; + + /* Close srcdset and srcfiles if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + if(H5Fclose(srcfile[1]) < 0) + TEST_ERROR + srcfile[1] = -1; + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 5) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Reopen srcfile[1] if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create 2nd source dataset */ + if((srcdset[1] = H5Dcreate2(srcfile[1], "%src%_dset%1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[1] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + erbuf[i][j + 5] = buf[i][j]; + + /* Close srcdset[1] and srcfile[1] if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Fclose(srcfile[1]) < 0) + TEST_ERROR + srcfile[1] = -1; + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close */ + if(!(config & TEST_IO_CLOSE_SRC)) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + if(H5Fclose(srcfile[1]) < 0) + TEST_ERROR + srcfile[1] = -1; + } /* end if */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace) < 0) + TEST_ERROR + srcspace = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + + + /* + * Test 5: 2 Source mappings, interleaved slices, single element wide, + * hyperslab selection in source, extra %%s in source dataset names + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + dims[0] = 10; + dims[1] = 10; + if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + if((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + + /* Create source dataspace (2 elements wide) */ + dims[1] = 2; + if((srcspace = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select hyperslab in source space */ + count[0] = 10; + count[1] = 1; + if(H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual spaces */ + stride[0] = 1; + stride[1] = 2; + count[0] = 1; + count[1] = H5S_UNLIMITED; + block[0] = 10; + block[1] = 1; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + start[1] = 1; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + start[1] = 0; + + /* Add virtual layout mappings */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset_a%b%%", srcspace) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset_b%b%%%%", srcspace) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Close srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 0) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Reopen srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create 2 source datasets */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset_a0%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset_b0%%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] = (i * (int)mdims[1]) + j; + + /* Initialize erbuf */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + erbuf[i][j] = -1; + + /* Write to srcdset[0] */ + block[0] = 10; + block[1] = 2; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + erbuf[i][0] = buf[i][0]; + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[1] */ + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + erbuf[i][1] = buf[i][0]; + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 2) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Reopen srcfile if config option specified */ + if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create 3rd source dataset */ + if((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset_b1%%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[2] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + erbuf[i][3] = buf[i][0]; + + /* Close srcdset[2] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[2]) < 0) + TEST_ERROR + srcdset[2] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 4) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file + * as well if config option specified */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) + TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions. Make sure that the 4th slice is no longer + * visible due to the change to H5D_VDS_FIRST_MISSING. */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 2) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != -1) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Reopen srcfile if config option specified */ + if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create 4th source dataset */ + if((srcdset[3] = H5Dcreate2(srcfile[0], "src_dset_a2%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[3] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + erbuf[i][4] = buf[i][0]; + + /* Close srcdset[3] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[3]) < 0) + TEST_ERROR + srcdset[3] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 2) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != -1) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file + * as well if config option specified */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) + TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions. Make sure that the 4th slice is now visible + * due to the change to H5D_VDS_LAST_AVAILABLE. */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 4) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != -1) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Close VDS and reopen with printf_gap set to 1, reopen file as well if + * config option specified */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_printf_gap(dapl, (hsize_t)1) < 0) + TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions. Make sure that the 6th slice is now visible + * due to the change to printf_gap. */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 5) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC + /* Initialize erbuf - used now instead of setting fill value because fill + * values do not work VDSINC */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + rbuf[i][j] = -1; + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != -1) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Reset dapl */ + if(H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) + TEST_ERROR + + /* Close */ + if(!(config & TEST_IO_CLOSE_SRC)) { + for(i = 0; i < 4; i++) { + if(H5Dclose(srcdset[i]) < 0) + TEST_ERROR + srcdset[i] = -1; + } /* end for */ + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + else if(!(config & TEST_IO_DIFFERENT_FILE)) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace) < 0) + TEST_ERROR + srcspace = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + if(H5Sclose(vspace[1]) < 0) + TEST_ERROR + vspace[1] = -1; + + + /* Close */ + if(H5Pclose(dcpl) < 0) + TEST_ERROR + dcpl = -1; + if(H5Pclose(dapl) < 0) + TEST_ERROR + dapl = -1; + if(H5Sclose(memspace) < 0) + TEST_ERROR + memspace = -1; + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) { + if(srcdset[i] >= 0) + (void)H5Dclose(srcdset[i]); + } /* end for */ + if(vdset >= 0) + (void)H5Dclose(vdset); + for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++) { + if(srcfile[i] >= 0) + (void)H5Fclose(srcfile[i]); + } /* end for */ + if(vfile >= 0) + (void)H5Fclose(vfile); + if(srcspace >= 0) + (void)H5Sclose(srcspace); + for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) { + if(vspace[i] >= 0) + (void)H5Sclose(vspace[i]); + } /* end for */ + if(filespace >= 0) + (void)H5Sclose(filespace); + if(memspace >= 0) + (void)H5Sclose(memspace); + if(dcpl >= 0) + (void)H5Pclose(dcpl); + if(dapl >= 0) + (void)H5Pclose(dapl); + } H5E_END_TRY; + + return 1; +} /* end test_printf() */ + + +/*------------------------------------------------------------------------- * Function: main * * Purpose: Tests datasets with virtual layout @@ -4741,9 +7476,10 @@ main(void) for(test_api_config = (int)TEST_API_BASIC; test_api_config < (int)TEST_API_NTESTS; test_api_config++) nerrors += test_api((test_api_config_t)test_api_config, fapl); for(bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) { - printf("Config: %s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "", bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file"); + printf("Config: %s%s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "", bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file", bit_config & TEST_IO_REOPEN_VIRT ? ", reopen virtual file" : ""); nerrors += test_basic_io(bit_config, fapl); nerrors += test_unlim(bit_config, fapl); + nerrors += test_printf(bit_config, fapl); } /* end for */ /* Verify symbol table messages are cached */ @@ -4761,5 +7497,5 @@ error: printf("***** %d VIRTUAL DATASET TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); return 1; -} +} /* end main() */ -- cgit v0.12 From fad77fd2c29615f57f05547f41819f77d828b2d8 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 4 Jun 2015 14:46:50 -0500 Subject: [svn-r27150] Added an empty VDS testfile generator to tools/misc directory. test/Makefile.in was updated due to changes in the Makefile.am file that missed a reconfigure. The changes just added a few VDS test files to the deletion list. Note that there are trace issues with a new VDS struct that show up when running bin/reconfigure. I reverted these for fixing at a future date. Tested on: jam --- test/Makefile.in | 3 ++- tools/misc/Makefile.am | 4 ++-- tools/misc/Makefile.in | 27 ++++++++++++++++++++++----- tools/misc/vds_gentest.c | 23 +++++++++++++++++++++++ 4 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 tools/misc/vds_gentest.c diff --git a/test/Makefile.in b/test/Makefile.in index 3204bd3..cd79959 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1095,7 +1095,8 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 accum.h5 \ earray.h5 efc[0-5].h5 log_vfd_out.log new_multi_file_v16-r.h5 \ new_multi_file_v16-s.h5 split_get_file_image_test-m.h5 \ split_get_file_image_test-r.h5 file_image_core_test.h5.copy \ - unregister_filter_1.h5 unregister_filter_2.h5 vds_[1-2].h5 + unregister_filter_1.h5 unregister_filter_2.h5 vds_virt.h5 \ + vds_src_[0-1].h5 # Test script for error_test and err_compat TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh \ diff --git a/tools/misc/Makefile.am b/tools/misc/Makefile.am index 882f8f2..7573204 100644 --- a/tools/misc/Makefile.am +++ b/tools/misc/Makefile.am @@ -23,8 +23,8 @@ include $(top_srcdir)/config/commence.am # Include src directory AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -#test script and program -TEST_PROG=h5repart_gentest talign +#test scripts and programs +TEST_PROG=h5repart_gentest talign vds_gentest TEST_SCRIPT=testh5repart.sh testh5mkgrp.sh check_PROGRAMS=$(TEST_PROG) repart_test diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 1b8e0eb..d579e24 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -116,7 +116,8 @@ CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = h5cc testh5mkgrp.sh testh5repart.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" -am__EXEEXT_1 = h5repart_gentest$(EXEEXT) talign$(EXEEXT) +am__EXEEXT_1 = h5repart_gentest$(EXEEXT) talign$(EXEEXT) \ + vds_gentest$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) h5debug_SOURCES = h5debug.c h5debug_OBJECTS = h5debug.$(OBJEXT) @@ -155,6 +156,10 @@ talign_SOURCES = talign.c talign_OBJECTS = talign.$(OBJEXT) talign_LDADD = $(LDADD) talign_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) +vds_gentest_SOURCES = vds_gentest.c +vds_gentest_OBJECTS = vds_gentest.$(OBJEXT) +vds_gentest_LDADD = $(LDADD) +vds_gentest_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -218,9 +223,9 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = h5debug.c h5mkgrp.c h5repart.c h5repart_gentest.c \ - repart_test.c talign.c + repart_test.c talign.c vds_gentest.c DIST_SOURCES = h5debug.c h5mkgrp.c h5repart.c h5repart_gentest.c \ - repart_test.c talign.c + repart_test.c talign.c vds_gentest.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -695,8 +700,8 @@ TRACE = perl $(top_srcdir)/bin/trace CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 \ ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5 -#test script and program -TEST_PROG = h5repart_gentest talign +#test scripts and programs +TEST_PROG = h5repart_gentest talign vds_gentest TEST_SCRIPT = testh5repart.sh testh5mkgrp.sh check_SCRIPTS = $(TEST_SCRIPT) SCRIPT_DEPEND = h5repart$(EXEEXT) h5mkgrp$(EXEEXT) @@ -863,6 +868,10 @@ repart_test$(EXEEXT): $(repart_test_OBJECTS) $(repart_test_DEPENDENCIES) $(EXTRA talign$(EXEEXT): $(talign_OBJECTS) $(talign_DEPENDENCIES) $(EXTRA_talign_DEPENDENCIES) @rm -f talign$(EXEEXT) $(AM_V_CCLD)$(LINK) $(talign_OBJECTS) $(talign_LDADD) $(LIBS) + +vds_gentest$(EXEEXT): $(vds_gentest_OBJECTS) $(vds_gentest_DEPENDENCIES) $(EXTRA_vds_gentest_DEPENDENCIES) + @rm -f vds_gentest$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vds_gentest_OBJECTS) $(vds_gentest_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ @@ -911,6 +920,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repart_gentest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/repart_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/talign.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vds_gentest.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -1135,6 +1145,13 @@ talign.log: talign$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +vds_gentest.log: vds_gentest$(EXEEXT) + @p='vds_gentest$(EXEEXT)'; \ + b='vds_gentest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) .sh.log: @p='$<'; \ $(am__set_b); \ diff --git a/tools/misc/vds_gentest.c b/tools/misc/vds_gentest.c new file mode 100644 index 0000000..cd62724 --- /dev/null +++ b/tools/misc/vds_gentest.c @@ -0,0 +1,23 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include + +int +main(int argc, char *argv[]) +{ + return EXIT_SUCCESS; +} /* end main */ + -- cgit v0.12 From 8f74cc85d8c0f499277622a40d90679a4b0b1db1 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 4 Jun 2015 15:47:04 -0500 Subject: [svn-r27152] Updated bin/trace and src/H5trace.c to handle the H5D_vds_view_t enum type. Tested on: jam --- bin/trace | 1 + src/H5Pdapl.c | 4 ++++ src/H5trace.c | 30 ++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/bin/trace b/bin/trace index 2823982..f548361 100755 --- a/bin/trace +++ b/bin/trace @@ -41,6 +41,7 @@ $Source = ""; "H5D_mpio_no_collective_cause_t" => "Dn", "H5D_mpio_actual_chunk_opt_mode_t" => "Do", "H5D_space_status_t" => "Ds", + "H5D_vds_view_t" => "Dv", "H5FD_mpio_xfer_t" => "Dt", "herr_t" => "e", "H5E_direction_t" => "Ed", diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index dea45f2..256a46e 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -332,6 +332,7 @@ H5Pset_virtual_view(hid_t plist_id, H5D_vds_view_t view) herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) + H5TRACE2("e", "iDv", plist_id, view); /* Check argument */ if((view != H5D_VDS_FIRST_MISSING) && (view != H5D_VDS_LAST_AVAILABLE)) @@ -371,6 +372,7 @@ H5Pget_virtual_view(hid_t plist_id) H5D_vds_view_t ret_value; /* Return value */ FUNC_ENTER_API(H5D_VDS_ERROR) + H5TRACE1("Dv", "i", plist_id); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) @@ -475,6 +477,7 @@ H5Pset_virtual_printf_gap(hid_t plist_id, hsize_t gap_size) herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE2("e", "ih", plist_id, gap_size); /* Check argument */ if(gap_size == HSIZE_UNDEF) @@ -512,6 +515,7 @@ H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size) herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(H5D_VDS_ERROR) + H5TRACE2("e", "i*h", plist_id, gap_size); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) diff --git a/src/H5trace.c b/src/H5trace.c index 6b12318..66b3a0c 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -680,6 +680,36 @@ H5_trace(const double *returning, const char *func, const char *type, ...) } /* end else */ break; + case 'v': + if(ptr) { + if(vp) + fprintf(out, "0x%lx", (unsigned long)vp); + else + fprintf(out, "NULL"); + } /* end if */ + else { + H5D_vds_view_t view = (H5D_vds_view_t)va_arg(ap, int); + + switch(view) { + case H5D_VDS_ERROR: + fprintf(out, "H5D_VDS_ERROR"); + break; + + case H5D_VDS_FIRST_MISSING: + fprintf(out, "H5D_VDS_FIRST_MISSING"); + break; + + case H5D_VDS_LAST_AVAILABLE: + fprintf(out, "H5D_VDS_LAST_AVAILABLE"); + break; + + default: + fprintf(out, "%ld", (long)view); + break; + } /* end switch */ + } /* end else */ + break; + default: fprintf (out, "BADTYPE(D%c)", type[1]); goto error; -- cgit v0.12 From c27904bc5fec9b7c65f6a943bcf9816622df4662 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 5 Jun 2015 16:55:24 -0500 Subject: [svn-r27153] Implement fill value support for VDS. Add testing for this. Fix bug in printf string parsing. Add test for this. Other minor fixes/cleanup. Tested: ummon --- src/H5Dvirtual.c | 487 ++++++++++---- src/H5Oprivate.h | 3 + src/H5Shyper.c | 110 ++++ src/H5Spkg.h | 1 + src/H5Sprivate.h | 1 + src/H5Sselect.c | 89 +++ test/h5test.c | 12 +- test/h5test.h | 2 +- test/vds.c | 1886 +++++++++++++++++++++++++++++------------------------- 9 files changed, 1564 insertions(+), 1027 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index baaea16..fc88b6f 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -61,9 +61,6 @@ /********************/ /* Layout operation callbacks */ -static herr_t H5D__virtual_io_init(const H5D_io_info_t *io_info, - const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space, - const H5S_t *mem_space, H5D_chunk_map_t *cm); static herr_t H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *fm); @@ -88,12 +85,16 @@ static herr_t H5D__virtual_build_source_name(char *source_name, size_t nsubs, hsize_t blockno, char **built_name); static herr_t H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, const H5S_t *file_space, - const H5S_t *mem_space, H5O_storage_virtual_ent_t *virtual_ent, + H5O_storage_virtual_ent_t *virtual_ent, H5O_storage_virtual_srcdset_t *source_dset); static herr_t H5D__virtual_write_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, const H5S_t *file_space, - const H5S_t *mem_space, H5O_storage_virtual_ent_t *virtual_ent, + H5O_storage_virtual_ent_t *virtual_ent, H5O_storage_virtual_srcdset_t *source_dset); +static herr_t H5D__virtual_pre_io(H5D_io_info_t *io_info, + H5O_storage_virtual_t *storage, const H5S_t *file_space, + const H5S_t *mem_space, hsize_t *tot_nelmts); +static herr_t H5D__virtual_post_io(H5O_storage_virtual_t *storage); /*********************/ @@ -105,7 +106,7 @@ const H5D_layout_ops_t H5D_LOPS_VIRTUAL[1] = {{ NULL, H5D__virtual_init, H5D__virtual_is_space_alloc, - H5D__virtual_io_init, + NULL, H5D__virtual_read, H5D__virtual_write, #ifdef H5_HAVE_PARALLEL @@ -502,6 +503,10 @@ H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent, source_dset->virtual_select = NULL; } /* end if */ + /* The projected memory space should never exist when this function is + * called */ + HDassert(!source_dset->projected_mem_space); + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_reset_source_dset() */ @@ -523,7 +528,6 @@ static herr_t H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf, size_t *buf_size) { - size_t p_offset; /* Offset of p within buf */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -547,22 +551,26 @@ H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf, *buf_size = src_len + (size_t)1; *p = *buf; } /* end if */ - else if(((p_offset = (size_t)(*p - *buf)) + src_len + (size_t)1) - > *buf_size) { - char *tmp_buf; - size_t tmp_buf_size; - - /* Calculate new size of buffer */ - tmp_buf_size = MAX(p_offset + src_len + (size_t)1, - *buf_size * (size_t)2); - - /* Reallocate buffer */ - if(NULL == (tmp_buf = (char *)H5MM_realloc(*buf, tmp_buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to reallocate name segment buffer") - *buf = tmp_buf; - *buf_size = tmp_buf_size; - *p = *buf + p_offset; - } /* end if */ + else { + size_t p_offset = (size_t)(*p - *buf); /* Offset of p within buf */ + + /* Extend buffer if necessary */ + if((p_offset + src_len + (size_t)1) > *buf_size) { + char *tmp_buf; + size_t tmp_buf_size; + + /* Calculate new size of buffer */ + tmp_buf_size = MAX(p_offset + src_len + (size_t)1, + *buf_size * (size_t)2); + + /* Reallocate buffer */ + if(NULL == (tmp_buf = (char *)H5MM_realloc(*buf, tmp_buf_size))) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to reallocate name segment buffer") + *buf = tmp_buf; + *buf_size = tmp_buf_size; + *p = *buf + p_offset; + } /* end if */ + } /* end else */ /* Copy string to *p. Note that since src in not NULL terminated, we must * use memcpy */ @@ -730,8 +738,12 @@ H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst, HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name segment struct") /* Duplicate name segment */ - if(NULL == ((*p_dst)->name_segment = HDstrdup(p_src->name_segment))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to duplicate name segment") + if(p_src->name_segment) { + if(NULL == ((*p_dst)->name_segment = HDstrdup(p_src->name_segment))) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to duplicate name segment") + } /* end if */ + else + (*p_dst)->name_segment = NULL; /* Advance pointers */ p_src = p_src->next; @@ -1281,28 +1293,226 @@ H5D__virtual_is_space_alloc(const H5O_storage_t UNUSED *storage) /*------------------------------------------------------------------------- - * Function: H5D__virtual_io_init + * Function: H5D__virtual_pre_io * - * Purpose: Performs initialization before any sort of I/O on the raw data + * Purpose: Project all virtual mappings onto mem_space, with the + * results stored in projected_mem_space for each mapping. + * Opens all source datasets if possible. The total number + * of elements is stored in tot_nelmts. * * Return: Non-negative on success/Negative on failure * * Programmer: Neil Fortner - * February 6, 2015 + * June 3, 2015 * *------------------------------------------------------------------------- */ static herr_t -H5D__virtual_io_init(const H5D_io_info_t UNUSED *io_info, const H5D_type_info_t UNUSED *type_info, - hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space, - H5D_chunk_map_t UNUSED *cm) +H5D__virtual_pre_io(H5D_io_info_t *io_info, + H5O_storage_virtual_t *storage, const H5S_t *file_space, + const H5S_t *mem_space, hsize_t *tot_nelmts) { - FUNC_ENTER_STATIC_NOERR + H5S_t *tmp_space = NULL; /* Copied virtual_select VDSINC */ + hssize_t select_nelmts; /* Number of elements in selection */ + size_t i, j; /* Local index variables */ + herr_t ret_value = SUCCEED; /* Return value */ - /* No-op for now. Delete if we never add anything here. VDSINC */ + FUNC_ENTER_STATIC - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5D__virtual_io_init() */ + /* Sanity check */ + HDassert(storage); + HDassert(mem_space); + HDassert(file_space); + HDassert(tot_nelmts); + + /* Initialize tot_nelmts */ + *tot_nelmts = 0; + + /* Iterate over mappings */ + for(i = 0; i < storage->list_nused; i++) { + /* Sanity check that the virtual space has been patched by now */ + HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); + + /* Check for "printf" source dataset resolution */ + if(storage->list[i].parsed_source_file_name + || storage->list[i].parsed_source_dset_name) { + /* Iterate over sub-source dsets */ + for(j = 0; j < storage->list[i].sub_dset_nused; j++) { + H5S_t *virtual_select; /* Pointer to real virtual_select VDSINC */ + + /* Quick hack to make this work with printf VDSINC */ + if(storage->view == H5D_VDS_LAST_AVAILABLE) { + virtual_select = storage->list[i].sub_dset[j].virtual_select; + } /* end if */ + else { + hsize_t start[H5S_MAX_RANK]; + hsize_t count[H5S_MAX_RANK]; + + /* Quick hack to make this work with FIRST_MISSING */ + /* Copy virtual selection */ + if(NULL == (tmp_space = H5S_copy(storage->list[i].sub_dset[j].virtual_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual selection") + + /* Get virtual extent dimensions */ + if(H5S_get_simple_extent_dims(tmp_space, count, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get virtual dataspace dimensions") + + /* Set start to zeroes */ + (void)HDmemset(start, 0, sizeof(start)); + + /* Clip tmp_space selection to extent */ + if(H5S_select_hyperslab(tmp_space, H5S_SELECT_AND, start, NULL, count, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't clip selection to extent") + + /* Check for no elements selected */ + if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(tmp_space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + if(select_nelmts == 0) { + if(H5S_close(tmp_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close temporary space") + tmp_space = NULL; + continue; + } /* end if */ + + virtual_select = tmp_space; + } /* end else */ + + /* Project intersection of file space and mapping virtual space onto + * memory space */ + if(H5S_select_project_intersection(file_space, mem_space, virtual_select, &storage->list[i].sub_dset[j].projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") + + /* Close temporary space VDSINC */ + if(tmp_space) { + if(H5S_close(tmp_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close temporary space") + tmp_space = NULL; + } /* end if */ + + /* Check number of elements selected */ + if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(storage->list[i].sub_dset[j].projected_mem_space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + + /* Check if anything is selected */ + if(select_nelmts > (hssize_t)0) { + /* Open source dataset */ + if(!storage->list[i].sub_dset[j].dset) + /* Try to open dataset */ + if(H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], &storage->list[i].sub_dset[j], io_info->dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + + /* If the source dataset is not open, mark the selected + * elements as zero so projected_mem_space is freed */ + if(!storage->list[i].sub_dset[j].dset) + select_nelmts = (hssize_t)0; + } /* end if */ + + /* If there are not elements selected in this mapping, free + * projected_mem_space, otherwise update tot_nelmts */ + if(select_nelmts == (hssize_t)0) { + if(H5S_close(storage->list[i].sub_dset[j].projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") + storage->list[i].sub_dset[j].projected_mem_space = NULL; + } /* end if */ + else + *tot_nelmts += (hsize_t)select_nelmts; + } /* end for */ + } /* end if */ + else { + /* Project intersection of file space and mapping virtual space onto + * memory space */ + if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].source_dset.virtual_select, &storage->list[i].source_dset.projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") + + /* Check number of elements selected, add to tot_nelmts */ + if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(storage->list[i].source_dset.projected_mem_space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + + /* Check if anything is selected */ + if(select_nelmts > (hssize_t)0) { + /* Open source dataset */ + if(!storage->list[i].source_dset.dset) + /* Try to open dataset */ + if(H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], &storage->list[i].source_dset, io_info->dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + + /* If the source dataset is not open, mark the selected elements + * as zero so projected_mem_space is freed */ + if(!storage->list[i].source_dset.dset) { + HDassert(0 && "Checking code coverage..."); //VDSINC + select_nelmts = (hssize_t)0; + } //VDSINC + } /* end if */ + + /* If there are not elements selected in this mapping, free + * projected_mem_space, otherwise update tot_nelmts */ + if(select_nelmts == (hssize_t)0) { + if(H5S_close(storage->list[i].source_dset.projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") + storage->list[i].source_dset.projected_mem_space = NULL; + } /* end if */ + else + *tot_nelmts += (hsize_t)select_nelmts; + } /* end else */ + } /* end for */ + +done: + /* Release tmp_space VDSINC */ + if(tmp_space) + if(H5S_close(tmp_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close temporary space") + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__virtual_pre_io() */ + + +/*------------------------------------------------------------------------- + * Function: H5D__virtual_post_io + * + * Purpose: VDSINC + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * June 4, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5D__virtual_post_io(H5O_storage_virtual_t *storage) +{ + size_t i, j; /* Local index variables */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity check */ + HDassert(storage); + + /* Iterate over mappings */ + for(i = 0; i < storage->list_nused; i++) + /* Check for "printf" source dataset resolution */ + if(storage->list[i].parsed_source_file_name + || storage->list[i].parsed_source_dset_name) { + /* Iterate over sub-source dsets */ + for(j = 0; j < storage->list[i].sub_dset_nused; j++) + /* Close projected memory space */ + if(storage->list[i].sub_dset[j].projected_mem_space) { + if(H5S_close(storage->list[i].sub_dset[j].projected_mem_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close temporary space") + storage->list[i].sub_dset[j].projected_mem_space = NULL; + } /* end if */ + } /* end if */ + else + /* Close projected memory space */ + if(storage->list[i].source_dset.projected_mem_space) { + if(H5S_close(storage->list[i].source_dset.projected_mem_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close temporary space") + storage->list[i].source_dset.projected_mem_space = NULL; + } /* end if */ + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__virtual_post_io() */ /*------------------------------------------------------------------------- @@ -1319,13 +1529,10 @@ H5D__virtual_io_init(const H5D_io_info_t UNUSED *io_info, const H5D_type_info_t */ static herr_t H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, - const H5S_t *file_space, const H5S_t *mem_space, - H5O_storage_virtual_ent_t *virtual_ent, + const H5S_t *file_space, H5O_storage_virtual_ent_t *virtual_ent, H5O_storage_virtual_srcdset_t *source_dset) { - H5S_t *projected_mem_space = NULL; /* Memory space for selection in a single mapping */ H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */ - hssize_t select_nelmts; /* Number of elements in selection */ H5S_t *tmp_space = NULL; /* Copied virtual_select VDSINC */ H5S_t *virtual_select; /* Pointer to real virtual_select VDSINC */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1336,12 +1543,14 @@ H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, HDassert(source_dset); /* Quick hack to make this work with printf VDSINC */ - if(source_dset == &virtual_ent->source_dset) { + if((source_dset == &virtual_ent->source_dset) + || (io_info->dset->shared->layout.storage.u.virt.view == H5D_VDS_LAST_AVAILABLE)) { virtual_select = source_dset->virtual_select; } /* end if */ else { hsize_t start[H5S_MAX_RANK]; hsize_t count[H5S_MAX_RANK]; + hssize_t select_nelmts; /* Copy virtual selection */ if(NULL == (tmp_space = H5S_copy(source_dset->virtual_select, FALSE, TRUE))) @@ -1367,63 +1576,37 @@ H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, virtual_select = tmp_space; } /* end else */ - /* Project intersection of file space and mapping virtual space onto - * memory space */ - if(H5S_select_project_intersection(file_space, mem_space, virtual_select, &projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") + /* Only perform I/O if there is a projected memory space, otherwise there + * were no elements in the projection or the source dataset could not be + * opened */ + if(source_dset->projected_mem_space) { + HDassert(source_dset->dset); - /* Get number of elements in projected dataspace */ - if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(projected_mem_space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + /* Sanity check that the source space has been patched by now */ + HDassert(virtual_ent->source_space_status == H5O_VIRTUAL_STATUS_CORRECT); - /* Only perform I/O if there are any elements */ - if(select_nelmts > 0) { - /* Open source dataset */ - if(!source_dset->dset) - /* Try to open dataset */ - if(H5D__virtual_open_source_dset(io_info->dset, virtual_ent, source_dset, io_info->dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + /* Project intersection of file space and mapping virtual space onto + * mapping source space */ + if(H5S_select_project_intersection(virtual_select, virtual_ent->source_select, file_space, &projected_src_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto source space") - /* Check if source dataset is open */ - if(source_dset->dset) { - /* Sanity check that the source space has been patched by now */ - HDassert(virtual_ent->source_space_status == H5O_VIRTUAL_STATUS_CORRECT); + /* Perform read on source dataset */ + if(H5D__read(source_dset->dset, type_info->dst_type_id, source_dset->projected_mem_space, projected_src_space, io_info->dxpl_id, io_info->u.rbuf) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read source dataset") - /* Project intersection of file space and mapping virtual space onto - * mapping source space */ - if(H5S_select_project_intersection(virtual_select, virtual_ent->source_select, file_space, &projected_src_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto source space") - - /* Perform read on source dataset */ - if(H5D__read(source_dset->dset, type_info->dst_type_id, projected_mem_space, projected_src_space, io_info->dxpl_id, io_info->u.rbuf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read source dataset") - - /* Close projected_src_space */ - if(H5S_close(projected_src_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") - projected_src_space = NULL; - } /* end if */ + /* Close projected_src_space */ + if(H5S_close(projected_src_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") + projected_src_space = NULL; } /* end if */ - /* Close projected_mem_space */ - if(H5S_close(projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") - projected_mem_space = NULL; - done: /* Release allocated resources on failure */ - if(ret_value < 0) { - if(projected_src_space) - if(H5S_close(projected_src_space) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") - if(projected_mem_space) - if(H5S_close(projected_mem_space) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") + if(projected_src_space) { + HDassert(ret_value < 0); + if(H5S_close(projected_src_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") } /* end if */ - else { - HDassert(!projected_src_space); - HDassert(!projected_mem_space); - } /* end else */ /* Release tmp_space VDSINC */ if(tmp_space) @@ -1452,6 +1635,8 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5D_chunk_map_t UNUSED *fm) { H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */ + hsize_t tot_nelmts; /* Total number of elements mapped to mem_space */ + H5S_t *fill_space = NULL; /* Space to fill with fill value */ size_t i, j; /* Local index variables */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1467,6 +1652,10 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, storage = &io_info->dset->shared->layout.storage.u.virt; HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); + /* Prepare for I/O operation */ + if(H5D__virtual_pre_io(io_info, storage, file_space, mem_space, &tot_nelmts) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to prepare for I/O operation") + /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) { /* Sanity check that the virtual space has been patched by now */ @@ -1477,19 +1666,70 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, || storage->list[i].parsed_source_dset_name) { /* Iterate over sub-source dsets */ for(j = 0; j < storage->list[i].sub_dset_nused; j++) - if(H5D__virtual_read_one(io_info, type_info, file_space, mem_space, &storage->list[i], &storage->list[i].sub_dset[j]) < 0) + if(H5D__virtual_read_one(io_info, type_info, file_space, &storage->list[i], &storage->list[i].sub_dset[j]) < 0) HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read source dataset") } /* end if */ else /* Read from source dataset */ - if(H5D__virtual_read_one(io_info, type_info, file_space, mem_space, &storage->list[i], &storage->list[i].source_dset) < 0) + if(H5D__virtual_read_one(io_info, type_info, file_space, &storage->list[i], &storage->list[i].source_dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read source dataset") } /* end for */ - /* Fill unmapped part of buffer with fill value. Keep track of total number - * elements written to memory buffer and assert that it == nelmts VDSINC */ + /* Fill unmapped part of buffer with fill value */ + if(tot_nelmts != nelmts) { + HDassert(tot_nelmts < nelmts); + + /* Start with fill space equal to memory space */ + if(NULL == (fill_space = H5S_copy(mem_space, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy memory selection") + + /* Iterate over mappings */ + for(i = 0; i < storage->list_nused; i++) + /* Check for "printf" source dataset resolution */ + if(storage->list[i].parsed_source_file_name + || storage->list[i].parsed_source_dset_name) { + /* Iterate over sub-source dsets */ + for(j = 0; j < storage->list[i].sub_dset_nused; j++) + if(storage->list[i].sub_dset[j].projected_mem_space) + if(H5S_select_subtract(fill_space, storage->list[i].sub_dset[j].projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to clip fill selection") + } /* end if */ + else + if(storage->list[i].source_dset.projected_mem_space) + /* Subtract projected memory space from fill space */ + if(H5S_select_subtract(fill_space, storage->list[i].source_dset.projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to clip fill selection") + + /* Write fill values to memory buffer */ + if(H5D__fill(io_info->dset->shared->dcpl_cache.fill.buf, io_info->dset->shared->type, io_info->u.rbuf, type_info->mem_type, fill_space, io_info->dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "filling buf failed") + +#ifndef NDEBUG + /* Make sure the total number of elements written (including fill + * values) == nelmts */ + { + hssize_t select_nelmts; /* Number of elements in selection */ + + /* Get number of elements in fill dataspace */ + if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(fill_space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + + /* Verify number of elements is correct */ + HDassert((tot_nelmts + (hsize_t)select_nelmts) == nelmts); + } /* end block */ +#endif /* NDEBUG */ + } /* end if */ done: + /* Cleanup I/O operation */ + if(H5D__virtual_post_io(storage) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't cleanup I/O operation") + + /* Close fill space */ + if(fill_space) + if(H5S_close(fill_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close fill space") + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_read() */ @@ -1508,13 +1748,10 @@ done: */ static herr_t H5D__virtual_write_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, - const H5S_t *file_space, const H5S_t *mem_space, - H5O_storage_virtual_ent_t *virtual_ent, + const H5S_t *file_space, H5O_storage_virtual_ent_t *virtual_ent, H5O_storage_virtual_srcdset_t *source_dset) { - H5S_t *projected_mem_space = NULL; /* Memory space for selection in a single mapping */ H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */ - hssize_t select_nelmts; /* Number of elements in selection */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1522,25 +1759,10 @@ H5D__virtual_write_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, HDassert(virtual_ent); HDassert(source_dset); - /* Project intersection of file space and mapping virtual space onto - * memory space */ - if(H5S_select_project_intersection(file_space, mem_space, source_dset->virtual_select, &projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") - - /* Get number of elements in projected dataspace */ - if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(projected_mem_space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") - - /* Only perform I/O if there are any elements */ - if(select_nelmts > 0) { - /* Open source dataset */ - if(!source_dset->dset) { - /* Try to open dataset */ - if(H5D__virtual_open_source_dset(io_info->dset, virtual_ent, source_dset, io_info->dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") - if(!source_dset->dset) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "did not open source dataset") - } /* end if */ + /* Only perform I/O if there is a projected memory space, otherwise there + * were no elements in the projection */ + if(source_dset->projected_mem_space) { + HDassert(source_dset->dset); /* Sanity check that the source space has been patched by now */ HDassert(virtual_ent->source_space_status == H5O_VIRTUAL_STATUS_CORRECT); @@ -1553,7 +1775,7 @@ H5D__virtual_write_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto source space") /* Perform write on source dataset */ - if(H5D__write(source_dset->dset, type_info->dst_type_id, projected_mem_space, projected_src_space, io_info->dxpl_id, io_info->u.wbuf) < 0) + if(H5D__write(source_dset->dset, type_info->dst_type_id, source_dset->projected_mem_space, projected_src_space, io_info->dxpl_id, io_info->u.wbuf) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write to source dataset") /* Close projected_src_space */ @@ -1562,11 +1784,6 @@ H5D__virtual_write_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, projected_src_space = NULL; } /* end if */ - /* Close projected_mem_space */ - if(H5S_close(projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") - projected_mem_space = NULL; - done: /* Release allocated resources on failure */ if(projected_src_space) { @@ -1574,11 +1791,6 @@ done: if(H5S_close(projected_src_space) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") } /* end if */ - if(projected_mem_space) { - HDassert(ret_value < 0); - if(H5S_close(projected_mem_space) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") - } /* end if */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_write_one() */ @@ -1602,6 +1814,7 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5D_chunk_map_t UNUSED *fm) { H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */ + hsize_t tot_nelmts; /* Total number of elements mapped to mem_space */ size_t i, j; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1617,6 +1830,17 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, storage = &io_info->dset->shared->layout.storage.u.virt; HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); + /* Prepare for I/O operation */ + if(H5D__virtual_pre_io(io_info, storage, file_space, mem_space, &tot_nelmts) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to prepare for I/O operation") + + /* Fail if there are unmapped parts of the selection as they would not be + * written */ + if(tot_nelmts != nelmts) { + HDassert(0 && "Checking code coverage..."); //VDSINC + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "write requested to unmapped portion of virtual dataset") + } //VDSINC + /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) { /* Sanity check that virtual space has been patched by now */ @@ -1628,20 +1852,21 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Iterate over sub-source dsets */ for(j = 0; j < storage->list[i].sub_dset_nused; j++) { HDassert(0 && "Checking code coverage..."); //VDSINC - if(H5D__virtual_write_one(io_info, type_info, file_space, mem_space, &storage->list[i], &storage->list[i].sub_dset[j]) < 0) + if(H5D__virtual_write_one(io_info, type_info, file_space, &storage->list[i], &storage->list[i].sub_dset[j]) < 0) HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to write to source dataset") } //VDSINC } /* end if */ else /* Write to source dataset */ - if(H5D__virtual_write_one(io_info, type_info, file_space, mem_space, &storage->list[i], &storage->list[i].source_dset) < 0) + if(H5D__virtual_write_one(io_info, type_info, file_space, &storage->list[i], &storage->list[i].source_dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to write to source dataset") } /* end for */ - /* Keep track of total number elements written to disk buffer and issure - * error if it != nelmts VDSINC */ - done: + /* Cleanup I/O operation */ + if(H5D__virtual_post_io(storage) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't cleanup I/O operation") + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_write() */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 6dc39d4..7063de5 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -420,6 +420,9 @@ typedef struct H5O_storage_virtual_srcdset_t { /* Not stored */ struct H5D_t *dset; /* Source dataset */ + + /* Temporary - only used during I/O operation, NULL at all other times */ + struct H5S_t *projected_mem_space; /* Selection within mem_space for this mapping */ } H5O_storage_virtual_srcdset_t; typedef struct H5O_storage_virtual_name_seg_t { diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 399d009..87fb3a9 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -9627,6 +9627,116 @@ done: /*-------------------------------------------------------------------------- NAME + H5S__hyper_subtract + PURPOSE + VDSINC + USAGE + VDSINC + RETURNS + Non-negative on success/Negative on failure. + DESCRIPTION + VDSINC + + Note this function basically duplicates a subset of the functionality + of H5S_select_select(). It should probably be removed when that + function is enabled. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5S__hyper_subtract (H5S_t *space, H5S_t *subtract_space) +{ + H5S_hyper_span_info_t *a_not_b = NULL; /* Span tree for hyperslab spans in old span tree and not in new span tree */ + H5S_hyper_span_info_t *a_and_b = NULL; /* Span tree for hyperslab spans in both old and new span trees */ + H5S_hyper_span_info_t *b_not_a = NULL; /* Span tree for hyperslab spans in new span tree and not in old span tree */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI_NOINIT + + /* Check args */ + HDassert(space); + HDassert(subtract_space); + + /* Check that the space selections both have span trees */ + if(space->select.sel_info.hslab->span_lst == NULL) + if(H5S_hyper_generate_spans(space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree") + if(subtract_space->select.sel_info.hslab->span_lst == NULL) + if(H5S_hyper_generate_spans(subtract_space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree") + + /* Generate lists of spans which overlap and don't overlap */ + if(H5S_hyper_clip_spans(space->select.sel_info.hslab->span_lst, subtract_space->select.sel_info.hslab->span_lst, &a_not_b, &a_and_b, &b_not_a)<0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information") + + /* Reset the other dataspace selection information */ + if(H5S_SELECT_RELEASE(space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection") + + /* Allocate space for the hyperslab selection information */ + if((space->select.sel_info.hslab = H5FL_CALLOC(H5S_hyper_sel_t)) == NULL) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info") + + /* Set unlim_dim */ + space->select.sel_info.hslab->unlim_dim = -1; + + /* Check for anything returned in a_not_b */ + if(a_not_b) { + /* Update spans in space */ + space->select.sel_info.hslab->span_lst = a_not_b; + a_not_b = NULL; + + /* Update number of elements */ + space->select.num_elem = H5S_hyper_spans_nelem(space->select.sel_info.hslab->span_lst); + + /* Attempt to rebuild "optimized" start/stride/count/block information. + * from resulting hyperslab span tree */ + if(H5S_hyper_rebuild(space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't rebuild hyperslab info") + } /* end if */ + else { + H5S_hyper_span_info_t *spans; /* Empty hyperslab span tree */ + + HDassert(0 && "Checking code coverage..."); //VDSINC + /* Set number of elements */ + space->select.num_elem = 0; + + /* Allocate a span info node */ + if(NULL == (spans = H5FL_MALLOC(H5S_hyper_span_info_t))) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span") + + /* Set the reference count */ + spans->count = 1; + + /* Reset the scratch pad space */ + spans->scratch = 0; + + /* Set to empty tree */ + spans->head = NULL; + + /* Set pointer to empty span tree */ + space->select.sel_info.hslab->span_lst = spans; + } /* end if */ + +done: + /* Free span trees */ + if(a_and_b) + H5S_hyper_free_span_info(a_and_b); + if(b_not_a) + H5S_hyper_free_span_info(b_not_a); + if(a_not_b) { + HDassert(ret_value < 0); + H5S_hyper_free_span_info(b_not_a); + } /* end if */ + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5S__hyper_subtract() */ + + +/*-------------------------------------------------------------------------- + NAME H5S__hyper_get_clip_diminfo PURPOSE Calculates the count and block required to clip the specified diff --git a/src/H5Spkg.h b/src/H5Spkg.h index 77ca954..1359b00 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -276,6 +276,7 @@ H5_DLL herr_t H5S_extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, H5_DLL herr_t H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, const H5S_t *src_intersect_space, H5S_t *proj_space); +H5_DLL herr_t H5S__hyper_subtract (H5S_t *space, H5S_t *subtract_space); /* Testing functions */ #ifdef H5S_TESTING diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 342a9cc..976c968 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -241,6 +241,7 @@ H5_DLL herr_t H5S_select_project_simple(const H5S_t *space, H5S_t *new_space, hs H5_DLL herr_t H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, const H5S_t *src_intersect_space, H5S_t **new_space_ptr); +H5_DLL herr_t H5S_select_subtract(H5S_t *space, H5S_t *subtract_space); /* Operations on all selections */ H5_DLL herr_t H5S_select_all(H5S_t *space, hbool_t rel_prev); diff --git a/src/H5Sselect.c b/src/H5Sselect.c index c120769..0af3dfa 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -2259,3 +2259,92 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5S_select_project_intersection() */ + +/*-------------------------------------------------------------------------- + NAME + H5S_select_subtract + + PURPOSE + VDSINC + + USAGE + VDSINC + + RETURNS + Non-negative on success/Negative on failure. + + DESCRIPTION + VDSINC + + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5S_select_subtract(H5S_t *space, H5S_t *subtract_space) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + /* Sanity checks */ + HDassert(space); + HDassert(subtract_space); + + /* If either space is using the none selection, then we do not need to do + * anything */ + if((space->select.type->type != H5S_SEL_NONE) + && (subtract_space->select.type->type != H5S_SEL_NONE)) { + /* If subtract_space is using the all selection, set space to none */ + if(subtract_space->select.type->type == H5S_SEL_ALL) { + HDassert(0 && "Checking code coverage...");//VDSINC + /* Change to "none" selection */ + if(H5S_select_none(space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + } /* end if */ + else { + /* Check for point selection in subtract_space, convert to + * hyperslab */ + if(subtract_space->select.type->type == H5S_SEL_POINTS) + HDassert(0 && "Not yet implemented...");//VDSINC + + /* Check for point or all selection in space, convert to hyperslab + */ + if(space->select.type->type == H5S_SEL_ALL) { + /* Convert current "all" selection to "real" hyperslab selection */ + /* Then allow operation to proceed */ + hsize_t tmp_start[H5O_LAYOUT_NDIMS]; /* Temporary start information */ + hsize_t tmp_stride[H5O_LAYOUT_NDIMS]; /* Temporary stride information */ + hsize_t tmp_count[H5O_LAYOUT_NDIMS]; /* Temporary count information */ + hsize_t tmp_block[H5O_LAYOUT_NDIMS]; /* Temporary block information */ + unsigned i; /* Local index variable */ + + /* Fill in temporary information for the dimensions */ + for(i = 0; i < space->extent.rank; i++) { + tmp_start[i] = 0; + tmp_stride[i] = 1; + tmp_count[i] = 1; + tmp_block[i] = space->extent.size[i]; + } /* end for */ + + /* Convert to hyperslab selection */ + if(H5S_select_hyperslab(space, H5S_SELECT_SET, tmp_start, tmp_stride, tmp_count, tmp_block) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection") + } /* end if */ + else if(space->select.type->type == H5S_SEL_POINTS) + HDassert(0 && "Not yet implemented...");//VDSINC + + HDassert(space->select.type->type == H5S_SEL_HYPERSLABS); + HDassert(subtract_space->select.type->type == H5S_SEL_HYPERSLABS); + + /* Both spaces are now hyperslabs, perform the operation */ + if(H5S__hyper_subtract(space, subtract_space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't subtract hyperslab") + } /* end else */ + } /* end if */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5S_select_subtract() */ + diff --git a/test/h5test.c b/test/h5test.c index 88a8afa..848712c 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -122,9 +122,9 @@ h5_errors(hid_t estack, void UNUSED *client_data) /*------------------------------------------------------------------------- - * Function: h5_close_files + * Function: h5_cleanup_files * - * Purpose: Cleanup temporary test files (always closes). + * Purpose: Cleanup temporary test files (always). * base_name contains the list of test file names. * * Return: void @@ -137,7 +137,7 @@ h5_errors(hid_t estack, void UNUSED *client_data) *------------------------------------------------------------------------- */ void -h5_close_files(const char *base_name[], hid_t fapl) +h5_cleanup_files(const char *base_name[], hid_t fapl) { int i; @@ -185,7 +185,7 @@ h5_close_files(const char *base_name[], hid_t fapl) } /* end for */ return; -} /* end h5_close_files() */ +} /* end h5_cleanup_files() */ /*------------------------------------------------------------------------- @@ -208,8 +208,8 @@ h5_cleanup(const char *base_name[], hid_t fapl) int retval = 0; if(GetTestCleanup()) { - /* Close files in base_name */ - h5_close_files(base_name, fapl); + /* Clean up files in base_name */ + h5_cleanup_files(base_name, fapl); retval = 1; } /* end if */ diff --git a/test/h5test.h b/test/h5test.h index e033322..46c73b6 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -142,7 +142,7 @@ extern "C" { /* Generally useful testing routines */ H5TEST_DLL int h5_cleanup(const char *base_name[], hid_t fapl); -H5TEST_DLL void h5_close_files(const char *base_name[], hid_t fapl); +H5TEST_DLL void h5_cleanup_files(const char *base_name[], hid_t fapl); H5TEST_DLL char *h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size); H5TEST_DLL char *h5_fixname_no_suffix(const char *base_name, hid_t fapl, char *fullname, size_t size); H5TEST_DLL hid_t h5_fileaccess(void); diff --git a/test/vds.c b/test/vds.c index 6d93e82..e6a57c2 100644 --- a/test/vds.c +++ b/test/vds.c @@ -1009,8 +1009,10 @@ test_basic_io(unsigned config, hid_t fapl) hsize_t coord[10]; /* Point selection array */ int buf[10][26]; /* Write and expected read buffer */ int rbuf[10][26]; /* Read buffer */ + int rbuf99[9][9]; /* 9x9 Read buffer */ int evbuf[10][26]; /* Expected VDS "buffer" */ int erbuf[10][26]; /* Expected read buffer */ + int fill = -1; /* Fill value */ int i, j; TESTING("basic virtual dataset I/O") @@ -1022,6 +1024,10 @@ test_basic_io(unsigned config, hid_t fapl) if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR + /* Set fill value */ + if(H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0) + TEST_ERROR + /* * Test 1: All - all selection */ @@ -2314,8 +2320,8 @@ test_basic_io(unsigned config, hid_t fapl) /* Select hyperslab in memory space */ start[0] = 0; start[1] = 0; - count[0] = 3; - count[1] = 9; + count[0] = 9; + count[1] = 3; if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL ,count, NULL) < 0) TEST_ERROR @@ -2341,16 +2347,19 @@ test_basic_io(unsigned config, hid_t fapl) /* Update erbuf */ HDmemset(erbuf, 0, sizeof(erbuf)); + for(i = 0; i < 9; i++) + for(j = 0; j < 3; j++) + erbuf[i][j] = fill; erbuf[0][0] = buf[0][0]; erbuf[0][2] = buf[0][1]; - erbuf[0][6] = buf[0][8]; - erbuf[0][8] = buf[0][9]; - erbuf[2][0] = buf[1][0]; - erbuf[2][2] = buf[1][1]; - erbuf[2][6] = buf[1][8]; - erbuf[2][8] = buf[1][9]; - erbuf[1][3] = buf[0][13]; - erbuf[1][5] = buf[0][14]; + erbuf[2][0] = buf[0][8]; + erbuf[2][2] = buf[0][9]; + erbuf[6][0] = buf[1][0]; + erbuf[6][2] = buf[1][1]; + erbuf[8][0] = buf[1][8]; + erbuf[8][2] = buf[1][9]; + erbuf[4][0] = buf[0][13]; + erbuf[4][2] = buf[0][14]; /* Verify read data */ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) @@ -2373,30 +2382,45 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL ,count, NULL) < 0) TEST_ERROR + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 3; + count[0] = 9; + count[1] = 3; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL ,count, NULL) < 0) + TEST_ERROR + /* Read second stripe pattern */ if(H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0) TEST_ERROR /* Update erbuf */ - HDmemset(erbuf, 0, sizeof(erbuf)); - erbuf[0][3] = buf[0][4]; - erbuf[0][5] = buf[0][5]; - erbuf[1][0] = buf[0][6]; - erbuf[1][1] = buf[0][7]; - erbuf[1][2] = buf[0][12]; - erbuf[1][3] = buf[0][15]; - erbuf[1][5] = buf[1][4]; - erbuf[1][6] = buf[1][7]; - erbuf[1][7] = buf[1][12]; - erbuf[1][8] = buf[1][13]; - erbuf[2][3] = buf[1][14]; - erbuf[2][5] = buf[1][15]; + for(i = 0; i < 9; i++) + for(j = 3; j < 6; j++) + erbuf[i][j] = fill; + erbuf[1][3] = buf[0][4]; + erbuf[1][5] = buf[0][5]; + erbuf[3][3] = buf[0][6]; + erbuf[3][4] = buf[0][7]; + erbuf[3][5] = buf[0][12]; + erbuf[4][3] = buf[0][15]; + erbuf[4][5] = buf[1][4]; + erbuf[5][3] = buf[1][7]; + erbuf[5][4] = buf[1][12]; + erbuf[5][5] = buf[1][13]; + erbuf[7][3] = buf[1][14]; + erbuf[7][5] = buf[1][15]; /* Verify read data */ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + if((j >= 3) && (j < 6)) { + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != 0) + TEST_ERROR /* Reset rbuf */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -2413,27 +2437,62 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL ,count, NULL) < 0) TEST_ERROR + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 6; + count[0] = 9; + count[1] = 3; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL ,count, NULL) < 0) + TEST_ERROR + /* Read third stripe pattern */ if(H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0) TEST_ERROR /* Update erbuf */ - HDmemset(erbuf, 0, sizeof(erbuf)); - erbuf[0][0] = buf[0][2]; - erbuf[0][2] = buf[0][3]; - erbuf[0][6] = buf[0][10]; - erbuf[0][8] = buf[0][11]; - erbuf[2][0] = buf[1][2]; - erbuf[2][2] = buf[1][3]; - erbuf[2][6] = buf[1][10]; - erbuf[2][8] = buf[1][11]; - erbuf[1][3] = buf[1][5]; - erbuf[1][5] = buf[1][6]; + for(i = 0; i < 9; i++) + for(j = 6; j < 9; j++) + erbuf[i][j] = fill; + erbuf[0][6] = buf[0][2]; + erbuf[0][8] = buf[0][3]; + erbuf[2][6] = buf[0][10]; + erbuf[2][8] = buf[0][11]; + erbuf[6][6] = buf[1][2]; + erbuf[6][8] = buf[1][3]; + erbuf[8][6] = buf[1][10]; + erbuf[8][8] = buf[1][11]; + erbuf[4][6] = buf[1][5]; + erbuf[4][8] = buf[1][6]; /* Verify read data */ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) - if(rbuf[i][j] != erbuf[i][j]) + if((j >= 6) && (j < 9)) { + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != 0) + TEST_ERROR + + /* Now read entire VDS */ + /* Set memory space extent to 9x9, select all in order to reach part of the + * code in H5S_select_subtract() */ + dims[0] = 9; + dims[1] = 9; + if(H5Sset_extent_simple(memspace, 2, dims, NULL) < 0) + TEST_ERROR + if(H5Sselect_all(memspace) < 0) + TEST_ERROR + + /* Read third stripe pattern */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf99[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(rbuf99) / sizeof(rbuf99[0])); i++) + for(j = 0; j < (int)(sizeof(rbuf99[0]) / sizeof(rbuf99[0][0])); j++) + if(rbuf99[i][j] != erbuf[i][j]) TEST_ERROR /* Adjust write buffer */ @@ -2442,16 +2501,46 @@ test_basic_io(unsigned config, hid_t fapl) buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); /* Write data through virtual dataset by hyperslab */ - /* Select stripe */ + /* Select stripe (only select mapped elements) */ start[0] = 0; start[1] = 0; start[2] = 0; start[3] = 0; - count[0] = 3; - count[1] = 3; + stride[0] = 2; + stride[1] = 2; + stride[2] = 1; + stride[3] = 2; + count[0] = 2; + count[1] = 2; count[2] = 1; - count[3] = 3; - if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL ,count, NULL) < 0) + count[3] = 2; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride ,count, NULL) < 0) + TEST_ERROR + start[0] = 1; + start[1] = 1; + start[2] = 0; + start[3] = 0; + stride[0] = 1; + stride[1] = 1; + stride[2] = 1; + stride[3] = 2; + count[0] = 1; + count[1] = 1; + count[2] = 1; + count[3] = 2; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride ,count, NULL) < 0) + TEST_ERROR + + /* Reset extent of memspace, select hyperslab */ + dims[0] = 10; + dims[1] = 26; + if(H5Sset_extent_simple(memspace, 2, dims, NULL) < 0) + TEST_ERROR + start[0] = 0; + start[1] = 0; + count[0] = 1; + count[1] = 10; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL ,count, NULL) < 0) TEST_ERROR /* Write data through virtual dataset by hyperslab */ @@ -2462,31 +2551,57 @@ test_basic_io(unsigned config, hid_t fapl) /* Update erbuf */ HDmemset(erbuf, 0, sizeof(erbuf)); erbuf[0][0] = buf[0][0]; - erbuf[0][1] = buf[0][2]; - erbuf[0][8] = buf[0][6]; - erbuf[0][9] = buf[0][8]; - erbuf[1][0] = buf[2][0]; - erbuf[1][1] = buf[2][2]; - erbuf[1][8] = buf[2][6]; - erbuf[1][9] = buf[2][8]; - erbuf[0][13] = buf[1][3]; - erbuf[0][14] = buf[1][5]; + erbuf[0][1] = buf[0][1]; + erbuf[0][8] = buf[0][2]; + erbuf[0][9] = buf[0][3]; + erbuf[1][0] = buf[0][6]; + erbuf[1][1] = buf[0][7]; + erbuf[1][8] = buf[0][8]; + erbuf[1][9] = buf[0][9]; + erbuf[0][13] = buf[0][4]; + erbuf[0][14] = buf[0][5]; /* Adjust write buffer */ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); - /* Select stripe */ + /* Select stripe (only select mapped elements) */ start[0] = 0; - start[1] = 0; + start[1] = 1; start[2] = 1; start[3] = 0; + stride[0] = 1; + stride[1] = 1; + stride[2] = 1; + stride[3] = 2; count[0] = 3; - count[1] = 3; + count[1] = 1; + count[2] = 1; + count[3] = 2; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride ,count, NULL) < 0) + TEST_ERROR + start[0] = 1; + start[1] = 0; + start[2] = 1; + start[3] = 0; + stride[0] = 1; + stride[1] = 2; + stride[2] = 1; + stride[3] = 1; + count[0] = 1; + count[1] = 2; count[2] = 1; count[3] = 3; - if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL ,count, NULL) < 0) + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride ,count, NULL) < 0) + TEST_ERROR + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + count[0] = 1; + count[1] = 12; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL ,count, NULL) < 0) TEST_ERROR /* Write second slice */ @@ -2494,34 +2609,60 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR /* Update erbuf */ - erbuf[0][4] = buf[0][3]; - erbuf[0][5] = buf[0][5]; - erbuf[0][6] = buf[1][0]; - erbuf[0][7] = buf[1][1]; - erbuf[0][12] = buf[1][2]; - erbuf[0][15] = buf[1][3]; - erbuf[1][4] = buf[1][5]; - erbuf[1][7] = buf[1][6]; - erbuf[1][12] = buf[1][7]; - erbuf[1][13] = buf[1][8]; - erbuf[1][14] = buf[2][3]; - erbuf[1][15] = buf[2][5]; + erbuf[0][4] = buf[0][0]; + erbuf[0][5] = buf[0][1]; + erbuf[0][6] = buf[0][2]; + erbuf[0][7] = buf[0][3]; + erbuf[0][12] = buf[0][4]; + erbuf[0][15] = buf[0][5]; + erbuf[1][4] = buf[0][6]; + erbuf[1][7] = buf[0][7]; + erbuf[1][12] = buf[0][8]; + erbuf[1][13] = buf[0][9]; + erbuf[1][14] = buf[0][10]; + erbuf[1][15] = buf[0][11]; /* Adjust write buffer */ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); - /* Select stripe */ + /* Select stripe (only select mapped elements) */ start[0] = 0; start[1] = 0; start[2] = 2; start[3] = 0; - count[0] = 3; - count[1] = 3; + stride[0] = 2; + stride[1] = 2; + stride[2] = 1; + stride[3] = 2; + count[0] = 2; + count[1] = 2; count[2] = 1; - count[3] = 3; - if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL ,count, NULL) < 0) + count[3] = 2; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride ,count, NULL) < 0) + TEST_ERROR + start[0] = 1; + start[1] = 1; + start[2] = 2; + start[3] = 0; + stride[0] = 1; + stride[1] = 1; + stride[2] = 1; + stride[3] = 2; + count[0] = 1; + count[1] = 1; + count[2] = 1; + count[3] = 2; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride ,count, NULL) < 0) + TEST_ERROR + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + count[0] = 1; + count[1] = 10; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL ,count, NULL) < 0) TEST_ERROR /* Write third slice */ @@ -2530,15 +2671,15 @@ test_basic_io(unsigned config, hid_t fapl) /* Update erbuf */ erbuf[0][2] = buf[0][0]; - erbuf[0][3] = buf[0][2]; - erbuf[0][10] = buf[0][6]; - erbuf[0][11] = buf[0][8]; - erbuf[1][2] = buf[2][0]; - erbuf[1][3] = buf[2][2]; - erbuf[1][10] = buf[2][6]; - erbuf[1][11] = buf[2][8]; - erbuf[1][5] = buf[1][3]; - erbuf[1][6] = buf[1][5]; + erbuf[0][3] = buf[0][1]; + erbuf[0][10] = buf[0][2]; + erbuf[0][11] = buf[0][3]; + erbuf[1][2] = buf[0][6]; + erbuf[1][3] = buf[0][7]; + erbuf[1][10] = buf[0][8]; + erbuf[1][11] = buf[0][9]; + erbuf[1][5] = buf[0][4]; + erbuf[1][6] = buf[0][5]; /* Reopen srcdset and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -2684,6 +2825,7 @@ test_unlim(unsigned config, hid_t fapl) int rbuf[10][20]; /* Read buffer */ int erbuf[10][20]; /* Expected read buffer */ int ndims; /* Number of dimensions */ + int fill = -1; /* Fill value */ int i, j; TESTING("virtual dataset I/O with unlimited selections") @@ -2697,14 +2839,18 @@ test_unlim(unsigned config, hid_t fapl) if((srcdcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR - /* Create DAPL */ - if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0) + /* Set fill value */ + if(H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0) TEST_ERROR /* Set chunk dimensions */ if(H5Pset_chunk(srcdcpl, 2, cdims) < 0) TEST_ERROR + /* Create DAPL */ + if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0) + TEST_ERROR + /* Create memory space */ if((memspace = H5Screate_simple(2, mdims, NULL)) < 0) TEST_ERROR @@ -2784,7 +2930,7 @@ test_unlim(unsigned config, hid_t fapl) /* Initialize erbuf */ for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) - erbuf[i][j] = -1; + erbuf[i][j] = fill; /* Write data directly to source datasets */ /* Select hyperslab in memory */ @@ -2872,12 +3018,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ start[0] = 0; @@ -2890,9 +3031,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ @@ -2936,12 +3083,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Read data */ if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) @@ -2949,9 +3091,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Reopen srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -3040,12 +3188,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ start[1] = 0; @@ -3058,9 +3201,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ @@ -3110,12 +3259,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ start[1] = 0; @@ -3128,9 +3272,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -3222,12 +3372,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ start[1] = 0; @@ -3245,9 +3390,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR /* Now just read middle 2 rows */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); start[0] = 4; count[0] = 2; count[1] = 20; @@ -3265,7 +3408,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR } /* end if */ else - if(rbuf[i][j] != -1) + if(rbuf[i][j] != 0) TEST_ERROR /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file @@ -3288,7 +3431,7 @@ test_unlim(unsigned config, hid_t fapl) * change to H5D_VDS_FIRST_MISSING */ for(i = 5; i < 10; i++) for(j = 15; j < 20; j++) - erbuf[i][j] = -1; + erbuf[i][j] = fill; /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -3316,12 +3459,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ start[0] = 0; @@ -3335,9 +3473,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Close */ if(!(config & TEST_IO_CLOSE_SRC)) { @@ -3456,7 +3600,7 @@ test_unlim(unsigned config, hid_t fapl) /* Initialize erbuf */ for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) - erbuf[i][j] = -1; + erbuf[i][j] = fill; /* Write data directly to source datasets */ /* Select hyperslab in memory */ @@ -3544,12 +3688,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -3561,9 +3700,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ @@ -3607,12 +3752,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Read data */ if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) @@ -3620,9 +3760,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Reopen srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -3716,12 +3862,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -3733,9 +3874,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ @@ -3784,12 +3931,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -3801,9 +3943,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -3895,12 +4043,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -3917,9 +4060,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR /* Now just read middle 2 rows */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); start[0] = 4; count[0] = 2; count[1] = 20; @@ -3938,7 +4079,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR } /* end if */ else - if(rbuf[i][j] != -1) + if(rbuf[i][j] != 0) TEST_ERROR /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file @@ -3961,7 +4102,7 @@ test_unlim(unsigned config, hid_t fapl) * change to H5D_VDS_FIRST_MISSING */ for(i = 0; i < 10; i++) for(j = 15; j < 20; j += 2) - erbuf[i][j] = -1; + erbuf[i][j] = fill; /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) @@ -3989,12 +4130,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -4006,9 +4142,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Close */ if(!(config & TEST_IO_CLOSE_SRC)) { @@ -4148,7 +4290,7 @@ test_unlim(unsigned config, hid_t fapl) /* Initialize erbuf */ for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) - erbuf[i][j] = -1; + erbuf[i][j] = fill; /* Write data directly to source datasets */ /* Select hyperslab in memory */ @@ -4264,12 +4406,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -4281,9 +4418,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ @@ -4327,12 +4470,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Read data */ if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) @@ -4340,9 +4478,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Reopen srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -4430,12 +4574,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -4447,9 +4586,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ @@ -4501,12 +4646,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -4518,9 +4658,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Reopen srcdset[2] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -4615,12 +4761,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -4632,9 +4773,15 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ @@ -4678,12 +4825,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -4693,17 +4835,17 @@ test_unlim(unsigned config, hid_t fapl) if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) TEST_ERROR - /* Verify read data - algorithmically check for no data past the extent so - * we don't have to wipe out erbuf and then restore it afterwards */ + /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(j < 14) { - if(rbuf[i][j] != erbuf[i][j]) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) TEST_ERROR } /* end if */ else - if(rbuf[i][j] != -1) + if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR + } /* end for */ /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -4796,12 +4938,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -4811,17 +4948,17 @@ test_unlim(unsigned config, hid_t fapl) if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) TEST_ERROR - /* Verify read data - algorithmically check for no data past the extent so - * we don't have to wipe out erbuf and then restore it afterwards */ + /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(j < 17) { - if(rbuf[i][j] != erbuf[i][j]) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) TEST_ERROR } /* end if */ else - if(rbuf[i][j] != -1) + if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR + } /* end for */ /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file * as well if config option specified */ @@ -4861,12 +4998,7 @@ test_unlim(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -4878,14 +5010,18 @@ test_unlim(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Now just read middle 2 rows */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); start[0] = 4; count[0] = 2; count[1] = 19; @@ -4905,12 +5041,16 @@ test_unlim(unsigned config, hid_t fapl) * read */ for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) - if((i == 4) || (i == 5)) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else if((i == 4) || (i == 5)) { if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR } /* end if */ else - if(rbuf[i][j] != -1) + if(rbuf[i][j] != 0) TEST_ERROR /* Close */ @@ -5056,6 +5196,7 @@ test_printf(unsigned config, hid_t fapl) int rbuf[10][20]; /* Read buffer */ int erbuf[10][20]; /* Expected read buffer */ int ndims; /* Number of dimensions */ + int fill = -1; /* Fill value */ int i, j; TESTING("virtual dataset I/O with printf source") @@ -5069,6 +5210,10 @@ test_printf(unsigned config, hid_t fapl) if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR + /* Set fill value */ + if(H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0) + TEST_ERROR + /* Create DAPL */ if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0) TEST_ERROR @@ -5193,7 +5338,7 @@ test_printf(unsigned config, hid_t fapl) /* Initialize erbuf */ for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) - erbuf[i][j] = -1; + erbuf[i][j] = fill; /* Write to srcdset[0] */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) @@ -5276,12 +5421,7 @@ test_printf(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -5293,9 +5433,15 @@ test_printf(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) @@ -5375,12 +5521,7 @@ test_printf(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -5392,9 +5533,15 @@ test_printf(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Close */ if(!(config & TEST_IO_CLOSE_SRC)) { @@ -5554,7 +5701,7 @@ test_printf(unsigned config, hid_t fapl) /* Initialize erbuf */ for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) - erbuf[i][j] = -1; + erbuf[i][j] = fill; /* Write to srcdset[0] */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) @@ -5686,12 +5833,7 @@ test_printf(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -5705,7 +5847,7 @@ test_printf(unsigned config, hid_t fapl) for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) { if(j >= (int)dims[1]) { - if(rbuf[i][j] != -1) + if(rbuf[i][j] != 0) TEST_ERROR } /* end if */ else @@ -5755,12 +5897,7 @@ test_printf(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -5774,7 +5911,7 @@ test_printf(unsigned config, hid_t fapl) for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) { if(j >= (int)dims[1]) { - if(rbuf[i][j] != -1) + if(rbuf[i][j] != 0) TEST_ERROR } /* end if */ else @@ -5824,12 +5961,7 @@ test_printf(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -5843,7 +5975,7 @@ test_printf(unsigned config, hid_t fapl) for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) { if(j >= (int)dims[1]) { - if(rbuf[i][j] != -1) + if(rbuf[i][j] != 0) TEST_ERROR } /* end if */ else @@ -5893,12 +6025,7 @@ test_printf(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -5912,7 +6039,7 @@ test_printf(unsigned config, hid_t fapl) for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) { if(j >= (int)dims[1]) { - if(rbuf[i][j] != -1) + if(rbuf[i][j] != 0) TEST_ERROR } /* end if */ else @@ -5962,12 +6089,7 @@ test_printf(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -5981,7 +6103,7 @@ test_printf(unsigned config, hid_t fapl) for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) { if(j >= (int)dims[1]) { - if(rbuf[i][j] != -1) + if(rbuf[i][j] != 0) TEST_ERROR } /* end if */ else @@ -6031,12 +6153,7 @@ test_printf(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -6050,7 +6167,7 @@ test_printf(unsigned config, hid_t fapl) for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) { if(j >= (int)dims[1]) { - if(rbuf[i][j] != -1) + if(rbuf[i][j] != 0) TEST_ERROR } /* end if */ else @@ -6094,619 +6211,628 @@ test_printf(unsigned config, hid_t fapl) vspace[0] = -1; - /* - * Test 3: 1 Source dataset mapping, 10x5 blocks, printf source file - */ - /* Clean up files so the source files do not exist yet */ - h5_close_files(FILENAME, fapl); + /* Next 2 tests are always run with a different source file, so only run if + * that config option is set (so they're not run twice with the same + * configuration) */ + if(config & TEST_IO_DIFFERENT_FILE) { + /* + * Test 3: 1 Source dataset mapping, 10x5 blocks, printf source file + */ + /* Clean up files so the source files do not exist yet */ + h5_cleanup_files(FILENAME, fapl); - /* Clear virtual layout in DCPL */ - if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR - /* Create virtual dataspaces */ - if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + /* Create virtual dataspaces */ + if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR - /* Create source dataspace */ - dims[1] = 5; - if((srcspace = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + /* Create source dataspace */ + dims[1] = 5; + if((srcspace = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR - /* Select hyperslabs in virtual space */ - stride[0] = 1; - stride[1] = 5; - count[0] = 1; - count[1] = H5S_UNLIMITED; - block[0] = 10; - block[1] = 5; - if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + /* Select hyperslabs in virtual space */ + stride[0] = 1; + stride[1] = 5; + count[0] = 1; + count[1] = H5S_UNLIMITED; + block[0] = 10; + block[1] = 5; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR - /* Add virtual layout mapping */ - if(H5Pset_virtual(dcpl, vspace[0], printf_srcfilename, "src_dset", srcspace) < 0) - TEST_ERROR + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace[0], printf_srcfilename, "src_dset", srcspace) < 0) + TEST_ERROR - /* Create virtual file */ - if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR - /* Create virtual dataset */ - if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) - TEST_ERROR + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) + TEST_ERROR - /* Reopen virtual dataset and file if config option specified */ - if(config & TEST_IO_REOPEN_VIRT) { - if(H5Dclose(vdset) < 0) + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR - vdset = -1; - if(H5Fclose(vfile) < 0) + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) TEST_ERROR - vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if(ndims != 2) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 0) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) TEST_ERROR - } /* end if */ - /* Get VDS space */ - if((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR - /* Get VDS space dimensions */ - if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR - if(ndims != 2) - TEST_ERROR - if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR - if(dims[0] != 10) - TEST_ERROR - if(dims[1] != 0) - TEST_ERROR - if(mdims[0] != 10) - TEST_ERROR - if(mdims[1] != 20) - TEST_ERROR + /* Create 2 source files, one source dataset */ + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR - /* Close filespace */ - if(H5Sclose(filespace) < 0) - TEST_ERROR + /* Populate write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] = (i * (int)mdims[1]) + j; - /* Create 2 source files, one source dataset */ - if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR - if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR - if((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + /* Initialize erbuf */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + erbuf[i][j] = fill; - /* Populate write buffer */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - buf[i][j] = (i * (int)mdims[1]) + j; + /* Write to srcdset[0] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR - /* Initialize erbuf */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - erbuf[i][j] = -1; + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + erbuf[i][j] = buf[i][j]; - /* Write to srcdset[0] */ - if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR - if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + /* Close srcdset and srcfiles if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + if(H5Fclose(srcfile[1]) < 0) + TEST_ERROR + srcfile[1] = -1; + } /* end if */ - /* Update erbuf */ - for(i = 0; i < 10; i++) - for(j = 0; j < 5; j++) - erbuf[i][j] = buf[i][j]; + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ - /* Close srcdset and srcfiles if config option specified */ - if(config & TEST_IO_CLOSE_SRC) { - if(H5Dclose(srcdset[0]) < 0) + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR - srcdset[0] = -1; - if(H5Fclose(srcfile[0]) < 0) + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) TEST_ERROR - srcfile[0] = -1; - if(H5Fclose(srcfile[1]) < 0) + if(ndims != 2) TEST_ERROR - srcfile[1] = -1; - } /* end if */ - - /* Reopen virtual dataset and file if config option specified */ - if(config & TEST_IO_REOPEN_VIRT) { - if(H5Dclose(vdset) < 0) + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) TEST_ERROR - vdset = -1; - if(H5Fclose(vfile) < 0) + if(dims[0] != 10) TEST_ERROR - vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if(dims[1] != 5) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) TEST_ERROR - } /* end if */ - - /* Get VDS space */ - if((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR - /* Get VDS space dimensions */ - if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR - if(ndims != 2) - TEST_ERROR - if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR - if(dims[0] != 10) - TEST_ERROR - if(dims[1] != 5) - TEST_ERROR - if(mdims[0] != 10) - TEST_ERROR - if(mdims[1] != 20) - TEST_ERROR + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR - /* Close filespace */ - if(H5Sclose(filespace) < 0) - TEST_ERROR + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); - /* Read data through virtual dataset */ - /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR - /* Select hyperslab in memory space */ - if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR - /* Read data */ - if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ - /* Verify read data */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) + /* Reopen srcfile[1] if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) TEST_ERROR - /* Reopen srcfile[1] if config option specified */ - if(config & TEST_IO_CLOSE_SRC) - if((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + /* Create 2nd source dataset */ + if((srcdset[1] = H5Dcreate2(srcfile[1], "src_dset", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - /* Create 2nd source dataset */ - if((srcdset[1] = H5Dcreate2(srcfile[1], "src_dset", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; - /* Adjust write buffer */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - buf[i][j] += (int)mdims[0] * (int)mdims[1]; + /* Write to srcdset[1] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR - /* Write to srcdset[1] */ - if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR - if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + erbuf[i][j + 5] = buf[i][j]; - /* Update erbuf */ - for(i = 0; i < 10; i++) - for(j = 0; j < 5; j++) - erbuf[i][j + 5] = buf[i][j]; + /* Close srcdset[1] and srcfile[1] if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Fclose(srcfile[1]) < 0) + TEST_ERROR + srcfile[1] = -1; + } /* end if */ - /* Close srcdset[1] and srcfile[1] if config option specified */ - if(config & TEST_IO_CLOSE_SRC) { - if(H5Dclose(srcdset[1]) < 0) - TEST_ERROR - srcdset[1] = -1; - if(H5Fclose(srcfile[1]) < 0) + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR - srcfile[1] = -1; - } /* end if */ - /* Reopen virtual dataset and file if config option specified */ - if(config & TEST_IO_REOPEN_VIRT) { - if(H5Dclose(vdset) < 0) + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) TEST_ERROR - vdset = -1; - if(H5Fclose(vfile) < 0) + if(ndims != 2) TEST_ERROR - vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) TEST_ERROR - } /* end if */ - - /* Get VDS space */ - if((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR - /* Get VDS space dimensions */ - if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR - if(ndims != 2) - TEST_ERROR - if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR - if(dims[0] != 10) - TEST_ERROR - if(dims[1] != 10) - TEST_ERROR - if(mdims[0] != 10) - TEST_ERROR - if(mdims[1] != 20) - TEST_ERROR + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR - /* Close filespace */ - if(H5Sclose(filespace) < 0) - TEST_ERROR + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); - /* Read data through virtual dataset */ - /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR - /* Select hyperslab in memory space */ - if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR - /* Read data */ - if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ - /* Verify read data */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) + /* Close */ + if(!(config & TEST_IO_CLOSE_SRC)) { + if(H5Dclose(srcdset[0]) < 0) TEST_ERROR - - /* Close */ - if(!(config & TEST_IO_CLOSE_SRC)) { - if(H5Dclose(srcdset[0]) < 0) + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + if(H5Fclose(srcfile[1]) < 0) + TEST_ERROR + srcfile[1] = -1; + } /* end if */ + if(H5Dclose(vdset) < 0) TEST_ERROR - srcdset[0] = -1; - if(H5Dclose(srcdset[1]) < 0) + vdset = -1; + if(H5Fclose(vfile) < 0) TEST_ERROR - srcdset[1] = -1; - if(H5Fclose(srcfile[0]) < 0) + vfile = -1; + if(H5Sclose(srcspace) < 0) TEST_ERROR - srcfile[0] = -1; - if(H5Fclose(srcfile[1]) < 0) + srcspace = -1; + if(H5Sclose(vspace[0]) < 0) TEST_ERROR - srcfile[1] = -1; - } /* end if */ - if(H5Dclose(vdset) < 0) - TEST_ERROR - vdset = -1; - if(H5Fclose(vfile) < 0) - TEST_ERROR - vfile = -1; - if(H5Sclose(srcspace) < 0) - TEST_ERROR - srcspace = -1; - if(H5Sclose(vspace[0]) < 0) - TEST_ERROR - vspace[0] = -1; + vspace[0] = -1; - /* - * Test 4: 1 Source dataset mapping, 10x5 blocks, printf source file and - * source dset, extra %%s in source dataset name - */ - /* Clean up files so the source files do not exist yet */ - h5_close_files(FILENAME, fapl); - - /* Clear virtual layout in DCPL */ - if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) - TEST_ERROR - - /* Create virtual dataspaces */ - if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR - - /* Create source dataspace */ - dims[1] = 5; - if((srcspace = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + /* + * Test 4: 1 Source dataset mapping, 10x5 blocks, printf source file and + * source dset, extra %%s in source dataset name + */ + /* Clean up files so the source files do not exist yet */ + h5_cleanup_files(FILENAME, fapl); - /* Select hyperslabs in virtual space */ - stride[0] = 1; - stride[1] = 5; - count[0] = 1; - count[1] = H5S_UNLIMITED; - block[0] = 10; - block[1] = 5; - if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR - - /* Add virtual layout mapping */ - if(H5Pset_virtual(dcpl, vspace[0], printf_srcfilename, "%%src%%_dset%%%b", srcspace) < 0) - TEST_ERROR - - /* Create virtual file */ - if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR - /* Create virtual dataset */ - if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) - TEST_ERROR + /* Create virtual dataspaces */ + if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR - /* Reopen virtual dataset and file if config option specified */ - if(config & TEST_IO_REOPEN_VIRT) { - if(H5Dclose(vdset) < 0) + /* Create source dataspace */ + dims[1] = 5; + if((srcspace = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR - vdset = -1; - if(H5Fclose(vfile) < 0) + + /* Select hyperslabs in virtual space */ + stride[0] = 1; + stride[1] = 5; + count[0] = 1; + count[1] = H5S_UNLIMITED; + block[0] = 10; + block[1] = 5; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) TEST_ERROR - vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace[0], printf_srcfilename, "%%src%%_dset%%%b", srcspace) < 0) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - } /* end if */ - /* Get VDS space */ - if((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) + TEST_ERROR - /* Get VDS space dimensions */ - if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR - if(ndims != 2) - TEST_ERROR - if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR - if(dims[0] != 10) - TEST_ERROR - if(dims[1] != 0) - TEST_ERROR - if(mdims[0] != 10) - TEST_ERROR - if(mdims[1] != 20) - TEST_ERROR + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ - /* Close filespace */ - if(H5Sclose(filespace) < 0) - TEST_ERROR + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR - /* Create 2 source files, one source dataset */ - if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR - if((srcdset[0] = H5Dcreate2(srcfile[0], "%src%_dset%0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR - if((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - TEST_ERROR + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 0) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR - /* Populate write buffer */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - buf[i][j] = (i * (int)mdims[1]) + j; + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR - /* Initialize erbuf */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - erbuf[i][j] = -1; + /* Create 2 source files, one source dataset */ + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dcreate2(srcfile[0], "%src%_dset%0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR - /* Write to srcdset[0] */ - if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR - if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + /* Populate write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] = (i * (int)mdims[1]) + j; - /* Update erbuf */ - for(i = 0; i < 10; i++) - for(j = 0; j < 5; j++) - erbuf[i][j] = buf[i][j]; + /* Initialize erbuf */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + erbuf[i][j] = fill; - /* Close srcdset and srcfiles if config option specified */ - if(config & TEST_IO_CLOSE_SRC) { - if(H5Dclose(srcdset[0]) < 0) + /* Write to srcdset[0] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) TEST_ERROR - srcdset[0] = -1; - if(H5Fclose(srcfile[0]) < 0) + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) TEST_ERROR - srcfile[0] = -1; - if(H5Fclose(srcfile[1]) < 0) + + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + erbuf[i][j] = buf[i][j]; + + /* Close srcdset and srcfiles if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + if(H5Fclose(srcfile[1]) < 0) + TEST_ERROR + srcfile[1] = -1; + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR - srcfile[1] = -1; - } /* end if */ - /* Reopen virtual dataset and file if config option specified */ - if(config & TEST_IO_REOPEN_VIRT) { - if(H5Dclose(vdset) < 0) + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) TEST_ERROR - vdset = -1; - if(H5Fclose(vfile) < 0) + if(ndims != 2) TEST_ERROR - vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 5) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) TEST_ERROR - } /* end if */ - - /* Get VDS space */ - if((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR - /* Get VDS space dimensions */ - if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR - if(ndims != 2) - TEST_ERROR - if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR - if(dims[0] != 10) - TEST_ERROR - if(dims[1] != 5) - TEST_ERROR - if(mdims[0] != 10) - TEST_ERROR - if(mdims[1] != 20) - TEST_ERROR + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR - /* Close filespace */ - if(H5Sclose(filespace) < 0) - TEST_ERROR + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); - /* Read data through virtual dataset */ - /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR - /* Select hyperslab in memory space */ - if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR - /* Read data */ - if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ - /* Verify read data */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) + /* Reopen srcfile[1] if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) TEST_ERROR - /* Reopen srcfile[1] if config option specified */ - if(config & TEST_IO_CLOSE_SRC) - if((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + /* Create 2nd source dataset */ + if((srcdset[1] = H5Dcreate2(srcfile[1], "%src%_dset%1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - /* Create 2nd source dataset */ - if((srcdset[1] = H5Dcreate2(srcfile[1], "%src%_dset%1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; - /* Adjust write buffer */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - buf[i][j] += (int)mdims[0] * (int)mdims[1]; + /* Write to srcdset[1] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR - /* Write to srcdset[1] */ - if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) - TEST_ERROR - if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) - TEST_ERROR + /* Update erbuf */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + erbuf[i][j + 5] = buf[i][j]; - /* Update erbuf */ - for(i = 0; i < 10; i++) - for(j = 0; j < 5; j++) - erbuf[i][j + 5] = buf[i][j]; + /* Close srcdset[1] and srcfile[1] if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Fclose(srcfile[1]) < 0) + TEST_ERROR + srcfile[1] = -1; + } /* end if */ - /* Close srcdset[1] and srcfile[1] if config option specified */ - if(config & TEST_IO_CLOSE_SRC) { - if(H5Dclose(srcdset[1]) < 0) - TEST_ERROR - srcdset[1] = -1; - if(H5Fclose(srcfile[1]) < 0) + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR - srcfile[1] = -1; - } /* end if */ - /* Reopen virtual dataset and file if config option specified */ - if(config & TEST_IO_REOPEN_VIRT) { - if(H5Dclose(vdset) < 0) + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) TEST_ERROR - vdset = -1; - if(H5Fclose(vfile) < 0) + if(ndims != 2) TEST_ERROR - vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) TEST_ERROR - } /* end if */ - - /* Get VDS space */ - if((filespace = H5Dget_space(vdset)) < 0) - TEST_ERROR - /* Get VDS space dimensions */ - if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) - TEST_ERROR - if(ndims != 2) - TEST_ERROR - if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) - TEST_ERROR - if(dims[0] != 10) - TEST_ERROR - if(dims[1] != 10) - TEST_ERROR - if(mdims[0] != 10) - TEST_ERROR - if(mdims[1] != 20) - TEST_ERROR + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR - /* Close filespace */ - if(H5Sclose(filespace) < 0) - TEST_ERROR + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); - /* Read data through virtual dataset */ - /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR - /* Select hyperslab in memory space */ - if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) - TEST_ERROR + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR - /* Read data */ - if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) - TEST_ERROR + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ - /* Verify read data */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) + /* Close */ + if(!(config & TEST_IO_CLOSE_SRC)) { + if(H5Dclose(srcdset[0]) < 0) TEST_ERROR - - /* Close */ - if(!(config & TEST_IO_CLOSE_SRC)) { - if(H5Dclose(srcdset[0]) < 0) + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + if(H5Fclose(srcfile[1]) < 0) + TEST_ERROR + srcfile[1] = -1; + } /* end if */ + if(H5Dclose(vdset) < 0) TEST_ERROR - srcdset[0] = -1; - if(H5Dclose(srcdset[1]) < 0) + vdset = -1; + if(H5Fclose(vfile) < 0) TEST_ERROR - srcdset[1] = -1; - if(H5Fclose(srcfile[0]) < 0) + vfile = -1; + if(H5Sclose(srcspace) < 0) TEST_ERROR - srcfile[0] = -1; - if(H5Fclose(srcfile[1]) < 0) + srcspace = -1; + if(H5Sclose(vspace[0]) < 0) TEST_ERROR - srcfile[1] = -1; + vspace[0] = -1; } /* end if */ - if(H5Dclose(vdset) < 0) - TEST_ERROR - vdset = -1; - if(H5Fclose(vfile) < 0) - TEST_ERROR - vfile = -1; - if(H5Sclose(srcspace) < 0) - TEST_ERROR - srcspace = -1; - if(H5Sclose(vspace[0]) < 0) - TEST_ERROR - vspace[0] = -1; /* @@ -6751,7 +6877,7 @@ test_printf(unsigned config, hid_t fapl) start[1] = 0; /* Add virtual layout mappings */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset_a%b%%", srcspace) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "%bsrc_dset_a%b%%", srcspace) < 0) TEST_ERROR if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset_b%b%%%%", srcspace) < 0) TEST_ERROR @@ -6828,7 +6954,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR /* Create 2 source datasets */ - if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset_a0%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if((srcdset[0] = H5Dcreate2(srcfile[0], "0src_dset_a0%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset_b0%%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -6841,7 +6967,7 @@ test_printf(unsigned config, hid_t fapl) /* Initialize erbuf */ for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) - erbuf[i][j] = -1; + erbuf[i][j] = fill; /* Write to srcdset[0] */ block[0] = 10; @@ -6924,12 +7050,7 @@ test_printf(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -6941,9 +7062,15 @@ test_printf(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) @@ -7022,12 +7149,7 @@ test_printf(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -7039,9 +7161,15 @@ test_printf(unsigned config, hid_t fapl) /* Verify read data */ for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - if(rbuf[i][j] != erbuf[i][j]) - TEST_ERROR + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ @@ -7086,12 +7214,7 @@ test_printf(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -7105,7 +7228,7 @@ test_printf(unsigned config, hid_t fapl) for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) { if(j >= (int)dims[1]) { - if(rbuf[i][j] != -1) + if(rbuf[i][j] != 0) TEST_ERROR } /* end if */ else @@ -7119,7 +7242,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR /* Create 4th source dataset */ - if((srcdset[3] = H5Dcreate2(srcfile[0], "src_dset_a2%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if((srcdset[3] = H5Dcreate2(srcfile[0], "2src_dset_a2%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Adjust write buffer */ @@ -7190,12 +7313,7 @@ test_printf(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -7209,7 +7327,7 @@ test_printf(unsigned config, hid_t fapl) for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) { if(j >= (int)dims[1]) { - if(rbuf[i][j] != -1) + if(rbuf[i][j] != 0) TEST_ERROR } /* end if */ else @@ -7260,12 +7378,7 @@ test_printf(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -7279,7 +7392,7 @@ test_printf(unsigned config, hid_t fapl) for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) { if(j >= (int)dims[1]) { - if(rbuf[i][j] != -1) + if(rbuf[i][j] != 0) TEST_ERROR } /* end if */ else @@ -7330,12 +7443,7 @@ test_printf(unsigned config, hid_t fapl) /* Read data through virtual dataset */ /* Reset rbuf */ - //HDmemset(rbuf[0], 0, sizeof(rbuf)); VDSINC - /* Initialize erbuf - used now instead of setting fill value because fill - * values do not work VDSINC */ - for(i = 0; i < (int)mdims[0]; i++) - for(j = 0; j < (int)mdims[1]; j++) - rbuf[i][j] = -1; + HDmemset(rbuf[0], 0, sizeof(rbuf)); /* Select hyperslab in memory space */ if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) @@ -7349,7 +7457,7 @@ test_printf(unsigned config, hid_t fapl) for(i = 0; i < (int)mdims[0]; i++) for(j = 0; j < (int)mdims[1]; j++) { if(j >= (int)dims[1]) { - if(rbuf[i][j] != -1) + if(rbuf[i][j] != 0) TEST_ERROR } /* end if */ else -- cgit v0.12 From 5eae97bca64d144ae43d420dda106e6de99c32a5 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 5 Jun 2015 17:38:13 -0500 Subject: [svn-r27155] Change H5Pget_virtual_view to return herr_t and take a pointer to the view as a parameter. Also fix bug in H5Pget_virtual_printf_gap. Tested: jam --- src/H5Pdapl.c | 19 +++++++++++-------- src/H5Ppublic.h | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index 256a46e..b439009 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -365,22 +365,25 @@ done: * *------------------------------------------------------------------------- */ -H5D_vds_view_t -H5Pget_virtual_view(hid_t plist_id) +herr_t +H5Pget_virtual_view(hid_t plist_id, H5D_vds_view_t *view) { H5P_genplist_t *plist; /* Property list pointer */ - H5D_vds_view_t ret_value; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_API(H5D_VDS_ERROR) - H5TRACE1("Dv", "i", plist_id); + FUNC_ENTER_API(FAIL) + H5TRACE2("e", "i*Dv", plist_id, view); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5D_VDS_ERROR, "can't find object for ID") /* Get value from property list */ - if(H5P_get(plist, H5D_ACS_VDS_VIEW_NAME, &ret_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5D_VDS_ERROR, "unable to get value") + if(view) { + HDassert(0 && "Checking code coverage..."); //VDSINC + if(H5P_get(plist, H5D_ACS_VDS_VIEW_NAME, view) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5D_VDS_ERROR, "unable to get value") + } //VDSINC done: FUNC_LEAVE_API(ret_value) @@ -514,7 +517,7 @@ H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size) H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_API(H5D_VDS_ERROR) + FUNC_ENTER_API(FAIL) H5TRACE2("e", "i*h", plist_id, gap_size); /* Get the plist structure */ diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index f1db483..4929621 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -394,7 +394,7 @@ H5_DLL herr_t H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nbytes/*out*/, double *rdcc_w0/*out*/); H5_DLL herr_t H5Pset_virtual_view(hid_t plist_id, H5D_vds_view_t view); -H5_DLL H5D_vds_view_t H5Pget_virtual_view(hid_t plist_id); +H5_DLL herr_t H5Pget_virtual_view(hid_t plist_id, H5D_vds_view_t *view); H5_DLL herr_t H5Pset_virtual_printf_gap(hid_t plist_id, hsize_t gap_size); H5_DLL herr_t H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size); -- cgit v0.12 From a6442037e4952e1956ce760a27a15b078a5b9a17 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 8 Jun 2015 04:10:50 -0500 Subject: [svn-r27160] Added VDS generator files. The Makefiles have not been updated so they don't compile yet. --- tools/misc/vds/UC_1.h | 150 ++++++++++++++++++++++ tools/misc/vds/UC_1_one_dim_gen.c | 239 ++++++++++++++++++++++++++++++++++ tools/misc/vds/UC_2.h | 151 ++++++++++++++++++++++ tools/misc/vds/UC_2_two_dims_gen.c | 230 +++++++++++++++++++++++++++++++++ tools/misc/vds/UC_3.h | 78 ++++++++++++ tools/misc/vds/UC_3_gaps_gen.c | 255 +++++++++++++++++++++++++++++++++++++ tools/misc/vds/UC_4.h | 86 +++++++++++++ tools/misc/vds/UC_4_printf_gen.c | 219 +++++++++++++++++++++++++++++++ tools/misc/vds/UC_5.h | 83 ++++++++++++ tools/misc/vds/UC_5_stride_gen.c | 243 +++++++++++++++++++++++++++++++++++ tools/misc/vds/UC_common.h | 41 ++++++ tools/misc/vds_gentest.c | 23 ---- 12 files changed, 1775 insertions(+), 23 deletions(-) create mode 100644 tools/misc/vds/UC_1.h create mode 100644 tools/misc/vds/UC_1_one_dim_gen.c create mode 100644 tools/misc/vds/UC_2.h create mode 100644 tools/misc/vds/UC_2_two_dims_gen.c create mode 100644 tools/misc/vds/UC_3.h create mode 100644 tools/misc/vds/UC_3_gaps_gen.c create mode 100644 tools/misc/vds/UC_4.h create mode 100644 tools/misc/vds/UC_4_printf_gen.c create mode 100644 tools/misc/vds/UC_5.h create mode 100644 tools/misc/vds/UC_5_stride_gen.c create mode 100644 tools/misc/vds/UC_common.h delete mode 100644 tools/misc/vds_gentest.c diff --git a/tools/misc/vds/UC_1.h b/tools/misc/vds/UC_1.h new file mode 100644 index 0000000..29df72b --- /dev/null +++ b/tools/misc/vds/UC_1.h @@ -0,0 +1,150 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef UC_1_H +#define UC_1_H + +#include "hdf5.h" + +#include "UC_common.h" + +/* + * Definitions for VDS use case 1 + * + * Datasets have a single unlimited dimension and two fixed dimensions. They + * are mapped along a single dimension in the VDS with no gaps between them. + */ + +/* virtual dataset <---> source dataset mapping and sizes + + ***************** --+ + * A * K + ***************** --+ + * * | + * B * N + * * | + ***************** --+ + * C * + ***************** + * * + * D * + * * + ***************** + * E * + ***************** + * * + * F * + * * + ***************** + + | | + +-------M-------+ + + + dim[0] + / + / + / + -----> dim[2] + | + | + | + dim[1] + + */ + + +#define UC_1_N_SOURCES 6 + +/* Dataset dimensions */ +#define UC_1_SM_HEIGHT 2 /* K */ +#define UC_1_LG_HEIGHT 4 /* N */ +#define UC_1_SM_LG_HEIGHT 6 /* SM_HEIGHT + LG_HEIGHT */ +#define UC_1_FULL_HEIGHT 18 /* (3 * K) + (3 * N) */ +#define UC_1_HALF_HEIGHT 9 +#define UC_1_WIDTH 8 /* M */ +#define UC_1_HALF_WIDTH 4 + +#define UC_1_N_MAX_PLANES H5S_UNLIMITED /* max number of planes */ +#define UC_1_N_TEST_PLANES 5 /* number of planes we write */ + +/* Dataset datatypes */ +#define UC_1_SOURCE_DATATYPE H5T_STD_I32LE +#define UC_1_VDS_DATATYPE H5T_STD_I32LE + +/* Starting size of datasets, both source and VDS */ +static hsize_t UC_1_DIMS[UC_1_N_SOURCES][RANK] = { + {0, UC_1_SM_HEIGHT, UC_1_WIDTH}, + {0, UC_1_LG_HEIGHT, UC_1_WIDTH}, + {0, UC_1_SM_HEIGHT, UC_1_WIDTH}, + {0, UC_1_LG_HEIGHT, UC_1_WIDTH}, + {0, UC_1_SM_HEIGHT, UC_1_WIDTH}, + {0, UC_1_LG_HEIGHT, UC_1_WIDTH} +}; +static hsize_t UC_1_VDS_DIMS[RANK] = {0, UC_1_FULL_HEIGHT, UC_1_WIDTH}; + +/* Maximum size of datasets, both source and VDS */ +static hsize_t UC_1_MAX_DIMS[UC_1_N_SOURCES][RANK] = { + {UC_1_N_MAX_PLANES, UC_1_SM_HEIGHT, UC_1_WIDTH}, + {UC_1_N_MAX_PLANES, UC_1_LG_HEIGHT, UC_1_WIDTH}, + {UC_1_N_MAX_PLANES, UC_1_SM_HEIGHT, UC_1_WIDTH}, + {UC_1_N_MAX_PLANES, UC_1_LG_HEIGHT, UC_1_WIDTH}, + {UC_1_N_MAX_PLANES, UC_1_SM_HEIGHT, UC_1_WIDTH}, + {UC_1_N_MAX_PLANES, UC_1_LG_HEIGHT, UC_1_WIDTH} +}; +static hsize_t UC_1_VDS_MAX_DIMS[RANK] = {UC_1_N_MAX_PLANES, UC_1_FULL_HEIGHT, UC_1_WIDTH}; + +/* Planes */ +static hsize_t UC_1_PLANES[UC_1_N_SOURCES][RANK] = { + {1, UC_1_SM_HEIGHT, UC_1_WIDTH}, + {1, UC_1_LG_HEIGHT, UC_1_WIDTH}, + {1, UC_1_SM_HEIGHT, UC_1_WIDTH}, + {1, UC_1_LG_HEIGHT, UC_1_WIDTH}, + {1, UC_1_SM_HEIGHT, UC_1_WIDTH}, + {1, UC_1_LG_HEIGHT, UC_1_WIDTH} +}; +static hsize_t UC_1_VDS_PLANE[RANK] = {1, UC_1_FULL_HEIGHT, UC_1_WIDTH}; + +/* File names for source datasets */ +static char UC_1_FILE_NAMES[UC_1_N_SOURCES][NAME_LEN] = { + {"1_a.h5"}, + {"1_b.h5"}, + {"1_c.h5"}, + {"1_d.h5"}, + {"1_e.h5"}, + {"1_f.h5"} +}; + +/* VDS file name */ +static char UC_1_VDS_FILE_NAME[NAME_LEN] = "1_vds.h5"; + +/* Dataset names */ +static char UC_1_SOURCE_DSET_NAME[NAME_LEN] = "source_dset"; +static char UC_1_SOURCE_DSET_PATH[NAME_LEN] = "/source_dset"; +static char UC_1_VDS_DSET_NAME[NAME_LEN] = "vds_dset"; + +/* Fill values */ +static hsize_t UC_1_FILL_VALUES[UC_1_N_SOURCES] = { + -1, + -2, + -3, + -4, + -5, + -6 +}; +static int UC_1_VDS_FILL_VALUE = -9; + +#endif /* UC_1_H */ + diff --git a/tools/misc/vds/UC_1_one_dim_gen.c b/tools/misc/vds/UC_1_one_dim_gen.c new file mode 100644 index 0000000..a78268b --- /dev/null +++ b/tools/misc/vds/UC_1_one_dim_gen.c @@ -0,0 +1,239 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * File/dataset generator for VDS use case 1 + * + * See the header file for a description. + */ + +#include +#include + +#include "hdf5.h" + +#include "UC_common.h" +#include "UC_1.h" + + +int +main(int argc, char *argv[]) +{ + hid_t src_sid = -1; /* source dataset's dataspace ID */ + hid_t src_dcplid = -1; /* source dataset property list ID */ + + hid_t vds_sid = -1; /* VDS dataspace ID */ + hid_t vds_dcplid = -1; /* VDS dataset property list ID */ + + hid_t fid = -1; /* HDF5 file ID */ + hid_t did = -1; /* dataset ID */ + hid_t msid = -1; /* memory dataspace ID */ + hid_t fsid = -1; /* file dataspace ID */ + + hsize_t extent[RANK]; /* dataset extents */ + hsize_t start[RANK]; /* starting point for hyperslab */ + int map_start = -1; /* starting point in the VDS map */ + + int *buffer = NULL; /* data buffer */ + hsize_t count = 0; /* number of elements in a plane */ + int n_planes = -1; /* number of planes to write */ + int value = -1; /* value written to datasets */ + + int i; /* iterator */ + int j; /* iterator */ + int k; /* iterator */ + + + /* Start by creating the virtual dataset (VDS) dataspace and creation + * property list. The individual source datasets are then created + * and the VDS map (stored in the VDS property list) is updated. + */ + + /* Create VDS dcpl */ + if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0) + UC_ERROR + if(H5Pset_fill_value(vds_dcplid, UC_1_VDS_DATATYPE, + &UC_1_VDS_FILL_VALUE) < 0) + UC_ERROR + + /* Create VDS dataspace */ + if((vds_sid = H5Screate_simple(RANK, UC_1_VDS_DIMS, + UC_1_VDS_MAX_DIMS)) < 0) + UC_ERROR + + /************************************ + * Create source files and datasets * + ************************************/ + + start[0] = 0; + start[1] = 0; + start[2] = 0; + map_start = 0; + + for(i = 0; i < UC_1_N_SOURCES; i++) { + + /* Create source dataset dcpl */ + if((src_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0) + UC_ERROR + if(H5Pset_chunk(src_dcplid, RANK, UC_1_PLANES[i]) < 0) + UC_ERROR + if(H5Pset_fill_value(src_dcplid, UC_1_SOURCE_DATATYPE, + &UC_1_FILL_VALUES[i]) < 0) + UC_ERROR + if(0 != i % 2) + if(H5Pset_deflate(src_dcplid, COMPRESSION_LEVEL) < 0) + UC_ERROR + + /* Create source file, dataspace, and dataset */ + if((fid = H5Fcreate(UC_1_FILE_NAMES[i], H5F_ACC_TRUNC, + H5P_DEFAULT, H5P_DEFAULT)) < 0) + UC_ERROR + if((src_sid = H5Screate_simple(RANK, UC_1_DIMS[i], + UC_1_MAX_DIMS[i])) < 0) + UC_ERROR + if((did = H5Dcreate2(fid, UC_1_SOURCE_DSET_NAME, + UC_1_SOURCE_DATATYPE, src_sid, + H5P_DEFAULT, src_dcplid, H5P_DEFAULT)) < 0) + UC_ERROR + + /* Set the dataset's extent (will eventually vary with i) */ + extent[0] = UC_1_N_TEST_PLANES; + extent[1] = UC_1_PLANES[i][1]; + extent[2] = UC_1_PLANES[i][2]; + if(H5Dset_extent(did, extent) < 0) + UC_ERROR + + /* Create a data buffer that represents a plane */ + count = UC_1_PLANES[i][1] * UC_1_PLANES[i][2]; + if(NULL == (buffer = (int *)malloc(count * sizeof(int)))) + UC_ERROR + + /* Create the memory dataspace */ + if((msid = H5Screate_simple(RANK, UC_1_PLANES[i], NULL)) < 0) + UC_ERROR + + /* Get the file dataspace */ + if((fsid = H5Dget_space(did)) < 0) + UC_ERROR + + /* Write planes to the dataset, number will eventually vary with i */ + n_planes = UC_1_N_TEST_PLANES; + for(j = 0; j < n_planes; j++) { + + value = ((i + 1) * 10) + j; + for(k = 0; k < count; k++) + buffer[k] = value; + + start[0] = j; + start[1] = 0; + start[2] = 0; + if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_1_PLANES[i], NULL) < 0) + UC_ERROR + if(H5Dwrite(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, buffer) < 0) + UC_ERROR + + } /* end for */ + + /* set up hyperslabs for source and destination datasets */ + start[0] = 0; + start[1] = 0; + start[2] = 0; + if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL, + UC_1_MAX_DIMS[i], NULL) < 0) + UC_ERROR + start[0] = 0; + start[1] = map_start; + start[2] = 0; + if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, start, NULL, + UC_1_MAX_DIMS[i], NULL) < 0) + UC_ERROR + map_start += UC_1_PLANES[i][1]; + + /* Add VDS mapping */ + if(H5Pset_virtual(vds_dcplid, vds_sid, UC_1_FILE_NAMES[i], + UC_1_SOURCE_DSET_PATH, src_sid) < 0) + UC_ERROR + + /* close */ + if(H5Sclose(src_sid) < 0) + UC_ERROR + if(H5Pclose(src_dcplid) < 0) + UC_ERROR + if(H5Sclose(msid) < 0) + UC_ERROR + if(H5Sclose(fsid) < 0) + UC_ERROR + if(H5Dclose(did) < 0) + UC_ERROR + if(H5Fclose(fid) < 0) + UC_ERROR + free(buffer); + + } /* end for */ + + + /******************* + * Create VDS file * + *******************/ + + /* file */ + if((fid = H5Fcreate(UC_1_VDS_FILE_NAME, H5F_ACC_TRUNC, + H5P_DEFAULT, H5P_DEFAULT)) < 0) + UC_ERROR + + /* dataset */ + if((did = H5Dcreate2(fid, UC_1_VDS_DSET_NAME, UC_1_VDS_DATATYPE, vds_sid, + H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0) + UC_ERROR + + /* close */ + if(H5Pclose(vds_dcplid) < 0) + UC_ERROR + if(H5Sclose(vds_sid) < 0) + UC_ERROR + if(H5Dclose(did) < 0) + UC_ERROR + if(H5Fclose(fid) < 0) + UC_ERROR + + return EXIT_SUCCESS; + +error: + + H5E_BEGIN_TRY { + if(src_sid >= 0) + (void)H5Sclose(src_sid); + if(src_dcplid >= 0) + (void)H5Pclose(src_dcplid); + if(vds_sid >= 0) + (void)H5Sclose(vds_sid); + if(vds_dcplid >= 0) + (void)H5Pclose(vds_dcplid); + if(fid >= 0) + (void)H5Fclose(fid); + if(did >= 0) + (void)H5Dclose(did); + if(msid >= 0) + (void)H5Sclose(msid); + if(fsid >= 0) + (void)H5Sclose(fsid); + if(buffer != NULL) + free(buffer); + } H5E_END_TRY + + return EXIT_FAILURE; + +} /* end main */ + diff --git a/tools/misc/vds/UC_2.h b/tools/misc/vds/UC_2.h new file mode 100644 index 0000000..3e4e4fd --- /dev/null +++ b/tools/misc/vds/UC_2.h @@ -0,0 +1,151 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef UC_2_H +#define UC_2_H + +#include "hdf5.h" + +/* + * Definitions for VDS use case 2 + * + * Datasets have a single unlimited dimension and two fixed dimensions. They + * are mapped along two dimensions in the VDS with no gaps between them. + */ + +/* virtual dataset <---> source dataset mapping and sizes + + ********************************** + * A * * + ***************** D * + * * * + * B * * + * ****************** + ***************** E * + * C * * + ********************************** + + + dim[0] + / + / + / + -----> dim[2] + | + | + | + dim[1] + + */ + +#define UC_2_N_SOURCES 5 + +/* Dataset dimensions */ +#define UC_2_A_HEIGHT 2 +#define UC_2_B_HEIGHT 4 +#define UC_2_AB_HEIGHT 6 /* For hyperslab start position */ +#define UC_2_C_HEIGHT 2 +#define UC_2_D_HEIGHT 5 +#define UC_2_E_HEIGHT 3 +#define UC_2_FULL_HEIGHT 8 /* A+B+C and D+E */ +#define UC_2_WIDTH 7 +#define UC_2_FULL_WIDTH 14 /* 2*width */ + +#define UC_2_N_PLANES_IN_SERIES 3 /* number of planes in a series of sub-images */ +#define UC_2_N_MAX_PLANES H5S_UNLIMITED /* max number of planes */ +#define UC_2_N_TEST_PLANES 6 /* number of planes we write */ + +/* Dataset datatypes */ +#define UC_2_SOURCE_DATATYPE H5T_STD_I32LE +#define UC_2_VDS_DATATYPE H5T_STD_I32LE + +/* Starting size of datasets, both source and VDS */ +static hsize_t UC_2_DIMS[UC_2_N_SOURCES][RANK] = { + {0, UC_2_A_HEIGHT, UC_2_WIDTH}, + {0, UC_2_B_HEIGHT, UC_2_WIDTH}, + {0, UC_2_C_HEIGHT, UC_2_WIDTH}, + {0, UC_2_D_HEIGHT, UC_2_WIDTH}, + {0, UC_2_E_HEIGHT, UC_2_WIDTH} +}; +static hsize_t UC_2_VDS_DIMS[RANK] = {0, UC_2_FULL_HEIGHT, UC_2_FULL_WIDTH}; + +/* Maximum size of datasets, both source and VDS */ +static hsize_t UC_2_MAX_DIMS[UC_2_N_SOURCES][RANK] = { + {UC_2_N_MAX_PLANES, UC_2_A_HEIGHT, UC_2_WIDTH}, + {UC_2_N_MAX_PLANES, UC_2_B_HEIGHT, UC_2_WIDTH}, + {UC_2_N_MAX_PLANES, UC_2_C_HEIGHT, UC_2_WIDTH}, + {UC_2_N_MAX_PLANES, UC_2_D_HEIGHT, UC_2_WIDTH}, + {UC_2_N_MAX_PLANES, UC_2_E_HEIGHT, UC_2_WIDTH} +}; +static hsize_t UC_2_VDS_MAX_DIMS[RANK] = {UC_2_N_MAX_PLANES, UC_2_FULL_HEIGHT, UC_2_FULL_WIDTH}; + +/* Positions of source datasets in the VDS */ +static hsize_t UC_2_POSITIONS[UC_2_N_SOURCES][RANK] = { + /* A */ {0, 0, 0}, + /* B */ {0, UC_2_A_HEIGHT, 0}, + /* C */ {0, UC_2_AB_HEIGHT, 0}, + /* D */ {0, 0, UC_2_WIDTH}, + /* E */ {0, UC_2_D_HEIGHT, UC_2_WIDTH} +}; + +/* Planes */ +static hsize_t UC_2_PLANES[UC_2_N_SOURCES][RANK] = { + {1, UC_2_A_HEIGHT, UC_2_WIDTH}, + {1, UC_2_B_HEIGHT, UC_2_WIDTH}, + {1, UC_2_C_HEIGHT, UC_2_WIDTH}, + {1, UC_2_D_HEIGHT, UC_2_WIDTH}, + {1, UC_2_E_HEIGHT, UC_2_WIDTH} +}; +static hsize_t UC_2_VDS_SUB_IMAGE[RANK] = {1, UC_2_FULL_HEIGHT, UC_2_WIDTH}; +static hsize_t UC_2_VDS_PLANE[RANK] = {1, UC_2_FULL_HEIGHT, UC_2_FULL_WIDTH}; + +/* Chunk dimensions */ +static hsize_t UC_2_CHUNK_DIMS[UC_2_N_SOURCES][RANK] = { + {UC_2_N_PLANES_IN_SERIES, UC_2_A_HEIGHT, UC_2_WIDTH}, + {UC_2_N_PLANES_IN_SERIES, UC_2_B_HEIGHT, UC_2_WIDTH}, + {UC_2_N_PLANES_IN_SERIES, UC_2_C_HEIGHT, UC_2_WIDTH}, + {UC_2_N_PLANES_IN_SERIES, UC_2_D_HEIGHT, UC_2_WIDTH}, + {UC_2_N_PLANES_IN_SERIES, UC_2_E_HEIGHT, UC_2_WIDTH} +}; + +/* File names for source datasets */ +static char UC_2_FILE_NAMES[UC_2_N_SOURCES][NAME_LEN] = { + {"2_a.h5"}, + {"2_b.h5"}, + {"2_c.h5"}, + {"2_d.h5"}, + {"2_e.h5"} +}; + +/* VDS file name */ +#define UC_2_VDS_FILE_NAME "2_vds.h5" + +/* Dataset names */ +#define UC_2_SOURCE_DSET_NAME "source_dset" +#define UC_2_SOURCE_DSET_PATH "/source_dset" +#define UC_2_VDS_DSET_NAME "vds_dset" + +/* Fill values */ +static hsize_t UC_2_FILL_VALUES[UC_2_N_SOURCES] = { + -1, + -2, + -3, + -4, + -5 +}; +static int UC_2_VDS_FILL_VALUE = -9; + +#endif /* UC_2_H */ + diff --git a/tools/misc/vds/UC_2_two_dims_gen.c b/tools/misc/vds/UC_2_two_dims_gen.c new file mode 100644 index 0000000..b5fd319 --- /dev/null +++ b/tools/misc/vds/UC_2_two_dims_gen.c @@ -0,0 +1,230 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * File/dataset generator for VDS use case 2 + * + * See the header file for a description. + */ + + +#include + +#include "hdf5.h" + +#include "UC_common.h" +#include "UC_2.h" + +int +main(int argc, char *argv[]) +{ + hid_t src_sid = -1; /* source dataset's dataspace ID */ + hid_t src_dcplid = -1; /* source dataset property list ID */ + + hid_t vds_sid = -1; /* VDS dataspace ID */ + hid_t vds_dcplid = -1; /* VDS dataset property list ID */ + + hid_t fid = -1; /* HDF5 file ID */ + hid_t did = -1; /* dataset ID */ + hid_t msid = -1; /* memory dataspace ID */ + hid_t fsid = -1; /* file dataspace ID */ + + hsize_t start[RANK]; /* starting point for hyperslab */ + hsize_t extent[RANK]; /* dataset extents */ + + int *buffer = NULL; /* data buffer */ + int value = -1; /* value written to datasets */ + hsize_t count = 0; /* number of elements in a plane */ + int n_planes = -1; /* number of planes to write */ + + int i; /* iterator */ + int j; /* iterator */ + int k; /* iterator */ + + + /* Start by creating the virtual dataset (VDS) dataspace and creation + * property list. The individual source datasets are then created + * and the VDS map (stored in the VDS property list) is updated. + */ + + /* Create VDS dcpl */ + if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0) + UC_ERROR + if(H5Pset_fill_value(vds_dcplid, UC_2_VDS_DATATYPE, + &UC_2_VDS_FILL_VALUE) < 0) + UC_ERROR + + /* Create VDS dataspace */ + if((vds_sid = H5Screate_simple(RANK, UC_2_VDS_DIMS, + UC_2_VDS_MAX_DIMS)) < 0) + UC_ERROR + + /************************************ + * Create source files and datasets * + ************************************/ + + start[0] = 0; + start[1] = 0; + start[2] = 0; + + for(i = 0; i < UC_2_N_SOURCES; i++) { + + /* source dataset dcpl */ + if((src_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0) + UC_ERROR + if(H5Pset_chunk(src_dcplid, RANK, UC_2_CHUNK_DIMS[i]) < 0) + UC_ERROR + if(H5Pset_fill_value(src_dcplid, UC_2_SOURCE_DATATYPE, + &UC_2_FILL_VALUES[i]) < 0) + UC_ERROR + if(H5Pset_deflate(src_dcplid, COMPRESSION_LEVEL) < 0) + UC_ERROR + + /* Create source file, dataspace, and dataset */ + if((fid = H5Fcreate(UC_2_FILE_NAMES[i], H5F_ACC_TRUNC, + H5P_DEFAULT, H5P_DEFAULT)) < 0) + UC_ERROR + if((src_sid = H5Screate_simple(RANK, UC_2_DIMS[i], + UC_2_MAX_DIMS[i])) < 0) + UC_ERROR + if((did = H5Dcreate2(fid, UC_2_SOURCE_DSET_NAME, + UC_2_SOURCE_DATATYPE, src_sid, + H5P_DEFAULT, src_dcplid, H5P_DEFAULT)) < 0) + UC_ERROR + + /* Set the dataset's extent (will eventually vary with i) */ + extent[0] = UC_2_N_TEST_PLANES; + extent[1] = UC_2_PLANES[i][1]; + extent[2] = UC_2_PLANES[i][2]; + if(H5Dset_extent(did, extent) < 0) + UC_ERROR + + /* Create a data buffer that represents a plane */ + count = UC_2_PLANES[i][1] * UC_2_PLANES[i][2]; + if(NULL == (buffer = (int *)malloc(count * sizeof(int)))) + UC_ERROR + + /* Create the memory dataspace */ + if((msid = H5Screate_simple(RANK, UC_2_PLANES[i], NULL)) < 0) + UC_ERROR + + /* Get the file dataspace */ + if((fsid = H5Dget_space(did)) < 0) + UC_ERROR + + /* Write planes to the dataset, number will eventually vary with i */ + n_planes = UC_2_N_TEST_PLANES; + for(j = 0; j < n_planes; j++) { + + value = ((i + 1) * 10) + j; + for(k = 0; k < count; k++) + buffer[k] = value; + + start[0] = j; + start[1] = 0; + start[2] = 0; + if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_2_PLANES[i], NULL) < 0) + UC_ERROR + if(H5Dwrite(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, buffer) < 0) + UC_ERROR + + } /* end for */ + + /* set up hyperslabs for source and destination datasets */ + start[0] = 0; + start[1] = 0; + start[2] = 0; + if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL, + UC_2_MAX_DIMS[i], NULL) < 0) + UC_ERROR + if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, UC_2_POSITIONS[i], NULL, + UC_2_MAX_DIMS[i], NULL) < 0) + UC_ERROR + + /* Add VDS mapping */ + if(H5Pset_virtual(vds_dcplid, vds_sid, UC_2_FILE_NAMES[i], + UC_2_SOURCE_DSET_PATH, src_sid) < 0) + UC_ERROR + + /* close */ + if(H5Sclose(msid) < 0) + UC_ERROR + if(H5Sclose(fsid) < 0) + UC_ERROR + if(H5Sclose(src_sid) < 0) + UC_ERROR + if(H5Pclose(src_dcplid) < 0) + UC_ERROR + if(H5Dclose(did) < 0) + UC_ERROR + if(H5Fclose(fid) < 0) + UC_ERROR + free(buffer); + + } /* end for */ + + /******************************* + * Create VDS file and dataset * + *******************************/ + + /* file */ + if((fid = H5Fcreate(UC_2_VDS_FILE_NAME, H5F_ACC_TRUNC, + H5P_DEFAULT, H5P_DEFAULT)) < 0) + UC_ERROR + + /* dataset */ + if((did = H5Dcreate2(fid, UC_2_VDS_DSET_NAME, UC_2_VDS_DATATYPE, vds_sid, + H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0) + UC_ERROR + + /* close */ + if(H5Pclose(vds_dcplid) < 0) + UC_ERROR + if(H5Sclose(vds_sid) < 0) + UC_ERROR + if(H5Dclose(did) < 0) + UC_ERROR + if(H5Fclose(fid) < 0) + UC_ERROR + + return EXIT_SUCCESS; + +error: + + H5E_BEGIN_TRY { + if(src_sid >= 0) + (void)H5Sclose(src_sid); + if(src_dcplid >= 0) + (void)H5Pclose(src_dcplid); + if(vds_sid >= 0) + (void)H5Sclose(vds_sid); + if(vds_dcplid >= 0) + (void)H5Pclose(vds_dcplid); + if(fid >= 0) + (void)H5Fclose(fid); + if(did >= 0) + (void)H5Dclose(did); + if(msid >= 0) + (void)H5Sclose(msid); + if(fsid >= 0) + (void)H5Sclose(fsid); + if(buffer != NULL) + free(buffer); + } H5E_END_TRY + + return EXIT_FAILURE; + +} /* end main() */ + diff --git a/tools/misc/vds/UC_3.h b/tools/misc/vds/UC_3.h new file mode 100644 index 0000000..a27c3cf --- /dev/null +++ b/tools/misc/vds/UC_3.h @@ -0,0 +1,78 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef UC_3_H +#define UC_3_H + +#include "hdf5.h" + +#include "UC_1.h" +#include "UC_2.h" + +/* + * Definitions for VDS use case 3 + * + * Datasets have a single unlimited dimension and one or two fixed + * dimensions (they are reused from use cases 1 and 2). In this use case, + * the datasets are mapped in the VDS with gaps between them. + */ + +/* VDS dimensions + * Height and width are large enough to encompass the + * mapped source datasets with gaps. + */ +#define UC_31_VDS_HEIGHT 25 /* full height + 7 (gaps of 1) */ +#define UC_31_VDS_WIDTH 8 /* full width + 0 (no gaps) */ +#define UC_32_VDS_HEIGHT 13 /* full height + 5 */ +#define UC_32_VDS_WIDTH 19 /* full width + 5 */ +#define UC_31_GAP 1 + +/* VDS datatypes */ +#define UC_31_VDS_DATATYPE H5T_STD_I32LE +#define UC_32_VDS_DATATYPE H5T_STD_I32LE + +/* Starting size of virtual datasets */ +static hsize_t UC_31_VDS_DIMS[RANK] = {0, UC_31_VDS_HEIGHT, UC_31_VDS_WIDTH}; +static hsize_t UC_32_VDS_DIMS[RANK] = {0, UC_32_VDS_HEIGHT, UC_32_VDS_WIDTH}; + +/* Maximum size of virtual datasets */ +static hsize_t UC_31_VDS_MAX_DIMS[RANK] = {UC_1_N_MAX_PLANES, UC_31_VDS_HEIGHT, UC_31_VDS_WIDTH}; +static hsize_t UC_32_VDS_MAX_DIMS[RANK] = {UC_2_N_MAX_PLANES, UC_32_VDS_HEIGHT, UC_32_VDS_WIDTH}; + +/* Positions of mapped source datasets */ +static hsize_t UC_32_POSITIONS[UC_2_N_SOURCES][RANK] = { + /* A */ {0, 1, 1}, + /* B */ {0, 4, 0}, + /* C */ {0, 11, 4}, + /* D */ {0, 1, 9}, + /* E */ {0, 8, 12} +}; + +/* Planes */ +static hsize_t UC_31_VDS_PLANE[RANK] = {1, UC_31_VDS_HEIGHT, UC_31_VDS_WIDTH}; +static hsize_t UC_32_VDS_PLANE[RANK] = {1, UC_32_VDS_HEIGHT, UC_32_VDS_WIDTH}; + +/* VDS file names */ +#define UC_31_VDS_FILE_NAME "3_1_vds.h5" +#define UC_32_VDS_FILE_NAME "3_2_vds.h5" + +/* Dataset name */ +#define UC_3_VDS_DSET_NAME "vds_dset" + +/* Fill value */ +static int UC_3_VDS_FILL_VALUE = -9; + +#endif /* UC_3_H */ + diff --git a/tools/misc/vds/UC_3_gaps_gen.c b/tools/misc/vds/UC_3_gaps_gen.c new file mode 100644 index 0000000..1f150c1 --- /dev/null +++ b/tools/misc/vds/UC_3_gaps_gen.c @@ -0,0 +1,255 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * File/dataset generator for VDS use case 3 + * + * See the header file for a description. + */ + +#include +#include + +#include + +#include "UC_common.h" +#include "UC_3.h" + +/* Create the VDS that uses use case 1 files */ +herr_t +create_3_1_vds(void) +{ + hid_t src_sid = -1; /* source dataset's dataspace ID */ + hid_t vds_sid = -1; /* VDS dataspace ID */ + hid_t vds_dcplid = -1; /* VDS dataset property list ID */ + + hid_t fid = -1; /* HDF5 file ID */ + hid_t did = -1; /* dataset ID */ + + hsize_t start[RANK]; /* source starting point for hyperslab */ + hsize_t position[RANK]; /* vds mapping positions */ + + int i; /* iterator */ + + /* Create VDS dcpl */ + if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0) + UC_ERROR + if(H5Pset_fill_value(vds_dcplid, UC_31_VDS_DATATYPE, + &UC_3_VDS_FILL_VALUE) < 0) + UC_ERROR + + /* Create VDS dataspace */ + if((vds_sid = H5Screate_simple(RANK, UC_31_VDS_DIMS, + UC_31_VDS_MAX_DIMS)) < 0) + UC_ERROR + + /* Set starting positions */ + start[0] = 0; + start[1] = 0; + start[2] = 0; + + position[0] = 0; + position[1] = UC_31_GAP; + position[2] = 0; + + /****************************** + * Create source-VDS mappings * + ******************************/ + for(i = 0; i < UC_1_N_SOURCES; i++) { + + if((src_sid = H5Screate_simple(RANK, UC_1_DIMS[i], + UC_1_MAX_DIMS[i])) < 0) + UC_ERROR + + /* set up hyperslabs for source and destination datasets */ + if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL, + UC_1_MAX_DIMS[i], NULL) < 0) + UC_ERROR + if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, position, + NULL, UC_1_MAX_DIMS[i], NULL) < 0) + UC_ERROR + position[1] += UC_1_DIMS[i][1] + UC_31_GAP; + + /* Add VDS mapping */ + if(H5Pset_virtual(vds_dcplid, vds_sid, UC_1_FILE_NAMES[i], + UC_1_SOURCE_DSET_PATH, src_sid) < 0) + UC_ERROR + if(H5Sclose(src_sid) < 0) + UC_ERROR + + } /* end for */ + + /******************************* + * Create VDS file and dataset * + *******************************/ + + /* file */ + if((fid = H5Fcreate(UC_31_VDS_FILE_NAME, H5F_ACC_TRUNC, + H5P_DEFAULT, H5P_DEFAULT)) < 0) + UC_ERROR + + /* dataset */ + if((did = H5Dcreate2(fid, UC_3_VDS_DSET_NAME, UC_31_VDS_DATATYPE, vds_sid, + H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0) + UC_ERROR + + /* close */ + if(H5Pclose(vds_dcplid) < 0) + UC_ERROR + if(H5Sclose(vds_sid) < 0) + UC_ERROR + if(H5Dclose(did) < 0) + UC_ERROR + if(H5Fclose(fid) < 0) + UC_ERROR + + return 0; + +error: + + H5E_BEGIN_TRY { + if(vds_sid >= 0) + (void)H5Sclose(vds_sid); + if(vds_dcplid >= 0) + (void)H5Pclose(vds_dcplid); + if(fid >= 0) + (void)H5Fclose(fid); + if(did >= 0) + (void)H5Dclose(did); + } H5E_END_TRY + + return -1; + +} /* end create_3_1_vds() */ + +/* Create the VDS that uses use case 2 files */ +herr_t +create_3_2_vds(void) +{ + hid_t src_sid = -1; /* source dataset's dataspace ID */ + hid_t vds_sid = -1; /* VDS dataspace ID */ + hid_t vds_dcplid = -1; /* VDS dataset property list ID */ + + hid_t fid = -1; /* HDF5 file ID */ + hid_t did = -1; /* dataset ID */ + + hsize_t start[RANK]; /* source starting point for hyperslab */ + + int i; /* iterator */ + + /* Create VDS dcpl */ + if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0) + UC_ERROR + if(H5Pset_fill_value(vds_dcplid, UC_32_VDS_DATATYPE, + &UC_3_VDS_FILL_VALUE) < 0) + UC_ERROR + + /* Create VDS dataspace */ + if((vds_sid = H5Screate_simple(RANK, UC_32_VDS_DIMS, + UC_32_VDS_MAX_DIMS)) < 0) + UC_ERROR + + /* Set starting positions */ + start[0] = 0; + start[1] = 0; + start[2] = 0; + + /****************************** + * Create source-VDS mappings * + ******************************/ + for(i = 0; i < UC_2_N_SOURCES; i++) { + + if((src_sid = H5Screate_simple(RANK, UC_2_DIMS[i], + UC_2_MAX_DIMS[i])) < 0) + UC_ERROR + + /* set up hyperslabs for source and destination datasets */ + if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL, + UC_2_MAX_DIMS[i], NULL) < 0) + UC_ERROR + if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, UC_32_POSITIONS[i], + NULL, UC_2_MAX_DIMS[i], NULL) < 0) + UC_ERROR + + /* Add VDS mapping */ + if(H5Pset_virtual(vds_dcplid, vds_sid, UC_2_FILE_NAMES[i], + UC_2_SOURCE_DSET_PATH, src_sid) < 0) + UC_ERROR + if(H5Sclose(src_sid) < 0) + UC_ERROR + + } /* end for */ + + /******************************* + * Create VDS file and dataset * + *******************************/ + + /* file */ + if((fid = H5Fcreate(UC_32_VDS_FILE_NAME, H5F_ACC_TRUNC, + H5P_DEFAULT, H5P_DEFAULT)) < 0) + UC_ERROR + + /* dataset */ + if((did = H5Dcreate2(fid, UC_3_VDS_DSET_NAME, UC_32_VDS_DATATYPE, vds_sid, + H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0) + UC_ERROR + + /* close */ + if(H5Pclose(vds_dcplid) < 0) + UC_ERROR + if(H5Sclose(vds_sid) < 0) + UC_ERROR + if(H5Dclose(did) < 0) + UC_ERROR + if(H5Fclose(fid) < 0) + UC_ERROR + + return 0; + +error: + + H5E_BEGIN_TRY { + if(vds_sid >= 0) + (void)H5Sclose(vds_sid); + if(vds_dcplid >= 0) + (void)H5Pclose(vds_dcplid); + if(fid >= 0) + (void)H5Fclose(fid); + if(did >= 0) + (void)H5Dclose(did); + } H5E_END_TRY + + return -1; + +} /* end create_3_2_vds() */ + +int +main(int argc, char *argv[]) +{ + + if(create_3_1_vds() < 0) + UC_ERROR + + if(create_3_2_vds() < 0) + UC_ERROR + + return EXIT_SUCCESS; + +error: + + return EXIT_FAILURE; + +} /* end main() */ + diff --git a/tools/misc/vds/UC_4.h b/tools/misc/vds/UC_4.h new file mode 100644 index 0000000..ce74e63 --- /dev/null +++ b/tools/misc/vds/UC_4.h @@ -0,0 +1,86 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef UC_4_H +#define UC_4_H + +#include "hdf5.h" + +#include "UC_common.h" + +/* + * Definitions for VDS use case 4 + * + * Source datasets have three fixed dimensions. In this use case, the + * datasets are mapped consecutively in the VDS along a single dimension with + * no gaps between them. Datasets are automatically loaded using a + * printf-like format string for the file name. + */ + +/* virtual dataset <---> source dataset mapping and sizes */ + +#define UC_4_N_SOURCES 3 + +/* Dataset dimensions */ +#define UC_4_SRC_PLANES 3 +#define UC_4_HEIGHT 4 +#define UC_4_WIDTH 4 + +/* max number of planes for VDS (sources are finite) */ +#define UC_4_VDS_MAX_PLANES H5S_UNLIMITED +#define UC_4_N_TEST_PLANES 9 /* number of planes in the VDS */ + +/* Dataset datatypes */ +#define UC_4_SOURCE_DATATYPE H5T_STD_I32LE +#define UC_4_VDS_DATATYPE H5T_STD_I32LE + +/* Starting size of datasets, both source and VDS */ +static hsize_t UC_4_SOURCE_DIMS[RANK] = {0, UC_4_HEIGHT, UC_4_WIDTH}; +static hsize_t UC_4_VDS_DIMS[RANK] = {0, UC_4_HEIGHT, UC_4_WIDTH}; + +/* Max size of datasets, both source and VDS */ +static hsize_t UC_4_SOURCE_MAX_DIMS[RANK] = {UC_4_SRC_PLANES, UC_4_HEIGHT, UC_4_WIDTH}; +static hsize_t UC_4_VDS_MAX_DIMS[RANK] = {UC_4_VDS_MAX_PLANES, UC_4_HEIGHT, UC_4_WIDTH}; + +/* Planes (both source and VDS) */ +static hsize_t UC_4_PLANE[RANK] = {1, UC_4_HEIGHT, UC_4_WIDTH}; + +/* File names for source datasets */ +static char UC_4_FILE_NAMES[UC_4_N_SOURCES][NAME_LEN] = { + {"4_0.h5"}, + {"4_1.h5"}, + {"4_2.h5"} +}; +static char UC_4_MAPPING_FILE_NAME[NAME_LEN] = "4_%b.h5"; + +/* VDS file name */ +static char UC_4_VDS_FILE_NAME[NAME_LEN] = "4_vds.h5"; + +/* Dataset names */ +static char UC_4_SOURCE_DSET_NAME[NAME_LEN] = "source_dset"; +static char UC_4_SOURCE_DSET_PATH[NAME_LEN] = "/source_dset"; +static char UC_4_VDS_DSET_NAME[NAME_LEN] = "vds_dset"; + +/* Fill values */ +static hsize_t UC_4_FILL_VALUES[UC_4_N_SOURCES] = { + -1, + -2, + -3 +}; +static int UC_4_VDS_FILL_VALUE = -9; + +#endif /* UC_4_H */ + + diff --git a/tools/misc/vds/UC_4_printf_gen.c b/tools/misc/vds/UC_4_printf_gen.c new file mode 100644 index 0000000..c8e111a --- /dev/null +++ b/tools/misc/vds/UC_4_printf_gen.c @@ -0,0 +1,219 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * File/dataset generator for VDS use case 4 + * + * See the header file for a description. + */ + +#include + +#include + +#include "UC_common.h" +#include "UC_4.h" + +int +main(int argc, char *argv[]) +{ + hid_t src_sid = -1; /* source dataset's dataspace ID */ + hid_t src_dcplid = -1; /* source dataset property list ID */ + + hid_t vds_sid = -1; /* VDS dataspace ID */ + hid_t vds_dcplid = -1; /* VDS dataset property list ID */ + + hid_t fid = -1; /* HDF5 file ID */ + hid_t did = -1; /* dataset ID */ + hid_t msid = -1; /* memory dataspace ID */ + hid_t fsid = -1; /* file dataspace ID */ + + /* Hyperslab arrays */ + hsize_t start[RANK] = {0, 0, 0}; + hsize_t count[RANK] = {H5S_UNLIMITED, 1, 1}; + + int *buffer = NULL; /* data buffer */ + int value = -1; /* value written to datasets */ + + hsize_t n = 0; /* number of elements in a plane */ + + int i; /* iterator */ + int j; /* iterator */ + int k; /* iterator */ + + /************************************ + * Create source files and datasets * + ************************************/ + + /* Create source dataspace ID */ + if((src_sid = H5Screate_simple(RANK, UC_4_SOURCE_DIMS, + UC_4_SOURCE_MAX_DIMS)) < 0) + UC_ERROR + if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL, + UC_4_SOURCE_MAX_DIMS, NULL) < 0) + UC_ERROR + + /* Create source files and datasets */ + for(i = 0; i < UC_4_N_SOURCES; i++) { + + /* source dataset dcpl */ + if((src_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0) + UC_ERROR + if(H5Pset_chunk(src_dcplid, RANK, UC_4_PLANE) < 0) + UC_ERROR + if(H5Pset_fill_value(src_dcplid, UC_4_SOURCE_DATATYPE, + &UC_4_FILL_VALUES[i]) < 0) + UC_ERROR + if(H5Pset_deflate(src_dcplid, COMPRESSION_LEVEL) < 0) + UC_ERROR + + /* Create source file and dataset */ + if((fid = H5Fcreate(UC_4_FILE_NAMES[i], H5F_ACC_TRUNC, + H5P_DEFAULT, H5P_DEFAULT)) < 0) + UC_ERROR + if((did = H5Dcreate2(fid, UC_4_SOURCE_DSET_NAME, + UC_4_SOURCE_DATATYPE, src_sid, + H5P_DEFAULT, src_dcplid, H5P_DEFAULT)) < 0) + UC_ERROR + + /* Set the dataset's extent */ + if(H5Dset_extent(did, UC_4_SOURCE_MAX_DIMS) < 0) + UC_ERROR + + /* Create a data buffer that represents a plane */ + n = UC_4_PLANE[1] * UC_4_PLANE[2]; + if(NULL == (buffer = (int *)malloc(n * sizeof(int)))) + UC_ERROR + + /* Create the memory dataspace */ + if((msid = H5Screate_simple(RANK, UC_4_PLANE, NULL)) < 0) + UC_ERROR + + /* Get the file dataspace */ + if((fsid = H5Dget_space(did)) < 0) + UC_ERROR + + /* Write planes to the dataset */ + for(j = 0; j < UC_4_SRC_PLANES; j++) { + + value = ((i + 1) * 10) + j; + for(k = 0; k < n; k++) + buffer[k] = value; + + start[0] = j; + start[1] = 0; + start[2] = 0; + if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_4_PLANE, NULL) < 0) + UC_ERROR + if(H5Dwrite(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, buffer) < 0) + UC_ERROR + + } /* end for */ + + /* close */ + if(H5Sclose(msid) < 0) + UC_ERROR + if(H5Sclose(fsid) < 0) + UC_ERROR + if(H5Pclose(src_dcplid) < 0) + UC_ERROR + if(H5Dclose(did) < 0) + UC_ERROR + if(H5Fclose(fid) < 0) + UC_ERROR + free(buffer); + + } /* end for */ + + /******************* + * Create VDS file * + *******************/ + + /* Create file */ + if((fid = H5Fcreate(UC_4_VDS_FILE_NAME, H5F_ACC_TRUNC, + H5P_DEFAULT, H5P_DEFAULT)) < 0) + UC_ERROR + + /* Create VDS dcpl */ + if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0) + UC_ERROR + if(H5Pset_fill_value(vds_dcplid, UC_4_VDS_DATATYPE, + &UC_4_VDS_FILL_VALUE) < 0) + UC_ERROR + + /* Create VDS dataspace */ + if((vds_sid = H5Screate_simple(RANK, UC_4_VDS_DIMS, + UC_4_VDS_MAX_DIMS)) < 0) + UC_ERROR + start[0] = 0; + start[1] = 0; + start[2] = 0; + if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, start, + UC_4_SOURCE_MAX_DIMS, count, UC_4_SOURCE_MAX_DIMS) < 0) + UC_ERROR + + /* Add VDS mapping - The mapped file name uses a printf-like + * naming scheme that automatically maps new files. + */ + if(H5Pset_virtual(vds_dcplid, vds_sid, UC_4_MAPPING_FILE_NAME, + UC_4_SOURCE_DSET_PATH, src_sid) < 0) + UC_ERROR + + /* Create dataset */ + if((did = H5Dcreate2(fid, UC_4_VDS_DSET_NAME, UC_4_VDS_DATATYPE, vds_sid, + H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0) + UC_ERROR + + /* close */ + if(H5Sclose(src_sid) < 0) + UC_ERROR + if(H5Pclose(vds_dcplid) < 0) + UC_ERROR + if(H5Sclose(vds_sid) < 0) + UC_ERROR + if(H5Dclose(did) < 0) + UC_ERROR + if(H5Fclose(fid) < 0) + UC_ERROR + + return EXIT_SUCCESS; + +error: + + H5E_BEGIN_TRY { + if(src_sid >= 0) + (void)H5Sclose(src_sid); + if(src_dcplid >= 0) + (void)H5Pclose(src_dcplid); + if(vds_sid >= 0) + (void)H5Sclose(vds_sid); + if(vds_dcplid >= 0) + (void)H5Pclose(vds_dcplid); + if(fid >= 0) + (void)H5Fclose(fid); + if(did >= 0) + (void)H5Dclose(did); + if(msid >= 0) + (void)H5Sclose(msid); + if(fsid >= 0) + (void)H5Sclose(fsid); + if(buffer != NULL) + free(buffer); + } H5E_END_TRY + + return EXIT_FAILURE; + +} /* end main() */ + diff --git a/tools/misc/vds/UC_5.h b/tools/misc/vds/UC_5.h new file mode 100644 index 0000000..b22b177 --- /dev/null +++ b/tools/misc/vds/UC_5.h @@ -0,0 +1,83 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef UC_5_H +#define UC_5_H + +#include + +#include "UC_common.h" + +/* + * Definitions for VDS use case 5 + * + * Source datasets have one unlimited dimension and two fixed dimensions. In + * this use case, the datasets are mapped in the VDS so that alternating + * planes in the source are interleaved in the VDS. + */ + +/* virtual dataset <---> source dataset mapping and sizes */ + +#define UC_5_N_SOURCES 3 + +/* Dataset dimensions */ +#define UC_5_SRC_PLANES 3 +#define UC_5_HEIGHT 4 +#define UC_5_WIDTH 4 + +/* max number of planes for datasets */ +#define UC_5_MAX_PLANES H5S_UNLIMITED +#define UC_5_N_TEST_PLANES 9 /* number of planes in VDS */ + +/* Dataset datatypes */ +#define UC_5_SOURCE_DATATYPE H5T_STD_I32LE +#define UC_5_VDS_DATATYPE H5T_STD_I32LE + +/* Starting size of datasets, both source and VDS */ +static hsize_t UC_5_SOURCE_DIMS[RANK] = {0, UC_5_HEIGHT, UC_5_WIDTH}; +static hsize_t UC_5_VDS_DIMS[RANK] = {0, UC_5_HEIGHT, UC_5_WIDTH}; + +/* Max size of datasets, both source and VDS */ +static hsize_t UC_5_SOURCE_MAX_DIMS[RANK] = {UC_5_MAX_PLANES, UC_5_HEIGHT, UC_5_WIDTH}; +static hsize_t UC_5_VDS_MAX_DIMS[RANK] = {UC_5_MAX_PLANES, UC_5_HEIGHT, UC_5_WIDTH}; + +/* Planes (both source and VDS) */ +static hsize_t UC_5_PLANE[RANK] = {1, UC_5_HEIGHT, UC_5_WIDTH}; + +/* File names for source datasets */ +static char UC_5_FILE_NAMES[UC_5_N_SOURCES][NAME_LEN] = { + {"5_a.h5"}, + {"5_b.h5"}, + {"5_c.h5"} +}; + +/* VDS file name */ +static char UC_5_VDS_FILE_NAME[NAME_LEN] = "5_vds.h5"; + +/* Dataset names */ +static char UC_5_SOURCE_DSET_NAME[NAME_LEN] = "source_dset"; +static char UC_5_SOURCE_DSET_PATH[NAME_LEN] = "/source_dset"; +static char UC_5_VDS_DSET_NAME[NAME_LEN] = "vds_dset"; + +/* Fill values */ +static hsize_t UC_5_FILL_VALUES[UC_5_N_SOURCES] = { + -1, + -2, + -3 +}; +static int UC_5_VDS_FILL_VALUE = -9; + +#endif /* UC_5_H */ + diff --git a/tools/misc/vds/UC_5_stride_gen.c b/tools/misc/vds/UC_5_stride_gen.c new file mode 100644 index 0000000..984aadc --- /dev/null +++ b/tools/misc/vds/UC_5_stride_gen.c @@ -0,0 +1,243 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * File/dataset generator for VDS use case 5 + * + * See the header file for a description. + */ + +#include + +#include + +#include "UC_common.h" +#include "UC_5.h" + +int +main(int argc, char *argv[]) +{ + hid_t src_sid = -1; /* source dataset's dataspace ID */ + hid_t src_dcplid = -1; /* source dataset property list ID */ + + hid_t vds_sid = -1; /* VDS dataspace ID */ + hid_t vds_dcplid = -1; /* VDS dataset property list ID */ + + hid_t fid = -1; /* HDF5 file ID */ + hid_t did = -1; /* dataset ID */ + hid_t msid = -1; /* memory dataspace ID */ + hid_t fsid = -1; /* file dataspace ID */ + + hsize_t extent[RANK]; /* source dataset extents */ + hsize_t start[RANK]; /* starting point for hyperslab */ + hsize_t stride[RANK]; /* hypserslab stride */ + hsize_t count[RANK]; /* hypserslab count */ + int map_start = -1; /* starting point in the VDS map */ + + int *buffer = NULL; /* data buffer */ + int value = -1; /* value written to datasets */ + + hsize_t n = 0; /* number of elements in a plane */ + + int i; /* iterator */ + int j; /* iterator */ + int k; /* iterator */ + + /* Start by creating the virtual dataset (VDS) dataspace and creation + * property list. The individual source datasets are then created + * and the VDS map (stored in the VDS property list) is updated. + */ + + /* Create VDS dcpl */ + if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0) + UC_ERROR + if(H5Pset_fill_value(vds_dcplid, UC_5_VDS_DATATYPE, + &UC_5_VDS_FILL_VALUE) < 0) + UC_ERROR + + /* Create VDS dataspace */ + if((vds_sid = H5Screate_simple(RANK, UC_5_VDS_DIMS, + UC_5_VDS_MAX_DIMS)) < 0) + UC_ERROR + + /********************************* + * Map source files and datasets * + *********************************/ + + /* Hyperslab array setup */ + start[0] = 0; + start[1] = 0; + start[2] = 0; + map_start = 0; + + stride[0] = UC_5_N_SOURCES; + stride[1] = 1; + stride[2] = 1; + + count[0] = H5S_UNLIMITED; + count[1] = 1; + count[2] = 1; + + extent[0] = UC_5_SRC_PLANES; + extent[1] = UC_5_HEIGHT; + extent[2] = UC_5_WIDTH; + + for(i = 0; i < UC_5_N_SOURCES; i++) { + + /* source dataset dcpl */ + if((src_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0) + UC_ERROR + if(H5Pset_chunk(src_dcplid, RANK, UC_5_PLANE) < 0) + UC_ERROR + if(H5Pset_fill_value(src_dcplid, UC_5_SOURCE_DATATYPE, + &UC_5_FILL_VALUES[i]) < 0) + UC_ERROR + if(H5Pset_deflate(src_dcplid, COMPRESSION_LEVEL) < 0) + UC_ERROR + + /* Create source file, dataspace, and dataset */ + if((fid = H5Fcreate(UC_5_FILE_NAMES[i], H5F_ACC_TRUNC, + H5P_DEFAULT, H5P_DEFAULT)) < 0) + UC_ERROR + if((src_sid = H5Screate_simple(RANK, UC_5_SOURCE_DIMS, + UC_5_SOURCE_MAX_DIMS)) < 0) + UC_ERROR + if((did = H5Dcreate2(fid, UC_5_SOURCE_DSET_NAME, + UC_5_SOURCE_DATATYPE, src_sid, + H5P_DEFAULT, src_dcplid, H5P_DEFAULT)) < 0) + UC_ERROR + + /* Set the dataset's extent */ + if(H5Dset_extent(did, extent) < 0) + UC_ERROR + + /* Create a data buffer that represents a plane */ + n = UC_5_PLANE[1] * UC_5_PLANE[2]; + if(NULL == (buffer = (int *)malloc(n * sizeof(int)))) + UC_ERROR + + /* Create the memory dataspace */ + if((msid = H5Screate_simple(RANK, UC_5_PLANE, NULL)) < 0) + UC_ERROR + + /* Get the file dataspace */ + if((fsid = H5Dget_space(did)) < 0) + UC_ERROR + + /* Write planes to the dataset */ + for(j = 0; j < UC_5_SRC_PLANES; j++) { + + value = ((i + 1) * 10) + j; + for(k = 0; k < n; k++) + buffer[k] = value; + + start[0] = j; + start[1] = 0; + start[2] = 0; + if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_5_PLANE, NULL) < 0) + UC_ERROR + if(H5Dwrite(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, buffer) < 0) + UC_ERROR + + } /* end for */ + + /* set up hyperslabs for source and destination datasets */ + start[0] = 0; + start[1] = 0; + start[2] = 0; + if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL, + UC_5_SOURCE_MAX_DIMS, NULL) < 0) + UC_ERROR + start[0] = map_start; + if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, start, stride, + count, UC_5_PLANE) < 0) + UC_ERROR + map_start += 1; + + /* Add VDS mapping */ + if(H5Pset_virtual(vds_dcplid, vds_sid, UC_5_FILE_NAMES[i], + UC_5_SOURCE_DSET_PATH, src_sid) < 0) + UC_ERROR + + /* close */ + if(H5Sclose(msid) < 0) + UC_ERROR + if(H5Sclose(fsid) < 0) + UC_ERROR + if(H5Sclose(src_sid) < 0) + UC_ERROR + if(H5Pclose(src_dcplid) < 0) + UC_ERROR + if(H5Dclose(did) < 0) + UC_ERROR + if(H5Fclose(fid) < 0) + UC_ERROR + free(buffer); + + } /* end for */ + + /******************* + * Create VDS file * + *******************/ + + /* file */ + if((fid = H5Fcreate(UC_5_VDS_FILE_NAME, H5F_ACC_TRUNC, + H5P_DEFAULT, H5P_DEFAULT)) < 0) + UC_ERROR + + /* dataset */ + if((did = H5Dcreate2(fid, UC_5_VDS_DSET_NAME, UC_5_VDS_DATATYPE, vds_sid, + H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0) + UC_ERROR + + /* close */ + if(H5Pclose(vds_dcplid) < 0) + UC_ERROR + if(H5Sclose(vds_sid) < 0) + UC_ERROR + if(H5Dclose(did) < 0) + UC_ERROR + if(H5Fclose(fid) < 0) + UC_ERROR + + return EXIT_SUCCESS; + +error: + + H5E_BEGIN_TRY { + if(src_sid >= 0) + (void)H5Sclose(src_sid); + if(src_dcplid >= 0) + (void)H5Pclose(src_dcplid); + if(vds_sid >= 0) + (void)H5Sclose(vds_sid); + if(vds_dcplid >= 0) + (void)H5Pclose(vds_dcplid); + if(fid >= 0) + (void)H5Fclose(fid); + if(did >= 0) + (void)H5Dclose(did); + if(msid >= 0) + (void)H5Sclose(msid); + if(fsid >= 0) + (void)H5Sclose(fsid); + if(buffer != NULL) + free(buffer); + } H5E_END_TRY + + return EXIT_FAILURE; + +} /* end main() */ + diff --git a/tools/misc/vds/UC_common.h b/tools/misc/vds/UC_common.h new file mode 100644 index 0000000..0e61016 --- /dev/null +++ b/tools/misc/vds/UC_common.h @@ -0,0 +1,41 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef USE_CASE_COMMON_H +#define USE_CASE_COMMON_H + +/****************************************** + * Symbols used across multiple use cases * + ******************************************/ + +/* All datasets are 3D */ +#define RANK 3 + +/* Lengths of string identifiers (file, dataset names, etc.) */ +#define NAME_LEN 32 + +/* Compression level */ +#define COMPRESSION_LEVEL 7 + +/* Booleans */ +#define TRUE 1 +#define FALSE 0 + +/* Testing macros */ +#define AT() printf (" at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); +#define UC_ERROR {puts("*ERROR*"); fflush(stdout); AT(); goto error;} + +#endif /* USE_CASE_COMMON_H */ + diff --git a/tools/misc/vds_gentest.c b/tools/misc/vds_gentest.c deleted file mode 100644 index cd62724..0000000 --- a/tools/misc/vds_gentest.c +++ /dev/null @@ -1,23 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#include - -int -main(int argc, char *argv[]) -{ - return EXIT_SUCCESS; -} /* end main */ - -- cgit v0.12 From 6c81df0a2709669bbda057a4004f8a06c23e1991 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 8 Jun 2015 04:56:49 -0500 Subject: [svn-r27161] Added makefiles to tools/misc/vds to build the generators. Tested on: jam --- configure | 3 +- configure.ac | 1 + tools/misc/Makefile.am | 4 +- tools/misc/Makefile.in | 210 +++++-- tools/misc/vds/Makefile.am | 38 ++ tools/misc/vds/Makefile.in | 1404 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1602 insertions(+), 58 deletions(-) create mode 100644 tools/misc/vds/Makefile.am create mode 100644 tools/misc/vds/Makefile.in diff --git a/configure b/configure index b1da8b3..5a9ab40 100755 --- a/configure +++ b/configure @@ -30091,7 +30091,7 @@ else fi -ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" +ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/misc/vds/Makefile tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" cat >confcache <<\_ACEOF @@ -31389,6 +31389,7 @@ do "tools/misc/h5cc") CONFIG_FILES="$CONFIG_FILES tools/misc/h5cc" ;; "tools/misc/testh5mkgrp.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5mkgrp.sh" ;; "tools/misc/testh5repart.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5repart.sh" ;; + "tools/misc/vds/Makefile") CONFIG_FILES="$CONFIG_FILES tools/misc/vds/Makefile" ;; "tools/h5stat/testh5stat.sh") CONFIG_FILES="$CONFIG_FILES tools/h5stat/testh5stat.sh" ;; "tools/h5stat/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5stat/Makefile" ;; "tools/perform/Makefile") CONFIG_FILES="$CONFIG_FILES tools/perform/Makefile" ;; diff --git a/configure.ac b/configure.ac index 922da9f..75f88d1 100644 --- a/configure.ac +++ b/configure.ac @@ -2850,6 +2850,7 @@ AC_CONFIG_FILES([src/libhdf5.settings tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh + tools/misc/vds/Makefile tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile diff --git a/tools/misc/Makefile.am b/tools/misc/Makefile.am index 7573204..fdfe8f7 100644 --- a/tools/misc/Makefile.am +++ b/tools/misc/Makefile.am @@ -20,11 +20,13 @@ include $(top_srcdir)/config/commence.am +SUBDIRS=vds + # Include src directory AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib #test scripts and programs -TEST_PROG=h5repart_gentest talign vds_gentest +TEST_PROG=h5repart_gentest talign TEST_SCRIPT=testh5repart.sh testh5mkgrp.sh check_PROGRAMS=$(TEST_PROG) repart_test diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index d579e24..8617a7d 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -116,8 +116,7 @@ CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = h5cc testh5mkgrp.sh testh5repart.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" -am__EXEEXT_1 = h5repart_gentest$(EXEEXT) talign$(EXEEXT) \ - vds_gentest$(EXEEXT) +am__EXEEXT_1 = h5repart_gentest$(EXEEXT) talign$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) h5debug_SOURCES = h5debug.c h5debug_OBJECTS = h5debug.$(OBJEXT) @@ -156,10 +155,6 @@ talign_SOURCES = talign.c talign_OBJECTS = talign.$(OBJEXT) talign_LDADD = $(LDADD) talign_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -vds_gentest_SOURCES = vds_gentest.c -vds_gentest_OBJECTS = vds_gentest.$(OBJEXT) -vds_gentest_LDADD = $(LDADD) -vds_gentest_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -223,14 +218,30 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = h5debug.c h5mkgrp.c h5repart.c h5repart_gentest.c \ - repart_test.c talign.c vds_gentest.c + repart_test.c talign.c DIST_SOURCES = h5debug.c h5mkgrp.c h5repart.c h5repart_gentest.c \ - repart_test.c talign.c vds_gentest.c + repart_test.c talign.c +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + check recheck distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -406,7 +417,6 @@ am__set_TESTS_bases = \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) @@ -425,7 +435,33 @@ am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.sh.log=.log) SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS) +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@ AMTAR = @AMTAR@ @@ -699,9 +735,10 @@ TRACE = perl $(top_srcdir)/bin/trace # and scd_family*.h5 were created by setting the HDF5_NOCLEANUP variable. CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 \ ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5 +SUBDIRS = vds #test scripts and programs -TEST_PROG = h5repart_gentest talign vds_gentest +TEST_PROG = h5repart_gentest talign TEST_SCRIPT = testh5repart.sh testh5mkgrp.sh check_SCRIPTS = $(TEST_SCRIPT) SCRIPT_DEPEND = h5repart$(EXEEXT) h5mkgrp$(EXEEXT) @@ -745,7 +782,7 @@ TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_) TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_) TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_) TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) -all: all-am +all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs @@ -868,10 +905,6 @@ repart_test$(EXEEXT): $(repart_test_OBJECTS) $(repart_test_DEPENDENCIES) $(EXTRA talign$(EXEEXT): $(talign_OBJECTS) $(talign_DEPENDENCIES) $(EXTRA_talign_DEPENDENCIES) @rm -f talign$(EXEEXT) $(AM_V_CCLD)$(LINK) $(talign_OBJECTS) $(talign_LDADD) $(LIBS) - -vds_gentest$(EXEEXT): $(vds_gentest_OBJECTS) $(vds_gentest_DEPENDENCIES) $(EXTRA_vds_gentest_DEPENDENCIES) - @rm -f vds_gentest$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(vds_gentest_OBJECTS) $(vds_gentest_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ @@ -920,7 +953,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repart_gentest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/repart_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/talign.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vds_gentest.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -949,14 +981,61 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am +tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ @@ -969,7 +1048,7 @@ tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $$unique; \ fi; \ fi -ctags: ctags-am +ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) @@ -982,7 +1061,7 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am +cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ @@ -1145,13 +1224,6 @@ talign.log: talign$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -vds_gentest.log: vds_gentest$(EXEEXT) - @p='vds_gentest$(EXEEXT)'; \ - b='vds_gentest'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) .sh.log: @p='$<'; \ $(am__set_b); \ @@ -1197,24 +1269,50 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am +check: check-recursive all-am: Makefile $(PROGRAMS) $(SCRIPTS) all-local -installdirs: +installdirs: installdirs-recursive +installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ @@ -1241,85 +1339,85 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ clean-libtool mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: install-data-am: -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-binSCRIPTS \ install-exec-local -install-html: install-html-am +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-local -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-local -.MAKE: check-am install-am install-strip +.MAKE: $(am__recursive_targets) check-am install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ - check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ - clean-generic clean-libtool cscopelist-am ctags ctags-am \ - distclean distclean-compile distclean-generic \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ + check check-TESTS check-am clean clean-binPROGRAMS \ + clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-binSCRIPTS install-data install-data-am install-dvi \ @@ -1327,10 +1425,10 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ + pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-local diff --git a/tools/misc/vds/Makefile.am b/tools/misc/vds/Makefile.am new file mode 100644 index 0000000..f1ef80c --- /dev/null +++ b/tools/misc/vds/Makefile.am @@ -0,0 +1,38 @@ +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from help@hdfgroup.org. +## +## Makefile.am +## Run automake to generate a Makefile.in from this file. +# +# HDF5 Library Makefile(.in) +# + +include $(top_srcdir)/config/commence.am + +# Include src directory +AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib + +#test scripts and programs +TEST_PROG=UC_1_one_dim_gen UC_2_two_dims_gen UC_3_gaps_gen UC_4_printf_gen \ + UC_5_stride_gen + +check_PROGRAMS=$(TEST_PROG) + +# Temporary files. +CHECK_CLEANFILES+=*.h5 + +# All programs rely on hdf5 library and h5tools library +LDADD=$(LIBH5TOOLS) $(LIBHDF5) + +include $(top_srcdir)/config/conclude.am diff --git a/tools/misc/vds/Makefile.in b/tools/misc/vds/Makefile.in new file mode 100644 index 0000000..e9c73ad --- /dev/null +++ b/tools/misc/vds/Makefile.in @@ -0,0 +1,1404 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from help@hdfgroup.org. +# +# HDF5 Library Makefile(.in) +# +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(top_srcdir)/config/commence.am \ + $(top_srcdir)/config/conclude.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/bin/mkinstalldirs \ + $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/test-driver +check_PROGRAMS = $(am__EXEEXT_1) +TESTS = $(am__EXEEXT_1) +subdir = tools/misc/vds +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__EXEEXT_1 = UC_1_one_dim_gen$(EXEEXT) UC_2_two_dims_gen$(EXEEXT) \ + UC_3_gaps_gen$(EXEEXT) UC_4_printf_gen$(EXEEXT) \ + UC_5_stride_gen$(EXEEXT) +UC_1_one_dim_gen_SOURCES = UC_1_one_dim_gen.c +UC_1_one_dim_gen_OBJECTS = UC_1_one_dim_gen.$(OBJEXT) +UC_1_one_dim_gen_LDADD = $(LDADD) +UC_1_one_dim_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +UC_2_two_dims_gen_SOURCES = UC_2_two_dims_gen.c +UC_2_two_dims_gen_OBJECTS = UC_2_two_dims_gen.$(OBJEXT) +UC_2_two_dims_gen_LDADD = $(LDADD) +UC_2_two_dims_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) +UC_3_gaps_gen_SOURCES = UC_3_gaps_gen.c +UC_3_gaps_gen_OBJECTS = UC_3_gaps_gen.$(OBJEXT) +UC_3_gaps_gen_LDADD = $(LDADD) +UC_3_gaps_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) +UC_4_printf_gen_SOURCES = UC_4_printf_gen.c +UC_4_printf_gen_OBJECTS = UC_4_printf_gen.$(OBJEXT) +UC_4_printf_gen_LDADD = $(LDADD) +UC_4_printf_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) +UC_5_stride_gen_SOURCES = UC_5_stride_gen.c +UC_5_stride_gen_OBJECTS = UC_5_stride_gen.$(OBJEXT) +UC_5_stride_gen_LDADD = $(LDADD) +UC_5_stride_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +depcomp = $(SHELL) $(top_srcdir)/bin/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = UC_1_one_dim_gen.c UC_2_two_dims_gen.c UC_3_gaps_gen.c \ + UC_4_printf_gen.c UC_5_stride_gen.c +DIST_SOURCES = UC_1_one_dim_gen.c UC_2_two_dims_gen.c UC_3_gaps_gen.c \ + UC_4_printf_gen.c UC_5_stride_gen.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.sh.log=.log) +SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver +SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@ +AMTAR = @AMTAR@ + +# H5_CFLAGS holds flags that should be used when building hdf5, +# but which should not be exported to h5cc for building other programs. +# AM_CFLAGS is an automake construct which should be used by Makefiles +# instead of CFLAGS, as CFLAGS is reserved solely for the user to define. +# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. +AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ + +# Include src directory +AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \ + -I$(top_srcdir)/tools/lib +AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ +AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BYTESEX = @BYTESEX@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_VERSION = @CC_VERSION@ +CFLAGS = @CFLAGS@ +CLEARFILEBUF = @CLEARFILEBUF@ +CODESTACK = @CODESTACK@ +CONFIG_DATE = @CONFIG_DATE@ +CONFIG_MODE = @CONFIG_MODE@ +CONFIG_USER = @CONFIG_USER@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXX_VERSION = @CXX_VERSION@ +CYGPATH_W = @CYGPATH_W@ +DEBUG_PKG = @DEBUG_PKG@ +DEFAULT_API_VERSION = @DEFAULT_API_VERSION@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ +DIRECT_VFD = @DIRECT_VFD@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXTERNAL_FILTERS = @EXTERNAL_FILTERS@ + +# Make sure that these variables are exported to the Makefiles +F9XMODEXT = @F9XMODEXT@ +F9XMODFLAG = @F9XMODFLAG@ +F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ +FC = @FC@ +FC2003 = @FC2003@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_f90 = @FCFLAGS_f90@ +FCLIBS = @FCLIBS@ +FC_VERSION = @FC_VERSION@ +FGREP = @FGREP@ +FSEARCH_DIRS = @FSEARCH_DIRS@ +GREP = @GREP@ +H5_CFLAGS = @H5_CFLAGS@ +H5_CPPFLAGS = @H5_CPPFLAGS@ +H5_CXXFLAGS = @H5_CXXFLAGS@ +H5_FCFLAGS = @H5_FCFLAGS@ +H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ +H5_LDFLAGS = @H5_LDFLAGS@ +H5_VERSION = @H5_VERSION@ +HADDR_T = @HADDR_T@ +HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_PTHREAD = @HAVE_PTHREAD@ +HDF5_HL = @HDF5_HL@ +HDF5_INTERFACES = @HDF5_INTERFACES@ +HDF_CXX = @HDF_CXX@ +HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ +HID_T = @HID_T@ +HL = @HL@ +HL_FOR = @HL_FOR@ +HSIZE_T = @HSIZE_T@ +HSSIZE_T = @HSSIZE_T@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTRUMENT = @INSTRUMENT@ +INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LL_PATH = @LL_PATH@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_STATIC_EXEC = @LT_STATIC_EXEC@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MPE = @MPE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PARALLEL = @PARALLEL@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +ROOT = @ROOT@ +RUNPARALLEL = @RUNPARALLEL@ +RUNSERIAL = @RUNSERIAL@ +R_INTEGER = @R_INTEGER@ +R_LARGE = @R_LARGE@ +SEARCH = @SEARCH@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIZE_T = @SIZE_T@ +STATIC_EXEC = @STATIC_EXEC@ +STATIC_SHARED = @STATIC_SHARED@ +STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@ +STRIP = @STRIP@ +TESTPARALLEL = @TESTPARALLEL@ +THREADSAFE = @THREADSAFE@ +TIME = @TIME@ +TR = @TR@ +TRACE_API = @TRACE_API@ +UNAME_INFO = @UNAME_INFO@ +USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ +USE_FILTER_SZIP = @USE_FILTER_SZIP@ +USINGMEMCHECKER = @USINGMEMCHECKER@ +VERSION = @VERSION@ +WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ + +# Install directories that automake doesn't know about +docdir = $(exec_prefix)/doc +dvidir = @dvidir@ +enable_shared = @enable_shared@ +enable_static = @enable_static@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Shell commands used in Makefiles +RM = rm -f +CP = cp + +# Some machines need a command to run executables; this is that command +# so that our tests will run. +# We use RUNEXEC instead of RUNSERIAL directly because it may be that +# some tests need to be run with a different command. Older versions +# of the makefiles used the command +# $(LIBTOOL) --mode=execute +# in some directories, for instance. +RUNEXEC = $(RUNSERIAL) + +# Libraries to link to while building +LIBHDF5 = $(top_builddir)/src/libhdf5.la +LIBH5TEST = $(top_builddir)/test/libh5test.la +LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la +LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la +LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la +LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la +LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la +LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la +LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la + +# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below +# has been removed. According to the official description of DESTDIR by Gnu at +# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is +# prepended to the normal and complete install path that it precedes for the +# purpose of installing in a temporary directory which is useful for building +# rpms and other packages. The '/' after ${DESTDIR} will be followed by another +# '/' at the beginning of the normal install path. When DESTDIR is empty the +# path then begins with '//', which is incorrect and causes problems at least for +# Cygwin. + +# Scripts used to build examples +# If only shared libraries have been installed, have h5cc build examples with +# shared libraries instead of static libraries +H5CC = ${DESTDIR}$(bindir)/h5cc +H5CC_PP = ${DESTDIR}$(bindir)/h5pcc +H5FC = ${DESTDIR}$(bindir)/h5fc +H5FC_PP = ${DESTDIR}$(bindir)/h5pfc +H5CPP = ${DESTDIR}$(bindir)/h5c++ +ACLOCAL_AMFLAGS = "-I m4" + +# The trace script; this is used on source files from the C library to +# insert tracing macros. +TRACE = perl $(top_srcdir)/bin/trace + +# .chkexe files are used to mark tests that have run successfully. +# .chklog files are output from those tests. +# *.clog and *.clog2 are from the MPE option. + +# Temporary files. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 + +#test scripts and programs +TEST_PROG = UC_1_one_dim_gen UC_2_two_dims_gen UC_3_gaps_gen UC_4_printf_gen \ + UC_5_stride_gen + + +# All programs rely on hdf5 library and h5tools library +LDADD = $(LIBH5TOOLS) $(LIBHDF5) + +# Automake needs to be taught how to build lib, progs, and tests targets. +# These will be filled in automatically for the most part (e.g., +# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and +# EXTRA_TEST variables are supplied to allow the user to force targets to +# be built at certain times. +LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ + $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) + +PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ + $(EXTRA_PROG) + +chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) +TEST_EXTENSIONS = .sh +SH_LOG_COMPILER = $(SHELL) +AM_SH_LOG_FLAGS = +TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_) +TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_) +TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_) +TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/misc/vds/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tools/misc/vds/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +UC_1_one_dim_gen$(EXEEXT): $(UC_1_one_dim_gen_OBJECTS) $(UC_1_one_dim_gen_DEPENDENCIES) $(EXTRA_UC_1_one_dim_gen_DEPENDENCIES) + @rm -f UC_1_one_dim_gen$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(UC_1_one_dim_gen_OBJECTS) $(UC_1_one_dim_gen_LDADD) $(LIBS) + +UC_2_two_dims_gen$(EXEEXT): $(UC_2_two_dims_gen_OBJECTS) $(UC_2_two_dims_gen_DEPENDENCIES) $(EXTRA_UC_2_two_dims_gen_DEPENDENCIES) + @rm -f UC_2_two_dims_gen$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(UC_2_two_dims_gen_OBJECTS) $(UC_2_two_dims_gen_LDADD) $(LIBS) + +UC_3_gaps_gen$(EXEEXT): $(UC_3_gaps_gen_OBJECTS) $(UC_3_gaps_gen_DEPENDENCIES) $(EXTRA_UC_3_gaps_gen_DEPENDENCIES) + @rm -f UC_3_gaps_gen$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(UC_3_gaps_gen_OBJECTS) $(UC_3_gaps_gen_LDADD) $(LIBS) + +UC_4_printf_gen$(EXEEXT): $(UC_4_printf_gen_OBJECTS) $(UC_4_printf_gen_DEPENDENCIES) $(EXTRA_UC_4_printf_gen_DEPENDENCIES) + @rm -f UC_4_printf_gen$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(UC_4_printf_gen_OBJECTS) $(UC_4_printf_gen_LDADD) $(LIBS) + +UC_5_stride_gen$(EXEEXT): $(UC_5_stride_gen_OBJECTS) $(UC_5_stride_gen_DEPENDENCIES) $(EXTRA_UC_5_stride_gen_DEPENDENCIES) + @rm -f UC_5_stride_gen$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(UC_5_stride_gen_OBJECTS) $(UC_5_stride_gen_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_1_one_dim_gen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_2_two_dims_gen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_3_gaps_gen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_4_printf_gen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_5_stride_gen.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +UC_1_one_dim_gen.log: UC_1_one_dim_gen$(EXEEXT) + @p='UC_1_one_dim_gen$(EXEEXT)'; \ + b='UC_1_one_dim_gen'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +UC_2_two_dims_gen.log: UC_2_two_dims_gen$(EXEEXT) + @p='UC_2_two_dims_gen$(EXEEXT)'; \ + b='UC_2_two_dims_gen'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +UC_3_gaps_gen.log: UC_3_gaps_gen$(EXEEXT) + @p='UC_3_gaps_gen$(EXEEXT)'; \ + b='UC_3_gaps_gen'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +UC_4_printf_gen.log: UC_4_printf_gen$(EXEEXT) + @p='UC_4_printf_gen$(EXEEXT)'; \ + b='UC_4_printf_gen'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +UC_5_stride_gen.log: UC_5_stride_gen$(EXEEXT) + @p='UC_5_stride_gen$(EXEEXT)'; \ + b='UC_5_stride_gen'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.sh.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.sh$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile all-local +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool mostlyclean-local + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ + pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am + + +# List all build rules defined by HDF5 Makefiles as "PHONY" targets here. +# This tells the Makefiles that these targets are not files to be built but +# commands that should be executed even if a file with the same name already +# exists. +.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \ + build-tests check-clean check-install check-p check-s check-vfd \ + install-doc lib progs tests uninstall-doc _exec_check-s _test help + +help: + @$(top_srcdir)/bin/makehelp + +# lib/progs/tests targets recurse into subdirectories. build-* targets +# build files in this directory. +build-lib: $(LIB) +build-progs: $(LIB) $(PROGS) +build-tests: $(LIB) $(PROGS) $(chk_TESTS) + +# General rule for recursive building targets. +# BUILT_SOURCES contain targets that need to be built before anything else +# in the directory (e.g., for Fortran type detection) +lib progs tests check-s check-p :: $(BUILT_SOURCES) + @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; + @for d in X $(SUBDIRS); do \ + if test $$d != X && test $$d != .; then \ + (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ + fi; \ + done + +# General rule for recursive cleaning targets. Like the rule above, +# but doesn't require building BUILT_SOURCES. +check-clean :: + @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; + @for d in X $(SUBDIRS); do \ + if test $$d != X && test $$d != .; then \ + (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ + fi; \ + done + +# Tell Automake to build tests when the user types `make all' (this is +# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since +# Automake won't build them automatically, either. +all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS) + +# make install-doc doesn't do anything outside of doc directory, but +# Makefiles should recognize it. +# UPDATE: docs no longer reside in this build tree, so this target +# is depreciated. +install-doc uninstall-doc: + @echo "Nothing to be done." + +# clean up files generated by tests so they can be re-run. +build-check-clean: + $(RM) -rf $(CHECK_CLEANFILES) + +# run check-clean whenever mostlyclean is run +mostlyclean-local: build-check-clean + +# check-install is just a synonym for installcheck +check-install: installcheck + +# Run each test in order, passing $(TEST_FLAGS) to the program. +# Since tests are done in a shell loop, "make -i" does apply inside it. +# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop. +# The timestamps give a rough idea how much time the tests use. +# +# Note that targets in chk_TESTS (defined above) will be built when the user +# types 'make tests' or 'make check', but only programs in TEST_PROG, +# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed. +check-TESTS: test + +test _test: + @$(MAKE) build-check-s + @$(MAKE) build-check-p + +# Actual execution of check-s. +build-check-s: $(LIB) $(PROGS) $(chk_TESTS) + @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ + echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ + fi + @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s + @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ + echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ + fi + +_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH) + +# The dummy.chkexe here prevents the target from being +# empty if there are no tests in the current directory. +# $${log} is the log file. +# $${tname} is the name of test. +$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_: + @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \ + tname=$(@:.chkexe_=)$(EXEEXT);\ + log=$(@:.chkexe_=.chklog); \ + echo "============================"; \ + if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \ + echo "No need to test $${tname} again."; \ + else \ + echo "============================" > $${log}; \ + if test "X$(FORTRAN_API)" = "Xyes"; then \ + echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ + echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ + elif test "X$(CXX_API)" = "Xyes"; then \ + echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ + echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\ + else \ + echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ + echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ + fi; \ + echo "============================" >> $${log}; \ + srcdir="$(srcdir)" \ + $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \ + && touch $(@:.chkexe_=.chkexe) || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + (cat $${log} && false) || exit 1; \ + echo "" >> $${log}; \ + echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ + echo "============================" >> $${log}; \ + echo "Finished testing $${tname} $(TEST_FLAGS)"; \ + cat $${log}; \ + fi; \ + fi + +# The dummysh.chkexe here prevents the target from being +# empty if there are no tests in the current directory. +# $${log} is the log file. +# $${tname} is the name of test. +$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_: + @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \ + cmd=$(@:.chkexe_=);\ + tname=`basename $$cmd`;\ + chkname=`basename $(@:.chkexe_=.chkexe)`;\ + log=`basename $(@:.chkexe_=.chklog)`; \ + echo "============================"; \ + if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \ + echo "No need to test $${tname} again."; \ + else \ + echo "============================" > $${log}; \ + if test "X$(FORTRAN_API)" = "Xyes"; then \ + echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \ + echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ + elif test "X$(CXX_API)" = "Xyes"; then \ + echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \ + echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ + else \ + echo "Testing $${tname} $(TEST_FLAGS)"; \ + echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ + fi; \ + echo "============================" >> $${log}; \ + RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \ + srcdir="$(srcdir)" \ + $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \ + && touch $${chkname} || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + (cat $${log} && false) || exit 1; \ + echo "" >> $${log}; \ + echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ + echo "============================" >> $${log}; \ + echo "Finished testing $${tname} $(TEST_FLAGS)"; \ + cat $${log}; \ + fi; \ + echo "============================"; \ + fi + +# Actual execution of check-p. +build-check-p: $(LIB) $(PROGS) $(chk_TESTS) + @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ + echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ + fi + @if test -n "$(TEST_PROG_PARA)"; then \ + echo "**** Hint ****"; \ + echo "Parallel test files reside in the current directory" \ + "by default."; \ + echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \ + echo " HDF5_PARAPREFIX=/PFS/user/me"; \ + echo " export HDF5_PARAPREFIX"; \ + echo " make check"; \ + echo "**** end of Hint ****"; \ + fi + @for test in $(TEST_PROG_PARA) dummy; do \ + if test $$test != dummy; then \ + $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \ + RUNEXEC="$(RUNPARALLEL)" || exit 1; \ + fi; \ + done + @for test in $(TEST_SCRIPT_PARA) dummy; do \ + if test $$test != dummy; then \ + $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \ + fi; \ + done + @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ + echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ + fi + +# Run test with different Virtual File Driver +check-vfd: $(LIB) $(PROGS) $(chk_TESTS) + @for vfd in $(VFD_LIST) dummy; do \ + if test $$vfd != dummy; then \ + echo "============================"; \ + echo "Testing Virtual File Driver $$vfd"; \ + echo "============================"; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ + fi; \ + done + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: -- cgit v0.12 From 349ad0d74d18bc887bd433930288f54aaf999589 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 8 Jun 2015 22:22:43 -0500 Subject: [svn-r27166] Updated MANIFEST to include test/vds.c and tools/misc/vds files. --- MANIFEST | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/MANIFEST b/MANIFEST index 83d8310..b0f3848 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1102,6 +1102,7 @@ ./test/test_filters_be.h5 ./test/gen_filters.c ./test/chunk_info.c +./test/vds.c ./test/testfiles/err_compat_1 ./test/testfiles/err_compat_2 @@ -1177,7 +1178,6 @@ ./tools/h5dump/testh5dumpxml.sh.in ./tools/h5dump/binread.c - ./tools/h5import/Makefile.am ./tools/h5import/Makefile.in ./tools/h5import/h5import.h @@ -1321,6 +1321,20 @@ ./tools/misc/testfiles/h5mkgrp_help.txt ./tools/misc/testfiles/h5mkgrp_version.txt.in ./tools/misc/h5perf_gentest.c +./tools/misc/vds/Makefile.am +./tools/misc/vds/Makefile.in +./tools/misc/vds/UC_1.h +./tools/misc/vds/UC_1_one_dim_gen.c +./tools/misc/vds/UC_2.h +./tools/misc/vds/UC_2_two_dims_gen.c +./tools/misc/vds/UC_3.h +./tools/misc/vds/UC_3_gaps_gen.c +./tools/misc/vds/UC_4.h +./tools/misc/vds/UC_4_printf_gen.c +./tools/misc/vds/UC_5.h +./tools/misc/vds/UC_5_stride_gen.c +./tools/misc/vds/UC_common.h + # h5stat sources ./tools/h5stat/Makefile.am -- cgit v0.12 From bf8942c7e9213355515344f21c8df7fd2987f09d Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 9 Jun 2015 15:52:03 -0500 Subject: [svn-r27174] Fix bug in H5S__hyper_project_intersection that affected empty selections. Tested: ummon --- src/H5Shyper.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 87fb3a9..da528ad 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -9339,6 +9339,10 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, if(H5S_SELECT_RELEASE(proj_space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection") + /* If any selections are empty, skip to the end so "none" is selected */ + if((ss_nelem == 0) || (ds_nelem == 0) || (sis_nelem == 0)) + goto loop_end; + /* Allocate space for the hyperslab selection information (note this sets * diminfo_valid to FALSE, diminfo arrays to 0, and span list to NULL) */ if((proj_space->select.sel_info.hslab = H5FL_CALLOC(H5S_hyper_sel_t)) == NULL) @@ -9359,6 +9363,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, if(H5S_SELECT_GET_SEQ_LIST(src_space, 0u, &ss_iter, H5S_PROJECT_INTERSECT_NSEQS, ss_nelem, &ss_nseq, &nelem, ss_off, ss_len) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") ss_nelem -= nelem; + HDassert(ss_nseq > 0); /* Initialize destination space iterator */ if(H5S_select_iter_init(&ds_iter, dst_space, (size_t)1) < 0) @@ -9369,6 +9374,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, if(H5S_SELECT_GET_SEQ_LIST(dst_space, 0u, &ds_iter, H5S_PROJECT_INTERSECT_NSEQS, ds_nelem, &ds_nseq, &nelem, ds_off, ds_len) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") ds_nelem -= nelem; + HDassert(ds_nseq > 0); /* Initialize source intersect space iterator */ if(H5S_select_iter_init(&sis_iter, src_intersect_space, (size_t)1) < 0) @@ -9379,10 +9385,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, if(H5S_SELECT_GET_SEQ_LIST(src_intersect_space, 0u, &sis_iter, H5S_PROJECT_INTERSECT_NSEQS, sis_nelem, &sis_nseq, &nelem, sis_off, sis_len) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") sis_nelem -= nelem; - - /* If any sequences are empty, skip the main loop */ - if((ss_nseq == 0) || (ds_nseq == 0) || (sis_nseq == 0)) - goto loop_end; + HDassert(sis_nseq > 0); /* Loop until we run out of sequences in either the source or source * intersect space */ @@ -10014,7 +10017,7 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, num_slices = match_space->select.num_elem / match_hslab->num_elem_non_unlim; if(num_slices == 0) { - HDassert(incl_trail && "Checking code coverage..."); //VDSINC + //HDassert(incl_trail && "Checking code coverage..."); //VDSINC HDassert(!incl_trail && "Checking code coverage..."); //VDSINC *clip_size = incl_trail ? diminfo->start : 0; } //VDSINC -- cgit v0.12 From 9786fe2f6158cd13c5e1837dee58f99dcda8f58c Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 11 Jun 2015 23:26:53 -0500 Subject: [svn-r27192] Improve support for printf selections (support partial blocks with H5_VDS_FIRST_MISSING) Add test for this Rework VDS code to not depend on unlimited selections having a "clipped" state in preparation for removing the clipped state from unlimited selections. Other bug fixes/cleanup Tested: Kubuntu 64 (home computer) --- src/H5Dpkg.h | 4 - src/H5Dvirtual.c | 564 +++++++++++++++++++++++++------------------ src/H5Olayout.c | 6 + src/H5Oprivate.h | 3 + src/H5Pdcpl.c | 7 +- src/H5Shyper.c | 84 ++++++- src/H5Sprivate.h | 2 + test/vds.c | 713 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 8 files changed, 1115 insertions(+), 268 deletions(-) diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 6af79e9..44441c4 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -171,15 +171,11 @@ typedef struct { hbool_t *dirty; /* Pointer to dirty flag to mark */ } H5D_compact_storage_t; -typedef struct { -} H5D_virtual_storage_t; /* Either fill out or remove VDSINC */ - typedef union H5D_storage_t { H5D_contig_storage_t contig; /* Contiguous information for dataset */ H5D_chunk_storage_t chunk; /* Chunk information for dataset */ H5D_compact_storage_t compact; /* Compact information for dataset */ H5O_efl_t efl; /* External file list information for dataset */ - H5D_virtual_storage_t virt; /* Virtual dataset information */ } H5D_storage_t; /* Typedef for raw data I/O operation info */ diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 0fc96cf..bfd4e0c 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -85,11 +85,9 @@ static herr_t H5D__virtual_build_source_name(char *source_name, size_t nsubs, hsize_t blockno, char **built_name); static herr_t H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, const H5S_t *file_space, - H5O_storage_virtual_ent_t *virtual_ent, H5O_storage_virtual_srcdset_t *source_dset); static herr_t H5D__virtual_write_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, const H5S_t *file_space, - H5O_storage_virtual_ent_t *virtual_ent, H5O_storage_virtual_srcdset_t *source_dset); static herr_t H5D__virtual_pre_io(H5D_io_info_t *io_info, H5O_storage_virtual_t *storage, const H5S_t *file_space, @@ -242,6 +240,10 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) if(NULL == (layout->storage.u.virt.list[i].source_select = H5S_copy(orig_list[i].source_select, FALSE, TRUE))) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") + if(orig_list[i].unlim_dim_virtual < 0) { + layout->storage.u.virt.list[i].source_dset.clipped_source_select = layout->storage.u.virt.list[i].source_select; + layout->storage.u.virt.list[i].source_dset.clipped_virtual_select = layout->storage.u.virt.list[i].source_dset.virtual_select; + } /* end if */ if(H5D__virtual_copy_parsed_name(&layout->storage.u.virt.list[i].parsed_source_file_name, orig_list[i].parsed_source_file_name) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy parsed source file name") layout->storage.u.virt.list[i].psfn_static_strlen = orig_list[i].psfn_static_strlen; @@ -267,6 +269,9 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) layout->storage.u.virt.list_nalloc = 0; } /* end else */ + /* New layout is not fully initialized */ + layout->storage.u.virt.init = FALSE; + done: /* Release allocated resources on failure */ if((ret_value < 0) && orig_list @@ -313,17 +318,17 @@ H5D__virtual_reset_layout(H5O_layout_t *layout) if(H5D__virtual_reset_source_dset(&layout->storage.u.virt.list[i], &layout->storage.u.virt.list[i].source_dset) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset source dataset") - /* Free source_select */ - if(layout->storage.u.virt.list[i].source_select) - if(H5S_close(layout->storage.u.virt.list[i].source_select) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") - /* Free sub_dset */ for(j = 0; j < layout->storage.u.virt.list[i].sub_dset_nalloc; j++) if(H5D__virtual_reset_source_dset(&layout->storage.u.virt.list[i], &layout->storage.u.virt.list[i].sub_dset[j]) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset source dataset") layout->storage.u.virt.list[i].sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_xfree(layout->storage.u.virt.list[i].sub_dset); + /* Free source_select */ + if(layout->storage.u.virt.list[i].source_select) + if(H5S_close(layout->storage.u.virt.list[i].source_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") + /* Free parsed_source_file_name */ H5D_virtual_free_parsed_name(layout->storage.u.virt.list[i].parsed_source_file_name); @@ -337,6 +342,9 @@ H5D__virtual_reset_layout(H5O_layout_t *layout) layout->storage.u.virt.list_nused = (size_t)0; (void)HDmemset(layout->storage.u.virt.min_dims, 0, sizeof(layout->storage.u.virt.min_dims)); + /* The list is no longer initialized */ + layout->storage.u.virt.init = FALSE; + /* Note the lack of a done: label. This is because there are no HGOTO_ERROR * calls. If one is added, a done: label must also be added */ FUNC_LEAVE_NOAPI(ret_value) @@ -496,6 +504,14 @@ H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent, || virtual_ent->parsed_source_dset_name) source_dset->dset_name = (char *)H5MM_xfree(source_dset->dset_name); + /* Free clipped virtual selection */ + if(source_dset->clipped_virtual_select) { + if(source_dset->clipped_virtual_select != source_dset->virtual_select) + if(H5S_close(source_dset->clipped_virtual_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped virtual selection") + source_dset->clipped_virtual_select = NULL; + } /* end if */ + /* Free virtual selection */ if(source_dset->virtual_select) { if(H5S_close(source_dset->virtual_select) < 0) @@ -503,10 +519,20 @@ H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent, source_dset->virtual_select = NULL; } /* end if */ + /* Free clipped source selection */ + if(source_dset->clipped_source_select) { + if(source_dset->clipped_source_select != virtual_ent->source_select) + if(H5S_close(source_dset->clipped_source_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped source selection") + source_dset->clipped_source_select = NULL; + } /* end if */ + /* The projected memory space should never exist when this function is * called */ HDassert(!source_dset->projected_mem_space); + /* Note the lack of a done: label. This is because there are no HGOTO_ERROR + * calls. If one is added, a done: label must also be added */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_reset_source_dset() */ @@ -919,7 +945,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) hsize_t clip_size; int rank; hbool_t changed = FALSE; /* Whether the VDS extent changed */ - size_t i, j; + H5S_t *tmp_space = NULL; /* Temporary dataspace */ + size_t i, j, k; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -943,8 +970,106 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) /* Check for unlimited dimension */ if(storage->list[i].unlim_dim_virtual >= 0) { /* Check for "printf" source dataset resolution */ - if(storage->list[i].parsed_source_file_name - || storage->list[i].parsed_source_dset_name) { + if(storage->list[i].unlim_dim_source >= 0 ) { + /* Non-printf mapping */ + /* Open source dataset */ + if(!storage->list[i].source_dset.dset) + if(H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].source_dset, dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + + /* Check if source dataset is open */ + if(storage->list[i].source_dset.dset) { + /* Retrieve current source dataset extent and patch mapping + */ + if(H5S_extent_copy(storage->list[i].source_select, storage->list[i].source_dset.dset->shared->space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent") + + /* Get source space dimenstions */ + if(H5S_get_simple_extent_dims(storage->list[i].source_select, curr_dims, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get source space dimensions") + + /* Check if the source extent in the unlimited dimension + * changed since the last time the VDS extent/mapping + * was updated */ + if(curr_dims[storage->list[i].unlim_dim_source] + == storage->list[i].unlim_extent_source) + /* Use cached result for clip size */ + clip_size = storage->list[i].clip_size_virtual; + else { + /* Copy source mapping */ + if(NULL == (tmp_space = H5S_copy(storage->list[i].source_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") + + /* Clip temporary source space to source extent */ + if(H5S_hyper_clip_unlim(tmp_space, curr_dims[storage->list[i].unlim_dim_source])) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + + /* Get size that virtual selection would be clipped to + * to match size of source selection */ + if(H5S_hyper_get_clip_extent(storage->list[i].source_dset.virtual_select, tmp_space, &clip_size, storage->view == H5D_VDS_FIRST_MISSING) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") + + /* Close tmp_space */ + if(H5S_close(tmp_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace") + tmp_space = NULL; + + /* If we are setting the extent by the last available + * data, clip virtual_select and source_select. Note + * that if we used the cached clip_size above or it + * happens to be the same, the virtual selection will + * already be clipped to the correct size. Likewise, + * if we used the cached clip_size the source selection + * will already be correct. */ + if(storage->view == H5D_VDS_LAST_AVAILABLE) { + if(clip_size != storage->list[i].clip_size_virtual) { + /* Close previous clipped virtual selection, if + * any */ + if(storage->list[i].source_dset.clipped_virtual_select) { + HDassert(storage->list[i].source_dset.clipped_virtual_select + != storage->list[i].source_dset.virtual_select); + if(H5S_close(storage->list[i].source_dset.clipped_virtual_select) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped virtual dataspace") + } /* end if */ + + /* Copy virtual selection */ + if(NULL == (storage->list[i].source_dset.clipped_virtual_select = H5S_copy(storage->list[i].source_dset.virtual_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + + /* Clip virtual selection */ + if(H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_virtual_select, clip_size)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + } /* end if */ + + /* Close previous clipped source selection, if any + */ + if(storage->list[i].source_dset.clipped_source_select) { + HDassert(storage->list[i].source_dset.clipped_source_select + != storage->list[i].source_select); + if(H5S_close(storage->list[i].source_dset.clipped_source_select) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped source dataspace") + } /* end if */ + + /* Copy source selection */ + if(NULL == (storage->list[i].source_dset.clipped_source_select = H5S_copy(storage->list[i].source_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") + + /* Clip source selection */ + if(H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_source_select, curr_dims[storage->list[i].unlim_dim_source])) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + } /* end if */ + + /* Update cached values unlim_extent_source and + * clip_size_virtual */ + storage->list[i].unlim_extent_source = curr_dims[storage->list[i].unlim_dim_source]; + storage->list[i].clip_size_virtual = clip_size; + } /* end else */ + } /* end if */ + else + clip_size = 0; + } /* end if */ + else { + /* printf mapping */ hsize_t first_missing = 0; /* First missing dataset in the current block of missing datasets */ /* Search for source datasets */ @@ -993,6 +1118,12 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if(NULL == (storage->list[i].sub_dset[j].virtual_select = H5S_hyper_get_unlim_block(storage->list[i].source_dset.virtual_select, j))) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get block in unlimited selection") + /* Initialize clipped selections */ + if(!storage->list[i].sub_dset[j].clipped_source_select) + storage->list[i].sub_dset[j].clipped_source_select = storage->list[i].source_select; + if(!storage->list[i].sub_dset[j].clipped_virtual_select) + storage->list[i].sub_dset[j].clipped_virtual_select = storage->list[i].sub_dset[j].virtual_select; + /* Open source dataset */ if(H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].sub_dset[j], dxpl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") @@ -1040,68 +1171,10 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) } /* end else */ } /* end else */ - /* Clip entry root virtual select (virtual_select for all - * sub dsets) if we are setting the extent by the last - * available data. Note that if we used the cached - * clip_size above, the selection will already be clipped to - * the correct size. */ - if(storage->view == H5D_VDS_LAST_AVAILABLE) - if(H5S_hyper_clip_unlim(storage->list[i].source_dset.virtual_select, clip_size)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") - /* Set sub_dset_nused and clip_size_virtual */ storage->list[i].sub_dset_nused = (size_t)first_missing; storage->list[i].clip_size_virtual = clip_size; } /* end else */ - } /* end if */ - else { - HDassert(storage->list[i].unlim_dim_source >= 0); - - /* Open source dataset */ - if(!storage->list[i].source_dset.dset) - if(H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].source_dset, dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") - - /* Check if source dataset is open */ - if(storage->list[i].source_dset.dset) { - /* Retrieve current source dataset extent and patch mapping. - * Note this will clip the source selection to the extent. */ - if(H5S_extent_copy(storage->list[i].source_select, storage->list[i].source_dset.dset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent") - - /* Get source space dimenstions */ - if(H5S_get_simple_extent_dims(storage->list[i].source_select, curr_dims, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get source space dimensions") - - /* Check if the source extent in the unlimited dimension - * changed since the last time the VDS extent/mapping - * was updated */ - if(curr_dims[storage->list[i].unlim_dim_source] - == storage->list[i].unlim_extent_source) - /* Use cached result for clip size */ - clip_size = storage->list[i].clip_size_virtual; - else { - /* Get size that virtual selection would be clipped to - * to match size of source selection */ - if(H5S_hyper_get_clip_extent(storage->list[i].source_dset.virtual_select, storage->list[i].source_select, &clip_size, storage->view == H5D_VDS_FIRST_MISSING) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") - - /* If we are setting the extent by the last available data, - * clip virtual_select. Note that if we used the cached - * clip_size above, the selection will already be clipped to - * the correct size. */ - if(storage->view == H5D_VDS_LAST_AVAILABLE) - if(H5S_hyper_clip_unlim(storage->list[i].source_dset.virtual_select, clip_size)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") - - /* Update cached values unlim_extent_source and - * clip_size_virtual */ - storage->list[i].unlim_extent_source = curr_dims[storage->list[i].unlim_dim_source]; - storage->list[i].clip_size_virtual = clip_size; - } /* end else */ - } /* end if */ - else - clip_size = 0; } /* end else */ /* Update new_dims */ @@ -1129,77 +1202,184 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) changed = TRUE; } /* end for */ - /* If we did not change the VDS dimensions and we are setting the extent by - * maximum, there is nothing more to update */ - if(changed || (storage->view == H5D_VDS_FIRST_MISSING)) { + /* If we did not change the VDS dimensions, there is nothing more to update + */ + if(changed || (!storage->init && (storage->view == H5D_VDS_FIRST_MISSING))) { /* Update VDS extent */ - if(changed) - if(H5S_set_extent(dset->shared->space, new_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + if(H5S_set_extent(dset->shared->space, new_dims) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") /* Iterate over mappings again to update source selections and virtual * mapping extents */ for(i = 0; i < storage->list_nalloc; i++) { - /* Update virtual mapping extent. Note this function does not clip - * the selection. */ - if(changed) { - /* Update top level virtual_select */ - if(H5S_set_extent(storage->list[i].source_dset.virtual_select, new_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") - - /* Update sub dataset virtual_selects */ - for(j = 0; j < storage->list[i].sub_dset_nalloc; j++) - if(storage->list[i].sub_dset[j].virtual_select) - if(H5S_set_extent(storage->list[i].sub_dset[j].virtual_select, new_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") - } /* end if */ + /* If there is an unlimited dimension, we are setting extent by the + * minimum of mappings, and the virtual extent in the unlimited + * dimension has changed since the last time the VDS extent/mapping + * was updated, we must adjust the selections */ + if((storage->list[i].unlim_dim_virtual >= 0) + && (storage->view == H5D_VDS_FIRST_MISSING) + && (new_dims[storage->list[i].unlim_dim_virtual] + != storage->list[i].unlim_extent_virtual)) { + /* Check for "printf" style mapping */ + if(storage->list[i].unlim_dim_source >= 0) { + /* Non-printf mapping */ + /* Close previous clipped virtual selection, if any */ + if(storage->list[i].source_dset.clipped_virtual_select) { + HDassert(storage->list[i].source_dset.clipped_virtual_select + != storage->list[i].source_dset.virtual_select); + if(H5S_close(storage->list[i].source_dset.clipped_virtual_select) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped virtual dataspace") + } /* end if */ - /* Check for unlimited dimension */ - if(storage->list[i].unlim_dim_virtual >= 0) { - /* Check if we are setting extent by the minimum of mappings */ - if(storage->view == H5D_VDS_FIRST_MISSING) { - /* Clip virtual selection to extent (only necessary if the - * extent changed, otherwise it will already be clipped to - * the extent) */ - if(changed) - if(H5S_hyper_clip_to_extent(storage->list[i].source_dset.virtual_select)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + /* Copy virtual selection */ + if(NULL == (storage->list[i].source_dset.clipped_virtual_select = H5S_copy(storage->list[i].source_dset.virtual_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + + /* Clip space to virtual extent */ + if(H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_virtual_select, new_dims[storage->list[i].unlim_dim_source])) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + + /* Get size that source selection will be clipped to to + * match size of source selection */ + if(H5S_hyper_get_clip_extent(storage->list[i].source_select, storage->list[i].source_dset.clipped_virtual_select, &clip_size, FALSE) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") + + /* Check if the clip size changed */ + if(clip_size != storage->list[i].clip_size_source) { + /* Close previous clipped source selection, if any */ + if(storage->list[i].source_dset.clipped_source_select) { + HDassert(storage->list[i].source_dset.clipped_source_select + != storage->list[i].source_select); + if(H5S_close(storage->list[i].source_dset.clipped_source_select) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped source dataspace") + } /* end if */ - /* Only clip source_select if this is not a "printf" style - * mapping */ - if(!(storage->list[i].parsed_source_file_name - || storage->list[i].parsed_source_dset_name)) { - /* Check if the virtual extent in the unlimited - * dimension changed since the last time the VDS - * extent/mapping was updated */ - if(new_dims[storage->list[i].unlim_dim_virtual] - == storage->list[i].unlim_extent_virtual) - /* Use cached result for clip size */ - clip_size = storage->list[i].clip_size_source; - else { - /* Get size that source selection will be clipped to - * to match size of virtual selection */ - if(H5S_hyper_get_clip_extent(storage->list[i].source_select, storage->list[i].source_dset.virtual_select, &clip_size, FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") - - /* Update cached values unlim_extent_virtual and - * clip_size_source */ - storage->list[i].unlim_extent_virtual = new_dims[storage->list[i].unlim_dim_virtual]; - storage->list[i].clip_size_source = clip_size; - } /* end else */ + /* Copy source selection */ + if(NULL == (storage->list[i].source_dset.clipped_source_select = H5S_copy(storage->list[i].source_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") - /* Clip source_select */ - if(H5S_hyper_clip_unlim(storage->list[i].source_select, clip_size)) + /* Clip source selection */ + if(H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_source_select, clip_size)) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + + /* Update cached value clip_size_source */ + storage->list[i].clip_size_source = clip_size; } /* end if */ } /* end if */ + else { + /* printf mapping */ + hsize_t first_inc_block; + hbool_t partial_block; + + /* Get index of first incomplete block in virtual + * selection */ + first_inc_block = H5S_hyper_get_first_inc_block(storage->list[i].source_dset.virtual_select, new_dims[storage->list[i].unlim_dim_virtual], &partial_block); + + /* Iterate over sub datasets */ + for(j = 0; j < storage->list[i].sub_dset_nalloc; j++) { + /* Close previous clipped source selection, if any */ + if(storage->list[i].sub_dset[j].clipped_source_select + != storage->list[i].source_select) { + if(storage->list[i].sub_dset[j].clipped_source_select) + if(H5S_close(storage->list[i].sub_dset[j].clipped_source_select) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped source dataspace") + storage->list[i].sub_dset[j].clipped_source_select = storage->list[i].source_select; + } /* end if */ + + /* Close previous clipped virtual selection, if any */ + if(storage->list[i].sub_dset[j].clipped_virtual_select + != storage->list[i].sub_dset[j].virtual_select) { + if(storage->list[i].sub_dset[j].clipped_virtual_select) + if(H5S_close(storage->list[i].sub_dset[j].clipped_virtual_select) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped virtual dataspace") + storage->list[i].sub_dset[j].clipped_virtual_select = storage->list[i].sub_dset[j].virtual_select; + } /* end if */ + + /* Check for partial block */ + else if(partial_block && (j == (size_t)first_inc_block)) { + /* Partial block, must clip source and virtual + * selections */ + hsize_t start[H5S_MAX_RANK]; + + /* Get bounds of virtual selection */ + if(H5S_SELECT_BOUNDS(storage->list[i].sub_dset[j].virtual_select, start, curr_dims) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") + + /* Convert bounds to extent (add 1) */ + for(k = 0; k < (size_t)rank; k++) + curr_dims[k]++; + + /* Temporarily set extent of virtual selection to bounds */ + if(H5S_set_extent(storage->list[i].sub_dset[j].virtual_select, curr_dims) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + + /* Copy virtual selection */ + if(NULL == (storage->list[i].sub_dset[j].clipped_virtual_select = H5S_copy(storage->list[i].sub_dset[j].virtual_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + + /* Clip virtual selection to real virtual extent */ + (void)HDmemset(start, 0, sizeof(start)); + if(H5S_select_hyperslab(storage->list[i].sub_dset[j].clipped_virtual_select, H5S_SELECT_AND, start, NULL, new_dims, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to clip hyperslab") + + /* Project intersection of virtual space and clipped + * virtual space onto source space */ + if(H5S_select_project_intersection(storage->list[i].sub_dset[j].virtual_select, storage->list[i].source_select, storage->list[i].sub_dset[j].clipped_virtual_select, &storage->list[i].sub_dset[j].clipped_source_select) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") + } /* end if */ + else if(j >= (size_t)first_inc_block) { + /* Unused block, clear clipped source and virtual + * selections */ + storage->list[i].sub_dset[j].clipped_source_select = NULL; + storage->list[i].sub_dset[j].clipped_virtual_select = NULL; + } /* end if */ + } /* end for */ + } /* end else */ + + /* Update cached value unlim_extent_virtual */ + storage->list[i].unlim_extent_virtual = new_dims[storage->list[i].unlim_dim_virtual]; } /* end if */ + + /* Update top level virtual_select and clipped_virtual_select + * extents */ + if(H5S_set_extent(storage->list[i].source_dset.virtual_select, new_dims) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + if((storage->list[i].source_dset.clipped_virtual_select + != storage->list[i].source_dset.virtual_select) + && storage->list[i].source_dset.clipped_virtual_select) + if(H5S_set_extent(storage->list[i].source_dset.clipped_virtual_select, new_dims) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + + /* Update sub dataset virtual_select and clipped_virtual_select + * extents */ + for(j = 0; j < storage->list[i].sub_dset_nalloc; j++) + if(storage->list[i].sub_dset[j].virtual_select) { + if(H5S_set_extent(storage->list[i].sub_dset[j].virtual_select, new_dims) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + if((storage->list[i].sub_dset[j].clipped_virtual_select + != storage->list[i].sub_dset[j].virtual_select) + && storage->list[i].sub_dset[j].clipped_virtual_select) + if(H5S_set_extent(storage->list[i].sub_dset[j].clipped_virtual_select, new_dims) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + } /* end if */ + else + HDassert(!storage->list[i].sub_dset[j].clipped_virtual_select); } /* end for */ } /* end if */ /* Call H5D__mark so dataspace is updated on disk? VDSINC */ + /* Mark layout as fully initialized */ + storage->init = TRUE; + done: + /* Close temporary space */ + if(tmp_space) { + HDassert(ret_value < 0); + if(H5S_close(tmp_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close temporary space") + } /* end if */ + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_set_extent_unlim() */ @@ -1312,7 +1492,6 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, H5O_storage_virtual_t *storage, const H5S_t *file_space, const H5S_t *mem_space, hsize_t *tot_nelmts) { - H5S_t *tmp_space = NULL; /* Copied virtual_select VDSINC */ hssize_t select_nelmts; /* Number of elements in selection */ size_t i, j; /* Local index variables */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1325,6 +1504,10 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, HDassert(file_space); HDassert(tot_nelmts); + /* Initialize layout if necessary */ + if(!storage->init) + {} //VDSINC + /* Initialize tot_nelmts */ *tot_nelmts = 0; @@ -1338,57 +1521,16 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, || storage->list[i].parsed_source_dset_name) { /* Iterate over sub-source dsets */ for(j = 0; j < storage->list[i].sub_dset_nused; j++) { - H5S_t *virtual_select; /* Pointer to real virtual_select VDSINC */ - - /* Quick hack to make this work with printf VDSINC */ - if(storage->view == H5D_VDS_LAST_AVAILABLE) { - virtual_select = storage->list[i].sub_dset[j].virtual_select; - } /* end if */ - else { - hsize_t start[H5S_MAX_RANK]; - hsize_t count[H5S_MAX_RANK]; - - /* Quick hack to make this work with FIRST_MISSING */ - /* Copy virtual selection */ - if(NULL == (tmp_space = H5S_copy(storage->list[i].sub_dset[j].virtual_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual selection") - - /* Get virtual extent dimensions */ - if(H5S_get_simple_extent_dims(tmp_space, count, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get virtual dataspace dimensions") - - /* Set start to zeroes */ - (void)HDmemset(start, 0, sizeof(start)); - - /* Clip tmp_space selection to extent */ - if(H5S_select_hyperslab(tmp_space, H5S_SELECT_AND, start, NULL, count, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't clip selection to extent") - - /* Check for no elements selected */ - if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(tmp_space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") - if(select_nelmts == 0) { - if(H5S_close(tmp_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close temporary space") - tmp_space = NULL; - continue; - } /* end if */ - - virtual_select = tmp_space; - } /* end else */ - - /* Project intersection of file space and mapping virtual space onto - * memory space */ - if(H5S_select_project_intersection(file_space, mem_space, virtual_select, &storage->list[i].sub_dset[j].projected_mem_space) < 0) + /* Check for no clipped selection. This should be an assertion + * once we have I/O scoping for printf working VDSINC */ + if(!storage->list[i].sub_dset[j].clipped_virtual_select) + break; + + /* Project intersection of file space and mapping virtual space + * onto memory space */ + if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].sub_dset[j].clipped_virtual_select, &storage->list[i].sub_dset[j].projected_mem_space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") - /* Close temporary space VDSINC */ - if(tmp_space) { - if(H5S_close(tmp_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close temporary space") - tmp_space = NULL; - } /* end if */ - /* Check number of elements selected */ if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(storage->list[i].sub_dset[j].projected_mem_space)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") @@ -1419,9 +1561,11 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, } /* end for */ } /* end if */ else { + HDassert(storage->list[i].source_dset.clipped_virtual_select); + /* Project intersection of file space and mapping virtual space onto * memory space */ - if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].source_dset.virtual_select, &storage->list[i].source_dset.projected_mem_space) < 0) + if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].source_dset.clipped_virtual_select, &storage->list[i].source_dset.projected_mem_space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") /* Check number of elements selected, add to tot_nelmts */ @@ -1457,11 +1601,6 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, } /* end for */ done: - /* Release tmp_space VDSINC */ - if(tmp_space) - if(H5S_close(tmp_space) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close temporary space") - FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_pre_io() */ @@ -1511,6 +1650,8 @@ H5D__virtual_post_io(H5O_storage_virtual_t *storage) storage->list[i].source_dset.projected_mem_space = NULL; } /* end if */ + /* Note the lack of a done: label. This is because there are no HGOTO_ERROR + * calls. If one is added, a done: label must also be added */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_post_io() */ @@ -1529,65 +1670,25 @@ H5D__virtual_post_io(H5O_storage_virtual_t *storage) */ static herr_t H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, - const H5S_t *file_space, H5O_storage_virtual_ent_t *virtual_ent, - H5O_storage_virtual_srcdset_t *source_dset) + const H5S_t *file_space, H5O_storage_virtual_srcdset_t *source_dset) { H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */ - H5S_t *tmp_space = NULL; /* Copied virtual_select VDSINC */ - H5S_t *virtual_select; /* Pointer to real virtual_select VDSINC */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC - HDassert(virtual_ent); HDassert(source_dset); - /* Quick hack to make this work with printf VDSINC */ - if((source_dset == &virtual_ent->source_dset) - || (io_info->dset->shared->layout.storage.u.virt.view == H5D_VDS_LAST_AVAILABLE)) { - virtual_select = source_dset->virtual_select; - } /* end if */ - else { - hsize_t start[H5S_MAX_RANK]; - hsize_t count[H5S_MAX_RANK]; - hssize_t select_nelmts; - - /* Copy virtual selection */ - if(NULL == (tmp_space = H5S_copy(source_dset->virtual_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual selection") - - /* Get virtual extent dimensions */ - if(H5S_get_simple_extent_dims(tmp_space, count, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get virtual dataspace dimensions") - - /* Set start to zeroes */ - (void)HDmemset(start, 0, sizeof(start)); - - /* Clip tmp_space selection to extent */ - if(H5S_select_hyperslab(tmp_space, H5S_SELECT_AND, start, NULL, count, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't clip selection to extent") - - /* Check for no elements selected */ - if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(tmp_space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") - if(select_nelmts == 0) - HGOTO_DONE(SUCCEED) - - virtual_select = tmp_space; - } /* end else */ - /* Only perform I/O if there is a projected memory space, otherwise there * were no elements in the projection or the source dataset could not be * opened */ if(source_dset->projected_mem_space) { HDassert(source_dset->dset); - - /* Sanity check that the source space has been patched by now */ - HDassert(virtual_ent->source_space_status == H5O_VIRTUAL_STATUS_CORRECT); + HDassert(source_dset->clipped_source_select); /* Project intersection of file space and mapping virtual space onto * mapping source space */ - if(H5S_select_project_intersection(virtual_select, virtual_ent->source_select, file_space, &projected_src_space) < 0) + if(H5S_select_project_intersection(source_dset->clipped_virtual_select, source_dset->clipped_source_select, file_space, &projected_src_space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto source space") /* Perform read on source dataset */ @@ -1608,11 +1709,6 @@ done: HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") } /* end if */ - /* Release tmp_space VDSINC */ - if(tmp_space) - if(H5S_close(tmp_space) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close temporary space") - FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_read_one() */ @@ -1666,12 +1762,12 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, || storage->list[i].parsed_source_dset_name) { /* Iterate over sub-source dsets */ for(j = 0; j < storage->list[i].sub_dset_nused; j++) - if(H5D__virtual_read_one(io_info, type_info, file_space, &storage->list[i], &storage->list[i].sub_dset[j]) < 0) + if(H5D__virtual_read_one(io_info, type_info, file_space, &storage->list[i].sub_dset[j]) < 0) HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read source dataset") } /* end if */ else /* Read from source dataset */ - if(H5D__virtual_read_one(io_info, type_info, file_space, &storage->list[i], &storage->list[i].source_dset) < 0) + if(H5D__virtual_read_one(io_info, type_info, file_space, &storage->list[i].source_dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read source dataset") } /* end for */ @@ -1748,30 +1844,26 @@ done: */ static herr_t H5D__virtual_write_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, - const H5S_t *file_space, H5O_storage_virtual_ent_t *virtual_ent, - H5O_storage_virtual_srcdset_t *source_dset) + const H5S_t *file_space, H5O_storage_virtual_srcdset_t *source_dset) { H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC - HDassert(virtual_ent); HDassert(source_dset); /* Only perform I/O if there is a projected memory space, otherwise there * were no elements in the projection */ if(source_dset->projected_mem_space) { HDassert(source_dset->dset); - - /* Sanity check that the source space has been patched by now */ - HDassert(virtual_ent->source_space_status == H5O_VIRTUAL_STATUS_CORRECT); + HDassert(source_dset->clipped_source_select); /* Extend source dataset if necessary and there is an unlimited * dimension VDSINC */ /* Project intersection of file space and mapping virtual space onto * mapping source space */ - if(H5S_select_project_intersection(source_dset->virtual_select, virtual_ent->source_select, file_space, &projected_src_space) < 0) + if(H5S_select_project_intersection(source_dset->virtual_select, source_dset->clipped_source_select, file_space, &projected_src_space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto source space") /* Perform write on source dataset */ @@ -1852,13 +1944,13 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Iterate over sub-source dsets */ for(j = 0; j < storage->list[i].sub_dset_nused; j++) { HDassert(0 && "Checking code coverage..."); //VDSINC - if(H5D__virtual_write_one(io_info, type_info, file_space, &storage->list[i], &storage->list[i].sub_dset[j]) < 0) + if(H5D__virtual_write_one(io_info, type_info, file_space, &storage->list[i].sub_dset[j]) < 0) HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to write to source dataset") } //VDSINC } /* end if */ else /* Write to source dataset */ - if(H5D__virtual_write_one(io_info, type_info, file_space, &storage->list[i], &storage->list[i].source_dset) < 0) + if(H5D__virtual_write_one(io_info, type_info, file_space, &storage->list[i].source_dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to write to source dataset") } /* end for */ diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 47f45a7..33c35ed 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -318,6 +318,12 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED * mesg->storage.u.virt.list[i].clip_size_source = HSIZE_UNDEF; mesg->storage.u.virt.list[i].clip_size_virtual = HSIZE_UNDEF; + /* Clipped selections */ + if(mesg->storage.u.virt.list[i].unlim_dim_virtual < 0) { + mesg->storage.u.virt.list[i].source_dset.clipped_source_select = mesg->storage.u.virt.list[i].source_select; + mesg->storage.u.virt.list[i].source_dset.clipped_virtual_select = mesg->storage.u.virt.list[i].source_dset.virtual_select; + } /* end if */ + /* Update min_dims */ if(H5D_virtual_update_min_dims(mesg, i) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to update virtual dataset minimum dimensions") diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 817ad00..604dd73 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -420,6 +420,8 @@ typedef struct H5O_storage_virtual_srcdset_t { struct H5S_t *virtual_select; /* Selection in the virtual dataset that is mapped to source selection */ /* Not stored */ + struct H5S_t *clipped_source_select; /* Clipped version of source_select */ + struct H5S_t *clipped_virtual_select; /* Clipped version of virtual_select */ struct H5D_t *dset; /* Source dataset */ /* Temporary - only used during I/O operation, NULL at all other times */ @@ -476,6 +478,7 @@ typedef struct H5O_storage_virtual_t { hsize_t min_dims[H5S_MAX_RANK]; /* Minimum extent of VDS (maximum of all non-unlimited selection bounds) */ H5D_vds_view_t view; /* Method for calculating the extent of the virtual dataset with unlimited selections */ hsize_t printf_gap; /* Maximum number of sequential missing source datasets before terminating the search for more */ + hbool_t init; /* Whether all information has been completely initialized */ } H5O_storage_virtual_t; typedef struct H5O_storage_t { diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 37928a4..5f3e9ef 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -57,7 +57,7 @@ #define H5D_DEF_STORAGE_CONTIG_INIT {HADDR_UNDEF, (hsize_t)0} #define H5D_DEF_STORAGE_CHUNK_INIT {H5D_CHUNK_IDX_BTREE, HADDR_UNDEF, NULL, {{HADDR_UNDEF, NULL}}} #define H5D_DEF_LAYOUT_CHUNK_INIT {(unsigned)0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, (uint32_t)0, (hsize_t)0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}} -#define H5D_DEF_STORAGE_VIRTUAL_INIT {{HADDR_UNDEF, 0}, 0, NULL, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, H5D_VDS_ERROR, HSIZE_UNDEF} +#define H5D_DEF_STORAGE_VIRTUAL_INIT {{HADDR_UNDEF, 0}, 0, NULL, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, H5D_VDS_ERROR, HSIZE_UNDEF, FALSE} #ifdef H5_HAVE_C99_DESIGNATED_INITIALIZER #define H5D_DEF_STORAGE_COMPACT {H5D_COMPACT, { .compact = H5D_DEF_STORAGE_COMPACT_INIT }} #define H5D_DEF_STORAGE_CONTIG {H5D_CONTIGUOUS, { .contig = H5D_DEF_STORAGE_CONTIG_INIT }} @@ -1689,6 +1689,11 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source dataset name") ent->unlim_dim_source = H5S_get_select_unlim_dim(src_space); ent->unlim_dim_virtual = H5S_get_select_unlim_dim(vspace); + if(ent->unlim_dim_virtual < 0) { + ent->source_dset.clipped_source_select = ent->source_select; + ent->source_dset.clipped_virtual_select = ent->source_dset.virtual_select; + } /* end if */ + ent->unlim_extent_source = HSIZE_UNDEF; ent->unlim_extent_virtual = HSIZE_UNDEF; ent->clip_size_source = HSIZE_UNDEF; diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 6cc78a9..db81211 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -9317,7 +9317,15 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, HDassert(proj_space); /* Assert that src_space and src_intersect_space have same extent and there - * are no point selections? */ + * are no point selections */ + HDassert(H5S_GET_EXTENT_NDIMS(src_space) + == H5S_GET_EXTENT_NDIMS(src_intersect_space)); + HDassert(!HDmemcmp(src_space->extent.size, src_intersect_space->extent.size, + (size_t)H5S_GET_EXTENT_NDIMS(src_space) + * sizeof(src_space->extent.size[0]))); + HDassert(H5S_GET_SELECT_TYPE(src_space) != H5S_SEL_POINTS); + HDassert(H5S_GET_SELECT_TYPE(dst_space) != H5S_SEL_POINTS); + HDassert(H5S_GET_SELECT_TYPE(src_intersect_space) != H5S_SEL_POINTS); /* Initialize prev_space, curr_span_tree, and curr_span_up_dim */ for(i = 0; i < H5S_MAX_RANK; i++) { @@ -9757,16 +9765,13 @@ done: Non-negative on success/Negative on failure. DESCRIPTION This function recalculates the internal description of the hyperslab - to make the unlimited dimension extend to the specified extent. if - superset is TRUE, then the hyperslab can be clipped to a size equal to - or greater than clip_size. + to make the unlimited dimension extend to the specified extent. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS - Note this function takes the offset into account. EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -static void +void H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, hsize_t *block, hssize_t offset, hsize_t clip_size) { @@ -9796,7 +9801,7 @@ H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, } /* end else */ FUNC_LEAVE_NOAPI_VOID -} /* end H5S__hyper_get_clip_diminfo() */ +} /* end H5S_hyper_get_clip_diminfo() */ /*-------------------------------------------------------------------------- @@ -9811,10 +9816,7 @@ H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, Non-negative on success/Negative on failure. DESCRIPTION This function recalculates the internal description of the hyperslab - to make the unlimited dimension extend to the specified extent. if - superset is TRUE, then the hyperslab can be clipped to a size equal to - or greater than clip_size. If include_offset is TRUE, then the offset - is taken into account. + to make the unlimited dimension extend to the specified extent. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS Note this function takes the offset into account. @@ -9882,7 +9884,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) /* Check if last block is partial. If superset is set, just keep the * last block complete to speed computation. */ if(((diminfo->stride * (diminfo->count - (hsize_t)1)) + diminfo->block) - > ((hsize_t)((hssize_t)clip_size - ((hssize_t)diminfo->start + > ((hsize_t)((hssize_t)clip_size - ((hssize_t)diminfo->start + space->select.offset[hslab->unlim_dim])))) { hsize_t start[H5S_MAX_RANK]; hsize_t block[H5S_MAX_RANK]; @@ -10147,6 +10149,64 @@ done: /*-------------------------------------------------------------------------- NAME + H5S_hyper_get_first_inc_block + PURPOSE + VDSINC + USAGE + VDSINC + RETURNS + Index of first incomplete block in clip_size (never fails). + DESCRIPTION + VDSINC + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + Note this assumes the offset has been normalized. + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +hsize_t +H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, + hbool_t *partial) +{ + H5S_hyper_sel_t *hslab; /* Convenience pointer to hyperslab info */ + H5S_hyper_dim_t *diminfo; /* Convenience pointer to opt_diminfo in unlimited dimension */ + hsize_t ret_value; + + FUNC_ENTER_NOAPI_NOERR + + /* Check parameters */ + HDassert(space); + hslab = space->select.sel_info.hslab; + HDassert(hslab); + HDassert(hslab->unlim_dim >= 0); + HDassert(hslab->opt_unlim_diminfo[hslab->unlim_dim].count == H5S_UNLIMITED); + HDassert(partial); + + diminfo = &hslab->opt_unlim_diminfo[hslab->unlim_dim]; + + /* Check for selection outside of clip_size */ + if(diminfo->start >= clip_size) { + ret_value = 0; + partial = FALSE; + } /* end if */ + else { + /* Calculate index of first incomplete block */ + ret_value = (clip_size - diminfo->start + diminfo->stride + - diminfo->block) / diminfo->stride; + + /* Check for partial block */ + if((diminfo->stride * ret_value) < (clip_size - diminfo->start)) + *partial = TRUE; + else + *partial = FALSE; + } /* end else */ + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5S_hyper_get_first_inc_block */ + + +/*-------------------------------------------------------------------------- + NAME H5Sis_regular_hyperslab PURPOSE Determine if a hyperslab selection is regular diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 976c968..48fdf62 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -273,6 +273,8 @@ H5_DLL herr_t H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, hsize_t *clip_size, hbool_t incl_trail); H5_DLL H5S_t *H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index); +H5_DLL hsize_t H5S_hyper_get_first_inc_block(const H5S_t *space, + hsize_t clip_size, hbool_t *partial); /* Operations on selection iterators */ H5_DLL herr_t H5S_select_iter_init(H5S_sel_iter_t *iter, const H5S_t *space, size_t elmt_size); diff --git a/test/vds.c b/test/vds.c index e6a57c2..b64e09b 100644 --- a/test/vds.c +++ b/test/vds.c @@ -948,8 +948,8 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR dcpl = -1; - PASSED(); - return 0; + PASSED(); + return 0; error: H5E_BEGIN_TRY { @@ -2747,8 +2747,8 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR dcpl = -1; - PASSED(); - return 0; + PASSED(); + return 0; error: H5E_BEGIN_TRY { @@ -5110,8 +5110,8 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR memspace = -1; - PASSED(); - return 0; + PASSED(); + return 0; error: H5E_BEGIN_TRY { @@ -7504,19 +7504,702 @@ test_printf(unsigned config, hid_t fapl) vspace[1] = -1; - /* Close */ - if(H5Pclose(dcpl) < 0) + /* + * Test 6: 2 Source mappings, side-by-side, 5x5 and 5x10 blocks + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) TEST_ERROR - dcpl = -1; - if(H5Pclose(dapl) < 0) + + /* Create virtual dataspaces */ + dims[0] = 10; + dims[1] = 10; + if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) TEST_ERROR - dapl = -1; - if(H5Sclose(memspace) < 0) + if((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + + /* Create source dataspace (1 dimensional) */ + dims[0] = 50; + if((srcspace = H5Screate_simple(1, dims, NULL)) < 0) + TEST_ERROR + + /* Select hyperslab in source space */ + count[0] = 25; + if(H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual spaces */ + stride[0] = 1; + stride[1] = 5; + count[0] = 1; + count[1] = H5S_UNLIMITED; + block[0] = 5; + block[1] = 5; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + start[0] = 5; + stride[1] = 10; + block[1] = 10; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + start[0] = 0; + + /* Add virtual layout mappings (select ALL in source space for second + * mapping) */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset_a%b", srcspace) < 0) + TEST_ERROR + if(H5Sselect_all(srcspace) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset_b%b", srcspace) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Close srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 0) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Reopen srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create 2 source datasets */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset_a0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset_b0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] = (i * (int)mdims[1]) + j; + + /* Initialize erbuf */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + erbuf[i][j] = fill; + + /* Write to srcdset[0] */ + block[0] = 5; + block[1] = 5; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + count[0] = 25; + if(H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 5; i++) + for(j = 0; j < 5; j++) + erbuf[i][j] = buf[i][j]; + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[1] */ + block[1] = 10; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Sselect_all(srcspace) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 5; i++) + for(j = 0; j < 10; j++) + erbuf[i + 5][j] = buf[i][j]; + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file + * as well if config option specified */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) + TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - memspace = -1; - PASSED(); - return 0; + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions. Make sure that the 4th slice is no longer + * visible due to the change to H5D_VDS_FIRST_MISSING. */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 5) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Reopen srcfile if config option specified */ + if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create 3rd source dataset */ + if((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset_a1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[2] */ + block[1] = 5; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 5; i++) + for(j = 0; j < 5; j++) + erbuf[i][j + 5] = buf[i][j]; + + /* Close srcdset[2] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[2]) < 0) + TEST_ERROR + srcdset[2] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file + * as well if config option specified */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) + TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions. There should be no change. */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Reopen srcfile if config option specified */ + if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create 4th source dataset */ + if((srcdset[3] = H5Dcreate2(srcfile[0], "src_dset_a2", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[3] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 5; i++) + for(j = 0; j < 5; j++) + erbuf[i][j + 10] = buf[i][j]; + + /* Close srcdset[3] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[3]) < 0) + TEST_ERROR + srcdset[3] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 15) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file + * as well if config option specified */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) + TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Reset dapl */ + if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) + TEST_ERROR + + /* Close */ + if(!(config & TEST_IO_CLOSE_SRC)) { + for(i = 0; i < 4; i++) { + if(H5Dclose(srcdset[i]) < 0) + TEST_ERROR + srcdset[i] = -1; + } /* end for */ + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + else if(!(config & TEST_IO_DIFFERENT_FILE)) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace) < 0) + TEST_ERROR + srcspace = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + if(H5Sclose(vspace[1]) < 0) + TEST_ERROR + vspace[1] = -1; + + + /* Close */ + if(H5Pclose(dcpl) < 0) + TEST_ERROR + dcpl = -1; + if(H5Pclose(dapl) < 0) + TEST_ERROR + dapl = -1; + if(H5Sclose(memspace) < 0) + TEST_ERROR + memspace = -1; + + PASSED(); + return 0; error: H5E_BEGIN_TRY { -- cgit v0.12 From 78e128c544064ba4861a3eb7a72908e7ae7916eb Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 12 Jun 2015 16:29:20 -0500 Subject: [svn-r27195] Add h5dump cmake tests and files. Add tools gen cmake files move testfiles for pbits to subdir as well as vds Tested: local linux --- MANIFEST | 146 +++--- test/vds.c | 2 +- tools/h5dump/CMakeLists.txt | 4 +- tools/h5dump/CMakeTestsPBITS.cmake | 146 +++--- tools/h5dump/CMakeTestsVDS.cmake | 221 +++++++++ tools/h5dump/testh5dumppbits.sh.in | 128 +++--- tools/h5dump/testh5dumpvds.sh.in | 501 +++++++++++++++++++++ tools/lib/h5tools_dump.c | 155 +++---- tools/misc/CMakeLists.txt | 3 + tools/misc/vds/CMakeLists.txt | 28 ++ .../pbits/tnofilename-with-packed-bits.ddl | 136 ++++++ tools/testfiles/pbits/tpbitsArray.ddl | 14 + tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl | 18 + tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl | 18 + tools/testfiles/pbits/tpbitsCompound.ddl | 66 +++ tools/testfiles/pbits/tpbitsIncomplete.ddl | 136 ++++++ tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl | 18 + tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl | 18 + tools/testfiles/pbits/tpbitsLengthExceeded.ddl | 136 ++++++ tools/testfiles/pbits/tpbitsLengthPositive.ddl | 136 ++++++ tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl | 26 ++ tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl | 26 ++ tools/testfiles/pbits/tpbitsMax.ddl | 94 ++++ tools/testfiles/pbits/tpbitsMaxExceeded.ddl | 136 ++++++ tools/testfiles/pbits/tpbitsOffsetExceeded.ddl | 136 ++++++ tools/testfiles/pbits/tpbitsOffsetNegative.ddl | 136 ++++++ tools/testfiles/pbits/tpbitsOverlapped.ddl | 50 ++ tools/testfiles/pbits/tpbitsSigned.ddl | 28 ++ tools/testfiles/pbits/tpbitsSigned2.ddl | 50 ++ tools/testfiles/pbits/tpbitsSigned4.ddl | 28 ++ tools/testfiles/pbits/tpbitsSignedInt.ddl | 28 ++ tools/testfiles/pbits/tpbitsSignedInt4.ddl | 50 ++ tools/testfiles/pbits/tpbitsSignedInt8.ddl | 34 ++ tools/testfiles/pbits/tpbitsSignedIntWhole.ddl | 25 + tools/testfiles/pbits/tpbitsSignedLong.ddl | 44 ++ tools/testfiles/pbits/tpbitsSignedLong16.ddl | 67 +++ tools/testfiles/pbits/tpbitsSignedLong8.ddl | 96 ++++ tools/testfiles/pbits/tpbitsSignedLongLong.ddl | 68 +++ tools/testfiles/pbits/tpbitsSignedLongLong16.ddl | 196 ++++++++ tools/testfiles/pbits/tpbitsSignedLongLong32.ddl | 175 +++++++ .../testfiles/pbits/tpbitsSignedLongLongWhole.ddl | 121 +++++ .../testfiles/pbits/tpbitsSignedLongLongWhole1.ddl | 175 +++++++ .../pbits/tpbitsSignedLongLongWhole63.ddl | 172 +++++++ tools/testfiles/pbits/tpbitsSignedLongWhole.ddl | 46 ++ tools/testfiles/pbits/tpbitsSignedWhole.ddl | 17 + tools/testfiles/pbits/tpbitsUnsigned.ddl | 28 ++ tools/testfiles/pbits/tpbitsUnsigned2.ddl | 50 ++ tools/testfiles/pbits/tpbitsUnsigned4.ddl | 28 ++ tools/testfiles/pbits/tpbitsUnsignedInt.ddl | 28 ++ tools/testfiles/pbits/tpbitsUnsignedInt4.ddl | 50 ++ tools/testfiles/pbits/tpbitsUnsignedInt8.ddl | 34 ++ tools/testfiles/pbits/tpbitsUnsignedIntWhole.ddl | 25 + tools/testfiles/pbits/tpbitsUnsignedLong.ddl | 44 ++ tools/testfiles/pbits/tpbitsUnsignedLong16.ddl | 67 +++ tools/testfiles/pbits/tpbitsUnsignedLong8.ddl | 96 ++++ tools/testfiles/pbits/tpbitsUnsignedLongLong.ddl | 68 +++ tools/testfiles/pbits/tpbitsUnsignedLongLong16.ddl | 196 ++++++++ tools/testfiles/pbits/tpbitsUnsignedLongLong32.ddl | 175 +++++++ .../pbits/tpbitsUnsignedLongLongWhole.ddl | 176 ++++++++ .../pbits/tpbitsUnsignedLongLongWhole1.ddl | 175 +++++++ .../pbits/tpbitsUnsignedLongLongWhole63.ddl | 172 +++++++ tools/testfiles/pbits/tpbitsUnsignedLongWhole.ddl | 59 +++ tools/testfiles/pbits/tpbitsUnsignedWhole.ddl | 17 + tools/testfiles/tnofilename-with-packed-bits.ddl | 136 ------ tools/testfiles/tpbitsArray.ddl | 14 - tools/testfiles/tpbitsCharLengthExceeded.ddl | 18 - tools/testfiles/tpbitsCharOffsetExceeded.ddl | 18 - tools/testfiles/tpbitsCompound.ddl | 66 --- tools/testfiles/tpbitsIncomplete.ddl | 136 ------ tools/testfiles/tpbitsIntLengthExceeded.ddl | 18 - tools/testfiles/tpbitsIntOffsetExceeded.ddl | 18 - tools/testfiles/tpbitsLengthExceeded.ddl | 136 ------ tools/testfiles/tpbitsLengthPositive.ddl | 136 ------ tools/testfiles/tpbitsLongLengthExceeded.ddl | 26 -- tools/testfiles/tpbitsLongOffsetExceeded.ddl | 26 -- tools/testfiles/tpbitsMax.ddl | 94 ---- tools/testfiles/tpbitsMaxExceeded.ddl | 136 ------ tools/testfiles/tpbitsOffsetExceeded.ddl | 136 ------ tools/testfiles/tpbitsOffsetNegative.ddl | 136 ------ tools/testfiles/tpbitsOverlapped.ddl | 50 -- tools/testfiles/tpbitsSigned.ddl | 28 -- tools/testfiles/tpbitsSigned2.ddl | 50 -- tools/testfiles/tpbitsSigned4.ddl | 28 -- tools/testfiles/tpbitsSignedInt.ddl | 28 -- tools/testfiles/tpbitsSignedInt4.ddl | 50 -- tools/testfiles/tpbitsSignedInt8.ddl | 34 -- tools/testfiles/tpbitsSignedIntWhole.ddl | 25 - tools/testfiles/tpbitsSignedLong.ddl | 44 -- tools/testfiles/tpbitsSignedLong16.ddl | 67 --- tools/testfiles/tpbitsSignedLong8.ddl | 96 ---- tools/testfiles/tpbitsSignedLongLong.ddl | 68 --- tools/testfiles/tpbitsSignedLongLong16.ddl | 196 -------- tools/testfiles/tpbitsSignedLongLong32.ddl | 175 ------- tools/testfiles/tpbitsSignedLongLongWhole.ddl | 121 ----- tools/testfiles/tpbitsSignedLongLongWhole1.ddl | 175 ------- tools/testfiles/tpbitsSignedLongLongWhole63.ddl | 172 ------- tools/testfiles/tpbitsSignedLongWhole.ddl | 46 -- tools/testfiles/tpbitsSignedWhole.ddl | 17 - tools/testfiles/tpbitsUnsigned.ddl | 28 -- tools/testfiles/tpbitsUnsigned2.ddl | 50 -- tools/testfiles/tpbitsUnsigned4.ddl | 28 -- tools/testfiles/tpbitsUnsignedInt.ddl | 28 -- tools/testfiles/tpbitsUnsignedInt4.ddl | 50 -- tools/testfiles/tpbitsUnsignedInt8.ddl | 34 -- tools/testfiles/tpbitsUnsignedIntWhole.ddl | 25 - tools/testfiles/tpbitsUnsignedLong.ddl | 44 -- tools/testfiles/tpbitsUnsignedLong16.ddl | 67 --- tools/testfiles/tpbitsUnsignedLong8.ddl | 96 ---- tools/testfiles/tpbitsUnsignedLongLong.ddl | 68 --- tools/testfiles/tpbitsUnsignedLongLong16.ddl | 196 -------- tools/testfiles/tpbitsUnsignedLongLong32.ddl | 175 ------- tools/testfiles/tpbitsUnsignedLongLongWhole.ddl | 176 -------- tools/testfiles/tpbitsUnsignedLongLongWhole1.ddl | 175 ------- tools/testfiles/tpbitsUnsignedLongLongWhole63.ddl | 172 ------- tools/testfiles/tpbitsUnsignedLongWhole.ddl | 59 --- tools/testfiles/tpbitsUnsignedWhole.ddl | 17 - tools/testfiles/vds/1_a.h5 | Bin 0 -> 4856 bytes tools/testfiles/vds/1_b.h5 | Bin 0 -> 4611 bytes tools/testfiles/vds/1_c.h5 | Bin 0 -> 4856 bytes tools/testfiles/vds/1_d.h5 | Bin 0 -> 4611 bytes tools/testfiles/vds/1_e.h5 | Bin 0 -> 4856 bytes tools/testfiles/vds/1_f.h5 | Bin 0 -> 4611 bytes tools/testfiles/vds/1_vds.h5 | Bin 0 -> 5496 bytes tools/testfiles/vds/2_a.h5 | Bin 0 -> 4576 bytes tools/testfiles/vds/2_b.h5 | Bin 0 -> 4578 bytes tools/testfiles/vds/2_c.h5 | Bin 0 -> 4576 bytes tools/testfiles/vds/2_d.h5 | Bin 0 -> 4578 bytes tools/testfiles/vds/2_e.h5 | Bin 0 -> 4578 bytes tools/testfiles/vds/2_vds.h5 | Bin 0 -> 5496 bytes tools/testfiles/vds/3_1_vds.h5 | Bin 0 -> 5496 bytes tools/testfiles/vds/3_2_vds.h5 | Bin 0 -> 5496 bytes tools/testfiles/vds/4_0.h5 | Bin 0 -> 4581 bytes tools/testfiles/vds/4_1.h5 | Bin 0 -> 4581 bytes tools/testfiles/vds/4_2.h5 | Bin 0 -> 4581 bytes tools/testfiles/vds/4_vds.h5 | Bin 0 -> 5496 bytes tools/testfiles/vds/5_a.h5 | Bin 0 -> 4581 bytes tools/testfiles/vds/5_b.h5 | Bin 0 -> 4581 bytes tools/testfiles/vds/5_c.h5 | Bin 0 -> 4581 bytes tools/testfiles/vds/5_vds.h5 | Bin 0 -> 5496 bytes tools/testfiles/vds/tvds-1.ddl | 100 ++++ tools/testfiles/vds/tvds-2.ddl | 58 +++ tools/testfiles/vds/tvds-3_1.ddl | 135 ++++++ tools/testfiles/vds/tvds-3_2.ddl | 166 +++++++ tools/testfiles/vds/tvds-4.ddl | 46 ++ tools/testfiles/vds/tvds-5.ddl | 46 ++ tools/testfiles/vds/tvds_layout-1.ddl | 232 ++++++++++ tools/testfiles/vds/tvds_layout-2.ddl | 170 +++++++ tools/testfiles/vds/tvds_layout-3_1.ddl | 267 +++++++++++ tools/testfiles/vds/tvds_layout-3_2.ddl | 278 ++++++++++++ tools/testfiles/vds/tvds_layout-4.ddl | 78 ++++ tools/testfiles/vds/tvds_layout-5.ddl | 118 +++++ 151 files changed, 6968 insertions(+), 4476 deletions(-) create mode 100644 tools/h5dump/CMakeTestsVDS.cmake create mode 100644 tools/h5dump/testh5dumpvds.sh.in create mode 100644 tools/misc/vds/CMakeLists.txt create mode 100644 tools/testfiles/pbits/tnofilename-with-packed-bits.ddl create mode 100644 tools/testfiles/pbits/tpbitsArray.ddl create mode 100644 tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl create mode 100644 tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl create mode 100644 tools/testfiles/pbits/tpbitsCompound.ddl create mode 100644 tools/testfiles/pbits/tpbitsIncomplete.ddl create mode 100644 tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl create mode 100644 tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl create mode 100644 tools/testfiles/pbits/tpbitsLengthExceeded.ddl create mode 100644 tools/testfiles/pbits/tpbitsLengthPositive.ddl create mode 100644 tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl create mode 100644 tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl create mode 100644 tools/testfiles/pbits/tpbitsMax.ddl create mode 100644 tools/testfiles/pbits/tpbitsMaxExceeded.ddl create mode 100644 tools/testfiles/pbits/tpbitsOffsetExceeded.ddl create mode 100644 tools/testfiles/pbits/tpbitsOffsetNegative.ddl create mode 100644 tools/testfiles/pbits/tpbitsOverlapped.ddl create mode 100644 tools/testfiles/pbits/tpbitsSigned.ddl create mode 100644 tools/testfiles/pbits/tpbitsSigned2.ddl create mode 100644 tools/testfiles/pbits/tpbitsSigned4.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedInt.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedInt4.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedInt8.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedIntWhole.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedLong.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedLong16.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedLong8.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedLongLong.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedLongLong16.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedLongLong32.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedLongLongWhole.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedLongLongWhole1.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedLongLongWhole63.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedLongWhole.ddl create mode 100644 tools/testfiles/pbits/tpbitsSignedWhole.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsigned.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsigned2.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsigned4.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedInt.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedInt4.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedInt8.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedIntWhole.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedLong.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedLong16.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedLong8.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedLongLong.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedLongLong16.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedLongLong32.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedLongLongWhole.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedLongLongWhole1.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedLongLongWhole63.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedLongWhole.ddl create mode 100644 tools/testfiles/pbits/tpbitsUnsignedWhole.ddl delete mode 100644 tools/testfiles/tnofilename-with-packed-bits.ddl delete mode 100644 tools/testfiles/tpbitsArray.ddl delete mode 100644 tools/testfiles/tpbitsCharLengthExceeded.ddl delete mode 100644 tools/testfiles/tpbitsCharOffsetExceeded.ddl delete mode 100644 tools/testfiles/tpbitsCompound.ddl delete mode 100644 tools/testfiles/tpbitsIncomplete.ddl delete mode 100644 tools/testfiles/tpbitsIntLengthExceeded.ddl delete mode 100644 tools/testfiles/tpbitsIntOffsetExceeded.ddl delete mode 100644 tools/testfiles/tpbitsLengthExceeded.ddl delete mode 100644 tools/testfiles/tpbitsLengthPositive.ddl delete mode 100644 tools/testfiles/tpbitsLongLengthExceeded.ddl delete mode 100644 tools/testfiles/tpbitsLongOffsetExceeded.ddl delete mode 100644 tools/testfiles/tpbitsMax.ddl delete mode 100644 tools/testfiles/tpbitsMaxExceeded.ddl delete mode 100644 tools/testfiles/tpbitsOffsetExceeded.ddl delete mode 100644 tools/testfiles/tpbitsOffsetNegative.ddl delete mode 100644 tools/testfiles/tpbitsOverlapped.ddl delete mode 100644 tools/testfiles/tpbitsSigned.ddl delete mode 100644 tools/testfiles/tpbitsSigned2.ddl delete mode 100644 tools/testfiles/tpbitsSigned4.ddl delete mode 100644 tools/testfiles/tpbitsSignedInt.ddl delete mode 100644 tools/testfiles/tpbitsSignedInt4.ddl delete mode 100644 tools/testfiles/tpbitsSignedInt8.ddl delete mode 100644 tools/testfiles/tpbitsSignedIntWhole.ddl delete mode 100644 tools/testfiles/tpbitsSignedLong.ddl delete mode 100644 tools/testfiles/tpbitsSignedLong16.ddl delete mode 100644 tools/testfiles/tpbitsSignedLong8.ddl delete mode 100644 tools/testfiles/tpbitsSignedLongLong.ddl delete mode 100644 tools/testfiles/tpbitsSignedLongLong16.ddl delete mode 100644 tools/testfiles/tpbitsSignedLongLong32.ddl delete mode 100644 tools/testfiles/tpbitsSignedLongLongWhole.ddl delete mode 100644 tools/testfiles/tpbitsSignedLongLongWhole1.ddl delete mode 100644 tools/testfiles/tpbitsSignedLongLongWhole63.ddl delete mode 100644 tools/testfiles/tpbitsSignedLongWhole.ddl delete mode 100644 tools/testfiles/tpbitsSignedWhole.ddl delete mode 100644 tools/testfiles/tpbitsUnsigned.ddl delete mode 100644 tools/testfiles/tpbitsUnsigned2.ddl delete mode 100644 tools/testfiles/tpbitsUnsigned4.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedInt.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedInt4.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedInt8.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedIntWhole.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedLong.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedLong16.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedLong8.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedLongLong.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedLongLong16.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedLongLong32.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedLongLongWhole.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedLongLongWhole1.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedLongLongWhole63.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedLongWhole.ddl delete mode 100644 tools/testfiles/tpbitsUnsignedWhole.ddl create mode 100644 tools/testfiles/vds/1_a.h5 create mode 100644 tools/testfiles/vds/1_b.h5 create mode 100644 tools/testfiles/vds/1_c.h5 create mode 100644 tools/testfiles/vds/1_d.h5 create mode 100644 tools/testfiles/vds/1_e.h5 create mode 100644 tools/testfiles/vds/1_f.h5 create mode 100644 tools/testfiles/vds/1_vds.h5 create mode 100644 tools/testfiles/vds/2_a.h5 create mode 100644 tools/testfiles/vds/2_b.h5 create mode 100644 tools/testfiles/vds/2_c.h5 create mode 100644 tools/testfiles/vds/2_d.h5 create mode 100644 tools/testfiles/vds/2_e.h5 create mode 100644 tools/testfiles/vds/2_vds.h5 create mode 100644 tools/testfiles/vds/3_1_vds.h5 create mode 100644 tools/testfiles/vds/3_2_vds.h5 create mode 100644 tools/testfiles/vds/4_0.h5 create mode 100644 tools/testfiles/vds/4_1.h5 create mode 100644 tools/testfiles/vds/4_2.h5 create mode 100644 tools/testfiles/vds/4_vds.h5 create mode 100644 tools/testfiles/vds/5_a.h5 create mode 100644 tools/testfiles/vds/5_b.h5 create mode 100644 tools/testfiles/vds/5_c.h5 create mode 100644 tools/testfiles/vds/5_vds.h5 create mode 100644 tools/testfiles/vds/tvds-1.ddl create mode 100644 tools/testfiles/vds/tvds-2.ddl create mode 100644 tools/testfiles/vds/tvds-3_1.ddl create mode 100644 tools/testfiles/vds/tvds-3_2.ddl create mode 100644 tools/testfiles/vds/tvds-4.ddl create mode 100644 tools/testfiles/vds/tvds-5.ddl create mode 100644 tools/testfiles/vds/tvds_layout-1.ddl create mode 100644 tools/testfiles/vds/tvds_layout-2.ddl create mode 100644 tools/testfiles/vds/tvds_layout-3_1.ddl create mode 100644 tools/testfiles/vds/tvds_layout-3_2.ddl create mode 100644 tools/testfiles/vds/tvds_layout-4.ddl create mode 100644 tools/testfiles/vds/tvds_layout-5.ddl diff --git a/MANIFEST b/MANIFEST index 3089132..3922bc6 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1177,6 +1177,7 @@ ./tools/h5dump/testh5dump.sh.in ./tools/h5dump/testh5dumppbits.sh.in ./tools/h5dump/testh5dumpxml.sh.in +./tools/h5dump/testh5dumpvds.sh.in ./tools/h5dump/binread.c ./tools/h5import/Makefile.am @@ -1701,60 +1702,97 @@ ./tools/h5dump/errfiles/tslink-D.err # h5dump packed bits validation -./tools/testfiles/tnofilename-with-packed-bits.ddl -./tools/testfiles/tpbitsLengthPositive.ddl -./tools/testfiles/tpbitsMaxExceeded.ddl -./tools/testfiles/tpbitsSigned.ddl -./tools/testfiles/tpbitsSigned2.ddl -./tools/testfiles/tpbitsSigned4.ddl -./tools/testfiles/tpbitsSignedWhole.ddl -./tools/testfiles/tpbitsSignedInt.ddl -./tools/testfiles/tpbitsSignedInt4.ddl -./tools/testfiles/tpbitsSignedInt8.ddl -./tools/testfiles/tpbitsSignedIntWhole.ddl -./tools/testfiles/tpbitsSignedLong.ddl -./tools/testfiles/tpbitsSignedLong8.ddl -./tools/testfiles/tpbitsSignedLong16.ddl -./tools/testfiles/tpbitsSignedLongWhole.ddl -./tools/testfiles/tpbitsSignedLongLong.ddl -./tools/testfiles/tpbitsSignedLongLong16.ddl -./tools/testfiles/tpbitsSignedLongLong32.ddl -./tools/testfiles/tpbitsSignedLongLongWhole.ddl -./tools/testfiles/tpbitsSignedLongLongWhole1.ddl -./tools/testfiles/tpbitsSignedLongLongWhole63.ddl -./tools/testfiles/tpbitsOffsetNegative.ddl -./tools/testfiles/tpbitsUnsigned.ddl -./tools/testfiles/tpbitsUnsigned2.ddl -./tools/testfiles/tpbitsUnsigned4.ddl -./tools/testfiles/tpbitsUnsignedWhole.ddl -./tools/testfiles/tpbitsUnsignedInt.ddl -./tools/testfiles/tpbitsUnsignedInt4.ddl -./tools/testfiles/tpbitsUnsignedInt8.ddl -./tools/testfiles/tpbitsUnsignedIntWhole.ddl -./tools/testfiles/tpbitsUnsignedLong.ddl -./tools/testfiles/tpbitsUnsignedLong8.ddl -./tools/testfiles/tpbitsUnsignedLong16.ddl -./tools/testfiles/tpbitsUnsignedLongWhole.ddl -./tools/testfiles/tpbitsUnsignedLongLong.ddl -./tools/testfiles/tpbitsUnsignedLongLong16.ddl -./tools/testfiles/tpbitsUnsignedLongLong32.ddl -./tools/testfiles/tpbitsUnsignedLongLongWhole.ddl -./tools/testfiles/tpbitsUnsignedLongLongWhole1.ddl -./tools/testfiles/tpbitsUnsignedLongLongWhole63.ddl -./tools/testfiles/tpbitsMax.ddl +./tools/testfiles/pbits/tnofilename-with-packed-bits.ddl +./tools/testfiles/pbits/tpbitsLengthPositive.ddl +./tools/testfiles/pbits/tpbitsMaxExceeded.ddl +./tools/testfiles/pbits/tpbitsSigned.ddl +./tools/testfiles/pbits/tpbitsSigned2.ddl +./tools/testfiles/pbits/tpbitsSigned4.ddl +./tools/testfiles/pbits/tpbitsSignedWhole.ddl +./tools/testfiles/pbits/tpbitsSignedInt.ddl +./tools/testfiles/pbits/tpbitsSignedInt4.ddl +./tools/testfiles/pbits/tpbitsSignedInt8.ddl +./tools/testfiles/pbits/tpbitsSignedIntWhole.ddl +./tools/testfiles/pbits/tpbitsSignedLong.ddl +./tools/testfiles/pbits/tpbitsSignedLong8.ddl +./tools/testfiles/pbits/tpbitsSignedLong16.ddl +./tools/testfiles/pbits/tpbitsSignedLongWhole.ddl +./tools/testfiles/pbits/tpbitsSignedLongLong.ddl +./tools/testfiles/pbits/tpbitsSignedLongLong16.ddl +./tools/testfiles/pbits/tpbitsSignedLongLong32.ddl +./tools/testfiles/pbits/tpbitsSignedLongLongWhole.ddl +./tools/testfiles/pbits/tpbitsSignedLongLongWhole1.ddl +./tools/testfiles/pbits/tpbitsSignedLongLongWhole63.ddl +./tools/testfiles/pbits/tpbitsOffsetNegative.ddl +./tools/testfiles/pbits/tpbitsUnsigned.ddl +./tools/testfiles/pbits/tpbitsUnsigned2.ddl +./tools/testfiles/pbits/tpbitsUnsigned4.ddl +./tools/testfiles/pbits/tpbitsUnsignedWhole.ddl +./tools/testfiles/pbits/tpbitsUnsignedInt.ddl +./tools/testfiles/pbits/tpbitsUnsignedInt4.ddl +./tools/testfiles/pbits/tpbitsUnsignedInt8.ddl +./tools/testfiles/pbits/tpbitsUnsignedIntWhole.ddl +./tools/testfiles/pbits/tpbitsUnsignedLong.ddl +./tools/testfiles/pbits/tpbitsUnsignedLong8.ddl +./tools/testfiles/pbits/tpbitsUnsignedLong16.ddl +./tools/testfiles/pbits/tpbitsUnsignedLongWhole.ddl +./tools/testfiles/pbits/tpbitsUnsignedLongLong.ddl +./tools/testfiles/pbits/tpbitsUnsignedLongLong16.ddl +./tools/testfiles/pbits/tpbitsUnsignedLongLong32.ddl +./tools/testfiles/pbits/tpbitsUnsignedLongLongWhole.ddl +./tools/testfiles/pbits/tpbitsUnsignedLongLongWhole1.ddl +./tools/testfiles/pbits/tpbitsUnsignedLongLongWhole63.ddl +./tools/testfiles/pbits/tpbitsMax.ddl +./tools/testfiles/pbits/tpbitsArray.ddl +./tools/testfiles/pbits/tpbitsCompound.ddl +./tools/testfiles/pbits/tpbitsIncomplete.ddl +./tools/testfiles/pbits/tpbitsLengthExceeded.ddl +./tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl +./tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl +./tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl +./tools/testfiles/pbits/tpbitsOffsetExceeded.ddl +./tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl +./tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl +./tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl +./tools/testfiles/pbits/tpbitsOverlapped.ddl ./tools/testfiles/packedbits.h5 -./tools/testfiles/tpbitsArray.ddl -./tools/testfiles/tpbitsCompound.ddl -./tools/testfiles/tpbitsIncomplete.ddl -./tools/testfiles/tpbitsLengthExceeded.ddl -./tools/testfiles/tpbitsCharLengthExceeded.ddl -./tools/testfiles/tpbitsIntLengthExceeded.ddl -./tools/testfiles/tpbitsLongLengthExceeded.ddl -./tools/testfiles/tpbitsOffsetExceeded.ddl -./tools/testfiles/tpbitsCharOffsetExceeded.ddl -./tools/testfiles/tpbitsIntOffsetExceeded.ddl -./tools/testfiles/tpbitsLongOffsetExceeded.ddl -./tools/testfiles/tpbitsOverlapped.ddl + +# h5dump vds validation +./tools/testfiles/vds/tvds-1.ddl +./tools/testfiles/vds/tvds-2.ddl +./tools/testfiles/vds/tvds-3_1.ddl +./tools/testfiles/vds/tvds-3_2.ddl +./tools/testfiles/vds/tvds-4.ddl +./tools/testfiles/vds/tvds-5.ddl +./tools/testfiles/vds/tvds_layout-1.ddl +./tools/testfiles/vds/tvds_layout-2.ddl +./tools/testfiles/vds/tvds_layout-3_1.ddl +./tools/testfiles/vds/tvds_layout-3_2.ddl +./tools/testfiles/vds/tvds_layout-4.ddl +./tools/testfiles/vds/tvds_layout-5.ddl +./tools/testfiles/vds/1_a.h5 +./tools/testfiles/vds/1_b.h5 +./tools/testfiles/vds/1_c.h5 +./tools/testfiles/vds/1_d.h5 +./tools/testfiles/vds/1_e.h5 +./tools/testfiles/vds/1_f.h5 +./tools/testfiles/vds/1_vds.h5 +./tools/testfiles/vds/2_a.h5 +./tools/testfiles/vds/2_b.h5 +./tools/testfiles/vds/2_c.h5 +./tools/testfiles/vds/2_d.h5 +./tools/testfiles/vds/2_e.h5 +./tools/testfiles/vds/2_vds.h5 +./tools/testfiles/vds/3_1_vds.h5 +./tools/testfiles/vds/3_2_vds.h5 +./tools/testfiles/vds/4_0.h5 +./tools/testfiles/vds/4_1.h5 +./tools/testfiles/vds/4_2.h5 +./tools/testfiles/vds/4_vds.h5 +./tools/testfiles/vds/5_a.h5 +./tools/testfiles/vds/5_b.h5 +./tools/testfiles/vds/5_c.h5 +./tools/testfiles/vds/5_vds.h5 # h5dump h5import validation ./tools/testfiles/out3.h5import @@ -2517,6 +2555,7 @@ ./tools/h5dump/CMakeTests.cmake ./tools/h5dump/CMakeTestsPBITS.cmake ./tools/h5dump/CMakeTestsXML.cmake +./tools/h5dump/CMakeTestsVDS.cmake ./tools/h5import/CMakeLists.txt ./tools/h5import/CMakeTests.cmake ./tools/h5jam/CMakeLists.txt @@ -2530,6 +2569,7 @@ ./tools/lib/CMakeLists.txt ./tools/misc/CMakeLists.txt ./tools/misc/CMakeTests.cmake +./tools/misc/vds/CMakeLists.txt ./tools/perform/CMakeLists.txt ./tools/perform/CMakeTests.cmake diff --git a/test/vds.c b/test/vds.c index b64e09b..5173083 100644 --- a/test/vds.c +++ b/test/vds.c @@ -8279,7 +8279,7 @@ main(void) if(nerrors) goto error; printf("All virtual dataset tests passed.\n"); - h5_cleanup(FILENAME, fapl); +// h5_cleanup(FILENAME, fapl); return 0; diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 7658c04..aa18bed 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -31,7 +31,7 @@ if (BUILD_TESTING) TARGET_C_PROPERTIES (h5dumpgentest STATIC " " " ") target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools) - + #add_test (NAME h5dumpgentest COMMAND $) endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) @@ -39,6 +39,8 @@ if (BUILD_TESTING) include (CMakeTestsPBITS.cmake) + include (CMakeTestsVDS.cmake) + include (CMakeTestsXML.cmake) endif (BUILD_TESTING) diff --git a/tools/h5dump/CMakeTestsPBITS.cmake b/tools/h5dump/CMakeTestsPBITS.cmake index 421e020..e76fa0e 100644 --- a/tools/h5dump/CMakeTestsPBITS.cmake +++ b/tools/h5dump/CMakeTestsPBITS.cmake @@ -4,65 +4,65 @@ ### T E S T I N G ### ############################################################################## ############################################################################## - + # -------------------------------------------------------------------- # Packed Bits # -------------------------------------------------------------------- #-- Copy all the HDF5 files from the test directory into the source directory set (HDF5_REFERENCE_PBITS - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnofilename-with-packed-bits.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsArray.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCompound.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIncomplete.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharLengthExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntLengthExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongLengthExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthPositive.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMax.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMaxExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharOffsetExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntOffsetExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongOffsetExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetNegative.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOverlapped.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedIntWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedIntWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole63.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole63.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt8.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt8.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong16.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong16.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong32.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong32.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong8.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong8.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong16.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong16.ddl + tnofilename-with-packed-bits.ddl + tpbitsArray.ddl + tpbitsCompound.ddl + tpbitsIncomplete.ddl + tpbitsLengthExceeded.ddl + tpbitsCharLengthExceeded.ddl + tpbitsIntLengthExceeded.ddl + tpbitsLongLengthExceeded.ddl + tpbitsLengthPositive.ddl + tpbitsMax.ddl + tpbitsMaxExceeded.ddl + tpbitsOffsetExceeded.ddl + tpbitsCharOffsetExceeded.ddl + tpbitsIntOffsetExceeded.ddl + tpbitsLongOffsetExceeded.ddl + tpbitsOffsetNegative.ddl + tpbitsOverlapped.ddl + tpbitsSigned.ddl + tpbitsUnsigned.ddl + tpbitsSignedInt.ddl + tpbitsUnsignedInt.ddl + tpbitsSignedLong.ddl + tpbitsUnsignedLong.ddl + tpbitsSignedLongLong.ddl + tpbitsUnsignedLongLong.ddl + tpbitsSignedWhole.ddl + tpbitsUnsignedWhole.ddl + tpbitsSignedIntWhole.ddl + tpbitsUnsignedIntWhole.ddl + tpbitsSignedLongWhole.ddl + tpbitsUnsignedLongWhole.ddl + tpbitsSignedLongLongWhole.ddl + tpbitsUnsignedLongLongWhole.ddl + tpbitsSignedLongLongWhole1.ddl + tpbitsUnsignedLongLongWhole1.ddl + tpbitsSignedLongLongWhole63.ddl + tpbitsUnsignedLongLongWhole63.ddl + tpbitsSigned4.ddl + tpbitsUnsigned4.ddl + tpbitsSignedInt8.ddl + tpbitsUnsignedInt8.ddl + tpbitsSignedLong16.ddl + tpbitsUnsignedLong16.ddl + tpbitsSignedLongLong32.ddl + tpbitsUnsignedLongLong32.ddl + tpbitsSigned2.ddl + tpbitsUnsigned2.ddl + tpbitsSignedInt4.ddl + tpbitsUnsignedInt4.ddl + tpbitsSignedLong8.ddl + tpbitsUnsignedLong8.ddl + tpbitsSignedLongLong16.ddl + tpbitsUnsignedLongLong16.ddl ) set (HDF5_REFERENCE_TEST_PBITS ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5 @@ -70,19 +70,19 @@ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5 ) set (HDF5_ERROR_REFERENCE_PBITS - ${PROJECT_SOURCE_DIR}/errfiles/tnofilename-with-packed-bits.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharLengthExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharOffsetExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIncomplete.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntLengthExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntOffsetExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthPositive.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongLengthExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongOffsetExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsMaxExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetNegative.err + tnofilename-with-packed-bits.err + tpbitsCharLengthExceeded.err + tpbitsCharOffsetExceeded.err + tpbitsIncomplete.err + tpbitsIntLengthExceeded.err + tpbitsIntOffsetExceeded.err + tpbitsLengthExceeded.err + tpbitsLengthPositive.err + tpbitsLongLengthExceeded.err + tpbitsLongOffsetExceeded.err + tpbitsMaxExceeded.err + tpbitsOffsetExceeded.err + tpbitsOffsetNegative.err ) foreach (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS}) @@ -96,7 +96,7 @@ ARGS -E copy_if_different ${pbits_h5_file} ${dest} ) endforeach (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS}) - + foreach (ddl_pbits ${HDF5_REFERENCE_PBITS}) GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME) @@ -106,7 +106,7 @@ TARGET h5dump POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${ddl_pbits} ${ddldest} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/pbits/${ddl_pbits} ${ddldest} ) endforeach (ddl_pbits ${HDF5_REFERENCE_PBITS}) @@ -118,10 +118,10 @@ TARGET h5dump POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${ddl_pbits} ${ddldest} + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/errfiles/${ddl_pbits} ${ddldest} ) endforeach (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS}) - + ############################################################################## ############################################################################## ### T H E T E S T S M A C R O S ### @@ -163,7 +163,7 @@ ############################################################################## ############################################################################## -### T H E T E S T S HDF5_ENABLE_USING_MEMCHECKER ### +### T H E T E S T S ### ############################################################################## ############################################################################## @@ -172,7 +172,7 @@ add_test ( NAME H5DUMP_PACKED_BITS-clearall-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove tnofilename-with-packed-bits.out tnofilename-with-packed-bits.out.err tpbitsArray.out diff --git a/tools/h5dump/CMakeTestsVDS.cmake b/tools/h5dump/CMakeTestsVDS.cmake new file mode 100644 index 0000000..17d923e --- /dev/null +++ b/tools/h5dump/CMakeTestsVDS.cmake @@ -0,0 +1,221 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + # -------------------------------------------------------------------- + # VDS + # -------------------------------------------------------------------- + #-- Copy all the HDF5 files from the test directory into the source directory + set (HDF5_REFERENCE_VDS + tvds-1.ddl + tvds-2.ddl + tvds-3_1.ddl + tvds-3_2.ddl + tvds-4.ddl + tvds-5.ddl + tvds_layout-1.ddl + tvds_layout-2.ddl + tvds_layout-3_1.ddl + tvds_layout-3_2.ddl + tvds_layout-4.ddl + tvds_layout-5.ddl + ) + set (HDF5_REFERENCE_TEST_VDS + 1_a.h5 + 1_b.h5 + 1_c.h5 + 1_d.h5 + 1_e.h5 + 1_f.h5 + 1_vds.h5 + 2_a.h5 + 2_b.h5 + 2_c.h5 + 2_d.h5 + 2_e.h5 + 2_vds.h5 + 3_1_vds.h5 + 3_2_vds.h5 + 4_0.h5 + 4_1.h5 + 4_2.h5 + 4_vds.h5 + 5_a.h5 + 5_b.h5 + 5_c.h5 + 5_vds.h5 + ) + set (HDF5_ERROR_REFERENCE_VDS + ) + + foreach (vds_h5_file ${HDF5_REFERENCE_TEST_VDS}) + GET_FILENAME_COMPONENT(fname "${vds_h5_file}" NAME) + set (dest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}") + #message (STATUS " Copying ${vds_h5_file}") + add_custom_command ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${vds_h5_file} ${dest} + ) + endforeach (vds_h5_file ${HDF5_REFERENCE_TEST_VDS}) + + + foreach (ddl_vds ${HDF5_REFERENCE_VDS}) + GET_FILENAME_COMPONENT(fname "${ddl_vds}" NAME) + set (ddldest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}") + #message (STATUS " Copying ${ddl_vds}") + add_custom_command ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${ddl_vds} ${ddldest} + ) + endforeach (ddl_vds ${HDF5_REFERENCE_VDS}) + + foreach (ddl_vds ${HDF5_ERROR_REFERENCE_VDS}) + GET_FILENAME_COMPONENT(fname "${ddl_vds}" NAME) + set (ddldest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}") + #message (STATUS " Copying ${ddl_vds}") + add_custom_command ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/errfiles/${ddl_vds} ${ddldest} + ) + endforeach (ddl_vds ${HDF5_ERROR_REFERENCE_VDS}) + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + + MACRO (ADD_H5_VDS_TEST resultfile resultcode) + # If using memchecker add tests without using scripts + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5DUMP-${resultfile} COMMAND $ ${ARGN}) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfilesvds") + if (NOT ${resultcode} STREQUAL "0") + set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") + endif (NOT ${resultcode} STREQUAL "0") + if (NOT "${last_vds_test}" STREQUAL "") + set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_VDS_test}) + endif (NOT "${last_vds_test}" STREQUAL "") + else (HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.out ${resultfile}.out.err + ) + set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds") + add_test ( + NAME H5DUMP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") + endif (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_VDS_TEST file) + + MACRO (ADD_H5_VDS_LAYOUT resultfile resultcode) + # If using memchecker add tests without using scripts + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5DUMP-${resultfile} COMMAND $ -p ${ARGN}) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfilesvds") + if (NOT ${resultcode} STREQUAL "0") + set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") + endif (NOT ${resultcode} STREQUAL "0") + if (NOT "${last_vds_test}" STREQUAL "") + set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_VDS_test}) + endif (NOT "${last_vds_test}" STREQUAL "") + else (HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.out ${resultfile}.out.err + ) + set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds") + add_test ( + NAME H5DUMP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-p;${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") + endif (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_VDS_LAYOUT file) + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## + + if (HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + add_test ( + NAME H5DUMP_VDS-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + tvds-1.out + tvds-1.out.err + tvds-2.out + tvds-2.out.err + tvds-3_1.out + tvds-3_1.out.err + tvds-3_2.out + tvds-3_2.out.err + tvds-4.out + tvds-4.out.err + tvds-5.out + tvds-5.out.err + tvds_layout-1.out + tvds_layout-1.out.err + tvds_layout-2.out + tvds_layout-2.out.err + tvds_layout-3_1.out + tvds_layout-3_1.out.err + tvds_layout-3_2.out + tvds_layout-3_2.out.err + tvds_layout-4.out + tvds_layout-4.out.err + tvds_layout-5.out + tvds_layout-5.out.err + ) + set_tests_properties (H5DUMP_VDS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds") + if (NOT "${last_vds_test}" STREQUAL "") + set_tests_properties (H5DUMP_VDS-clearall-objects PROPERTIES DEPENDS ${last_vds_test}) + endif (NOT "${last_vds_test}" STREQUAL "") + set (last_VDS_test "H5DUMP_VDS-clearall-objects") + endif (HDF5_ENABLE_USING_MEMCHECKER) + + # Data read + ADD_H5_VDS_TEST (tvds-1 0 --enable-error-stack 1_vds.h5) + ADD_H5_VDS_TEST (tvds-2 0 --enable-error-stack 2_vds.h5) + ADD_H5_VDS_TEST (tvds-3_1 0 --enable-error-stack 3_1_vds.h5) + ADD_H5_VDS_TEST (tvds-3_2 0 --enable-error-stack 3_2_vds.h5) + ADD_H5_VDS_TEST (tvds-4 0 --enable-error-stack 4_vds.h5) + ADD_H5_VDS_TEST (tvds-5 0 --enable-error-stack 5_vds.h5) + + # Layout read + ADD_H5_VDS_LAYOUT (tvds_layout-1 0 --enable-error-stack 1_vds.h5) + ADD_H5_VDS_LAYOUT (tvds_layout-2 0 --enable-error-stack 2_vds.h5) + ADD_H5_VDS_LAYOUT (tvds_layout-3_1 0 --enable-error-stack 3_1_vds.h5) + ADD_H5_VDS_LAYOUT (tvds_layout-3_2 0 --enable-error-stack 3_2_vds.h5) + ADD_H5_VDS_LAYOUT (tvds_layout-4 0 --enable-error-stack 4_vds.h5) + ADD_H5_VDS_LAYOUT (tvds_layout-5 0 --enable-error-stack 5_vds.h5) diff --git a/tools/h5dump/testh5dumppbits.sh.in b/tools/h5dump/testh5dumppbits.sh.in index 6556ff5..4211c63 100644 --- a/tools/h5dump/testh5dumppbits.sh.in +++ b/tools/h5dump/testh5dumppbits.sh.in @@ -28,10 +28,10 @@ EXIT_FAILURE=1 DUMPER=h5dump # The tool name DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary -H5DIFF=../h5diff/h5diff # The h5diff tool name +H5DIFF=../h5diff/h5diff # The h5diff tool name H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary -H5IMPORT=../h5import/h5import # The h5import tool name +H5IMPORT=../h5import/h5import # The h5import tool name H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary RM='rm -rf' @@ -81,59 +81,59 @@ $SRC_H5DUMP_TESTFILES/tcompound.h5 " LIST_OTHER_TEST_FILES=" -$SRC_H5DUMP_TESTFILES/tnofilename-with-packed-bits.ddl -$SRC_H5DUMP_TESTFILES/tpbitsArray.ddl -$SRC_H5DUMP_TESTFILES/tpbitsCompound.ddl -$SRC_H5DUMP_TESTFILES/tpbitsIncomplete.ddl -$SRC_H5DUMP_TESTFILES/tpbitsLengthExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsCharLengthExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsIntLengthExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsLongLengthExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsLengthPositive.ddl -$SRC_H5DUMP_TESTFILES/tpbitsMax.ddl -$SRC_H5DUMP_TESTFILES/tpbitsMaxExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsOffsetExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsCharOffsetExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsIntOffsetExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsLongOffsetExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsOffsetNegative.ddl -$SRC_H5DUMP_TESTFILES/tpbitsOverlapped.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSigned.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsigned.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedInt.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedInt.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLong.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLong.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLong.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLong.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedIntWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedIntWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLongWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLongWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLongWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLongWhole1.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLongWhole1.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLongWhole63.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLongWhole63.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSigned4.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsigned4.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedInt8.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedInt8.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLong16.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLong16.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLong32.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLong32.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSigned2.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsigned2.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedInt4.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedInt4.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLong8.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLong8.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLong16.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLong16.ddl +$SRC_H5DUMP_TESTFILES/pbits/tnofilename-with-packed-bits.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsArray.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsCompound.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsIncomplete.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsLengthExceeded.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsCharLengthExceeded.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsIntLengthExceeded.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsLongLengthExceeded.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsLengthPositive.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsMax.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsMaxExceeded.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsOffsetExceeded.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsCharOffsetExceeded.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsIntOffsetExceeded.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsLongOffsetExceeded.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsOffsetNegative.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsOverlapped.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSigned.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsigned.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedInt.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedInt.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLong.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLong.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLong.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLong.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedWhole.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedWhole.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedIntWhole.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedIntWhole.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongWhole.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongWhole.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLongWhole.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLongWhole.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLongWhole1.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLongWhole1.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLongWhole63.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLongWhole63.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSigned4.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsigned4.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedInt8.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedInt8.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLong16.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLong16.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLong32.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLong32.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSigned2.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsigned2.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedInt4.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedInt4.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLong8.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLong8.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLong16.ddl +$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLong16.ddl " LIST_ERROR_TEST_FILES=" @@ -173,10 +173,10 @@ COPY_TESTFILES_TO_TESTDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR + $CP -f $tstfile $TESTDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." - + # Comment out this to CREATE expected file exit $EXIT_FAILURE fi @@ -303,7 +303,7 @@ TOOLTEST2() { nerrors="`expr $nerrors + 1`" test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' fi - + # Clean up output file if test -z "$HDF5_NOCLEANUP"; then rm -f $actual $actualdata $actual_err @@ -434,7 +434,7 @@ SKIP() { TESTING $DUMPER $@ echo " -SKIP-" } - + # Print a line-line message left justified in a field of 70 characters # PRINT_H5DIFF() { @@ -445,7 +445,7 @@ PRINT_H5DIFF() { # Call the h5diff tool # -DIFFTEST() +DIFFTEST() { PRINT_H5DIFF $@ ( @@ -459,7 +459,7 @@ DIFFTEST() else echo " PASSED" fi - + } # Print a line-line message left justified in a field of 70 characters @@ -472,7 +472,7 @@ PRINT_H5IMPORT() { # Call the h5import tool # -IMPORTTEST() +IMPORTTEST() { # remove the output hdf5 file if it exists hdf5_file="$TESTDIR/$5" @@ -483,7 +483,7 @@ IMPORTTEST() PRINT_H5IMPORT $@ ( cd $TESTDIR - $RUNSERIAL $H5IMPORT_BIN "$@" + $RUNSERIAL $H5IMPORT_BIN "$@" ) RET=$? if [ $RET != 0 ] ; then @@ -492,7 +492,7 @@ IMPORTTEST() else echo " PASSED" fi - + } diff --git a/tools/h5dump/testh5dumpvds.sh.in b/tools/h5dump/testh5dumpvds.sh.in new file mode 100644 index 0000000..7a2032e --- /dev/null +++ b/tools/h5dump/testh5dumpvds.sh.in @@ -0,0 +1,501 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from help@hdfgroup.org. +# +# Tests for the h5dump tool with vds type files + +srcdir=@srcdir@ + +# Determine which filters are available +USE_FILTER_SZIP="@USE_FILTER_SZIP@" +USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" + +TESTNAME=h5dump +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +DUMPER=h5dump # The tool name +DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary + +H5DIFF=../h5diff/h5diff # The h5diff tool name +H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary + +H5IMPORT=../h5import/h5import # The h5import tool name +H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary + +RM='rm -rf' +CMP='cmp -s' +DIFF='diff -c' +CP='cp' +DIRNAME='dirname' +LS='ls' +AWK='awk' + +nerrors=0 +verbose=yes + +# source dirs +SRC_TOOLS="$srcdir/../" + +SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles" +# testfiles source dirs for tools +SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES" +SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES" +SRC_H5DUMP_ERRORFILES="$srcdir/errfiles" +SRC_H5DIFF_TESTFILES="$SRC_TOOLS/h5diff/testfiles" +SRC_H5COPY_TESTFILES="$SRC_TOOLS/h5copy/testfiles" +SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles" +SRC_H5JAM_TESTFILES="$SRC_TOOLS/h5jam/testfiles" +SRC_H5STAT_TESTFILES="$SRC_TOOLS/h5stat/testfiles" +SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/h5import/testfiles" + +TEST_P_DIR=./testfiles +TESTDIR=./testfiles/vds +test -d $TEST_P_DIR || mkdir -p $TEST_P_DIR +test -d $TESTDIR || mkdir -p $TESTDIR + +###################################################################### +# test files +# -------------------------------------------------------------------- +# All the test files copy from source directory to test directory +# NOTE: Keep this framework to add/remove test files. +# Any test files from other tools can be used in this framework. +# This list are also used for checking exist. +# Comment '#' without space can be used. +# -------------------------------------------------------------------- +LIST_HDF5_TEST_FILES=" +$SRC_H5DUMP_TESTFILES/vds/1_a.h5 +$SRC_H5DUMP_TESTFILES/vds/1_b.h5 +$SRC_H5DUMP_TESTFILES/vds/1_c.h5 +$SRC_H5DUMP_TESTFILES/vds/1_d.h5 +$SRC_H5DUMP_TESTFILES/vds/1_e.h5 +$SRC_H5DUMP_TESTFILES/vds/1_f.h5 +$SRC_H5DUMP_TESTFILES/vds/1_vds.h5 +$SRC_H5DUMP_TESTFILES/vds/2_a.h5 +$SRC_H5DUMP_TESTFILES/vds/2_b.h5 +$SRC_H5DUMP_TESTFILES/vds/2_c.h5 +$SRC_H5DUMP_TESTFILES/vds/2_d.h5 +$SRC_H5DUMP_TESTFILES/vds/2_e.h5 +$SRC_H5DUMP_TESTFILES/vds/2_vds.h5 +$SRC_H5DUMP_TESTFILES/vds/3_1_vds.h5 +$SRC_H5DUMP_TESTFILES/vds/3_2_vds.h5 +$SRC_H5DUMP_TESTFILES/vds/4_0.h5 +$SRC_H5DUMP_TESTFILES/vds/4_1.h5 +$SRC_H5DUMP_TESTFILES/vds/4_2.h5 +$SRC_H5DUMP_TESTFILES/vds/4_vds.h5 +$SRC_H5DUMP_TESTFILES/vds/5_a.h5 +$SRC_H5DUMP_TESTFILES/vds/5_b.h5 +$SRC_H5DUMP_TESTFILES/vds/5_c.h5 +$SRC_H5DUMP_TESTFILES/vds/5_vds.h5 +" + +LIST_OTHER_TEST_FILES=" +$SRC_H5DUMP_TESTFILES/vds/tvds-1.ddl +$SRC_H5DUMP_TESTFILES/vds/tvds-2.ddl +$SRC_H5DUMP_TESTFILES/vds/tvds-3_1.ddl +$SRC_H5DUMP_TESTFILES/vds/tvds-3_2.ddl +$SRC_H5DUMP_TESTFILES/vds/tvds-4.ddl +$SRC_H5DUMP_TESTFILES/vds/tvds-5.ddl +$SRC_H5DUMP_TESTFILES/vds/tvds_layout-1.ddl +$SRC_H5DUMP_TESTFILES/vds/tvds_layout-2.ddl +$SRC_H5DUMP_TESTFILES/vds/tvds_layout-3_1.ddl +$SRC_H5DUMP_TESTFILES/vds/tvds_layout-3_2.ddl +$SRC_H5DUMP_TESTFILES/vds/tvds_layout-4.ddl +$SRC_H5DUMP_TESTFILES/vds/tvds_layout-5.ddl +" + +LIST_ERROR_TEST_FILES=" +" + +# +# copy test files and expected output files from source dirs to test dir +# +COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_ERROR_TEST_FILES" + +COPY_TESTFILES_TO_TESTDIR() +{ + # copy test files. Used -f to make sure get a new copy + for tstfile in $COPY_TESTFILES + do + # ignore '#' comment + echo $tstfile | tr -d ' ' | grep '^#' > /dev/null + RET=$? + if [ $RET -eq 1 ]; then + # skip cp if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $CP -f $tstfile $TESTDIR + if [ $? -ne 0 ]; then + echo "Error: FAILED to copy $tstfile ." + + # Comment out this to CREATE expected file + exit $EXIT_FAILURE + fi + fi + fi + done +} + +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + +# Print a line-line message left justified in a field of 70 characters +# beginning with the word "Testing". +# +TESTING() { + SPACES=" " + echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' +} + +# Source in the output filter function definitions. +. $srcdir/../../bin/output_filter.sh + +# Run a test and print PASS or *FAIL*. If a test fails then increment +# the `nerrors' global variable and (if $verbose is set) display the +# difference between the actual output and the expected output. The +# expected output is given as the first argument to this function and +# the actual output file is calculated by replacing the `.ddl' with +# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a +# non-zero value. +# +TOOLTEST() { + expect="$TESTDIR/$1" + actual="$TESTDIR/`basename $1 .ddl`.out" + actual_err="$TESTDIR/`basename $1 .ddl`.err" + actual_sav=${actual}-sav + actual_err_sav=${actual_err}-sav + shift + + # Run test. + TESTING $DUMPER $@ + ( + cd $TESTDIR + $RUNSERIAL $DUMPER_BIN "$@" + ) >$actual 2>$actual_err + + # save actual and actual_err in case they are needed later. + cp $actual $actual_sav + STDOUT_FILTER $actual + cp $actual_err $actual_err_sav + STDERR_FILTER $actual_err + cat $actual_err >> $actual + + if [ ! -f $expect ]; then + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + elif $CMP $expect $actual; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result (*.ddl) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext + fi + +} + + +# same as TOOLTEST1 but compares generated file to expected output +# and compares the generated data file to the expected data file +# used for the binary tests that expect a full path in -o without -b +TOOLTEST2() { + + expectdata="$TESTDIR/$1" + expect="$TESTDIR/`basename $1 .exp`.ddl" + actualdata="$TESTDIR/`basename $1 .exp`.txt" + actual="$TESTDIR/`basename $1 .exp`.out" + actual_err="$TESTDIR/`basename $1 .exp`.err" + shift + + # Run test. + TESTING $DUMPER $@ + ( + cd $TESTDIR + $RUNSERIAL $DUMPER_BIN "$@" + ) >$actual 2>$actual_err + cat $actual_err >> $actual + + if [ ! -f $expect ]; then + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + elif $CMP $expect $actual; then + if [ ! -f $expectdata ]; then + # Create the expect data file if it doesn't yet exist. + echo " CREATED" + cp $actualdata $expectdata + elif $CMP $expectdata $actualdata; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected datafile (*.exp) differs from actual datafile (*.txt)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /' + fi + else + echo "*FAILED*" + echo " Expected result (*.ddl) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actualdata $actual_err + fi + +} + +# same as TOOLTEST but filters error stack outp +# Extract file name, line number, version and thread IDs because they may be different +TOOLTEST3() { + + expect="$TESTDIR/$1" + actual="$TESTDIR/`basename $1 .ddl`.out" + actual_err="$TESTDIR/`basename $1 .ddl`.err" + actual_ext="$TESTDIR/`basename $1 .ddl`.ext" + actual_sav=${actual}-sav + actual_err_sav=${actual_err}-sav + shift + + # Run test. + TESTING $DUMPER $@ + ( + cd $TESTDIR + $RUNSERIAL $DUMPER_BIN "$@" + ) >$actual 2>$actual_err + + # save actual and actual_err in case they are needed later. + cp $actual $actual_sav + STDOUT_FILTER $actual + cp $actual_err $actual_err_sav + STDERR_FILTER $actual_err + + # Extract file name, line number, version and thread IDs because they may be different + sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ + -e 's/line [0-9]*/line (number)/' \ + -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ + -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ + -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \ + -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \ + $actual_err > $actual_ext + cat $actual_ext >> $actual + + if [ ! -f $expect ]; then + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + elif $CMP $expect $actual; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result (*.ddl) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actual_err $actual_sav $actual_err_sav + fi + +} + +# same as TOOLTEST3 but filters error stack output and compares to an error file +# Extract file name, line number, version and thread IDs because they may be different +TOOLTEST4() { + + expect="$TESTDIR/$1" + expect_err="$TESTDIR/`basename $1 .ddl`.err" + actual="$TESTDIR/`basename $1 .ddl`.out" + actual_err="$TESTDIR/`basename $1 .ddl`.oerr" + actual_ext="$TESTDIR/`basename $1 .ddl`.ext" + actual_sav=${actual}-sav + actual_err_sav=${actual_err}-sav + shift + + # Run test. + TESTING $DUMPER $@ + ( + cd $TESTDIR + $RUNSERIAL $DUMPER_BIN "$@" + ) >$actual 2>$actual_err + + # save actual and actual_err in case they are needed later. + cp $actual $actual_sav + STDOUT_FILTER $actual + cp $actual_err $actual_err_sav + STDERR_FILTER $actual_err + + # Extract file name, line number, version and thread IDs because they may be different + sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ + -e 's/line [0-9]*/line (number)/' \ + -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ + -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ + -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \ + -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \ + $actual_err > $actual_ext + #cat $actual_ext >> $actual + + if [ ! -f $expect ]; then + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + elif $CMP $expect $actual; then + if $CMP $expect_err $actual_ext; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result (*.err) differs from actual result (*.oerr)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /' + fi + else + echo "*FAILED*" + echo " Expected result (*.ddl) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actual_err $actual_sav $actual_err_sav + fi + +} + +# Print a "SKIP" message +SKIP() { + TESTING $DUMPER $@ + echo " -SKIP-" +} + +# Print a line-line message left justified in a field of 70 characters +# +PRINT_H5DIFF() { + SPACES=" " + echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012' +} + + +# Call the h5diff tool +# +DIFFTEST() +{ + PRINT_H5DIFF $@ + ( + cd $TESTDIR + $RUNSERIAL $H5DIFF_BIN "$@" -q + ) + RET=$? + if [ $RET != 0 ] ; then + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + else + echo " PASSED" + fi + +} + +# Print a line-line message left justified in a field of 70 characters +# beginning with the word "Verifying". +# +PRINT_H5IMPORT() { + SPACES=" " + echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012' +} + +# Call the h5import tool +# +IMPORTTEST() +{ + # remove the output hdf5 file if it exists + hdf5_file="$TESTDIR/$5" + if [ -f $hdf5_file ]; then + rm -f $hdf5_file + fi + + PRINT_H5IMPORT $@ + ( + cd $TESTDIR + $RUNSERIAL $H5IMPORT_BIN "$@" + ) + RET=$? + if [ $RET != 0 ] ; then + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + else + echo " PASSED" + fi + +} + + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## +# prepare for test +COPY_TESTFILES_TO_TESTDIR + +####### test for dataset vds ###### + + # Data read +TOOLTEST tvds-1.ddl --enable-error-stack 1_vds.h5 +TOOLTEST tvds-2.ddl --enable-error-stack 2_vds.h5 +TOOLTEST tvds-3_1.ddl --enable-error-stack 3_1_vds.h5 +TOOLTEST tvds-3_2.ddl --enable-error-stack 3_2_vds.h5 +TOOLTEST tvds-4.ddl --enable-error-stack 4_vds.h5 +TOOLTEST tvds-5.ddl --enable-error-stack 5_vds.h5 + + # Layout read +TOOLTEST tvds_layout-1.ddl -p --enable-error-stack 1_vds.h5 +TOOLTEST tvds_layout-2.ddl -p --enable-error-stack 2_vds.h5 +TOOLTEST tvds_layout-3_1.ddl -p --enable-error-stack 3_1_vds.h5 +TOOLTEST tvds_layout-3_2.ddl -p --enable-error-stack 3_2_vds.h5 +TOOLTEST tvds_layout-4.ddl -p --enable-error-stack 4_vds.h5 +TOOLTEST tvds_layout-5.ddl -p --enable-error-stack 5_vds.h5 + +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR + +# Report test results and exit +if test $nerrors -eq 0 ; then + echo "All $TESTNAME tests passed." + exit $EXIT_SUCCESS +else + echo "$TESTNAME tests failed with $nerrors errors." + exit $EXIT_FAILURE +fi diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 96be6a2..3a06d3a 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -385,7 +385,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai } ctx->need_prefix = TRUE; - + if(FALSE == dimension_break) elmt_counter = 0; } /* end for (i = 0; i < nelmts... */ @@ -827,7 +827,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for dims"); dims1[0] = npoints; - + /* Create dataspace for reading buffer */ if((mem_space = H5Screate_simple(1, dims1, NULL)) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Screate_simple failed"); @@ -1474,7 +1474,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_co if((f_space = H5Dget_space(dset)) < 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_space failed"); - + if((sndims = H5Sget_simple_extent_ndims(f_space)) < 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed"); ctx->ndims = (unsigned)sndims; @@ -1539,6 +1539,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont /* Hyperslab info */ hsize_t hs_offset[H5S_MAX_RANK]; /* starting offset */ hsize_t hs_size[H5S_MAX_RANK]; /* size this pass */ + //hsize_t hs_count[H5S_MAX_RANK]; /* size this pass */ hsize_t hs_nelmts; /* elements in request */ /* VL data special information */ @@ -1621,9 +1622,11 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont hs_size[i] = MIN(total_size[i] - hs_offset[i], sm_size[i]); ctx->p_max_idx[i] = ctx->p_min_idx[i] + hs_size[i]; hs_nelmts *= hs_size[i]; +// hs_count[i] = 1; } H5Sselect_hyperslab(f_space, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL); +// H5Sselect_hyperslab(f_space, H5S_SELECT_SET, hs_offset, NULL, hs_count, hs_size); H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL); } else { @@ -1760,7 +1763,7 @@ CATCH *------------------------------------------------------------------------- */ int -h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, +h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t dset, struct subset_t *sset) { hid_t f_space = -1; @@ -1836,7 +1839,7 @@ done: *------------------------------------------------------------------------- */ int -h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, +h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t obj_id, hid_t type, hid_t space, void *mem) { HERR_INIT(int, SUCCEED) @@ -1915,18 +1918,18 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ } else h5tools_str_append(buffer, "\"%s\"", obj->objname); - } + } else { error_msg("unknown committed type.\n"); h5tools_setstatus(EXIT_FAILURE); } return ret_value; - } - + } + if (info->line_ncols > 0) ncols = info->line_ncols; - + switch (type_class) { case H5T_INTEGER: if (H5Tequal(type, H5T_STD_I8BE) == TRUE) { @@ -2248,7 +2251,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tset_order failed"); } /* end if */ else if(order == H5T_ORDER_BE) { - if(H5Tset_order(str_type, H5T_ORDER_BE) < 0) + if(H5Tset_order(str_type, H5T_ORDER_BE) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tset_order failed"); } /* end if */ @@ -2279,7 +2282,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tset_order failed"); } /* end if */ else if(order == H5T_ORDER_BE) { - if(H5Tset_order(str_type, H5T_ORDER_BE) < 0) + if(H5Tset_order(str_type, H5T_ORDER_BE) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tset_order failed"); } /* end if */ @@ -2353,9 +2356,9 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ h5tools_str_reset(buffer); h5tools_str_append(buffer, "OPAQUE_TAG \"%s\";", ttag); h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - + H5free_memory(ttag); - } + } ctx->indent_level--; ctx->need_prefix = TRUE; @@ -2369,7 +2372,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ if((snmembers = H5Tget_nmembers(type)) < 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed"); nmembers = (unsigned)snmembers; - + h5tools_str_append(buffer, "H5T_COMPOUND %s", h5tools_dump_header_format->structblockbegin); h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -2424,7 +2427,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ h5tools_str_reset(buffer); h5tools_print_datatype(stream, buffer, info, ctx, super, TRUE); - + if(H5Tclose(super) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed"); @@ -2612,7 +2615,7 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i if (info->line_ncols > 0) ncols = info->line_ncols; - + if((snmembs = H5Tget_nmembers(type)) < 0) H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers failed"); nmembs = (unsigned)snmembs; @@ -2752,7 +2755,7 @@ h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info, ncols = info->line_ncols; ctx->need_prefix = TRUE; - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->datatypebegin, @@ -2774,7 +2777,7 @@ h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info, /*------------------------------------------------------------------------- * Function: dump_dataspace * - * Purpose: Dump the dataspace. + * Purpose: Dump the dataspace. * * Return: void * @@ -2800,7 +2803,7 @@ h5tools_dump_dataspace(FILE *stream, const h5tool_format_t *info, ncols = info->line_ncols; ctx->need_prefix = TRUE; - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s ", h5tools_dump_header_format->dataspacebegin); @@ -2850,7 +2853,7 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s %d %s", OBJID, BEGIN, oid, END); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3014,7 +3017,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, */ ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", STORAGE_LAYOUT, BEGIN); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3302,7 +3305,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", FILTERS, BEGIN); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3314,13 +3317,13 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, cd_nelmts = NELMTS(cd_values); filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts, cd_values, sizeof(f_name), f_name, NULL); - - if (filtn < 0) - continue; /* nothing to print for invalid filter */ + + if (filtn < 0) + continue; /* nothing to print for invalid filter */ ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); switch(filtn) { case H5Z_FILTER_DEFLATE: @@ -3384,7 +3387,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, if(szip_options_mask & H5_SZIP_RAW_OPTION_MASK) { ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "HEADER %s", "RAW"); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3409,11 +3412,11 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, break; default: /* filters do not have to be available for showing registered filter info. - see HDFFV-8346 for details. --xcao@hdfgroup.org + see HDFFV-8346 for details. --xcao@hdfgroup.org if(H5Zfilter_avail(filtn)) h5tools_str_append(&buffer, "%s %s", "USER_REGISTERED_FILTER", BEGIN); else - */ + */ h5tools_str_append(&buffer, "%s %s", "USER_DEFINED_FILTER", BEGIN); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3421,15 +3424,15 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "FILTER_ID %d", filtn); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - + if(f_name[0] != '\0') { ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "COMMENT %s", f_name); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3437,7 +3440,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, if (cd_nelmts) { ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s ","PARAMS", BEGIN); for (j=0; jneed_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s",END); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3461,7 +3464,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "NONE"); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3470,7 +3473,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s",END); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3481,7 +3484,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, */ ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", FILLVALUE, BEGIN); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3490,10 +3493,10 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "FILL_TIME "); - + H5Pget_fill_time(dcpl_id, &ft); switch(ft) { case H5D_FILL_TIME_ALLOC: @@ -3513,7 +3516,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s ", "VALUE "); H5Pfill_value_defined(dcpl_id, &fvstatus); @@ -3529,7 +3532,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", END); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3540,7 +3543,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, */ ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "ALLOCATION_TIME %s", BEGIN); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3549,7 +3552,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); H5Pget_alloc_time(dcpl_id, &at); switch(at) { @@ -3572,7 +3575,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s", END); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3622,7 +3625,7 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, comment[cmt_bufsize] = '\0'; /* necessary because null char is not returned */ ctx->need_prefix = TRUE; - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "COMMENT \"%s\"", comment); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3637,7 +3640,7 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, /*------------------------------------------------------------------------- * Function: dump_attribute * - * Purpose: Dump the attribute. + * Purpose: Dump the attribute. * * Return: void * @@ -3646,7 +3649,7 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, */ void h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, - h5tools_context_t *ctx, const char *attr_name, hid_t attr_id, + h5tools_context_t *ctx, const char *attr_name, hid_t attr_id, int display_index, int display_char) { h5tools_str_t buffer; /* string into which to render */ @@ -3665,7 +3668,7 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s \"%s\" %s", h5tools_dump_header_format->attributebegin, attr_name, @@ -3674,7 +3677,7 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, if(attr_id < 0) { error_msg("unable to open attribute \"%s\"\n", attr_name); - } + } else { hid_t type, space; @@ -3701,7 +3704,7 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); - + h5tools_str_reset(&buffer); if (HDstrlen(h5tools_dump_header_format->attributeblockend)) { @@ -3757,36 +3760,36 @@ void h5tools_print_packed_bits(h5tools_str_t *buffer, hid_t type) { int packed_bits_size = 0; - + hid_t n_type = h5tools_get_native_type(type); if(H5Tget_class(n_type)==H5T_INTEGER) { if(H5Tequal(n_type, H5T_NATIVE_SCHAR) == TRUE) { packed_bits_size = 8 * sizeof(char); - } + } else if(H5Tequal(n_type, H5T_NATIVE_UCHAR) == TRUE) { packed_bits_size = 8 * sizeof(unsigned char); - } + } else if(H5Tequal(n_type, H5T_NATIVE_SHORT) == TRUE) { packed_bits_size = 8 * sizeof(short); - } + } else if(H5Tequal(n_type, H5T_NATIVE_USHORT) == TRUE) { packed_bits_size = 8 * sizeof(unsigned short); - } + } else if(H5Tequal(n_type, H5T_NATIVE_INT) == TRUE) { packed_bits_size = 8 * sizeof(int); - } + } else if(H5Tequal(n_type, H5T_NATIVE_UINT) == TRUE) { packed_bits_size = 8 * sizeof(unsigned int); - } + } else if(H5Tequal(n_type, H5T_NATIVE_LONG) == TRUE) { packed_bits_size = 8 * sizeof(long); - } + } else if(H5Tequal(n_type, H5T_NATIVE_ULONG) == TRUE) { packed_bits_size = 8 * sizeof(unsigned long); - } + } else if(H5Tequal(n_type, H5T_NATIVE_LLONG) == TRUE) { packed_bits_size = 8 * sizeof(long long); - } + } else if(H5Tequal(n_type, H5T_NATIVE_ULLONG) == TRUE) { packed_bits_size = 8 * sizeof(unsigned long long); } @@ -3827,25 +3830,25 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, HDmemset(&buffer, 0, sizeof(h5tools_str_t)); if (info->line_ncols > 0) ncols = info->line_ncols; - + ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->subsettingbegin, h5tools_dump_header_format->subsettingblockbegin); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); ctx->indent_level++; - + ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); - + h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->startbegin, h5tools_dump_header_format->startblockbegin); h5tools_print_dims(&buffer, sset->start.data, dims); h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->startend, h5tools_dump_header_format->startblockend); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - + ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); @@ -3854,7 +3857,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tools_print_dims(&buffer, sset->stride.data, dims); h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->strideend, h5tools_dump_header_format->strideblockend); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - + ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); @@ -3868,7 +3871,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->countend, h5tools_dump_header_format->countblockend); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - + ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0); @@ -3882,7 +3885,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->blockend, h5tools_dump_header_format->blockblockend); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - + ctx->indent_level--; h5tools_str_close(&buffer); @@ -3899,7 +3902,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, */ void h5tools_dump_data(FILE *stream, const h5tool_format_t *info, - h5tools_context_t *ctx, hid_t obj_id, int obj_data, struct subset_t *sset, + h5tools_context_t *ctx, hid_t obj_id, int obj_data, struct subset_t *sset, int display_index, int display_char) { H5S_class_t space_type; @@ -3962,10 +3965,10 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_dump_subsetting_header(stream, &outputformat, ctx, sset, H5Sget_simple_extent_ndims(f_space)); H5Sclose(f_space); - + ctx->indent_level++; } - + ctx->need_prefix = TRUE; h5tools_str_reset(&buffer); h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->databegin, h5tools_dump_header_format->datablockbegin); @@ -3991,7 +3994,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, datactx.indent_level++; datactx.need_prefix = TRUE; h5tools_simple_prefix(stream, info, &datactx, (hsize_t)0, 0); - + string_dataformat = *info; string_dataformat.idx_fmt = "\""; string_dataformat.line_multi_new = 1; @@ -4059,7 +4062,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, datactx.indent_level++; datactx.need_prefix = TRUE; h5tools_simple_prefix(stream, info, &datactx, (hsize_t)0, 0); - + string_dataformat = *info; string_dataformat.idx_fmt = "\""; string_dataformat.line_multi_new = 1; @@ -4086,7 +4089,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, H5Dvlen_reclaim(p_type, space, H5P_DEFAULT, buf); HDfree(buf); - } + } else status = SUCCEED; @@ -4116,10 +4119,10 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, if (sset && obj_data) { ctx->indent_level--; - + ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, &outputformat, ctx, (hsize_t)0, 0); - + h5tools_str_reset(&buffer); if(HDstrlen(h5tools_dump_header_format->subsettingblockend)) { h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->subsettingblockend); diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index e0f94d0..7c4caa4 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -52,6 +52,9 @@ if (BUILD_TESTING) target_link_libraries (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5repart_gentest COMMAND $) + + add_subdirectory (${HDF5_TOOLS_MISC_SOURCE_DIR}/vds) + endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) add_executable (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c) diff --git a/tools/misc/vds/CMakeLists.txt b/tools/misc/vds/CMakeLists.txt new file mode 100644 index 0000000..dcf883c --- /dev/null +++ b/tools/misc/vds/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required (VERSION 3.1.0) +PROJECT (HDF5_TOOLS_MISC_VDS) + +#----------------------------------------------------------------------------- +# Setup include Directories +#----------------------------------------------------------------------------- +INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) + +MACRO (ADD_H5_GENERATOR genfile) + add_executable (${genfile} ${HDF5_TOOLS_MISC_VDS_SOURCE_DIR}/${genfile}.c) + TARGET_NAMING (${genfile} STATIC) + TARGET_C_PROPERTIES (${genfile} STATIC " " " ") + target_link_libraries (${genfile} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + set_target_properties (${genfile} PROPERTIES FOLDER generator/tools) +ENDMACRO (ADD_H5_GENERATOR genfile) + +# generator executables +set (H5_GENERATORS + UC_1_one_dim_gen + UC_2_two_dims_gen + UC_3_gaps_gen + UC_4_printf_gen + UC_5_stride_gen +) + +foreach (gen ${H5_GENERATORS}) + ADD_H5_GENERATOR (${gen}) +endforeach (gen ${H5_GENERATORS}) diff --git a/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl new file mode 100644 index 0000000..64a2880 --- /dev/null +++ b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl @@ -0,0 +1,136 @@ +usage: h5dump [OPTIONS] files + OPTIONS + -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- + -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. + -B, --superblock Print the content of the super block + -H, --header Print the header only; no data is displayed + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- + -a P, --attribute=P Print the specified attribute + If an attribute name contains a slash (/), escape the + slash with a preceding backslash (\). + (See example section below.) + -d P, --dataset=P Print the specified dataset + -g P, --group=P Print the specified group and all members + -l P, --soft-link=P Print the value(s) of the specified soft link + -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value + -M L, --packedbits=L Print packed bits as unsigned integers, using mask + format L for an integer dataset specified with + option -d. L is a list of offset,length values, + separated by commas. Offset is the beginning bit in + the data value and length is the number of bits of + the mask. + -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- + -x, --xml Output in XML using Schema + -u, --use-dtd Output in XML using DTD + -D U, --xml-dtd=U Use the DTD or schema at U + -X S, --xml-ns=S (XML Schema) Use qualified names n the XML + ":": no namespace, default: "hdf5:" + E.g., to dump a file called `-f', use h5dump -- -f + +--------------- Subsetting Options --------------- + Subsetting is available by using the following options with a dataset + option. Subsetting is done by selecting a hyperslab from the data. + Thus, the options mirror those for performing a hyperslab selection. + One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting. + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + + -s START, --start=START Offset of start of subsetting selection + -S STRIDE, --stride=STRIDE Hyperslab stride + -c COUNT, --count=COUNT Number of blocks to include in selection + -k BLOCK, --block=BLOCK Size of block in hyperslab + START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the + number of dimensions in the dataspace being queried + (Alternate compact form of subsetting is described in the Reference Manual) + +--------------- Option Argument Conventions --------------- + D - is the file driver to use in opening the file. Acceptable values + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + See examples below for family, split, and multi driver special file name usage. + + F - is a filename. + P - is the full path from the root group to the object. + N - is an integer greater than 1. + T - is a string containing the floating point format, e.g '%.3f' + U - is a URI reference (as defined in [IETF RFC 2396], + updated by [IETF RFC 2732]) + B - is the form of binary output: NATIVE for a memory type, FILE for the + file type, LE or BE for pre-existing little or big endian types. + Must be used with -o (output file) and it is recommended that + -d (dataset) is used. B is an optional argument, defaults to NATIVE + Q - is the sort index type. It can be "creation_order" or "name" (default) + Z - is the sort order type. It can be "descending" or "ascending" (default) + +--------------- Examples --------------- + + 1) Attribute foo of the group /bar_none in file quux.h5 + + h5dump -a /bar_none/foo quux.h5 + + Attribute "high/low" of the group /bar_none in the file quux.h5 + + h5dump -a "/bar_none/high\/low" quux.h5 + + 2) Selecting a subset from dataset /foo in file quux.h5 + + h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5 + + 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' + using a little-endian type + + h5dump -d /dset -b LE -o out.bin quux.h5 + + 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset + + h5dump -d /dset -M 0,1,4,3 quux.h5 + + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 + + h5dump -d /foo -f split splitfile + + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + +h5dump error: missing file name diff --git a/tools/testfiles/pbits/tpbitsArray.ddl b/tools/testfiles/pbits/tpbitsArray.ddl new file mode 100644 index 0000000..125abb8 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsArray.ddl @@ -0,0 +1,14 @@ +HDF5 "tarray1.h5" { +DATASET "/Dataset1" { + DATATYPE H5T_ARRAY { [4] H5T_STD_I32LE } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + PACKED_BITS OFFSET=0 LENGTH=1 + DATA { + (0): [ 0, 1, 0, 1 ], [ 0, 1, 0, 1 ], [ 0, 1, 0, 1 ], [ 0, 1, 0, 1 ] + } + PACKED_BITS OFFSET=1 LENGTH=1 + DATA { + (0): [ 0, 0, 1, 1 ], [ 1, 1, 0, 0 ], [ 0, 0, 1, 1 ], [ 1, 1, 0, 0 ] + } +} +} diff --git a/tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl new file mode 100644 index 0000000..b0683a7 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl @@ -0,0 +1,18 @@ +HDF5 "packedbits.h5" { +DATASET "/DS08BITS" { + DATATYPE H5T_STD_I8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + PACKED_BITS OFFSET=2 LENGTH=7 + DATA { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } +} +} +h5dump error: Packed Bit offset+length value(9) too large. Max is 8 diff --git a/tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl new file mode 100644 index 0000000..530fa05 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl @@ -0,0 +1,18 @@ +HDF5 "packedbits.h5" { +DATASET "/DS08BITS" { + DATATYPE H5T_STD_I8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + PACKED_BITS OFFSET=8 LENGTH=1 + DATA { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } +} +} +h5dump error: Packed Bit offset+length value(9) too large. Max is 8 diff --git a/tools/testfiles/pbits/tpbitsCompound.ddl b/tools/testfiles/pbits/tpbitsCompound.ddl new file mode 100644 index 0000000..c84272a --- /dev/null +++ b/tools/testfiles/pbits/tpbitsCompound.ddl @@ -0,0 +1,66 @@ +HDF5 "tcompound.h5" { +DATASET "/dset1" { + DATATYPE H5T_COMPOUND { + H5T_STD_I32BE "a_name"; + H5T_IEEE_F32BE "b_name"; + H5T_IEEE_F64BE "c_name"; + } + DATASPACE SIMPLE { ( 5 ) / ( 5 ) } + PACKED_BITS OFFSET=0 LENGTH=1 + DATA { + (0): { + 0, + 0, + 1 + }, + (1): { + 1, + 1, + 0.5 + }, + (2): { + 0, + 4, + 0.333333 + }, + (3): { + 1, + 9, + 0.25 + }, + (4): { + 0, + 16, + 0.2 + } + } + PACKED_BITS OFFSET=1 LENGTH=1 + DATA { + (0): { + 0, + 0, + 1 + }, + (1): { + 0, + 1, + 0.5 + }, + (2): { + 1, + 4, + 0.333333 + }, + (3): { + 1, + 9, + 0.25 + }, + (4): { + 0, + 16, + 0.2 + } + } +} +} diff --git a/tools/testfiles/pbits/tpbitsIncomplete.ddl b/tools/testfiles/pbits/tpbitsIncomplete.ddl new file mode 100644 index 0000000..cdb1f91 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsIncomplete.ddl @@ -0,0 +1,136 @@ +usage: h5dump [OPTIONS] files + OPTIONS + -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- + -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. + -B, --superblock Print the content of the super block + -H, --header Print the header only; no data is displayed + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- + -a P, --attribute=P Print the specified attribute + If an attribute name contains a slash (/), escape the + slash with a preceding backslash (\). + (See example section below.) + -d P, --dataset=P Print the specified dataset + -g P, --group=P Print the specified group and all members + -l P, --soft-link=P Print the value(s) of the specified soft link + -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value + -M L, --packedbits=L Print packed bits as unsigned integers, using mask + format L for an integer dataset specified with + option -d. L is a list of offset,length values, + separated by commas. Offset is the beginning bit in + the data value and length is the number of bits of + the mask. + -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- + -x, --xml Output in XML using Schema + -u, --use-dtd Output in XML using DTD + -D U, --xml-dtd=U Use the DTD or schema at U + -X S, --xml-ns=S (XML Schema) Use qualified names n the XML + ":": no namespace, default: "hdf5:" + E.g., to dump a file called `-f', use h5dump -- -f + +--------------- Subsetting Options --------------- + Subsetting is available by using the following options with a dataset + option. Subsetting is done by selecting a hyperslab from the data. + Thus, the options mirror those for performing a hyperslab selection. + One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting. + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + + -s START, --start=START Offset of start of subsetting selection + -S STRIDE, --stride=STRIDE Hyperslab stride + -c COUNT, --count=COUNT Number of blocks to include in selection + -k BLOCK, --block=BLOCK Size of block in hyperslab + START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the + number of dimensions in the dataspace being queried + (Alternate compact form of subsetting is described in the Reference Manual) + +--------------- Option Argument Conventions --------------- + D - is the file driver to use in opening the file. Acceptable values + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + See examples below for family, split, and multi driver special file name usage. + + F - is a filename. + P - is the full path from the root group to the object. + N - is an integer greater than 1. + T - is a string containing the floating point format, e.g '%.3f' + U - is a URI reference (as defined in [IETF RFC 2396], + updated by [IETF RFC 2732]) + B - is the form of binary output: NATIVE for a memory type, FILE for the + file type, LE or BE for pre-existing little or big endian types. + Must be used with -o (output file) and it is recommended that + -d (dataset) is used. B is an optional argument, defaults to NATIVE + Q - is the sort index type. It can be "creation_order" or "name" (default) + Z - is the sort order type. It can be "descending" or "ascending" (default) + +--------------- Examples --------------- + + 1) Attribute foo of the group /bar_none in file quux.h5 + + h5dump -a /bar_none/foo quux.h5 + + Attribute "high/low" of the group /bar_none in the file quux.h5 + + h5dump -a "/bar_none/high\/low" quux.h5 + + 2) Selecting a subset from dataset /foo in file quux.h5 + + h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5 + + 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' + using a little-endian type + + h5dump -d /dset -b LE -o out.bin quux.h5 + + 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset + + h5dump -d /dset -M 0,1,4,3 quux.h5 + + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 + + h5dump -d /foo -f split splitfile + + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + +h5dump error: Bad mask list(0,2,2,1,0,2,2,) diff --git a/tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl new file mode 100644 index 0000000..1c919cd --- /dev/null +++ b/tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl @@ -0,0 +1,18 @@ +HDF5 "packedbits.h5" { +DATASET "/DS16BITS" { + DATATYPE H5T_STD_I16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + PACKED_BITS OFFSET=10 LENGTH=7 + DATA { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } +} +} +h5dump error: Packed Bit offset+length value(17) too large. Max is 16 diff --git a/tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl new file mode 100644 index 0000000..f3b2a8c --- /dev/null +++ b/tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl @@ -0,0 +1,18 @@ +HDF5 "packedbits.h5" { +DATASET "/DS16BITS" { + DATATYPE H5T_STD_I16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + PACKED_BITS OFFSET=16 LENGTH=1 + DATA { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } +} +} +h5dump error: Packed Bit offset+length value(17) too large. Max is 16 diff --git a/tools/testfiles/pbits/tpbitsLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl new file mode 100644 index 0000000..6d2492a --- /dev/null +++ b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl @@ -0,0 +1,136 @@ +usage: h5dump [OPTIONS] files + OPTIONS + -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- + -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. + -B, --superblock Print the content of the super block + -H, --header Print the header only; no data is displayed + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- + -a P, --attribute=P Print the specified attribute + If an attribute name contains a slash (/), escape the + slash with a preceding backslash (\). + (See example section below.) + -d P, --dataset=P Print the specified dataset + -g P, --group=P Print the specified group and all members + -l P, --soft-link=P Print the value(s) of the specified soft link + -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value + -M L, --packedbits=L Print packed bits as unsigned integers, using mask + format L for an integer dataset specified with + option -d. L is a list of offset,length values, + separated by commas. Offset is the beginning bit in + the data value and length is the number of bits of + the mask. + -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- + -x, --xml Output in XML using Schema + -u, --use-dtd Output in XML using DTD + -D U, --xml-dtd=U Use the DTD or schema at U + -X S, --xml-ns=S (XML Schema) Use qualified names n the XML + ":": no namespace, default: "hdf5:" + E.g., to dump a file called `-f', use h5dump -- -f + +--------------- Subsetting Options --------------- + Subsetting is available by using the following options with a dataset + option. Subsetting is done by selecting a hyperslab from the data. + Thus, the options mirror those for performing a hyperslab selection. + One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting. + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + + -s START, --start=START Offset of start of subsetting selection + -S STRIDE, --stride=STRIDE Hyperslab stride + -c COUNT, --count=COUNT Number of blocks to include in selection + -k BLOCK, --block=BLOCK Size of block in hyperslab + START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the + number of dimensions in the dataspace being queried + (Alternate compact form of subsetting is described in the Reference Manual) + +--------------- Option Argument Conventions --------------- + D - is the file driver to use in opening the file. Acceptable values + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + See examples below for family, split, and multi driver special file name usage. + + F - is a filename. + P - is the full path from the root group to the object. + N - is an integer greater than 1. + T - is a string containing the floating point format, e.g '%.3f' + U - is a URI reference (as defined in [IETF RFC 2396], + updated by [IETF RFC 2732]) + B - is the form of binary output: NATIVE for a memory type, FILE for the + file type, LE or BE for pre-existing little or big endian types. + Must be used with -o (output file) and it is recommended that + -d (dataset) is used. B is an optional argument, defaults to NATIVE + Q - is the sort index type. It can be "creation_order" or "name" (default) + Z - is the sort order type. It can be "descending" or "ascending" (default) + +--------------- Examples --------------- + + 1) Attribute foo of the group /bar_none in file quux.h5 + + h5dump -a /bar_none/foo quux.h5 + + Attribute "high/low" of the group /bar_none in the file quux.h5 + + h5dump -a "/bar_none/high\/low" quux.h5 + + 2) Selecting a subset from dataset /foo in file quux.h5 + + h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5 + + 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' + using a little-endian type + + h5dump -d /dset -b LE -o out.bin quux.h5 + + 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset + + h5dump -d /dset -M 0,1,4,3 quux.h5 + + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 + + h5dump -d /foo -f split splitfile + + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + +h5dump error: Packed Bit offset+length value(65) too large. Max is 64 diff --git a/tools/testfiles/pbits/tpbitsLengthPositive.ddl b/tools/testfiles/pbits/tpbitsLengthPositive.ddl new file mode 100644 index 0000000..4f56619 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsLengthPositive.ddl @@ -0,0 +1,136 @@ +usage: h5dump [OPTIONS] files + OPTIONS + -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- + -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. + -B, --superblock Print the content of the super block + -H, --header Print the header only; no data is displayed + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- + -a P, --attribute=P Print the specified attribute + If an attribute name contains a slash (/), escape the + slash with a preceding backslash (\). + (See example section below.) + -d P, --dataset=P Print the specified dataset + -g P, --group=P Print the specified group and all members + -l P, --soft-link=P Print the value(s) of the specified soft link + -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value + -M L, --packedbits=L Print packed bits as unsigned integers, using mask + format L for an integer dataset specified with + option -d. L is a list of offset,length values, + separated by commas. Offset is the beginning bit in + the data value and length is the number of bits of + the mask. + -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- + -x, --xml Output in XML using Schema + -u, --use-dtd Output in XML using DTD + -D U, --xml-dtd=U Use the DTD or schema at U + -X S, --xml-ns=S (XML Schema) Use qualified names n the XML + ":": no namespace, default: "hdf5:" + E.g., to dump a file called `-f', use h5dump -- -f + +--------------- Subsetting Options --------------- + Subsetting is available by using the following options with a dataset + option. Subsetting is done by selecting a hyperslab from the data. + Thus, the options mirror those for performing a hyperslab selection. + One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting. + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + + -s START, --start=START Offset of start of subsetting selection + -S STRIDE, --stride=STRIDE Hyperslab stride + -c COUNT, --count=COUNT Number of blocks to include in selection + -k BLOCK, --block=BLOCK Size of block in hyperslab + START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the + number of dimensions in the dataspace being queried + (Alternate compact form of subsetting is described in the Reference Manual) + +--------------- Option Argument Conventions --------------- + D - is the file driver to use in opening the file. Acceptable values + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + See examples below for family, split, and multi driver special file name usage. + + F - is a filename. + P - is the full path from the root group to the object. + N - is an integer greater than 1. + T - is a string containing the floating point format, e.g '%.3f' + U - is a URI reference (as defined in [IETF RFC 2396], + updated by [IETF RFC 2732]) + B - is the form of binary output: NATIVE for a memory type, FILE for the + file type, LE or BE for pre-existing little or big endian types. + Must be used with -o (output file) and it is recommended that + -d (dataset) is used. B is an optional argument, defaults to NATIVE + Q - is the sort index type. It can be "creation_order" or "name" (default) + Z - is the sort order type. It can be "descending" or "ascending" (default) + +--------------- Examples --------------- + + 1) Attribute foo of the group /bar_none in file quux.h5 + + h5dump -a /bar_none/foo quux.h5 + + Attribute "high/low" of the group /bar_none in the file quux.h5 + + h5dump -a "/bar_none/high\/low" quux.h5 + + 2) Selecting a subset from dataset /foo in file quux.h5 + + h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5 + + 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' + using a little-endian type + + h5dump -d /dset -b LE -o out.bin quux.h5 + + 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset + + h5dump -d /dset -M 0,1,4,3 quux.h5 + + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 + + h5dump -d /foo -f split splitfile + + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + +h5dump error: Packed Bit length value(0) must be positive. diff --git a/tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl new file mode 100644 index 0000000..812c300 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl @@ -0,0 +1,26 @@ +HDF5 "packedbits.h5" { +DATASET "/DS32BITS" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + PACKED_BITS OFFSET=26 LENGTH=7 + DATA { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } +} +} +h5dump error: Packed Bit offset+length value(33) too large. Max is 32 diff --git a/tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl new file mode 100644 index 0000000..cbea722 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl @@ -0,0 +1,26 @@ +HDF5 "packedbits.h5" { +DATASET "/DS32BITS" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + PACKED_BITS OFFSET=32 LENGTH=1 + DATA { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } +} +} +h5dump error: Packed Bit offset+length value(33) too large. Max is 32 diff --git a/tools/testfiles/pbits/tpbitsMax.ddl b/tools/testfiles/pbits/tpbitsMax.ddl new file mode 100644 index 0000000..e569488 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsMax.ddl @@ -0,0 +1,94 @@ +HDF5 "packedbits.h5" { +DATASET "/DS08BITS" { + DATATYPE H5T_STD_I8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + PACKED_BITS OFFSET=0 LENGTH=1 + DATA { + (0,0): 1, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=1 LENGTH=1 + DATA { + (0,0): 1, 1, 0, 0, 0, 0, 0, 0, + (1,0): 1, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=2 LENGTH=1 + DATA { + (0,0): 1, 1, 1, 0, 0, 0, 0, 0, + (1,0): 1, 1, 0, 0, 0, 0, 0, 0, + (2,0): 1, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=3 LENGTH=1 + DATA { + (0,0): 1, 1, 1, 1, 0, 0, 0, 0, + (1,0): 1, 1, 1, 0, 0, 0, 0, 0, + (2,0): 1, 1, 0, 0, 0, 0, 0, 0, + (3,0): 1, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=4 LENGTH=1 + DATA { + (0,0): 1, 1, 1, 1, 1, 0, 0, 0, + (1,0): 1, 1, 1, 1, 0, 0, 0, 0, + (2,0): 1, 1, 1, 0, 0, 0, 0, 0, + (3,0): 1, 1, 0, 0, 0, 0, 0, 0, + (4,0): 1, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=5 LENGTH=1 + DATA { + (0,0): 1, 1, 1, 1, 1, 1, 0, 0, + (1,0): 1, 1, 1, 1, 1, 0, 0, 0, + (2,0): 1, 1, 1, 1, 0, 0, 0, 0, + (3,0): 1, 1, 1, 0, 0, 0, 0, 0, + (4,0): 1, 1, 0, 0, 0, 0, 0, 0, + (5,0): 1, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=6 LENGTH=1 + DATA { + (0,0): 1, 1, 1, 1, 1, 1, 1, 0, + (1,0): 1, 1, 1, 1, 1, 1, 0, 0, + (2,0): 1, 1, 1, 1, 1, 0, 0, 0, + (3,0): 1, 1, 1, 1, 0, 0, 0, 0, + (4,0): 1, 1, 1, 0, 0, 0, 0, 0, + (5,0): 1, 1, 0, 0, 0, 0, 0, 0, + (6,0): 1, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=7 LENGTH=1 + DATA { + (0,0): 1, 1, 1, 1, 1, 1, 1, 1, + (1,0): 1, 1, 1, 1, 1, 1, 1, 0, + (2,0): 1, 1, 1, 1, 1, 1, 0, 0, + (3,0): 1, 1, 1, 1, 1, 0, 0, 0, + (4,0): 1, 1, 1, 1, 0, 0, 0, 0, + (5,0): 1, 1, 1, 0, 0, 0, 0, 0, + (6,0): 1, 1, 0, 0, 0, 0, 0, 0, + (7,0): 1, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsMaxExceeded.ddl b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl new file mode 100644 index 0000000..3432433 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl @@ -0,0 +1,136 @@ +usage: h5dump [OPTIONS] files + OPTIONS + -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- + -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. + -B, --superblock Print the content of the super block + -H, --header Print the header only; no data is displayed + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- + -a P, --attribute=P Print the specified attribute + If an attribute name contains a slash (/), escape the + slash with a preceding backslash (\). + (See example section below.) + -d P, --dataset=P Print the specified dataset + -g P, --group=P Print the specified group and all members + -l P, --soft-link=P Print the value(s) of the specified soft link + -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value + -M L, --packedbits=L Print packed bits as unsigned integers, using mask + format L for an integer dataset specified with + option -d. L is a list of offset,length values, + separated by commas. Offset is the beginning bit in + the data value and length is the number of bits of + the mask. + -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- + -x, --xml Output in XML using Schema + -u, --use-dtd Output in XML using DTD + -D U, --xml-dtd=U Use the DTD or schema at U + -X S, --xml-ns=S (XML Schema) Use qualified names n the XML + ":": no namespace, default: "hdf5:" + E.g., to dump a file called `-f', use h5dump -- -f + +--------------- Subsetting Options --------------- + Subsetting is available by using the following options with a dataset + option. Subsetting is done by selecting a hyperslab from the data. + Thus, the options mirror those for performing a hyperslab selection. + One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting. + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + + -s START, --start=START Offset of start of subsetting selection + -S STRIDE, --stride=STRIDE Hyperslab stride + -c COUNT, --count=COUNT Number of blocks to include in selection + -k BLOCK, --block=BLOCK Size of block in hyperslab + START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the + number of dimensions in the dataspace being queried + (Alternate compact form of subsetting is described in the Reference Manual) + +--------------- Option Argument Conventions --------------- + D - is the file driver to use in opening the file. Acceptable values + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + See examples below for family, split, and multi driver special file name usage. + + F - is a filename. + P - is the full path from the root group to the object. + N - is an integer greater than 1. + T - is a string containing the floating point format, e.g '%.3f' + U - is a URI reference (as defined in [IETF RFC 2396], + updated by [IETF RFC 2732]) + B - is the form of binary output: NATIVE for a memory type, FILE for the + file type, LE or BE for pre-existing little or big endian types. + Must be used with -o (output file) and it is recommended that + -d (dataset) is used. B is an optional argument, defaults to NATIVE + Q - is the sort index type. It can be "creation_order" or "name" (default) + Z - is the sort order type. It can be "descending" or "ascending" (default) + +--------------- Examples --------------- + + 1) Attribute foo of the group /bar_none in file quux.h5 + + h5dump -a /bar_none/foo quux.h5 + + Attribute "high/low" of the group /bar_none in the file quux.h5 + + h5dump -a "/bar_none/high\/low" quux.h5 + + 2) Selecting a subset from dataset /foo in file quux.h5 + + h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5 + + 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' + using a little-endian type + + h5dump -d /dset -b LE -o out.bin quux.h5 + + 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset + + h5dump -d /dset -M 0,1,4,3 quux.h5 + + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 + + h5dump -d /foo -f split splitfile + + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + +h5dump error: Too many masks requested (max. 8). Mask list(0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1) diff --git a/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl new file mode 100644 index 0000000..e51a09e --- /dev/null +++ b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl @@ -0,0 +1,136 @@ +usage: h5dump [OPTIONS] files + OPTIONS + -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- + -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. + -B, --superblock Print the content of the super block + -H, --header Print the header only; no data is displayed + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- + -a P, --attribute=P Print the specified attribute + If an attribute name contains a slash (/), escape the + slash with a preceding backslash (\). + (See example section below.) + -d P, --dataset=P Print the specified dataset + -g P, --group=P Print the specified group and all members + -l P, --soft-link=P Print the value(s) of the specified soft link + -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value + -M L, --packedbits=L Print packed bits as unsigned integers, using mask + format L for an integer dataset specified with + option -d. L is a list of offset,length values, + separated by commas. Offset is the beginning bit in + the data value and length is the number of bits of + the mask. + -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- + -x, --xml Output in XML using Schema + -u, --use-dtd Output in XML using DTD + -D U, --xml-dtd=U Use the DTD or schema at U + -X S, --xml-ns=S (XML Schema) Use qualified names n the XML + ":": no namespace, default: "hdf5:" + E.g., to dump a file called `-f', use h5dump -- -f + +--------------- Subsetting Options --------------- + Subsetting is available by using the following options with a dataset + option. Subsetting is done by selecting a hyperslab from the data. + Thus, the options mirror those for performing a hyperslab selection. + One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting. + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + + -s START, --start=START Offset of start of subsetting selection + -S STRIDE, --stride=STRIDE Hyperslab stride + -c COUNT, --count=COUNT Number of blocks to include in selection + -k BLOCK, --block=BLOCK Size of block in hyperslab + START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the + number of dimensions in the dataspace being queried + (Alternate compact form of subsetting is described in the Reference Manual) + +--------------- Option Argument Conventions --------------- + D - is the file driver to use in opening the file. Acceptable values + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + See examples below for family, split, and multi driver special file name usage. + + F - is a filename. + P - is the full path from the root group to the object. + N - is an integer greater than 1. + T - is a string containing the floating point format, e.g '%.3f' + U - is a URI reference (as defined in [IETF RFC 2396], + updated by [IETF RFC 2732]) + B - is the form of binary output: NATIVE for a memory type, FILE for the + file type, LE or BE for pre-existing little or big endian types. + Must be used with -o (output file) and it is recommended that + -d (dataset) is used. B is an optional argument, defaults to NATIVE + Q - is the sort index type. It can be "creation_order" or "name" (default) + Z - is the sort order type. It can be "descending" or "ascending" (default) + +--------------- Examples --------------- + + 1) Attribute foo of the group /bar_none in file quux.h5 + + h5dump -a /bar_none/foo quux.h5 + + Attribute "high/low" of the group /bar_none in the file quux.h5 + + h5dump -a "/bar_none/high\/low" quux.h5 + + 2) Selecting a subset from dataset /foo in file quux.h5 + + h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5 + + 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' + using a little-endian type + + h5dump -d /dset -b LE -o out.bin quux.h5 + + 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset + + h5dump -d /dset -M 0,1,4,3 quux.h5 + + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 + + h5dump -d /foo -f split splitfile + + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + +h5dump error: Packed Bit offset value(64) must be between 0 and 63 diff --git a/tools/testfiles/pbits/tpbitsOffsetNegative.ddl b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl new file mode 100644 index 0000000..ba6e46d --- /dev/null +++ b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl @@ -0,0 +1,136 @@ +usage: h5dump [OPTIONS] files + OPTIONS + -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- File Options --------------- + -n, --contents Print a list of the file contents and exit + Optional value 1 also prints attributes. + -B, --superblock Print the content of the super block + -H, --header Print the header only; no data is displayed + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- + -a P, --attribute=P Print the specified attribute + If an attribute name contains a slash (/), escape the + slash with a preceding backslash (\). + (See example section below.) + -d P, --dataset=P Print the specified dataset + -g P, --group=P Print the specified group and all members + -l P, --soft-link=P Print the value(s) of the specified soft link + -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value + -M L, --packedbits=L Print packed bits as unsigned integers, using mask + format L for an integer dataset specified with + option -d. L is a list of offset,length values, + separated by commas. Offset is the beginning bit in + the data value and length is the number of bits of + the mask. + -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- XML Options --------------- + -x, --xml Output in XML using Schema + -u, --use-dtd Output in XML using DTD + -D U, --xml-dtd=U Use the DTD or schema at U + -X S, --xml-ns=S (XML Schema) Use qualified names n the XML + ":": no namespace, default: "hdf5:" + E.g., to dump a file called `-f', use h5dump -- -f + +--------------- Subsetting Options --------------- + Subsetting is available by using the following options with a dataset + option. Subsetting is done by selecting a hyperslab from the data. + Thus, the options mirror those for performing a hyperslab selection. + One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting. + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + + -s START, --start=START Offset of start of subsetting selection + -S STRIDE, --stride=STRIDE Hyperslab stride + -c COUNT, --count=COUNT Number of blocks to include in selection + -k BLOCK, --block=BLOCK Size of block in hyperslab + START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the + number of dimensions in the dataspace being queried + (Alternate compact form of subsetting is described in the Reference Manual) + +--------------- Option Argument Conventions --------------- + D - is the file driver to use in opening the file. Acceptable values + are "sec2", "family", "split", "multi", "direct", and "stream". Without + the file driver flag, the file will be opened with each driver in + turn and in the order specified above until one driver succeeds + in opening the file. + See examples below for family, split, and multi driver special file name usage. + + F - is a filename. + P - is the full path from the root group to the object. + N - is an integer greater than 1. + T - is a string containing the floating point format, e.g '%.3f' + U - is a URI reference (as defined in [IETF RFC 2396], + updated by [IETF RFC 2732]) + B - is the form of binary output: NATIVE for a memory type, FILE for the + file type, LE or BE for pre-existing little or big endian types. + Must be used with -o (output file) and it is recommended that + -d (dataset) is used. B is an optional argument, defaults to NATIVE + Q - is the sort index type. It can be "creation_order" or "name" (default) + Z - is the sort order type. It can be "descending" or "ascending" (default) + +--------------- Examples --------------- + + 1) Attribute foo of the group /bar_none in file quux.h5 + + h5dump -a /bar_none/foo quux.h5 + + Attribute "high/low" of the group /bar_none in the file quux.h5 + + h5dump -a "/bar_none/high\/low" quux.h5 + + 2) Selecting a subset from dataset /foo in file quux.h5 + + h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5 + + 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' + using a little-endian type + + h5dump -d /dset -b LE -o out.bin quux.h5 + + 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset + + h5dump -d /dset -M 0,1,4,3 quux.h5 + + 5) Dataset foo in files file1.h5 file2.h5 file3.h5 + + h5dump -d /foo file1.h5 file2.h5 file3.h5 + + 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 + + h5dump -d /foo -f split splitfile + + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam%05d.h5 + +h5dump error: Bad mask list(-1,1) diff --git a/tools/testfiles/pbits/tpbitsOverlapped.ddl b/tools/testfiles/pbits/tpbitsOverlapped.ddl new file mode 100644 index 0000000..9dcc9d2 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsOverlapped.ddl @@ -0,0 +1,50 @@ +HDF5 "packedbits.h5" { +DATASET "/DS08BITS" { + DATATYPE H5T_STD_I8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + PACKED_BITS OFFSET=0 LENGTH=1 + DATA { + (0,0): 1, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=1 LENGTH=1 + DATA { + (0,0): 1, 1, 0, 0, 0, 0, 0, 0, + (1,0): 1, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=2 LENGTH=1 + DATA { + (0,0): 1, 1, 1, 0, 0, 0, 0, 0, + (1,0): 1, 1, 0, 0, 0, 0, 0, 0, + (2,0): 1, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=0 LENGTH=3 + DATA { + (0,0): 7, 6, 4, 0, 0, 0, 0, 0, + (1,0): 6, 4, 0, 0, 0, 0, 0, 0, + (2,0): 4, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSigned.ddl b/tools/testfiles/pbits/tpbitsSigned.ddl new file mode 100644 index 0000000..b843388 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSigned.ddl @@ -0,0 +1,28 @@ +HDF5 "packedbits.h5" { +DATASET "/DS08BITS" { + DATATYPE H5T_STD_I8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + PACKED_BITS OFFSET=0 LENGTH=2 + DATA { + (0,0): 3, 2, 0, 0, 0, 0, 0, 0, + (1,0): 2, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=2 LENGTH=6 + DATA { + (0,0): 63, 63, 63, 62, 60, 56, 48, 32, + (1,0): 63, 63, 62, 60, 56, 48, 32, 0, + (2,0): 63, 62, 60, 56, 48, 32, 0, 0, + (3,0): 62, 60, 56, 48, 32, 0, 0, 0, + (4,0): 60, 56, 48, 32, 0, 0, 0, 0, + (5,0): 56, 48, 32, 0, 0, 0, 0, 0, + (6,0): 48, 32, 0, 0, 0, 0, 0, 0, + (7,0): 32, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSigned2.ddl b/tools/testfiles/pbits/tpbitsSigned2.ddl new file mode 100644 index 0000000..932b5fd --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSigned2.ddl @@ -0,0 +1,50 @@ +HDF5 "packedbits.h5" { +DATASET "/DS08BITS" { + DATATYPE H5T_STD_I8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + PACKED_BITS OFFSET=0 LENGTH=2 + DATA { + (0,0): 3, 2, 0, 0, 0, 0, 0, 0, + (1,0): 2, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=2 LENGTH=2 + DATA { + (0,0): 3, 3, 3, 2, 0, 0, 0, 0, + (1,0): 3, 3, 2, 0, 0, 0, 0, 0, + (2,0): 3, 2, 0, 0, 0, 0, 0, 0, + (3,0): 2, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=4 LENGTH=2 + DATA { + (0,0): 3, 3, 3, 3, 3, 2, 0, 0, + (1,0): 3, 3, 3, 3, 2, 0, 0, 0, + (2,0): 3, 3, 3, 2, 0, 0, 0, 0, + (3,0): 3, 3, 2, 0, 0, 0, 0, 0, + (4,0): 3, 2, 0, 0, 0, 0, 0, 0, + (5,0): 2, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=6 LENGTH=2 + DATA { + (0,0): 3, 3, 3, 3, 3, 3, 3, 2, + (1,0): 3, 3, 3, 3, 3, 3, 2, 0, + (2,0): 3, 3, 3, 3, 3, 2, 0, 0, + (3,0): 3, 3, 3, 3, 2, 0, 0, 0, + (4,0): 3, 3, 3, 2, 0, 0, 0, 0, + (5,0): 3, 3, 2, 0, 0, 0, 0, 0, + (6,0): 3, 2, 0, 0, 0, 0, 0, 0, + (7,0): 2, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSigned4.ddl b/tools/testfiles/pbits/tpbitsSigned4.ddl new file mode 100644 index 0000000..9eacd83 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSigned4.ddl @@ -0,0 +1,28 @@ +HDF5 "packedbits.h5" { +DATASET "/DS08BITS" { + DATATYPE H5T_STD_I8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + PACKED_BITS OFFSET=0 LENGTH=4 + DATA { + (0,0): 15, 14, 12, 8, 0, 0, 0, 0, + (1,0): 14, 12, 8, 0, 0, 0, 0, 0, + (2,0): 12, 8, 0, 0, 0, 0, 0, 0, + (3,0): 8, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=4 LENGTH=4 + DATA { + (0,0): 15, 15, 15, 15, 15, 14, 12, 8, + (1,0): 15, 15, 15, 15, 14, 12, 8, 0, + (2,0): 15, 15, 15, 14, 12, 8, 0, 0, + (3,0): 15, 15, 14, 12, 8, 0, 0, 0, + (4,0): 15, 14, 12, 8, 0, 0, 0, 0, + (5,0): 14, 12, 8, 0, 0, 0, 0, 0, + (6,0): 12, 8, 0, 0, 0, 0, 0, 0, + (7,0): 8, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedInt.ddl b/tools/testfiles/pbits/tpbitsSignedInt.ddl new file mode 100644 index 0000000..5c37e77 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedInt.ddl @@ -0,0 +1,28 @@ +HDF5 "packedbits.h5" { +DATASET "/DS16BITS" { + DATATYPE H5T_STD_I16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + PACKED_BITS OFFSET=0 LENGTH=2 + DATA { + (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=10 LENGTH=6 + DATA { + (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, + (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, + (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, + (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, + (4,0): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, + (5,0): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, + (6,0): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, + (7,0): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedInt4.ddl b/tools/testfiles/pbits/tpbitsSignedInt4.ddl new file mode 100644 index 0000000..4e9f0f6 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedInt4.ddl @@ -0,0 +1,50 @@ +HDF5 "packedbits.h5" { +DATASET "/DS16BITS" { + DATATYPE H5T_STD_I16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + PACKED_BITS OFFSET=0 LENGTH=4 + DATA { + (0,0): 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=4 LENGTH=4 + DATA { + (0,0): 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=8 LENGTH=4 + DATA { + (0,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, + (1,0): 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, + (2,0): 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, + (3,0): 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, + (4,0): 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=12 LENGTH=4 + DATA { + (0,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, + (1,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, + (2,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, + (3,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, + (4,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, + (5,0): 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, + (6,0): 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, + (7,0): 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedInt8.ddl b/tools/testfiles/pbits/tpbitsSignedInt8.ddl new file mode 100644 index 0000000..f2d6069 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedInt8.ddl @@ -0,0 +1,34 @@ +HDF5 "packedbits.h5" { +DATASET "/DS16BITS" { + DATATYPE H5T_STD_I16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + PACKED_BITS OFFSET=0 LENGTH=8 + DATA { + (0,0): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=8 LENGTH=8 + DATA { + (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, + (0,13): 224, 192, 128, + (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, + (1,13): 192, 128, 0, + (2,0): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, + (2,13): 128, 0, 0, + (3,0): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, + (3,14): 0, 0, + (4,0): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, + (4,14): 0, 0, + (5,0): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, + (5,15): 0, + (6,0): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, + (7,0): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedIntWhole.ddl b/tools/testfiles/pbits/tpbitsSignedIntWhole.ddl new file mode 100644 index 0000000..598c446 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedIntWhole.ddl @@ -0,0 +1,25 @@ +HDF5 "packedbits.h5" { +DATASET "/DS16BITS" { + DATATYPE H5T_STD_I16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + PACKED_BITS OFFSET=0 LENGTH=16 + DATA { + (0,0): -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, + (0,12): -4096, -8192, -16384, -32768, + (1,0): -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, + (1,12): -8192, -16384, -32768, 0, + (2,0): -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, + (2,11): -8192, -16384, -32768, 0, 0, + (3,0): -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, + (3,11): -16384, -32768, 0, 0, 0, + (4,0): -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, + (4,10): -16384, -32768, 0, 0, 0, 0, + (5,0): -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, + (5,10): -32768, 0, 0, 0, 0, 0, + (6,0): -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, + (6,10): 0, 0, 0, 0, 0, 0, + (7,0): -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, + (7,11): 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedLong.ddl b/tools/testfiles/pbits/tpbitsSignedLong.ddl new file mode 100644 index 0000000..b3eba61 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedLong.ddl @@ -0,0 +1,44 @@ +HDF5 "packedbits.h5" { +DATASET "/DS32BITS" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + PACKED_BITS OFFSET=0 LENGTH=2 + DATA { + (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=26 LENGTH=6 + DATA { + (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (0,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, + (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (1,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, + (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (2,17): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, + (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (3,17): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, + (4,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (4,17): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, + (5,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (5,17): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, + (6,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (6,17): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, + (7,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (7,17): 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedLong16.ddl b/tools/testfiles/pbits/tpbitsSignedLong16.ddl new file mode 100644 index 0000000..83fa889 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedLong16.ddl @@ -0,0 +1,67 @@ +HDF5 "packedbits.h5" { +DATASET "/DS32BITS" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + PACKED_BITS OFFSET=0 LENGTH=16 + DATA { + (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, + (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, + (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, + (1,23): 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, + (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,25): 0, 0, 0, 0, 0, 0, 0, + (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, + (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,26): 0, 0, 0, 0, 0, 0, + (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, + (4,9): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,27): 0, 0, 0, 0, 0, + (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, + (5,9): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,29): 0, 0, 0, + (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, + (6,9): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,30): 0, 0, + (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + (7,10): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=16 LENGTH=16 + DATA { + (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, + (0,18): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, + (0,27): 63488, 61440, 57344, 49152, 32768, + (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, + (1,18): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, + (1,27): 61440, 57344, 49152, 32768, 0, + (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, + (2,18): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, + (2,27): 57344, 49152, 32768, 0, 0, + (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,9): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, + (3,18): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, + (3,27): 49152, 32768, 0, 0, 0, + (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,9): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, + (4,18): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, + (4,27): 32768, 0, 0, 0, 0, + (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,9): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, + (5,18): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + (5,28): 0, 0, 0, 0, + (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,9): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, + (6,18): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, + (6,29): 0, 0, 0, + (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,9): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, + (7,18): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + (7,31): 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedLong8.ddl b/tools/testfiles/pbits/tpbitsSignedLong8.ddl new file mode 100644 index 0000000..e99b1d0 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedLong8.ddl @@ -0,0 +1,96 @@ +HDF5 "packedbits.h5" { +DATASET "/DS32BITS" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + PACKED_BITS OFFSET=0 LENGTH=8 + DATA { + (0,0): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,17): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,18): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,18): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,19): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,20): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,20): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=8 LENGTH=8 + DATA { + (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, + (0,13): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, + (1,13): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, + (2,13): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, + (3,14): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, + (4,14): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, + (5,15): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, + (6,16): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, + (7,16): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=16 LENGTH=8 + DATA { + (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (0,13): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, + (0,28): 0, 0, 0, 0, + (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (1,13): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, + (1,28): 0, 0, 0, 0, + (2,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (2,13): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, + (2,29): 0, 0, 0, + (3,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (3,13): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,30): 0, 0, + (4,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (4,13): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,30): 0, 0, + (5,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, + (5,13): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,31): 0, + (6,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, + (6,13): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, + (7,13): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=24 LENGTH=8 + DATA { + (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (0,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, + (0,26): 252, 248, 240, 224, 192, 128, + (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (1,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, + (1,26): 248, 240, 224, 192, 128, 0, + (2,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (2,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, + (2,26): 240, 224, 192, 128, 0, 0, + (3,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (3,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, + (3,26): 224, 192, 128, 0, 0, 0, + (4,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (4,13): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, + (4,26): 192, 128, 0, 0, 0, 0, + (5,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (5,13): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, + (5,26): 128, 0, 0, 0, 0, 0, + (6,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (6,13): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, + (6,26): 0, 0, 0, 0, 0, 0, + (7,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (7,13): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, + (7,27): 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedLongLong.ddl b/tools/testfiles/pbits/tpbitsSignedLongLong.ddl new file mode 100644 index 0000000..2be8a55 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedLongLong.ddl @@ -0,0 +1,68 @@ +HDF5 "packedbits.h5" { +DATASET "/DS64BITS" { + DATATYPE H5T_STD_I64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + PACKED_BITS OFFSET=0 LENGTH=2 + DATA { + (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=58 LENGTH=6 + DATA { + (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (0,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (0,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (0,49): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, + (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (1,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (1,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (1,49): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, + (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (2,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (2,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (2,49): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, + (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (3,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (3,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (3,49): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, + (4,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (4,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (4,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (4,49): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, + (5,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (5,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (5,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (5,49): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, + (6,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (6,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (6,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (6,49): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, + (7,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (7,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (7,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (7,49): 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedLongLong16.ddl b/tools/testfiles/pbits/tpbitsSignedLongLong16.ddl new file mode 100644 index 0000000..44e336d --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedLongLong16.ddl @@ -0,0 +1,196 @@ +HDF5 "packedbits.h5" { +DATASET "/DS64BITS" { + DATATYPE H5T_STD_I64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + PACKED_BITS OFFSET=0 LENGTH=16 + DATA { + (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, + (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, + (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, + (1,23): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,45): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, + (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,25): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,47): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, + (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,26): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,48): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, + (4,9): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,27): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, + (5,9): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,29): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, + (6,9): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,30): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,52): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + (7,10): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,32): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,54): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=16 LENGTH=16 + DATA { + (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, + (0,18): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, + (0,27): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, + (1,18): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, + (1,27): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, + (2,18): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, + (2,27): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,45): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,9): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, + (3,18): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, + (3,27): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,9): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, + (4,18): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, + (4,27): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,48): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,9): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, + (5,18): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + (5,28): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,50): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,9): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, + (6,18): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, + (6,29): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,9): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, + (7,18): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + (7,31): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,53): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=32 LENGTH=16 + DATA { + (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,27): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, + (0,36): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, + (0,45): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,63): 0, + (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,27): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, + (1,36): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, + (1,45): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,27): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, + (2,36): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, + (2,45): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,27): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, + (3,36): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + (3,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,27): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, + (4,36): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, + (4,47): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,27): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, + (5,36): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + (5,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,27): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, + (6,36): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, + (6,50): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, + (7,27): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, + (7,36): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=48 LENGTH=16 + DATA { + (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,45): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, + (0,54): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, + (0,63): 32768, + (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,45): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, + (1,54): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,45): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, + (2,54): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, + (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,45): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, + (3,54): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, + (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,45): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, + (4,54): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, + (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, + (5,45): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, + (5,54): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, + (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, + (6,45): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, + (6,54): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,36): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, + (7,45): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, + (7,54): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedLongLong32.ddl b/tools/testfiles/pbits/tpbitsSignedLongLong32.ddl new file mode 100644 index 0000000..6ab4ac4 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedLongLong32.ddl @@ -0,0 +1,175 @@ +HDF5 "packedbits.h5" { +DATASET "/DS64BITS" { + DATATYPE H5T_STD_I64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + PACKED_BITS OFFSET=0 LENGTH=32 + DATA { + (0,0): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, + (0,5): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, + (0,10): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, + (0,15): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, + (0,20): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, + (0,25): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, + (0,30): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, + (1,5): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, + (1,10): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, + (1,15): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, + (1,20): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, + (1,25): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, + (1,30): 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, + (2,5): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, + (2,10): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, + (2,15): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, + (2,20): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, + (2,25): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, + (2,32): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,54): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, + (3,5): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, + (3,10): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, + (3,15): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, + (3,20): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, + (3,25): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, + (3,35): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,57): 0, 0, 0, 0, 0, 0, 0, + (4,0): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, + (4,5): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, + (4,10): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, + (4,15): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, + (4,20): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, + (4,25): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,38): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,60): 0, 0, 0, 0, + (5,0): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, + (5,5): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, + (5,10): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, + (5,15): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, + (5,20): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, + (5,25): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,41): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,63): 0, + (6,0): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, + (6,5): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, + (6,10): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, + (6,15): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, + (6,20): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, + (6,25): 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, + (7,5): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, + (7,10): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, + (7,15): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, + (7,20): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, + (7,27): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=32 LENGTH=32 + DATA { + (0,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (0,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (0,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (0,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (0,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (0,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (0,30): 4294967295, 4294967295, 4294967295, 4294967294, 4294967292, + (0,35): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, + (0,40): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, + (0,45): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, + (0,50): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, + (0,55): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, + (0,60): 4026531840, 3758096384, 3221225472, 2147483648, + (1,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (1,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (1,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (1,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (1,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (1,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (1,30): 4294967295, 4294967295, 4294967294, 4294967292, 4294967288, + (1,35): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, + (1,40): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, + (1,45): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, + (1,50): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, + (1,55): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, + (1,60): 3758096384, 3221225472, 2147483648, 0, + (2,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (2,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (2,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (2,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (2,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (2,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (2,30): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, + (2,35): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, + (2,40): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, + (2,45): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, + (2,50): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, + (2,55): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, + (2,60): 3221225472, 2147483648, 0, 0, + (3,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (3,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (3,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (3,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (3,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (3,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (3,30): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, + (3,35): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, + (3,40): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, + (3,45): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, + (3,50): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, + (3,55): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, + (3,60): 2147483648, 0, 0, 0, + (4,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (4,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (4,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (4,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (4,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (4,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967294, + (4,30): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, + (4,35): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, + (4,40): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, + (4,45): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, + (4,50): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, + (4,55): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, + (4,62): 0, 0, + (5,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (5,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (5,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (5,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (5,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (5,25): 4294967295, 4294967295, 4294967295, 4294967294, 4294967292, + (5,30): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, + (5,35): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, + (5,40): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, + (5,45): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, + (5,50): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, + (5,55): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, + (6,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (6,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (6,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (6,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (6,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (6,25): 4294967295, 4294967295, 4294967294, 4294967292, 4294967288, + (6,30): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, + (6,35): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, + (6,40): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, + (6,45): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, + (6,50): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, + (6,55): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, + (7,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (7,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (7,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (7,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (7,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (7,25): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, + (7,30): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, + (7,35): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, + (7,40): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, + (7,45): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, + (7,50): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, + (7,55): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedLongLongWhole.ddl b/tools/testfiles/pbits/tpbitsSignedLongLongWhole.ddl new file mode 100644 index 0000000..134f3be --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedLongLongWhole.ddl @@ -0,0 +1,121 @@ +HDF5 "packedbits.h5" { +DATASET "/DS64BITS" { + DATATYPE H5T_STD_I64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + PACKED_BITS OFFSET=0 LENGTH=64 + DATA { + (0,0): -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, + (0,12): -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, + (0,20): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, + (0,26): -67108864, -134217728, -268435456, -536870912, -1073741824, + (0,31): -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, + (0,36): -68719476736, -137438953472, -274877906944, -549755813888, + (0,40): -1099511627776, -2199023255552, -4398046511104, -8796093022208, + (0,44): -17592186044416, -35184372088832, -70368744177664, + (0,47): -140737488355328, -281474976710656, -562949953421312, + (0,50): -1125899906842624, -2251799813685248, -4503599627370496, + (0,53): -9007199254740992, -18014398509481984, -36028797018963968, + (0,56): -72057594037927936, -144115188075855872, -288230376151711744, + (0,59): -576460752303423488, -1152921504606846976, -2305843009213693952, + (0,62): -4611686018427387904, -9223372036854775808, + (1,0): -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, + (1,12): -8192, -16384, -32768, -65536, -131072, -262144, -524288, + (1,19): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, + (1,25): -67108864, -134217728, -268435456, -536870912, -1073741824, + (1,30): -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, + (1,35): -68719476736, -137438953472, -274877906944, -549755813888, + (1,39): -1099511627776, -2199023255552, -4398046511104, -8796093022208, + (1,43): -17592186044416, -35184372088832, -70368744177664, + (1,46): -140737488355328, -281474976710656, -562949953421312, + (1,49): -1125899906842624, -2251799813685248, -4503599627370496, + (1,52): -9007199254740992, -18014398509481984, -36028797018963968, + (1,55): -72057594037927936, -144115188075855872, -288230376151711744, + (1,58): -576460752303423488, -1152921504606846976, -2305843009213693952, + (1,61): -4611686018427387904, -9223372036854775808, 0, + (2,0): -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, + (2,11): -8192, -16384, -32768, -65536, -131072, -262144, -524288, + (2,18): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, + (2,24): -67108864, -134217728, -268435456, -536870912, -1073741824, + (2,29): -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, + (2,34): -68719476736, -137438953472, -274877906944, -549755813888, + (2,38): -1099511627776, -2199023255552, -4398046511104, -8796093022208, + (2,42): -17592186044416, -35184372088832, -70368744177664, + (2,45): -140737488355328, -281474976710656, -562949953421312, + (2,48): -1125899906842624, -2251799813685248, -4503599627370496, + (2,51): -9007199254740992, -18014398509481984, -36028797018963968, + (2,54): -72057594037927936, -144115188075855872, -288230376151711744, + (2,57): -576460752303423488, -1152921504606846976, -2305843009213693952, + (2,60): -4611686018427387904, -9223372036854775808, 0, 0, + (3,0): -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, + (3,11): -16384, -32768, -65536, -131072, -262144, -524288, -1048576, + (3,18): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, + (3,24): -134217728, -268435456, -536870912, -1073741824, -2147483648, + (3,29): -4294967296, -8589934592, -17179869184, -34359738368, + (3,33): -68719476736, -137438953472, -274877906944, -549755813888, + (3,37): -1099511627776, -2199023255552, -4398046511104, -8796093022208, + (3,41): -17592186044416, -35184372088832, -70368744177664, + (3,44): -140737488355328, -281474976710656, -562949953421312, + (3,47): -1125899906842624, -2251799813685248, -4503599627370496, + (3,50): -9007199254740992, -18014398509481984, -36028797018963968, + (3,53): -72057594037927936, -144115188075855872, -288230376151711744, + (3,56): -576460752303423488, -1152921504606846976, -2305843009213693952, + (3,59): -4611686018427387904, -9223372036854775808, 0, 0, 0, + (4,0): -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, + (4,10): -16384, -32768, -65536, -131072, -262144, -524288, -1048576, + (4,17): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, + (4,23): -134217728, -268435456, -536870912, -1073741824, -2147483648, + (4,28): -4294967296, -8589934592, -17179869184, -34359738368, + (4,32): -68719476736, -137438953472, -274877906944, -549755813888, + (4,36): -1099511627776, -2199023255552, -4398046511104, -8796093022208, + (4,40): -17592186044416, -35184372088832, -70368744177664, + (4,43): -140737488355328, -281474976710656, -562949953421312, + (4,46): -1125899906842624, -2251799813685248, -4503599627370496, + (4,49): -9007199254740992, -18014398509481984, -36028797018963968, + (4,52): -72057594037927936, -144115188075855872, -288230376151711744, + (4,55): -576460752303423488, -1152921504606846976, -2305843009213693952, + (4,58): -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, + (5,0): -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, + (5,10): -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, + (5,17): -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, + (5,23): -268435456, -536870912, -1073741824, -2147483648, -4294967296, + (5,28): -8589934592, -17179869184, -34359738368, -68719476736, + (5,32): -137438953472, -274877906944, -549755813888, -1099511627776, + (5,36): -2199023255552, -4398046511104, -8796093022208, -17592186044416, + (5,40): -35184372088832, -70368744177664, -140737488355328, + (5,43): -281474976710656, -562949953421312, -1125899906842624, + (5,46): -2251799813685248, -4503599627370496, -9007199254740992, + (5,49): -18014398509481984, -36028797018963968, -72057594037927936, + (5,52): -144115188075855872, -288230376151711744, -576460752303423488, + (5,55): -1152921504606846976, -2305843009213693952, -4611686018427387904, + (5,58): -9223372036854775808, 0, 0, 0, 0, 0, + (6,0): -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, + (6,10): -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, + (6,17): -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, + (6,23): -536870912, -1073741824, -2147483648, -4294967296, -8589934592, + (6,28): -17179869184, -34359738368, -68719476736, -137438953472, + (6,32): -274877906944, -549755813888, -1099511627776, -2199023255552, + (6,36): -4398046511104, -8796093022208, -17592186044416, -35184372088832, + (6,40): -70368744177664, -140737488355328, -281474976710656, + (6,43): -562949953421312, -1125899906842624, -2251799813685248, + (6,46): -4503599627370496, -9007199254740992, -18014398509481984, + (6,49): -36028797018963968, -72057594037927936, -144115188075855872, + (6,52): -288230376151711744, -576460752303423488, -1152921504606846976, + (6,55): -2305843009213693952, -4611686018427387904, -9223372036854775808, + (6,58): 0, 0, 0, 0, 0, 0, + (7,0): -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, + (7,9): -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, + (7,16): -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, + (7,22): -536870912, -1073741824, -2147483648, -4294967296, -8589934592, + (7,27): -17179869184, -34359738368, -68719476736, -137438953472, + (7,31): -274877906944, -549755813888, -1099511627776, -2199023255552, + (7,35): -4398046511104, -8796093022208, -17592186044416, -35184372088832, + (7,39): -70368744177664, -140737488355328, -281474976710656, + (7,42): -562949953421312, -1125899906842624, -2251799813685248, + (7,45): -4503599627370496, -9007199254740992, -18014398509481984, + (7,48): -36028797018963968, -72057594037927936, -144115188075855872, + (7,51): -288230376151711744, -576460752303423488, -1152921504606846976, + (7,54): -2305843009213693952, -4611686018427387904, -9223372036854775808, + (7,57): 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedLongLongWhole1.ddl b/tools/testfiles/pbits/tpbitsSignedLongLongWhole1.ddl new file mode 100644 index 0000000..7431670 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedLongLongWhole1.ddl @@ -0,0 +1,175 @@ +HDF5 "packedbits.h5" { +DATASET "/DS64BITS" { + DATATYPE H5T_STD_I64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + PACKED_BITS OFFSET=1 LENGTH=63 + DATA { + (0,0): 9223372036854775807, 9223372036854775807, 9223372036854775806, + (0,3): 9223372036854775804, 9223372036854775800, 9223372036854775792, + (0,6): 9223372036854775776, 9223372036854775744, 9223372036854775680, + (0,9): 9223372036854775552, 9223372036854775296, 9223372036854774784, + (0,12): 9223372036854773760, 9223372036854771712, 9223372036854767616, + (0,15): 9223372036854759424, 9223372036854743040, 9223372036854710272, + (0,18): 9223372036854644736, 9223372036854513664, 9223372036854251520, + (0,21): 9223372036853727232, 9223372036852678656, 9223372036850581504, + (0,24): 9223372036846387200, 9223372036837998592, 9223372036821221376, + (0,27): 9223372036787666944, 9223372036720558080, 9223372036586340352, + (0,30): 9223372036317904896, 9223372035781033984, 9223372034707292160, + (0,33): 9223372032559808512, 9223372028264841216, 9223372019674906624, + (0,36): 9223372002495037440, 9223371968135299072, 9223371899415822336, + (0,39): 9223371761976868864, 9223371487098961920, 9223370937343148032, + (0,42): 9223369837831520256, 9223367638808264704, 9223363240761753600, + (0,45): 9223354444668731392, 9223336852482686976, 9223301668110598144, + (0,48): 9223231299366420480, 9223090561878065152, 9222809086901354496, + (0,51): 9222246136947933184, 9221120237041090560, 9218868437227405312, + (0,54): 9214364837600034816, 9205357638345293824, 9187343239835811840, + (0,57): 9151314442816847872, 9079256848778919936, 8935141660703064064, + (0,60): 8646911284551352320, 8070450532247928832, 6917529027641081856, + (0,63): 4611686018427387904, + (1,0): 9223372036854775807, 9223372036854775806, 9223372036854775804, + (1,3): 9223372036854775800, 9223372036854775792, 9223372036854775776, + (1,6): 9223372036854775744, 9223372036854775680, 9223372036854775552, + (1,9): 9223372036854775296, 9223372036854774784, 9223372036854773760, + (1,12): 9223372036854771712, 9223372036854767616, 9223372036854759424, + (1,15): 9223372036854743040, 9223372036854710272, 9223372036854644736, + (1,18): 9223372036854513664, 9223372036854251520, 9223372036853727232, + (1,21): 9223372036852678656, 9223372036850581504, 9223372036846387200, + (1,24): 9223372036837998592, 9223372036821221376, 9223372036787666944, + (1,27): 9223372036720558080, 9223372036586340352, 9223372036317904896, + (1,30): 9223372035781033984, 9223372034707292160, 9223372032559808512, + (1,33): 9223372028264841216, 9223372019674906624, 9223372002495037440, + (1,36): 9223371968135299072, 9223371899415822336, 9223371761976868864, + (1,39): 9223371487098961920, 9223370937343148032, 9223369837831520256, + (1,42): 9223367638808264704, 9223363240761753600, 9223354444668731392, + (1,45): 9223336852482686976, 9223301668110598144, 9223231299366420480, + (1,48): 9223090561878065152, 9222809086901354496, 9222246136947933184, + (1,51): 9221120237041090560, 9218868437227405312, 9214364837600034816, + (1,54): 9205357638345293824, 9187343239835811840, 9151314442816847872, + (1,57): 9079256848778919936, 8935141660703064064, 8646911284551352320, + (1,60): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, + (2,0): 9223372036854775806, 9223372036854775804, 9223372036854775800, + (2,3): 9223372036854775792, 9223372036854775776, 9223372036854775744, + (2,6): 9223372036854775680, 9223372036854775552, 9223372036854775296, + (2,9): 9223372036854774784, 9223372036854773760, 9223372036854771712, + (2,12): 9223372036854767616, 9223372036854759424, 9223372036854743040, + (2,15): 9223372036854710272, 9223372036854644736, 9223372036854513664, + (2,18): 9223372036854251520, 9223372036853727232, 9223372036852678656, + (2,21): 9223372036850581504, 9223372036846387200, 9223372036837998592, + (2,24): 9223372036821221376, 9223372036787666944, 9223372036720558080, + (2,27): 9223372036586340352, 9223372036317904896, 9223372035781033984, + (2,30): 9223372034707292160, 9223372032559808512, 9223372028264841216, + (2,33): 9223372019674906624, 9223372002495037440, 9223371968135299072, + (2,36): 9223371899415822336, 9223371761976868864, 9223371487098961920, + (2,39): 9223370937343148032, 9223369837831520256, 9223367638808264704, + (2,42): 9223363240761753600, 9223354444668731392, 9223336852482686976, + (2,45): 9223301668110598144, 9223231299366420480, 9223090561878065152, + (2,48): 9222809086901354496, 9222246136947933184, 9221120237041090560, + (2,51): 9218868437227405312, 9214364837600034816, 9205357638345293824, + (2,54): 9187343239835811840, 9151314442816847872, 9079256848778919936, + (2,57): 8935141660703064064, 8646911284551352320, 8070450532247928832, + (2,60): 6917529027641081856, 4611686018427387904, 0, 0, + (3,0): 9223372036854775804, 9223372036854775800, 9223372036854775792, + (3,3): 9223372036854775776, 9223372036854775744, 9223372036854775680, + (3,6): 9223372036854775552, 9223372036854775296, 9223372036854774784, + (3,9): 9223372036854773760, 9223372036854771712, 9223372036854767616, + (3,12): 9223372036854759424, 9223372036854743040, 9223372036854710272, + (3,15): 9223372036854644736, 9223372036854513664, 9223372036854251520, + (3,18): 9223372036853727232, 9223372036852678656, 9223372036850581504, + (3,21): 9223372036846387200, 9223372036837998592, 9223372036821221376, + (3,24): 9223372036787666944, 9223372036720558080, 9223372036586340352, + (3,27): 9223372036317904896, 9223372035781033984, 9223372034707292160, + (3,30): 9223372032559808512, 9223372028264841216, 9223372019674906624, + (3,33): 9223372002495037440, 9223371968135299072, 9223371899415822336, + (3,36): 9223371761976868864, 9223371487098961920, 9223370937343148032, + (3,39): 9223369837831520256, 9223367638808264704, 9223363240761753600, + (3,42): 9223354444668731392, 9223336852482686976, 9223301668110598144, + (3,45): 9223231299366420480, 9223090561878065152, 9222809086901354496, + (3,48): 9222246136947933184, 9221120237041090560, 9218868437227405312, + (3,51): 9214364837600034816, 9205357638345293824, 9187343239835811840, + (3,54): 9151314442816847872, 9079256848778919936, 8935141660703064064, + (3,57): 8646911284551352320, 8070450532247928832, 6917529027641081856, + (3,60): 4611686018427387904, 0, 0, 0, + (4,0): 9223372036854775800, 9223372036854775792, 9223372036854775776, + (4,3): 9223372036854775744, 9223372036854775680, 9223372036854775552, + (4,6): 9223372036854775296, 9223372036854774784, 9223372036854773760, + (4,9): 9223372036854771712, 9223372036854767616, 9223372036854759424, + (4,12): 9223372036854743040, 9223372036854710272, 9223372036854644736, + (4,15): 9223372036854513664, 9223372036854251520, 9223372036853727232, + (4,18): 9223372036852678656, 9223372036850581504, 9223372036846387200, + (4,21): 9223372036837998592, 9223372036821221376, 9223372036787666944, + (4,24): 9223372036720558080, 9223372036586340352, 9223372036317904896, + (4,27): 9223372035781033984, 9223372034707292160, 9223372032559808512, + (4,30): 9223372028264841216, 9223372019674906624, 9223372002495037440, + (4,33): 9223371968135299072, 9223371899415822336, 9223371761976868864, + (4,36): 9223371487098961920, 9223370937343148032, 9223369837831520256, + (4,39): 9223367638808264704, 9223363240761753600, 9223354444668731392, + (4,42): 9223336852482686976, 9223301668110598144, 9223231299366420480, + (4,45): 9223090561878065152, 9222809086901354496, 9222246136947933184, + (4,48): 9221120237041090560, 9218868437227405312, 9214364837600034816, + (4,51): 9205357638345293824, 9187343239835811840, 9151314442816847872, + (4,54): 9079256848778919936, 8935141660703064064, 8646911284551352320, + (4,57): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, + (4,61): 0, 0, 0, + (5,0): 9223372036854775792, 9223372036854775776, 9223372036854775744, + (5,3): 9223372036854775680, 9223372036854775552, 9223372036854775296, + (5,6): 9223372036854774784, 9223372036854773760, 9223372036854771712, + (5,9): 9223372036854767616, 9223372036854759424, 9223372036854743040, + (5,12): 9223372036854710272, 9223372036854644736, 9223372036854513664, + (5,15): 9223372036854251520, 9223372036853727232, 9223372036852678656, + (5,18): 9223372036850581504, 9223372036846387200, 9223372036837998592, + (5,21): 9223372036821221376, 9223372036787666944, 9223372036720558080, + (5,24): 9223372036586340352, 9223372036317904896, 9223372035781033984, + (5,27): 9223372034707292160, 9223372032559808512, 9223372028264841216, + (5,30): 9223372019674906624, 9223372002495037440, 9223371968135299072, + (5,33): 9223371899415822336, 9223371761976868864, 9223371487098961920, + (5,36): 9223370937343148032, 9223369837831520256, 9223367638808264704, + (5,39): 9223363240761753600, 9223354444668731392, 9223336852482686976, + (5,42): 9223301668110598144, 9223231299366420480, 9223090561878065152, + (5,45): 9222809086901354496, 9222246136947933184, 9221120237041090560, + (5,48): 9218868437227405312, 9214364837600034816, 9205357638345293824, + (5,51): 9187343239835811840, 9151314442816847872, 9079256848778919936, + (5,54): 8935141660703064064, 8646911284551352320, 8070450532247928832, + (5,57): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0, + (6,0): 9223372036854775776, 9223372036854775744, 9223372036854775680, + (6,3): 9223372036854775552, 9223372036854775296, 9223372036854774784, + (6,6): 9223372036854773760, 9223372036854771712, 9223372036854767616, + (6,9): 9223372036854759424, 9223372036854743040, 9223372036854710272, + (6,12): 9223372036854644736, 9223372036854513664, 9223372036854251520, + (6,15): 9223372036853727232, 9223372036852678656, 9223372036850581504, + (6,18): 9223372036846387200, 9223372036837998592, 9223372036821221376, + (6,21): 9223372036787666944, 9223372036720558080, 9223372036586340352, + (6,24): 9223372036317904896, 9223372035781033984, 9223372034707292160, + (6,27): 9223372032559808512, 9223372028264841216, 9223372019674906624, + (6,30): 9223372002495037440, 9223371968135299072, 9223371899415822336, + (6,33): 9223371761976868864, 9223371487098961920, 9223370937343148032, + (6,36): 9223369837831520256, 9223367638808264704, 9223363240761753600, + (6,39): 9223354444668731392, 9223336852482686976, 9223301668110598144, + (6,42): 9223231299366420480, 9223090561878065152, 9222809086901354496, + (6,45): 9222246136947933184, 9221120237041090560, 9218868437227405312, + (6,48): 9214364837600034816, 9205357638345293824, 9187343239835811840, + (6,51): 9151314442816847872, 9079256848778919936, 8935141660703064064, + (6,54): 8646911284551352320, 8070450532247928832, 6917529027641081856, + (6,57): 4611686018427387904, 0, 0, 0, 0, 0, 0, + (7,0): 9223372036854775744, 9223372036854775680, 9223372036854775552, + (7,3): 9223372036854775296, 9223372036854774784, 9223372036854773760, + (7,6): 9223372036854771712, 9223372036854767616, 9223372036854759424, + (7,9): 9223372036854743040, 9223372036854710272, 9223372036854644736, + (7,12): 9223372036854513664, 9223372036854251520, 9223372036853727232, + (7,15): 9223372036852678656, 9223372036850581504, 9223372036846387200, + (7,18): 9223372036837998592, 9223372036821221376, 9223372036787666944, + (7,21): 9223372036720558080, 9223372036586340352, 9223372036317904896, + (7,24): 9223372035781033984, 9223372034707292160, 9223372032559808512, + (7,27): 9223372028264841216, 9223372019674906624, 9223372002495037440, + (7,30): 9223371968135299072, 9223371899415822336, 9223371761976868864, + (7,33): 9223371487098961920, 9223370937343148032, 9223369837831520256, + (7,36): 9223367638808264704, 9223363240761753600, 9223354444668731392, + (7,39): 9223336852482686976, 9223301668110598144, 9223231299366420480, + (7,42): 9223090561878065152, 9222809086901354496, 9222246136947933184, + (7,45): 9221120237041090560, 9218868437227405312, 9214364837600034816, + (7,48): 9205357638345293824, 9187343239835811840, 9151314442816847872, + (7,51): 9079256848778919936, 8935141660703064064, 8646911284551352320, + (7,54): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, + (7,58): 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedLongLongWhole63.ddl b/tools/testfiles/pbits/tpbitsSignedLongLongWhole63.ddl new file mode 100644 index 0000000..c7cc65f --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedLongLongWhole63.ddl @@ -0,0 +1,172 @@ +HDF5 "packedbits.h5" { +DATASET "/DS64BITS" { + DATATYPE H5T_STD_I64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + PACKED_BITS OFFSET=0 LENGTH=63 + DATA { + (0,0): 9223372036854775807, 9223372036854775806, 9223372036854775804, + (0,3): 9223372036854775800, 9223372036854775792, 9223372036854775776, + (0,6): 9223372036854775744, 9223372036854775680, 9223372036854775552, + (0,9): 9223372036854775296, 9223372036854774784, 9223372036854773760, + (0,12): 9223372036854771712, 9223372036854767616, 9223372036854759424, + (0,15): 9223372036854743040, 9223372036854710272, 9223372036854644736, + (0,18): 9223372036854513664, 9223372036854251520, 9223372036853727232, + (0,21): 9223372036852678656, 9223372036850581504, 9223372036846387200, + (0,24): 9223372036837998592, 9223372036821221376, 9223372036787666944, + (0,27): 9223372036720558080, 9223372036586340352, 9223372036317904896, + (0,30): 9223372035781033984, 9223372034707292160, 9223372032559808512, + (0,33): 9223372028264841216, 9223372019674906624, 9223372002495037440, + (0,36): 9223371968135299072, 9223371899415822336, 9223371761976868864, + (0,39): 9223371487098961920, 9223370937343148032, 9223369837831520256, + (0,42): 9223367638808264704, 9223363240761753600, 9223354444668731392, + (0,45): 9223336852482686976, 9223301668110598144, 9223231299366420480, + (0,48): 9223090561878065152, 9222809086901354496, 9222246136947933184, + (0,51): 9221120237041090560, 9218868437227405312, 9214364837600034816, + (0,54): 9205357638345293824, 9187343239835811840, 9151314442816847872, + (0,57): 9079256848778919936, 8935141660703064064, 8646911284551352320, + (0,60): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, + (1,0): 9223372036854775806, 9223372036854775804, 9223372036854775800, + (1,3): 9223372036854775792, 9223372036854775776, 9223372036854775744, + (1,6): 9223372036854775680, 9223372036854775552, 9223372036854775296, + (1,9): 9223372036854774784, 9223372036854773760, 9223372036854771712, + (1,12): 9223372036854767616, 9223372036854759424, 9223372036854743040, + (1,15): 9223372036854710272, 9223372036854644736, 9223372036854513664, + (1,18): 9223372036854251520, 9223372036853727232, 9223372036852678656, + (1,21): 9223372036850581504, 9223372036846387200, 9223372036837998592, + (1,24): 9223372036821221376, 9223372036787666944, 9223372036720558080, + (1,27): 9223372036586340352, 9223372036317904896, 9223372035781033984, + (1,30): 9223372034707292160, 9223372032559808512, 9223372028264841216, + (1,33): 9223372019674906624, 9223372002495037440, 9223371968135299072, + (1,36): 9223371899415822336, 9223371761976868864, 9223371487098961920, + (1,39): 9223370937343148032, 9223369837831520256, 9223367638808264704, + (1,42): 9223363240761753600, 9223354444668731392, 9223336852482686976, + (1,45): 9223301668110598144, 9223231299366420480, 9223090561878065152, + (1,48): 9222809086901354496, 9222246136947933184, 9221120237041090560, + (1,51): 9218868437227405312, 9214364837600034816, 9205357638345293824, + (1,54): 9187343239835811840, 9151314442816847872, 9079256848778919936, + (1,57): 8935141660703064064, 8646911284551352320, 8070450532247928832, + (1,60): 6917529027641081856, 4611686018427387904, 0, 0, + (2,0): 9223372036854775804, 9223372036854775800, 9223372036854775792, + (2,3): 9223372036854775776, 9223372036854775744, 9223372036854775680, + (2,6): 9223372036854775552, 9223372036854775296, 9223372036854774784, + (2,9): 9223372036854773760, 9223372036854771712, 9223372036854767616, + (2,12): 9223372036854759424, 9223372036854743040, 9223372036854710272, + (2,15): 9223372036854644736, 9223372036854513664, 9223372036854251520, + (2,18): 9223372036853727232, 9223372036852678656, 9223372036850581504, + (2,21): 9223372036846387200, 9223372036837998592, 9223372036821221376, + (2,24): 9223372036787666944, 9223372036720558080, 9223372036586340352, + (2,27): 9223372036317904896, 9223372035781033984, 9223372034707292160, + (2,30): 9223372032559808512, 9223372028264841216, 9223372019674906624, + (2,33): 9223372002495037440, 9223371968135299072, 9223371899415822336, + (2,36): 9223371761976868864, 9223371487098961920, 9223370937343148032, + (2,39): 9223369837831520256, 9223367638808264704, 9223363240761753600, + (2,42): 9223354444668731392, 9223336852482686976, 9223301668110598144, + (2,45): 9223231299366420480, 9223090561878065152, 9222809086901354496, + (2,48): 9222246136947933184, 9221120237041090560, 9218868437227405312, + (2,51): 9214364837600034816, 9205357638345293824, 9187343239835811840, + (2,54): 9151314442816847872, 9079256848778919936, 8935141660703064064, + (2,57): 8646911284551352320, 8070450532247928832, 6917529027641081856, + (2,60): 4611686018427387904, 0, 0, 0, + (3,0): 9223372036854775800, 9223372036854775792, 9223372036854775776, + (3,3): 9223372036854775744, 9223372036854775680, 9223372036854775552, + (3,6): 9223372036854775296, 9223372036854774784, 9223372036854773760, + (3,9): 9223372036854771712, 9223372036854767616, 9223372036854759424, + (3,12): 9223372036854743040, 9223372036854710272, 9223372036854644736, + (3,15): 9223372036854513664, 9223372036854251520, 9223372036853727232, + (3,18): 9223372036852678656, 9223372036850581504, 9223372036846387200, + (3,21): 9223372036837998592, 9223372036821221376, 9223372036787666944, + (3,24): 9223372036720558080, 9223372036586340352, 9223372036317904896, + (3,27): 9223372035781033984, 9223372034707292160, 9223372032559808512, + (3,30): 9223372028264841216, 9223372019674906624, 9223372002495037440, + (3,33): 9223371968135299072, 9223371899415822336, 9223371761976868864, + (3,36): 9223371487098961920, 9223370937343148032, 9223369837831520256, + (3,39): 9223367638808264704, 9223363240761753600, 9223354444668731392, + (3,42): 9223336852482686976, 9223301668110598144, 9223231299366420480, + (3,45): 9223090561878065152, 9222809086901354496, 9222246136947933184, + (3,48): 9221120237041090560, 9218868437227405312, 9214364837600034816, + (3,51): 9205357638345293824, 9187343239835811840, 9151314442816847872, + (3,54): 9079256848778919936, 8935141660703064064, 8646911284551352320, + (3,57): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, + (3,61): 0, 0, 0, + (4,0): 9223372036854775792, 9223372036854775776, 9223372036854775744, + (4,3): 9223372036854775680, 9223372036854775552, 9223372036854775296, + (4,6): 9223372036854774784, 9223372036854773760, 9223372036854771712, + (4,9): 9223372036854767616, 9223372036854759424, 9223372036854743040, + (4,12): 9223372036854710272, 9223372036854644736, 9223372036854513664, + (4,15): 9223372036854251520, 9223372036853727232, 9223372036852678656, + (4,18): 9223372036850581504, 9223372036846387200, 9223372036837998592, + (4,21): 9223372036821221376, 9223372036787666944, 9223372036720558080, + (4,24): 9223372036586340352, 9223372036317904896, 9223372035781033984, + (4,27): 9223372034707292160, 9223372032559808512, 9223372028264841216, + (4,30): 9223372019674906624, 9223372002495037440, 9223371968135299072, + (4,33): 9223371899415822336, 9223371761976868864, 9223371487098961920, + (4,36): 9223370937343148032, 9223369837831520256, 9223367638808264704, + (4,39): 9223363240761753600, 9223354444668731392, 9223336852482686976, + (4,42): 9223301668110598144, 9223231299366420480, 9223090561878065152, + (4,45): 9222809086901354496, 9222246136947933184, 9221120237041090560, + (4,48): 9218868437227405312, 9214364837600034816, 9205357638345293824, + (4,51): 9187343239835811840, 9151314442816847872, 9079256848778919936, + (4,54): 8935141660703064064, 8646911284551352320, 8070450532247928832, + (4,57): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0, + (5,0): 9223372036854775776, 9223372036854775744, 9223372036854775680, + (5,3): 9223372036854775552, 9223372036854775296, 9223372036854774784, + (5,6): 9223372036854773760, 9223372036854771712, 9223372036854767616, + (5,9): 9223372036854759424, 9223372036854743040, 9223372036854710272, + (5,12): 9223372036854644736, 9223372036854513664, 9223372036854251520, + (5,15): 9223372036853727232, 9223372036852678656, 9223372036850581504, + (5,18): 9223372036846387200, 9223372036837998592, 9223372036821221376, + (5,21): 9223372036787666944, 9223372036720558080, 9223372036586340352, + (5,24): 9223372036317904896, 9223372035781033984, 9223372034707292160, + (5,27): 9223372032559808512, 9223372028264841216, 9223372019674906624, + (5,30): 9223372002495037440, 9223371968135299072, 9223371899415822336, + (5,33): 9223371761976868864, 9223371487098961920, 9223370937343148032, + (5,36): 9223369837831520256, 9223367638808264704, 9223363240761753600, + (5,39): 9223354444668731392, 9223336852482686976, 9223301668110598144, + (5,42): 9223231299366420480, 9223090561878065152, 9222809086901354496, + (5,45): 9222246136947933184, 9221120237041090560, 9218868437227405312, + (5,48): 9214364837600034816, 9205357638345293824, 9187343239835811840, + (5,51): 9151314442816847872, 9079256848778919936, 8935141660703064064, + (5,54): 8646911284551352320, 8070450532247928832, 6917529027641081856, + (5,57): 4611686018427387904, 0, 0, 0, 0, 0, 0, + (6,0): 9223372036854775744, 9223372036854775680, 9223372036854775552, + (6,3): 9223372036854775296, 9223372036854774784, 9223372036854773760, + (6,6): 9223372036854771712, 9223372036854767616, 9223372036854759424, + (6,9): 9223372036854743040, 9223372036854710272, 9223372036854644736, + (6,12): 9223372036854513664, 9223372036854251520, 9223372036853727232, + (6,15): 9223372036852678656, 9223372036850581504, 9223372036846387200, + (6,18): 9223372036837998592, 9223372036821221376, 9223372036787666944, + (6,21): 9223372036720558080, 9223372036586340352, 9223372036317904896, + (6,24): 9223372035781033984, 9223372034707292160, 9223372032559808512, + (6,27): 9223372028264841216, 9223372019674906624, 9223372002495037440, + (6,30): 9223371968135299072, 9223371899415822336, 9223371761976868864, + (6,33): 9223371487098961920, 9223370937343148032, 9223369837831520256, + (6,36): 9223367638808264704, 9223363240761753600, 9223354444668731392, + (6,39): 9223336852482686976, 9223301668110598144, 9223231299366420480, + (6,42): 9223090561878065152, 9222809086901354496, 9222246136947933184, + (6,45): 9221120237041090560, 9218868437227405312, 9214364837600034816, + (6,48): 9205357638345293824, 9187343239835811840, 9151314442816847872, + (6,51): 9079256848778919936, 8935141660703064064, 8646911284551352320, + (6,54): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, + (6,58): 0, 0, 0, 0, 0, 0, + (7,0): 9223372036854775680, 9223372036854775552, 9223372036854775296, + (7,3): 9223372036854774784, 9223372036854773760, 9223372036854771712, + (7,6): 9223372036854767616, 9223372036854759424, 9223372036854743040, + (7,9): 9223372036854710272, 9223372036854644736, 9223372036854513664, + (7,12): 9223372036854251520, 9223372036853727232, 9223372036852678656, + (7,15): 9223372036850581504, 9223372036846387200, 9223372036837998592, + (7,18): 9223372036821221376, 9223372036787666944, 9223372036720558080, + (7,21): 9223372036586340352, 9223372036317904896, 9223372035781033984, + (7,24): 9223372034707292160, 9223372032559808512, 9223372028264841216, + (7,27): 9223372019674906624, 9223372002495037440, 9223371968135299072, + (7,30): 9223371899415822336, 9223371761976868864, 9223371487098961920, + (7,33): 9223370937343148032, 9223369837831520256, 9223367638808264704, + (7,36): 9223363240761753600, 9223354444668731392, 9223336852482686976, + (7,39): 9223301668110598144, 9223231299366420480, 9223090561878065152, + (7,42): 9222809086901354496, 9222246136947933184, 9221120237041090560, + (7,45): 9218868437227405312, 9214364837600034816, 9205357638345293824, + (7,48): 9187343239835811840, 9151314442816847872, 9079256848778919936, + (7,51): 8935141660703064064, 8646911284551352320, 8070450532247928832, + (7,54): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedLongWhole.ddl b/tools/testfiles/pbits/tpbitsSignedLongWhole.ddl new file mode 100644 index 0000000..e583f1d --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedLongWhole.ddl @@ -0,0 +1,46 @@ +HDF5 "packedbits.h5" { +DATASET "/DS32BITS" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + PACKED_BITS OFFSET=0 LENGTH=32 + DATA { + (0,0): -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, + (0,12): -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, + (0,20): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, + (0,26): -67108864, -134217728, -268435456, -536870912, -1073741824, + (0,31): -2147483648, + (1,0): -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, + (1,12): -8192, -16384, -32768, -65536, -131072, -262144, -524288, + (1,19): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, + (1,25): -67108864, -134217728, -268435456, -536870912, -1073741824, + (1,30): -2147483648, 0, + (2,0): -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, + (2,11): -8192, -16384, -32768, -65536, -131072, -262144, -524288, + (2,18): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, + (2,24): -67108864, -134217728, -268435456, -536870912, -1073741824, + (2,29): -2147483648, 0, 0, + (3,0): -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, + (3,11): -16384, -32768, -65536, -131072, -262144, -524288, -1048576, + (3,18): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, + (3,24): -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, + (3,30): 0, 0, + (4,0): -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, + (4,10): -16384, -32768, -65536, -131072, -262144, -524288, -1048576, + (4,17): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, + (4,23): -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, + (4,29): 0, 0, 0, + (5,0): -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, + (5,10): -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, + (5,17): -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, + (5,23): -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, + (6,0): -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, + (6,10): -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, + (6,17): -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, + (6,23): -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, 0, + (7,0): -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, + (7,9): -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, + (7,16): -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, + (7,22): -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsSignedWhole.ddl b/tools/testfiles/pbits/tpbitsSignedWhole.ddl new file mode 100644 index 0000000..f044e23 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsSignedWhole.ddl @@ -0,0 +1,17 @@ +HDF5 "packedbits.h5" { +DATASET "/DS08BITS" { + DATATYPE H5T_STD_I8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + PACKED_BITS OFFSET=0 LENGTH=8 + DATA { + (0,0): -1, -2, -4, -8, -16, -32, -64, -128, + (1,0): -2, -4, -8, -16, -32, -64, -128, 0, + (2,0): -4, -8, -16, -32, -64, -128, 0, 0, + (3,0): -8, -16, -32, -64, -128, 0, 0, 0, + (4,0): -16, -32, -64, -128, 0, 0, 0, 0, + (5,0): -32, -64, -128, 0, 0, 0, 0, 0, + (6,0): -64, -128, 0, 0, 0, 0, 0, 0, + (7,0): -128, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsigned.ddl b/tools/testfiles/pbits/tpbitsUnsigned.ddl new file mode 100644 index 0000000..9e7ac50 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsigned.ddl @@ -0,0 +1,28 @@ +HDF5 "packedbits.h5" { +DATASET "/DU08BITS" { + DATATYPE H5T_STD_U8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + PACKED_BITS OFFSET=0 LENGTH=2 + DATA { + (0,0): 3, 2, 0, 0, 0, 0, 0, 0, + (1,0): 2, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=2 LENGTH=6 + DATA { + (0,0): 63, 63, 63, 62, 60, 56, 48, 32, + (1,0): 63, 63, 62, 60, 56, 48, 32, 0, + (2,0): 63, 62, 60, 56, 48, 32, 0, 0, + (3,0): 62, 60, 56, 48, 32, 0, 0, 0, + (4,0): 60, 56, 48, 32, 0, 0, 0, 0, + (5,0): 56, 48, 32, 0, 0, 0, 0, 0, + (6,0): 48, 32, 0, 0, 0, 0, 0, 0, + (7,0): 32, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsigned2.ddl b/tools/testfiles/pbits/tpbitsUnsigned2.ddl new file mode 100644 index 0000000..b7e6f79 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsigned2.ddl @@ -0,0 +1,50 @@ +HDF5 "packedbits.h5" { +DATASET "/DU08BITS" { + DATATYPE H5T_STD_U8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + PACKED_BITS OFFSET=0 LENGTH=2 + DATA { + (0,0): 3, 2, 0, 0, 0, 0, 0, 0, + (1,0): 2, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=2 LENGTH=2 + DATA { + (0,0): 3, 3, 3, 2, 0, 0, 0, 0, + (1,0): 3, 3, 2, 0, 0, 0, 0, 0, + (2,0): 3, 2, 0, 0, 0, 0, 0, 0, + (3,0): 2, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=4 LENGTH=2 + DATA { + (0,0): 3, 3, 3, 3, 3, 2, 0, 0, + (1,0): 3, 3, 3, 3, 2, 0, 0, 0, + (2,0): 3, 3, 3, 2, 0, 0, 0, 0, + (3,0): 3, 3, 2, 0, 0, 0, 0, 0, + (4,0): 3, 2, 0, 0, 0, 0, 0, 0, + (5,0): 2, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=6 LENGTH=2 + DATA { + (0,0): 3, 3, 3, 3, 3, 3, 3, 2, + (1,0): 3, 3, 3, 3, 3, 3, 2, 0, + (2,0): 3, 3, 3, 3, 3, 2, 0, 0, + (3,0): 3, 3, 3, 3, 2, 0, 0, 0, + (4,0): 3, 3, 3, 2, 0, 0, 0, 0, + (5,0): 3, 3, 2, 0, 0, 0, 0, 0, + (6,0): 3, 2, 0, 0, 0, 0, 0, 0, + (7,0): 2, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsigned4.ddl b/tools/testfiles/pbits/tpbitsUnsigned4.ddl new file mode 100644 index 0000000..d25d838 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsigned4.ddl @@ -0,0 +1,28 @@ +HDF5 "packedbits.h5" { +DATASET "/DU08BITS" { + DATATYPE H5T_STD_U8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + PACKED_BITS OFFSET=0 LENGTH=4 + DATA { + (0,0): 15, 14, 12, 8, 0, 0, 0, 0, + (1,0): 14, 12, 8, 0, 0, 0, 0, 0, + (2,0): 12, 8, 0, 0, 0, 0, 0, 0, + (3,0): 8, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=4 LENGTH=4 + DATA { + (0,0): 15, 15, 15, 15, 15, 14, 12, 8, + (1,0): 15, 15, 15, 15, 14, 12, 8, 0, + (2,0): 15, 15, 15, 14, 12, 8, 0, 0, + (3,0): 15, 15, 14, 12, 8, 0, 0, 0, + (4,0): 15, 14, 12, 8, 0, 0, 0, 0, + (5,0): 14, 12, 8, 0, 0, 0, 0, 0, + (6,0): 12, 8, 0, 0, 0, 0, 0, 0, + (7,0): 8, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedInt.ddl b/tools/testfiles/pbits/tpbitsUnsignedInt.ddl new file mode 100644 index 0000000..5e0fefe --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedInt.ddl @@ -0,0 +1,28 @@ +HDF5 "packedbits.h5" { +DATASET "/DU16BITS" { + DATATYPE H5T_STD_U16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + PACKED_BITS OFFSET=0 LENGTH=2 + DATA { + (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=10 LENGTH=6 + DATA { + (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, + (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, + (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, + (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, + (4,0): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, + (5,0): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, + (6,0): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, + (7,0): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedInt4.ddl b/tools/testfiles/pbits/tpbitsUnsignedInt4.ddl new file mode 100644 index 0000000..0d3e38f --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedInt4.ddl @@ -0,0 +1,50 @@ +HDF5 "packedbits.h5" { +DATASET "/DU16BITS" { + DATATYPE H5T_STD_U16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + PACKED_BITS OFFSET=0 LENGTH=4 + DATA { + (0,0): 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=4 LENGTH=4 + DATA { + (0,0): 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=8 LENGTH=4 + DATA { + (0,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, + (1,0): 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, + (2,0): 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, + (3,0): 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, + (4,0): 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=12 LENGTH=4 + DATA { + (0,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, + (1,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, + (2,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, + (3,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, + (4,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, + (5,0): 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, + (6,0): 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, + (7,0): 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedInt8.ddl b/tools/testfiles/pbits/tpbitsUnsignedInt8.ddl new file mode 100644 index 0000000..861ed3e --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedInt8.ddl @@ -0,0 +1,34 @@ +HDF5 "packedbits.h5" { +DATASET "/DU16BITS" { + DATATYPE H5T_STD_U16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + PACKED_BITS OFFSET=0 LENGTH=8 + DATA { + (0,0): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=8 LENGTH=8 + DATA { + (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, + (0,13): 224, 192, 128, + (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, + (1,13): 192, 128, 0, + (2,0): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, + (2,13): 128, 0, 0, + (3,0): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, + (3,14): 0, 0, + (4,0): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, + (4,14): 0, 0, + (5,0): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, + (5,15): 0, + (6,0): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, + (7,0): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedIntWhole.ddl b/tools/testfiles/pbits/tpbitsUnsignedIntWhole.ddl new file mode 100644 index 0000000..c054011 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedIntWhole.ddl @@ -0,0 +1,25 @@ +HDF5 "packedbits.h5" { +DATASET "/DU16BITS" { + DATATYPE H5T_STD_U16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + PACKED_BITS OFFSET=0 LENGTH=16 + DATA { + (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, + (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, + (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, + (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, + (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, + (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, + (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, + (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, + (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, + (4,9): 57344, 49152, 32768, 0, 0, 0, 0, + (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, + (5,9): 49152, 32768, 0, 0, 0, 0, 0, + (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, + (6,9): 32768, 0, 0, 0, 0, 0, 0, + (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + (7,10): 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedLong.ddl b/tools/testfiles/pbits/tpbitsUnsignedLong.ddl new file mode 100644 index 0000000..9f8bcb4 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedLong.ddl @@ -0,0 +1,44 @@ +HDF5 "packedbits.h5" { +DATASET "/DU32BITS" { + DATATYPE H5T_STD_U32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + PACKED_BITS OFFSET=0 LENGTH=2 + DATA { + (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=26 LENGTH=6 + DATA { + (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (0,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, + (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (1,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, + (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (2,17): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, + (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (3,17): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, + (4,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (4,17): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, + (5,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (5,17): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, + (6,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (6,17): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, + (7,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (7,17): 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedLong16.ddl b/tools/testfiles/pbits/tpbitsUnsignedLong16.ddl new file mode 100644 index 0000000..7a1984f --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedLong16.ddl @@ -0,0 +1,67 @@ +HDF5 "packedbits.h5" { +DATASET "/DU32BITS" { + DATATYPE H5T_STD_U32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + PACKED_BITS OFFSET=0 LENGTH=16 + DATA { + (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, + (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, + (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, + (1,23): 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, + (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,25): 0, 0, 0, 0, 0, 0, 0, + (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, + (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,26): 0, 0, 0, 0, 0, 0, + (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, + (4,9): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,27): 0, 0, 0, 0, 0, + (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, + (5,9): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,29): 0, 0, 0, + (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, + (6,9): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,30): 0, 0, + (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + (7,10): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=16 LENGTH=16 + DATA { + (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, + (0,18): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, + (0,27): 63488, 61440, 57344, 49152, 32768, + (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, + (1,18): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, + (1,27): 61440, 57344, 49152, 32768, 0, + (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, + (2,18): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, + (2,27): 57344, 49152, 32768, 0, 0, + (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,9): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, + (3,18): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, + (3,27): 49152, 32768, 0, 0, 0, + (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,9): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, + (4,18): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, + (4,27): 32768, 0, 0, 0, 0, + (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,9): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, + (5,18): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + (5,28): 0, 0, 0, 0, + (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,9): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, + (6,18): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, + (6,29): 0, 0, 0, + (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,9): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, + (7,18): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + (7,31): 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedLong8.ddl b/tools/testfiles/pbits/tpbitsUnsignedLong8.ddl new file mode 100644 index 0000000..17b896c --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedLong8.ddl @@ -0,0 +1,96 @@ +HDF5 "packedbits.h5" { +DATASET "/DU32BITS" { + DATATYPE H5T_STD_U32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + PACKED_BITS OFFSET=0 LENGTH=8 + DATA { + (0,0): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,17): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,18): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,18): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,19): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,20): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,20): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=8 LENGTH=8 + DATA { + (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, + (0,13): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, + (1,13): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, + (2,13): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, + (3,14): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, + (4,14): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, + (5,15): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, + (6,16): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, + (7,16): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=16 LENGTH=8 + DATA { + (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (0,13): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, + (0,28): 0, 0, 0, 0, + (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (1,13): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, + (1,28): 0, 0, 0, 0, + (2,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (2,13): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, + (2,29): 0, 0, 0, + (3,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (3,13): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,30): 0, 0, + (4,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (4,13): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,30): 0, 0, + (5,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, + (5,13): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,31): 0, + (6,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, + (6,13): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, + (7,13): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=24 LENGTH=8 + DATA { + (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (0,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, + (0,26): 252, 248, 240, 224, 192, 128, + (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (1,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, + (1,26): 248, 240, 224, 192, 128, 0, + (2,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (2,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, + (2,26): 240, 224, 192, 128, 0, 0, + (3,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (3,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, + (3,26): 224, 192, 128, 0, 0, 0, + (4,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (4,13): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, + (4,26): 192, 128, 0, 0, 0, 0, + (5,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (5,13): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, + (5,26): 128, 0, 0, 0, 0, 0, + (6,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (6,13): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, + (6,26): 0, 0, 0, 0, 0, 0, + (7,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + (7,13): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, + (7,27): 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedLongLong.ddl b/tools/testfiles/pbits/tpbitsUnsignedLongLong.ddl new file mode 100644 index 0000000..1cd9a6c --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedLongLong.ddl @@ -0,0 +1,68 @@ +HDF5 "packedbits.h5" { +DATASET "/DU64BITS" { + DATATYPE H5T_STD_U64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + PACKED_BITS OFFSET=0 LENGTH=2 + DATA { + (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=58 LENGTH=6 + DATA { + (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (0,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (0,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (0,49): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, + (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (1,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (1,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (1,49): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, + (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (2,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (2,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (2,49): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, + (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (3,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (3,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (3,49): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, + (4,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (4,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (4,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (4,49): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, + (5,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (5,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (5,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (5,49): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, + (6,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (6,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (6,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (6,49): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, + (7,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (7,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (7,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + (7,49): 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedLongLong16.ddl b/tools/testfiles/pbits/tpbitsUnsignedLongLong16.ddl new file mode 100644 index 0000000..f8b0189 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedLongLong16.ddl @@ -0,0 +1,196 @@ +HDF5 "packedbits.h5" { +DATASET "/DU64BITS" { + DATATYPE H5T_STD_U64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + PACKED_BITS OFFSET=0 LENGTH=16 + DATA { + (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, + (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, + (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, + (1,23): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,45): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, + (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,25): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,47): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, + (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,26): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,48): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, + (4,9): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,27): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, + (5,9): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,29): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, + (6,9): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,30): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,52): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + (7,10): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,32): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,54): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=16 LENGTH=16 + DATA { + (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, + (0,18): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, + (0,27): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, + (1,18): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, + (1,27): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, + (2,18): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, + (2,27): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,45): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,9): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, + (3,18): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, + (3,27): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,9): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, + (4,18): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, + (4,27): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,48): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,9): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, + (5,18): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + (5,28): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,50): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,9): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, + (6,18): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, + (6,29): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,9): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, + (7,18): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + (7,31): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,53): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=32 LENGTH=16 + DATA { + (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,27): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, + (0,36): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, + (0,45): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,63): 0, + (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,27): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, + (1,36): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, + (1,45): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,27): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, + (2,36): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, + (2,45): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,27): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, + (3,36): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + (3,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,27): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, + (4,36): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, + (4,47): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,27): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, + (5,36): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + (5,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,27): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, + (6,36): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, + (6,50): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, + (7,27): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, + (7,36): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=48 LENGTH=16 + DATA { + (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (0,45): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, + (0,54): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, + (0,63): 32768, + (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (1,45): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, + (1,54): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, + (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (2,45): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, + (2,54): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, + (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (3,45): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, + (3,54): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, + (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (4,45): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, + (4,54): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, + (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (5,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, + (5,45): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, + (5,54): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, + (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (6,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, + (6,45): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, + (6,54): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, + (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, + (7,36): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, + (7,45): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, + (7,54): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedLongLong32.ddl b/tools/testfiles/pbits/tpbitsUnsignedLongLong32.ddl new file mode 100644 index 0000000..befaf5b --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedLongLong32.ddl @@ -0,0 +1,175 @@ +HDF5 "packedbits.h5" { +DATASET "/DU64BITS" { + DATATYPE H5T_STD_U64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + PACKED_BITS OFFSET=0 LENGTH=32 + DATA { + (0,0): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, + (0,5): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, + (0,10): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, + (0,15): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, + (0,20): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, + (0,25): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, + (0,30): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, + (1,5): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, + (1,10): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, + (1,15): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, + (1,20): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, + (1,25): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, + (1,30): 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, + (2,5): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, + (2,10): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, + (2,15): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, + (2,20): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, + (2,25): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, + (2,32): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,54): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, + (3,5): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, + (3,10): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, + (3,15): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, + (3,20): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, + (3,25): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, + (3,35): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,57): 0, 0, 0, 0, 0, 0, 0, + (4,0): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, + (4,5): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, + (4,10): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, + (4,15): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, + (4,20): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, + (4,25): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,38): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,60): 0, 0, 0, 0, + (5,0): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, + (5,5): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, + (5,10): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, + (5,15): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, + (5,20): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, + (5,25): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,41): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,63): 0, + (6,0): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, + (6,5): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, + (6,10): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, + (6,15): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, + (6,20): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, + (6,25): 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, + (7,5): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, + (7,10): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, + (7,15): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, + (7,20): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, + (7,27): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + PACKED_BITS OFFSET=32 LENGTH=32 + DATA { + (0,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (0,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (0,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (0,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (0,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (0,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (0,30): 4294967295, 4294967295, 4294967295, 4294967294, 4294967292, + (0,35): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, + (0,40): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, + (0,45): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, + (0,50): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, + (0,55): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, + (0,60): 4026531840, 3758096384, 3221225472, 2147483648, + (1,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (1,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (1,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (1,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (1,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (1,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (1,30): 4294967295, 4294967295, 4294967294, 4294967292, 4294967288, + (1,35): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, + (1,40): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, + (1,45): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, + (1,50): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, + (1,55): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, + (1,60): 3758096384, 3221225472, 2147483648, 0, + (2,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (2,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (2,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (2,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (2,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (2,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (2,30): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, + (2,35): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, + (2,40): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, + (2,45): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, + (2,50): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, + (2,55): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, + (2,60): 3221225472, 2147483648, 0, 0, + (3,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (3,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (3,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (3,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (3,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (3,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (3,30): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, + (3,35): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, + (3,40): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, + (3,45): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, + (3,50): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, + (3,55): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, + (3,60): 2147483648, 0, 0, 0, + (4,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (4,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (4,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (4,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (4,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (4,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967294, + (4,30): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, + (4,35): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, + (4,40): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, + (4,45): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, + (4,50): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, + (4,55): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, + (4,62): 0, 0, + (5,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (5,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (5,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (5,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (5,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (5,25): 4294967295, 4294967295, 4294967295, 4294967294, 4294967292, + (5,30): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, + (5,35): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, + (5,40): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, + (5,45): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, + (5,50): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, + (5,55): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, + (6,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (6,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (6,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (6,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (6,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (6,25): 4294967295, 4294967295, 4294967294, 4294967292, 4294967288, + (6,30): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, + (6,35): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, + (6,40): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, + (6,45): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, + (6,50): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, + (6,55): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, + (7,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (7,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (7,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (7,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (7,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, + (7,25): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, + (7,30): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, + (7,35): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, + (7,40): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, + (7,45): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, + (7,50): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, + (7,55): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole.ddl b/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole.ddl new file mode 100644 index 0000000..27c8879 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole.ddl @@ -0,0 +1,176 @@ +HDF5 "packedbits.h5" { +DATASET "/DU64BITS" { + DATATYPE H5T_STD_U64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + PACKED_BITS OFFSET=0 LENGTH=64 + DATA { + (0,0): 18446744073709551615, 18446744073709551614, 18446744073709551612, + (0,3): 18446744073709551608, 18446744073709551600, 18446744073709551584, + (0,6): 18446744073709551552, 18446744073709551488, 18446744073709551360, + (0,9): 18446744073709551104, 18446744073709550592, 18446744073709549568, + (0,12): 18446744073709547520, 18446744073709543424, 18446744073709535232, + (0,15): 18446744073709518848, 18446744073709486080, 18446744073709420544, + (0,18): 18446744073709289472, 18446744073709027328, 18446744073708503040, + (0,21): 18446744073707454464, 18446744073705357312, 18446744073701163008, + (0,24): 18446744073692774400, 18446744073675997184, 18446744073642442752, + (0,27): 18446744073575333888, 18446744073441116160, 18446744073172680704, + (0,30): 18446744072635809792, 18446744071562067968, 18446744069414584320, + (0,33): 18446744065119617024, 18446744056529682432, 18446744039349813248, + (0,36): 18446744004990074880, 18446743936270598144, 18446743798831644672, + (0,39): 18446743523953737728, 18446742974197923840, 18446741874686296064, + (0,42): 18446739675663040512, 18446735277616529408, 18446726481523507200, + (0,45): 18446708889337462784, 18446673704965373952, 18446603336221196288, + (0,48): 18446462598732840960, 18446181123756130304, 18445618173802708992, + (0,51): 18444492273895866368, 18442240474082181120, 18437736874454810624, + (0,54): 18428729675200069632, 18410715276690587648, 18374686479671623680, + (0,57): 18302628885633695744, 18158513697557839872, 17870283321406128128, + (0,60): 17293822569102704640, 16140901064495857664, 13835058055282163712, + (0,63): 9223372036854775808, + (1,0): 18446744073709551614, 18446744073709551612, 18446744073709551608, + (1,3): 18446744073709551600, 18446744073709551584, 18446744073709551552, + (1,6): 18446744073709551488, 18446744073709551360, 18446744073709551104, + (1,9): 18446744073709550592, 18446744073709549568, 18446744073709547520, + (1,12): 18446744073709543424, 18446744073709535232, 18446744073709518848, + (1,15): 18446744073709486080, 18446744073709420544, 18446744073709289472, + (1,18): 18446744073709027328, 18446744073708503040, 18446744073707454464, + (1,21): 18446744073705357312, 18446744073701163008, 18446744073692774400, + (1,24): 18446744073675997184, 18446744073642442752, 18446744073575333888, + (1,27): 18446744073441116160, 18446744073172680704, 18446744072635809792, + (1,30): 18446744071562067968, 18446744069414584320, 18446744065119617024, + (1,33): 18446744056529682432, 18446744039349813248, 18446744004990074880, + (1,36): 18446743936270598144, 18446743798831644672, 18446743523953737728, + (1,39): 18446742974197923840, 18446741874686296064, 18446739675663040512, + (1,42): 18446735277616529408, 18446726481523507200, 18446708889337462784, + (1,45): 18446673704965373952, 18446603336221196288, 18446462598732840960, + (1,48): 18446181123756130304, 18445618173802708992, 18444492273895866368, + (1,51): 18442240474082181120, 18437736874454810624, 18428729675200069632, + (1,54): 18410715276690587648, 18374686479671623680, 18302628885633695744, + (1,57): 18158513697557839872, 17870283321406128128, 17293822569102704640, + (1,60): 16140901064495857664, 13835058055282163712, 9223372036854775808, + (1,63): 0, + (2,0): 18446744073709551612, 18446744073709551608, 18446744073709551600, + (2,3): 18446744073709551584, 18446744073709551552, 18446744073709551488, + (2,6): 18446744073709551360, 18446744073709551104, 18446744073709550592, + (2,9): 18446744073709549568, 18446744073709547520, 18446744073709543424, + (2,12): 18446744073709535232, 18446744073709518848, 18446744073709486080, + (2,15): 18446744073709420544, 18446744073709289472, 18446744073709027328, + (2,18): 18446744073708503040, 18446744073707454464, 18446744073705357312, + (2,21): 18446744073701163008, 18446744073692774400, 18446744073675997184, + (2,24): 18446744073642442752, 18446744073575333888, 18446744073441116160, + (2,27): 18446744073172680704, 18446744072635809792, 18446744071562067968, + (2,30): 18446744069414584320, 18446744065119617024, 18446744056529682432, + (2,33): 18446744039349813248, 18446744004990074880, 18446743936270598144, + (2,36): 18446743798831644672, 18446743523953737728, 18446742974197923840, + (2,39): 18446741874686296064, 18446739675663040512, 18446735277616529408, + (2,42): 18446726481523507200, 18446708889337462784, 18446673704965373952, + (2,45): 18446603336221196288, 18446462598732840960, 18446181123756130304, + (2,48): 18445618173802708992, 18444492273895866368, 18442240474082181120, + (2,51): 18437736874454810624, 18428729675200069632, 18410715276690587648, + (2,54): 18374686479671623680, 18302628885633695744, 18158513697557839872, + (2,57): 17870283321406128128, 17293822569102704640, 16140901064495857664, + (2,60): 13835058055282163712, 9223372036854775808, 0, 0, + (3,0): 18446744073709551608, 18446744073709551600, 18446744073709551584, + (3,3): 18446744073709551552, 18446744073709551488, 18446744073709551360, + (3,6): 18446744073709551104, 18446744073709550592, 18446744073709549568, + (3,9): 18446744073709547520, 18446744073709543424, 18446744073709535232, + (3,12): 18446744073709518848, 18446744073709486080, 18446744073709420544, + (3,15): 18446744073709289472, 18446744073709027328, 18446744073708503040, + (3,18): 18446744073707454464, 18446744073705357312, 18446744073701163008, + (3,21): 18446744073692774400, 18446744073675997184, 18446744073642442752, + (3,24): 18446744073575333888, 18446744073441116160, 18446744073172680704, + (3,27): 18446744072635809792, 18446744071562067968, 18446744069414584320, + (3,30): 18446744065119617024, 18446744056529682432, 18446744039349813248, + (3,33): 18446744004990074880, 18446743936270598144, 18446743798831644672, + (3,36): 18446743523953737728, 18446742974197923840, 18446741874686296064, + (3,39): 18446739675663040512, 18446735277616529408, 18446726481523507200, + (3,42): 18446708889337462784, 18446673704965373952, 18446603336221196288, + (3,45): 18446462598732840960, 18446181123756130304, 18445618173802708992, + (3,48): 18444492273895866368, 18442240474082181120, 18437736874454810624, + (3,51): 18428729675200069632, 18410715276690587648, 18374686479671623680, + (3,54): 18302628885633695744, 18158513697557839872, 17870283321406128128, + (3,57): 17293822569102704640, 16140901064495857664, 13835058055282163712, + (3,60): 9223372036854775808, 0, 0, 0, + (4,0): 18446744073709551600, 18446744073709551584, 18446744073709551552, + (4,3): 18446744073709551488, 18446744073709551360, 18446744073709551104, + (4,6): 18446744073709550592, 18446744073709549568, 18446744073709547520, + (4,9): 18446744073709543424, 18446744073709535232, 18446744073709518848, + (4,12): 18446744073709486080, 18446744073709420544, 18446744073709289472, + (4,15): 18446744073709027328, 18446744073708503040, 18446744073707454464, + (4,18): 18446744073705357312, 18446744073701163008, 18446744073692774400, + (4,21): 18446744073675997184, 18446744073642442752, 18446744073575333888, + (4,24): 18446744073441116160, 18446744073172680704, 18446744072635809792, + (4,27): 18446744071562067968, 18446744069414584320, 18446744065119617024, + (4,30): 18446744056529682432, 18446744039349813248, 18446744004990074880, + (4,33): 18446743936270598144, 18446743798831644672, 18446743523953737728, + (4,36): 18446742974197923840, 18446741874686296064, 18446739675663040512, + (4,39): 18446735277616529408, 18446726481523507200, 18446708889337462784, + (4,42): 18446673704965373952, 18446603336221196288, 18446462598732840960, + (4,45): 18446181123756130304, 18445618173802708992, 18444492273895866368, + (4,48): 18442240474082181120, 18437736874454810624, 18428729675200069632, + (4,51): 18410715276690587648, 18374686479671623680, 18302628885633695744, + (4,54): 18158513697557839872, 17870283321406128128, 17293822569102704640, + (4,57): 16140901064495857664, 13835058055282163712, 9223372036854775808, + (4,60): 0, 0, 0, 0, + (5,0): 18446744073709551584, 18446744073709551552, 18446744073709551488, + (5,3): 18446744073709551360, 18446744073709551104, 18446744073709550592, + (5,6): 18446744073709549568, 18446744073709547520, 18446744073709543424, + (5,9): 18446744073709535232, 18446744073709518848, 18446744073709486080, + (5,12): 18446744073709420544, 18446744073709289472, 18446744073709027328, + (5,15): 18446744073708503040, 18446744073707454464, 18446744073705357312, + (5,18): 18446744073701163008, 18446744073692774400, 18446744073675997184, + (5,21): 18446744073642442752, 18446744073575333888, 18446744073441116160, + (5,24): 18446744073172680704, 18446744072635809792, 18446744071562067968, + (5,27): 18446744069414584320, 18446744065119617024, 18446744056529682432, + (5,30): 18446744039349813248, 18446744004990074880, 18446743936270598144, + (5,33): 18446743798831644672, 18446743523953737728, 18446742974197923840, + (5,36): 18446741874686296064, 18446739675663040512, 18446735277616529408, + (5,39): 18446726481523507200, 18446708889337462784, 18446673704965373952, + (5,42): 18446603336221196288, 18446462598732840960, 18446181123756130304, + (5,45): 18445618173802708992, 18444492273895866368, 18442240474082181120, + (5,48): 18437736874454810624, 18428729675200069632, 18410715276690587648, + (5,51): 18374686479671623680, 18302628885633695744, 18158513697557839872, + (5,54): 17870283321406128128, 17293822569102704640, 16140901064495857664, + (5,57): 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, 0, + (6,0): 18446744073709551552, 18446744073709551488, 18446744073709551360, + (6,3): 18446744073709551104, 18446744073709550592, 18446744073709549568, + (6,6): 18446744073709547520, 18446744073709543424, 18446744073709535232, + (6,9): 18446744073709518848, 18446744073709486080, 18446744073709420544, + (6,12): 18446744073709289472, 18446744073709027328, 18446744073708503040, + (6,15): 18446744073707454464, 18446744073705357312, 18446744073701163008, + (6,18): 18446744073692774400, 18446744073675997184, 18446744073642442752, + (6,21): 18446744073575333888, 18446744073441116160, 18446744073172680704, + (6,24): 18446744072635809792, 18446744071562067968, 18446744069414584320, + (6,27): 18446744065119617024, 18446744056529682432, 18446744039349813248, + (6,30): 18446744004990074880, 18446743936270598144, 18446743798831644672, + (6,33): 18446743523953737728, 18446742974197923840, 18446741874686296064, + (6,36): 18446739675663040512, 18446735277616529408, 18446726481523507200, + (6,39): 18446708889337462784, 18446673704965373952, 18446603336221196288, + (6,42): 18446462598732840960, 18446181123756130304, 18445618173802708992, + (6,45): 18444492273895866368, 18442240474082181120, 18437736874454810624, + (6,48): 18428729675200069632, 18410715276690587648, 18374686479671623680, + (6,51): 18302628885633695744, 18158513697557839872, 17870283321406128128, + (6,54): 17293822569102704640, 16140901064495857664, 13835058055282163712, + (6,57): 9223372036854775808, 0, 0, 0, 0, 0, 0, + (7,0): 18446744073709551488, 18446744073709551360, 18446744073709551104, + (7,3): 18446744073709550592, 18446744073709549568, 18446744073709547520, + (7,6): 18446744073709543424, 18446744073709535232, 18446744073709518848, + (7,9): 18446744073709486080, 18446744073709420544, 18446744073709289472, + (7,12): 18446744073709027328, 18446744073708503040, 18446744073707454464, + (7,15): 18446744073705357312, 18446744073701163008, 18446744073692774400, + (7,18): 18446744073675997184, 18446744073642442752, 18446744073575333888, + (7,21): 18446744073441116160, 18446744073172680704, 18446744072635809792, + (7,24): 18446744071562067968, 18446744069414584320, 18446744065119617024, + (7,27): 18446744056529682432, 18446744039349813248, 18446744004990074880, + (7,30): 18446743936270598144, 18446743798831644672, 18446743523953737728, + (7,33): 18446742974197923840, 18446741874686296064, 18446739675663040512, + (7,36): 18446735277616529408, 18446726481523507200, 18446708889337462784, + (7,39): 18446673704965373952, 18446603336221196288, 18446462598732840960, + (7,42): 18446181123756130304, 18445618173802708992, 18444492273895866368, + (7,45): 18442240474082181120, 18437736874454810624, 18428729675200069632, + (7,48): 18410715276690587648, 18374686479671623680, 18302628885633695744, + (7,51): 18158513697557839872, 17870283321406128128, 17293822569102704640, + (7,54): 16140901064495857664, 13835058055282163712, 9223372036854775808, + (7,57): 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole1.ddl b/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole1.ddl new file mode 100644 index 0000000..0302105 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole1.ddl @@ -0,0 +1,175 @@ +HDF5 "packedbits.h5" { +DATASET "/DU64BITS" { + DATATYPE H5T_STD_U64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + PACKED_BITS OFFSET=1 LENGTH=63 + DATA { + (0,0): 9223372036854775807, 9223372036854775807, 9223372036854775806, + (0,3): 9223372036854775804, 9223372036854775800, 9223372036854775792, + (0,6): 9223372036854775776, 9223372036854775744, 9223372036854775680, + (0,9): 9223372036854775552, 9223372036854775296, 9223372036854774784, + (0,12): 9223372036854773760, 9223372036854771712, 9223372036854767616, + (0,15): 9223372036854759424, 9223372036854743040, 9223372036854710272, + (0,18): 9223372036854644736, 9223372036854513664, 9223372036854251520, + (0,21): 9223372036853727232, 9223372036852678656, 9223372036850581504, + (0,24): 9223372036846387200, 9223372036837998592, 9223372036821221376, + (0,27): 9223372036787666944, 9223372036720558080, 9223372036586340352, + (0,30): 9223372036317904896, 9223372035781033984, 9223372034707292160, + (0,33): 9223372032559808512, 9223372028264841216, 9223372019674906624, + (0,36): 9223372002495037440, 9223371968135299072, 9223371899415822336, + (0,39): 9223371761976868864, 9223371487098961920, 9223370937343148032, + (0,42): 9223369837831520256, 9223367638808264704, 9223363240761753600, + (0,45): 9223354444668731392, 9223336852482686976, 9223301668110598144, + (0,48): 9223231299366420480, 9223090561878065152, 9222809086901354496, + (0,51): 9222246136947933184, 9221120237041090560, 9218868437227405312, + (0,54): 9214364837600034816, 9205357638345293824, 9187343239835811840, + (0,57): 9151314442816847872, 9079256848778919936, 8935141660703064064, + (0,60): 8646911284551352320, 8070450532247928832, 6917529027641081856, + (0,63): 4611686018427387904, + (1,0): 9223372036854775807, 9223372036854775806, 9223372036854775804, + (1,3): 9223372036854775800, 9223372036854775792, 9223372036854775776, + (1,6): 9223372036854775744, 9223372036854775680, 9223372036854775552, + (1,9): 9223372036854775296, 9223372036854774784, 9223372036854773760, + (1,12): 9223372036854771712, 9223372036854767616, 9223372036854759424, + (1,15): 9223372036854743040, 9223372036854710272, 9223372036854644736, + (1,18): 9223372036854513664, 9223372036854251520, 9223372036853727232, + (1,21): 9223372036852678656, 9223372036850581504, 9223372036846387200, + (1,24): 9223372036837998592, 9223372036821221376, 9223372036787666944, + (1,27): 9223372036720558080, 9223372036586340352, 9223372036317904896, + (1,30): 9223372035781033984, 9223372034707292160, 9223372032559808512, + (1,33): 9223372028264841216, 9223372019674906624, 9223372002495037440, + (1,36): 9223371968135299072, 9223371899415822336, 9223371761976868864, + (1,39): 9223371487098961920, 9223370937343148032, 9223369837831520256, + (1,42): 9223367638808264704, 9223363240761753600, 9223354444668731392, + (1,45): 9223336852482686976, 9223301668110598144, 9223231299366420480, + (1,48): 9223090561878065152, 9222809086901354496, 9222246136947933184, + (1,51): 9221120237041090560, 9218868437227405312, 9214364837600034816, + (1,54): 9205357638345293824, 9187343239835811840, 9151314442816847872, + (1,57): 9079256848778919936, 8935141660703064064, 8646911284551352320, + (1,60): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, + (2,0): 9223372036854775806, 9223372036854775804, 9223372036854775800, + (2,3): 9223372036854775792, 9223372036854775776, 9223372036854775744, + (2,6): 9223372036854775680, 9223372036854775552, 9223372036854775296, + (2,9): 9223372036854774784, 9223372036854773760, 9223372036854771712, + (2,12): 9223372036854767616, 9223372036854759424, 9223372036854743040, + (2,15): 9223372036854710272, 9223372036854644736, 9223372036854513664, + (2,18): 9223372036854251520, 9223372036853727232, 9223372036852678656, + (2,21): 9223372036850581504, 9223372036846387200, 9223372036837998592, + (2,24): 9223372036821221376, 9223372036787666944, 9223372036720558080, + (2,27): 9223372036586340352, 9223372036317904896, 9223372035781033984, + (2,30): 9223372034707292160, 9223372032559808512, 9223372028264841216, + (2,33): 9223372019674906624, 9223372002495037440, 9223371968135299072, + (2,36): 9223371899415822336, 9223371761976868864, 9223371487098961920, + (2,39): 9223370937343148032, 9223369837831520256, 9223367638808264704, + (2,42): 9223363240761753600, 9223354444668731392, 9223336852482686976, + (2,45): 9223301668110598144, 9223231299366420480, 9223090561878065152, + (2,48): 9222809086901354496, 9222246136947933184, 9221120237041090560, + (2,51): 9218868437227405312, 9214364837600034816, 9205357638345293824, + (2,54): 9187343239835811840, 9151314442816847872, 9079256848778919936, + (2,57): 8935141660703064064, 8646911284551352320, 8070450532247928832, + (2,60): 6917529027641081856, 4611686018427387904, 0, 0, + (3,0): 9223372036854775804, 9223372036854775800, 9223372036854775792, + (3,3): 9223372036854775776, 9223372036854775744, 9223372036854775680, + (3,6): 9223372036854775552, 9223372036854775296, 9223372036854774784, + (3,9): 9223372036854773760, 9223372036854771712, 9223372036854767616, + (3,12): 9223372036854759424, 9223372036854743040, 9223372036854710272, + (3,15): 9223372036854644736, 9223372036854513664, 9223372036854251520, + (3,18): 9223372036853727232, 9223372036852678656, 9223372036850581504, + (3,21): 9223372036846387200, 9223372036837998592, 9223372036821221376, + (3,24): 9223372036787666944, 9223372036720558080, 9223372036586340352, + (3,27): 9223372036317904896, 9223372035781033984, 9223372034707292160, + (3,30): 9223372032559808512, 9223372028264841216, 9223372019674906624, + (3,33): 9223372002495037440, 9223371968135299072, 9223371899415822336, + (3,36): 9223371761976868864, 9223371487098961920, 9223370937343148032, + (3,39): 9223369837831520256, 9223367638808264704, 9223363240761753600, + (3,42): 9223354444668731392, 9223336852482686976, 9223301668110598144, + (3,45): 9223231299366420480, 9223090561878065152, 9222809086901354496, + (3,48): 9222246136947933184, 9221120237041090560, 9218868437227405312, + (3,51): 9214364837600034816, 9205357638345293824, 9187343239835811840, + (3,54): 9151314442816847872, 9079256848778919936, 8935141660703064064, + (3,57): 8646911284551352320, 8070450532247928832, 6917529027641081856, + (3,60): 4611686018427387904, 0, 0, 0, + (4,0): 9223372036854775800, 9223372036854775792, 9223372036854775776, + (4,3): 9223372036854775744, 9223372036854775680, 9223372036854775552, + (4,6): 9223372036854775296, 9223372036854774784, 9223372036854773760, + (4,9): 9223372036854771712, 9223372036854767616, 9223372036854759424, + (4,12): 9223372036854743040, 9223372036854710272, 9223372036854644736, + (4,15): 9223372036854513664, 9223372036854251520, 9223372036853727232, + (4,18): 9223372036852678656, 9223372036850581504, 9223372036846387200, + (4,21): 9223372036837998592, 9223372036821221376, 9223372036787666944, + (4,24): 9223372036720558080, 9223372036586340352, 9223372036317904896, + (4,27): 9223372035781033984, 9223372034707292160, 9223372032559808512, + (4,30): 9223372028264841216, 9223372019674906624, 9223372002495037440, + (4,33): 9223371968135299072, 9223371899415822336, 9223371761976868864, + (4,36): 9223371487098961920, 9223370937343148032, 9223369837831520256, + (4,39): 9223367638808264704, 9223363240761753600, 9223354444668731392, + (4,42): 9223336852482686976, 9223301668110598144, 9223231299366420480, + (4,45): 9223090561878065152, 9222809086901354496, 9222246136947933184, + (4,48): 9221120237041090560, 9218868437227405312, 9214364837600034816, + (4,51): 9205357638345293824, 9187343239835811840, 9151314442816847872, + (4,54): 9079256848778919936, 8935141660703064064, 8646911284551352320, + (4,57): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, + (4,61): 0, 0, 0, + (5,0): 9223372036854775792, 9223372036854775776, 9223372036854775744, + (5,3): 9223372036854775680, 9223372036854775552, 9223372036854775296, + (5,6): 9223372036854774784, 9223372036854773760, 9223372036854771712, + (5,9): 9223372036854767616, 9223372036854759424, 9223372036854743040, + (5,12): 9223372036854710272, 9223372036854644736, 9223372036854513664, + (5,15): 9223372036854251520, 9223372036853727232, 9223372036852678656, + (5,18): 9223372036850581504, 9223372036846387200, 9223372036837998592, + (5,21): 9223372036821221376, 9223372036787666944, 9223372036720558080, + (5,24): 9223372036586340352, 9223372036317904896, 9223372035781033984, + (5,27): 9223372034707292160, 9223372032559808512, 9223372028264841216, + (5,30): 9223372019674906624, 9223372002495037440, 9223371968135299072, + (5,33): 9223371899415822336, 9223371761976868864, 9223371487098961920, + (5,36): 9223370937343148032, 9223369837831520256, 9223367638808264704, + (5,39): 9223363240761753600, 9223354444668731392, 9223336852482686976, + (5,42): 9223301668110598144, 9223231299366420480, 9223090561878065152, + (5,45): 9222809086901354496, 9222246136947933184, 9221120237041090560, + (5,48): 9218868437227405312, 9214364837600034816, 9205357638345293824, + (5,51): 9187343239835811840, 9151314442816847872, 9079256848778919936, + (5,54): 8935141660703064064, 8646911284551352320, 8070450532247928832, + (5,57): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0, + (6,0): 9223372036854775776, 9223372036854775744, 9223372036854775680, + (6,3): 9223372036854775552, 9223372036854775296, 9223372036854774784, + (6,6): 9223372036854773760, 9223372036854771712, 9223372036854767616, + (6,9): 9223372036854759424, 9223372036854743040, 9223372036854710272, + (6,12): 9223372036854644736, 9223372036854513664, 9223372036854251520, + (6,15): 9223372036853727232, 9223372036852678656, 9223372036850581504, + (6,18): 9223372036846387200, 9223372036837998592, 9223372036821221376, + (6,21): 9223372036787666944, 9223372036720558080, 9223372036586340352, + (6,24): 9223372036317904896, 9223372035781033984, 9223372034707292160, + (6,27): 9223372032559808512, 9223372028264841216, 9223372019674906624, + (6,30): 9223372002495037440, 9223371968135299072, 9223371899415822336, + (6,33): 9223371761976868864, 9223371487098961920, 9223370937343148032, + (6,36): 9223369837831520256, 9223367638808264704, 9223363240761753600, + (6,39): 9223354444668731392, 9223336852482686976, 9223301668110598144, + (6,42): 9223231299366420480, 9223090561878065152, 9222809086901354496, + (6,45): 9222246136947933184, 9221120237041090560, 9218868437227405312, + (6,48): 9214364837600034816, 9205357638345293824, 9187343239835811840, + (6,51): 9151314442816847872, 9079256848778919936, 8935141660703064064, + (6,54): 8646911284551352320, 8070450532247928832, 6917529027641081856, + (6,57): 4611686018427387904, 0, 0, 0, 0, 0, 0, + (7,0): 9223372036854775744, 9223372036854775680, 9223372036854775552, + (7,3): 9223372036854775296, 9223372036854774784, 9223372036854773760, + (7,6): 9223372036854771712, 9223372036854767616, 9223372036854759424, + (7,9): 9223372036854743040, 9223372036854710272, 9223372036854644736, + (7,12): 9223372036854513664, 9223372036854251520, 9223372036853727232, + (7,15): 9223372036852678656, 9223372036850581504, 9223372036846387200, + (7,18): 9223372036837998592, 9223372036821221376, 9223372036787666944, + (7,21): 9223372036720558080, 9223372036586340352, 9223372036317904896, + (7,24): 9223372035781033984, 9223372034707292160, 9223372032559808512, + (7,27): 9223372028264841216, 9223372019674906624, 9223372002495037440, + (7,30): 9223371968135299072, 9223371899415822336, 9223371761976868864, + (7,33): 9223371487098961920, 9223370937343148032, 9223369837831520256, + (7,36): 9223367638808264704, 9223363240761753600, 9223354444668731392, + (7,39): 9223336852482686976, 9223301668110598144, 9223231299366420480, + (7,42): 9223090561878065152, 9222809086901354496, 9222246136947933184, + (7,45): 9221120237041090560, 9218868437227405312, 9214364837600034816, + (7,48): 9205357638345293824, 9187343239835811840, 9151314442816847872, + (7,51): 9079256848778919936, 8935141660703064064, 8646911284551352320, + (7,54): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, + (7,58): 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole63.ddl b/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole63.ddl new file mode 100644 index 0000000..6a9b503 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole63.ddl @@ -0,0 +1,172 @@ +HDF5 "packedbits.h5" { +DATASET "/DU64BITS" { + DATATYPE H5T_STD_U64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + PACKED_BITS OFFSET=0 LENGTH=63 + DATA { + (0,0): 9223372036854775807, 9223372036854775806, 9223372036854775804, + (0,3): 9223372036854775800, 9223372036854775792, 9223372036854775776, + (0,6): 9223372036854775744, 9223372036854775680, 9223372036854775552, + (0,9): 9223372036854775296, 9223372036854774784, 9223372036854773760, + (0,12): 9223372036854771712, 9223372036854767616, 9223372036854759424, + (0,15): 9223372036854743040, 9223372036854710272, 9223372036854644736, + (0,18): 9223372036854513664, 9223372036854251520, 9223372036853727232, + (0,21): 9223372036852678656, 9223372036850581504, 9223372036846387200, + (0,24): 9223372036837998592, 9223372036821221376, 9223372036787666944, + (0,27): 9223372036720558080, 9223372036586340352, 9223372036317904896, + (0,30): 9223372035781033984, 9223372034707292160, 9223372032559808512, + (0,33): 9223372028264841216, 9223372019674906624, 9223372002495037440, + (0,36): 9223371968135299072, 9223371899415822336, 9223371761976868864, + (0,39): 9223371487098961920, 9223370937343148032, 9223369837831520256, + (0,42): 9223367638808264704, 9223363240761753600, 9223354444668731392, + (0,45): 9223336852482686976, 9223301668110598144, 9223231299366420480, + (0,48): 9223090561878065152, 9222809086901354496, 9222246136947933184, + (0,51): 9221120237041090560, 9218868437227405312, 9214364837600034816, + (0,54): 9205357638345293824, 9187343239835811840, 9151314442816847872, + (0,57): 9079256848778919936, 8935141660703064064, 8646911284551352320, + (0,60): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, + (1,0): 9223372036854775806, 9223372036854775804, 9223372036854775800, + (1,3): 9223372036854775792, 9223372036854775776, 9223372036854775744, + (1,6): 9223372036854775680, 9223372036854775552, 9223372036854775296, + (1,9): 9223372036854774784, 9223372036854773760, 9223372036854771712, + (1,12): 9223372036854767616, 9223372036854759424, 9223372036854743040, + (1,15): 9223372036854710272, 9223372036854644736, 9223372036854513664, + (1,18): 9223372036854251520, 9223372036853727232, 9223372036852678656, + (1,21): 9223372036850581504, 9223372036846387200, 9223372036837998592, + (1,24): 9223372036821221376, 9223372036787666944, 9223372036720558080, + (1,27): 9223372036586340352, 9223372036317904896, 9223372035781033984, + (1,30): 9223372034707292160, 9223372032559808512, 9223372028264841216, + (1,33): 9223372019674906624, 9223372002495037440, 9223371968135299072, + (1,36): 9223371899415822336, 9223371761976868864, 9223371487098961920, + (1,39): 9223370937343148032, 9223369837831520256, 9223367638808264704, + (1,42): 9223363240761753600, 9223354444668731392, 9223336852482686976, + (1,45): 9223301668110598144, 9223231299366420480, 9223090561878065152, + (1,48): 9222809086901354496, 9222246136947933184, 9221120237041090560, + (1,51): 9218868437227405312, 9214364837600034816, 9205357638345293824, + (1,54): 9187343239835811840, 9151314442816847872, 9079256848778919936, + (1,57): 8935141660703064064, 8646911284551352320, 8070450532247928832, + (1,60): 6917529027641081856, 4611686018427387904, 0, 0, + (2,0): 9223372036854775804, 9223372036854775800, 9223372036854775792, + (2,3): 9223372036854775776, 9223372036854775744, 9223372036854775680, + (2,6): 9223372036854775552, 9223372036854775296, 9223372036854774784, + (2,9): 9223372036854773760, 9223372036854771712, 9223372036854767616, + (2,12): 9223372036854759424, 9223372036854743040, 9223372036854710272, + (2,15): 9223372036854644736, 9223372036854513664, 9223372036854251520, + (2,18): 9223372036853727232, 9223372036852678656, 9223372036850581504, + (2,21): 9223372036846387200, 9223372036837998592, 9223372036821221376, + (2,24): 9223372036787666944, 9223372036720558080, 9223372036586340352, + (2,27): 9223372036317904896, 9223372035781033984, 9223372034707292160, + (2,30): 9223372032559808512, 9223372028264841216, 9223372019674906624, + (2,33): 9223372002495037440, 9223371968135299072, 9223371899415822336, + (2,36): 9223371761976868864, 9223371487098961920, 9223370937343148032, + (2,39): 9223369837831520256, 9223367638808264704, 9223363240761753600, + (2,42): 9223354444668731392, 9223336852482686976, 9223301668110598144, + (2,45): 9223231299366420480, 9223090561878065152, 9222809086901354496, + (2,48): 9222246136947933184, 9221120237041090560, 9218868437227405312, + (2,51): 9214364837600034816, 9205357638345293824, 9187343239835811840, + (2,54): 9151314442816847872, 9079256848778919936, 8935141660703064064, + (2,57): 8646911284551352320, 8070450532247928832, 6917529027641081856, + (2,60): 4611686018427387904, 0, 0, 0, + (3,0): 9223372036854775800, 9223372036854775792, 9223372036854775776, + (3,3): 9223372036854775744, 9223372036854775680, 9223372036854775552, + (3,6): 9223372036854775296, 9223372036854774784, 9223372036854773760, + (3,9): 9223372036854771712, 9223372036854767616, 9223372036854759424, + (3,12): 9223372036854743040, 9223372036854710272, 9223372036854644736, + (3,15): 9223372036854513664, 9223372036854251520, 9223372036853727232, + (3,18): 9223372036852678656, 9223372036850581504, 9223372036846387200, + (3,21): 9223372036837998592, 9223372036821221376, 9223372036787666944, + (3,24): 9223372036720558080, 9223372036586340352, 9223372036317904896, + (3,27): 9223372035781033984, 9223372034707292160, 9223372032559808512, + (3,30): 9223372028264841216, 9223372019674906624, 9223372002495037440, + (3,33): 9223371968135299072, 9223371899415822336, 9223371761976868864, + (3,36): 9223371487098961920, 9223370937343148032, 9223369837831520256, + (3,39): 9223367638808264704, 9223363240761753600, 9223354444668731392, + (3,42): 9223336852482686976, 9223301668110598144, 9223231299366420480, + (3,45): 9223090561878065152, 9222809086901354496, 9222246136947933184, + (3,48): 9221120237041090560, 9218868437227405312, 9214364837600034816, + (3,51): 9205357638345293824, 9187343239835811840, 9151314442816847872, + (3,54): 9079256848778919936, 8935141660703064064, 8646911284551352320, + (3,57): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, + (3,61): 0, 0, 0, + (4,0): 9223372036854775792, 9223372036854775776, 9223372036854775744, + (4,3): 9223372036854775680, 9223372036854775552, 9223372036854775296, + (4,6): 9223372036854774784, 9223372036854773760, 9223372036854771712, + (4,9): 9223372036854767616, 9223372036854759424, 9223372036854743040, + (4,12): 9223372036854710272, 9223372036854644736, 9223372036854513664, + (4,15): 9223372036854251520, 9223372036853727232, 9223372036852678656, + (4,18): 9223372036850581504, 9223372036846387200, 9223372036837998592, + (4,21): 9223372036821221376, 9223372036787666944, 9223372036720558080, + (4,24): 9223372036586340352, 9223372036317904896, 9223372035781033984, + (4,27): 9223372034707292160, 9223372032559808512, 9223372028264841216, + (4,30): 9223372019674906624, 9223372002495037440, 9223371968135299072, + (4,33): 9223371899415822336, 9223371761976868864, 9223371487098961920, + (4,36): 9223370937343148032, 9223369837831520256, 9223367638808264704, + (4,39): 9223363240761753600, 9223354444668731392, 9223336852482686976, + (4,42): 9223301668110598144, 9223231299366420480, 9223090561878065152, + (4,45): 9222809086901354496, 9222246136947933184, 9221120237041090560, + (4,48): 9218868437227405312, 9214364837600034816, 9205357638345293824, + (4,51): 9187343239835811840, 9151314442816847872, 9079256848778919936, + (4,54): 8935141660703064064, 8646911284551352320, 8070450532247928832, + (4,57): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0, + (5,0): 9223372036854775776, 9223372036854775744, 9223372036854775680, + (5,3): 9223372036854775552, 9223372036854775296, 9223372036854774784, + (5,6): 9223372036854773760, 9223372036854771712, 9223372036854767616, + (5,9): 9223372036854759424, 9223372036854743040, 9223372036854710272, + (5,12): 9223372036854644736, 9223372036854513664, 9223372036854251520, + (5,15): 9223372036853727232, 9223372036852678656, 9223372036850581504, + (5,18): 9223372036846387200, 9223372036837998592, 9223372036821221376, + (5,21): 9223372036787666944, 9223372036720558080, 9223372036586340352, + (5,24): 9223372036317904896, 9223372035781033984, 9223372034707292160, + (5,27): 9223372032559808512, 9223372028264841216, 9223372019674906624, + (5,30): 9223372002495037440, 9223371968135299072, 9223371899415822336, + (5,33): 9223371761976868864, 9223371487098961920, 9223370937343148032, + (5,36): 9223369837831520256, 9223367638808264704, 9223363240761753600, + (5,39): 9223354444668731392, 9223336852482686976, 9223301668110598144, + (5,42): 9223231299366420480, 9223090561878065152, 9222809086901354496, + (5,45): 9222246136947933184, 9221120237041090560, 9218868437227405312, + (5,48): 9214364837600034816, 9205357638345293824, 9187343239835811840, + (5,51): 9151314442816847872, 9079256848778919936, 8935141660703064064, + (5,54): 8646911284551352320, 8070450532247928832, 6917529027641081856, + (5,57): 4611686018427387904, 0, 0, 0, 0, 0, 0, + (6,0): 9223372036854775744, 9223372036854775680, 9223372036854775552, + (6,3): 9223372036854775296, 9223372036854774784, 9223372036854773760, + (6,6): 9223372036854771712, 9223372036854767616, 9223372036854759424, + (6,9): 9223372036854743040, 9223372036854710272, 9223372036854644736, + (6,12): 9223372036854513664, 9223372036854251520, 9223372036853727232, + (6,15): 9223372036852678656, 9223372036850581504, 9223372036846387200, + (6,18): 9223372036837998592, 9223372036821221376, 9223372036787666944, + (6,21): 9223372036720558080, 9223372036586340352, 9223372036317904896, + (6,24): 9223372035781033984, 9223372034707292160, 9223372032559808512, + (6,27): 9223372028264841216, 9223372019674906624, 9223372002495037440, + (6,30): 9223371968135299072, 9223371899415822336, 9223371761976868864, + (6,33): 9223371487098961920, 9223370937343148032, 9223369837831520256, + (6,36): 9223367638808264704, 9223363240761753600, 9223354444668731392, + (6,39): 9223336852482686976, 9223301668110598144, 9223231299366420480, + (6,42): 9223090561878065152, 9222809086901354496, 9222246136947933184, + (6,45): 9221120237041090560, 9218868437227405312, 9214364837600034816, + (6,48): 9205357638345293824, 9187343239835811840, 9151314442816847872, + (6,51): 9079256848778919936, 8935141660703064064, 8646911284551352320, + (6,54): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, + (6,58): 0, 0, 0, 0, 0, 0, + (7,0): 9223372036854775680, 9223372036854775552, 9223372036854775296, + (7,3): 9223372036854774784, 9223372036854773760, 9223372036854771712, + (7,6): 9223372036854767616, 9223372036854759424, 9223372036854743040, + (7,9): 9223372036854710272, 9223372036854644736, 9223372036854513664, + (7,12): 9223372036854251520, 9223372036853727232, 9223372036852678656, + (7,15): 9223372036850581504, 9223372036846387200, 9223372036837998592, + (7,18): 9223372036821221376, 9223372036787666944, 9223372036720558080, + (7,21): 9223372036586340352, 9223372036317904896, 9223372035781033984, + (7,24): 9223372034707292160, 9223372032559808512, 9223372028264841216, + (7,27): 9223372019674906624, 9223372002495037440, 9223371968135299072, + (7,30): 9223371899415822336, 9223371761976868864, 9223371487098961920, + (7,33): 9223370937343148032, 9223369837831520256, 9223367638808264704, + (7,36): 9223363240761753600, 9223354444668731392, 9223336852482686976, + (7,39): 9223301668110598144, 9223231299366420480, 9223090561878065152, + (7,42): 9222809086901354496, 9222246136947933184, 9221120237041090560, + (7,45): 9218868437227405312, 9214364837600034816, 9205357638345293824, + (7,48): 9187343239835811840, 9151314442816847872, 9079256848778919936, + (7,51): 8935141660703064064, 8646911284551352320, 8070450532247928832, + (7,54): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedLongWhole.ddl b/tools/testfiles/pbits/tpbitsUnsignedLongWhole.ddl new file mode 100644 index 0000000..50ad02f --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedLongWhole.ddl @@ -0,0 +1,59 @@ +HDF5 "packedbits.h5" { +DATASET "/DU32BITS" { + DATATYPE H5T_STD_U32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + PACKED_BITS OFFSET=0 LENGTH=32 + DATA { + (0,0): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, + (0,5): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, + (0,10): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, + (0,15): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, + (0,20): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, + (0,25): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, + (0,30): 3221225472, 2147483648, + (1,0): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, + (1,5): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, + (1,10): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, + (1,15): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, + (1,20): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, + (1,25): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, + (1,30): 2147483648, 0, + (2,0): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, + (2,5): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, + (2,10): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, + (2,15): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, + (2,20): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, + (2,25): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, + (3,0): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, + (3,5): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, + (3,10): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, + (3,15): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, + (3,20): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, + (3,25): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, + (4,0): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, + (4,5): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, + (4,10): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, + (4,15): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, + (4,20): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, + (4,25): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, + (5,0): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, + (5,5): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, + (5,10): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, + (5,15): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, + (5,20): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, + (5,25): 3221225472, 2147483648, 0, 0, 0, 0, 0, + (6,0): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, + (6,5): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, + (6,10): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, + (6,15): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, + (6,20): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, + (6,25): 2147483648, 0, 0, 0, 0, 0, 0, + (7,0): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, + (7,5): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, + (7,10): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, + (7,15): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, + (7,20): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, + (7,27): 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/pbits/tpbitsUnsignedWhole.ddl b/tools/testfiles/pbits/tpbitsUnsignedWhole.ddl new file mode 100644 index 0000000..7c9e736 --- /dev/null +++ b/tools/testfiles/pbits/tpbitsUnsignedWhole.ddl @@ -0,0 +1,17 @@ +HDF5 "packedbits.h5" { +DATASET "/DU08BITS" { + DATATYPE H5T_STD_U8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + PACKED_BITS OFFSET=0 LENGTH=8 + DATA { + (0,0): 255, 254, 252, 248, 240, 224, 192, 128, + (1,0): 254, 252, 248, 240, 224, 192, 128, 0, + (2,0): 252, 248, 240, 224, 192, 128, 0, 0, + (3,0): 248, 240, 224, 192, 128, 0, 0, 0, + (4,0): 240, 224, 192, 128, 0, 0, 0, 0, + (5,0): 224, 192, 128, 0, 0, 0, 0, 0, + (6,0): 192, 128, 0, 0, 0, 0, 0, 0, + (7,0): 128, 0, 0, 0, 0, 0, 0, 0 + } +} +} diff --git a/tools/testfiles/tnofilename-with-packed-bits.ddl b/tools/testfiles/tnofilename-with-packed-bits.ddl deleted file mode 100644 index 64a2880..0000000 --- a/tools/testfiles/tnofilename-with-packed-bits.ddl +++ /dev/null @@ -1,136 +0,0 @@ -usage: h5dump [OPTIONS] files - OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit ---------------- File Options --------------- - -n, --contents Print a list of the file contents and exit - Optional value 1 also prints attributes. - -B, --superblock Print the content of the super block - -H, --header Print the header only; no data is displayed - -f D, --filedriver=D Specify which driver to open the file with - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display ---------------- Object Options --------------- - -a P, --attribute=P Print the specified attribute - If an attribute name contains a slash (/), escape the - slash with a preceding backslash (\). - (See example section below.) - -d P, --dataset=P Print the specified dataset - -g P, --group=P Print the specified group and all members - -l P, --soft-link=P Print the value(s) of the specified soft link - -t P, --datatype=P Print the specified named datatype - -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P - P can be the absolute path or just a relative path. - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. ---------------- Object Property Options --------------- - -i, --object-ids Print the object ids - -p, --properties Print dataset filters, storage layout and fill value - -M L, --packedbits=L Print packed bits as unsigned integers, using mask - format L for an integer dataset specified with - option -d. L is a list of offset,length values, - separated by commas. Offset is the beginning bit in - the data value and length is the number of bits of - the mask. - -R, --region Print dataset pointed by region references ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. ---------------- XML Options --------------- - -x, --xml Output in XML using Schema - -u, --use-dtd Output in XML using DTD - -D U, --xml-dtd=U Use the DTD or schema at U - -X S, --xml-ns=S (XML Schema) Use qualified names n the XML - ":": no namespace, default: "hdf5:" - E.g., to dump a file called `-f', use h5dump -- -f - ---------------- Subsetting Options --------------- - Subsetting is available by using the following options with a dataset - option. Subsetting is done by selecting a hyperslab from the data. - Thus, the options mirror those for performing a hyperslab selection. - One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting. - The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in - each dimension. START is optional and will default to 0 in each dimension. - - -s START, --start=START Offset of start of subsetting selection - -S STRIDE, --stride=STRIDE Hyperslab stride - -c COUNT, --count=COUNT Number of blocks to include in selection - -k BLOCK, --block=BLOCK Size of block in hyperslab - START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the - number of dimensions in the dataspace being queried - (Alternate compact form of subsetting is described in the Reference Manual) - ---------------- Option Argument Conventions --------------- - D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. - See examples below for family, split, and multi driver special file name usage. - - F - is a filename. - P - is the full path from the root group to the object. - N - is an integer greater than 1. - T - is a string containing the floating point format, e.g '%.3f' - U - is a URI reference (as defined in [IETF RFC 2396], - updated by [IETF RFC 2732]) - B - is the form of binary output: NATIVE for a memory type, FILE for the - file type, LE or BE for pre-existing little or big endian types. - Must be used with -o (output file) and it is recommended that - -d (dataset) is used. B is an optional argument, defaults to NATIVE - Q - is the sort index type. It can be "creation_order" or "name" (default) - Z - is the sort order type. It can be "descending" or "ascending" (default) - ---------------- Examples --------------- - - 1) Attribute foo of the group /bar_none in file quux.h5 - - h5dump -a /bar_none/foo quux.h5 - - Attribute "high/low" of the group /bar_none in the file quux.h5 - - h5dump -a "/bar_none/high\/low" quux.h5 - - 2) Selecting a subset from dataset /foo in file quux.h5 - - h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5 - - 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' - using a little-endian type - - h5dump -d /dset -b LE -o out.bin quux.h5 - - 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset - - h5dump -d /dset -M 0,1,4,3 quux.h5 - - 5) Dataset foo in files file1.h5 file2.h5 file3.h5 - - h5dump -d /foo file1.h5 file2.h5 file3.h5 - - 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - - h5dump -d /foo -f split splitfile - - 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 - - h5dump -d /foo -f multi mf - - 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - - h5dump -d /foo -f family fam%05d.h5 - -h5dump error: missing file name diff --git a/tools/testfiles/tpbitsArray.ddl b/tools/testfiles/tpbitsArray.ddl deleted file mode 100644 index 125abb8..0000000 --- a/tools/testfiles/tpbitsArray.ddl +++ /dev/null @@ -1,14 +0,0 @@ -HDF5 "tarray1.h5" { -DATASET "/Dataset1" { - DATATYPE H5T_ARRAY { [4] H5T_STD_I32LE } - DATASPACE SIMPLE { ( 4 ) / ( 4 ) } - PACKED_BITS OFFSET=0 LENGTH=1 - DATA { - (0): [ 0, 1, 0, 1 ], [ 0, 1, 0, 1 ], [ 0, 1, 0, 1 ], [ 0, 1, 0, 1 ] - } - PACKED_BITS OFFSET=1 LENGTH=1 - DATA { - (0): [ 0, 0, 1, 1 ], [ 1, 1, 0, 0 ], [ 0, 0, 1, 1 ], [ 1, 1, 0, 0 ] - } -} -} diff --git a/tools/testfiles/tpbitsCharLengthExceeded.ddl b/tools/testfiles/tpbitsCharLengthExceeded.ddl deleted file mode 100644 index b0683a7..0000000 --- a/tools/testfiles/tpbitsCharLengthExceeded.ddl +++ /dev/null @@ -1,18 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS08BITS" { - DATATYPE H5T_STD_I8LE - DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } - PACKED_BITS OFFSET=2 LENGTH=7 - DATA { - (0,0): 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } -} -} -h5dump error: Packed Bit offset+length value(9) too large. Max is 8 diff --git a/tools/testfiles/tpbitsCharOffsetExceeded.ddl b/tools/testfiles/tpbitsCharOffsetExceeded.ddl deleted file mode 100644 index 530fa05..0000000 --- a/tools/testfiles/tpbitsCharOffsetExceeded.ddl +++ /dev/null @@ -1,18 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS08BITS" { - DATATYPE H5T_STD_I8LE - DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } - PACKED_BITS OFFSET=8 LENGTH=1 - DATA { - (0,0): 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } -} -} -h5dump error: Packed Bit offset+length value(9) too large. Max is 8 diff --git a/tools/testfiles/tpbitsCompound.ddl b/tools/testfiles/tpbitsCompound.ddl deleted file mode 100644 index c84272a..0000000 --- a/tools/testfiles/tpbitsCompound.ddl +++ /dev/null @@ -1,66 +0,0 @@ -HDF5 "tcompound.h5" { -DATASET "/dset1" { - DATATYPE H5T_COMPOUND { - H5T_STD_I32BE "a_name"; - H5T_IEEE_F32BE "b_name"; - H5T_IEEE_F64BE "c_name"; - } - DATASPACE SIMPLE { ( 5 ) / ( 5 ) } - PACKED_BITS OFFSET=0 LENGTH=1 - DATA { - (0): { - 0, - 0, - 1 - }, - (1): { - 1, - 1, - 0.5 - }, - (2): { - 0, - 4, - 0.333333 - }, - (3): { - 1, - 9, - 0.25 - }, - (4): { - 0, - 16, - 0.2 - } - } - PACKED_BITS OFFSET=1 LENGTH=1 - DATA { - (0): { - 0, - 0, - 1 - }, - (1): { - 0, - 1, - 0.5 - }, - (2): { - 1, - 4, - 0.333333 - }, - (3): { - 1, - 9, - 0.25 - }, - (4): { - 0, - 16, - 0.2 - } - } -} -} diff --git a/tools/testfiles/tpbitsIncomplete.ddl b/tools/testfiles/tpbitsIncomplete.ddl deleted file mode 100644 index cdb1f91..0000000 --- a/tools/testfiles/tpbitsIncomplete.ddl +++ /dev/null @@ -1,136 +0,0 @@ -usage: h5dump [OPTIONS] files - OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit ---------------- File Options --------------- - -n, --contents Print a list of the file contents and exit - Optional value 1 also prints attributes. - -B, --superblock Print the content of the super block - -H, --header Print the header only; no data is displayed - -f D, --filedriver=D Specify which driver to open the file with - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display ---------------- Object Options --------------- - -a P, --attribute=P Print the specified attribute - If an attribute name contains a slash (/), escape the - slash with a preceding backslash (\). - (See example section below.) - -d P, --dataset=P Print the specified dataset - -g P, --group=P Print the specified group and all members - -l P, --soft-link=P Print the value(s) of the specified soft link - -t P, --datatype=P Print the specified named datatype - -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P - P can be the absolute path or just a relative path. - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. ---------------- Object Property Options --------------- - -i, --object-ids Print the object ids - -p, --properties Print dataset filters, storage layout and fill value - -M L, --packedbits=L Print packed bits as unsigned integers, using mask - format L for an integer dataset specified with - option -d. L is a list of offset,length values, - separated by commas. Offset is the beginning bit in - the data value and length is the number of bits of - the mask. - -R, --region Print dataset pointed by region references ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. ---------------- XML Options --------------- - -x, --xml Output in XML using Schema - -u, --use-dtd Output in XML using DTD - -D U, --xml-dtd=U Use the DTD or schema at U - -X S, --xml-ns=S (XML Schema) Use qualified names n the XML - ":": no namespace, default: "hdf5:" - E.g., to dump a file called `-f', use h5dump -- -f - ---------------- Subsetting Options --------------- - Subsetting is available by using the following options with a dataset - option. Subsetting is done by selecting a hyperslab from the data. - Thus, the options mirror those for performing a hyperslab selection. - One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting. - The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in - each dimension. START is optional and will default to 0 in each dimension. - - -s START, --start=START Offset of start of subsetting selection - -S STRIDE, --stride=STRIDE Hyperslab stride - -c COUNT, --count=COUNT Number of blocks to include in selection - -k BLOCK, --block=BLOCK Size of block in hyperslab - START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the - number of dimensions in the dataspace being queried - (Alternate compact form of subsetting is described in the Reference Manual) - ---------------- Option Argument Conventions --------------- - D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. - See examples below for family, split, and multi driver special file name usage. - - F - is a filename. - P - is the full path from the root group to the object. - N - is an integer greater than 1. - T - is a string containing the floating point format, e.g '%.3f' - U - is a URI reference (as defined in [IETF RFC 2396], - updated by [IETF RFC 2732]) - B - is the form of binary output: NATIVE for a memory type, FILE for the - file type, LE or BE for pre-existing little or big endian types. - Must be used with -o (output file) and it is recommended that - -d (dataset) is used. B is an optional argument, defaults to NATIVE - Q - is the sort index type. It can be "creation_order" or "name" (default) - Z - is the sort order type. It can be "descending" or "ascending" (default) - ---------------- Examples --------------- - - 1) Attribute foo of the group /bar_none in file quux.h5 - - h5dump -a /bar_none/foo quux.h5 - - Attribute "high/low" of the group /bar_none in the file quux.h5 - - h5dump -a "/bar_none/high\/low" quux.h5 - - 2) Selecting a subset from dataset /foo in file quux.h5 - - h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5 - - 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' - using a little-endian type - - h5dump -d /dset -b LE -o out.bin quux.h5 - - 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset - - h5dump -d /dset -M 0,1,4,3 quux.h5 - - 5) Dataset foo in files file1.h5 file2.h5 file3.h5 - - h5dump -d /foo file1.h5 file2.h5 file3.h5 - - 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - - h5dump -d /foo -f split splitfile - - 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 - - h5dump -d /foo -f multi mf - - 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - - h5dump -d /foo -f family fam%05d.h5 - -h5dump error: Bad mask list(0,2,2,1,0,2,2,) diff --git a/tools/testfiles/tpbitsIntLengthExceeded.ddl b/tools/testfiles/tpbitsIntLengthExceeded.ddl deleted file mode 100644 index 1c919cd..0000000 --- a/tools/testfiles/tpbitsIntLengthExceeded.ddl +++ /dev/null @@ -1,18 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS16BITS" { - DATATYPE H5T_STD_I16LE - DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } - PACKED_BITS OFFSET=10 LENGTH=7 - DATA { - (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } -} -} -h5dump error: Packed Bit offset+length value(17) too large. Max is 16 diff --git a/tools/testfiles/tpbitsIntOffsetExceeded.ddl b/tools/testfiles/tpbitsIntOffsetExceeded.ddl deleted file mode 100644 index f3b2a8c..0000000 --- a/tools/testfiles/tpbitsIntOffsetExceeded.ddl +++ /dev/null @@ -1,18 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS16BITS" { - DATATYPE H5T_STD_I16LE - DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } - PACKED_BITS OFFSET=16 LENGTH=1 - DATA { - (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } -} -} -h5dump error: Packed Bit offset+length value(17) too large. Max is 16 diff --git a/tools/testfiles/tpbitsLengthExceeded.ddl b/tools/testfiles/tpbitsLengthExceeded.ddl deleted file mode 100644 index 6d2492a..0000000 --- a/tools/testfiles/tpbitsLengthExceeded.ddl +++ /dev/null @@ -1,136 +0,0 @@ -usage: h5dump [OPTIONS] files - OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit ---------------- File Options --------------- - -n, --contents Print a list of the file contents and exit - Optional value 1 also prints attributes. - -B, --superblock Print the content of the super block - -H, --header Print the header only; no data is displayed - -f D, --filedriver=D Specify which driver to open the file with - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display ---------------- Object Options --------------- - -a P, --attribute=P Print the specified attribute - If an attribute name contains a slash (/), escape the - slash with a preceding backslash (\). - (See example section below.) - -d P, --dataset=P Print the specified dataset - -g P, --group=P Print the specified group and all members - -l P, --soft-link=P Print the value(s) of the specified soft link - -t P, --datatype=P Print the specified named datatype - -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P - P can be the absolute path or just a relative path. - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. ---------------- Object Property Options --------------- - -i, --object-ids Print the object ids - -p, --properties Print dataset filters, storage layout and fill value - -M L, --packedbits=L Print packed bits as unsigned integers, using mask - format L for an integer dataset specified with - option -d. L is a list of offset,length values, - separated by commas. Offset is the beginning bit in - the data value and length is the number of bits of - the mask. - -R, --region Print dataset pointed by region references ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. ---------------- XML Options --------------- - -x, --xml Output in XML using Schema - -u, --use-dtd Output in XML using DTD - -D U, --xml-dtd=U Use the DTD or schema at U - -X S, --xml-ns=S (XML Schema) Use qualified names n the XML - ":": no namespace, default: "hdf5:" - E.g., to dump a file called `-f', use h5dump -- -f - ---------------- Subsetting Options --------------- - Subsetting is available by using the following options with a dataset - option. Subsetting is done by selecting a hyperslab from the data. - Thus, the options mirror those for performing a hyperslab selection. - One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting. - The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in - each dimension. START is optional and will default to 0 in each dimension. - - -s START, --start=START Offset of start of subsetting selection - -S STRIDE, --stride=STRIDE Hyperslab stride - -c COUNT, --count=COUNT Number of blocks to include in selection - -k BLOCK, --block=BLOCK Size of block in hyperslab - START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the - number of dimensions in the dataspace being queried - (Alternate compact form of subsetting is described in the Reference Manual) - ---------------- Option Argument Conventions --------------- - D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. - See examples below for family, split, and multi driver special file name usage. - - F - is a filename. - P - is the full path from the root group to the object. - N - is an integer greater than 1. - T - is a string containing the floating point format, e.g '%.3f' - U - is a URI reference (as defined in [IETF RFC 2396], - updated by [IETF RFC 2732]) - B - is the form of binary output: NATIVE for a memory type, FILE for the - file type, LE or BE for pre-existing little or big endian types. - Must be used with -o (output file) and it is recommended that - -d (dataset) is used. B is an optional argument, defaults to NATIVE - Q - is the sort index type. It can be "creation_order" or "name" (default) - Z - is the sort order type. It can be "descending" or "ascending" (default) - ---------------- Examples --------------- - - 1) Attribute foo of the group /bar_none in file quux.h5 - - h5dump -a /bar_none/foo quux.h5 - - Attribute "high/low" of the group /bar_none in the file quux.h5 - - h5dump -a "/bar_none/high\/low" quux.h5 - - 2) Selecting a subset from dataset /foo in file quux.h5 - - h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5 - - 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' - using a little-endian type - - h5dump -d /dset -b LE -o out.bin quux.h5 - - 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset - - h5dump -d /dset -M 0,1,4,3 quux.h5 - - 5) Dataset foo in files file1.h5 file2.h5 file3.h5 - - h5dump -d /foo file1.h5 file2.h5 file3.h5 - - 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - - h5dump -d /foo -f split splitfile - - 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 - - h5dump -d /foo -f multi mf - - 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - - h5dump -d /foo -f family fam%05d.h5 - -h5dump error: Packed Bit offset+length value(65) too large. Max is 64 diff --git a/tools/testfiles/tpbitsLengthPositive.ddl b/tools/testfiles/tpbitsLengthPositive.ddl deleted file mode 100644 index 4f56619..0000000 --- a/tools/testfiles/tpbitsLengthPositive.ddl +++ /dev/null @@ -1,136 +0,0 @@ -usage: h5dump [OPTIONS] files - OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit ---------------- File Options --------------- - -n, --contents Print a list of the file contents and exit - Optional value 1 also prints attributes. - -B, --superblock Print the content of the super block - -H, --header Print the header only; no data is displayed - -f D, --filedriver=D Specify which driver to open the file with - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display ---------------- Object Options --------------- - -a P, --attribute=P Print the specified attribute - If an attribute name contains a slash (/), escape the - slash with a preceding backslash (\). - (See example section below.) - -d P, --dataset=P Print the specified dataset - -g P, --group=P Print the specified group and all members - -l P, --soft-link=P Print the value(s) of the specified soft link - -t P, --datatype=P Print the specified named datatype - -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P - P can be the absolute path or just a relative path. - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. ---------------- Object Property Options --------------- - -i, --object-ids Print the object ids - -p, --properties Print dataset filters, storage layout and fill value - -M L, --packedbits=L Print packed bits as unsigned integers, using mask - format L for an integer dataset specified with - option -d. L is a list of offset,length values, - separated by commas. Offset is the beginning bit in - the data value and length is the number of bits of - the mask. - -R, --region Print dataset pointed by region references ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. ---------------- XML Options --------------- - -x, --xml Output in XML using Schema - -u, --use-dtd Output in XML using DTD - -D U, --xml-dtd=U Use the DTD or schema at U - -X S, --xml-ns=S (XML Schema) Use qualified names n the XML - ":": no namespace, default: "hdf5:" - E.g., to dump a file called `-f', use h5dump -- -f - ---------------- Subsetting Options --------------- - Subsetting is available by using the following options with a dataset - option. Subsetting is done by selecting a hyperslab from the data. - Thus, the options mirror those for performing a hyperslab selection. - One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting. - The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in - each dimension. START is optional and will default to 0 in each dimension. - - -s START, --start=START Offset of start of subsetting selection - -S STRIDE, --stride=STRIDE Hyperslab stride - -c COUNT, --count=COUNT Number of blocks to include in selection - -k BLOCK, --block=BLOCK Size of block in hyperslab - START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the - number of dimensions in the dataspace being queried - (Alternate compact form of subsetting is described in the Reference Manual) - ---------------- Option Argument Conventions --------------- - D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. - See examples below for family, split, and multi driver special file name usage. - - F - is a filename. - P - is the full path from the root group to the object. - N - is an integer greater than 1. - T - is a string containing the floating point format, e.g '%.3f' - U - is a URI reference (as defined in [IETF RFC 2396], - updated by [IETF RFC 2732]) - B - is the form of binary output: NATIVE for a memory type, FILE for the - file type, LE or BE for pre-existing little or big endian types. - Must be used with -o (output file) and it is recommended that - -d (dataset) is used. B is an optional argument, defaults to NATIVE - Q - is the sort index type. It can be "creation_order" or "name" (default) - Z - is the sort order type. It can be "descending" or "ascending" (default) - ---------------- Examples --------------- - - 1) Attribute foo of the group /bar_none in file quux.h5 - - h5dump -a /bar_none/foo quux.h5 - - Attribute "high/low" of the group /bar_none in the file quux.h5 - - h5dump -a "/bar_none/high\/low" quux.h5 - - 2) Selecting a subset from dataset /foo in file quux.h5 - - h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5 - - 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' - using a little-endian type - - h5dump -d /dset -b LE -o out.bin quux.h5 - - 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset - - h5dump -d /dset -M 0,1,4,3 quux.h5 - - 5) Dataset foo in files file1.h5 file2.h5 file3.h5 - - h5dump -d /foo file1.h5 file2.h5 file3.h5 - - 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - - h5dump -d /foo -f split splitfile - - 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 - - h5dump -d /foo -f multi mf - - 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - - h5dump -d /foo -f family fam%05d.h5 - -h5dump error: Packed Bit length value(0) must be positive. diff --git a/tools/testfiles/tpbitsLongLengthExceeded.ddl b/tools/testfiles/tpbitsLongLengthExceeded.ddl deleted file mode 100644 index 812c300..0000000 --- a/tools/testfiles/tpbitsLongLengthExceeded.ddl +++ /dev/null @@ -1,26 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS32BITS" { - DATATYPE H5T_STD_I32LE - DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } - PACKED_BITS OFFSET=26 LENGTH=7 - DATA { - (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } -} -} -h5dump error: Packed Bit offset+length value(33) too large. Max is 32 diff --git a/tools/testfiles/tpbitsLongOffsetExceeded.ddl b/tools/testfiles/tpbitsLongOffsetExceeded.ddl deleted file mode 100644 index cbea722..0000000 --- a/tools/testfiles/tpbitsLongOffsetExceeded.ddl +++ /dev/null @@ -1,26 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS32BITS" { - DATATYPE H5T_STD_I32LE - DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } - PACKED_BITS OFFSET=32 LENGTH=1 - DATA { - (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } -} -} -h5dump error: Packed Bit offset+length value(33) too large. Max is 32 diff --git a/tools/testfiles/tpbitsMax.ddl b/tools/testfiles/tpbitsMax.ddl deleted file mode 100644 index e569488..0000000 --- a/tools/testfiles/tpbitsMax.ddl +++ /dev/null @@ -1,94 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS08BITS" { - DATATYPE H5T_STD_I8LE - DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } - PACKED_BITS OFFSET=0 LENGTH=1 - DATA { - (0,0): 1, 0, 0, 0, 0, 0, 0, 0, - (1,0): 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=1 LENGTH=1 - DATA { - (0,0): 1, 1, 0, 0, 0, 0, 0, 0, - (1,0): 1, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=2 LENGTH=1 - DATA { - (0,0): 1, 1, 1, 0, 0, 0, 0, 0, - (1,0): 1, 1, 0, 0, 0, 0, 0, 0, - (2,0): 1, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=3 LENGTH=1 - DATA { - (0,0): 1, 1, 1, 1, 0, 0, 0, 0, - (1,0): 1, 1, 1, 0, 0, 0, 0, 0, - (2,0): 1, 1, 0, 0, 0, 0, 0, 0, - (3,0): 1, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=4 LENGTH=1 - DATA { - (0,0): 1, 1, 1, 1, 1, 0, 0, 0, - (1,0): 1, 1, 1, 1, 0, 0, 0, 0, - (2,0): 1, 1, 1, 0, 0, 0, 0, 0, - (3,0): 1, 1, 0, 0, 0, 0, 0, 0, - (4,0): 1, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=5 LENGTH=1 - DATA { - (0,0): 1, 1, 1, 1, 1, 1, 0, 0, - (1,0): 1, 1, 1, 1, 1, 0, 0, 0, - (2,0): 1, 1, 1, 1, 0, 0, 0, 0, - (3,0): 1, 1, 1, 0, 0, 0, 0, 0, - (4,0): 1, 1, 0, 0, 0, 0, 0, 0, - (5,0): 1, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=6 LENGTH=1 - DATA { - (0,0): 1, 1, 1, 1, 1, 1, 1, 0, - (1,0): 1, 1, 1, 1, 1, 1, 0, 0, - (2,0): 1, 1, 1, 1, 1, 0, 0, 0, - (3,0): 1, 1, 1, 1, 0, 0, 0, 0, - (4,0): 1, 1, 1, 0, 0, 0, 0, 0, - (5,0): 1, 1, 0, 0, 0, 0, 0, 0, - (6,0): 1, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=7 LENGTH=1 - DATA { - (0,0): 1, 1, 1, 1, 1, 1, 1, 1, - (1,0): 1, 1, 1, 1, 1, 1, 1, 0, - (2,0): 1, 1, 1, 1, 1, 1, 0, 0, - (3,0): 1, 1, 1, 1, 1, 0, 0, 0, - (4,0): 1, 1, 1, 1, 0, 0, 0, 0, - (5,0): 1, 1, 1, 0, 0, 0, 0, 0, - (6,0): 1, 1, 0, 0, 0, 0, 0, 0, - (7,0): 1, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsMaxExceeded.ddl b/tools/testfiles/tpbitsMaxExceeded.ddl deleted file mode 100644 index 3432433..0000000 --- a/tools/testfiles/tpbitsMaxExceeded.ddl +++ /dev/null @@ -1,136 +0,0 @@ -usage: h5dump [OPTIONS] files - OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit ---------------- File Options --------------- - -n, --contents Print a list of the file contents and exit - Optional value 1 also prints attributes. - -B, --superblock Print the content of the super block - -H, --header Print the header only; no data is displayed - -f D, --filedriver=D Specify which driver to open the file with - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display ---------------- Object Options --------------- - -a P, --attribute=P Print the specified attribute - If an attribute name contains a slash (/), escape the - slash with a preceding backslash (\). - (See example section below.) - -d P, --dataset=P Print the specified dataset - -g P, --group=P Print the specified group and all members - -l P, --soft-link=P Print the value(s) of the specified soft link - -t P, --datatype=P Print the specified named datatype - -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P - P can be the absolute path or just a relative path. - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. ---------------- Object Property Options --------------- - -i, --object-ids Print the object ids - -p, --properties Print dataset filters, storage layout and fill value - -M L, --packedbits=L Print packed bits as unsigned integers, using mask - format L for an integer dataset specified with - option -d. L is a list of offset,length values, - separated by commas. Offset is the beginning bit in - the data value and length is the number of bits of - the mask. - -R, --region Print dataset pointed by region references ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. ---------------- XML Options --------------- - -x, --xml Output in XML using Schema - -u, --use-dtd Output in XML using DTD - -D U, --xml-dtd=U Use the DTD or schema at U - -X S, --xml-ns=S (XML Schema) Use qualified names n the XML - ":": no namespace, default: "hdf5:" - E.g., to dump a file called `-f', use h5dump -- -f - ---------------- Subsetting Options --------------- - Subsetting is available by using the following options with a dataset - option. Subsetting is done by selecting a hyperslab from the data. - Thus, the options mirror those for performing a hyperslab selection. - One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting. - The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in - each dimension. START is optional and will default to 0 in each dimension. - - -s START, --start=START Offset of start of subsetting selection - -S STRIDE, --stride=STRIDE Hyperslab stride - -c COUNT, --count=COUNT Number of blocks to include in selection - -k BLOCK, --block=BLOCK Size of block in hyperslab - START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the - number of dimensions in the dataspace being queried - (Alternate compact form of subsetting is described in the Reference Manual) - ---------------- Option Argument Conventions --------------- - D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. - See examples below for family, split, and multi driver special file name usage. - - F - is a filename. - P - is the full path from the root group to the object. - N - is an integer greater than 1. - T - is a string containing the floating point format, e.g '%.3f' - U - is a URI reference (as defined in [IETF RFC 2396], - updated by [IETF RFC 2732]) - B - is the form of binary output: NATIVE for a memory type, FILE for the - file type, LE or BE for pre-existing little or big endian types. - Must be used with -o (output file) and it is recommended that - -d (dataset) is used. B is an optional argument, defaults to NATIVE - Q - is the sort index type. It can be "creation_order" or "name" (default) - Z - is the sort order type. It can be "descending" or "ascending" (default) - ---------------- Examples --------------- - - 1) Attribute foo of the group /bar_none in file quux.h5 - - h5dump -a /bar_none/foo quux.h5 - - Attribute "high/low" of the group /bar_none in the file quux.h5 - - h5dump -a "/bar_none/high\/low" quux.h5 - - 2) Selecting a subset from dataset /foo in file quux.h5 - - h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5 - - 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' - using a little-endian type - - h5dump -d /dset -b LE -o out.bin quux.h5 - - 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset - - h5dump -d /dset -M 0,1,4,3 quux.h5 - - 5) Dataset foo in files file1.h5 file2.h5 file3.h5 - - h5dump -d /foo file1.h5 file2.h5 file3.h5 - - 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - - h5dump -d /foo -f split splitfile - - 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 - - h5dump -d /foo -f multi mf - - 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - - h5dump -d /foo -f family fam%05d.h5 - -h5dump error: Too many masks requested (max. 8). Mask list(0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1) diff --git a/tools/testfiles/tpbitsOffsetExceeded.ddl b/tools/testfiles/tpbitsOffsetExceeded.ddl deleted file mode 100644 index e51a09e..0000000 --- a/tools/testfiles/tpbitsOffsetExceeded.ddl +++ /dev/null @@ -1,136 +0,0 @@ -usage: h5dump [OPTIONS] files - OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit ---------------- File Options --------------- - -n, --contents Print a list of the file contents and exit - Optional value 1 also prints attributes. - -B, --superblock Print the content of the super block - -H, --header Print the header only; no data is displayed - -f D, --filedriver=D Specify which driver to open the file with - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display ---------------- Object Options --------------- - -a P, --attribute=P Print the specified attribute - If an attribute name contains a slash (/), escape the - slash with a preceding backslash (\). - (See example section below.) - -d P, --dataset=P Print the specified dataset - -g P, --group=P Print the specified group and all members - -l P, --soft-link=P Print the value(s) of the specified soft link - -t P, --datatype=P Print the specified named datatype - -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P - P can be the absolute path or just a relative path. - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. ---------------- Object Property Options --------------- - -i, --object-ids Print the object ids - -p, --properties Print dataset filters, storage layout and fill value - -M L, --packedbits=L Print packed bits as unsigned integers, using mask - format L for an integer dataset specified with - option -d. L is a list of offset,length values, - separated by commas. Offset is the beginning bit in - the data value and length is the number of bits of - the mask. - -R, --region Print dataset pointed by region references ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. ---------------- XML Options --------------- - -x, --xml Output in XML using Schema - -u, --use-dtd Output in XML using DTD - -D U, --xml-dtd=U Use the DTD or schema at U - -X S, --xml-ns=S (XML Schema) Use qualified names n the XML - ":": no namespace, default: "hdf5:" - E.g., to dump a file called `-f', use h5dump -- -f - ---------------- Subsetting Options --------------- - Subsetting is available by using the following options with a dataset - option. Subsetting is done by selecting a hyperslab from the data. - Thus, the options mirror those for performing a hyperslab selection. - One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting. - The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in - each dimension. START is optional and will default to 0 in each dimension. - - -s START, --start=START Offset of start of subsetting selection - -S STRIDE, --stride=STRIDE Hyperslab stride - -c COUNT, --count=COUNT Number of blocks to include in selection - -k BLOCK, --block=BLOCK Size of block in hyperslab - START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the - number of dimensions in the dataspace being queried - (Alternate compact form of subsetting is described in the Reference Manual) - ---------------- Option Argument Conventions --------------- - D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. - See examples below for family, split, and multi driver special file name usage. - - F - is a filename. - P - is the full path from the root group to the object. - N - is an integer greater than 1. - T - is a string containing the floating point format, e.g '%.3f' - U - is a URI reference (as defined in [IETF RFC 2396], - updated by [IETF RFC 2732]) - B - is the form of binary output: NATIVE for a memory type, FILE for the - file type, LE or BE for pre-existing little or big endian types. - Must be used with -o (output file) and it is recommended that - -d (dataset) is used. B is an optional argument, defaults to NATIVE - Q - is the sort index type. It can be "creation_order" or "name" (default) - Z - is the sort order type. It can be "descending" or "ascending" (default) - ---------------- Examples --------------- - - 1) Attribute foo of the group /bar_none in file quux.h5 - - h5dump -a /bar_none/foo quux.h5 - - Attribute "high/low" of the group /bar_none in the file quux.h5 - - h5dump -a "/bar_none/high\/low" quux.h5 - - 2) Selecting a subset from dataset /foo in file quux.h5 - - h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5 - - 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' - using a little-endian type - - h5dump -d /dset -b LE -o out.bin quux.h5 - - 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset - - h5dump -d /dset -M 0,1,4,3 quux.h5 - - 5) Dataset foo in files file1.h5 file2.h5 file3.h5 - - h5dump -d /foo file1.h5 file2.h5 file3.h5 - - 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - - h5dump -d /foo -f split splitfile - - 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 - - h5dump -d /foo -f multi mf - - 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - - h5dump -d /foo -f family fam%05d.h5 - -h5dump error: Packed Bit offset value(64) must be between 0 and 63 diff --git a/tools/testfiles/tpbitsOffsetNegative.ddl b/tools/testfiles/tpbitsOffsetNegative.ddl deleted file mode 100644 index ba6e46d..0000000 --- a/tools/testfiles/tpbitsOffsetNegative.ddl +++ /dev/null @@ -1,136 +0,0 @@ -usage: h5dump [OPTIONS] files - OPTIONS - -h, --help Print a usage message and exit - -V, --version Print version number and exit ---------------- File Options --------------- - -n, --contents Print a list of the file contents and exit - Optional value 1 also prints attributes. - -B, --superblock Print the content of the super block - -H, --header Print the header only; no data is displayed - -f D, --filedriver=D Specify which driver to open the file with - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display ---------------- Object Options --------------- - -a P, --attribute=P Print the specified attribute - If an attribute name contains a slash (/), escape the - slash with a preceding backslash (\). - (See example section below.) - -d P, --dataset=P Print the specified dataset - -g P, --group=P Print the specified group and all members - -l P, --soft-link=P Print the value(s) of the specified soft link - -t P, --datatype=P Print the specified named datatype - -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P - P can be the absolute path or just a relative path. - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. ---------------- Object Property Options --------------- - -i, --object-ids Print the object ids - -p, --properties Print dataset filters, storage layout and fill value - -M L, --packedbits=L Print packed bits as unsigned integers, using mask - format L for an integer dataset specified with - option -d. L is a list of offset,length values, - separated by commas. Offset is the beginning bit in - the data value and length is the number of bits of - the mask. - -R, --region Print dataset pointed by region references ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. ---------------- XML Options --------------- - -x, --xml Output in XML using Schema - -u, --use-dtd Output in XML using DTD - -D U, --xml-dtd=U Use the DTD or schema at U - -X S, --xml-ns=S (XML Schema) Use qualified names n the XML - ":": no namespace, default: "hdf5:" - E.g., to dump a file called `-f', use h5dump -- -f - ---------------- Subsetting Options --------------- - Subsetting is available by using the following options with a dataset - option. Subsetting is done by selecting a hyperslab from the data. - Thus, the options mirror those for performing a hyperslab selection. - One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting. - The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in - each dimension. START is optional and will default to 0 in each dimension. - - -s START, --start=START Offset of start of subsetting selection - -S STRIDE, --stride=STRIDE Hyperslab stride - -c COUNT, --count=COUNT Number of blocks to include in selection - -k BLOCK, --block=BLOCK Size of block in hyperslab - START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the - number of dimensions in the dataspace being queried - (Alternate compact form of subsetting is described in the Reference Manual) - ---------------- Option Argument Conventions --------------- - D - is the file driver to use in opening the file. Acceptable values - are "sec2", "family", "split", "multi", "direct", and "stream". Without - the file driver flag, the file will be opened with each driver in - turn and in the order specified above until one driver succeeds - in opening the file. - See examples below for family, split, and multi driver special file name usage. - - F - is a filename. - P - is the full path from the root group to the object. - N - is an integer greater than 1. - T - is a string containing the floating point format, e.g '%.3f' - U - is a URI reference (as defined in [IETF RFC 2396], - updated by [IETF RFC 2732]) - B - is the form of binary output: NATIVE for a memory type, FILE for the - file type, LE or BE for pre-existing little or big endian types. - Must be used with -o (output file) and it is recommended that - -d (dataset) is used. B is an optional argument, defaults to NATIVE - Q - is the sort index type. It can be "creation_order" or "name" (default) - Z - is the sort order type. It can be "descending" or "ascending" (default) - ---------------- Examples --------------- - - 1) Attribute foo of the group /bar_none in file quux.h5 - - h5dump -a /bar_none/foo quux.h5 - - Attribute "high/low" of the group /bar_none in the file quux.h5 - - h5dump -a "/bar_none/high\/low" quux.h5 - - 2) Selecting a subset from dataset /foo in file quux.h5 - - h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5 - - 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin' - using a little-endian type - - h5dump -d /dset -b LE -o out.bin quux.h5 - - 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset - - h5dump -d /dset -M 0,1,4,3 quux.h5 - - 5) Dataset foo in files file1.h5 file2.h5 file3.h5 - - h5dump -d /foo file1.h5 file2.h5 file3.h5 - - 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5 - - h5dump -d /foo -f split splitfile - - 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 - - h5dump -d /foo -f multi mf - - 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - - h5dump -d /foo -f family fam%05d.h5 - -h5dump error: Bad mask list(-1,1) diff --git a/tools/testfiles/tpbitsOverlapped.ddl b/tools/testfiles/tpbitsOverlapped.ddl deleted file mode 100644 index 9dcc9d2..0000000 --- a/tools/testfiles/tpbitsOverlapped.ddl +++ /dev/null @@ -1,50 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS08BITS" { - DATATYPE H5T_STD_I8LE - DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } - PACKED_BITS OFFSET=0 LENGTH=1 - DATA { - (0,0): 1, 0, 0, 0, 0, 0, 0, 0, - (1,0): 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=1 LENGTH=1 - DATA { - (0,0): 1, 1, 0, 0, 0, 0, 0, 0, - (1,0): 1, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=2 LENGTH=1 - DATA { - (0,0): 1, 1, 1, 0, 0, 0, 0, 0, - (1,0): 1, 1, 0, 0, 0, 0, 0, 0, - (2,0): 1, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=0 LENGTH=3 - DATA { - (0,0): 7, 6, 4, 0, 0, 0, 0, 0, - (1,0): 6, 4, 0, 0, 0, 0, 0, 0, - (2,0): 4, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSigned.ddl b/tools/testfiles/tpbitsSigned.ddl deleted file mode 100644 index b843388..0000000 --- a/tools/testfiles/tpbitsSigned.ddl +++ /dev/null @@ -1,28 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS08BITS" { - DATATYPE H5T_STD_I8LE - DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } - PACKED_BITS OFFSET=0 LENGTH=2 - DATA { - (0,0): 3, 2, 0, 0, 0, 0, 0, 0, - (1,0): 2, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=2 LENGTH=6 - DATA { - (0,0): 63, 63, 63, 62, 60, 56, 48, 32, - (1,0): 63, 63, 62, 60, 56, 48, 32, 0, - (2,0): 63, 62, 60, 56, 48, 32, 0, 0, - (3,0): 62, 60, 56, 48, 32, 0, 0, 0, - (4,0): 60, 56, 48, 32, 0, 0, 0, 0, - (5,0): 56, 48, 32, 0, 0, 0, 0, 0, - (6,0): 48, 32, 0, 0, 0, 0, 0, 0, - (7,0): 32, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSigned2.ddl b/tools/testfiles/tpbitsSigned2.ddl deleted file mode 100644 index 932b5fd..0000000 --- a/tools/testfiles/tpbitsSigned2.ddl +++ /dev/null @@ -1,50 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS08BITS" { - DATATYPE H5T_STD_I8LE - DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } - PACKED_BITS OFFSET=0 LENGTH=2 - DATA { - (0,0): 3, 2, 0, 0, 0, 0, 0, 0, - (1,0): 2, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=2 LENGTH=2 - DATA { - (0,0): 3, 3, 3, 2, 0, 0, 0, 0, - (1,0): 3, 3, 2, 0, 0, 0, 0, 0, - (2,0): 3, 2, 0, 0, 0, 0, 0, 0, - (3,0): 2, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=4 LENGTH=2 - DATA { - (0,0): 3, 3, 3, 3, 3, 2, 0, 0, - (1,0): 3, 3, 3, 3, 2, 0, 0, 0, - (2,0): 3, 3, 3, 2, 0, 0, 0, 0, - (3,0): 3, 3, 2, 0, 0, 0, 0, 0, - (4,0): 3, 2, 0, 0, 0, 0, 0, 0, - (5,0): 2, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=6 LENGTH=2 - DATA { - (0,0): 3, 3, 3, 3, 3, 3, 3, 2, - (1,0): 3, 3, 3, 3, 3, 3, 2, 0, - (2,0): 3, 3, 3, 3, 3, 2, 0, 0, - (3,0): 3, 3, 3, 3, 2, 0, 0, 0, - (4,0): 3, 3, 3, 2, 0, 0, 0, 0, - (5,0): 3, 3, 2, 0, 0, 0, 0, 0, - (6,0): 3, 2, 0, 0, 0, 0, 0, 0, - (7,0): 2, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSigned4.ddl b/tools/testfiles/tpbitsSigned4.ddl deleted file mode 100644 index 9eacd83..0000000 --- a/tools/testfiles/tpbitsSigned4.ddl +++ /dev/null @@ -1,28 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS08BITS" { - DATATYPE H5T_STD_I8LE - DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } - PACKED_BITS OFFSET=0 LENGTH=4 - DATA { - (0,0): 15, 14, 12, 8, 0, 0, 0, 0, - (1,0): 14, 12, 8, 0, 0, 0, 0, 0, - (2,0): 12, 8, 0, 0, 0, 0, 0, 0, - (3,0): 8, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=4 LENGTH=4 - DATA { - (0,0): 15, 15, 15, 15, 15, 14, 12, 8, - (1,0): 15, 15, 15, 15, 14, 12, 8, 0, - (2,0): 15, 15, 15, 14, 12, 8, 0, 0, - (3,0): 15, 15, 14, 12, 8, 0, 0, 0, - (4,0): 15, 14, 12, 8, 0, 0, 0, 0, - (5,0): 14, 12, 8, 0, 0, 0, 0, 0, - (6,0): 12, 8, 0, 0, 0, 0, 0, 0, - (7,0): 8, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedInt.ddl b/tools/testfiles/tpbitsSignedInt.ddl deleted file mode 100644 index 5c37e77..0000000 --- a/tools/testfiles/tpbitsSignedInt.ddl +++ /dev/null @@ -1,28 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS16BITS" { - DATATYPE H5T_STD_I16LE - DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } - PACKED_BITS OFFSET=0 LENGTH=2 - DATA { - (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=10 LENGTH=6 - DATA { - (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, - (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, - (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, - (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, - (4,0): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, - (5,0): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, - (6,0): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, - (7,0): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedInt4.ddl b/tools/testfiles/tpbitsSignedInt4.ddl deleted file mode 100644 index 4e9f0f6..0000000 --- a/tools/testfiles/tpbitsSignedInt4.ddl +++ /dev/null @@ -1,50 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS16BITS" { - DATATYPE H5T_STD_I16LE - DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } - PACKED_BITS OFFSET=0 LENGTH=4 - DATA { - (0,0): 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=4 LENGTH=4 - DATA { - (0,0): 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=8 LENGTH=4 - DATA { - (0,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, - (1,0): 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, - (2,0): 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, - (3,0): 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, - (4,0): 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=12 LENGTH=4 - DATA { - (0,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, - (1,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, - (2,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, - (3,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, - (4,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, - (5,0): 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, - (6,0): 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, - (7,0): 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedInt8.ddl b/tools/testfiles/tpbitsSignedInt8.ddl deleted file mode 100644 index f2d6069..0000000 --- a/tools/testfiles/tpbitsSignedInt8.ddl +++ /dev/null @@ -1,34 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS16BITS" { - DATATYPE H5T_STD_I16LE - DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } - PACKED_BITS OFFSET=0 LENGTH=8 - DATA { - (0,0): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=8 LENGTH=8 - DATA { - (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, - (0,13): 224, 192, 128, - (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, - (1,13): 192, 128, 0, - (2,0): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, - (2,13): 128, 0, 0, - (3,0): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, - (3,14): 0, 0, - (4,0): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, - (4,14): 0, 0, - (5,0): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, - (5,15): 0, - (6,0): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, - (7,0): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedIntWhole.ddl b/tools/testfiles/tpbitsSignedIntWhole.ddl deleted file mode 100644 index 598c446..0000000 --- a/tools/testfiles/tpbitsSignedIntWhole.ddl +++ /dev/null @@ -1,25 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS16BITS" { - DATATYPE H5T_STD_I16LE - DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } - PACKED_BITS OFFSET=0 LENGTH=16 - DATA { - (0,0): -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, - (0,12): -4096, -8192, -16384, -32768, - (1,0): -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, - (1,12): -8192, -16384, -32768, 0, - (2,0): -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, - (2,11): -8192, -16384, -32768, 0, 0, - (3,0): -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, - (3,11): -16384, -32768, 0, 0, 0, - (4,0): -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, - (4,10): -16384, -32768, 0, 0, 0, 0, - (5,0): -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, - (5,10): -32768, 0, 0, 0, 0, 0, - (6,0): -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, - (6,10): 0, 0, 0, 0, 0, 0, - (7,0): -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, - (7,11): 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedLong.ddl b/tools/testfiles/tpbitsSignedLong.ddl deleted file mode 100644 index b3eba61..0000000 --- a/tools/testfiles/tpbitsSignedLong.ddl +++ /dev/null @@ -1,44 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS32BITS" { - DATATYPE H5T_STD_I32LE - DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } - PACKED_BITS OFFSET=0 LENGTH=2 - DATA { - (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=26 LENGTH=6 - DATA { - (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (0,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, - (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (1,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, - (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (2,17): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, - (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (3,17): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, - (4,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (4,17): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, - (5,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (5,17): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, - (6,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (6,17): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, - (7,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (7,17): 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedLong16.ddl b/tools/testfiles/tpbitsSignedLong16.ddl deleted file mode 100644 index 83fa889..0000000 --- a/tools/testfiles/tpbitsSignedLong16.ddl +++ /dev/null @@ -1,67 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS32BITS" { - DATATYPE H5T_STD_I32LE - DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } - PACKED_BITS OFFSET=0 LENGTH=16 - DATA { - (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, - (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, - (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, - (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, - (1,23): 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, - (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,25): 0, 0, 0, 0, 0, 0, 0, - (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, - (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,26): 0, 0, 0, 0, 0, 0, - (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, - (4,9): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,27): 0, 0, 0, 0, 0, - (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, - (5,9): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,29): 0, 0, 0, - (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, - (6,9): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,30): 0, 0, - (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, - (7,10): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=16 LENGTH=16 - DATA { - (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, - (0,18): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, - (0,27): 63488, 61440, 57344, 49152, 32768, - (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, - (1,18): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, - (1,27): 61440, 57344, 49152, 32768, 0, - (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, - (2,18): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, - (2,27): 57344, 49152, 32768, 0, 0, - (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,9): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, - (3,18): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, - (3,27): 49152, 32768, 0, 0, 0, - (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,9): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, - (4,18): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, - (4,27): 32768, 0, 0, 0, 0, - (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,9): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, - (5,18): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, - (5,28): 0, 0, 0, 0, - (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,9): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, - (6,18): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, - (6,29): 0, 0, 0, - (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,9): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, - (7,18): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, - (7,31): 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedLong8.ddl b/tools/testfiles/tpbitsSignedLong8.ddl deleted file mode 100644 index e99b1d0..0000000 --- a/tools/testfiles/tpbitsSignedLong8.ddl +++ /dev/null @@ -1,96 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS32BITS" { - DATATYPE H5T_STD_I32LE - DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } - PACKED_BITS OFFSET=0 LENGTH=8 - DATA { - (0,0): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,17): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,18): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,18): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,19): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,20): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,20): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=8 LENGTH=8 - DATA { - (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, - (0,13): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, - (1,13): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, - (2,13): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, - (3,14): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, - (4,14): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, - (5,15): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, - (6,16): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, - (7,16): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=16 LENGTH=8 - DATA { - (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (0,13): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, - (0,28): 0, 0, 0, 0, - (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (1,13): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, - (1,28): 0, 0, 0, 0, - (2,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (2,13): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, - (2,29): 0, 0, 0, - (3,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (3,13): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,30): 0, 0, - (4,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (4,13): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,30): 0, 0, - (5,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, - (5,13): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,31): 0, - (6,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, - (6,13): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, - (7,13): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=24 LENGTH=8 - DATA { - (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (0,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, - (0,26): 252, 248, 240, 224, 192, 128, - (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (1,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, - (1,26): 248, 240, 224, 192, 128, 0, - (2,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (2,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, - (2,26): 240, 224, 192, 128, 0, 0, - (3,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (3,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, - (3,26): 224, 192, 128, 0, 0, 0, - (4,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (4,13): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, - (4,26): 192, 128, 0, 0, 0, 0, - (5,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (5,13): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, - (5,26): 128, 0, 0, 0, 0, 0, - (6,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (6,13): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, - (6,26): 0, 0, 0, 0, 0, 0, - (7,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (7,13): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, - (7,27): 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedLongLong.ddl b/tools/testfiles/tpbitsSignedLongLong.ddl deleted file mode 100644 index 2be8a55..0000000 --- a/tools/testfiles/tpbitsSignedLongLong.ddl +++ /dev/null @@ -1,68 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS64BITS" { - DATATYPE H5T_STD_I64LE - DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } - PACKED_BITS OFFSET=0 LENGTH=2 - DATA { - (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=58 LENGTH=6 - DATA { - (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (0,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (0,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (0,49): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, - (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (1,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (1,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (1,49): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, - (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (2,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (2,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (2,49): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, - (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (3,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (3,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (3,49): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, - (4,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (4,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (4,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (4,49): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, - (5,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (5,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (5,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (5,49): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, - (6,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (6,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (6,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (6,49): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, - (7,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (7,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (7,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (7,49): 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedLongLong16.ddl b/tools/testfiles/tpbitsSignedLongLong16.ddl deleted file mode 100644 index 44e336d..0000000 --- a/tools/testfiles/tpbitsSignedLongLong16.ddl +++ /dev/null @@ -1,196 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS64BITS" { - DATATYPE H5T_STD_I64LE - DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } - PACKED_BITS OFFSET=0 LENGTH=16 - DATA { - (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, - (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, - (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, - (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, - (1,23): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,45): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, - (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,25): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,47): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, - (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,26): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,48): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, - (4,9): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,27): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, - (5,9): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,29): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, - (6,9): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,30): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,52): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, - (7,10): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,32): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,54): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=16 LENGTH=16 - DATA { - (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, - (0,18): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, - (0,27): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, - (1,18): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, - (1,27): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, - (2,18): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, - (2,27): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,45): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,9): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, - (3,18): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, - (3,27): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,9): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, - (4,18): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, - (4,27): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,48): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,9): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, - (5,18): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, - (5,28): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,50): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,9): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, - (6,18): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, - (6,29): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,9): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, - (7,18): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, - (7,31): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,53): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=32 LENGTH=16 - DATA { - (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,27): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, - (0,36): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, - (0,45): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,63): 0, - (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,27): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, - (1,36): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, - (1,45): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,27): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, - (2,36): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, - (2,45): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,27): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, - (3,36): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, - (3,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,27): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, - (4,36): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, - (4,47): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,27): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, - (5,36): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, - (5,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,27): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, - (6,36): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, - (6,50): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, - (7,27): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, - (7,36): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=48 LENGTH=16 - DATA { - (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,45): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, - (0,54): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, - (0,63): 32768, - (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,45): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, - (1,54): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, - (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,45): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, - (2,54): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, - (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,45): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, - (3,54): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, - (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,45): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, - (4,54): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, - (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, - (5,45): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, - (5,54): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, - (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, - (6,45): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, - (6,54): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, - (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,36): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, - (7,45): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, - (7,54): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedLongLong32.ddl b/tools/testfiles/tpbitsSignedLongLong32.ddl deleted file mode 100644 index 6ab4ac4..0000000 --- a/tools/testfiles/tpbitsSignedLongLong32.ddl +++ /dev/null @@ -1,175 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS64BITS" { - DATATYPE H5T_STD_I64LE - DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } - PACKED_BITS OFFSET=0 LENGTH=32 - DATA { - (0,0): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, - (0,5): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, - (0,10): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, - (0,15): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, - (0,20): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, - (0,25): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, - (0,30): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, - (1,5): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, - (1,10): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, - (1,15): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, - (1,20): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, - (1,25): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, - (1,30): 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, - (2,5): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, - (2,10): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, - (2,15): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, - (2,20): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, - (2,25): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, - (2,32): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,54): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, - (3,5): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, - (3,10): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, - (3,15): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, - (3,20): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, - (3,25): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, - (3,35): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,57): 0, 0, 0, 0, 0, 0, 0, - (4,0): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, - (4,5): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, - (4,10): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, - (4,15): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, - (4,20): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, - (4,25): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,38): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,60): 0, 0, 0, 0, - (5,0): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, - (5,5): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, - (5,10): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, - (5,15): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, - (5,20): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, - (5,25): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,41): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,63): 0, - (6,0): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, - (6,5): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, - (6,10): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, - (6,15): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, - (6,20): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, - (6,25): 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, - (7,5): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, - (7,10): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, - (7,15): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, - (7,20): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, - (7,27): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=32 LENGTH=32 - DATA { - (0,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (0,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (0,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (0,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (0,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (0,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (0,30): 4294967295, 4294967295, 4294967295, 4294967294, 4294967292, - (0,35): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, - (0,40): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, - (0,45): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, - (0,50): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, - (0,55): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, - (0,60): 4026531840, 3758096384, 3221225472, 2147483648, - (1,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (1,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (1,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (1,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (1,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (1,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (1,30): 4294967295, 4294967295, 4294967294, 4294967292, 4294967288, - (1,35): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, - (1,40): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, - (1,45): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, - (1,50): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, - (1,55): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, - (1,60): 3758096384, 3221225472, 2147483648, 0, - (2,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (2,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (2,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (2,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (2,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (2,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (2,30): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, - (2,35): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, - (2,40): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, - (2,45): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, - (2,50): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, - (2,55): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, - (2,60): 3221225472, 2147483648, 0, 0, - (3,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (3,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (3,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (3,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (3,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (3,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (3,30): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, - (3,35): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, - (3,40): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, - (3,45): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, - (3,50): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, - (3,55): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, - (3,60): 2147483648, 0, 0, 0, - (4,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (4,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (4,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (4,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (4,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (4,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967294, - (4,30): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, - (4,35): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, - (4,40): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, - (4,45): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, - (4,50): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, - (4,55): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, - (4,62): 0, 0, - (5,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (5,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (5,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (5,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (5,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (5,25): 4294967295, 4294967295, 4294967295, 4294967294, 4294967292, - (5,30): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, - (5,35): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, - (5,40): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, - (5,45): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, - (5,50): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, - (5,55): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, - (6,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (6,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (6,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (6,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (6,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (6,25): 4294967295, 4294967295, 4294967294, 4294967292, 4294967288, - (6,30): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, - (6,35): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, - (6,40): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, - (6,45): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, - (6,50): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, - (6,55): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, - (7,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (7,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (7,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (7,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (7,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (7,25): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, - (7,30): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, - (7,35): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, - (7,40): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, - (7,45): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, - (7,50): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, - (7,55): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedLongLongWhole.ddl b/tools/testfiles/tpbitsSignedLongLongWhole.ddl deleted file mode 100644 index 134f3be..0000000 --- a/tools/testfiles/tpbitsSignedLongLongWhole.ddl +++ /dev/null @@ -1,121 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS64BITS" { - DATATYPE H5T_STD_I64LE - DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } - PACKED_BITS OFFSET=0 LENGTH=64 - DATA { - (0,0): -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, - (0,12): -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, - (0,20): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, - (0,26): -67108864, -134217728, -268435456, -536870912, -1073741824, - (0,31): -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, - (0,36): -68719476736, -137438953472, -274877906944, -549755813888, - (0,40): -1099511627776, -2199023255552, -4398046511104, -8796093022208, - (0,44): -17592186044416, -35184372088832, -70368744177664, - (0,47): -140737488355328, -281474976710656, -562949953421312, - (0,50): -1125899906842624, -2251799813685248, -4503599627370496, - (0,53): -9007199254740992, -18014398509481984, -36028797018963968, - (0,56): -72057594037927936, -144115188075855872, -288230376151711744, - (0,59): -576460752303423488, -1152921504606846976, -2305843009213693952, - (0,62): -4611686018427387904, -9223372036854775808, - (1,0): -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, - (1,12): -8192, -16384, -32768, -65536, -131072, -262144, -524288, - (1,19): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, - (1,25): -67108864, -134217728, -268435456, -536870912, -1073741824, - (1,30): -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, - (1,35): -68719476736, -137438953472, -274877906944, -549755813888, - (1,39): -1099511627776, -2199023255552, -4398046511104, -8796093022208, - (1,43): -17592186044416, -35184372088832, -70368744177664, - (1,46): -140737488355328, -281474976710656, -562949953421312, - (1,49): -1125899906842624, -2251799813685248, -4503599627370496, - (1,52): -9007199254740992, -18014398509481984, -36028797018963968, - (1,55): -72057594037927936, -144115188075855872, -288230376151711744, - (1,58): -576460752303423488, -1152921504606846976, -2305843009213693952, - (1,61): -4611686018427387904, -9223372036854775808, 0, - (2,0): -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, - (2,11): -8192, -16384, -32768, -65536, -131072, -262144, -524288, - (2,18): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, - (2,24): -67108864, -134217728, -268435456, -536870912, -1073741824, - (2,29): -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, - (2,34): -68719476736, -137438953472, -274877906944, -549755813888, - (2,38): -1099511627776, -2199023255552, -4398046511104, -8796093022208, - (2,42): -17592186044416, -35184372088832, -70368744177664, - (2,45): -140737488355328, -281474976710656, -562949953421312, - (2,48): -1125899906842624, -2251799813685248, -4503599627370496, - (2,51): -9007199254740992, -18014398509481984, -36028797018963968, - (2,54): -72057594037927936, -144115188075855872, -288230376151711744, - (2,57): -576460752303423488, -1152921504606846976, -2305843009213693952, - (2,60): -4611686018427387904, -9223372036854775808, 0, 0, - (3,0): -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, - (3,11): -16384, -32768, -65536, -131072, -262144, -524288, -1048576, - (3,18): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, - (3,24): -134217728, -268435456, -536870912, -1073741824, -2147483648, - (3,29): -4294967296, -8589934592, -17179869184, -34359738368, - (3,33): -68719476736, -137438953472, -274877906944, -549755813888, - (3,37): -1099511627776, -2199023255552, -4398046511104, -8796093022208, - (3,41): -17592186044416, -35184372088832, -70368744177664, - (3,44): -140737488355328, -281474976710656, -562949953421312, - (3,47): -1125899906842624, -2251799813685248, -4503599627370496, - (3,50): -9007199254740992, -18014398509481984, -36028797018963968, - (3,53): -72057594037927936, -144115188075855872, -288230376151711744, - (3,56): -576460752303423488, -1152921504606846976, -2305843009213693952, - (3,59): -4611686018427387904, -9223372036854775808, 0, 0, 0, - (4,0): -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, - (4,10): -16384, -32768, -65536, -131072, -262144, -524288, -1048576, - (4,17): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, - (4,23): -134217728, -268435456, -536870912, -1073741824, -2147483648, - (4,28): -4294967296, -8589934592, -17179869184, -34359738368, - (4,32): -68719476736, -137438953472, -274877906944, -549755813888, - (4,36): -1099511627776, -2199023255552, -4398046511104, -8796093022208, - (4,40): -17592186044416, -35184372088832, -70368744177664, - (4,43): -140737488355328, -281474976710656, -562949953421312, - (4,46): -1125899906842624, -2251799813685248, -4503599627370496, - (4,49): -9007199254740992, -18014398509481984, -36028797018963968, - (4,52): -72057594037927936, -144115188075855872, -288230376151711744, - (4,55): -576460752303423488, -1152921504606846976, -2305843009213693952, - (4,58): -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, - (5,0): -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, - (5,10): -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, - (5,17): -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, - (5,23): -268435456, -536870912, -1073741824, -2147483648, -4294967296, - (5,28): -8589934592, -17179869184, -34359738368, -68719476736, - (5,32): -137438953472, -274877906944, -549755813888, -1099511627776, - (5,36): -2199023255552, -4398046511104, -8796093022208, -17592186044416, - (5,40): -35184372088832, -70368744177664, -140737488355328, - (5,43): -281474976710656, -562949953421312, -1125899906842624, - (5,46): -2251799813685248, -4503599627370496, -9007199254740992, - (5,49): -18014398509481984, -36028797018963968, -72057594037927936, - (5,52): -144115188075855872, -288230376151711744, -576460752303423488, - (5,55): -1152921504606846976, -2305843009213693952, -4611686018427387904, - (5,58): -9223372036854775808, 0, 0, 0, 0, 0, - (6,0): -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, - (6,10): -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, - (6,17): -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, - (6,23): -536870912, -1073741824, -2147483648, -4294967296, -8589934592, - (6,28): -17179869184, -34359738368, -68719476736, -137438953472, - (6,32): -274877906944, -549755813888, -1099511627776, -2199023255552, - (6,36): -4398046511104, -8796093022208, -17592186044416, -35184372088832, - (6,40): -70368744177664, -140737488355328, -281474976710656, - (6,43): -562949953421312, -1125899906842624, -2251799813685248, - (6,46): -4503599627370496, -9007199254740992, -18014398509481984, - (6,49): -36028797018963968, -72057594037927936, -144115188075855872, - (6,52): -288230376151711744, -576460752303423488, -1152921504606846976, - (6,55): -2305843009213693952, -4611686018427387904, -9223372036854775808, - (6,58): 0, 0, 0, 0, 0, 0, - (7,0): -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, - (7,9): -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, - (7,16): -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, - (7,22): -536870912, -1073741824, -2147483648, -4294967296, -8589934592, - (7,27): -17179869184, -34359738368, -68719476736, -137438953472, - (7,31): -274877906944, -549755813888, -1099511627776, -2199023255552, - (7,35): -4398046511104, -8796093022208, -17592186044416, -35184372088832, - (7,39): -70368744177664, -140737488355328, -281474976710656, - (7,42): -562949953421312, -1125899906842624, -2251799813685248, - (7,45): -4503599627370496, -9007199254740992, -18014398509481984, - (7,48): -36028797018963968, -72057594037927936, -144115188075855872, - (7,51): -288230376151711744, -576460752303423488, -1152921504606846976, - (7,54): -2305843009213693952, -4611686018427387904, -9223372036854775808, - (7,57): 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedLongLongWhole1.ddl b/tools/testfiles/tpbitsSignedLongLongWhole1.ddl deleted file mode 100644 index 7431670..0000000 --- a/tools/testfiles/tpbitsSignedLongLongWhole1.ddl +++ /dev/null @@ -1,175 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS64BITS" { - DATATYPE H5T_STD_I64LE - DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } - PACKED_BITS OFFSET=1 LENGTH=63 - DATA { - (0,0): 9223372036854775807, 9223372036854775807, 9223372036854775806, - (0,3): 9223372036854775804, 9223372036854775800, 9223372036854775792, - (0,6): 9223372036854775776, 9223372036854775744, 9223372036854775680, - (0,9): 9223372036854775552, 9223372036854775296, 9223372036854774784, - (0,12): 9223372036854773760, 9223372036854771712, 9223372036854767616, - (0,15): 9223372036854759424, 9223372036854743040, 9223372036854710272, - (0,18): 9223372036854644736, 9223372036854513664, 9223372036854251520, - (0,21): 9223372036853727232, 9223372036852678656, 9223372036850581504, - (0,24): 9223372036846387200, 9223372036837998592, 9223372036821221376, - (0,27): 9223372036787666944, 9223372036720558080, 9223372036586340352, - (0,30): 9223372036317904896, 9223372035781033984, 9223372034707292160, - (0,33): 9223372032559808512, 9223372028264841216, 9223372019674906624, - (0,36): 9223372002495037440, 9223371968135299072, 9223371899415822336, - (0,39): 9223371761976868864, 9223371487098961920, 9223370937343148032, - (0,42): 9223369837831520256, 9223367638808264704, 9223363240761753600, - (0,45): 9223354444668731392, 9223336852482686976, 9223301668110598144, - (0,48): 9223231299366420480, 9223090561878065152, 9222809086901354496, - (0,51): 9222246136947933184, 9221120237041090560, 9218868437227405312, - (0,54): 9214364837600034816, 9205357638345293824, 9187343239835811840, - (0,57): 9151314442816847872, 9079256848778919936, 8935141660703064064, - (0,60): 8646911284551352320, 8070450532247928832, 6917529027641081856, - (0,63): 4611686018427387904, - (1,0): 9223372036854775807, 9223372036854775806, 9223372036854775804, - (1,3): 9223372036854775800, 9223372036854775792, 9223372036854775776, - (1,6): 9223372036854775744, 9223372036854775680, 9223372036854775552, - (1,9): 9223372036854775296, 9223372036854774784, 9223372036854773760, - (1,12): 9223372036854771712, 9223372036854767616, 9223372036854759424, - (1,15): 9223372036854743040, 9223372036854710272, 9223372036854644736, - (1,18): 9223372036854513664, 9223372036854251520, 9223372036853727232, - (1,21): 9223372036852678656, 9223372036850581504, 9223372036846387200, - (1,24): 9223372036837998592, 9223372036821221376, 9223372036787666944, - (1,27): 9223372036720558080, 9223372036586340352, 9223372036317904896, - (1,30): 9223372035781033984, 9223372034707292160, 9223372032559808512, - (1,33): 9223372028264841216, 9223372019674906624, 9223372002495037440, - (1,36): 9223371968135299072, 9223371899415822336, 9223371761976868864, - (1,39): 9223371487098961920, 9223370937343148032, 9223369837831520256, - (1,42): 9223367638808264704, 9223363240761753600, 9223354444668731392, - (1,45): 9223336852482686976, 9223301668110598144, 9223231299366420480, - (1,48): 9223090561878065152, 9222809086901354496, 9222246136947933184, - (1,51): 9221120237041090560, 9218868437227405312, 9214364837600034816, - (1,54): 9205357638345293824, 9187343239835811840, 9151314442816847872, - (1,57): 9079256848778919936, 8935141660703064064, 8646911284551352320, - (1,60): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, - (2,0): 9223372036854775806, 9223372036854775804, 9223372036854775800, - (2,3): 9223372036854775792, 9223372036854775776, 9223372036854775744, - (2,6): 9223372036854775680, 9223372036854775552, 9223372036854775296, - (2,9): 9223372036854774784, 9223372036854773760, 9223372036854771712, - (2,12): 9223372036854767616, 9223372036854759424, 9223372036854743040, - (2,15): 9223372036854710272, 9223372036854644736, 9223372036854513664, - (2,18): 9223372036854251520, 9223372036853727232, 9223372036852678656, - (2,21): 9223372036850581504, 9223372036846387200, 9223372036837998592, - (2,24): 9223372036821221376, 9223372036787666944, 9223372036720558080, - (2,27): 9223372036586340352, 9223372036317904896, 9223372035781033984, - (2,30): 9223372034707292160, 9223372032559808512, 9223372028264841216, - (2,33): 9223372019674906624, 9223372002495037440, 9223371968135299072, - (2,36): 9223371899415822336, 9223371761976868864, 9223371487098961920, - (2,39): 9223370937343148032, 9223369837831520256, 9223367638808264704, - (2,42): 9223363240761753600, 9223354444668731392, 9223336852482686976, - (2,45): 9223301668110598144, 9223231299366420480, 9223090561878065152, - (2,48): 9222809086901354496, 9222246136947933184, 9221120237041090560, - (2,51): 9218868437227405312, 9214364837600034816, 9205357638345293824, - (2,54): 9187343239835811840, 9151314442816847872, 9079256848778919936, - (2,57): 8935141660703064064, 8646911284551352320, 8070450532247928832, - (2,60): 6917529027641081856, 4611686018427387904, 0, 0, - (3,0): 9223372036854775804, 9223372036854775800, 9223372036854775792, - (3,3): 9223372036854775776, 9223372036854775744, 9223372036854775680, - (3,6): 9223372036854775552, 9223372036854775296, 9223372036854774784, - (3,9): 9223372036854773760, 9223372036854771712, 9223372036854767616, - (3,12): 9223372036854759424, 9223372036854743040, 9223372036854710272, - (3,15): 9223372036854644736, 9223372036854513664, 9223372036854251520, - (3,18): 9223372036853727232, 9223372036852678656, 9223372036850581504, - (3,21): 9223372036846387200, 9223372036837998592, 9223372036821221376, - (3,24): 9223372036787666944, 9223372036720558080, 9223372036586340352, - (3,27): 9223372036317904896, 9223372035781033984, 9223372034707292160, - (3,30): 9223372032559808512, 9223372028264841216, 9223372019674906624, - (3,33): 9223372002495037440, 9223371968135299072, 9223371899415822336, - (3,36): 9223371761976868864, 9223371487098961920, 9223370937343148032, - (3,39): 9223369837831520256, 9223367638808264704, 9223363240761753600, - (3,42): 9223354444668731392, 9223336852482686976, 9223301668110598144, - (3,45): 9223231299366420480, 9223090561878065152, 9222809086901354496, - (3,48): 9222246136947933184, 9221120237041090560, 9218868437227405312, - (3,51): 9214364837600034816, 9205357638345293824, 9187343239835811840, - (3,54): 9151314442816847872, 9079256848778919936, 8935141660703064064, - (3,57): 8646911284551352320, 8070450532247928832, 6917529027641081856, - (3,60): 4611686018427387904, 0, 0, 0, - (4,0): 9223372036854775800, 9223372036854775792, 9223372036854775776, - (4,3): 9223372036854775744, 9223372036854775680, 9223372036854775552, - (4,6): 9223372036854775296, 9223372036854774784, 9223372036854773760, - (4,9): 9223372036854771712, 9223372036854767616, 9223372036854759424, - (4,12): 9223372036854743040, 9223372036854710272, 9223372036854644736, - (4,15): 9223372036854513664, 9223372036854251520, 9223372036853727232, - (4,18): 9223372036852678656, 9223372036850581504, 9223372036846387200, - (4,21): 9223372036837998592, 9223372036821221376, 9223372036787666944, - (4,24): 9223372036720558080, 9223372036586340352, 9223372036317904896, - (4,27): 9223372035781033984, 9223372034707292160, 9223372032559808512, - (4,30): 9223372028264841216, 9223372019674906624, 9223372002495037440, - (4,33): 9223371968135299072, 9223371899415822336, 9223371761976868864, - (4,36): 9223371487098961920, 9223370937343148032, 9223369837831520256, - (4,39): 9223367638808264704, 9223363240761753600, 9223354444668731392, - (4,42): 9223336852482686976, 9223301668110598144, 9223231299366420480, - (4,45): 9223090561878065152, 9222809086901354496, 9222246136947933184, - (4,48): 9221120237041090560, 9218868437227405312, 9214364837600034816, - (4,51): 9205357638345293824, 9187343239835811840, 9151314442816847872, - (4,54): 9079256848778919936, 8935141660703064064, 8646911284551352320, - (4,57): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, - (4,61): 0, 0, 0, - (5,0): 9223372036854775792, 9223372036854775776, 9223372036854775744, - (5,3): 9223372036854775680, 9223372036854775552, 9223372036854775296, - (5,6): 9223372036854774784, 9223372036854773760, 9223372036854771712, - (5,9): 9223372036854767616, 9223372036854759424, 9223372036854743040, - (5,12): 9223372036854710272, 9223372036854644736, 9223372036854513664, - (5,15): 9223372036854251520, 9223372036853727232, 9223372036852678656, - (5,18): 9223372036850581504, 9223372036846387200, 9223372036837998592, - (5,21): 9223372036821221376, 9223372036787666944, 9223372036720558080, - (5,24): 9223372036586340352, 9223372036317904896, 9223372035781033984, - (5,27): 9223372034707292160, 9223372032559808512, 9223372028264841216, - (5,30): 9223372019674906624, 9223372002495037440, 9223371968135299072, - (5,33): 9223371899415822336, 9223371761976868864, 9223371487098961920, - (5,36): 9223370937343148032, 9223369837831520256, 9223367638808264704, - (5,39): 9223363240761753600, 9223354444668731392, 9223336852482686976, - (5,42): 9223301668110598144, 9223231299366420480, 9223090561878065152, - (5,45): 9222809086901354496, 9222246136947933184, 9221120237041090560, - (5,48): 9218868437227405312, 9214364837600034816, 9205357638345293824, - (5,51): 9187343239835811840, 9151314442816847872, 9079256848778919936, - (5,54): 8935141660703064064, 8646911284551352320, 8070450532247928832, - (5,57): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0, - (6,0): 9223372036854775776, 9223372036854775744, 9223372036854775680, - (6,3): 9223372036854775552, 9223372036854775296, 9223372036854774784, - (6,6): 9223372036854773760, 9223372036854771712, 9223372036854767616, - (6,9): 9223372036854759424, 9223372036854743040, 9223372036854710272, - (6,12): 9223372036854644736, 9223372036854513664, 9223372036854251520, - (6,15): 9223372036853727232, 9223372036852678656, 9223372036850581504, - (6,18): 9223372036846387200, 9223372036837998592, 9223372036821221376, - (6,21): 9223372036787666944, 9223372036720558080, 9223372036586340352, - (6,24): 9223372036317904896, 9223372035781033984, 9223372034707292160, - (6,27): 9223372032559808512, 9223372028264841216, 9223372019674906624, - (6,30): 9223372002495037440, 9223371968135299072, 9223371899415822336, - (6,33): 9223371761976868864, 9223371487098961920, 9223370937343148032, - (6,36): 9223369837831520256, 9223367638808264704, 9223363240761753600, - (6,39): 9223354444668731392, 9223336852482686976, 9223301668110598144, - (6,42): 9223231299366420480, 9223090561878065152, 9222809086901354496, - (6,45): 9222246136947933184, 9221120237041090560, 9218868437227405312, - (6,48): 9214364837600034816, 9205357638345293824, 9187343239835811840, - (6,51): 9151314442816847872, 9079256848778919936, 8935141660703064064, - (6,54): 8646911284551352320, 8070450532247928832, 6917529027641081856, - (6,57): 4611686018427387904, 0, 0, 0, 0, 0, 0, - (7,0): 9223372036854775744, 9223372036854775680, 9223372036854775552, - (7,3): 9223372036854775296, 9223372036854774784, 9223372036854773760, - (7,6): 9223372036854771712, 9223372036854767616, 9223372036854759424, - (7,9): 9223372036854743040, 9223372036854710272, 9223372036854644736, - (7,12): 9223372036854513664, 9223372036854251520, 9223372036853727232, - (7,15): 9223372036852678656, 9223372036850581504, 9223372036846387200, - (7,18): 9223372036837998592, 9223372036821221376, 9223372036787666944, - (7,21): 9223372036720558080, 9223372036586340352, 9223372036317904896, - (7,24): 9223372035781033984, 9223372034707292160, 9223372032559808512, - (7,27): 9223372028264841216, 9223372019674906624, 9223372002495037440, - (7,30): 9223371968135299072, 9223371899415822336, 9223371761976868864, - (7,33): 9223371487098961920, 9223370937343148032, 9223369837831520256, - (7,36): 9223367638808264704, 9223363240761753600, 9223354444668731392, - (7,39): 9223336852482686976, 9223301668110598144, 9223231299366420480, - (7,42): 9223090561878065152, 9222809086901354496, 9222246136947933184, - (7,45): 9221120237041090560, 9218868437227405312, 9214364837600034816, - (7,48): 9205357638345293824, 9187343239835811840, 9151314442816847872, - (7,51): 9079256848778919936, 8935141660703064064, 8646911284551352320, - (7,54): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, - (7,58): 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedLongLongWhole63.ddl b/tools/testfiles/tpbitsSignedLongLongWhole63.ddl deleted file mode 100644 index c7cc65f..0000000 --- a/tools/testfiles/tpbitsSignedLongLongWhole63.ddl +++ /dev/null @@ -1,172 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS64BITS" { - DATATYPE H5T_STD_I64LE - DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } - PACKED_BITS OFFSET=0 LENGTH=63 - DATA { - (0,0): 9223372036854775807, 9223372036854775806, 9223372036854775804, - (0,3): 9223372036854775800, 9223372036854775792, 9223372036854775776, - (0,6): 9223372036854775744, 9223372036854775680, 9223372036854775552, - (0,9): 9223372036854775296, 9223372036854774784, 9223372036854773760, - (0,12): 9223372036854771712, 9223372036854767616, 9223372036854759424, - (0,15): 9223372036854743040, 9223372036854710272, 9223372036854644736, - (0,18): 9223372036854513664, 9223372036854251520, 9223372036853727232, - (0,21): 9223372036852678656, 9223372036850581504, 9223372036846387200, - (0,24): 9223372036837998592, 9223372036821221376, 9223372036787666944, - (0,27): 9223372036720558080, 9223372036586340352, 9223372036317904896, - (0,30): 9223372035781033984, 9223372034707292160, 9223372032559808512, - (0,33): 9223372028264841216, 9223372019674906624, 9223372002495037440, - (0,36): 9223371968135299072, 9223371899415822336, 9223371761976868864, - (0,39): 9223371487098961920, 9223370937343148032, 9223369837831520256, - (0,42): 9223367638808264704, 9223363240761753600, 9223354444668731392, - (0,45): 9223336852482686976, 9223301668110598144, 9223231299366420480, - (0,48): 9223090561878065152, 9222809086901354496, 9222246136947933184, - (0,51): 9221120237041090560, 9218868437227405312, 9214364837600034816, - (0,54): 9205357638345293824, 9187343239835811840, 9151314442816847872, - (0,57): 9079256848778919936, 8935141660703064064, 8646911284551352320, - (0,60): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, - (1,0): 9223372036854775806, 9223372036854775804, 9223372036854775800, - (1,3): 9223372036854775792, 9223372036854775776, 9223372036854775744, - (1,6): 9223372036854775680, 9223372036854775552, 9223372036854775296, - (1,9): 9223372036854774784, 9223372036854773760, 9223372036854771712, - (1,12): 9223372036854767616, 9223372036854759424, 9223372036854743040, - (1,15): 9223372036854710272, 9223372036854644736, 9223372036854513664, - (1,18): 9223372036854251520, 9223372036853727232, 9223372036852678656, - (1,21): 9223372036850581504, 9223372036846387200, 9223372036837998592, - (1,24): 9223372036821221376, 9223372036787666944, 9223372036720558080, - (1,27): 9223372036586340352, 9223372036317904896, 9223372035781033984, - (1,30): 9223372034707292160, 9223372032559808512, 9223372028264841216, - (1,33): 9223372019674906624, 9223372002495037440, 9223371968135299072, - (1,36): 9223371899415822336, 9223371761976868864, 9223371487098961920, - (1,39): 9223370937343148032, 9223369837831520256, 9223367638808264704, - (1,42): 9223363240761753600, 9223354444668731392, 9223336852482686976, - (1,45): 9223301668110598144, 9223231299366420480, 9223090561878065152, - (1,48): 9222809086901354496, 9222246136947933184, 9221120237041090560, - (1,51): 9218868437227405312, 9214364837600034816, 9205357638345293824, - (1,54): 9187343239835811840, 9151314442816847872, 9079256848778919936, - (1,57): 8935141660703064064, 8646911284551352320, 8070450532247928832, - (1,60): 6917529027641081856, 4611686018427387904, 0, 0, - (2,0): 9223372036854775804, 9223372036854775800, 9223372036854775792, - (2,3): 9223372036854775776, 9223372036854775744, 9223372036854775680, - (2,6): 9223372036854775552, 9223372036854775296, 9223372036854774784, - (2,9): 9223372036854773760, 9223372036854771712, 9223372036854767616, - (2,12): 9223372036854759424, 9223372036854743040, 9223372036854710272, - (2,15): 9223372036854644736, 9223372036854513664, 9223372036854251520, - (2,18): 9223372036853727232, 9223372036852678656, 9223372036850581504, - (2,21): 9223372036846387200, 9223372036837998592, 9223372036821221376, - (2,24): 9223372036787666944, 9223372036720558080, 9223372036586340352, - (2,27): 9223372036317904896, 9223372035781033984, 9223372034707292160, - (2,30): 9223372032559808512, 9223372028264841216, 9223372019674906624, - (2,33): 9223372002495037440, 9223371968135299072, 9223371899415822336, - (2,36): 9223371761976868864, 9223371487098961920, 9223370937343148032, - (2,39): 9223369837831520256, 9223367638808264704, 9223363240761753600, - (2,42): 9223354444668731392, 9223336852482686976, 9223301668110598144, - (2,45): 9223231299366420480, 9223090561878065152, 9222809086901354496, - (2,48): 9222246136947933184, 9221120237041090560, 9218868437227405312, - (2,51): 9214364837600034816, 9205357638345293824, 9187343239835811840, - (2,54): 9151314442816847872, 9079256848778919936, 8935141660703064064, - (2,57): 8646911284551352320, 8070450532247928832, 6917529027641081856, - (2,60): 4611686018427387904, 0, 0, 0, - (3,0): 9223372036854775800, 9223372036854775792, 9223372036854775776, - (3,3): 9223372036854775744, 9223372036854775680, 9223372036854775552, - (3,6): 9223372036854775296, 9223372036854774784, 9223372036854773760, - (3,9): 9223372036854771712, 9223372036854767616, 9223372036854759424, - (3,12): 9223372036854743040, 9223372036854710272, 9223372036854644736, - (3,15): 9223372036854513664, 9223372036854251520, 9223372036853727232, - (3,18): 9223372036852678656, 9223372036850581504, 9223372036846387200, - (3,21): 9223372036837998592, 9223372036821221376, 9223372036787666944, - (3,24): 9223372036720558080, 9223372036586340352, 9223372036317904896, - (3,27): 9223372035781033984, 9223372034707292160, 9223372032559808512, - (3,30): 9223372028264841216, 9223372019674906624, 9223372002495037440, - (3,33): 9223371968135299072, 9223371899415822336, 9223371761976868864, - (3,36): 9223371487098961920, 9223370937343148032, 9223369837831520256, - (3,39): 9223367638808264704, 9223363240761753600, 9223354444668731392, - (3,42): 9223336852482686976, 9223301668110598144, 9223231299366420480, - (3,45): 9223090561878065152, 9222809086901354496, 9222246136947933184, - (3,48): 9221120237041090560, 9218868437227405312, 9214364837600034816, - (3,51): 9205357638345293824, 9187343239835811840, 9151314442816847872, - (3,54): 9079256848778919936, 8935141660703064064, 8646911284551352320, - (3,57): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, - (3,61): 0, 0, 0, - (4,0): 9223372036854775792, 9223372036854775776, 9223372036854775744, - (4,3): 9223372036854775680, 9223372036854775552, 9223372036854775296, - (4,6): 9223372036854774784, 9223372036854773760, 9223372036854771712, - (4,9): 9223372036854767616, 9223372036854759424, 9223372036854743040, - (4,12): 9223372036854710272, 9223372036854644736, 9223372036854513664, - (4,15): 9223372036854251520, 9223372036853727232, 9223372036852678656, - (4,18): 9223372036850581504, 9223372036846387200, 9223372036837998592, - (4,21): 9223372036821221376, 9223372036787666944, 9223372036720558080, - (4,24): 9223372036586340352, 9223372036317904896, 9223372035781033984, - (4,27): 9223372034707292160, 9223372032559808512, 9223372028264841216, - (4,30): 9223372019674906624, 9223372002495037440, 9223371968135299072, - (4,33): 9223371899415822336, 9223371761976868864, 9223371487098961920, - (4,36): 9223370937343148032, 9223369837831520256, 9223367638808264704, - (4,39): 9223363240761753600, 9223354444668731392, 9223336852482686976, - (4,42): 9223301668110598144, 9223231299366420480, 9223090561878065152, - (4,45): 9222809086901354496, 9222246136947933184, 9221120237041090560, - (4,48): 9218868437227405312, 9214364837600034816, 9205357638345293824, - (4,51): 9187343239835811840, 9151314442816847872, 9079256848778919936, - (4,54): 8935141660703064064, 8646911284551352320, 8070450532247928832, - (4,57): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0, - (5,0): 9223372036854775776, 9223372036854775744, 9223372036854775680, - (5,3): 9223372036854775552, 9223372036854775296, 9223372036854774784, - (5,6): 9223372036854773760, 9223372036854771712, 9223372036854767616, - (5,9): 9223372036854759424, 9223372036854743040, 9223372036854710272, - (5,12): 9223372036854644736, 9223372036854513664, 9223372036854251520, - (5,15): 9223372036853727232, 9223372036852678656, 9223372036850581504, - (5,18): 9223372036846387200, 9223372036837998592, 9223372036821221376, - (5,21): 9223372036787666944, 9223372036720558080, 9223372036586340352, - (5,24): 9223372036317904896, 9223372035781033984, 9223372034707292160, - (5,27): 9223372032559808512, 9223372028264841216, 9223372019674906624, - (5,30): 9223372002495037440, 9223371968135299072, 9223371899415822336, - (5,33): 9223371761976868864, 9223371487098961920, 9223370937343148032, - (5,36): 9223369837831520256, 9223367638808264704, 9223363240761753600, - (5,39): 9223354444668731392, 9223336852482686976, 9223301668110598144, - (5,42): 9223231299366420480, 9223090561878065152, 9222809086901354496, - (5,45): 9222246136947933184, 9221120237041090560, 9218868437227405312, - (5,48): 9214364837600034816, 9205357638345293824, 9187343239835811840, - (5,51): 9151314442816847872, 9079256848778919936, 8935141660703064064, - (5,54): 8646911284551352320, 8070450532247928832, 6917529027641081856, - (5,57): 4611686018427387904, 0, 0, 0, 0, 0, 0, - (6,0): 9223372036854775744, 9223372036854775680, 9223372036854775552, - (6,3): 9223372036854775296, 9223372036854774784, 9223372036854773760, - (6,6): 9223372036854771712, 9223372036854767616, 9223372036854759424, - (6,9): 9223372036854743040, 9223372036854710272, 9223372036854644736, - (6,12): 9223372036854513664, 9223372036854251520, 9223372036853727232, - (6,15): 9223372036852678656, 9223372036850581504, 9223372036846387200, - (6,18): 9223372036837998592, 9223372036821221376, 9223372036787666944, - (6,21): 9223372036720558080, 9223372036586340352, 9223372036317904896, - (6,24): 9223372035781033984, 9223372034707292160, 9223372032559808512, - (6,27): 9223372028264841216, 9223372019674906624, 9223372002495037440, - (6,30): 9223371968135299072, 9223371899415822336, 9223371761976868864, - (6,33): 9223371487098961920, 9223370937343148032, 9223369837831520256, - (6,36): 9223367638808264704, 9223363240761753600, 9223354444668731392, - (6,39): 9223336852482686976, 9223301668110598144, 9223231299366420480, - (6,42): 9223090561878065152, 9222809086901354496, 9222246136947933184, - (6,45): 9221120237041090560, 9218868437227405312, 9214364837600034816, - (6,48): 9205357638345293824, 9187343239835811840, 9151314442816847872, - (6,51): 9079256848778919936, 8935141660703064064, 8646911284551352320, - (6,54): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, - (6,58): 0, 0, 0, 0, 0, 0, - (7,0): 9223372036854775680, 9223372036854775552, 9223372036854775296, - (7,3): 9223372036854774784, 9223372036854773760, 9223372036854771712, - (7,6): 9223372036854767616, 9223372036854759424, 9223372036854743040, - (7,9): 9223372036854710272, 9223372036854644736, 9223372036854513664, - (7,12): 9223372036854251520, 9223372036853727232, 9223372036852678656, - (7,15): 9223372036850581504, 9223372036846387200, 9223372036837998592, - (7,18): 9223372036821221376, 9223372036787666944, 9223372036720558080, - (7,21): 9223372036586340352, 9223372036317904896, 9223372035781033984, - (7,24): 9223372034707292160, 9223372032559808512, 9223372028264841216, - (7,27): 9223372019674906624, 9223372002495037440, 9223371968135299072, - (7,30): 9223371899415822336, 9223371761976868864, 9223371487098961920, - (7,33): 9223370937343148032, 9223369837831520256, 9223367638808264704, - (7,36): 9223363240761753600, 9223354444668731392, 9223336852482686976, - (7,39): 9223301668110598144, 9223231299366420480, 9223090561878065152, - (7,42): 9222809086901354496, 9222246136947933184, 9221120237041090560, - (7,45): 9218868437227405312, 9214364837600034816, 9205357638345293824, - (7,48): 9187343239835811840, 9151314442816847872, 9079256848778919936, - (7,51): 8935141660703064064, 8646911284551352320, 8070450532247928832, - (7,54): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedLongWhole.ddl b/tools/testfiles/tpbitsSignedLongWhole.ddl deleted file mode 100644 index e583f1d..0000000 --- a/tools/testfiles/tpbitsSignedLongWhole.ddl +++ /dev/null @@ -1,46 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS32BITS" { - DATATYPE H5T_STD_I32LE - DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } - PACKED_BITS OFFSET=0 LENGTH=32 - DATA { - (0,0): -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, - (0,12): -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, - (0,20): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, - (0,26): -67108864, -134217728, -268435456, -536870912, -1073741824, - (0,31): -2147483648, - (1,0): -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, - (1,12): -8192, -16384, -32768, -65536, -131072, -262144, -524288, - (1,19): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, - (1,25): -67108864, -134217728, -268435456, -536870912, -1073741824, - (1,30): -2147483648, 0, - (2,0): -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, - (2,11): -8192, -16384, -32768, -65536, -131072, -262144, -524288, - (2,18): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, - (2,24): -67108864, -134217728, -268435456, -536870912, -1073741824, - (2,29): -2147483648, 0, 0, - (3,0): -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, - (3,11): -16384, -32768, -65536, -131072, -262144, -524288, -1048576, - (3,18): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, - (3,24): -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, - (3,30): 0, 0, - (4,0): -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, - (4,10): -16384, -32768, -65536, -131072, -262144, -524288, -1048576, - (4,17): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, - (4,23): -134217728, -268435456, -536870912, -1073741824, -2147483648, 0, - (4,29): 0, 0, 0, - (5,0): -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, - (5,10): -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, - (5,17): -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, - (5,23): -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, - (6,0): -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, - (6,10): -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, - (6,17): -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, - (6,23): -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, 0, - (7,0): -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, - (7,9): -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, - (7,16): -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, - (7,22): -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsSignedWhole.ddl b/tools/testfiles/tpbitsSignedWhole.ddl deleted file mode 100644 index f044e23..0000000 --- a/tools/testfiles/tpbitsSignedWhole.ddl +++ /dev/null @@ -1,17 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DS08BITS" { - DATATYPE H5T_STD_I8LE - DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } - PACKED_BITS OFFSET=0 LENGTH=8 - DATA { - (0,0): -1, -2, -4, -8, -16, -32, -64, -128, - (1,0): -2, -4, -8, -16, -32, -64, -128, 0, - (2,0): -4, -8, -16, -32, -64, -128, 0, 0, - (3,0): -8, -16, -32, -64, -128, 0, 0, 0, - (4,0): -16, -32, -64, -128, 0, 0, 0, 0, - (5,0): -32, -64, -128, 0, 0, 0, 0, 0, - (6,0): -64, -128, 0, 0, 0, 0, 0, 0, - (7,0): -128, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsigned.ddl b/tools/testfiles/tpbitsUnsigned.ddl deleted file mode 100644 index 9e7ac50..0000000 --- a/tools/testfiles/tpbitsUnsigned.ddl +++ /dev/null @@ -1,28 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU08BITS" { - DATATYPE H5T_STD_U8LE - DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } - PACKED_BITS OFFSET=0 LENGTH=2 - DATA { - (0,0): 3, 2, 0, 0, 0, 0, 0, 0, - (1,0): 2, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=2 LENGTH=6 - DATA { - (0,0): 63, 63, 63, 62, 60, 56, 48, 32, - (1,0): 63, 63, 62, 60, 56, 48, 32, 0, - (2,0): 63, 62, 60, 56, 48, 32, 0, 0, - (3,0): 62, 60, 56, 48, 32, 0, 0, 0, - (4,0): 60, 56, 48, 32, 0, 0, 0, 0, - (5,0): 56, 48, 32, 0, 0, 0, 0, 0, - (6,0): 48, 32, 0, 0, 0, 0, 0, 0, - (7,0): 32, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsigned2.ddl b/tools/testfiles/tpbitsUnsigned2.ddl deleted file mode 100644 index b7e6f79..0000000 --- a/tools/testfiles/tpbitsUnsigned2.ddl +++ /dev/null @@ -1,50 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU08BITS" { - DATATYPE H5T_STD_U8LE - DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } - PACKED_BITS OFFSET=0 LENGTH=2 - DATA { - (0,0): 3, 2, 0, 0, 0, 0, 0, 0, - (1,0): 2, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=2 LENGTH=2 - DATA { - (0,0): 3, 3, 3, 2, 0, 0, 0, 0, - (1,0): 3, 3, 2, 0, 0, 0, 0, 0, - (2,0): 3, 2, 0, 0, 0, 0, 0, 0, - (3,0): 2, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=4 LENGTH=2 - DATA { - (0,0): 3, 3, 3, 3, 3, 2, 0, 0, - (1,0): 3, 3, 3, 3, 2, 0, 0, 0, - (2,0): 3, 3, 3, 2, 0, 0, 0, 0, - (3,0): 3, 3, 2, 0, 0, 0, 0, 0, - (4,0): 3, 2, 0, 0, 0, 0, 0, 0, - (5,0): 2, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=6 LENGTH=2 - DATA { - (0,0): 3, 3, 3, 3, 3, 3, 3, 2, - (1,0): 3, 3, 3, 3, 3, 3, 2, 0, - (2,0): 3, 3, 3, 3, 3, 2, 0, 0, - (3,0): 3, 3, 3, 3, 2, 0, 0, 0, - (4,0): 3, 3, 3, 2, 0, 0, 0, 0, - (5,0): 3, 3, 2, 0, 0, 0, 0, 0, - (6,0): 3, 2, 0, 0, 0, 0, 0, 0, - (7,0): 2, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsigned4.ddl b/tools/testfiles/tpbitsUnsigned4.ddl deleted file mode 100644 index d25d838..0000000 --- a/tools/testfiles/tpbitsUnsigned4.ddl +++ /dev/null @@ -1,28 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU08BITS" { - DATATYPE H5T_STD_U8LE - DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } - PACKED_BITS OFFSET=0 LENGTH=4 - DATA { - (0,0): 15, 14, 12, 8, 0, 0, 0, 0, - (1,0): 14, 12, 8, 0, 0, 0, 0, 0, - (2,0): 12, 8, 0, 0, 0, 0, 0, 0, - (3,0): 8, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=4 LENGTH=4 - DATA { - (0,0): 15, 15, 15, 15, 15, 14, 12, 8, - (1,0): 15, 15, 15, 15, 14, 12, 8, 0, - (2,0): 15, 15, 15, 14, 12, 8, 0, 0, - (3,0): 15, 15, 14, 12, 8, 0, 0, 0, - (4,0): 15, 14, 12, 8, 0, 0, 0, 0, - (5,0): 14, 12, 8, 0, 0, 0, 0, 0, - (6,0): 12, 8, 0, 0, 0, 0, 0, 0, - (7,0): 8, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedInt.ddl b/tools/testfiles/tpbitsUnsignedInt.ddl deleted file mode 100644 index 5e0fefe..0000000 --- a/tools/testfiles/tpbitsUnsignedInt.ddl +++ /dev/null @@ -1,28 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU16BITS" { - DATATYPE H5T_STD_U16LE - DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } - PACKED_BITS OFFSET=0 LENGTH=2 - DATA { - (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=10 LENGTH=6 - DATA { - (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, - (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, - (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, - (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, - (4,0): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, - (5,0): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, - (6,0): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, - (7,0): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedInt4.ddl b/tools/testfiles/tpbitsUnsignedInt4.ddl deleted file mode 100644 index 0d3e38f..0000000 --- a/tools/testfiles/tpbitsUnsignedInt4.ddl +++ /dev/null @@ -1,50 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU16BITS" { - DATATYPE H5T_STD_U16LE - DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } - PACKED_BITS OFFSET=0 LENGTH=4 - DATA { - (0,0): 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=4 LENGTH=4 - DATA { - (0,0): 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=8 LENGTH=4 - DATA { - (0,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, - (1,0): 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, - (2,0): 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, - (3,0): 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, - (4,0): 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=12 LENGTH=4 - DATA { - (0,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, - (1,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, - (2,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, - (3,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, - (4,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, - (5,0): 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, - (6,0): 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, - (7,0): 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedInt8.ddl b/tools/testfiles/tpbitsUnsignedInt8.ddl deleted file mode 100644 index 861ed3e..0000000 --- a/tools/testfiles/tpbitsUnsignedInt8.ddl +++ /dev/null @@ -1,34 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU16BITS" { - DATATYPE H5T_STD_U16LE - DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } - PACKED_BITS OFFSET=0 LENGTH=8 - DATA { - (0,0): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=8 LENGTH=8 - DATA { - (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, - (0,13): 224, 192, 128, - (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, - (1,13): 192, 128, 0, - (2,0): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, - (2,13): 128, 0, 0, - (3,0): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, - (3,14): 0, 0, - (4,0): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, - (4,14): 0, 0, - (5,0): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, - (5,15): 0, - (6,0): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, - (7,0): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedIntWhole.ddl b/tools/testfiles/tpbitsUnsignedIntWhole.ddl deleted file mode 100644 index c054011..0000000 --- a/tools/testfiles/tpbitsUnsignedIntWhole.ddl +++ /dev/null @@ -1,25 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU16BITS" { - DATATYPE H5T_STD_U16LE - DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } - PACKED_BITS OFFSET=0 LENGTH=16 - DATA { - (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, - (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, - (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, - (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, - (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, - (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, - (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, - (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, - (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, - (4,9): 57344, 49152, 32768, 0, 0, 0, 0, - (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, - (5,9): 49152, 32768, 0, 0, 0, 0, 0, - (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, - (6,9): 32768, 0, 0, 0, 0, 0, 0, - (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, - (7,10): 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedLong.ddl b/tools/testfiles/tpbitsUnsignedLong.ddl deleted file mode 100644 index 9f8bcb4..0000000 --- a/tools/testfiles/tpbitsUnsignedLong.ddl +++ /dev/null @@ -1,44 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU32BITS" { - DATATYPE H5T_STD_U32LE - DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } - PACKED_BITS OFFSET=0 LENGTH=2 - DATA { - (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=26 LENGTH=6 - DATA { - (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (0,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, - (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (1,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, - (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (2,17): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, - (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (3,17): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, - (4,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (4,17): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, - (5,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (5,17): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, - (6,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (6,17): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, - (7,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (7,17): 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedLong16.ddl b/tools/testfiles/tpbitsUnsignedLong16.ddl deleted file mode 100644 index 7a1984f..0000000 --- a/tools/testfiles/tpbitsUnsignedLong16.ddl +++ /dev/null @@ -1,67 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU32BITS" { - DATATYPE H5T_STD_U32LE - DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } - PACKED_BITS OFFSET=0 LENGTH=16 - DATA { - (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, - (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, - (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, - (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, - (1,23): 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, - (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,25): 0, 0, 0, 0, 0, 0, 0, - (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, - (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,26): 0, 0, 0, 0, 0, 0, - (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, - (4,9): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,27): 0, 0, 0, 0, 0, - (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, - (5,9): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,29): 0, 0, 0, - (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, - (6,9): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,30): 0, 0, - (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, - (7,10): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=16 LENGTH=16 - DATA { - (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, - (0,18): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, - (0,27): 63488, 61440, 57344, 49152, 32768, - (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, - (1,18): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, - (1,27): 61440, 57344, 49152, 32768, 0, - (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, - (2,18): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, - (2,27): 57344, 49152, 32768, 0, 0, - (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,9): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, - (3,18): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, - (3,27): 49152, 32768, 0, 0, 0, - (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,9): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, - (4,18): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, - (4,27): 32768, 0, 0, 0, 0, - (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,9): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, - (5,18): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, - (5,28): 0, 0, 0, 0, - (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,9): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, - (6,18): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, - (6,29): 0, 0, 0, - (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,9): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, - (7,18): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, - (7,31): 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedLong8.ddl b/tools/testfiles/tpbitsUnsignedLong8.ddl deleted file mode 100644 index 17b896c..0000000 --- a/tools/testfiles/tpbitsUnsignedLong8.ddl +++ /dev/null @@ -1,96 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU32BITS" { - DATATYPE H5T_STD_U32LE - DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } - PACKED_BITS OFFSET=0 LENGTH=8 - DATA { - (0,0): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,17): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,18): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,18): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,19): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,20): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,20): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=8 LENGTH=8 - DATA { - (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, - (0,13): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, - (1,13): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, - (2,13): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, - (3,14): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, - (4,14): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, - (5,15): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, - (6,16): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, - (7,16): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=16 LENGTH=8 - DATA { - (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (0,13): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, - (0,28): 0, 0, 0, 0, - (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (1,13): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, - (1,28): 0, 0, 0, 0, - (2,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (2,13): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, - (2,29): 0, 0, 0, - (3,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (3,13): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,30): 0, 0, - (4,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (4,13): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,30): 0, 0, - (5,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, - (5,13): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,31): 0, - (6,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, - (6,13): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, - (7,13): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=24 LENGTH=8 - DATA { - (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (0,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, - (0,26): 252, 248, 240, 224, 192, 128, - (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (1,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, - (1,26): 248, 240, 224, 192, 128, 0, - (2,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (2,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, - (2,26): 240, 224, 192, 128, 0, 0, - (3,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (3,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, - (3,26): 224, 192, 128, 0, 0, 0, - (4,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (4,13): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, - (4,26): 192, 128, 0, 0, 0, 0, - (5,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (5,13): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, - (5,26): 128, 0, 0, 0, 0, 0, - (6,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (6,13): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, - (6,26): 0, 0, 0, 0, 0, 0, - (7,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - (7,13): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, - (7,27): 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedLongLong.ddl b/tools/testfiles/tpbitsUnsignedLongLong.ddl deleted file mode 100644 index 1cd9a6c..0000000 --- a/tools/testfiles/tpbitsUnsignedLongLong.ddl +++ /dev/null @@ -1,68 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU64BITS" { - DATATYPE H5T_STD_U64LE - DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } - PACKED_BITS OFFSET=0 LENGTH=2 - DATA { - (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=58 LENGTH=6 - DATA { - (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (0,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (0,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (0,49): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, - (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (1,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (1,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (1,49): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, - (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (2,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (2,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (2,49): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, - (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (3,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (3,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (3,49): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, - (4,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (4,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (4,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (4,49): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, - (5,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (5,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (5,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (5,49): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, - (6,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (6,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (6,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (6,49): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, - (7,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (7,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (7,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - (7,49): 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedLongLong16.ddl b/tools/testfiles/tpbitsUnsignedLongLong16.ddl deleted file mode 100644 index f8b0189..0000000 --- a/tools/testfiles/tpbitsUnsignedLongLong16.ddl +++ /dev/null @@ -1,196 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU64BITS" { - DATATYPE H5T_STD_U64LE - DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } - PACKED_BITS OFFSET=0 LENGTH=16 - DATA { - (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, - (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, - (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, - (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, - (1,23): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,45): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, - (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,25): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,47): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, - (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,26): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,48): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, - (4,9): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,27): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, - (5,9): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,29): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, - (6,9): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,30): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,52): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, - (7,10): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,32): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,54): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=16 LENGTH=16 - DATA { - (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, - (0,18): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, - (0,27): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, - (1,18): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, - (1,27): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, - (2,18): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, - (2,27): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,45): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,9): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, - (3,18): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, - (3,27): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,9): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, - (4,18): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, - (4,27): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,48): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,9): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, - (5,18): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, - (5,28): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,50): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,9): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, - (6,18): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, - (6,29): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,9): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, - (7,18): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, - (7,31): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,53): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=32 LENGTH=16 - DATA { - (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,27): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, - (0,36): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, - (0,45): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,63): 0, - (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,27): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, - (1,36): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, - (1,45): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,27): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, - (2,36): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, - (2,45): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,27): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, - (3,36): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, - (3,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,27): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, - (4,36): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, - (4,47): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,27): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, - (5,36): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, - (5,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,27): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, - (6,36): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, - (6,50): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, - (7,27): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, - (7,36): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=48 LENGTH=16 - DATA { - (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (0,45): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, - (0,54): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, - (0,63): 32768, - (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (1,45): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, - (1,54): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, - (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (2,45): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, - (2,54): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, - (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (3,45): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, - (3,54): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, - (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (4,45): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, - (4,54): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, - (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (5,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, - (5,45): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, - (5,54): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, - (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (6,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, - (6,45): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, - (6,54): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, - (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, - (7,36): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, - (7,45): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, - (7,54): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedLongLong32.ddl b/tools/testfiles/tpbitsUnsignedLongLong32.ddl deleted file mode 100644 index befaf5b..0000000 --- a/tools/testfiles/tpbitsUnsignedLongLong32.ddl +++ /dev/null @@ -1,175 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU64BITS" { - DATATYPE H5T_STD_U64LE - DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } - PACKED_BITS OFFSET=0 LENGTH=32 - DATA { - (0,0): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, - (0,5): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, - (0,10): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, - (0,15): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, - (0,20): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, - (0,25): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, - (0,30): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (0,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,0): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, - (1,5): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, - (1,10): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, - (1,15): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, - (1,20): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, - (1,25): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, - (1,30): 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (1,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,0): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, - (2,5): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, - (2,10): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, - (2,15): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, - (2,20): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, - (2,25): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, - (2,32): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (2,54): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,0): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, - (3,5): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, - (3,10): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, - (3,15): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, - (3,20): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, - (3,25): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, - (3,35): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (3,57): 0, 0, 0, 0, 0, 0, 0, - (4,0): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, - (4,5): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, - (4,10): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, - (4,15): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, - (4,20): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, - (4,25): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,38): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (4,60): 0, 0, 0, 0, - (5,0): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, - (5,5): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, - (5,10): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, - (5,15): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, - (5,20): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, - (5,25): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,41): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (5,63): 0, - (6,0): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, - (6,5): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, - (6,10): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, - (6,15): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, - (6,20): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, - (6,25): 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (6,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,0): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, - (7,5): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, - (7,10): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, - (7,15): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, - (7,20): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, - (7,27): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (7,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - } - PACKED_BITS OFFSET=32 LENGTH=32 - DATA { - (0,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (0,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (0,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (0,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (0,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (0,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (0,30): 4294967295, 4294967295, 4294967295, 4294967294, 4294967292, - (0,35): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, - (0,40): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, - (0,45): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, - (0,50): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, - (0,55): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, - (0,60): 4026531840, 3758096384, 3221225472, 2147483648, - (1,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (1,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (1,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (1,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (1,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (1,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (1,30): 4294967295, 4294967295, 4294967294, 4294967292, 4294967288, - (1,35): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, - (1,40): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, - (1,45): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, - (1,50): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, - (1,55): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, - (1,60): 3758096384, 3221225472, 2147483648, 0, - (2,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (2,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (2,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (2,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (2,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (2,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (2,30): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, - (2,35): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, - (2,40): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, - (2,45): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, - (2,50): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, - (2,55): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, - (2,60): 3221225472, 2147483648, 0, 0, - (3,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (3,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (3,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (3,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (3,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (3,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (3,30): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, - (3,35): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, - (3,40): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, - (3,45): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, - (3,50): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, - (3,55): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, - (3,60): 2147483648, 0, 0, 0, - (4,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (4,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (4,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (4,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (4,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (4,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967294, - (4,30): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, - (4,35): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, - (4,40): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, - (4,45): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, - (4,50): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, - (4,55): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, - (4,62): 0, 0, - (5,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (5,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (5,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (5,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (5,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (5,25): 4294967295, 4294967295, 4294967295, 4294967294, 4294967292, - (5,30): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, - (5,35): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, - (5,40): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, - (5,45): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, - (5,50): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, - (5,55): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, - (6,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (6,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (6,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (6,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (6,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (6,25): 4294967295, 4294967295, 4294967294, 4294967292, 4294967288, - (6,30): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, - (6,35): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, - (6,40): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, - (6,45): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, - (6,50): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, - (6,55): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, - (7,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (7,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (7,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (7,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (7,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, - (7,25): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, - (7,30): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, - (7,35): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, - (7,40): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, - (7,45): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, - (7,50): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, - (7,55): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedLongLongWhole.ddl b/tools/testfiles/tpbitsUnsignedLongLongWhole.ddl deleted file mode 100644 index 27c8879..0000000 --- a/tools/testfiles/tpbitsUnsignedLongLongWhole.ddl +++ /dev/null @@ -1,176 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU64BITS" { - DATATYPE H5T_STD_U64LE - DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } - PACKED_BITS OFFSET=0 LENGTH=64 - DATA { - (0,0): 18446744073709551615, 18446744073709551614, 18446744073709551612, - (0,3): 18446744073709551608, 18446744073709551600, 18446744073709551584, - (0,6): 18446744073709551552, 18446744073709551488, 18446744073709551360, - (0,9): 18446744073709551104, 18446744073709550592, 18446744073709549568, - (0,12): 18446744073709547520, 18446744073709543424, 18446744073709535232, - (0,15): 18446744073709518848, 18446744073709486080, 18446744073709420544, - (0,18): 18446744073709289472, 18446744073709027328, 18446744073708503040, - (0,21): 18446744073707454464, 18446744073705357312, 18446744073701163008, - (0,24): 18446744073692774400, 18446744073675997184, 18446744073642442752, - (0,27): 18446744073575333888, 18446744073441116160, 18446744073172680704, - (0,30): 18446744072635809792, 18446744071562067968, 18446744069414584320, - (0,33): 18446744065119617024, 18446744056529682432, 18446744039349813248, - (0,36): 18446744004990074880, 18446743936270598144, 18446743798831644672, - (0,39): 18446743523953737728, 18446742974197923840, 18446741874686296064, - (0,42): 18446739675663040512, 18446735277616529408, 18446726481523507200, - (0,45): 18446708889337462784, 18446673704965373952, 18446603336221196288, - (0,48): 18446462598732840960, 18446181123756130304, 18445618173802708992, - (0,51): 18444492273895866368, 18442240474082181120, 18437736874454810624, - (0,54): 18428729675200069632, 18410715276690587648, 18374686479671623680, - (0,57): 18302628885633695744, 18158513697557839872, 17870283321406128128, - (0,60): 17293822569102704640, 16140901064495857664, 13835058055282163712, - (0,63): 9223372036854775808, - (1,0): 18446744073709551614, 18446744073709551612, 18446744073709551608, - (1,3): 18446744073709551600, 18446744073709551584, 18446744073709551552, - (1,6): 18446744073709551488, 18446744073709551360, 18446744073709551104, - (1,9): 18446744073709550592, 18446744073709549568, 18446744073709547520, - (1,12): 18446744073709543424, 18446744073709535232, 18446744073709518848, - (1,15): 18446744073709486080, 18446744073709420544, 18446744073709289472, - (1,18): 18446744073709027328, 18446744073708503040, 18446744073707454464, - (1,21): 18446744073705357312, 18446744073701163008, 18446744073692774400, - (1,24): 18446744073675997184, 18446744073642442752, 18446744073575333888, - (1,27): 18446744073441116160, 18446744073172680704, 18446744072635809792, - (1,30): 18446744071562067968, 18446744069414584320, 18446744065119617024, - (1,33): 18446744056529682432, 18446744039349813248, 18446744004990074880, - (1,36): 18446743936270598144, 18446743798831644672, 18446743523953737728, - (1,39): 18446742974197923840, 18446741874686296064, 18446739675663040512, - (1,42): 18446735277616529408, 18446726481523507200, 18446708889337462784, - (1,45): 18446673704965373952, 18446603336221196288, 18446462598732840960, - (1,48): 18446181123756130304, 18445618173802708992, 18444492273895866368, - (1,51): 18442240474082181120, 18437736874454810624, 18428729675200069632, - (1,54): 18410715276690587648, 18374686479671623680, 18302628885633695744, - (1,57): 18158513697557839872, 17870283321406128128, 17293822569102704640, - (1,60): 16140901064495857664, 13835058055282163712, 9223372036854775808, - (1,63): 0, - (2,0): 18446744073709551612, 18446744073709551608, 18446744073709551600, - (2,3): 18446744073709551584, 18446744073709551552, 18446744073709551488, - (2,6): 18446744073709551360, 18446744073709551104, 18446744073709550592, - (2,9): 18446744073709549568, 18446744073709547520, 18446744073709543424, - (2,12): 18446744073709535232, 18446744073709518848, 18446744073709486080, - (2,15): 18446744073709420544, 18446744073709289472, 18446744073709027328, - (2,18): 18446744073708503040, 18446744073707454464, 18446744073705357312, - (2,21): 18446744073701163008, 18446744073692774400, 18446744073675997184, - (2,24): 18446744073642442752, 18446744073575333888, 18446744073441116160, - (2,27): 18446744073172680704, 18446744072635809792, 18446744071562067968, - (2,30): 18446744069414584320, 18446744065119617024, 18446744056529682432, - (2,33): 18446744039349813248, 18446744004990074880, 18446743936270598144, - (2,36): 18446743798831644672, 18446743523953737728, 18446742974197923840, - (2,39): 18446741874686296064, 18446739675663040512, 18446735277616529408, - (2,42): 18446726481523507200, 18446708889337462784, 18446673704965373952, - (2,45): 18446603336221196288, 18446462598732840960, 18446181123756130304, - (2,48): 18445618173802708992, 18444492273895866368, 18442240474082181120, - (2,51): 18437736874454810624, 18428729675200069632, 18410715276690587648, - (2,54): 18374686479671623680, 18302628885633695744, 18158513697557839872, - (2,57): 17870283321406128128, 17293822569102704640, 16140901064495857664, - (2,60): 13835058055282163712, 9223372036854775808, 0, 0, - (3,0): 18446744073709551608, 18446744073709551600, 18446744073709551584, - (3,3): 18446744073709551552, 18446744073709551488, 18446744073709551360, - (3,6): 18446744073709551104, 18446744073709550592, 18446744073709549568, - (3,9): 18446744073709547520, 18446744073709543424, 18446744073709535232, - (3,12): 18446744073709518848, 18446744073709486080, 18446744073709420544, - (3,15): 18446744073709289472, 18446744073709027328, 18446744073708503040, - (3,18): 18446744073707454464, 18446744073705357312, 18446744073701163008, - (3,21): 18446744073692774400, 18446744073675997184, 18446744073642442752, - (3,24): 18446744073575333888, 18446744073441116160, 18446744073172680704, - (3,27): 18446744072635809792, 18446744071562067968, 18446744069414584320, - (3,30): 18446744065119617024, 18446744056529682432, 18446744039349813248, - (3,33): 18446744004990074880, 18446743936270598144, 18446743798831644672, - (3,36): 18446743523953737728, 18446742974197923840, 18446741874686296064, - (3,39): 18446739675663040512, 18446735277616529408, 18446726481523507200, - (3,42): 18446708889337462784, 18446673704965373952, 18446603336221196288, - (3,45): 18446462598732840960, 18446181123756130304, 18445618173802708992, - (3,48): 18444492273895866368, 18442240474082181120, 18437736874454810624, - (3,51): 18428729675200069632, 18410715276690587648, 18374686479671623680, - (3,54): 18302628885633695744, 18158513697557839872, 17870283321406128128, - (3,57): 17293822569102704640, 16140901064495857664, 13835058055282163712, - (3,60): 9223372036854775808, 0, 0, 0, - (4,0): 18446744073709551600, 18446744073709551584, 18446744073709551552, - (4,3): 18446744073709551488, 18446744073709551360, 18446744073709551104, - (4,6): 18446744073709550592, 18446744073709549568, 18446744073709547520, - (4,9): 18446744073709543424, 18446744073709535232, 18446744073709518848, - (4,12): 18446744073709486080, 18446744073709420544, 18446744073709289472, - (4,15): 18446744073709027328, 18446744073708503040, 18446744073707454464, - (4,18): 18446744073705357312, 18446744073701163008, 18446744073692774400, - (4,21): 18446744073675997184, 18446744073642442752, 18446744073575333888, - (4,24): 18446744073441116160, 18446744073172680704, 18446744072635809792, - (4,27): 18446744071562067968, 18446744069414584320, 18446744065119617024, - (4,30): 18446744056529682432, 18446744039349813248, 18446744004990074880, - (4,33): 18446743936270598144, 18446743798831644672, 18446743523953737728, - (4,36): 18446742974197923840, 18446741874686296064, 18446739675663040512, - (4,39): 18446735277616529408, 18446726481523507200, 18446708889337462784, - (4,42): 18446673704965373952, 18446603336221196288, 18446462598732840960, - (4,45): 18446181123756130304, 18445618173802708992, 18444492273895866368, - (4,48): 18442240474082181120, 18437736874454810624, 18428729675200069632, - (4,51): 18410715276690587648, 18374686479671623680, 18302628885633695744, - (4,54): 18158513697557839872, 17870283321406128128, 17293822569102704640, - (4,57): 16140901064495857664, 13835058055282163712, 9223372036854775808, - (4,60): 0, 0, 0, 0, - (5,0): 18446744073709551584, 18446744073709551552, 18446744073709551488, - (5,3): 18446744073709551360, 18446744073709551104, 18446744073709550592, - (5,6): 18446744073709549568, 18446744073709547520, 18446744073709543424, - (5,9): 18446744073709535232, 18446744073709518848, 18446744073709486080, - (5,12): 18446744073709420544, 18446744073709289472, 18446744073709027328, - (5,15): 18446744073708503040, 18446744073707454464, 18446744073705357312, - (5,18): 18446744073701163008, 18446744073692774400, 18446744073675997184, - (5,21): 18446744073642442752, 18446744073575333888, 18446744073441116160, - (5,24): 18446744073172680704, 18446744072635809792, 18446744071562067968, - (5,27): 18446744069414584320, 18446744065119617024, 18446744056529682432, - (5,30): 18446744039349813248, 18446744004990074880, 18446743936270598144, - (5,33): 18446743798831644672, 18446743523953737728, 18446742974197923840, - (5,36): 18446741874686296064, 18446739675663040512, 18446735277616529408, - (5,39): 18446726481523507200, 18446708889337462784, 18446673704965373952, - (5,42): 18446603336221196288, 18446462598732840960, 18446181123756130304, - (5,45): 18445618173802708992, 18444492273895866368, 18442240474082181120, - (5,48): 18437736874454810624, 18428729675200069632, 18410715276690587648, - (5,51): 18374686479671623680, 18302628885633695744, 18158513697557839872, - (5,54): 17870283321406128128, 17293822569102704640, 16140901064495857664, - (5,57): 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, 0, - (6,0): 18446744073709551552, 18446744073709551488, 18446744073709551360, - (6,3): 18446744073709551104, 18446744073709550592, 18446744073709549568, - (6,6): 18446744073709547520, 18446744073709543424, 18446744073709535232, - (6,9): 18446744073709518848, 18446744073709486080, 18446744073709420544, - (6,12): 18446744073709289472, 18446744073709027328, 18446744073708503040, - (6,15): 18446744073707454464, 18446744073705357312, 18446744073701163008, - (6,18): 18446744073692774400, 18446744073675997184, 18446744073642442752, - (6,21): 18446744073575333888, 18446744073441116160, 18446744073172680704, - (6,24): 18446744072635809792, 18446744071562067968, 18446744069414584320, - (6,27): 18446744065119617024, 18446744056529682432, 18446744039349813248, - (6,30): 18446744004990074880, 18446743936270598144, 18446743798831644672, - (6,33): 18446743523953737728, 18446742974197923840, 18446741874686296064, - (6,36): 18446739675663040512, 18446735277616529408, 18446726481523507200, - (6,39): 18446708889337462784, 18446673704965373952, 18446603336221196288, - (6,42): 18446462598732840960, 18446181123756130304, 18445618173802708992, - (6,45): 18444492273895866368, 18442240474082181120, 18437736874454810624, - (6,48): 18428729675200069632, 18410715276690587648, 18374686479671623680, - (6,51): 18302628885633695744, 18158513697557839872, 17870283321406128128, - (6,54): 17293822569102704640, 16140901064495857664, 13835058055282163712, - (6,57): 9223372036854775808, 0, 0, 0, 0, 0, 0, - (7,0): 18446744073709551488, 18446744073709551360, 18446744073709551104, - (7,3): 18446744073709550592, 18446744073709549568, 18446744073709547520, - (7,6): 18446744073709543424, 18446744073709535232, 18446744073709518848, - (7,9): 18446744073709486080, 18446744073709420544, 18446744073709289472, - (7,12): 18446744073709027328, 18446744073708503040, 18446744073707454464, - (7,15): 18446744073705357312, 18446744073701163008, 18446744073692774400, - (7,18): 18446744073675997184, 18446744073642442752, 18446744073575333888, - (7,21): 18446744073441116160, 18446744073172680704, 18446744072635809792, - (7,24): 18446744071562067968, 18446744069414584320, 18446744065119617024, - (7,27): 18446744056529682432, 18446744039349813248, 18446744004990074880, - (7,30): 18446743936270598144, 18446743798831644672, 18446743523953737728, - (7,33): 18446742974197923840, 18446741874686296064, 18446739675663040512, - (7,36): 18446735277616529408, 18446726481523507200, 18446708889337462784, - (7,39): 18446673704965373952, 18446603336221196288, 18446462598732840960, - (7,42): 18446181123756130304, 18445618173802708992, 18444492273895866368, - (7,45): 18442240474082181120, 18437736874454810624, 18428729675200069632, - (7,48): 18410715276690587648, 18374686479671623680, 18302628885633695744, - (7,51): 18158513697557839872, 17870283321406128128, 17293822569102704640, - (7,54): 16140901064495857664, 13835058055282163712, 9223372036854775808, - (7,57): 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedLongLongWhole1.ddl b/tools/testfiles/tpbitsUnsignedLongLongWhole1.ddl deleted file mode 100644 index 0302105..0000000 --- a/tools/testfiles/tpbitsUnsignedLongLongWhole1.ddl +++ /dev/null @@ -1,175 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU64BITS" { - DATATYPE H5T_STD_U64LE - DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } - PACKED_BITS OFFSET=1 LENGTH=63 - DATA { - (0,0): 9223372036854775807, 9223372036854775807, 9223372036854775806, - (0,3): 9223372036854775804, 9223372036854775800, 9223372036854775792, - (0,6): 9223372036854775776, 9223372036854775744, 9223372036854775680, - (0,9): 9223372036854775552, 9223372036854775296, 9223372036854774784, - (0,12): 9223372036854773760, 9223372036854771712, 9223372036854767616, - (0,15): 9223372036854759424, 9223372036854743040, 9223372036854710272, - (0,18): 9223372036854644736, 9223372036854513664, 9223372036854251520, - (0,21): 9223372036853727232, 9223372036852678656, 9223372036850581504, - (0,24): 9223372036846387200, 9223372036837998592, 9223372036821221376, - (0,27): 9223372036787666944, 9223372036720558080, 9223372036586340352, - (0,30): 9223372036317904896, 9223372035781033984, 9223372034707292160, - (0,33): 9223372032559808512, 9223372028264841216, 9223372019674906624, - (0,36): 9223372002495037440, 9223371968135299072, 9223371899415822336, - (0,39): 9223371761976868864, 9223371487098961920, 9223370937343148032, - (0,42): 9223369837831520256, 9223367638808264704, 9223363240761753600, - (0,45): 9223354444668731392, 9223336852482686976, 9223301668110598144, - (0,48): 9223231299366420480, 9223090561878065152, 9222809086901354496, - (0,51): 9222246136947933184, 9221120237041090560, 9218868437227405312, - (0,54): 9214364837600034816, 9205357638345293824, 9187343239835811840, - (0,57): 9151314442816847872, 9079256848778919936, 8935141660703064064, - (0,60): 8646911284551352320, 8070450532247928832, 6917529027641081856, - (0,63): 4611686018427387904, - (1,0): 9223372036854775807, 9223372036854775806, 9223372036854775804, - (1,3): 9223372036854775800, 9223372036854775792, 9223372036854775776, - (1,6): 9223372036854775744, 9223372036854775680, 9223372036854775552, - (1,9): 9223372036854775296, 9223372036854774784, 9223372036854773760, - (1,12): 9223372036854771712, 9223372036854767616, 9223372036854759424, - (1,15): 9223372036854743040, 9223372036854710272, 9223372036854644736, - (1,18): 9223372036854513664, 9223372036854251520, 9223372036853727232, - (1,21): 9223372036852678656, 9223372036850581504, 9223372036846387200, - (1,24): 9223372036837998592, 9223372036821221376, 9223372036787666944, - (1,27): 9223372036720558080, 9223372036586340352, 9223372036317904896, - (1,30): 9223372035781033984, 9223372034707292160, 9223372032559808512, - (1,33): 9223372028264841216, 9223372019674906624, 9223372002495037440, - (1,36): 9223371968135299072, 9223371899415822336, 9223371761976868864, - (1,39): 9223371487098961920, 9223370937343148032, 9223369837831520256, - (1,42): 9223367638808264704, 9223363240761753600, 9223354444668731392, - (1,45): 9223336852482686976, 9223301668110598144, 9223231299366420480, - (1,48): 9223090561878065152, 9222809086901354496, 9222246136947933184, - (1,51): 9221120237041090560, 9218868437227405312, 9214364837600034816, - (1,54): 9205357638345293824, 9187343239835811840, 9151314442816847872, - (1,57): 9079256848778919936, 8935141660703064064, 8646911284551352320, - (1,60): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, - (2,0): 9223372036854775806, 9223372036854775804, 9223372036854775800, - (2,3): 9223372036854775792, 9223372036854775776, 9223372036854775744, - (2,6): 9223372036854775680, 9223372036854775552, 9223372036854775296, - (2,9): 9223372036854774784, 9223372036854773760, 9223372036854771712, - (2,12): 9223372036854767616, 9223372036854759424, 9223372036854743040, - (2,15): 9223372036854710272, 9223372036854644736, 9223372036854513664, - (2,18): 9223372036854251520, 9223372036853727232, 9223372036852678656, - (2,21): 9223372036850581504, 9223372036846387200, 9223372036837998592, - (2,24): 9223372036821221376, 9223372036787666944, 9223372036720558080, - (2,27): 9223372036586340352, 9223372036317904896, 9223372035781033984, - (2,30): 9223372034707292160, 9223372032559808512, 9223372028264841216, - (2,33): 9223372019674906624, 9223372002495037440, 9223371968135299072, - (2,36): 9223371899415822336, 9223371761976868864, 9223371487098961920, - (2,39): 9223370937343148032, 9223369837831520256, 9223367638808264704, - (2,42): 9223363240761753600, 9223354444668731392, 9223336852482686976, - (2,45): 9223301668110598144, 9223231299366420480, 9223090561878065152, - (2,48): 9222809086901354496, 9222246136947933184, 9221120237041090560, - (2,51): 9218868437227405312, 9214364837600034816, 9205357638345293824, - (2,54): 9187343239835811840, 9151314442816847872, 9079256848778919936, - (2,57): 8935141660703064064, 8646911284551352320, 8070450532247928832, - (2,60): 6917529027641081856, 4611686018427387904, 0, 0, - (3,0): 9223372036854775804, 9223372036854775800, 9223372036854775792, - (3,3): 9223372036854775776, 9223372036854775744, 9223372036854775680, - (3,6): 9223372036854775552, 9223372036854775296, 9223372036854774784, - (3,9): 9223372036854773760, 9223372036854771712, 9223372036854767616, - (3,12): 9223372036854759424, 9223372036854743040, 9223372036854710272, - (3,15): 9223372036854644736, 9223372036854513664, 9223372036854251520, - (3,18): 9223372036853727232, 9223372036852678656, 9223372036850581504, - (3,21): 9223372036846387200, 9223372036837998592, 9223372036821221376, - (3,24): 9223372036787666944, 9223372036720558080, 9223372036586340352, - (3,27): 9223372036317904896, 9223372035781033984, 9223372034707292160, - (3,30): 9223372032559808512, 9223372028264841216, 9223372019674906624, - (3,33): 9223372002495037440, 9223371968135299072, 9223371899415822336, - (3,36): 9223371761976868864, 9223371487098961920, 9223370937343148032, - (3,39): 9223369837831520256, 9223367638808264704, 9223363240761753600, - (3,42): 9223354444668731392, 9223336852482686976, 9223301668110598144, - (3,45): 9223231299366420480, 9223090561878065152, 9222809086901354496, - (3,48): 9222246136947933184, 9221120237041090560, 9218868437227405312, - (3,51): 9214364837600034816, 9205357638345293824, 9187343239835811840, - (3,54): 9151314442816847872, 9079256848778919936, 8935141660703064064, - (3,57): 8646911284551352320, 8070450532247928832, 6917529027641081856, - (3,60): 4611686018427387904, 0, 0, 0, - (4,0): 9223372036854775800, 9223372036854775792, 9223372036854775776, - (4,3): 9223372036854775744, 9223372036854775680, 9223372036854775552, - (4,6): 9223372036854775296, 9223372036854774784, 9223372036854773760, - (4,9): 9223372036854771712, 9223372036854767616, 9223372036854759424, - (4,12): 9223372036854743040, 9223372036854710272, 9223372036854644736, - (4,15): 9223372036854513664, 9223372036854251520, 9223372036853727232, - (4,18): 9223372036852678656, 9223372036850581504, 9223372036846387200, - (4,21): 9223372036837998592, 9223372036821221376, 9223372036787666944, - (4,24): 9223372036720558080, 9223372036586340352, 9223372036317904896, - (4,27): 9223372035781033984, 9223372034707292160, 9223372032559808512, - (4,30): 9223372028264841216, 9223372019674906624, 9223372002495037440, - (4,33): 9223371968135299072, 9223371899415822336, 9223371761976868864, - (4,36): 9223371487098961920, 9223370937343148032, 9223369837831520256, - (4,39): 9223367638808264704, 9223363240761753600, 9223354444668731392, - (4,42): 9223336852482686976, 9223301668110598144, 9223231299366420480, - (4,45): 9223090561878065152, 9222809086901354496, 9222246136947933184, - (4,48): 9221120237041090560, 9218868437227405312, 9214364837600034816, - (4,51): 9205357638345293824, 9187343239835811840, 9151314442816847872, - (4,54): 9079256848778919936, 8935141660703064064, 8646911284551352320, - (4,57): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, - (4,61): 0, 0, 0, - (5,0): 9223372036854775792, 9223372036854775776, 9223372036854775744, - (5,3): 9223372036854775680, 9223372036854775552, 9223372036854775296, - (5,6): 9223372036854774784, 9223372036854773760, 9223372036854771712, - (5,9): 9223372036854767616, 9223372036854759424, 9223372036854743040, - (5,12): 9223372036854710272, 9223372036854644736, 9223372036854513664, - (5,15): 9223372036854251520, 9223372036853727232, 9223372036852678656, - (5,18): 9223372036850581504, 9223372036846387200, 9223372036837998592, - (5,21): 9223372036821221376, 9223372036787666944, 9223372036720558080, - (5,24): 9223372036586340352, 9223372036317904896, 9223372035781033984, - (5,27): 9223372034707292160, 9223372032559808512, 9223372028264841216, - (5,30): 9223372019674906624, 9223372002495037440, 9223371968135299072, - (5,33): 9223371899415822336, 9223371761976868864, 9223371487098961920, - (5,36): 9223370937343148032, 9223369837831520256, 9223367638808264704, - (5,39): 9223363240761753600, 9223354444668731392, 9223336852482686976, - (5,42): 9223301668110598144, 9223231299366420480, 9223090561878065152, - (5,45): 9222809086901354496, 9222246136947933184, 9221120237041090560, - (5,48): 9218868437227405312, 9214364837600034816, 9205357638345293824, - (5,51): 9187343239835811840, 9151314442816847872, 9079256848778919936, - (5,54): 8935141660703064064, 8646911284551352320, 8070450532247928832, - (5,57): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0, - (6,0): 9223372036854775776, 9223372036854775744, 9223372036854775680, - (6,3): 9223372036854775552, 9223372036854775296, 9223372036854774784, - (6,6): 9223372036854773760, 9223372036854771712, 9223372036854767616, - (6,9): 9223372036854759424, 9223372036854743040, 9223372036854710272, - (6,12): 9223372036854644736, 9223372036854513664, 9223372036854251520, - (6,15): 9223372036853727232, 9223372036852678656, 9223372036850581504, - (6,18): 9223372036846387200, 9223372036837998592, 9223372036821221376, - (6,21): 9223372036787666944, 9223372036720558080, 9223372036586340352, - (6,24): 9223372036317904896, 9223372035781033984, 9223372034707292160, - (6,27): 9223372032559808512, 9223372028264841216, 9223372019674906624, - (6,30): 9223372002495037440, 9223371968135299072, 9223371899415822336, - (6,33): 9223371761976868864, 9223371487098961920, 9223370937343148032, - (6,36): 9223369837831520256, 9223367638808264704, 9223363240761753600, - (6,39): 9223354444668731392, 9223336852482686976, 9223301668110598144, - (6,42): 9223231299366420480, 9223090561878065152, 9222809086901354496, - (6,45): 9222246136947933184, 9221120237041090560, 9218868437227405312, - (6,48): 9214364837600034816, 9205357638345293824, 9187343239835811840, - (6,51): 9151314442816847872, 9079256848778919936, 8935141660703064064, - (6,54): 8646911284551352320, 8070450532247928832, 6917529027641081856, - (6,57): 4611686018427387904, 0, 0, 0, 0, 0, 0, - (7,0): 9223372036854775744, 9223372036854775680, 9223372036854775552, - (7,3): 9223372036854775296, 9223372036854774784, 9223372036854773760, - (7,6): 9223372036854771712, 9223372036854767616, 9223372036854759424, - (7,9): 9223372036854743040, 9223372036854710272, 9223372036854644736, - (7,12): 9223372036854513664, 9223372036854251520, 9223372036853727232, - (7,15): 9223372036852678656, 9223372036850581504, 9223372036846387200, - (7,18): 9223372036837998592, 9223372036821221376, 9223372036787666944, - (7,21): 9223372036720558080, 9223372036586340352, 9223372036317904896, - (7,24): 9223372035781033984, 9223372034707292160, 9223372032559808512, - (7,27): 9223372028264841216, 9223372019674906624, 9223372002495037440, - (7,30): 9223371968135299072, 9223371899415822336, 9223371761976868864, - (7,33): 9223371487098961920, 9223370937343148032, 9223369837831520256, - (7,36): 9223367638808264704, 9223363240761753600, 9223354444668731392, - (7,39): 9223336852482686976, 9223301668110598144, 9223231299366420480, - (7,42): 9223090561878065152, 9222809086901354496, 9222246136947933184, - (7,45): 9221120237041090560, 9218868437227405312, 9214364837600034816, - (7,48): 9205357638345293824, 9187343239835811840, 9151314442816847872, - (7,51): 9079256848778919936, 8935141660703064064, 8646911284551352320, - (7,54): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, - (7,58): 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedLongLongWhole63.ddl b/tools/testfiles/tpbitsUnsignedLongLongWhole63.ddl deleted file mode 100644 index 6a9b503..0000000 --- a/tools/testfiles/tpbitsUnsignedLongLongWhole63.ddl +++ /dev/null @@ -1,172 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU64BITS" { - DATATYPE H5T_STD_U64LE - DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } - PACKED_BITS OFFSET=0 LENGTH=63 - DATA { - (0,0): 9223372036854775807, 9223372036854775806, 9223372036854775804, - (0,3): 9223372036854775800, 9223372036854775792, 9223372036854775776, - (0,6): 9223372036854775744, 9223372036854775680, 9223372036854775552, - (0,9): 9223372036854775296, 9223372036854774784, 9223372036854773760, - (0,12): 9223372036854771712, 9223372036854767616, 9223372036854759424, - (0,15): 9223372036854743040, 9223372036854710272, 9223372036854644736, - (0,18): 9223372036854513664, 9223372036854251520, 9223372036853727232, - (0,21): 9223372036852678656, 9223372036850581504, 9223372036846387200, - (0,24): 9223372036837998592, 9223372036821221376, 9223372036787666944, - (0,27): 9223372036720558080, 9223372036586340352, 9223372036317904896, - (0,30): 9223372035781033984, 9223372034707292160, 9223372032559808512, - (0,33): 9223372028264841216, 9223372019674906624, 9223372002495037440, - (0,36): 9223371968135299072, 9223371899415822336, 9223371761976868864, - (0,39): 9223371487098961920, 9223370937343148032, 9223369837831520256, - (0,42): 9223367638808264704, 9223363240761753600, 9223354444668731392, - (0,45): 9223336852482686976, 9223301668110598144, 9223231299366420480, - (0,48): 9223090561878065152, 9222809086901354496, 9222246136947933184, - (0,51): 9221120237041090560, 9218868437227405312, 9214364837600034816, - (0,54): 9205357638345293824, 9187343239835811840, 9151314442816847872, - (0,57): 9079256848778919936, 8935141660703064064, 8646911284551352320, - (0,60): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, - (1,0): 9223372036854775806, 9223372036854775804, 9223372036854775800, - (1,3): 9223372036854775792, 9223372036854775776, 9223372036854775744, - (1,6): 9223372036854775680, 9223372036854775552, 9223372036854775296, - (1,9): 9223372036854774784, 9223372036854773760, 9223372036854771712, - (1,12): 9223372036854767616, 9223372036854759424, 9223372036854743040, - (1,15): 9223372036854710272, 9223372036854644736, 9223372036854513664, - (1,18): 9223372036854251520, 9223372036853727232, 9223372036852678656, - (1,21): 9223372036850581504, 9223372036846387200, 9223372036837998592, - (1,24): 9223372036821221376, 9223372036787666944, 9223372036720558080, - (1,27): 9223372036586340352, 9223372036317904896, 9223372035781033984, - (1,30): 9223372034707292160, 9223372032559808512, 9223372028264841216, - (1,33): 9223372019674906624, 9223372002495037440, 9223371968135299072, - (1,36): 9223371899415822336, 9223371761976868864, 9223371487098961920, - (1,39): 9223370937343148032, 9223369837831520256, 9223367638808264704, - (1,42): 9223363240761753600, 9223354444668731392, 9223336852482686976, - (1,45): 9223301668110598144, 9223231299366420480, 9223090561878065152, - (1,48): 9222809086901354496, 9222246136947933184, 9221120237041090560, - (1,51): 9218868437227405312, 9214364837600034816, 9205357638345293824, - (1,54): 9187343239835811840, 9151314442816847872, 9079256848778919936, - (1,57): 8935141660703064064, 8646911284551352320, 8070450532247928832, - (1,60): 6917529027641081856, 4611686018427387904, 0, 0, - (2,0): 9223372036854775804, 9223372036854775800, 9223372036854775792, - (2,3): 9223372036854775776, 9223372036854775744, 9223372036854775680, - (2,6): 9223372036854775552, 9223372036854775296, 9223372036854774784, - (2,9): 9223372036854773760, 9223372036854771712, 9223372036854767616, - (2,12): 9223372036854759424, 9223372036854743040, 9223372036854710272, - (2,15): 9223372036854644736, 9223372036854513664, 9223372036854251520, - (2,18): 9223372036853727232, 9223372036852678656, 9223372036850581504, - (2,21): 9223372036846387200, 9223372036837998592, 9223372036821221376, - (2,24): 9223372036787666944, 9223372036720558080, 9223372036586340352, - (2,27): 9223372036317904896, 9223372035781033984, 9223372034707292160, - (2,30): 9223372032559808512, 9223372028264841216, 9223372019674906624, - (2,33): 9223372002495037440, 9223371968135299072, 9223371899415822336, - (2,36): 9223371761976868864, 9223371487098961920, 9223370937343148032, - (2,39): 9223369837831520256, 9223367638808264704, 9223363240761753600, - (2,42): 9223354444668731392, 9223336852482686976, 9223301668110598144, - (2,45): 9223231299366420480, 9223090561878065152, 9222809086901354496, - (2,48): 9222246136947933184, 9221120237041090560, 9218868437227405312, - (2,51): 9214364837600034816, 9205357638345293824, 9187343239835811840, - (2,54): 9151314442816847872, 9079256848778919936, 8935141660703064064, - (2,57): 8646911284551352320, 8070450532247928832, 6917529027641081856, - (2,60): 4611686018427387904, 0, 0, 0, - (3,0): 9223372036854775800, 9223372036854775792, 9223372036854775776, - (3,3): 9223372036854775744, 9223372036854775680, 9223372036854775552, - (3,6): 9223372036854775296, 9223372036854774784, 9223372036854773760, - (3,9): 9223372036854771712, 9223372036854767616, 9223372036854759424, - (3,12): 9223372036854743040, 9223372036854710272, 9223372036854644736, - (3,15): 9223372036854513664, 9223372036854251520, 9223372036853727232, - (3,18): 9223372036852678656, 9223372036850581504, 9223372036846387200, - (3,21): 9223372036837998592, 9223372036821221376, 9223372036787666944, - (3,24): 9223372036720558080, 9223372036586340352, 9223372036317904896, - (3,27): 9223372035781033984, 9223372034707292160, 9223372032559808512, - (3,30): 9223372028264841216, 9223372019674906624, 9223372002495037440, - (3,33): 9223371968135299072, 9223371899415822336, 9223371761976868864, - (3,36): 9223371487098961920, 9223370937343148032, 9223369837831520256, - (3,39): 9223367638808264704, 9223363240761753600, 9223354444668731392, - (3,42): 9223336852482686976, 9223301668110598144, 9223231299366420480, - (3,45): 9223090561878065152, 9222809086901354496, 9222246136947933184, - (3,48): 9221120237041090560, 9218868437227405312, 9214364837600034816, - (3,51): 9205357638345293824, 9187343239835811840, 9151314442816847872, - (3,54): 9079256848778919936, 8935141660703064064, 8646911284551352320, - (3,57): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, - (3,61): 0, 0, 0, - (4,0): 9223372036854775792, 9223372036854775776, 9223372036854775744, - (4,3): 9223372036854775680, 9223372036854775552, 9223372036854775296, - (4,6): 9223372036854774784, 9223372036854773760, 9223372036854771712, - (4,9): 9223372036854767616, 9223372036854759424, 9223372036854743040, - (4,12): 9223372036854710272, 9223372036854644736, 9223372036854513664, - (4,15): 9223372036854251520, 9223372036853727232, 9223372036852678656, - (4,18): 9223372036850581504, 9223372036846387200, 9223372036837998592, - (4,21): 9223372036821221376, 9223372036787666944, 9223372036720558080, - (4,24): 9223372036586340352, 9223372036317904896, 9223372035781033984, - (4,27): 9223372034707292160, 9223372032559808512, 9223372028264841216, - (4,30): 9223372019674906624, 9223372002495037440, 9223371968135299072, - (4,33): 9223371899415822336, 9223371761976868864, 9223371487098961920, - (4,36): 9223370937343148032, 9223369837831520256, 9223367638808264704, - (4,39): 9223363240761753600, 9223354444668731392, 9223336852482686976, - (4,42): 9223301668110598144, 9223231299366420480, 9223090561878065152, - (4,45): 9222809086901354496, 9222246136947933184, 9221120237041090560, - (4,48): 9218868437227405312, 9214364837600034816, 9205357638345293824, - (4,51): 9187343239835811840, 9151314442816847872, 9079256848778919936, - (4,54): 8935141660703064064, 8646911284551352320, 8070450532247928832, - (4,57): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0, - (5,0): 9223372036854775776, 9223372036854775744, 9223372036854775680, - (5,3): 9223372036854775552, 9223372036854775296, 9223372036854774784, - (5,6): 9223372036854773760, 9223372036854771712, 9223372036854767616, - (5,9): 9223372036854759424, 9223372036854743040, 9223372036854710272, - (5,12): 9223372036854644736, 9223372036854513664, 9223372036854251520, - (5,15): 9223372036853727232, 9223372036852678656, 9223372036850581504, - (5,18): 9223372036846387200, 9223372036837998592, 9223372036821221376, - (5,21): 9223372036787666944, 9223372036720558080, 9223372036586340352, - (5,24): 9223372036317904896, 9223372035781033984, 9223372034707292160, - (5,27): 9223372032559808512, 9223372028264841216, 9223372019674906624, - (5,30): 9223372002495037440, 9223371968135299072, 9223371899415822336, - (5,33): 9223371761976868864, 9223371487098961920, 9223370937343148032, - (5,36): 9223369837831520256, 9223367638808264704, 9223363240761753600, - (5,39): 9223354444668731392, 9223336852482686976, 9223301668110598144, - (5,42): 9223231299366420480, 9223090561878065152, 9222809086901354496, - (5,45): 9222246136947933184, 9221120237041090560, 9218868437227405312, - (5,48): 9214364837600034816, 9205357638345293824, 9187343239835811840, - (5,51): 9151314442816847872, 9079256848778919936, 8935141660703064064, - (5,54): 8646911284551352320, 8070450532247928832, 6917529027641081856, - (5,57): 4611686018427387904, 0, 0, 0, 0, 0, 0, - (6,0): 9223372036854775744, 9223372036854775680, 9223372036854775552, - (6,3): 9223372036854775296, 9223372036854774784, 9223372036854773760, - (6,6): 9223372036854771712, 9223372036854767616, 9223372036854759424, - (6,9): 9223372036854743040, 9223372036854710272, 9223372036854644736, - (6,12): 9223372036854513664, 9223372036854251520, 9223372036853727232, - (6,15): 9223372036852678656, 9223372036850581504, 9223372036846387200, - (6,18): 9223372036837998592, 9223372036821221376, 9223372036787666944, - (6,21): 9223372036720558080, 9223372036586340352, 9223372036317904896, - (6,24): 9223372035781033984, 9223372034707292160, 9223372032559808512, - (6,27): 9223372028264841216, 9223372019674906624, 9223372002495037440, - (6,30): 9223371968135299072, 9223371899415822336, 9223371761976868864, - (6,33): 9223371487098961920, 9223370937343148032, 9223369837831520256, - (6,36): 9223367638808264704, 9223363240761753600, 9223354444668731392, - (6,39): 9223336852482686976, 9223301668110598144, 9223231299366420480, - (6,42): 9223090561878065152, 9222809086901354496, 9222246136947933184, - (6,45): 9221120237041090560, 9218868437227405312, 9214364837600034816, - (6,48): 9205357638345293824, 9187343239835811840, 9151314442816847872, - (6,51): 9079256848778919936, 8935141660703064064, 8646911284551352320, - (6,54): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0, - (6,58): 0, 0, 0, 0, 0, 0, - (7,0): 9223372036854775680, 9223372036854775552, 9223372036854775296, - (7,3): 9223372036854774784, 9223372036854773760, 9223372036854771712, - (7,6): 9223372036854767616, 9223372036854759424, 9223372036854743040, - (7,9): 9223372036854710272, 9223372036854644736, 9223372036854513664, - (7,12): 9223372036854251520, 9223372036853727232, 9223372036852678656, - (7,15): 9223372036850581504, 9223372036846387200, 9223372036837998592, - (7,18): 9223372036821221376, 9223372036787666944, 9223372036720558080, - (7,21): 9223372036586340352, 9223372036317904896, 9223372035781033984, - (7,24): 9223372034707292160, 9223372032559808512, 9223372028264841216, - (7,27): 9223372019674906624, 9223372002495037440, 9223371968135299072, - (7,30): 9223371899415822336, 9223371761976868864, 9223371487098961920, - (7,33): 9223370937343148032, 9223369837831520256, 9223367638808264704, - (7,36): 9223363240761753600, 9223354444668731392, 9223336852482686976, - (7,39): 9223301668110598144, 9223231299366420480, 9223090561878065152, - (7,42): 9222809086901354496, 9222246136947933184, 9221120237041090560, - (7,45): 9218868437227405312, 9214364837600034816, 9205357638345293824, - (7,48): 9187343239835811840, 9151314442816847872, 9079256848778919936, - (7,51): 8935141660703064064, 8646911284551352320, 8070450532247928832, - (7,54): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedLongWhole.ddl b/tools/testfiles/tpbitsUnsignedLongWhole.ddl deleted file mode 100644 index 50ad02f..0000000 --- a/tools/testfiles/tpbitsUnsignedLongWhole.ddl +++ /dev/null @@ -1,59 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU32BITS" { - DATATYPE H5T_STD_U32LE - DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } - PACKED_BITS OFFSET=0 LENGTH=32 - DATA { - (0,0): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, - (0,5): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, - (0,10): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, - (0,15): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, - (0,20): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, - (0,25): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, - (0,30): 3221225472, 2147483648, - (1,0): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, - (1,5): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, - (1,10): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, - (1,15): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, - (1,20): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, - (1,25): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, - (1,30): 2147483648, 0, - (2,0): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, - (2,5): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, - (2,10): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, - (2,15): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, - (2,20): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, - (2,25): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, - (3,0): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, - (3,5): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, - (3,10): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, - (3,15): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, - (3,20): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, - (3,25): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, - (4,0): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, - (4,5): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, - (4,10): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, - (4,15): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, - (4,20): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, - (4,25): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, - (5,0): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, - (5,5): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, - (5,10): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, - (5,15): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, - (5,20): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, - (5,25): 3221225472, 2147483648, 0, 0, 0, 0, 0, - (6,0): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, - (6,5): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, - (6,10): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, - (6,15): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, - (6,20): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, - (6,25): 2147483648, 0, 0, 0, 0, 0, 0, - (7,0): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, - (7,5): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, - (7,10): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, - (7,15): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, - (7,20): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, - (7,27): 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/tpbitsUnsignedWhole.ddl b/tools/testfiles/tpbitsUnsignedWhole.ddl deleted file mode 100644 index 7c9e736..0000000 --- a/tools/testfiles/tpbitsUnsignedWhole.ddl +++ /dev/null @@ -1,17 +0,0 @@ -HDF5 "packedbits.h5" { -DATASET "/DU08BITS" { - DATATYPE H5T_STD_U8LE - DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } - PACKED_BITS OFFSET=0 LENGTH=8 - DATA { - (0,0): 255, 254, 252, 248, 240, 224, 192, 128, - (1,0): 254, 252, 248, 240, 224, 192, 128, 0, - (2,0): 252, 248, 240, 224, 192, 128, 0, 0, - (3,0): 248, 240, 224, 192, 128, 0, 0, 0, - (4,0): 240, 224, 192, 128, 0, 0, 0, 0, - (5,0): 224, 192, 128, 0, 0, 0, 0, 0, - (6,0): 192, 128, 0, 0, 0, 0, 0, 0, - (7,0): 128, 0, 0, 0, 0, 0, 0, 0 - } -} -} diff --git a/tools/testfiles/vds/1_a.h5 b/tools/testfiles/vds/1_a.h5 new file mode 100644 index 0000000..533728f Binary files /dev/null and b/tools/testfiles/vds/1_a.h5 differ diff --git a/tools/testfiles/vds/1_b.h5 b/tools/testfiles/vds/1_b.h5 new file mode 100644 index 0000000..4195588 Binary files /dev/null and b/tools/testfiles/vds/1_b.h5 differ diff --git a/tools/testfiles/vds/1_c.h5 b/tools/testfiles/vds/1_c.h5 new file mode 100644 index 0000000..cc6c2c7 Binary files /dev/null and b/tools/testfiles/vds/1_c.h5 differ diff --git a/tools/testfiles/vds/1_d.h5 b/tools/testfiles/vds/1_d.h5 new file mode 100644 index 0000000..20bea0b Binary files /dev/null and b/tools/testfiles/vds/1_d.h5 differ diff --git a/tools/testfiles/vds/1_e.h5 b/tools/testfiles/vds/1_e.h5 new file mode 100644 index 0000000..43e9cea Binary files /dev/null and b/tools/testfiles/vds/1_e.h5 differ diff --git a/tools/testfiles/vds/1_f.h5 b/tools/testfiles/vds/1_f.h5 new file mode 100644 index 0000000..c49843e Binary files /dev/null and b/tools/testfiles/vds/1_f.h5 differ diff --git a/tools/testfiles/vds/1_vds.h5 b/tools/testfiles/vds/1_vds.h5 new file mode 100644 index 0000000..59c76ea Binary files /dev/null and b/tools/testfiles/vds/1_vds.h5 differ diff --git a/tools/testfiles/vds/2_a.h5 b/tools/testfiles/vds/2_a.h5 new file mode 100644 index 0000000..bba7854 Binary files /dev/null and b/tools/testfiles/vds/2_a.h5 differ diff --git a/tools/testfiles/vds/2_b.h5 b/tools/testfiles/vds/2_b.h5 new file mode 100644 index 0000000..a30ff72 Binary files /dev/null and b/tools/testfiles/vds/2_b.h5 differ diff --git a/tools/testfiles/vds/2_c.h5 b/tools/testfiles/vds/2_c.h5 new file mode 100644 index 0000000..bec8e65 Binary files /dev/null and b/tools/testfiles/vds/2_c.h5 differ diff --git a/tools/testfiles/vds/2_d.h5 b/tools/testfiles/vds/2_d.h5 new file mode 100644 index 0000000..605ff85 Binary files /dev/null and b/tools/testfiles/vds/2_d.h5 differ diff --git a/tools/testfiles/vds/2_e.h5 b/tools/testfiles/vds/2_e.h5 new file mode 100644 index 0000000..a033de1 Binary files /dev/null and b/tools/testfiles/vds/2_e.h5 differ diff --git a/tools/testfiles/vds/2_vds.h5 b/tools/testfiles/vds/2_vds.h5 new file mode 100644 index 0000000..85f075a Binary files /dev/null and b/tools/testfiles/vds/2_vds.h5 differ diff --git a/tools/testfiles/vds/3_1_vds.h5 b/tools/testfiles/vds/3_1_vds.h5 new file mode 100644 index 0000000..9661907 Binary files /dev/null and b/tools/testfiles/vds/3_1_vds.h5 differ diff --git a/tools/testfiles/vds/3_2_vds.h5 b/tools/testfiles/vds/3_2_vds.h5 new file mode 100644 index 0000000..c39fee4 Binary files /dev/null and b/tools/testfiles/vds/3_2_vds.h5 differ diff --git a/tools/testfiles/vds/4_0.h5 b/tools/testfiles/vds/4_0.h5 new file mode 100644 index 0000000..3f5b594 Binary files /dev/null and b/tools/testfiles/vds/4_0.h5 differ diff --git a/tools/testfiles/vds/4_1.h5 b/tools/testfiles/vds/4_1.h5 new file mode 100644 index 0000000..0b91398 Binary files /dev/null and b/tools/testfiles/vds/4_1.h5 differ diff --git a/tools/testfiles/vds/4_2.h5 b/tools/testfiles/vds/4_2.h5 new file mode 100644 index 0000000..0ea8f8e Binary files /dev/null and b/tools/testfiles/vds/4_2.h5 differ diff --git a/tools/testfiles/vds/4_vds.h5 b/tools/testfiles/vds/4_vds.h5 new file mode 100644 index 0000000..de3457a Binary files /dev/null and b/tools/testfiles/vds/4_vds.h5 differ diff --git a/tools/testfiles/vds/5_a.h5 b/tools/testfiles/vds/5_a.h5 new file mode 100644 index 0000000..189e3b1 Binary files /dev/null and b/tools/testfiles/vds/5_a.h5 differ diff --git a/tools/testfiles/vds/5_b.h5 b/tools/testfiles/vds/5_b.h5 new file mode 100644 index 0000000..49b85ac Binary files /dev/null and b/tools/testfiles/vds/5_b.h5 differ diff --git a/tools/testfiles/vds/5_c.h5 b/tools/testfiles/vds/5_c.h5 new file mode 100644 index 0000000..5ea371e Binary files /dev/null and b/tools/testfiles/vds/5_c.h5 differ diff --git a/tools/testfiles/vds/5_vds.h5 b/tools/testfiles/vds/5_vds.h5 new file mode 100644 index 0000000..bee4974 Binary files /dev/null and b/tools/testfiles/vds/5_vds.h5 differ diff --git a/tools/testfiles/vds/tvds-1.ddl b/tools/testfiles/vds/tvds-1.ddl new file mode 100644 index 0000000..47fd413 --- /dev/null +++ b/tools/testfiles/vds/tvds-1.ddl @@ -0,0 +1,100 @@ +HDF5 "1_vds.h5" { +GROUP "/" { + DATASET "vds_dset" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 5, 18, 8 ) / ( H5S_UNLIMITED, 18, 8 ) } + DATA { + (0,0,0): 10, 10, 10, 10, 10, 10, 10, 10, + (0,1,0): 10, 10, 10, 10, 10, 10, 10, 10, + (0,2,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,3,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,4,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,5,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,6,0): 30, 30, 30, 30, 30, 30, 30, 30, + (0,7,0): 30, 30, 30, 30, 30, 30, 30, 30, + (0,8,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,9,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,10,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,11,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,12,0): 50, 50, 50, 50, 50, 50, 50, 50, + (0,13,0): 50, 50, 50, 50, 50, 50, 50, 50, + (0,14,0): 60, 60, 60, 60, 60, 60, 60, 60, + (0,15,0): 60, 60, 60, 60, 60, 60, 60, 60, + (0,16,0): 60, 60, 60, 60, 60, 60, 60, 60, + (0,17,0): 60, 60, 60, 60, 60, 60, 60, 60, + (1,0,0): 11, 11, 11, 11, 11, 11, 11, 11, + (1,1,0): 11, 11, 11, 11, 11, 11, 11, 11, + (1,2,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,3,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,4,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,5,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,6,0): 31, 31, 31, 31, 31, 31, 31, 31, + (1,7,0): 31, 31, 31, 31, 31, 31, 31, 31, + (1,8,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,9,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,10,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,11,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,12,0): 51, 51, 51, 51, 51, 51, 51, 51, + (1,13,0): 51, 51, 51, 51, 51, 51, 51, 51, + (1,14,0): 61, 61, 61, 61, 61, 61, 61, 61, + (1,15,0): 61, 61, 61, 61, 61, 61, 61, 61, + (1,16,0): 61, 61, 61, 61, 61, 61, 61, 61, + (1,17,0): 61, 61, 61, 61, 61, 61, 61, 61, + (2,0,0): 12, 12, 12, 12, 12, 12, 12, 12, + (2,1,0): 12, 12, 12, 12, 12, 12, 12, 12, + (2,2,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,3,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,4,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,5,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,6,0): 32, 32, 32, 32, 32, 32, 32, 32, + (2,7,0): 32, 32, 32, 32, 32, 32, 32, 32, + (2,8,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,9,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,10,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,11,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,12,0): 52, 52, 52, 52, 52, 52, 52, 52, + (2,13,0): 52, 52, 52, 52, 52, 52, 52, 52, + (2,14,0): 62, 62, 62, 62, 62, 62, 62, 62, + (2,15,0): 62, 62, 62, 62, 62, 62, 62, 62, + (2,16,0): 62, 62, 62, 62, 62, 62, 62, 62, + (2,17,0): 62, 62, 62, 62, 62, 62, 62, 62, + (3,0,0): 13, 13, 13, 13, 13, 13, 13, 13, + (3,1,0): 13, 13, 13, 13, 13, 13, 13, 13, + (3,2,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,3,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,4,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,5,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,6,0): 33, 33, 33, 33, 33, 33, 33, 33, + (3,7,0): 33, 33, 33, 33, 33, 33, 33, 33, + (3,8,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,9,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,10,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,11,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,12,0): 53, 53, 53, 53, 53, 53, 53, 53, + (3,13,0): 53, 53, 53, 53, 53, 53, 53, 53, + (3,14,0): 63, 63, 63, 63, 63, 63, 63, 63, + (3,15,0): 63, 63, 63, 63, 63, 63, 63, 63, + (3,16,0): 63, 63, 63, 63, 63, 63, 63, 63, + (3,17,0): 63, 63, 63, 63, 63, 63, 63, 63, + (4,0,0): 14, 14, 14, 14, 14, 14, 14, 14, + (4,1,0): 14, 14, 14, 14, 14, 14, 14, 14, + (4,2,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,3,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,4,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,5,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,6,0): 34, 34, 34, 34, 34, 34, 34, 34, + (4,7,0): 34, 34, 34, 34, 34, 34, 34, 34, + (4,8,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,9,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,10,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,11,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,12,0): 54, 54, 54, 54, 54, 54, 54, 54, + (4,13,0): 54, 54, 54, 54, 54, 54, 54, 54, + (4,14,0): 64, 64, 64, 64, 64, 64, 64, 64, + (4,15,0): 64, 64, 64, 64, 64, 64, 64, 64, + (4,16,0): 64, 64, 64, 64, 64, 64, 64, 64, + (4,17,0): 64, 64, 64, 64, 64, 64, 64, 64 + } + } +} +} diff --git a/tools/testfiles/vds/tvds-2.ddl b/tools/testfiles/vds/tvds-2.ddl new file mode 100644 index 0000000..5f2ae16 --- /dev/null +++ b/tools/testfiles/vds/tvds-2.ddl @@ -0,0 +1,58 @@ +HDF5 "2_vds.h5" { +GROUP "/" { + DATASET "vds_dset" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 6, 8, 14 ) / ( H5S_UNLIMITED, 8, 14 ) } + DATA { + (0,0,0): 10, 10, 10, 10, 10, 10, 10, 40, 40, 40, 40, 40, 40, 40, + (0,1,0): 10, 10, 10, 10, 10, 10, 10, 40, 40, 40, 40, 40, 40, 40, + (0,2,0): 20, 20, 20, 20, 20, 20, 20, 40, 40, 40, 40, 40, 40, 40, + (0,3,0): 20, 20, 20, 20, 20, 20, 20, 40, 40, 40, 40, 40, 40, 40, + (0,4,0): 20, 20, 20, 20, 20, 20, 20, 40, 40, 40, 40, 40, 40, 40, + (0,5,0): 20, 20, 20, 20, 20, 20, 20, 50, 50, 50, 50, 50, 50, 50, + (0,6,0): 30, 30, 30, 30, 30, 30, 30, 50, 50, 50, 50, 50, 50, 50, + (0,7,0): 30, 30, 30, 30, 30, 30, 30, 50, 50, 50, 50, 50, 50, 50, + (1,0,0): 11, 11, 11, 11, 11, 11, 11, 41, 41, 41, 41, 41, 41, 41, + (1,1,0): 11, 11, 11, 11, 11, 11, 11, 41, 41, 41, 41, 41, 41, 41, + (1,2,0): 21, 21, 21, 21, 21, 21, 21, 41, 41, 41, 41, 41, 41, 41, + (1,3,0): 21, 21, 21, 21, 21, 21, 21, 41, 41, 41, 41, 41, 41, 41, + (1,4,0): 21, 21, 21, 21, 21, 21, 21, 41, 41, 41, 41, 41, 41, 41, + (1,5,0): 21, 21, 21, 21, 21, 21, 21, 51, 51, 51, 51, 51, 51, 51, + (1,6,0): 31, 31, 31, 31, 31, 31, 31, 51, 51, 51, 51, 51, 51, 51, + (1,7,0): 31, 31, 31, 31, 31, 31, 31, 51, 51, 51, 51, 51, 51, 51, + (2,0,0): 12, 12, 12, 12, 12, 12, 12, 42, 42, 42, 42, 42, 42, 42, + (2,1,0): 12, 12, 12, 12, 12, 12, 12, 42, 42, 42, 42, 42, 42, 42, + (2,2,0): 22, 22, 22, 22, 22, 22, 22, 42, 42, 42, 42, 42, 42, 42, + (2,3,0): 22, 22, 22, 22, 22, 22, 22, 42, 42, 42, 42, 42, 42, 42, + (2,4,0): 22, 22, 22, 22, 22, 22, 22, 42, 42, 42, 42, 42, 42, 42, + (2,5,0): 22, 22, 22, 22, 22, 22, 22, 52, 52, 52, 52, 52, 52, 52, + (2,6,0): 32, 32, 32, 32, 32, 32, 32, 52, 52, 52, 52, 52, 52, 52, + (2,7,0): 32, 32, 32, 32, 32, 32, 32, 52, 52, 52, 52, 52, 52, 52, + (3,0,0): 13, 13, 13, 13, 13, 13, 13, 43, 43, 43, 43, 43, 43, 43, + (3,1,0): 13, 13, 13, 13, 13, 13, 13, 43, 43, 43, 43, 43, 43, 43, + (3,2,0): 23, 23, 23, 23, 23, 23, 23, 43, 43, 43, 43, 43, 43, 43, + (3,3,0): 23, 23, 23, 23, 23, 23, 23, 43, 43, 43, 43, 43, 43, 43, + (3,4,0): 23, 23, 23, 23, 23, 23, 23, 43, 43, 43, 43, 43, 43, 43, + (3,5,0): 23, 23, 23, 23, 23, 23, 23, 53, 53, 53, 53, 53, 53, 53, + (3,6,0): 33, 33, 33, 33, 33, 33, 33, 53, 53, 53, 53, 53, 53, 53, + (3,7,0): 33, 33, 33, 33, 33, 33, 33, 53, 53, 53, 53, 53, 53, 53, + (4,0,0): 14, 14, 14, 14, 14, 14, 14, 44, 44, 44, 44, 44, 44, 44, + (4,1,0): 14, 14, 14, 14, 14, 14, 14, 44, 44, 44, 44, 44, 44, 44, + (4,2,0): 24, 24, 24, 24, 24, 24, 24, 44, 44, 44, 44, 44, 44, 44, + (4,3,0): 24, 24, 24, 24, 24, 24, 24, 44, 44, 44, 44, 44, 44, 44, + (4,4,0): 24, 24, 24, 24, 24, 24, 24, 44, 44, 44, 44, 44, 44, 44, + (4,5,0): 24, 24, 24, 24, 24, 24, 24, 54, 54, 54, 54, 54, 54, 54, + (4,6,0): 34, 34, 34, 34, 34, 34, 34, 54, 54, 54, 54, 54, 54, 54, + (4,7,0): 34, 34, 34, 34, 34, 34, 34, 54, 54, 54, 54, 54, 54, 54, + (5,0,0): 15, 15, 15, 15, 15, 15, 15, 45, 45, 45, 45, 45, 45, 45, + (5,1,0): 15, 15, 15, 15, 15, 15, 15, 45, 45, 45, 45, 45, 45, 45, + (5,2,0): 25, 25, 25, 25, 25, 25, 25, 45, 45, 45, 45, 45, 45, 45, + (5,3,0): 25, 25, 25, 25, 25, 25, 25, 45, 45, 45, 45, 45, 45, 45, + (5,4,0): 25, 25, 25, 25, 25, 25, 25, 45, 45, 45, 45, 45, 45, 45, + (5,5,0): 25, 25, 25, 25, 25, 25, 25, 55, 55, 55, 55, 55, 55, 55, + (5,6,0): 35, 35, 35, 35, 35, 35, 35, 55, 55, 55, 55, 55, 55, 55, + (5,7,0): 35, 35, 35, 35, 35, 35, 35, 55, 55, 55, 55, 55, 55, 55 + } + } +} +} diff --git a/tools/testfiles/vds/tvds-3_1.ddl b/tools/testfiles/vds/tvds-3_1.ddl new file mode 100644 index 0000000..7d7d8b6 --- /dev/null +++ b/tools/testfiles/vds/tvds-3_1.ddl @@ -0,0 +1,135 @@ +HDF5 "3_1_vds.h5" { +GROUP "/" { + DATASET "vds_dset" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 5, 25, 8 ) / ( H5S_UNLIMITED, 25, 8 ) } + DATA { + (0,0,0): -9, -9, -9, -9, -9, -9, -9, -9, + (0,1,0): 10, 10, 10, 10, 10, 10, 10, 10, + (0,2,0): 10, 10, 10, 10, 10, 10, 10, 10, + (0,3,0): -9, -9, -9, -9, -9, -9, -9, -9, + (0,4,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,5,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,6,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,7,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,8,0): -9, -9, -9, -9, -9, -9, -9, -9, + (0,9,0): 30, 30, 30, 30, 30, 30, 30, 30, + (0,10,0): 30, 30, 30, 30, 30, 30, 30, 30, + (0,11,0): -9, -9, -9, -9, -9, -9, -9, -9, + (0,12,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,13,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,14,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,15,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,16,0): -9, -9, -9, -9, -9, -9, -9, -9, + (0,17,0): 50, 50, 50, 50, 50, 50, 50, 50, + (0,18,0): 50, 50, 50, 50, 50, 50, 50, 50, + (0,19,0): -9, -9, -9, -9, -9, -9, -9, -9, + (0,20,0): 60, 60, 60, 60, 60, 60, 60, 60, + (0,21,0): 60, 60, 60, 60, 60, 60, 60, 60, + (0,22,0): 60, 60, 60, 60, 60, 60, 60, 60, + (0,23,0): 60, 60, 60, 60, 60, 60, 60, 60, + (0,24,0): -9, -9, -9, -9, -9, -9, -9, -9, + (1,0,0): -9, -9, -9, -9, -9, -9, -9, -9, + (1,1,0): 11, 11, 11, 11, 11, 11, 11, 11, + (1,2,0): 11, 11, 11, 11, 11, 11, 11, 11, + (1,3,0): -9, -9, -9, -9, -9, -9, -9, -9, + (1,4,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,5,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,6,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,7,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,8,0): -9, -9, -9, -9, -9, -9, -9, -9, + (1,9,0): 31, 31, 31, 31, 31, 31, 31, 31, + (1,10,0): 31, 31, 31, 31, 31, 31, 31, 31, + (1,11,0): -9, -9, -9, -9, -9, -9, -9, -9, + (1,12,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,13,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,14,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,15,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,16,0): -9, -9, -9, -9, -9, -9, -9, -9, + (1,17,0): 51, 51, 51, 51, 51, 51, 51, 51, + (1,18,0): 51, 51, 51, 51, 51, 51, 51, 51, + (1,19,0): -9, -9, -9, -9, -9, -9, -9, -9, + (1,20,0): 61, 61, 61, 61, 61, 61, 61, 61, + (1,21,0): 61, 61, 61, 61, 61, 61, 61, 61, + (1,22,0): 61, 61, 61, 61, 61, 61, 61, 61, + (1,23,0): 61, 61, 61, 61, 61, 61, 61, 61, + (1,24,0): -9, -9, -9, -9, -9, -9, -9, -9, + (2,0,0): -9, -9, -9, -9, -9, -9, -9, -9, + (2,1,0): 12, 12, 12, 12, 12, 12, 12, 12, + (2,2,0): 12, 12, 12, 12, 12, 12, 12, 12, + (2,3,0): -9, -9, -9, -9, -9, -9, -9, -9, + (2,4,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,5,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,6,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,7,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,8,0): -9, -9, -9, -9, -9, -9, -9, -9, + (2,9,0): 32, 32, 32, 32, 32, 32, 32, 32, + (2,10,0): 32, 32, 32, 32, 32, 32, 32, 32, + (2,11,0): -9, -9, -9, -9, -9, -9, -9, -9, + (2,12,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,13,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,14,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,15,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,16,0): -9, -9, -9, -9, -9, -9, -9, -9, + (2,17,0): 52, 52, 52, 52, 52, 52, 52, 52, + (2,18,0): 52, 52, 52, 52, 52, 52, 52, 52, + (2,19,0): -9, -9, -9, -9, -9, -9, -9, -9, + (2,20,0): 62, 62, 62, 62, 62, 62, 62, 62, + (2,21,0): 62, 62, 62, 62, 62, 62, 62, 62, + (2,22,0): 62, 62, 62, 62, 62, 62, 62, 62, + (2,23,0): 62, 62, 62, 62, 62, 62, 62, 62, + (2,24,0): -9, -9, -9, -9, -9, -9, -9, -9, + (3,0,0): -9, -9, -9, -9, -9, -9, -9, -9, + (3,1,0): 13, 13, 13, 13, 13, 13, 13, 13, + (3,2,0): 13, 13, 13, 13, 13, 13, 13, 13, + (3,3,0): -9, -9, -9, -9, -9, -9, -9, -9, + (3,4,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,5,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,6,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,7,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,8,0): -9, -9, -9, -9, -9, -9, -9, -9, + (3,9,0): 33, 33, 33, 33, 33, 33, 33, 33, + (3,10,0): 33, 33, 33, 33, 33, 33, 33, 33, + (3,11,0): -9, -9, -9, -9, -9, -9, -9, -9, + (3,12,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,13,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,14,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,15,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,16,0): -9, -9, -9, -9, -9, -9, -9, -9, + (3,17,0): 53, 53, 53, 53, 53, 53, 53, 53, + (3,18,0): 53, 53, 53, 53, 53, 53, 53, 53, + (3,19,0): -9, -9, -9, -9, -9, -9, -9, -9, + (3,20,0): 63, 63, 63, 63, 63, 63, 63, 63, + (3,21,0): 63, 63, 63, 63, 63, 63, 63, 63, + (3,22,0): 63, 63, 63, 63, 63, 63, 63, 63, + (3,23,0): 63, 63, 63, 63, 63, 63, 63, 63, + (3,24,0): -9, -9, -9, -9, -9, -9, -9, -9, + (4,0,0): -9, -9, -9, -9, -9, -9, -9, -9, + (4,1,0): 14, 14, 14, 14, 14, 14, 14, 14, + (4,2,0): 14, 14, 14, 14, 14, 14, 14, 14, + (4,3,0): -9, -9, -9, -9, -9, -9, -9, -9, + (4,4,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,5,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,6,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,7,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,8,0): -9, -9, -9, -9, -9, -9, -9, -9, + (4,9,0): 34, 34, 34, 34, 34, 34, 34, 34, + (4,10,0): 34, 34, 34, 34, 34, 34, 34, 34, + (4,11,0): -9, -9, -9, -9, -9, -9, -9, -9, + (4,12,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,13,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,14,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,15,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,16,0): -9, -9, -9, -9, -9, -9, -9, -9, + (4,17,0): 54, 54, 54, 54, 54, 54, 54, 54, + (4,18,0): 54, 54, 54, 54, 54, 54, 54, 54, + (4,19,0): -9, -9, -9, -9, -9, -9, -9, -9, + (4,20,0): 64, 64, 64, 64, 64, 64, 64, 64, + (4,21,0): 64, 64, 64, 64, 64, 64, 64, 64, + (4,22,0): 64, 64, 64, 64, 64, 64, 64, 64, + (4,23,0): 64, 64, 64, 64, 64, 64, 64, 64, + (4,24,0): -9, -9, -9, -9, -9, -9, -9, -9 + } + } +} +} diff --git a/tools/testfiles/vds/tvds-3_2.ddl b/tools/testfiles/vds/tvds-3_2.ddl new file mode 100644 index 0000000..baec6f0 --- /dev/null +++ b/tools/testfiles/vds/tvds-3_2.ddl @@ -0,0 +1,166 @@ +HDF5 "3_2_vds.h5" { +GROUP "/" { + DATASET "vds_dset" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 6, 13, 19 ) / ( H5S_UNLIMITED, 13, 19 ) } + DATA { + (0,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, + (0,0,15): -9, -9, -9, -9, + (0,1,0): -9, 10, 10, 10, 10, 10, 10, 10, -9, 40, 40, 40, 40, 40, 40, + (0,1,15): 40, -9, -9, -9, + (0,2,0): -9, 10, 10, 10, 10, 10, 10, 10, -9, 40, 40, 40, 40, 40, 40, + (0,2,15): 40, -9, -9, -9, + (0,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 40, 40, 40, 40, 40, 40, + (0,3,15): 40, -9, -9, -9, + (0,4,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, 40, 40, 40, 40, 40, 40, + (0,4,15): 40, -9, -9, -9, + (0,5,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, 40, 40, 40, 40, 40, 40, + (0,5,15): 40, -9, -9, -9, + (0,6,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, -9, -9, -9, -9, -9, -9, + (0,6,15): -9, -9, -9, -9, + (0,7,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, -9, -9, -9, -9, -9, -9, + (0,7,15): -9, -9, -9, -9, + (0,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 50, 50, 50, + (0,8,15): 50, 50, 50, 50, + (0,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 50, 50, 50, + (0,9,15): 50, 50, 50, 50, + (0,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 50, 50, 50, + (0,10,15): 50, 50, 50, 50, + (0,11,0): -9, -9, -9, -9, 30, 30, 30, 30, 30, 30, 30, -9, -9, -9, -9, + (0,11,15): -9, -9, -9, -9, + (0,12,0): -9, -9, -9, -9, 30, 30, 30, 30, 30, 30, 30, -9, -9, -9, -9, + (0,12,15): -9, -9, -9, -9, + (1,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, + (1,0,15): -9, -9, -9, -9, + (1,1,0): -9, 11, 11, 11, 11, 11, 11, 11, -9, 41, 41, 41, 41, 41, 41, + (1,1,15): 41, -9, -9, -9, + (1,2,0): -9, 11, 11, 11, 11, 11, 11, 11, -9, 41, 41, 41, 41, 41, 41, + (1,2,15): 41, -9, -9, -9, + (1,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 41, 41, 41, 41, 41, 41, + (1,3,15): 41, -9, -9, -9, + (1,4,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, 41, 41, 41, 41, 41, 41, + (1,4,15): 41, -9, -9, -9, + (1,5,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, 41, 41, 41, 41, 41, 41, + (1,5,15): 41, -9, -9, -9, + (1,6,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, -9, -9, -9, -9, -9, -9, + (1,6,15): -9, -9, -9, -9, + (1,7,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, -9, -9, -9, -9, -9, -9, + (1,7,15): -9, -9, -9, -9, + (1,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 51, 51, 51, + (1,8,15): 51, 51, 51, 51, + (1,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 51, 51, 51, + (1,9,15): 51, 51, 51, 51, + (1,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 51, 51, 51, + (1,10,15): 51, 51, 51, 51, + (1,11,0): -9, -9, -9, -9, 31, 31, 31, 31, 31, 31, 31, -9, -9, -9, -9, + (1,11,15): -9, -9, -9, -9, + (1,12,0): -9, -9, -9, -9, 31, 31, 31, 31, 31, 31, 31, -9, -9, -9, -9, + (1,12,15): -9, -9, -9, -9, + (2,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, + (2,0,15): -9, -9, -9, -9, + (2,1,0): -9, 12, 12, 12, 12, 12, 12, 12, -9, 42, 42, 42, 42, 42, 42, + (2,1,15): 42, -9, -9, -9, + (2,2,0): -9, 12, 12, 12, 12, 12, 12, 12, -9, 42, 42, 42, 42, 42, 42, + (2,2,15): 42, -9, -9, -9, + (2,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 42, 42, 42, 42, 42, 42, + (2,3,15): 42, -9, -9, -9, + (2,4,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, 42, 42, 42, 42, 42, 42, + (2,4,15): 42, -9, -9, -9, + (2,5,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, 42, 42, 42, 42, 42, 42, + (2,5,15): 42, -9, -9, -9, + (2,6,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, -9, -9, -9, -9, -9, -9, + (2,6,15): -9, -9, -9, -9, + (2,7,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, -9, -9, -9, -9, -9, -9, + (2,7,15): -9, -9, -9, -9, + (2,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 52, 52, 52, + (2,8,15): 52, 52, 52, 52, + (2,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 52, 52, 52, + (2,9,15): 52, 52, 52, 52, + (2,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 52, 52, 52, + (2,10,15): 52, 52, 52, 52, + (2,11,0): -9, -9, -9, -9, 32, 32, 32, 32, 32, 32, 32, -9, -9, -9, -9, + (2,11,15): -9, -9, -9, -9, + (2,12,0): -9, -9, -9, -9, 32, 32, 32, 32, 32, 32, 32, -9, -9, -9, -9, + (2,12,15): -9, -9, -9, -9, + (3,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, + (3,0,15): -9, -9, -9, -9, + (3,1,0): -9, 13, 13, 13, 13, 13, 13, 13, -9, 43, 43, 43, 43, 43, 43, + (3,1,15): 43, -9, -9, -9, + (3,2,0): -9, 13, 13, 13, 13, 13, 13, 13, -9, 43, 43, 43, 43, 43, 43, + (3,2,15): 43, -9, -9, -9, + (3,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 43, 43, 43, 43, 43, 43, + (3,3,15): 43, -9, -9, -9, + (3,4,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, 43, 43, 43, 43, 43, 43, + (3,4,15): 43, -9, -9, -9, + (3,5,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, 43, 43, 43, 43, 43, 43, + (3,5,15): 43, -9, -9, -9, + (3,6,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, -9, -9, -9, -9, -9, -9, + (3,6,15): -9, -9, -9, -9, + (3,7,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, -9, -9, -9, -9, -9, -9, + (3,7,15): -9, -9, -9, -9, + (3,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 53, 53, 53, + (3,8,15): 53, 53, 53, 53, + (3,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 53, 53, 53, + (3,9,15): 53, 53, 53, 53, + (3,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 53, 53, 53, + (3,10,15): 53, 53, 53, 53, + (3,11,0): -9, -9, -9, -9, 33, 33, 33, 33, 33, 33, 33, -9, -9, -9, -9, + (3,11,15): -9, -9, -9, -9, + (3,12,0): -9, -9, -9, -9, 33, 33, 33, 33, 33, 33, 33, -9, -9, -9, -9, + (3,12,15): -9, -9, -9, -9, + (4,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, + (4,0,15): -9, -9, -9, -9, + (4,1,0): -9, 14, 14, 14, 14, 14, 14, 14, -9, 44, 44, 44, 44, 44, 44, + (4,1,15): 44, -9, -9, -9, + (4,2,0): -9, 14, 14, 14, 14, 14, 14, 14, -9, 44, 44, 44, 44, 44, 44, + (4,2,15): 44, -9, -9, -9, + (4,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 44, 44, 44, 44, 44, 44, + (4,3,15): 44, -9, -9, -9, + (4,4,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, 44, 44, 44, 44, 44, 44, + (4,4,15): 44, -9, -9, -9, + (4,5,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, 44, 44, 44, 44, 44, 44, + (4,5,15): 44, -9, -9, -9, + (4,6,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, -9, -9, -9, -9, -9, -9, + (4,6,15): -9, -9, -9, -9, + (4,7,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, -9, -9, -9, -9, -9, -9, + (4,7,15): -9, -9, -9, -9, + (4,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 54, 54, 54, + (4,8,15): 54, 54, 54, 54, + (4,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 54, 54, 54, + (4,9,15): 54, 54, 54, 54, + (4,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 54, 54, 54, + (4,10,15): 54, 54, 54, 54, + (4,11,0): -9, -9, -9, -9, 34, 34, 34, 34, 34, 34, 34, -9, -9, -9, -9, + (4,11,15): -9, -9, -9, -9, + (4,12,0): -9, -9, -9, -9, 34, 34, 34, 34, 34, 34, 34, -9, -9, -9, -9, + (4,12,15): -9, -9, -9, -9, + (5,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, + (5,0,15): -9, -9, -9, -9, + (5,1,0): -9, 15, 15, 15, 15, 15, 15, 15, -9, 45, 45, 45, 45, 45, 45, + (5,1,15): 45, -9, -9, -9, + (5,2,0): -9, 15, 15, 15, 15, 15, 15, 15, -9, 45, 45, 45, 45, 45, 45, + (5,2,15): 45, -9, -9, -9, + (5,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 45, 45, 45, 45, 45, 45, + (5,3,15): 45, -9, -9, -9, + (5,4,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, 45, 45, 45, 45, 45, 45, + (5,4,15): 45, -9, -9, -9, + (5,5,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, 45, 45, 45, 45, 45, 45, + (5,5,15): 45, -9, -9, -9, + (5,6,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, -9, -9, -9, -9, -9, -9, + (5,6,15): -9, -9, -9, -9, + (5,7,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, -9, -9, -9, -9, -9, -9, + (5,7,15): -9, -9, -9, -9, + (5,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 55, 55, 55, + (5,8,15): 55, 55, 55, 55, + (5,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 55, 55, 55, + (5,9,15): 55, 55, 55, 55, + (5,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 55, 55, 55, + (5,10,15): 55, 55, 55, 55, + (5,11,0): -9, -9, -9, -9, 35, 35, 35, 35, 35, 35, 35, -9, -9, -9, -9, + (5,11,15): -9, -9, -9, -9, + (5,12,0): -9, -9, -9, -9, 35, 35, 35, 35, 35, 35, 35, -9, -9, -9, -9, + (5,12,15): -9, -9, -9, -9 + } + } +} +} diff --git a/tools/testfiles/vds/tvds-4.ddl b/tools/testfiles/vds/tvds-4.ddl new file mode 100644 index 0000000..1832724 --- /dev/null +++ b/tools/testfiles/vds/tvds-4.ddl @@ -0,0 +1,46 @@ +HDF5 "4_vds.h5" { +GROUP "/" { + DATASET "vds_dset" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 9, 4, 4 ) / ( H5S_UNLIMITED, 4, 4 ) } + DATA { + (0,0,0): 10, 10, 10, 10, + (0,1,0): 10, 10, 10, 10, + (0,2,0): 10, 10, 10, 10, + (0,3,0): 10, 10, 10, 10, + (1,0,0): 11, 11, 11, 11, + (1,1,0): 11, 11, 11, 11, + (1,2,0): 11, 11, 11, 11, + (1,3,0): 11, 11, 11, 11, + (2,0,0): 12, 12, 12, 12, + (2,1,0): 12, 12, 12, 12, + (2,2,0): 12, 12, 12, 12, + (2,3,0): 12, 12, 12, 12, + (3,0,0): 20, 20, 20, 20, + (3,1,0): 20, 20, 20, 20, + (3,2,0): 20, 20, 20, 20, + (3,3,0): 20, 20, 20, 20, + (4,0,0): 21, 21, 21, 21, + (4,1,0): 21, 21, 21, 21, + (4,2,0): 21, 21, 21, 21, + (4,3,0): 21, 21, 21, 21, + (5,0,0): 22, 22, 22, 22, + (5,1,0): 22, 22, 22, 22, + (5,2,0): 22, 22, 22, 22, + (5,3,0): 22, 22, 22, 22, + (6,0,0): 30, 30, 30, 30, + (6,1,0): 30, 30, 30, 30, + (6,2,0): 30, 30, 30, 30, + (6,3,0): 30, 30, 30, 30, + (7,0,0): 31, 31, 31, 31, + (7,1,0): 31, 31, 31, 31, + (7,2,0): 31, 31, 31, 31, + (7,3,0): 31, 31, 31, 31, + (8,0,0): 32, 32, 32, 32, + (8,1,0): 32, 32, 32, 32, + (8,2,0): 32, 32, 32, 32, + (8,3,0): 32, 32, 32, 32 + } + } +} +} diff --git a/tools/testfiles/vds/tvds-5.ddl b/tools/testfiles/vds/tvds-5.ddl new file mode 100644 index 0000000..f59017b --- /dev/null +++ b/tools/testfiles/vds/tvds-5.ddl @@ -0,0 +1,46 @@ +HDF5 "5_vds.h5" { +GROUP "/" { + DATASET "vds_dset" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 9, 4, 4 ) / ( H5S_UNLIMITED, 4, 4 ) } + DATA { + (0,0,0): 10, 10, 10, 10, + (0,1,0): 10, 10, 10, 10, + (0,2,0): 10, 10, 10, 10, + (0,3,0): 10, 10, 10, 10, + (1,0,0): 20, 20, 20, 20, + (1,1,0): 20, 20, 20, 20, + (1,2,0): 20, 20, 20, 20, + (1,3,0): 20, 20, 20, 20, + (2,0,0): 30, 30, 30, 30, + (2,1,0): 30, 30, 30, 30, + (2,2,0): 30, 30, 30, 30, + (2,3,0): 30, 30, 30, 30, + (3,0,0): 11, 11, 11, 11, + (3,1,0): 11, 11, 11, 11, + (3,2,0): 11, 11, 11, 11, + (3,3,0): 11, 11, 11, 11, + (4,0,0): 21, 21, 21, 21, + (4,1,0): 21, 21, 21, 21, + (4,2,0): 21, 21, 21, 21, + (4,3,0): 21, 21, 21, 21, + (5,0,0): 31, 31, 31, 31, + (5,1,0): 31, 31, 31, 31, + (5,2,0): 31, 31, 31, 31, + (5,3,0): 31, 31, 31, 31, + (6,0,0): 12, 12, 12, 12, + (6,1,0): 12, 12, 12, 12, + (6,2,0): 12, 12, 12, 12, + (6,3,0): 12, 12, 12, 12, + (7,0,0): 22, 22, 22, 22, + (7,1,0): 22, 22, 22, 22, + (7,2,0): 22, 22, 22, 22, + (7,3,0): 22, 22, 22, 22, + (8,0,0): 32, 32, 32, 32, + (8,1,0): 32, 32, 32, 32, + (8,2,0): 32, 32, 32, 32, + (8,3,0): 32, 32, 32, 32 + } + } +} +} diff --git a/tools/testfiles/vds/tvds_layout-1.ddl b/tools/testfiles/vds/tvds_layout-1.ddl new file mode 100644 index 0000000..5d8a62c --- /dev/null +++ b/tools/testfiles/vds/tvds_layout-1.ddl @@ -0,0 +1,232 @@ +HDF5 "1_vds.h5" { +GROUP "/" { + DATASET "vds_dset" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 5, 18, 8 ) / ( H5S_UNLIMITED, 18, 8 ) } + STORAGE_LAYOUT { + MAPPING 0 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,8) + } + } + SOURCE { + FILE "1_a.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,8) + } + } + } + MAPPING 1 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,2,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,8) + } + } + SOURCE { + FILE "1_b.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,8) + } + } + } + MAPPING 2 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,6,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,8) + } + } + SOURCE { + FILE "1_c.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,8) + } + } + } + MAPPING 3 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,8,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,8) + } + } + SOURCE { + FILE "1_d.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,8) + } + } + } + MAPPING 4 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,12,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,8) + } + } + SOURCE { + FILE "1_e.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,8) + } + } + } + MAPPING 5 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,14,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,8) + } + } + SOURCE { + FILE "1_f.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,8) + } + } + } + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE -9 + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + DATA { + (0,0,0): 10, 10, 10, 10, 10, 10, 10, 10, + (0,1,0): 10, 10, 10, 10, 10, 10, 10, 10, + (0,2,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,3,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,4,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,5,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,6,0): 30, 30, 30, 30, 30, 30, 30, 30, + (0,7,0): 30, 30, 30, 30, 30, 30, 30, 30, + (0,8,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,9,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,10,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,11,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,12,0): 50, 50, 50, 50, 50, 50, 50, 50, + (0,13,0): 50, 50, 50, 50, 50, 50, 50, 50, + (0,14,0): 60, 60, 60, 60, 60, 60, 60, 60, + (0,15,0): 60, 60, 60, 60, 60, 60, 60, 60, + (0,16,0): 60, 60, 60, 60, 60, 60, 60, 60, + (0,17,0): 60, 60, 60, 60, 60, 60, 60, 60, + (1,0,0): 11, 11, 11, 11, 11, 11, 11, 11, + (1,1,0): 11, 11, 11, 11, 11, 11, 11, 11, + (1,2,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,3,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,4,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,5,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,6,0): 31, 31, 31, 31, 31, 31, 31, 31, + (1,7,0): 31, 31, 31, 31, 31, 31, 31, 31, + (1,8,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,9,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,10,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,11,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,12,0): 51, 51, 51, 51, 51, 51, 51, 51, + (1,13,0): 51, 51, 51, 51, 51, 51, 51, 51, + (1,14,0): 61, 61, 61, 61, 61, 61, 61, 61, + (1,15,0): 61, 61, 61, 61, 61, 61, 61, 61, + (1,16,0): 61, 61, 61, 61, 61, 61, 61, 61, + (1,17,0): 61, 61, 61, 61, 61, 61, 61, 61, + (2,0,0): 12, 12, 12, 12, 12, 12, 12, 12, + (2,1,0): 12, 12, 12, 12, 12, 12, 12, 12, + (2,2,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,3,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,4,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,5,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,6,0): 32, 32, 32, 32, 32, 32, 32, 32, + (2,7,0): 32, 32, 32, 32, 32, 32, 32, 32, + (2,8,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,9,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,10,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,11,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,12,0): 52, 52, 52, 52, 52, 52, 52, 52, + (2,13,0): 52, 52, 52, 52, 52, 52, 52, 52, + (2,14,0): 62, 62, 62, 62, 62, 62, 62, 62, + (2,15,0): 62, 62, 62, 62, 62, 62, 62, 62, + (2,16,0): 62, 62, 62, 62, 62, 62, 62, 62, + (2,17,0): 62, 62, 62, 62, 62, 62, 62, 62, + (3,0,0): 13, 13, 13, 13, 13, 13, 13, 13, + (3,1,0): 13, 13, 13, 13, 13, 13, 13, 13, + (3,2,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,3,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,4,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,5,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,6,0): 33, 33, 33, 33, 33, 33, 33, 33, + (3,7,0): 33, 33, 33, 33, 33, 33, 33, 33, + (3,8,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,9,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,10,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,11,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,12,0): 53, 53, 53, 53, 53, 53, 53, 53, + (3,13,0): 53, 53, 53, 53, 53, 53, 53, 53, + (3,14,0): 63, 63, 63, 63, 63, 63, 63, 63, + (3,15,0): 63, 63, 63, 63, 63, 63, 63, 63, + (3,16,0): 63, 63, 63, 63, 63, 63, 63, 63, + (3,17,0): 63, 63, 63, 63, 63, 63, 63, 63, + (4,0,0): 14, 14, 14, 14, 14, 14, 14, 14, + (4,1,0): 14, 14, 14, 14, 14, 14, 14, 14, + (4,2,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,3,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,4,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,5,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,6,0): 34, 34, 34, 34, 34, 34, 34, 34, + (4,7,0): 34, 34, 34, 34, 34, 34, 34, 34, + (4,8,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,9,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,10,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,11,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,12,0): 54, 54, 54, 54, 54, 54, 54, 54, + (4,13,0): 54, 54, 54, 54, 54, 54, 54, 54, + (4,14,0): 64, 64, 64, 64, 64, 64, 64, 64, + (4,15,0): 64, 64, 64, 64, 64, 64, 64, 64, + (4,16,0): 64, 64, 64, 64, 64, 64, 64, 64, + (4,17,0): 64, 64, 64, 64, 64, 64, 64, 64 + } + } +} +} diff --git a/tools/testfiles/vds/tvds_layout-2.ddl b/tools/testfiles/vds/tvds_layout-2.ddl new file mode 100644 index 0000000..af6b718 --- /dev/null +++ b/tools/testfiles/vds/tvds_layout-2.ddl @@ -0,0 +1,170 @@ +HDF5 "2_vds.h5" { +GROUP "/" { + DATASET "vds_dset" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 6, 8, 14 ) / ( H5S_UNLIMITED, 8, 14 ) } + STORAGE_LAYOUT { + MAPPING 0 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,7) + } + } + SOURCE { + FILE "2_a.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,7) + } + } + } + MAPPING 1 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,2,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,7) + } + } + SOURCE { + FILE "2_b.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,7) + } + } + } + MAPPING 2 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,6,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,7) + } + } + SOURCE { + FILE "2_c.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,7) + } + } + } + MAPPING 3 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,0,7) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,5,7) + } + } + SOURCE { + FILE "2_d.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,5,7) + } + } + } + MAPPING 4 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,5,7) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,3,7) + } + } + SOURCE { + FILE "2_e.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,3,7) + } + } + } + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE -9 + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + DATA { + (0,0,0): 10, 10, 10, 10, 10, 10, 10, 40, 40, 40, 40, 40, 40, 40, + (0,1,0): 10, 10, 10, 10, 10, 10, 10, 40, 40, 40, 40, 40, 40, 40, + (0,2,0): 20, 20, 20, 20, 20, 20, 20, 40, 40, 40, 40, 40, 40, 40, + (0,3,0): 20, 20, 20, 20, 20, 20, 20, 40, 40, 40, 40, 40, 40, 40, + (0,4,0): 20, 20, 20, 20, 20, 20, 20, 40, 40, 40, 40, 40, 40, 40, + (0,5,0): 20, 20, 20, 20, 20, 20, 20, 50, 50, 50, 50, 50, 50, 50, + (0,6,0): 30, 30, 30, 30, 30, 30, 30, 50, 50, 50, 50, 50, 50, 50, + (0,7,0): 30, 30, 30, 30, 30, 30, 30, 50, 50, 50, 50, 50, 50, 50, + (1,0,0): 11, 11, 11, 11, 11, 11, 11, 41, 41, 41, 41, 41, 41, 41, + (1,1,0): 11, 11, 11, 11, 11, 11, 11, 41, 41, 41, 41, 41, 41, 41, + (1,2,0): 21, 21, 21, 21, 21, 21, 21, 41, 41, 41, 41, 41, 41, 41, + (1,3,0): 21, 21, 21, 21, 21, 21, 21, 41, 41, 41, 41, 41, 41, 41, + (1,4,0): 21, 21, 21, 21, 21, 21, 21, 41, 41, 41, 41, 41, 41, 41, + (1,5,0): 21, 21, 21, 21, 21, 21, 21, 51, 51, 51, 51, 51, 51, 51, + (1,6,0): 31, 31, 31, 31, 31, 31, 31, 51, 51, 51, 51, 51, 51, 51, + (1,7,0): 31, 31, 31, 31, 31, 31, 31, 51, 51, 51, 51, 51, 51, 51, + (2,0,0): 12, 12, 12, 12, 12, 12, 12, 42, 42, 42, 42, 42, 42, 42, + (2,1,0): 12, 12, 12, 12, 12, 12, 12, 42, 42, 42, 42, 42, 42, 42, + (2,2,0): 22, 22, 22, 22, 22, 22, 22, 42, 42, 42, 42, 42, 42, 42, + (2,3,0): 22, 22, 22, 22, 22, 22, 22, 42, 42, 42, 42, 42, 42, 42, + (2,4,0): 22, 22, 22, 22, 22, 22, 22, 42, 42, 42, 42, 42, 42, 42, + (2,5,0): 22, 22, 22, 22, 22, 22, 22, 52, 52, 52, 52, 52, 52, 52, + (2,6,0): 32, 32, 32, 32, 32, 32, 32, 52, 52, 52, 52, 52, 52, 52, + (2,7,0): 32, 32, 32, 32, 32, 32, 32, 52, 52, 52, 52, 52, 52, 52, + (3,0,0): 13, 13, 13, 13, 13, 13, 13, 43, 43, 43, 43, 43, 43, 43, + (3,1,0): 13, 13, 13, 13, 13, 13, 13, 43, 43, 43, 43, 43, 43, 43, + (3,2,0): 23, 23, 23, 23, 23, 23, 23, 43, 43, 43, 43, 43, 43, 43, + (3,3,0): 23, 23, 23, 23, 23, 23, 23, 43, 43, 43, 43, 43, 43, 43, + (3,4,0): 23, 23, 23, 23, 23, 23, 23, 43, 43, 43, 43, 43, 43, 43, + (3,5,0): 23, 23, 23, 23, 23, 23, 23, 53, 53, 53, 53, 53, 53, 53, + (3,6,0): 33, 33, 33, 33, 33, 33, 33, 53, 53, 53, 53, 53, 53, 53, + (3,7,0): 33, 33, 33, 33, 33, 33, 33, 53, 53, 53, 53, 53, 53, 53, + (4,0,0): 14, 14, 14, 14, 14, 14, 14, 44, 44, 44, 44, 44, 44, 44, + (4,1,0): 14, 14, 14, 14, 14, 14, 14, 44, 44, 44, 44, 44, 44, 44, + (4,2,0): 24, 24, 24, 24, 24, 24, 24, 44, 44, 44, 44, 44, 44, 44, + (4,3,0): 24, 24, 24, 24, 24, 24, 24, 44, 44, 44, 44, 44, 44, 44, + (4,4,0): 24, 24, 24, 24, 24, 24, 24, 44, 44, 44, 44, 44, 44, 44, + (4,5,0): 24, 24, 24, 24, 24, 24, 24, 54, 54, 54, 54, 54, 54, 54, + (4,6,0): 34, 34, 34, 34, 34, 34, 34, 54, 54, 54, 54, 54, 54, 54, + (4,7,0): 34, 34, 34, 34, 34, 34, 34, 54, 54, 54, 54, 54, 54, 54, + (5,0,0): 15, 15, 15, 15, 15, 15, 15, 45, 45, 45, 45, 45, 45, 45, + (5,1,0): 15, 15, 15, 15, 15, 15, 15, 45, 45, 45, 45, 45, 45, 45, + (5,2,0): 25, 25, 25, 25, 25, 25, 25, 45, 45, 45, 45, 45, 45, 45, + (5,3,0): 25, 25, 25, 25, 25, 25, 25, 45, 45, 45, 45, 45, 45, 45, + (5,4,0): 25, 25, 25, 25, 25, 25, 25, 45, 45, 45, 45, 45, 45, 45, + (5,5,0): 25, 25, 25, 25, 25, 25, 25, 55, 55, 55, 55, 55, 55, 55, + (5,6,0): 35, 35, 35, 35, 35, 35, 35, 55, 55, 55, 55, 55, 55, 55, + (5,7,0): 35, 35, 35, 35, 35, 35, 35, 55, 55, 55, 55, 55, 55, 55 + } + } +} +} diff --git a/tools/testfiles/vds/tvds_layout-3_1.ddl b/tools/testfiles/vds/tvds_layout-3_1.ddl new file mode 100644 index 0000000..968327d --- /dev/null +++ b/tools/testfiles/vds/tvds_layout-3_1.ddl @@ -0,0 +1,267 @@ +HDF5 "3_1_vds.h5" { +GROUP "/" { + DATASET "vds_dset" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 5, 25, 8 ) / ( H5S_UNLIMITED, 25, 8 ) } + STORAGE_LAYOUT { + MAPPING 0 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,1,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,8) + } + } + SOURCE { + FILE "1_a.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,8) + } + } + } + MAPPING 1 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,4,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,8) + } + } + SOURCE { + FILE "1_b.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,8) + } + } + } + MAPPING 2 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,9,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,8) + } + } + SOURCE { + FILE "1_c.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,8) + } + } + } + MAPPING 3 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,12,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,8) + } + } + SOURCE { + FILE "1_d.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,8) + } + } + } + MAPPING 4 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,17,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,8) + } + } + SOURCE { + FILE "1_e.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,8) + } + } + } + MAPPING 5 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,20,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,8) + } + } + SOURCE { + FILE "1_f.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,8) + } + } + } + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE -9 + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + DATA { + (0,0,0): -9, -9, -9, -9, -9, -9, -9, -9, + (0,1,0): 10, 10, 10, 10, 10, 10, 10, 10, + (0,2,0): 10, 10, 10, 10, 10, 10, 10, 10, + (0,3,0): -9, -9, -9, -9, -9, -9, -9, -9, + (0,4,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,5,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,6,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,7,0): 20, 20, 20, 20, 20, 20, 20, 20, + (0,8,0): -9, -9, -9, -9, -9, -9, -9, -9, + (0,9,0): 30, 30, 30, 30, 30, 30, 30, 30, + (0,10,0): 30, 30, 30, 30, 30, 30, 30, 30, + (0,11,0): -9, -9, -9, -9, -9, -9, -9, -9, + (0,12,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,13,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,14,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,15,0): 40, 40, 40, 40, 40, 40, 40, 40, + (0,16,0): -9, -9, -9, -9, -9, -9, -9, -9, + (0,17,0): 50, 50, 50, 50, 50, 50, 50, 50, + (0,18,0): 50, 50, 50, 50, 50, 50, 50, 50, + (0,19,0): -9, -9, -9, -9, -9, -9, -9, -9, + (0,20,0): 60, 60, 60, 60, 60, 60, 60, 60, + (0,21,0): 60, 60, 60, 60, 60, 60, 60, 60, + (0,22,0): 60, 60, 60, 60, 60, 60, 60, 60, + (0,23,0): 60, 60, 60, 60, 60, 60, 60, 60, + (0,24,0): -9, -9, -9, -9, -9, -9, -9, -9, + (1,0,0): -9, -9, -9, -9, -9, -9, -9, -9, + (1,1,0): 11, 11, 11, 11, 11, 11, 11, 11, + (1,2,0): 11, 11, 11, 11, 11, 11, 11, 11, + (1,3,0): -9, -9, -9, -9, -9, -9, -9, -9, + (1,4,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,5,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,6,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,7,0): 21, 21, 21, 21, 21, 21, 21, 21, + (1,8,0): -9, -9, -9, -9, -9, -9, -9, -9, + (1,9,0): 31, 31, 31, 31, 31, 31, 31, 31, + (1,10,0): 31, 31, 31, 31, 31, 31, 31, 31, + (1,11,0): -9, -9, -9, -9, -9, -9, -9, -9, + (1,12,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,13,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,14,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,15,0): 41, 41, 41, 41, 41, 41, 41, 41, + (1,16,0): -9, -9, -9, -9, -9, -9, -9, -9, + (1,17,0): 51, 51, 51, 51, 51, 51, 51, 51, + (1,18,0): 51, 51, 51, 51, 51, 51, 51, 51, + (1,19,0): -9, -9, -9, -9, -9, -9, -9, -9, + (1,20,0): 61, 61, 61, 61, 61, 61, 61, 61, + (1,21,0): 61, 61, 61, 61, 61, 61, 61, 61, + (1,22,0): 61, 61, 61, 61, 61, 61, 61, 61, + (1,23,0): 61, 61, 61, 61, 61, 61, 61, 61, + (1,24,0): -9, -9, -9, -9, -9, -9, -9, -9, + (2,0,0): -9, -9, -9, -9, -9, -9, -9, -9, + (2,1,0): 12, 12, 12, 12, 12, 12, 12, 12, + (2,2,0): 12, 12, 12, 12, 12, 12, 12, 12, + (2,3,0): -9, -9, -9, -9, -9, -9, -9, -9, + (2,4,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,5,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,6,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,7,0): 22, 22, 22, 22, 22, 22, 22, 22, + (2,8,0): -9, -9, -9, -9, -9, -9, -9, -9, + (2,9,0): 32, 32, 32, 32, 32, 32, 32, 32, + (2,10,0): 32, 32, 32, 32, 32, 32, 32, 32, + (2,11,0): -9, -9, -9, -9, -9, -9, -9, -9, + (2,12,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,13,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,14,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,15,0): 42, 42, 42, 42, 42, 42, 42, 42, + (2,16,0): -9, -9, -9, -9, -9, -9, -9, -9, + (2,17,0): 52, 52, 52, 52, 52, 52, 52, 52, + (2,18,0): 52, 52, 52, 52, 52, 52, 52, 52, + (2,19,0): -9, -9, -9, -9, -9, -9, -9, -9, + (2,20,0): 62, 62, 62, 62, 62, 62, 62, 62, + (2,21,0): 62, 62, 62, 62, 62, 62, 62, 62, + (2,22,0): 62, 62, 62, 62, 62, 62, 62, 62, + (2,23,0): 62, 62, 62, 62, 62, 62, 62, 62, + (2,24,0): -9, -9, -9, -9, -9, -9, -9, -9, + (3,0,0): -9, -9, -9, -9, -9, -9, -9, -9, + (3,1,0): 13, 13, 13, 13, 13, 13, 13, 13, + (3,2,0): 13, 13, 13, 13, 13, 13, 13, 13, + (3,3,0): -9, -9, -9, -9, -9, -9, -9, -9, + (3,4,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,5,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,6,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,7,0): 23, 23, 23, 23, 23, 23, 23, 23, + (3,8,0): -9, -9, -9, -9, -9, -9, -9, -9, + (3,9,0): 33, 33, 33, 33, 33, 33, 33, 33, + (3,10,0): 33, 33, 33, 33, 33, 33, 33, 33, + (3,11,0): -9, -9, -9, -9, -9, -9, -9, -9, + (3,12,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,13,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,14,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,15,0): 43, 43, 43, 43, 43, 43, 43, 43, + (3,16,0): -9, -9, -9, -9, -9, -9, -9, -9, + (3,17,0): 53, 53, 53, 53, 53, 53, 53, 53, + (3,18,0): 53, 53, 53, 53, 53, 53, 53, 53, + (3,19,0): -9, -9, -9, -9, -9, -9, -9, -9, + (3,20,0): 63, 63, 63, 63, 63, 63, 63, 63, + (3,21,0): 63, 63, 63, 63, 63, 63, 63, 63, + (3,22,0): 63, 63, 63, 63, 63, 63, 63, 63, + (3,23,0): 63, 63, 63, 63, 63, 63, 63, 63, + (3,24,0): -9, -9, -9, -9, -9, -9, -9, -9, + (4,0,0): -9, -9, -9, -9, -9, -9, -9, -9, + (4,1,0): 14, 14, 14, 14, 14, 14, 14, 14, + (4,2,0): 14, 14, 14, 14, 14, 14, 14, 14, + (4,3,0): -9, -9, -9, -9, -9, -9, -9, -9, + (4,4,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,5,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,6,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,7,0): 24, 24, 24, 24, 24, 24, 24, 24, + (4,8,0): -9, -9, -9, -9, -9, -9, -9, -9, + (4,9,0): 34, 34, 34, 34, 34, 34, 34, 34, + (4,10,0): 34, 34, 34, 34, 34, 34, 34, 34, + (4,11,0): -9, -9, -9, -9, -9, -9, -9, -9, + (4,12,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,13,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,14,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,15,0): 44, 44, 44, 44, 44, 44, 44, 44, + (4,16,0): -9, -9, -9, -9, -9, -9, -9, -9, + (4,17,0): 54, 54, 54, 54, 54, 54, 54, 54, + (4,18,0): 54, 54, 54, 54, 54, 54, 54, 54, + (4,19,0): -9, -9, -9, -9, -9, -9, -9, -9, + (4,20,0): 64, 64, 64, 64, 64, 64, 64, 64, + (4,21,0): 64, 64, 64, 64, 64, 64, 64, 64, + (4,22,0): 64, 64, 64, 64, 64, 64, 64, 64, + (4,23,0): 64, 64, 64, 64, 64, 64, 64, 64, + (4,24,0): -9, -9, -9, -9, -9, -9, -9, -9 + } + } +} +} diff --git a/tools/testfiles/vds/tvds_layout-3_2.ddl b/tools/testfiles/vds/tvds_layout-3_2.ddl new file mode 100644 index 0000000..7e14ec2 --- /dev/null +++ b/tools/testfiles/vds/tvds_layout-3_2.ddl @@ -0,0 +1,278 @@ +HDF5 "3_2_vds.h5" { +GROUP "/" { + DATASET "vds_dset" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 6, 13, 19 ) / ( H5S_UNLIMITED, 13, 19 ) } + STORAGE_LAYOUT { + MAPPING 0 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,1,1) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,7) + } + } + SOURCE { + FILE "2_a.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,7) + } + } + } + MAPPING 1 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,4,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,7) + } + } + SOURCE { + FILE "2_b.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,7) + } + } + } + MAPPING 2 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,11,4) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,7) + } + } + SOURCE { + FILE "2_c.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,2,7) + } + } + } + MAPPING 3 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,1,9) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,5,7) + } + } + SOURCE { + FILE "2_d.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,5,7) + } + } + } + MAPPING 4 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,8,12) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,3,7) + } + } + SOURCE { + FILE "2_e.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,3,7) + } + } + } + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE -9 + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + DATA { + (0,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, + (0,0,15): -9, -9, -9, -9, + (0,1,0): -9, 10, 10, 10, 10, 10, 10, 10, -9, 40, 40, 40, 40, 40, 40, + (0,1,15): 40, -9, -9, -9, + (0,2,0): -9, 10, 10, 10, 10, 10, 10, 10, -9, 40, 40, 40, 40, 40, 40, + (0,2,15): 40, -9, -9, -9, + (0,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 40, 40, 40, 40, 40, 40, + (0,3,15): 40, -9, -9, -9, + (0,4,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, 40, 40, 40, 40, 40, 40, + (0,4,15): 40, -9, -9, -9, + (0,5,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, 40, 40, 40, 40, 40, 40, + (0,5,15): 40, -9, -9, -9, + (0,6,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, -9, -9, -9, -9, -9, -9, + (0,6,15): -9, -9, -9, -9, + (0,7,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, -9, -9, -9, -9, -9, -9, + (0,7,15): -9, -9, -9, -9, + (0,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 50, 50, 50, + (0,8,15): 50, 50, 50, 50, + (0,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 50, 50, 50, + (0,9,15): 50, 50, 50, 50, + (0,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 50, 50, 50, + (0,10,15): 50, 50, 50, 50, + (0,11,0): -9, -9, -9, -9, 30, 30, 30, 30, 30, 30, 30, -9, -9, -9, -9, + (0,11,15): -9, -9, -9, -9, + (0,12,0): -9, -9, -9, -9, 30, 30, 30, 30, 30, 30, 30, -9, -9, -9, -9, + (0,12,15): -9, -9, -9, -9, + (1,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, + (1,0,15): -9, -9, -9, -9, + (1,1,0): -9, 11, 11, 11, 11, 11, 11, 11, -9, 41, 41, 41, 41, 41, 41, + (1,1,15): 41, -9, -9, -9, + (1,2,0): -9, 11, 11, 11, 11, 11, 11, 11, -9, 41, 41, 41, 41, 41, 41, + (1,2,15): 41, -9, -9, -9, + (1,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 41, 41, 41, 41, 41, 41, + (1,3,15): 41, -9, -9, -9, + (1,4,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, 41, 41, 41, 41, 41, 41, + (1,4,15): 41, -9, -9, -9, + (1,5,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, 41, 41, 41, 41, 41, 41, + (1,5,15): 41, -9, -9, -9, + (1,6,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, -9, -9, -9, -9, -9, -9, + (1,6,15): -9, -9, -9, -9, + (1,7,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, -9, -9, -9, -9, -9, -9, + (1,7,15): -9, -9, -9, -9, + (1,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 51, 51, 51, + (1,8,15): 51, 51, 51, 51, + (1,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 51, 51, 51, + (1,9,15): 51, 51, 51, 51, + (1,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 51, 51, 51, + (1,10,15): 51, 51, 51, 51, + (1,11,0): -9, -9, -9, -9, 31, 31, 31, 31, 31, 31, 31, -9, -9, -9, -9, + (1,11,15): -9, -9, -9, -9, + (1,12,0): -9, -9, -9, -9, 31, 31, 31, 31, 31, 31, 31, -9, -9, -9, -9, + (1,12,15): -9, -9, -9, -9, + (2,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, + (2,0,15): -9, -9, -9, -9, + (2,1,0): -9, 12, 12, 12, 12, 12, 12, 12, -9, 42, 42, 42, 42, 42, 42, + (2,1,15): 42, -9, -9, -9, + (2,2,0): -9, 12, 12, 12, 12, 12, 12, 12, -9, 42, 42, 42, 42, 42, 42, + (2,2,15): 42, -9, -9, -9, + (2,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 42, 42, 42, 42, 42, 42, + (2,3,15): 42, -9, -9, -9, + (2,4,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, 42, 42, 42, 42, 42, 42, + (2,4,15): 42, -9, -9, -9, + (2,5,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, 42, 42, 42, 42, 42, 42, + (2,5,15): 42, -9, -9, -9, + (2,6,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, -9, -9, -9, -9, -9, -9, + (2,6,15): -9, -9, -9, -9, + (2,7,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, -9, -9, -9, -9, -9, -9, + (2,7,15): -9, -9, -9, -9, + (2,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 52, 52, 52, + (2,8,15): 52, 52, 52, 52, + (2,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 52, 52, 52, + (2,9,15): 52, 52, 52, 52, + (2,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 52, 52, 52, + (2,10,15): 52, 52, 52, 52, + (2,11,0): -9, -9, -9, -9, 32, 32, 32, 32, 32, 32, 32, -9, -9, -9, -9, + (2,11,15): -9, -9, -9, -9, + (2,12,0): -9, -9, -9, -9, 32, 32, 32, 32, 32, 32, 32, -9, -9, -9, -9, + (2,12,15): -9, -9, -9, -9, + (3,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, + (3,0,15): -9, -9, -9, -9, + (3,1,0): -9, 13, 13, 13, 13, 13, 13, 13, -9, 43, 43, 43, 43, 43, 43, + (3,1,15): 43, -9, -9, -9, + (3,2,0): -9, 13, 13, 13, 13, 13, 13, 13, -9, 43, 43, 43, 43, 43, 43, + (3,2,15): 43, -9, -9, -9, + (3,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 43, 43, 43, 43, 43, 43, + (3,3,15): 43, -9, -9, -9, + (3,4,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, 43, 43, 43, 43, 43, 43, + (3,4,15): 43, -9, -9, -9, + (3,5,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, 43, 43, 43, 43, 43, 43, + (3,5,15): 43, -9, -9, -9, + (3,6,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, -9, -9, -9, -9, -9, -9, + (3,6,15): -9, -9, -9, -9, + (3,7,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, -9, -9, -9, -9, -9, -9, + (3,7,15): -9, -9, -9, -9, + (3,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 53, 53, 53, + (3,8,15): 53, 53, 53, 53, + (3,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 53, 53, 53, + (3,9,15): 53, 53, 53, 53, + (3,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 53, 53, 53, + (3,10,15): 53, 53, 53, 53, + (3,11,0): -9, -9, -9, -9, 33, 33, 33, 33, 33, 33, 33, -9, -9, -9, -9, + (3,11,15): -9, -9, -9, -9, + (3,12,0): -9, -9, -9, -9, 33, 33, 33, 33, 33, 33, 33, -9, -9, -9, -9, + (3,12,15): -9, -9, -9, -9, + (4,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, + (4,0,15): -9, -9, -9, -9, + (4,1,0): -9, 14, 14, 14, 14, 14, 14, 14, -9, 44, 44, 44, 44, 44, 44, + (4,1,15): 44, -9, -9, -9, + (4,2,0): -9, 14, 14, 14, 14, 14, 14, 14, -9, 44, 44, 44, 44, 44, 44, + (4,2,15): 44, -9, -9, -9, + (4,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 44, 44, 44, 44, 44, 44, + (4,3,15): 44, -9, -9, -9, + (4,4,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, 44, 44, 44, 44, 44, 44, + (4,4,15): 44, -9, -9, -9, + (4,5,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, 44, 44, 44, 44, 44, 44, + (4,5,15): 44, -9, -9, -9, + (4,6,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, -9, -9, -9, -9, -9, -9, + (4,6,15): -9, -9, -9, -9, + (4,7,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, -9, -9, -9, -9, -9, -9, + (4,7,15): -9, -9, -9, -9, + (4,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 54, 54, 54, + (4,8,15): 54, 54, 54, 54, + (4,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 54, 54, 54, + (4,9,15): 54, 54, 54, 54, + (4,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 54, 54, 54, + (4,10,15): 54, 54, 54, 54, + (4,11,0): -9, -9, -9, -9, 34, 34, 34, 34, 34, 34, 34, -9, -9, -9, -9, + (4,11,15): -9, -9, -9, -9, + (4,12,0): -9, -9, -9, -9, 34, 34, 34, 34, 34, 34, 34, -9, -9, -9, -9, + (4,12,15): -9, -9, -9, -9, + (5,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, + (5,0,15): -9, -9, -9, -9, + (5,1,0): -9, 15, 15, 15, 15, 15, 15, 15, -9, 45, 45, 45, 45, 45, 45, + (5,1,15): 45, -9, -9, -9, + (5,2,0): -9, 15, 15, 15, 15, 15, 15, 15, -9, 45, 45, 45, 45, 45, 45, + (5,2,15): 45, -9, -9, -9, + (5,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 45, 45, 45, 45, 45, 45, + (5,3,15): 45, -9, -9, -9, + (5,4,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, 45, 45, 45, 45, 45, 45, + (5,4,15): 45, -9, -9, -9, + (5,5,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, 45, 45, 45, 45, 45, 45, + (5,5,15): 45, -9, -9, -9, + (5,6,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, -9, -9, -9, -9, -9, -9, + (5,6,15): -9, -9, -9, -9, + (5,7,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, -9, -9, -9, -9, -9, -9, + (5,7,15): -9, -9, -9, -9, + (5,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 55, 55, 55, + (5,8,15): 55, 55, 55, 55, + (5,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 55, 55, 55, + (5,9,15): 55, 55, 55, 55, + (5,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 55, 55, 55, + (5,10,15): 55, 55, 55, 55, + (5,11,0): -9, -9, -9, -9, 35, 35, 35, 35, 35, 35, 35, -9, -9, -9, -9, + (5,11,15): -9, -9, -9, -9, + (5,12,0): -9, -9, -9, -9, 35, 35, 35, 35, 35, 35, 35, -9, -9, -9, -9, + (5,12,15): -9, -9, -9, -9 + } + } +} +} diff --git a/tools/testfiles/vds/tvds_layout-4.ddl b/tools/testfiles/vds/tvds_layout-4.ddl new file mode 100644 index 0000000..018644e --- /dev/null +++ b/tools/testfiles/vds/tvds_layout-4.ddl @@ -0,0 +1,78 @@ +HDF5 "4_vds.h5" { +GROUP "/" { + DATASET "vds_dset" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 9, 4, 4 ) / ( H5S_UNLIMITED, 4, 4 ) } + STORAGE_LAYOUT { + MAPPING 0 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (3,1,1) + COUNT (H5S_UNLIMITED,1,1) + BLOCK (3,4,4) + } + } + SOURCE { + FILE "4_%b.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (3,4,4) + } + } + } + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE -9 + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + DATA { + (0,0,0): 10, 10, 10, 10, + (0,1,0): 10, 10, 10, 10, + (0,2,0): 10, 10, 10, 10, + (0,3,0): 10, 10, 10, 10, + (1,0,0): 11, 11, 11, 11, + (1,1,0): 11, 11, 11, 11, + (1,2,0): 11, 11, 11, 11, + (1,3,0): 11, 11, 11, 11, + (2,0,0): 12, 12, 12, 12, + (2,1,0): 12, 12, 12, 12, + (2,2,0): 12, 12, 12, 12, + (2,3,0): 12, 12, 12, 12, + (3,0,0): 20, 20, 20, 20, + (3,1,0): 20, 20, 20, 20, + (3,2,0): 20, 20, 20, 20, + (3,3,0): 20, 20, 20, 20, + (4,0,0): 21, 21, 21, 21, + (4,1,0): 21, 21, 21, 21, + (4,2,0): 21, 21, 21, 21, + (4,3,0): 21, 21, 21, 21, + (5,0,0): 22, 22, 22, 22, + (5,1,0): 22, 22, 22, 22, + (5,2,0): 22, 22, 22, 22, + (5,3,0): 22, 22, 22, 22, + (6,0,0): 30, 30, 30, 30, + (6,1,0): 30, 30, 30, 30, + (6,2,0): 30, 30, 30, 30, + (6,3,0): 30, 30, 30, 30, + (7,0,0): 31, 31, 31, 31, + (7,1,0): 31, 31, 31, 31, + (7,2,0): 31, 31, 31, 31, + (7,3,0): 31, 31, 31, 31, + (8,0,0): 32, 32, 32, 32, + (8,1,0): 32, 32, 32, 32, + (8,2,0): 32, 32, 32, 32, + (8,3,0): 32, 32, 32, 32 + } + } +} +} diff --git a/tools/testfiles/vds/tvds_layout-5.ddl b/tools/testfiles/vds/tvds_layout-5.ddl new file mode 100644 index 0000000..b43629a --- /dev/null +++ b/tools/testfiles/vds/tvds_layout-5.ddl @@ -0,0 +1,118 @@ +HDF5 "5_vds.h5" { +GROUP "/" { + DATASET "vds_dset" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 9, 4, 4 ) / ( H5S_UNLIMITED, 4, 4 ) } + STORAGE_LAYOUT { + MAPPING 0 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (3,1,1) + COUNT (H5S_UNLIMITED,1,1) + BLOCK (1,4,4) + } + } + SOURCE { + FILE "5_a.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,4) + } + } + } + MAPPING 1 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (1,0,0) + STRIDE (3,1,1) + COUNT (H5S_UNLIMITED,1,1) + BLOCK (1,4,4) + } + } + SOURCE { + FILE "5_b.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,4) + } + } + } + MAPPING 2 { + VIRTUAL { + SELECTION REGULAR_HYPERSLAB { + START (2,0,0) + STRIDE (3,1,1) + COUNT (H5S_UNLIMITED,1,1) + BLOCK (1,4,4) + } + } + SOURCE { + FILE "5_c.h5" + DATASET "/source_dset" + SELECTION REGULAR_HYPERSLAB { + START (0,0,0) + STRIDE (1,1,1) + COUNT (1,1,1) + BLOCK (H5S_UNLIMITED,4,4) + } + } + } + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE -9 + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + DATA { + (0,0,0): 10, 10, 10, 10, + (0,1,0): 10, 10, 10, 10, + (0,2,0): 10, 10, 10, 10, + (0,3,0): 10, 10, 10, 10, + (1,0,0): 20, 20, 20, 20, + (1,1,0): 20, 20, 20, 20, + (1,2,0): 20, 20, 20, 20, + (1,3,0): 20, 20, 20, 20, + (2,0,0): 30, 30, 30, 30, + (2,1,0): 30, 30, 30, 30, + (2,2,0): 30, 30, 30, 30, + (2,3,0): 30, 30, 30, 30, + (3,0,0): 11, 11, 11, 11, + (3,1,0): 11, 11, 11, 11, + (3,2,0): 11, 11, 11, 11, + (3,3,0): 11, 11, 11, 11, + (4,0,0): 21, 21, 21, 21, + (4,1,0): 21, 21, 21, 21, + (4,2,0): 21, 21, 21, 21, + (4,3,0): 21, 21, 21, 21, + (5,0,0): 31, 31, 31, 31, + (5,1,0): 31, 31, 31, 31, + (5,2,0): 31, 31, 31, 31, + (5,3,0): 31, 31, 31, 31, + (6,0,0): 12, 12, 12, 12, + (6,1,0): 12, 12, 12, 12, + (6,2,0): 12, 12, 12, 12, + (6,3,0): 12, 12, 12, 12, + (7,0,0): 22, 22, 22, 22, + (7,1,0): 22, 22, 22, 22, + (7,2,0): 22, 22, 22, 22, + (7,3,0): 22, 22, 22, 22, + (8,0,0): 32, 32, 32, 32, + (8,1,0): 32, 32, 32, 32, + (8,2,0): 32, 32, 32, 32, + (8,3,0): 32, 32, 32, 32 + } + } +} +} -- cgit v0.12 From 4117cfe2b9e19a79e00c5176f354f906235f1b80 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 12 Jun 2015 17:04:35 -0500 Subject: [svn-r27197] Improve performance of "printf" VDS with selections in the file space - the library no longer iterates over all source datasets in the printf mapping, it now only looks at the ones that could be involved in I/O (the ones whose bounds overlap with the selection in the unlimited dimension). Tested: ummon --- src/H5Dvirtual.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++--------- src/H5Oprivate.h | 2 ++ src/H5Shyper.c | 16 +++++++++------- test/vds.c | 41 +++++++++++++++++++++++++++++++++++---- 4 files changed, 97 insertions(+), 20 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index bfd4e0c..f6a16ee 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -1493,6 +1493,10 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, const H5S_t *mem_space, hsize_t *tot_nelmts) { hssize_t select_nelmts; /* Number of elements in selection */ + hsize_t bounds_start[H5S_MAX_RANK]; /* Selection bounds start */ + hsize_t bounds_end[H5S_MAX_RANK]; /* Selection bounds end */ + int rank; + hbool_t bounds_init = FALSE; /* Whether bounds_start, bounds_end, and rank are valid */ size_t i, j; /* Local index variables */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1519,12 +1523,44 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, /* Check for "printf" source dataset resolution */ if(storage->list[i].parsed_source_file_name || storage->list[i].parsed_source_dset_name) { + hbool_t partial_block; + + HDassert(storage->list[i].unlim_dim_virtual >= 0); + + /* Get selection bounds if necessary */ + if(!bounds_init) { + /* Get rank of VDS */ + if((rank = H5S_GET_EXTENT_NDIMS(io_info->dset->shared->space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions") + + /* Get selection bounds */ + if(H5S_SELECT_BOUNDS(file_space, bounds_start, bounds_end) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") + + /* Adjust bounds_end to represent the extent just enclosing them + * (add 1) */ + for(j = 0; j < (size_t)rank; j++) + bounds_end[j]++; + + /* Bounds are now initialized */ + bounds_init = TRUE; + } /* end if */ + + /* Get index of first block in virtual selection */ + storage->list[i].sub_dset_io_start = (size_t)H5S_hyper_get_first_inc_block(storage->list[i].source_dset.virtual_select, bounds_start[storage->list[i].unlim_dim_virtual], NULL); + + /* Get index of first block outside of virtual selection */ + storage->list[i].sub_dset_io_end = (size_t)H5S_hyper_get_first_inc_block(storage->list[i].source_dset.virtual_select, bounds_end[storage->list[i].unlim_dim_virtual], &partial_block); + if(partial_block) + storage->list[i].sub_dset_io_end++; + if(storage->list[i].sub_dset_io_end > storage->list[i].sub_dset_nused) + storage->list[i].sub_dset_io_end = storage->list[i].sub_dset_nused; + /* Iterate over sub-source dsets */ - for(j = 0; j < storage->list[i].sub_dset_nused; j++) { - /* Check for no clipped selection. This should be an assertion - * once we have I/O scoping for printf working VDSINC */ - if(!storage->list[i].sub_dset[j].clipped_virtual_select) - break; + for(j = storage->list[i].sub_dset_io_start; + j < storage->list[i].sub_dset_io_end; j++) { + /* There should always be a clipped virtual selection here */ + HDassert(storage->list[i].sub_dset[j].clipped_virtual_select); /* Project intersection of file space and mapping virtual space * onto memory space */ @@ -1634,7 +1670,8 @@ H5D__virtual_post_io(H5O_storage_virtual_t *storage) if(storage->list[i].parsed_source_file_name || storage->list[i].parsed_source_dset_name) { /* Iterate over sub-source dsets */ - for(j = 0; j < storage->list[i].sub_dset_nused; j++) + for(j = storage->list[i].sub_dset_io_start; + j < storage->list[i].sub_dset_io_end; j++) /* Close projected memory space */ if(storage->list[i].sub_dset[j].projected_mem_space) { if(H5S_close(storage->list[i].sub_dset[j].projected_mem_space) < 0) @@ -1761,7 +1798,8 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, if(storage->list[i].parsed_source_file_name || storage->list[i].parsed_source_dset_name) { /* Iterate over sub-source dsets */ - for(j = 0; j < storage->list[i].sub_dset_nused; j++) + for(j = storage->list[i].sub_dset_io_start; + j < storage->list[i].sub_dset_io_end; j++) if(H5D__virtual_read_one(io_info, type_info, file_space, &storage->list[i].sub_dset[j]) < 0) HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read source dataset") } /* end if */ @@ -1785,7 +1823,8 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, if(storage->list[i].parsed_source_file_name || storage->list[i].parsed_source_dset_name) { /* Iterate over sub-source dsets */ - for(j = 0; j < storage->list[i].sub_dset_nused; j++) + for(j = storage->list[i].sub_dset_io_start; + j < storage->list[i].sub_dset_io_end; j++) if(storage->list[i].sub_dset[j].projected_mem_space) if(H5S_select_subtract(fill_space, storage->list[i].sub_dset[j].projected_mem_space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to clip fill selection") @@ -1942,7 +1981,8 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, if(storage->list[i].parsed_source_file_name || storage->list[i].parsed_source_dset_name) { /* Iterate over sub-source dsets */ - for(j = 0; j < storage->list[i].sub_dset_nused; j++) { + for(j = storage->list[i].sub_dset_io_start; + j < storage->list[i].sub_dset_io_end; j++) { HDassert(0 && "Checking code coverage..."); //VDSINC if(H5D__virtual_write_one(io_info, type_info, file_space, &storage->list[i].sub_dset[j]) < 0) HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to write to source dataset") diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 604dd73..8462382 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -449,6 +449,8 @@ typedef struct H5O_storage_virtual_ent_t { H5O_storage_virtual_srcdset_t *sub_dset; /* Array of sub-source dataset info structs */ size_t sub_dset_nalloc; /* Number of slots allocated in sub_dset */ size_t sub_dset_nused; /* Number of slots "used" in sub_dset - essentially the farthest sub dataset in the extent */ + size_t sub_dset_io_start; /* First element in sub_dset involved in current I/O op. Field has no meaning and may be uninitialized at all other times */ + size_t sub_dset_io_end; /* First element in sub_dset outside of current I/O op. Field has no meaning and may be uninitialized at all other times */ H5O_storage_virtual_name_seg_t *parsed_source_file_name; /* Parsed version of source_dset.file_name */ size_t psfn_static_strlen; /* Length of parsed_source_file_name without block number substitutions */ size_t psfn_nsubs; /* Number of block number substitutions in parsed_source_file_name */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index db81211..fb34981 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -10180,25 +10180,27 @@ H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, HDassert(hslab); HDassert(hslab->unlim_dim >= 0); HDassert(hslab->opt_unlim_diminfo[hslab->unlim_dim].count == H5S_UNLIMITED); - HDassert(partial); diminfo = &hslab->opt_unlim_diminfo[hslab->unlim_dim]; /* Check for selection outside of clip_size */ if(diminfo->start >= clip_size) { ret_value = 0; - partial = FALSE; + if(partial) + partial = FALSE; } /* end if */ else { /* Calculate index of first incomplete block */ ret_value = (clip_size - diminfo->start + diminfo->stride - diminfo->block) / diminfo->stride; - /* Check for partial block */ - if((diminfo->stride * ret_value) < (clip_size - diminfo->start)) - *partial = TRUE; - else - *partial = FALSE; + if(partial) { + /* Check for partial block */ + if((diminfo->stride * ret_value) < (clip_size - diminfo->start)) + *partial = TRUE; + else + *partial = FALSE; + } /* end if */ } /* end else */ FUNC_LEAVE_NOAPI(ret_value) diff --git a/test/vds.c b/test/vds.c index 5173083..08df7ef 100644 --- a/test/vds.c +++ b/test/vds.c @@ -5515,10 +5515,6 @@ test_printf(unsigned config, hid_t fapl) if(mdims[1] != 20) TEST_ERROR - /* Close filespace */ - if(H5Sclose(filespace) < 0) - TEST_ERROR - /* Read data through virtual dataset */ /* Reset rbuf */ HDmemset(rbuf[0], 0, sizeof(rbuf)); @@ -5543,6 +5539,43 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR } /* end for */ + /* Now try with different selections */ + count[0] = 10; + for(start[1] = (hsize_t)0; start[1] < (hsize_t)5; start[1]++) + for(count[1] = (hsize_t)1; count[1] < (hsize_t)11; count[1]++) { + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Select hyperslab in file space */ + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if((j < (int)start[1]) || (j >= (int)(start[1] + count[1]))) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + } /* end for */ + start[1] = 0; + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + /* Close */ if(!(config & TEST_IO_CLOSE_SRC)) { if(H5Dclose(srcdset[0]) < 0) -- cgit v0.12 From 4f231ddc9bd1e0b71b4ed7fd0d82e9ca362f942e Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Tue, 16 Jun 2015 12:02:35 -0500 Subject: [svn-r27214] Fixed a bug on Windows where dcpls were set to be chunked and not virtual. This was due to a simple copy-paste issue in the initializer that is used when C99 initializers are not available. Also fixed a dims array size error in the vds test. Tested on: 64-bit Win7 with VS2013 --- src/H5Pdcpl.c | 2 +- test/vds.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 5f3e9ef..d17a281 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -198,7 +198,7 @@ static const H5O_layout_t H5D_def_layout_virtual_g = H5D_DEF_LAYOUT_VIRTUAL; static H5O_layout_t H5D_def_layout_compact_g = H5D_DEF_LAYOUT_COMPACT; static H5O_layout_t H5D_def_layout_contig_g = H5D_DEF_LAYOUT_CONTIG; static H5O_layout_t H5D_def_layout_chunk_g = H5D_DEF_LAYOUT_CHUNK; -static H5O_layout_t H5D_def_layout_virtual_g = H5D_DEF_LAYOUT_CHUNK; +static H5O_layout_t H5D_def_layout_virtual_g = H5D_DEF_LAYOUT_VIRTUAL; static hbool_t H5P_dcrt_def_layout_init_g = FALSE; #endif /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ diff --git a/test/vds.c b/test/vds.c index 08df7ef..f39136d 100644 --- a/test/vds.c +++ b/test/vds.c @@ -1001,12 +1001,11 @@ test_basic_io(unsigned config, hid_t fapl) hid_t memspace = -1; /* Memory dataspace */ hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datsets */ hid_t vdset = -1; /* Virtual dataset */ - hsize_t dims[2] = {10, 26}; /* Data space current size */ + hsize_t dims[4] = {10, 26, -1, -1}; /* Data space current size */ hsize_t start[4]; /* Hyperslab start */ hsize_t stride[4]; /* Hyperslab stride */ hsize_t count[4]; /* Hyperslab count */ hsize_t block[4]; /* Hyperslab block */ - hsize_t coord[10]; /* Point selection array */ int buf[10][26]; /* Write and expected read buffer */ int rbuf[10][26]; /* Read buffer */ int rbuf99[9][9]; /* 9x9 Read buffer */ -- cgit v0.12 From 91eb17db8ee7fcda566436fa2336fac2cf2c3660 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 16 Jun 2015 12:27:20 -0500 Subject: [svn-r27215] Fix issue where % characters could not be used in non-printf mappings. Other minor fixes/cleanup. Tested: ummon --- src/H5Dvirtual.c | 118 ++++++++++++++++++++++++++++++++++++++++++------------- src/H5Olayout.c | 37 +++++++++++------ src/H5Oprivate.h | 6 ++- src/H5Pdcpl.c | 40 ++++++++++++------- test/vds.c | 47 ++++++++++++++-------- 5 files changed, 174 insertions(+), 74 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index f6a16ee..4a9f79f 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -228,22 +228,31 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) /* Copy the list entries, though set source_dset.dset and sub_dset to * NULL */ for(i = 0; i < layout->storage.u.virt.list_nused; i++) { - if(NULL == (layout->storage.u.virt.list[i].source_dset.file_name - = HDstrdup(orig_list[i].source_dset.file_name))) - HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source file name") - if(NULL == (layout->storage.u.virt.list[i].source_dset.dset_name - = HDstrdup(orig_list[i].source_dset.dset_name))) - HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source dataset name") + /* Copy virtual selection */ if(NULL == (layout->storage.u.virt.list[i].source_dset.virtual_select = H5S_copy(orig_list[i].source_dset.virtual_select, FALSE, TRUE))) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + + /* Copy original source names */ + if(NULL == (layout->storage.u.virt.list[i].source_file_name + = HDstrdup(orig_list[i].source_file_name))) + HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source file name") + if(NULL == (layout->storage.u.virt.list[i].source_dset_name + = HDstrdup(orig_list[i].source_dset_name))) + HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source dataset name") + + /* Copy source selection */ if(NULL == (layout->storage.u.virt.list[i].source_select = H5S_copy(orig_list[i].source_select, FALSE, TRUE))) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") + + /* Initialize clipped selections */ if(orig_list[i].unlim_dim_virtual < 0) { layout->storage.u.virt.list[i].source_dset.clipped_source_select = layout->storage.u.virt.list[i].source_select; layout->storage.u.virt.list[i].source_dset.clipped_virtual_select = layout->storage.u.virt.list[i].source_dset.virtual_select; } /* end if */ + + /* Copy parsed names */ if(H5D__virtual_copy_parsed_name(&layout->storage.u.virt.list[i].parsed_source_file_name, orig_list[i].parsed_source_file_name) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy parsed source file name") layout->storage.u.virt.list[i].psfn_static_strlen = orig_list[i].psfn_static_strlen; @@ -252,6 +261,43 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy parsed source dataset name") layout->storage.u.virt.list[i].psdn_static_strlen = orig_list[i].psdn_static_strlen; layout->storage.u.virt.list[i].psdn_nsubs = orig_list[i].psdn_nsubs; + + /* Copy source names in source dset or add reference as appropriate + */ + if(orig_list[i].source_dset.file_name) { + if(orig_list[i].source_dset.file_name + == orig_list[i].source_file_name) + layout->storage.u.virt.list[i].source_dset.file_name = layout->storage.u.virt.list[i].source_file_name; + else if(orig_list[i].parsed_source_file_name + && (orig_list[i].source_dset.file_name + != orig_list[i].parsed_source_file_name->name_segment)) { + HDassert(layout->storage.u.virt.list[i].parsed_source_file_name); + HDassert(layout->storage.u.virt.list[i].parsed_source_file_name->name_segment); + layout->storage.u.virt.list[i].source_dset.file_name = layout->storage.u.virt.list[i].parsed_source_file_name->name_segment; + } /* end if */ + else + if(NULL == (layout->storage.u.virt.list[i].source_dset.file_name + = HDstrdup(orig_list[i].source_dset.file_name))) + HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source file name") + } /* end if */ + if(orig_list[i].source_dset.dset_name) { + if(orig_list[i].source_dset.dset_name + == orig_list[i].source_dset_name) + layout->storage.u.virt.list[i].source_dset.dset_name = layout->storage.u.virt.list[i].source_dset_name; + else if(orig_list[i].parsed_source_dset_name + && (orig_list[i].source_dset.dset_name + != orig_list[i].parsed_source_dset_name->name_segment)) { + HDassert(layout->storage.u.virt.list[i].parsed_source_dset_name); + HDassert(layout->storage.u.virt.list[i].parsed_source_dset_name->name_segment); + layout->storage.u.virt.list[i].source_dset.dset_name = layout->storage.u.virt.list[i].parsed_source_dset_name->name_segment; + } /* end if */ + else + if(NULL == (layout->storage.u.virt.list[i].source_dset.dset_name + = HDstrdup(orig_list[i].source_dset.dset_name))) + HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source dataset name") + } /* end if */ + + /* Copy other fields in entry */ layout->storage.u.virt.list[i].unlim_dim_source = orig_list[i].unlim_dim_source; layout->storage.u.virt.list[i].unlim_dim_virtual = orig_list[i].unlim_dim_virtual; layout->storage.u.virt.list[i].unlim_extent_source = orig_list[i].unlim_extent_source; @@ -263,7 +309,7 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) } /* end for */ } /* end if */ else { - HDassert(0 && "checking code coverage...");//VDSINC + HDassert(0 && "checking code coverage..."); //VDSINC /* Zero out other fields related to list, just to be sure */ layout->storage.u.virt.list = NULL; layout->storage.u.virt.list_nalloc = 0; @@ -318,6 +364,10 @@ H5D__virtual_reset_layout(H5O_layout_t *layout) if(H5D__virtual_reset_source_dset(&layout->storage.u.virt.list[i], &layout->storage.u.virt.list[i].source_dset) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset source dataset") + /* Free original source names */ + (void)H5MM_xfree(layout->storage.u.virt.list[i].source_file_name); + (void)H5MM_xfree(layout->storage.u.virt.list[i].source_dset_name); + /* Free sub_dset */ for(j = 0; j < layout->storage.u.virt.list[i].sub_dset_nalloc; j++) if(H5D__virtual_reset_source_dset(&layout->storage.u.virt.list[i], &layout->storage.u.virt.list[i].sub_dset[j]) < 0) @@ -495,14 +545,28 @@ H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent, } /* end if */ /* Free file name */ - if((source_dset == &virtual_ent->source_dset) - || virtual_ent->parsed_source_file_name) + if(virtual_ent->parsed_source_file_name + && (source_dset->file_name + != virtual_ent->parsed_source_file_name->name_segment)) source_dset->file_name = (char *)H5MM_xfree(source_dset->file_name); + else + HDassert((source_dset->file_name == virtual_ent->source_file_name) + || (virtual_ent->parsed_source_file_name + && (source_dset->file_name + == virtual_ent->parsed_source_file_name->name_segment)) + || !source_dset->file_name); /* Free dataset name */ - if((source_dset == &virtual_ent->source_dset) - || virtual_ent->parsed_source_dset_name) + if(virtual_ent->parsed_source_dset_name + && (source_dset->dset_name + != virtual_ent->parsed_source_dset_name->name_segment)) source_dset->dset_name = (char *)H5MM_xfree(source_dset->dset_name); + else + HDassert((source_dset->dset_name == virtual_ent->source_dset_name) + || (virtual_ent->parsed_source_dset_name + && (source_dset->dset_name + == virtual_ent->parsed_source_dset_name->name_segment)) + || !source_dset->dset_name); /* Free clipped virtual selection */ if(source_dset->clipped_virtual_select) { @@ -695,8 +759,9 @@ H5D_virtual_parse_source_name(const char *source_name, p = pct + 2; } /* end while */ - /* Copy last segment of name, if any, unless there were no substitutions */ - if(tmp_nsubs > 0) { + /* Copy last segment of name, if any, unless the parsed name was not + * allocated */ + if(tmp_parsed_name) { HDassert(p >= source_name); if(*p == '\0') HDassert((size_t)(p - source_name) == tmp_strlen); @@ -849,8 +914,10 @@ H5D__virtual_build_source_name(char *source_name, /* Check for static name */ if(nsubs == 0) { - HDassert(!parsed_name); - *built_name = source_name; + if(parsed_name) + *built_name = parsed_name->name_segment; + else + *built_name = source_name; } /* end if */ else { const H5O_storage_virtual_name_seg_t *name_seg = parsed_name; @@ -1105,12 +1172,12 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) else { /* Resolve file name */ if(!storage->list[i].sub_dset[j].file_name) - if(H5D__virtual_build_source_name(storage->list[i].source_dset.file_name, storage->list[i].parsed_source_file_name, storage->list[i].psfn_static_strlen, storage->list[i].psfn_nsubs, j, &storage->list[i].sub_dset[j].file_name) < 0) + if(H5D__virtual_build_source_name(storage->list[i].source_file_name, storage->list[i].parsed_source_file_name, storage->list[i].psfn_static_strlen, storage->list[i].psfn_nsubs, j, &storage->list[i].sub_dset[j].file_name) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source file name") /* Resolve dset name */ if(!storage->list[i].sub_dset[j].dset_name) - if(H5D__virtual_build_source_name(storage->list[i].source_dset.dset_name, storage->list[i].parsed_source_dset_name, storage->list[i].psdn_static_strlen, storage->list[i].psdn_nsubs, j, &storage->list[i].sub_dset[j].dset_name) < 0) + if(H5D__virtual_build_source_name(storage->list[i].source_dset_name, storage->list[i].parsed_source_dset_name, storage->list[i].psdn_static_strlen, storage->list[i].psdn_nsubs, j, &storage->list[i].sub_dset[j].dset_name) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source dataset name") /* Resolve virtual selection for block */ @@ -1399,7 +1466,7 @@ done: */ herr_t H5D__virtual_init(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, - const H5D_t *dset, hid_t dapl_id) + const H5D_t *dset, hid_t dapl_id) { H5O_storage_virtual_t *storage; /* Convenience pointer */ H5P_genplist_t *dapl; /* Data access property list object pointer */ @@ -1521,8 +1588,7 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); /* Check for "printf" source dataset resolution */ - if(storage->list[i].parsed_source_file_name - || storage->list[i].parsed_source_dset_name) { + if(storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) { hbool_t partial_block; HDassert(storage->list[i].unlim_dim_virtual >= 0); @@ -1667,8 +1733,7 @@ H5D__virtual_post_io(H5O_storage_virtual_t *storage) /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) /* Check for "printf" source dataset resolution */ - if(storage->list[i].parsed_source_file_name - || storage->list[i].parsed_source_dset_name) { + if(storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) { /* Iterate over sub-source dsets */ for(j = storage->list[i].sub_dset_io_start; j < storage->list[i].sub_dset_io_end; j++) @@ -1795,8 +1860,7 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); /* Check for "printf" source dataset resolution */ - if(storage->list[i].parsed_source_file_name - || storage->list[i].parsed_source_dset_name) { + if(storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) { /* Iterate over sub-source dsets */ for(j = storage->list[i].sub_dset_io_start; j < storage->list[i].sub_dset_io_end; j++) @@ -1820,8 +1884,7 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) /* Check for "printf" source dataset resolution */ - if(storage->list[i].parsed_source_file_name - || storage->list[i].parsed_source_dset_name) { + if(storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) { /* Iterate over sub-source dsets */ for(j = storage->list[i].sub_dset_io_start; j < storage->list[i].sub_dset_io_end; j++) @@ -1978,8 +2041,7 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); /* Check for "printf" source dataset resolution */ - if(storage->list[i].parsed_source_file_name - || storage->list[i].parsed_source_dset_name) { + if(storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) { /* Iterate over sub-source dsets */ for(j = storage->list[i].sub_dset_io_start; j < storage->list[i].sub_dset_io_end; j++) { diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 33c35ed..5a388fe 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -283,16 +283,16 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED * for(i = 0; i < mesg->storage.u.virt.list_nused; i++) { /* Source file name */ tmp_size = HDstrlen((const char *)heap_block_p) + 1; - if(NULL == (mesg->storage.u.virt.list[i].source_dset.file_name = (char *)H5MM_malloc(tmp_size))) + if(NULL == (mesg->storage.u.virt.list[i].source_file_name = (char *)H5MM_malloc(tmp_size))) HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, NULL, "unable to allocate memory for source file name") - (void)HDmemcpy(mesg->storage.u.virt.list[i].source_dset.file_name, heap_block_p, tmp_size); + (void)HDmemcpy(mesg->storage.u.virt.list[i].source_file_name, heap_block_p, tmp_size); heap_block_p += tmp_size; /* Source dataset name */ tmp_size = HDstrlen((const char *)heap_block_p) + 1; - if(NULL == (mesg->storage.u.virt.list[i].source_dset.dset_name = (char *)H5MM_malloc(tmp_size))) + if(NULL == (mesg->storage.u.virt.list[i].source_dset_name = (char *)H5MM_malloc(tmp_size))) HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, NULL, "unable to allocate memory for source dataset name") - (void)HDmemcpy(mesg->storage.u.virt.list[i].source_dset.dset_name, heap_block_p, tmp_size); + (void)HDmemcpy(mesg->storage.u.virt.list[i].source_dset_name, heap_block_p, tmp_size); heap_block_p += tmp_size; /* Source selection */ @@ -305,11 +305,24 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED * /* Parse source file and dataset names for "printf" * style format specifiers */ - if(H5D_virtual_parse_source_name(mesg->storage.u.virt.list[i].source_dset.file_name, &mesg->storage.u.virt.list[i].parsed_source_file_name, &mesg->storage.u.virt.list[i].psfn_static_strlen, &mesg->storage.u.virt.list[i].psfn_nsubs) < 0) + if(H5D_virtual_parse_source_name(mesg->storage.u.virt.list[i].source_file_name, &mesg->storage.u.virt.list[i].parsed_source_file_name, &mesg->storage.u.virt.list[i].psfn_static_strlen, &mesg->storage.u.virt.list[i].psfn_nsubs) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't parse source file name") - if(H5D_virtual_parse_source_name(mesg->storage.u.virt.list[i].source_dset.dset_name, &mesg->storage.u.virt.list[i].parsed_source_dset_name, &mesg->storage.u.virt.list[i].psdn_static_strlen, &mesg->storage.u.virt.list[i].psdn_nsubs) < 0) + if(H5D_virtual_parse_source_name(mesg->storage.u.virt.list[i].source_dset_name, &mesg->storage.u.virt.list[i].parsed_source_dset_name, &mesg->storage.u.virt.list[i].psdn_static_strlen, &mesg->storage.u.virt.list[i].psdn_nsubs) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't parse source dataset name") + /* Set source names in source_dset struct */ + if((mesg->storage.u.virt.list[i].psfn_nsubs == 0) + && (mesg->storage.u.virt.list[i].psdn_nsubs == 0)) { + if(mesg->storage.u.virt.list[i].parsed_source_file_name) + mesg->storage.u.virt.list[i].source_dset.file_name = mesg->storage.u.virt.list[i].parsed_source_file_name->name_segment; + else + mesg->storage.u.virt.list[i].source_dset.file_name = mesg->storage.u.virt.list[i].source_file_name; + if(mesg->storage.u.virt.list[i].parsed_source_dset_name) + mesg->storage.u.virt.list[i].source_dset.dset_name = mesg->storage.u.virt.list[i].parsed_source_dset_name->name_segment; + else + mesg->storage.u.virt.list[i].source_dset.dset_name = mesg->storage.u.virt.list[i].source_dset_name; + } /* end if */ + /* unlim_dim fields */ mesg->storage.u.virt.list[i].unlim_dim_source = H5S_get_select_unlim_dim(mesg->storage.u.virt.list[i].source_select); mesg->storage.u.virt.list[i].unlim_dim_virtual = H5S_get_select_unlim_dim(mesg->storage.u.virt.list[i].source_dset.virtual_select); @@ -486,17 +499,17 @@ H5O_layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c /* Calculate size of each entry */ for(i = 0; i < mesg->storage.u.virt.list_nused; i++) { - HDassert(mesg->storage.u.virt.list[i].source_dset.file_name); - HDassert(mesg->storage.u.virt.list[i].source_dset.dset_name); + HDassert(mesg->storage.u.virt.list[i].source_file_name); + HDassert(mesg->storage.u.virt.list[i].source_dset_name); HDassert(mesg->storage.u.virt.list[i].source_select); HDassert(mesg->storage.u.virt.list[i].source_dset.virtual_select); /* Source file name */ - str_size[2 * i] = HDstrlen(mesg->storage.u.virt.list[i].source_dset.file_name) + (size_t)1; + str_size[2 * i] = HDstrlen(mesg->storage.u.virt.list[i].source_file_name) + (size_t)1; block_size += str_size[2 * i]; /* Source dset name */ - str_size[(2 * i) + 1] = HDstrlen(mesg->storage.u.virt.list[i].source_dset.dset_name) + (size_t)1; + str_size[(2 * i) + 1] = HDstrlen(mesg->storage.u.virt.list[i].source_dset_name) + (size_t)1; block_size += str_size[(2 * i) + 1]; /* Source selection */ @@ -529,11 +542,11 @@ H5O_layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c /* Encode each entry */ for(i = 0; i < mesg->storage.u.virt.list_nused; i++) { /* Source file name */ - (void)HDstrcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_dset.file_name); + (void)HDstrcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_file_name); heap_block_p += str_size[2 * i]; /* Source dataset name */ - (void)HDstrcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_dset.dset_name); + (void)HDstrcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_dset_name); heap_block_p += str_size[(2 * i) + 1]; /* Source selection */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 8462382..29f727d 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -415,11 +415,11 @@ typedef struct H5O_storage_compact_t { typedef struct H5O_storage_virtual_srcdset_t { /* Stored */ - char *file_name; /* Source file name used for virtual dataset mapping */ - char *dset_name; /* Source dataset name used for virtual dataset mapping */ struct H5S_t *virtual_select; /* Selection in the virtual dataset that is mapped to source selection */ /* Not stored */ + char *file_name; /* Source file name used for virtual dataset mapping */ + char *dset_name; /* Source dataset name used for virtual dataset mapping */ struct H5S_t *clipped_source_select; /* Clipped version of source_select */ struct H5S_t *clipped_virtual_select; /* Clipped version of virtual_select */ struct H5D_t *dset; /* Source dataset */ @@ -443,6 +443,8 @@ typedef enum H5O_virtual_space_status_t { typedef struct H5O_storage_virtual_ent_t { /* Stored */ H5O_storage_virtual_srcdset_t source_dset; /* Information about the source dataset */ + char *source_file_name; /* Original (unparsed) source file name */ + char *source_dset_name; /* Original (unparsed) source dataset name */ struct H5S_t *source_select; /* Selection in the source dataset for mapping */ /* Not stored */ diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index d17a281..54694a0 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1674,19 +1674,29 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, /* Add virtual dataset mapping entry */ ent = &layout.storage.u.virt.list[layout.storage.u.virt.list_nused]; - if(NULL == (ent->source_dset.file_name = HDstrdup(src_file_name))) - HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name") - adding_entry = TRUE; - if(NULL == (ent->source_dset.dset_name = HDstrdup(src_dset_name))) - HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name") if(NULL == (ent->source_dset.virtual_select = H5S_copy(vspace, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + adding_entry = TRUE; + if(NULL == (ent->source_file_name = HDstrdup(src_file_name))) + HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name") + if(NULL == (ent->source_dset_name = HDstrdup(src_dset_name))) + HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name") if(NULL == (ent->source_select = H5S_copy(src_space, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection") - if(H5D_virtual_parse_source_name(ent->source_dset.file_name, &ent->parsed_source_file_name, &ent->psfn_static_strlen, &ent->psfn_nsubs) < 0) + if(H5D_virtual_parse_source_name(ent->source_file_name, &ent->parsed_source_file_name, &ent->psfn_static_strlen, &ent->psfn_nsubs) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source file name") - if(H5D_virtual_parse_source_name(ent->source_dset.dset_name, &ent->parsed_source_dset_name, &ent->psdn_static_strlen, &ent->psdn_nsubs) < 0) + if(H5D_virtual_parse_source_name(ent->source_dset_name, &ent->parsed_source_dset_name, &ent->psdn_static_strlen, &ent->psdn_nsubs) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source dataset name") + if((ent->psfn_nsubs == 0) && (ent->psdn_nsubs == 0)) { + if(ent->parsed_source_file_name) + ent->source_dset.file_name = ent->parsed_source_file_name->name_segment; + else + ent->source_dset.file_name = ent->source_file_name; + if(ent->parsed_source_dset_name) + ent->source_dset.dset_name = ent->parsed_source_dset_name->name_segment; + else + ent->source_dset.dset_name = ent->source_dset_name; + } /* end if */ ent->unlim_dim_source = H5S_get_select_unlim_dim(src_space); ent->unlim_dim_virtual = H5S_get_select_unlim_dim(vspace); if(ent->unlim_dim_virtual < 0) { @@ -1735,8 +1745,8 @@ done: if(ret_value < 0) { /* Free incomplete entry if present */ if(ent) { - ent->source_dset.file_name = (char *)H5MM_xfree(ent->source_dset.file_name); - ent->source_dset.dset_name = (char *)H5MM_xfree(ent->source_dset.dset_name); + ent->source_file_name = (char *)H5MM_xfree(ent->source_file_name); + ent->source_dset_name = (char *)H5MM_xfree(ent->source_dset_name); if(ent->source_dset.virtual_select && H5S_close(ent->source_dset.virtual_select) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release virtual selection") ent->source_dset.virtual_select = NULL; @@ -1960,10 +1970,10 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name/*out*/, if(index >= layout.storage.u.virt.list_nused) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); - HDassert(layout.storage.u.virt.list[index].source_dset.file_name); + HDassert(layout.storage.u.virt.list[index].source_file_name); if(name && (size > 0)) - (void)HDstrncpy(name, layout.storage.u.virt.list[index].source_dset.file_name, size); - ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[index].source_dset.file_name); + (void)HDstrncpy(name, layout.storage.u.virt.list[index].source_file_name, size); + ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[index].source_file_name); done: FUNC_LEAVE_API(ret_value) @@ -2007,10 +2017,10 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name/*out*/, if(index >= layout.storage.u.virt.list_nused) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); - HDassert(layout.storage.u.virt.list[index].source_dset.dset_name); + HDassert(layout.storage.u.virt.list[index].source_dset_name); if(name && (size > 0)) - (void)HDstrncpy(name, layout.storage.u.virt.list[index].source_dset.dset_name, size); - ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[index].source_dset.dset_name); + (void)HDstrncpy(name, layout.storage.u.virt.list[index].source_dset_name, size); + ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[index].source_dset_name); done: FUNC_LEAVE_API(ret_value) diff --git a/test/vds.c b/test/vds.c index f39136d..6540e5a 100644 --- a/test/vds.c +++ b/test/vds.c @@ -35,6 +35,7 @@ const char *FILENAME[] = { "vds_virt", "vds_src_0", "vds_src_1", + "vds%_src", NULL }; @@ -993,6 +994,9 @@ test_basic_io(unsigned config, hid_t fapl) { char srcfilename[FILENAME_BUF_SIZE]; char vfilename[FILENAME_BUF_SIZE]; + char srcfilenamepct[FILENAME_BUF_SIZE]; + char srcfilenamepct_fmt_fix[FILENAME_BUF_SIZE]; + const char *srcfilenamepct_fmt = "vds%%_src"; hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */ hid_t vfile = -1; /* File with virtual dset */ hid_t dcpl = -1; /* Dataset creation property list */ @@ -1001,7 +1005,7 @@ test_basic_io(unsigned config, hid_t fapl) hid_t memspace = -1; /* Memory dataspace */ hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datsets */ hid_t vdset = -1; /* Virtual dataset */ - hsize_t dims[4] = {10, 26, -1, -1}; /* Data space current size */ + hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */ hsize_t start[4]; /* Hyperslab start */ hsize_t stride[4]; /* Hyperslab stride */ hsize_t count[4]; /* Hyperslab count */ @@ -1018,6 +1022,8 @@ test_basic_io(unsigned config, hid_t fapl) h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename); h5_fixname(FILENAME[1], fapl, srcfilename, sizeof srcfilename); + h5_fixname(FILENAME[3], fapl, srcfilenamepct, sizeof srcfilenamepct); + h5_fixname(srcfilenamepct_fmt, fapl, srcfilenamepct_fmt_fix, sizeof srcfilenamepct_fmt_fix); /* Create DCPL */ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) @@ -1169,7 +1175,8 @@ test_basic_io(unsigned config, hid_t fapl) /* - * Test 2: 2 Source datasets, hyperslab virtual mappings + * Test 2: 2 Source datasets, hyperslab virtual mappings, '%' in source + * dataset name */ /* Clear virtual layout in DCPL */ if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) @@ -1201,9 +1208,9 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR /* Add virtual layout mappings */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "%%src_dset1", srcspace[0]) < 0) TEST_ERROR - if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2%%", srcspace[0]) < 0) TEST_ERROR /* Reset dims */ @@ -1225,9 +1232,9 @@ test_basic_io(unsigned config, hid_t fapl) } /* end if */ /* Create source datasets */ - if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if((srcdset[0] = H5Dcreate2(srcfile[0], "%src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2%", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Create virtual dataset */ @@ -1300,9 +1307,9 @@ test_basic_io(unsigned config, hid_t fapl) if(config & TEST_IO_DIFFERENT_FILE) if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) TEST_ERROR - if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) + if((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR - if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) + if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0) TEST_ERROR } /* end if */ @@ -1348,7 +1355,7 @@ test_basic_io(unsigned config, hid_t fapl) /* * Test 3: 2 Source datasets, hyperslab virtual mappings on one mapping at a - * time + * time, '%' in source file name */ /* Clear virtual layout in DCPL */ if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) @@ -1380,9 +1387,9 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR /* Add virtual layout mappings */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_fmt_fix : ".", "src_dset1", srcspace[0]) < 0) TEST_ERROR - if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_fmt_fix : ".", "src_dset2", srcspace[0]) < 0) TEST_ERROR /* Reset dims */ @@ -1394,7 +1401,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Create source file if requested */ if(config & TEST_IO_DIFFERENT_FILE) { - if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + if((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR } /* end if */ else { @@ -1499,7 +1506,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen srcdsets and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR @@ -5175,6 +5182,9 @@ test_printf(unsigned config, hid_t fapl) char vfilename[FILENAME_BUF_SIZE]; char printf_srcfilename[FILENAME_BUF_SIZE]; const char *printf_srcfilename_fmt = "vds_src_%b"; + char srcfilenamepct[FILENAME_BUF_SIZE]; + char srcfilenamepct_fmt_fix[FILENAME_BUF_SIZE]; + const char *srcfilenamepct_fmt = "vds%%_src"; hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */ hid_t vfile = -1; /* File with virtual dset */ hid_t dcpl = -1; /* Dataset creation property list */ @@ -5204,6 +5214,8 @@ test_printf(unsigned config, hid_t fapl) h5_fixname(FILENAME[1], fapl, srcfilename, sizeof srcfilename); h5_fixname(FILENAME[2], fapl, srcfilename2, sizeof srcfilename2); h5_fixname(printf_srcfilename_fmt, fapl, printf_srcfilename, sizeof printf_srcfilename); + h5_fixname(FILENAME[3], fapl, srcfilenamepct, sizeof srcfilenamepct); + h5_fixname(srcfilenamepct_fmt, fapl, srcfilenamepct_fmt_fix, sizeof srcfilenamepct_fmt_fix); /* Create DCPL */ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) @@ -5610,7 +5622,8 @@ test_printf(unsigned config, hid_t fapl) /* - * Test 2: 1 Source dataset mapping, 10x1 blocks, test printf gap setting + * Test 2: 1 Source dataset mapping, 10x1 blocks, test printf gap setting, + * '%' in source file name */ /* Clear virtual layout in DCPL */ if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) @@ -5636,7 +5649,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR /* Add virtual layout mapping */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset%b", srcspace) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_fmt_fix : ".", "src_dset%b", srcspace) < 0) TEST_ERROR /* Create virtual file */ @@ -5645,7 +5658,7 @@ test_printf(unsigned config, hid_t fapl) /* Create source file if requested */ if(config & TEST_IO_DIFFERENT_FILE) { - if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + if((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR } /* end if */ else { @@ -5707,7 +5720,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) TEST_ERROR /* Create source datasets in a pattern with increasing gaps: -- cgit v0.12 From 3d5c3851a3b24a726174847519f556eb627348cb Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 16 Jun 2015 16:15:55 -0500 Subject: [svn-r27218] Add VDS tests to h5ls --- MANIFEST | 9 +- tools/h5ls/CMakeLists.txt | 2 + tools/h5ls/CMakeTestsVDS.cmake | 155 +++++++++++++++++++++++ tools/h5ls/testh5lsvds.sh.in | 264 ++++++++++++++++++++++++++++++++++++++++ tools/testfiles/vds/tvds-1.ls | 14 +++ tools/testfiles/vds/tvds-2.ls | 13 ++ tools/testfiles/vds/tvds-3_1.ls | 14 +++ tools/testfiles/vds/tvds-3_2.ls | 13 ++ tools/testfiles/vds/tvds-4.ls | 9 ++ tools/testfiles/vds/tvds-5.ls | 11 ++ 10 files changed, 503 insertions(+), 1 deletion(-) create mode 100644 tools/h5ls/CMakeTestsVDS.cmake create mode 100644 tools/h5ls/testh5lsvds.sh.in create mode 100644 tools/testfiles/vds/tvds-1.ls create mode 100644 tools/testfiles/vds/tvds-2.ls create mode 100644 tools/testfiles/vds/tvds-3_1.ls create mode 100644 tools/testfiles/vds/tvds-3_2.ls create mode 100644 tools/testfiles/vds/tvds-4.ls create mode 100644 tools/testfiles/vds/tvds-5.ls diff --git a/MANIFEST b/MANIFEST index 3922bc6..2ef4e14 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1272,6 +1272,7 @@ ./tools/h5ls/Makefile.in ./tools/h5ls/h5ls.c ./tools/h5ls/testh5ls.sh.in +./tools/h5ls/testh5lsvds.sh.in # h5copy sources ./tools/h5copy/testh5copy.sh.in @@ -1870,7 +1871,13 @@ ./tools/testfiles/thlinks-nodangle-1.ls ./tools/testfiles/tudlink-1.ls - +# h5ls vds validation +./tools/testfiles/vds/tvds-1.ls +./tools/testfiles/vds/tvds-2.ls +./tools/testfiles/vds/tvds-3_1.ls +./tools/testfiles/vds/tvds-3_2.ls +./tools/testfiles/vds/tvds-4.ls +./tools/testfiles/vds/tvds-5.ls #additional test input and output for h5dump XML ./tools/testfiles/tall.h5.xml diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index 984b36b..1bf5f4c 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -23,6 +23,8 @@ if (BUILD_TESTING) include (CMakeTests.cmake) + include (CMakeTestsVDS.cmake) + endif (BUILD_TESTING) ############################################################################## diff --git a/tools/h5ls/CMakeTestsVDS.cmake b/tools/h5ls/CMakeTestsVDS.cmake new file mode 100644 index 0000000..b10674b --- /dev/null +++ b/tools/h5ls/CMakeTestsVDS.cmake @@ -0,0 +1,155 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + # -------------------------------------------------------------------- + # Copy all the test files from source directory to test directory + # -------------------------------------------------------------------- + set (LIST_HDF5_TEST_FILES + 1_a.h5 + 1_b.h5 + 1_c.h5 + 1_d.h5 + 1_e.h5 + 1_f.h5 + 1_vds.h5 + 2_a.h5 + 2_b.h5 + 2_c.h5 + 2_d.h5 + 2_e.h5 + 2_vds.h5 + 3_1_vds.h5 + 3_2_vds.h5 + 4_0.h5 + 4_1.h5 + 4_2.h5 + 4_vds.h5 + 5_a.h5 + 5_b.h5 + 5_c.h5 + 5_vds.h5 + ) + + set (LIST_OTHER_TEST_FILES + tvds-1.ls + tvds-2.ls + tvds-3_1.ls + tvds-3_2.ls + tvds-4.ls + tvds-5.ls + tvds_layout-1.ls + tvds_layout-2.ls + tvds_layout-3_1.ls + tvds_layout-3_2.ls + tvds_layout-4.ls + tvds_layout-5.ls + ) + + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + + # copy the list of test files + foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) + GET_FILENAME_COMPONENT(fname "${listfiles}" NAME) + set (dest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}") + #message (STATUS " Copying ${listfiles} to ${dest}") + add_custom_command ( + TARGET h5ls + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${listfiles} ${dest} + ) + endforeach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) + + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + + MACRO (ADD_H5_VDS_TEST resultfile resultcode) + # If using memchecker add tests without using scripts + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5LS-${resultfile} COMMAND $ ${ARGN}) + set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds") + if (${resultcode} STREQUAL "1") + set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true") + endif (${resultcode} STREQUAL "1") + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") + else (HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5LS-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ./testfiles/${resultfile}.out ./testfiles/vds/${resultfile}.out.err + ) + add_test ( + NAME H5LS-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ls" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS "H5LS_VDS-${resultfile}-clear-objects") + endif (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_VDS_TEST file) + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## + + if (HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + add_test ( + NAME H5LS_VDS-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + tvds-1.out + tvds-1.out.err + tvds-2.out + tvds-2.out.err + tvds-3_1.out + tvds-3_1.out.err + tvds-3_2.out + tvds-3_2.out.err + tvds-4.out + tvds-4.out.err + tvds-5.out + tvds-5.out.err + tvds_layout-1.out + tvds_layout-1.out.err + tvds_layout-2.out + tvds_layout-2.out.err + tvds_layout-3_1.out + tvds_layout-3_1.out.err + tvds_layout-3_2.out + tvds_layout-3_2.out.err + tvds_layout-4.out + tvds_layout-4.out.err + tvds_layout-5.out + tvds_layout-5.out.err + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5LS_VDS-clearall-objects PROPERTIES DEPENDS ${last_test}) + endif (NOT "${last_test}" STREQUAL "") + set (last_test "H5LS_VDS-clearall-objects") + endif (HDF5_ENABLE_USING_MEMCHECKER) + + ADD_H5_VDS_TEST (tvds-1 0 -w80 -v 1_vds.h5) + ADD_H5_VDS_TEST (tvds-2 0 -w80 -v 2_vds.h5) + ADD_H5_VDS_TEST (tvds-3_1 0 -w80 -v 3_1_vds.h5) + ADD_H5_VDS_TEST (tvds-3_2 0 -w80 -v 3_2_vds.h5) + ADD_H5_VDS_TEST (tvds-4 0 -w80 -v 4_vds.h5) + ADD_H5_VDS_TEST (tvds-5 0 -w80 -v 5_vds.h5) + diff --git a/tools/h5ls/testh5lsvds.sh.in b/tools/h5ls/testh5lsvds.sh.in new file mode 100644 index 0000000..2fd4bc0 --- /dev/null +++ b/tools/h5ls/testh5lsvds.sh.in @@ -0,0 +1,264 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from help@hdfgroup.org. +# +# Tests for the h5ls tool + +srcdir=@srcdir@ + +TESTNAME=h5ls +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +H5LS=h5ls # The tool name +H5LS_BIN=`pwd`/$H5LS # The path of the tool binary + +RM='rm -rf' +CMP='cmp -s' +DIFF='diff -c' +CP='cp' +NLINES=20 # Max. lines of output to display if test fails +DIRNAME='dirname' +LS='ls' +AWK='awk' + +WORDS_BIGENDIAN="@WORDS_BIGENDIAN@" + +nerrors=0 +verbose=yes +h5haveexitcode=yes # default is yes + +# source dirs +SRC_TOOLS="$srcdir/.." +SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles" + +# testfiles source dirs for tools +SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES" +SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES" +SRC_H5DIFF_TESTFILES="$SRC_TOOLS/h5diff/testfiles" +SRC_H5COPY_TESTFILES="$SRC_TOOLS/h5copy/testfiles" +SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles" +SRC_H5JAM_TESTFILES="$SRC_TOOLS/h5jam/testfiles" +SRC_H5STAT_TESTFILES="$SRC_TOOLS/h5stat/testfiles" +SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/h5import/testfiles" + +TEST_P_DIR=./testfiles +TESTDIR=./testfiles/vds +test -d $TEST_P_DIR || mkdir -p $TEST_P_DIR +test -d $TESTDIR || mkdir $TESTDIR + +###################################################################### +# test files +# -------------------------------------------------------------------- +# All the test files copy from source directory to test directory +# NOTE: Keep this framework to add/remove test files. +# Any test files from other tools can be used in this framework. +# This list are also used for checking exist. +# Comment '#' without space can be used. +# -------------------------------------------------------------------- +LIST_HDF5_TEST_FILES=" +$SRC_H5LS_TESTFILES/vds/1_a.h5 +$SRC_H5LS_TESTFILES/vds/1_b.h5 +$SRC_H5LS_TESTFILES/vds/1_c.h5 +$SRC_H5LS_TESTFILES/vds/1_d.h5 +$SRC_H5LS_TESTFILES/vds/1_e.h5 +$SRC_H5LS_TESTFILES/vds/1_f.h5 +$SRC_H5LS_TESTFILES/vds/1_vds.h5 +$SRC_H5LS_TESTFILES/vds/2_a.h5 +$SRC_H5LS_TESTFILES/vds/2_b.h5 +$SRC_H5LS_TESTFILES/vds/2_c.h5 +$SRC_H5LS_TESTFILES/vds/2_d.h5 +$SRC_H5LS_TESTFILES/vds/2_e.h5 +$SRC_H5LS_TESTFILES/vds/2_vds.h5 +$SRC_H5LS_TESTFILES/vds/3_1_vds.h5 +$SRC_H5LS_TESTFILES/vds/3_2_vds.h5 +$SRC_H5LS_TESTFILES/vds/4_0.h5 +$SRC_H5LS_TESTFILES/vds/4_1.h5 +$SRC_H5LS_TESTFILES/vds/4_2.h5 +$SRC_H5LS_TESTFILES/vds/4_vds.h5 +$SRC_H5LS_TESTFILES/vds/5_a.h5 +$SRC_H5LS_TESTFILES/vds/5_b.h5 +$SRC_H5LS_TESTFILES/vds/5_c.h5 +$SRC_H5LS_TESTFILES/vds/5_vds.h5 +" + +LIST_OTHER_TEST_FILES=" +$SRC_H5LS_TESTFILES/vds/tvds-1.ls +$SRC_H5LS_TESTFILES/vds/tvds-2.ls +$SRC_H5LS_TESTFILES/vds/tvds-3_1.ls +$SRC_H5LS_TESTFILES/vds/tvds-3_2.ls +$SRC_H5LS_TESTFILES/vds/tvds-4.ls +$SRC_H5LS_TESTFILES/vds/tvds-5.ls +$SRC_H5LS_TESTFILES/vds/tvds_layout-1.ls +$SRC_H5LS_TESTFILES/vds/tvds_layout-2.ls +$SRC_H5LS_TESTFILES/vds/tvds_layout-3_1.ls +$SRC_H5LS_TESTFILES/vds/tvds_layout-3_2.ls +$SRC_H5LS_TESTFILES/vds/tvds_layout-4.ls +$SRC_H5LS_TESTFILES/vds/tvds_layout-5.ls +" + + +# RUNSERIAL is used. Check if it can return exit code from executalbe correctly. +if [ -n "$RUNSERIAL_NOEXITCODE" ]; then + echo "***Warning*** Serial Exit Code is not passed back to shell corretly." + echo "***Warning*** Exit code checking is skipped." + h5haveexitcode=no +fi + +# +# copy test files and expected output files from source dirs to test dir +# +COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES" + +COPY_TESTFILES_TO_TESTDIR() +{ + # copy test files. Used -f to make sure get a new copy + for tstfile in $COPY_TESTFILES + do + # ignore '#' comment + echo $tstfile | tr -d ' ' | grep '^#' > /dev/null + RET=$? + if [ $RET -eq 1 ]; then + # skip cp if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $CP -f $tstfile $TESTDIR + if [ $? -ne 0 ]; then + echo "Error: FAILED to copy $tstfile ." + + # Comment out this to CREATE expected file + exit $EXIT_FAILURE + fi + fi + fi + done +} + +CLEAN_TESTFILES_AND_TESTDIR() +{ + # skip rm if srcdir is same as destdir + # this occurs when build/test performed in source dir and + # make cp fail + SDIR=`$DIRNAME $tstfile` + INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` + INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` + if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then + $RM $TESTDIR + fi +} + +# Print a line-line message left justified in a field of 70 characters +# beginning with the word "Testing". +TESTING() { + SPACES=" " + echo "Testing $* $SPACES" |cut -c1-70 |tr -d '\012' +} + +# Source in the output filter function definitions. +. $srcdir/../../bin/output_filter.sh + +# Run a test and print PASS or *FAIL*. For now, if h5ls can complete +# with exit status 0, consider it pass. If a test fails then increment +# the `nerrors' global variable and (if $verbose is set) display up to $NLINS +# lines of the actual output from the tool test. The actual output is not +# removed if $HDF5_NOCLEANUP has a non-zero value. +# Arguemnts: +# $1 -- actual output filename to use +# $2 and on -- argument for the h5ls tool +TOOLTEST() { + expect="$TESTDIR/$1" + actual="$TESTDIR/`basename $1 .ls`.out" + actual_err="$TESTDIR/`basename $1 .ls`.err" + actual_sav=${actual}-sav + actual_err_sav=${actual_err}-sav + shift + retvalexpect=$1 + shift + + # Run test. + # Stderr is included in stdout so that the diff can detect + # any unexpected output from that stream too. + TESTING $H5LS $@ + ( + cd $TESTDIR + $RUNSERIAL $H5LS_BIN "$@" + ) >$actual 2>$actual_err + + exitcode=$? + # save actual and actual_err in case they are needed later. + cp $actual $actual_sav + STDOUT_FILTER $actual + cp $actual_err $actual_err_sav + STDERR_FILTER $actual_err + cat $actual_err >> $actual + if [ $h5haveexitcode = 'yes' -a $exitcode -ne $retvalexpect ]; then + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + if [ yes = "$verbose" ]; then + echo "test returned with exit code $exitcode" + echo "test output: (up to $NLINES lines)" + head -$NLINES $actual + echo "***end of test output***" + echo "" + fi + elif [ ! -f $expect ]; then + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + elif $CMP $expect $actual; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result differs from actual result" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actual_err $actual_sav $actual_err_sav + fi +} + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## +# prepare for test +COPY_TESTFILES_TO_TESTDIR + +####### test for dataset vds ###### + +TOOLTEST tvds-1.ls -w80 -v 1_vds.h5 +TOOLTEST tvds-2.ls -w80 -v 2_vds.h5 +TOOLTEST tvds-3_1.ls -w80 -v 3_1_vds.h5 +TOOLTEST tvds-3_2.ls -w80 -v 3_2_vds.h5 +TOOLTEST tvds-4.ls -w80 -v 4_vds.h5 +TOOLTEST tvds-5.ls -w80 -v 5_vds.h5 + +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR + +if test $nerrors -eq 0 ; then + echo "All $TESTNAME tests passed." + exit $EXIT_SUCCESS +else + echo "$TESTNAME tests failed with $nerrors errors." + exit $EXIT_FAILURE +fi diff --git a/tools/testfiles/vds/tvds-1.ls b/tools/testfiles/vds/tvds-1.ls new file mode 100644 index 0000000..25a4a3b --- /dev/null +++ b/tools/testfiles/vds/tvds-1.ls @@ -0,0 +1,14 @@ +Opened "1_vds.h5" with sec2 driver. +vds_dset Dataset {5/Inf, 18/18, 8/8} + Location: 1:800 + Links: 1 + Maps: {6} Source { + 1_a.h5 /source_dset + 1_b.h5 /source_dset + 1_c.h5 /source_dset + 1_d.h5 /source_dset + 1_e.h5 /source_dset + 1_f.h5 /source_dset + } + Storage: 2880 logical bytes, 0 allocated bytes + Type: native int diff --git a/tools/testfiles/vds/tvds-2.ls b/tools/testfiles/vds/tvds-2.ls new file mode 100644 index 0000000..cbba5ff --- /dev/null +++ b/tools/testfiles/vds/tvds-2.ls @@ -0,0 +1,13 @@ +Opened "2_vds.h5" with sec2 driver. +vds_dset Dataset {6/Inf, 8/8, 14/14} + Location: 1:800 + Links: 1 + Maps: {5} Source { + 2_a.h5 /source_dset + 2_b.h5 /source_dset + 2_c.h5 /source_dset + 2_d.h5 /source_dset + 2_e.h5 /source_dset + } + Storage: 2688 logical bytes, 0 allocated bytes + Type: native int diff --git a/tools/testfiles/vds/tvds-3_1.ls b/tools/testfiles/vds/tvds-3_1.ls new file mode 100644 index 0000000..0667c4e --- /dev/null +++ b/tools/testfiles/vds/tvds-3_1.ls @@ -0,0 +1,14 @@ +Opened "3_1_vds.h5" with sec2 driver. +vds_dset Dataset {5/Inf, 25/25, 8/8} + Location: 1:800 + Links: 1 + Maps: {6} Source { + 1_a.h5 /source_dset + 1_b.h5 /source_dset + 1_c.h5 /source_dset + 1_d.h5 /source_dset + 1_e.h5 /source_dset + 1_f.h5 /source_dset + } + Storage: 4000 logical bytes, 0 allocated bytes + Type: native int diff --git a/tools/testfiles/vds/tvds-3_2.ls b/tools/testfiles/vds/tvds-3_2.ls new file mode 100644 index 0000000..7d6824c --- /dev/null +++ b/tools/testfiles/vds/tvds-3_2.ls @@ -0,0 +1,13 @@ +Opened "3_2_vds.h5" with sec2 driver. +vds_dset Dataset {6/Inf, 13/13, 19/19} + Location: 1:800 + Links: 1 + Maps: {5} Source { + 2_a.h5 /source_dset + 2_b.h5 /source_dset + 2_c.h5 /source_dset + 2_d.h5 /source_dset + 2_e.h5 /source_dset + } + Storage: 5928 logical bytes, 0 allocated bytes + Type: native int diff --git a/tools/testfiles/vds/tvds-4.ls b/tools/testfiles/vds/tvds-4.ls new file mode 100644 index 0000000..8abc0dd --- /dev/null +++ b/tools/testfiles/vds/tvds-4.ls @@ -0,0 +1,9 @@ +Opened "4_vds.h5" with sec2 driver. +vds_dset Dataset {9/Inf, 4/4, 4/4} + Location: 1:800 + Links: 1 + Maps: {1} Source { + 4_%b.h5 /source_dset + } + Storage: 576 logical bytes, 0 allocated bytes + Type: native int diff --git a/tools/testfiles/vds/tvds-5.ls b/tools/testfiles/vds/tvds-5.ls new file mode 100644 index 0000000..3bd811b --- /dev/null +++ b/tools/testfiles/vds/tvds-5.ls @@ -0,0 +1,11 @@ +Opened "5_vds.h5" with sec2 driver. +vds_dset Dataset {9/Inf, 4/4, 4/4} + Location: 1:800 + Links: 1 + Maps: {3} Source { + 5_a.h5 /source_dset + 5_b.h5 /source_dset + 5_c.h5 /source_dset + } + Storage: 576 logical bytes, 0 allocated bytes + Type: native int -- cgit v0.12 From 616106ade325b1973ef9f5220d6864ae54112b47 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 16 Jun 2015 16:25:03 -0500 Subject: [svn-r27219] Add h5dump and h5 ls VDS test scripts to autools configure --- configure | 14 +++-- configure.ac | 148 ++++++++++++++++++++++++----------------------- tools/h5dump/Makefile.am | 2 +- tools/h5dump/Makefile.in | 11 ++-- tools/h5ls/Makefile.am | 2 +- tools/h5ls/Makefile.in | 10 ++-- 6 files changed, 98 insertions(+), 89 deletions(-) diff --git a/configure b/configure index 855e9f6..ae68a9f 100755 --- a/configure +++ b/configure @@ -21542,7 +21542,7 @@ $as_echo_n "checking whether make will build with undefined variables... " >&6; cat >maketest </dev/null 2>&1; then @@ -26502,9 +26502,9 @@ fi ## Default to no if producton is enabled if test "X-$DEBUG_PKG" = X- ; then if test "$enable_production" = yes ; then - DEBUG_PKG=no + DEBUG_PKG=no else - DEBUG_PKG=yes + DEBUG_PKG=yes fi fi @@ -26878,7 +26878,7 @@ int main () { MPI_Init(0, (void *)0); - MPI_File_open(0, (void *)0, 0, 0, (void *)0); + MPI_File_open(0, (void *)0, 0, 0, (void *)0); ; return 0; } @@ -26889,7 +26889,7 @@ $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - as_fn_error $? "unable to link a simple MPI-IO C program" "$LINENO" 5 + as_fn_error $? "unable to link a simple MPI-IO C program" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -30091,7 +30091,7 @@ else fi -ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/misc/vds/Makefile tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" +ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpvds.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5ls/testh5lsvds.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/misc/vds/Makefile tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" cat >confcache <<\_ACEOF @@ -31369,8 +31369,10 @@ do "tools/h5dump/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5dump/Makefile" ;; "tools/h5dump/testh5dump.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dump.sh" ;; "tools/h5dump/testh5dumppbits.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumppbits.sh" ;; + "tools/h5dump/testh5dumpvds.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumpvds.sh" ;; "tools/h5dump/testh5dumpxml.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumpxml.sh" ;; "tools/h5ls/testh5ls.sh") CONFIG_FILES="$CONFIG_FILES tools/h5ls/testh5ls.sh" ;; + "tools/h5ls/testh5lsvds.sh") CONFIG_FILES="$CONFIG_FILES tools/h5ls/testh5lsvds.sh" ;; "tools/h5import/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5import/Makefile" ;; "tools/h5import/h5importtestutil.sh") CONFIG_FILES="$CONFIG_FILES tools/h5import/h5importtestutil.sh" ;; "tools/h5diff/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5diff/Makefile" ;; diff --git a/configure.ac b/configure.ac index 1451348..d650747 100644 --- a/configure.ac +++ b/configure.ac @@ -187,7 +187,7 @@ AC_SUBST([UNAME_INFO]) UNAME_INFO=`uname -a` ## ---------------------------------------------------------------------- ## Some platforms have broken basename, and/or xargs programs. Check ## that it actually does what it's supposed to do. Catch this early -## since configure and scripts relies upon them heavily and there's +## since configure and scripts relies upon them heavily and there's ## no use continuing if it's broken. ## AC_MSG_CHECKING([if basename works]) @@ -335,7 +335,7 @@ AC_ARG_ENABLE([unsupported], [Allow unsupported combinations of configure options])], [ALLOW_UNSUPPORTED=$enableval]) -case "X-$ALLOW_UNSUPPORTED" in +case "X-$ALLOW_UNSUPPORTED" in X-|X-no) AC_MSG_RESULT([no]) ;; @@ -373,7 +373,7 @@ AC_ARG_ENABLE([fortran2003], [HDF_FORTRAN2003=$enableval]) ## ---------------------------------------------------------------------- -## Check to make sure --enable-fortran is present if --enable-fortran2003 +## Check to make sure --enable-fortran is present if --enable-fortran2003 ## was specified if test "X$HDF_FORTRAN2003" = "Xyes" && test "X$HDF_FORTRAN" = "Xno"; then @@ -391,7 +391,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([FC]) HDF_FORTRAN=yes AC_SUBST([HAVE_FORTRAN_2003]) - + HDF5_INTERFACES="$HDF5_INTERFACES fortran" ## -------------------------------------------------------------------- @@ -416,7 +416,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## -------------------------------------------------------------------- ## Check for a Fortran compiler and how to include modules. - ## + ## AC_PROG_FC([PAC_FC_SEARCH_LIST],) AC_F9X_MODS @@ -436,18 +436,18 @@ if test "X$HDF_FORTRAN" = "Xyes"; then PAC_PROG_FC_C_SIZEOF ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" - PAC_PROG_FC_STORAGE_SIZE + PAC_PROG_FC_STORAGE_SIZE ## Check to see if -r8 was specified to determine if we need to ## compile the DOUBLE PRECISION interfaces. - PAC_PROG_FC_DEFAULT_REALisDBLE + PAC_PROG_FC_DEFAULT_REALisDBLE if test "X$HDF_FORTRAN2003" = "Xyes"; then ## Checking if the compiler supports the required Fortran 2003 features and ## disable Fortran 2003 if it does not. PAC_PROG_FC_HAVE_F2003_REQUIREMENTS - + if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then AC_MSG_ERROR([Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran2003]) else @@ -495,8 +495,8 @@ if test "X$HDF_CXX" = "Xyes"; then # Checking if C++ can handle namespaces PAC_PROG_CXX_NAMESPACE - - # Checking if C++ has offsetof extension + + # Checking if C++ has offsetof extension PAC_PROG_CXX_OFFSETOF # if C++ can handle static cast @@ -660,7 +660,7 @@ if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then H5_FORTRAN_SHARED="yes" ## Disable fortran shared libraries on Mac. (MAM - 03/30/11) - + case "`uname`" in Darwin*) H5_FORTRAN_SHARED="no" @@ -669,7 +669,7 @@ if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then esac ## Report results of check(s) - + if test "X${H5_FORTRAN_SHARED}" = "Xno"; then AC_MSG_RESULT([no]) AC_MSG_WARN([$CHECK_WARN]) @@ -705,7 +705,7 @@ LT_INIT([dlopen,win32-dll]) ## ---------------------------------------------------------------------- ## Check if we should install only statically linked executables. ## This check needs to occur after libtool is initialized because -## we check a libtool cache value and may issue a warning based +## we check a libtool cache value and may issue a warning based ## on its result. AC_MSG_CHECKING([if we should install only statically linked executables]) AC_ARG_ENABLE([static_exec], @@ -774,13 +774,13 @@ esac AC_SUBST([AM_MAKEFLAGS]) AM_MAKEFLAGS="" ## Don't run test if MAKE is defined but is the empty string -if test -n "${MAKE-make}"; then +if test -n "${MAKE-make}"; then AC_MSG_CHECKING([whether make will build with undefined variables]) cat >maketest </dev/null 2>&1; then @@ -926,11 +926,11 @@ fi ## ---------------------------------------------------------------------- ## Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines -## that might need to be set for largefile support to behave +## that might need to be set for largefile support to behave ## correctly. This macro is defined in acsite.m4 and overrides ## the version provided by Autoconf (as of v2.65). The custom -## macro additionally adds the appropriate defines to AM_CPPFLAGS -## so that later configure checks have them visible. +## macro additionally adds the appropriate defines to AM_CPPFLAGS +## so that later configure checks have them visible. ## Check for _FILE_OFFSET_BITS _AC_SYS_LARGEFILE_MACRO_VALUE([_FILE_OFFSET_BITS], [64], @@ -951,16 +951,16 @@ fi ## case "$host_cpu-$host_vendor-$host_os" in *linux*) - ## Make available various LFS-related routines using the following + ## Make available various LFS-related routines using the following ## _LARGEFILE*_SOURCE macros. AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS" ## Add POSIX support on Linux systems, so defines ## __USE_POSIX, which is required to get the prototype for fdopen - ## defined correctly in . + ## defined correctly in . ## ## This flag was removed from h5cc as of 2009-10-17 when it was found - ## that the flag broke compiling netCDF-4 code with h5cc, but kept in + ## that the flag broke compiling netCDF-4 code with h5cc, but kept in ## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen ## is used only by H5_debug_mask which is used only when debugging in ## H5_init_library (all in H5.c). When the flag was removed this was @@ -987,7 +987,7 @@ case "$host_cpu-$host_vendor-$host_os" in ## correctly in ## Linking to the bsd-compat library is required as per the gcc manual: ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - ## however, we do not do this since it breaks the big test on some + ## however, we do not do this since it breaks the big test on some ## older platforms. H5_CPPFLAGS="-D_BSD_SOURCE $H5_CPPFLAGS" @@ -998,7 +998,7 @@ case "$host_cpu-$host_vendor-$host_os" in ;; esac -## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible +## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible ## for configure checks. ## Note: Both will be restored by the end of configure. CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS" @@ -1334,17 +1334,17 @@ case $withval in fi ;; esac - + saved_CPPFLAGS="$CPPFLAGS" saved_AM_CPPFLAGS="$AM_CPPFLAGS" saved_LDFLAGS="$LDFLAGS" saved_AM_LDFLAGS="$AM_LDFLAGS" - + if test -n "$szlib_inc"; then CPPFLAGS="$CPPFLAGS -I$szlib_inc" AM_CPPFLAGS="$AM_CPPFLAGS -I$szlib_inc" fi - + AC_CHECK_HEADERS([szlib.h], [HAVE_SZLIB_H="yes"], [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZLIB]) @@ -1353,7 +1353,7 @@ case $withval in LDFLAGS="$LDFLAGS -L$szlib_lib" AM_LDFLAGS="$AM_LDFLAGS -L$szlib_lib" fi - + if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB]) @@ -1370,7 +1370,7 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then AC_MSG_CHECKING([for szlib encoder]) ## Set LD_LIBRARY_PATH so encoder test can find the library and run. - ## Also add LL_PATH substitution to Makefiles so they can use the + ## Also add LL_PATH substitution to Makefiles so they can use the ## path as well, for testing examples. if test -z "$LD_LIBRARY_PATH"; then export LD_LIBRARY_PATH="$szlib_lib" @@ -1393,25 +1393,25 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then ]])] , [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)] ) - - AC_DEFINE([HAVE_FILTER_SZIP], [1], + + AC_DEFINE([HAVE_FILTER_SZIP], [1], [Define if support for szip filter is enabled]) USE_FILTER_SZIP="yes" if test ${hdf5_cv_szlib_can_encode} = "yes"; then AC_MSG_RESULT([yes]) - fi + fi if test ${hdf5_cv_szlib_can_encode} = "no"; then AC_MSG_RESULT([no]) - fi - + fi + ## Add "szip" to external filter list if test ${hdf5_cv_szlib_can_encode} = "yes"; then if test "X$EXTERNAL_FILTERS" != "X"; then EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," fi EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)" - fi + fi if test ${hdf5_cv_szlib_can_encode} = "no"; then if test "X$EXTERNAL_FILTERS" != "X"; then EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," @@ -1464,7 +1464,7 @@ case "X-$THREADSAFE" in AC_MSG_RESULT([no]) ;; X-yes) - THREADSAFE=yes + THREADSAFE=yes AC_MSG_RESULT([yes]) ;; *) @@ -1751,7 +1751,7 @@ for hdf5_cv_printf_ll in l ll L q unknown; do done]) AC_MSG_RESULT([%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u]) -AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"], +AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"], [Width for printf() for type `long long' or `__int64', use `ll']) @@ -1766,16 +1766,16 @@ AC_ARG_ENABLE([debug], also specify a comma-separated list of package names without the leading H5 or the word no. The default is most packages - if production is disabled; no if it is enabled. + if production is disabled; no if it is enabled. ])], [DEBUG_PKG=$enableval]) ## Default to no if producton is enabled if test "X-$DEBUG_PKG" = X- ; then if test "$enable_production" = yes ; then - DEBUG_PKG=no + DEBUG_PKG=no else - DEBUG_PKG=yes + DEBUG_PKG=yes fi fi @@ -2023,11 +2023,11 @@ case "X-$enable_parallel" in ## Try link a simple MPI program. AC_MSG_CHECKING([whether a simple MPI-IO C program can be linked]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[ MPI_Init(0, (void *)0); - MPI_File_open(0, (void *)0, 0, 0, (void *)0);]])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([unable to link a simple MPI-IO C program])]) + [[ MPI_Init(0, (void *)0); + MPI_File_open(0, (void *)0, 0, 0, (void *)0);]])], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([unable to link a simple MPI-IO C program])]) if test "X$HDF_FORTRAN" = "Xyes"; then PAC_PROG_FC_MPI_CHECK @@ -2070,7 +2070,7 @@ if test -n "$PARALLEL"; then fi ## If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with - ## the empty string. This means that no launch commands were requested, + ## the empty string. This means that no launch commands were requested, ## so we will not use any launch commands. if test "X$RUNSERIAL" = "Xnone"; then RUNSERIAL="" @@ -2136,7 +2136,7 @@ if test -n "$PARALLEL"; then fi ;; esac - + if test -n "$mpe_inc"; then saved_CPPFLAGS="$CPPFLAGS" saved_AM_CPPFLAGS="$AM_CPPFLAGS" @@ -2146,7 +2146,7 @@ if test -n "$PARALLEL"; then else AC_CHECK_HEADERS([mpe.h],, [unset MPE]) fi - + if test -n "$mpe_lib"; then saved_LDFLAGS="$LDFLAGS" saved_AM_LDFLAGS="$AM_LDFLAGS" @@ -2231,12 +2231,12 @@ AC_DEFINE_UNQUOTED([DEFAULT_PLUGINDIR], ["$default_plugindir"], ## Decide whether the presence of user's exception handling functions is ## checked and data conversion exceptions are returned. This is mainly ## for the speed optimization of hard conversions. Soft conversions can -## actually benefit little. +## actually benefit little. ## AC_MSG_CHECKING([whether exception handling functions is checked during data conversions]) AC_ARG_ENABLE([dconv-exception], [AS_HELP_STRING([--enable-dconv-exception], - [if exception handling functions is checked during + [if exception handling functions is checked during data conversions [default=yes]])], [DCONV_EXCEPTION=$enableval], [DCONV_EXCEPTION=yes]) @@ -2269,9 +2269,9 @@ esac ## ---------------------------------------------------------------------- ## Set the flag to indicate that the machine is using a special algorithm to convert -## 'long double' to '(unsigned) long' values. (This flag should only be set for -## the IBM Power6 Linux. When the bit sequence of long double is -## 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long +## 'long double' to '(unsigned) long' values. (This flag should only be set for +## the IBM Power6 Linux. When the bit sequence of long double is +## 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long ## is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282. ## The machine's conversion gets the correct value. We define the macro and disable ## this kind of test until we figure out what algorithm they use. @@ -2292,12 +2292,12 @@ else unsigned char s[16]; unsigned char s2[8]; int ret = 1; - + if(sizeof(long double) == 16 && sizeof(long) == 8) { - /*make sure the long double type has 16 bytes in size and + /*make sure the long double type has 16 bytes in size and * 11 bits of exponent. If it is, - *the bit sequence should be like below. It's not - *a decent way to check but this info isn't available. */ + *the bit sequence should be like below. It's not + *a decent way to check but this info isn't available. */ memcpy(s, &ld, 16); if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 && s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 && @@ -2331,8 +2331,8 @@ else if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce && s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f) ret = 0; - } - } + } + } exit(ret); ]])] , [hdf5_cv_ldouble_to_long_special=yes], [hdf5_cv_ldouble_to_long_special=no],)]) @@ -2348,10 +2348,10 @@ fi ## ---------------------------------------------------------------------- ## Set the flag to indicate that the machine is using a special algorithm -## to convert some values of '(unsigned) long' to 'long double' values. -## (This flag should be off for all machines, except for IBM Power6 Linux, -## when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., -## ..., 7fffff..., the compiler uses a unknown algorithm. We define a +## to convert some values of '(unsigned) long' to 'long double' values. +## (This flag should be off for all machines, except for IBM Power6 Linux, +## when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., +## ..., 7fffff..., the compiler uses a unknown algorithm. We define a ## macro and skip the test for now until we know about the algorithm. ## AC_MSG_CHECKING([if using special algorithm to convert (unsigned) long to long double values]) @@ -2369,17 +2369,17 @@ else unsigned long ull; unsigned char s[16]; int flag=0, ret=1; - + /*Determine if long double has 16 byte in size, 11 bit exponent, and - *the bias is 0x3ff */ - if(sizeof(long double) == 16) { + *the bias is 0x3ff */ + if(sizeof(long double) == 16) { ld = 1.0L; memcpy(s, &ld, 16); if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && - s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) - flag = 1; + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) + flag = 1; } - + if(flag==1 && sizeof(long)==8) { ll = 0x003fffffffffffffL; ld = (long double)ll; @@ -2395,7 +2395,7 @@ else s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 && s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00) ret = 0; - } + } if(flag==1 && sizeof(unsigned long)==8) { ull = 0xffffffffffffffffUL; ld = (long double)ull; @@ -2413,7 +2413,7 @@ else s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 && s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00) ret = 0; - } + } exit(ret); ]])] , [hdf5_cv_long_to_ldouble_special=yes], [hdf5_cv_long_to_ldouble_special=no],)]) @@ -2659,9 +2659,9 @@ esac AC_MSG_CHECKING([whether to have library information embedded in the executables]) AC_ARG_ENABLE([embedded-libinfo], [AS_HELP_STRING([--enable-embedded-libinfo], - [Enable embedded library information [default=yes]])], - [enable_embedded_libinfo=$enableval], - [enable_embedded_libinfo=yes]) + [Enable embedded library information [default=yes]])], + [enable_embedded_libinfo=$enableval], + [enable_embedded_libinfo=yes]) if test "${enable_embedded_libinfo}" = "yes"; then AC_MSG_RESULT([yes]) @@ -2830,8 +2830,10 @@ AC_CONFIG_FILES([src/libhdf5.settings tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh + tools/h5dump/testh5dumpvds.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh + tools/h5ls/testh5lsvds.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile diff --git a/tools/h5dump/Makefile.am b/tools/h5dump/Makefile.am index cee4801..93ba195 100644 --- a/tools/h5dump/Makefile.am +++ b/tools/h5dump/Makefile.am @@ -25,7 +25,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib # Test programs and scripts TEST_PROG=h5dumpgentest -TEST_SCRIPT=testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh +TEST_SCRIPT=testh5dump.sh testh5dumppbits.sh testh5dumpvds.sh testh5dumpxml.sh check_PROGRAMS=$(TEST_PROG) binread check_SCRIPTS=$(TEST_SCRIPT) diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 7371adf..1624a5b 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -99,8 +99,8 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/conclude.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/bin/mkinstalldirs \ $(srcdir)/testh5dump.sh.in $(srcdir)/testh5dumppbits.sh.in \ - $(srcdir)/testh5dumpxml.sh.in $(top_srcdir)/bin/depcomp \ - $(top_srcdir)/bin/test-driver + $(srcdir)/testh5dumpvds.sh.in $(srcdir)/testh5dumpxml.sh.in \ + $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/test-driver check_PROGRAMS = $(am__EXEEXT_1) binread$(EXEEXT) bin_PROGRAMS = h5dump$(EXEEXT) TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) @@ -112,7 +112,8 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/H5config.h -CONFIG_CLEAN_FILES = testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh +CONFIG_CLEAN_FILES = testh5dump.sh testh5dumppbits.sh testh5dumpvds.sh \ + testh5dumpxml.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" am__EXEEXT_1 = h5dumpgentest$(EXEEXT) @@ -674,7 +675,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.bin # Test programs and scripts TEST_PROG = h5dumpgentest -TEST_SCRIPT = testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh +TEST_SCRIPT = testh5dump.sh testh5dumppbits.sh testh5dumpvds.sh testh5dumpxml.sh check_SCRIPTS = $(TEST_SCRIPT) SCRIPT_DEPEND = h5dump$(EXEEXT) @@ -746,6 +747,8 @@ testh5dump.sh: $(top_builddir)/config.status $(srcdir)/testh5dump.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ testh5dumppbits.sh: $(top_builddir)/config.status $(srcdir)/testh5dumppbits.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +testh5dumpvds.sh: $(top_builddir)/config.status $(srcdir)/testh5dumpvds.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ testh5dumpxml.sh: $(top_builddir)/config.status $(srcdir)/testh5dumpxml.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) diff --git a/tools/h5ls/Makefile.am b/tools/h5ls/Makefile.am index 408ce93..54a06f1 100644 --- a/tools/h5ls/Makefile.am +++ b/tools/h5ls/Makefile.am @@ -24,7 +24,7 @@ include $(top_srcdir)/config/commence.am AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib # Test programs and scripts -TEST_SCRIPT=testh5ls.sh +TEST_SCRIPT=testh5ls.sh testh5lsvds.sh check_SCRIPTS=$(TEST_SCRIPT) SCRIPT_DEPEND=h5ls$(EXEEXT) diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index c77784e..8c938b0 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -98,8 +98,8 @@ host_triplet = @host@ DIST_COMMON = $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/conclude.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/bin/mkinstalldirs \ - $(srcdir)/testh5ls.sh.in $(top_srcdir)/bin/depcomp \ - $(top_srcdir)/bin/test-driver + $(srcdir)/testh5ls.sh.in $(srcdir)/testh5lsvds.sh.in \ + $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/test-driver bin_PROGRAMS = h5ls$(EXEEXT) TESTS = $(TEST_SCRIPT) subdir = tools/h5ls @@ -110,7 +110,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/H5config.h -CONFIG_CLEAN_FILES = testh5ls.sh +CONFIG_CLEAN_FILES = testh5ls.sh testh5lsvds.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) @@ -656,7 +656,7 @@ TRACE = perl $(top_srcdir)/bin/trace CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # Test programs and scripts -TEST_SCRIPT = testh5ls.sh +TEST_SCRIPT = testh5ls.sh testh5lsvds.sh check_SCRIPTS = $(TEST_SCRIPT) SCRIPT_DEPEND = h5ls$(EXEEXT) @@ -722,6 +722,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): testh5ls.sh: $(top_builddir)/config.status $(srcdir)/testh5ls.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +testh5lsvds.sh: $(top_builddir)/config.status $(srcdir)/testh5lsvds.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ -- cgit v0.12 From fc0fba145e327423103039283db67fdeb6395727 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 16 Jun 2015 16:42:48 -0500 Subject: [svn-r27220] Maintenance: Added copyrigth; removed read buffer initialization since fill value feature works now. Tested on jam. --- examples/h5_vds.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/examples/h5_vds.c b/examples/h5_vds.c index 79a3f01..a4909dc 100644 --- a/examples/h5_vds.c +++ b/examples/h5_vds.c @@ -1,3 +1,18 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + /************************************************************ This example illustrates the concept of virtual dataset. @@ -223,11 +238,6 @@ main (void) free(dsetname); free(buf); } - /* EIP Initialize read buffer with -2 since fille values for VDS are not implemented yet */ - for (i=0; i Date: Wed, 17 Jun 2015 10:25:34 -0500 Subject: [svn-r27224] Fix bug that prevented reading from datasets with unlimited mappings with missing source datasets. Decided not to attempt to open the source dataset in this case, as doing so could create issues related to the sizing of the VDS. Users should call H5Dget_space to open these datasets. No regression test yet. Tested: ummon --- src/H5Dvirtual.c | 72 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 31 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 4a9f79f..4804c72 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -1663,42 +1663,52 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, } /* end for */ } /* end if */ else { - HDassert(storage->list[i].source_dset.clipped_virtual_select); - - /* Project intersection of file space and mapping virtual space onto - * memory space */ - if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].source_dset.clipped_virtual_select, &storage->list[i].source_dset.projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") + if(storage->list[i].source_dset.clipped_virtual_select) { + /* Project intersection of file space and mapping virtual space onto + * memory space */ + if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].source_dset.clipped_virtual_select, &storage->list[i].source_dset.projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") - /* Check number of elements selected, add to tot_nelmts */ - if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(storage->list[i].source_dset.projected_mem_space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + /* Check number of elements selected, add to tot_nelmts */ + if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(storage->list[i].source_dset.projected_mem_space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") - /* Check if anything is selected */ - if(select_nelmts > (hssize_t)0) { - /* Open source dataset */ - if(!storage->list[i].source_dset.dset) - /* Try to open dataset */ - if(H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], &storage->list[i].source_dset, io_info->dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + /* Check if anything is selected */ + if(select_nelmts > (hssize_t)0) { + /* Open source dataset */ + if(!storage->list[i].source_dset.dset) + /* Try to open dataset */ + if(H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], &storage->list[i].source_dset, io_info->dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") - /* If the source dataset is not open, mark the selected elements - * as zero so projected_mem_space is freed */ - if(!storage->list[i].source_dset.dset) { - HDassert(0 && "Checking code coverage..."); //VDSINC - select_nelmts = (hssize_t)0; - } //VDSINC - } /* end if */ + /* If the source dataset is not open, mark the selected elements + * as zero so projected_mem_space is freed */ + if(!storage->list[i].source_dset.dset) { + HDassert(0 && "Checking code coverage..."); //VDSINC + select_nelmts = (hssize_t)0; + } //VDSINC + } /* end if */ - /* If there are not elements selected in this mapping, free - * projected_mem_space, otherwise update tot_nelmts */ - if(select_nelmts == (hssize_t)0) { - if(H5S_close(storage->list[i].source_dset.projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") - storage->list[i].source_dset.projected_mem_space = NULL; + /* If there are not elements selected in this mapping, free + * projected_mem_space, otherwise update tot_nelmts */ + if(select_nelmts == (hssize_t)0) { + if(H5S_close(storage->list[i].source_dset.projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") + storage->list[i].source_dset.projected_mem_space = NULL; + } /* end if */ + else + *tot_nelmts += (hsize_t)select_nelmts; } /* end if */ - else - *tot_nelmts += (hsize_t)select_nelmts; + else { + HDassert(0 && "Checking code coverage..."); //VDSINC + /* If there is no clipped_dim_virtual, this must be an unlimited + * selection whose dataset was not found in the last call to + * H5Dget_space(). Do not attempt to open it as this might + * affect the extent and we are not going to recalculate it + * here. */ + HDassert(storage->list[i].unlim_dim_virtual >= 0); + HDassert(!storage->list[i].source_dset.dset); + } /* end else */ } /* end else */ } /* end for */ -- cgit v0.12 From 5b4b4650c6b61da45bf665c80c70d0cbc3f01515 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 17 Jun 2015 13:20:39 -0500 Subject: [svn-r27229] remove copy-paste errors from list --- tools/h5ls/CMakeTestsVDS.cmake | 6 ------ tools/h5ls/testh5lsvds.sh.in | 6 ------ 2 files changed, 12 deletions(-) diff --git a/tools/h5ls/CMakeTestsVDS.cmake b/tools/h5ls/CMakeTestsVDS.cmake index b10674b..71ff576 100644 --- a/tools/h5ls/CMakeTestsVDS.cmake +++ b/tools/h5ls/CMakeTestsVDS.cmake @@ -41,12 +41,6 @@ tvds-3_2.ls tvds-4.ls tvds-5.ls - tvds_layout-1.ls - tvds_layout-2.ls - tvds_layout-3_1.ls - tvds_layout-3_2.ls - tvds_layout-4.ls - tvds_layout-5.ls ) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") diff --git a/tools/h5ls/testh5lsvds.sh.in b/tools/h5ls/testh5lsvds.sh.in index 2fd4bc0..5d599e9 100644 --- a/tools/h5ls/testh5lsvds.sh.in +++ b/tools/h5ls/testh5lsvds.sh.in @@ -100,12 +100,6 @@ $SRC_H5LS_TESTFILES/vds/tvds-3_1.ls $SRC_H5LS_TESTFILES/vds/tvds-3_2.ls $SRC_H5LS_TESTFILES/vds/tvds-4.ls $SRC_H5LS_TESTFILES/vds/tvds-5.ls -$SRC_H5LS_TESTFILES/vds/tvds_layout-1.ls -$SRC_H5LS_TESTFILES/vds/tvds_layout-2.ls -$SRC_H5LS_TESTFILES/vds/tvds_layout-3_1.ls -$SRC_H5LS_TESTFILES/vds/tvds_layout-3_2.ls -$SRC_H5LS_TESTFILES/vds/tvds_layout-4.ls -$SRC_H5LS_TESTFILES/vds/tvds_layout-5.ls " -- cgit v0.12 From c986d41406ffc8312807643452c5719593cf1c50 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 17 Jun 2015 13:59:23 -0500 Subject: [svn-r27231] Fix bug in configure that prevented running make. Tested: ummon --- configure | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index ae68a9f..3e23503 100755 --- a/configure +++ b/configure @@ -21542,7 +21542,7 @@ $as_echo_n "checking whether make will build with undefined variables... " >&6; cat >maketest </dev/null 2>&1; then diff --git a/configure.ac b/configure.ac index d650747..6f546cd 100644 --- a/configure.ac +++ b/configure.ac @@ -780,7 +780,7 @@ if test -n "${MAKE-make}"; then cat >maketest </dev/null 2>&1; then -- cgit v0.12 From 5ae9dc036964b5e663849b464a49e19883577d56 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 17 Jun 2015 14:37:40 -0500 Subject: [svn-r27233] Add layout test from virtual to Contiguous and Compact --- tools/h5repack/CMakeTests.cmake | 120 ++++++++++++++++++++++++++++------------ 1 file changed, 85 insertions(+), 35 deletions(-) diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake index efaa6e5..40092d8 100644 --- a/tools/h5repack/CMakeTests.cmake +++ b/tools/h5repack/CMakeTests.cmake @@ -14,14 +14,14 @@ multi family ) - + if (DIRECT_VFD) set (VFD_LIST ${VFD_LIST} direct) endif (DIRECT_VFD) MACRO (ADD_VFD_TEST vfdname resultcode) add_test ( - NAME H5REPACK-VFD-${vfdname}-h5repacktest + NAME H5REPACK-VFD-${vfdname}-h5repacktest COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" @@ -37,7 +37,7 @@ set (last_test "H5REPACK-VFD-${vfdname}-h5repacktest") ENDMACRO (ADD_VFD_TEST) endif (HDF5_TEST_VFD) - + # -------------------------------------------------------------------- # Copy all the HDF5 files from the source directory into the test directory # -------------------------------------------------------------------- @@ -77,6 +77,30 @@ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00008.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00009.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00010.h5 + # tools/testfiles/vds + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_a.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_b.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_c.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_d.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_e.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_f.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_vds.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_a.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_b.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_c.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_d.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_e.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_vds.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/3_1_vds.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/3_2_vds.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_0.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_1.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_vds.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_a.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_b.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_c.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_vds.h5 ) set (LIST_OTHER_TEST_FILES @@ -346,7 +370,7 @@ add_test ( NAME H5REPACK_UD-${testname}-clearall-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove testfiles/out-${testname}.${resultfile} testfiles/${testname}.${resultfile}.out testfiles/${testname}.${resultfile}.out.err @@ -392,7 +416,7 @@ ############################################################################## # -------------------------------------------------------------------- - # test file names + # test file names # -------------------------------------------------------------------- set (INFO_FILE testfiles/h5repack.info) @@ -415,12 +439,18 @@ set (FILE18 h5repack_layout2.h5) set (FILE_REF h5repack_refs.h5) set (FILE_ATTR_REF h5repack_attr_refs.h5) - + set (FILEV1 1_vds.h5) + set (FILEV2 2_vds.h5) + set (FILEV3_1 3_1_vds.h5) + set (FILEV3_2 3_2_vds.h5) + set (FILEV4 4_vds.h5) + set (FILEV5 5_vds.h5) + # Remove any output file left over from previous test run add_test ( NAME H5REPACK-clearall-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove ./testfiles/h5dump-help.out ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out.err @@ -560,7 +590,7 @@ h5repack_attr_out.h5 h5repack_attr_refs.h5 h5repack_big.h5 - h5repack_deflate.h5 + h5repack_deflate.h5 h5repack_deflate_out.h5 h5repack_early2.h5 h5repack_early.h5 @@ -588,7 +618,7 @@ h5repack_refs.h5 h5repack_shuffle.h5 h5repack_shuffle_out.h5 - h5repack_soffset.h5 + h5repack_soffset.h5 h5repack_soffset_out.h5 h5repack_szip.h5 h5repack_szip_out.h5 @@ -628,14 +658,14 @@ # Each run generates ".out.h5" and the tool h5diff is used to # compare the input and output files # -# the tests are the same as the program h5repacktst, but run from the CLI +# the tests are the same as the program h5repacktst, but run from the CLI # # See which filters are usable (and skip tests for filters we # don't have). Do this by searching H5pubconf.h to see which # filters are defined. -# detect whether the encoder is present. +# detect whether the encoder is present. set (USE_FILTER_SZIP_ENCODER "no") if (HDF5_ENABLE_SZIP_ENCODING) set (USE_FILTER_SZIP_ENCODER ${testh5repack_detect_szip}) @@ -649,7 +679,7 @@ set (USE_FILTER_SZIP "true") endif (H5_HAVE_FILTER_SZIP) -# copy files (these files have no filters) +# copy files (these files have no filters) ADD_H5_TEST (fill "TEST" ${FILE0}) ADD_H5_TEST (objs "TEST" ${FILE1}) ADD_H5_TEST (attr "TEST" ${FILE2}) @@ -666,8 +696,8 @@ set (TESTTYPE "SKIP") endif (NOT USE_FILTER_DEFLATE) ADD_H5_TEST (gzip_individual ${TESTTYPE} ${arg}) - -# gzip for all + +# gzip for all set (arg ${FILE4} -f GZIP=1) set (TESTTYPE "TEST") if (NOT USE_FILTER_DEFLATE) @@ -681,7 +711,7 @@ if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) set (TESTTYPE "SKIP") endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) - ADD_H5_TEST (szip_individual ${TESTTYPE} ${arg}) + ADD_H5_TEST (szip_individual ${TESTTYPE} ${arg}) # szip for all set (arg ${FILE4} -f SZIP=8,NN) @@ -689,16 +719,16 @@ if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) set (TESTTYPE "SKIP") endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) - ADD_H5_TEST (szip_all ${TESTTYPE} ${arg}) + ADD_H5_TEST (szip_all ${TESTTYPE} ${arg}) # shuffle with individual object set (arg ${FILE4} -f dset2:SHUF -l dset2:CHUNK=20x10) - ADD_H5_TEST (shuffle_individual "TEST" ${arg}) + ADD_H5_TEST (shuffle_individual "TEST" ${arg}) # shuffle for all set (arg ${FILE4} -f SHUF) ADD_H5_TEST (shuffle_all "TEST" ${arg}) - + # fletcher32 with individual object set (arg ${FILE4} -f dset2:FLET -l dset2:CHUNK=20x10) ADD_H5_TEST (fletcher_individual "TEST" ${arg}) @@ -722,7 +752,7 @@ set (TESTTYPE "SKIP") endif (NOT USE_FILTER_DEFLATE) ADD_H5_CMP_TEST (gzip_verbose_filters "O?...ing file[^\n]+\n" ${TESTTYPE} 0 ${arg}) - + ########################################################### # the following tests assume the input files have filters ########################################################### @@ -734,7 +764,7 @@ set (TESTTYPE "SKIP") endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) ADD_H5_TEST (szip_copy ${TESTTYPE} ${arg}) - + # szip remove set (arg ${FILE7} --filter=dset_szip:NONE) set (TESTTYPE "TEST") @@ -742,7 +772,7 @@ set (TESTTYPE "SKIP") endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) ADD_H5_TEST (szip_remove ${TESTTYPE} ${arg}) - + # deflate copy set (arg ${FILE8}) set (TESTTYPE "TEST") @@ -758,7 +788,7 @@ set (TESTTYPE "SKIP") endif (NOT USE_FILTER_DEFLATE) ADD_H5_TEST (deflate_remove ${TESTTYPE} ${arg}) - + # shuffle copy set (arg ${FILE9}) ADD_H5_TEST (shuffle_copy "TEST" ${arg}) @@ -813,14 +843,14 @@ if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE) set (TESTTYPE "SKIP") endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE) - ADD_H5_TEST (deflate_convert ${TESTTYPE} ${arg}) + ADD_H5_TEST (deflate_convert ${TESTTYPE} ${arg}) set (arg ${FILE7} -f dset_szip:GZIP=1) set (TESTTYPE "TEST") if (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE) set (TESTTYPE "SKIP") endif (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE) - ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg}) + ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg}) #limit set (arg ${FILE4} -f GZIP=1 -m 1024) @@ -836,7 +866,7 @@ if (NOT USE_FILTER_DEFLATE) set (TESTTYPE "SKIP") endif (NOT USE_FILTER_DEFLATE) - ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg}) + ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg}) ######################################################### # layout options (these files have no filters) @@ -865,18 +895,18 @@ ADD_H5_VERIFY_TEST (contig_small_compa "TEST" 0 ${FILE18} contig_small COMPACT -l contig_small:COMPA) ADD_H5_VERIFY_TEST (contig_small_fixed_compa "TEST" 0 ${FILE18} chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA) -#--------------------------------------------------------------------------- -# Test file contains chunked datasets (need multiple dsets) with +#--------------------------------------------------------------------------- +# Test file contains chunked datasets (need multiple dsets) with # unlimited max dims. (HDFFV-7933) # Use first dset to test. #--------------------------------------------------------------------------- # chunk to chunk - specify chunk dim bigger than any current dim ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300) -# chunk to contiguous +# chunk to contiguous ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI) -# chunk to compact - convert big dataset (should be > 64k) for this purpose, +# chunk to compact - convert big dataset (should be > 64k) for this purpose, # should remain as original layout (chunk) ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA) @@ -884,7 +914,7 @@ # Test -f for some specific cases. Chunked dataset with unlimited max dims. # (HDFFV-8012) #-------------------------------------------------------------------------- -# - should not fail +# - should not fail # - should not change max dims from unlimit # chunk dim is bigger than dataset dim. ( dset size < 64k ) @@ -900,13 +930,13 @@ ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE) #-------------------------------------------------------------------------- -# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset +# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset # (dset size < 64K) and with unlimited max dims on a condition as follow. # (HDFFV-8214) #-------------------------------------------------------------------------- # chunk dim is bigger than dataset dim. should succeed. ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI) -# chunk dim is smaller than dataset dim. should succeed. +# chunk dim is smaller than dataset dim. should succeed. ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI) @@ -975,11 +1005,11 @@ ADD_H5_TEST (bug1814 "TEST" ${FILE_REF}) # test attribute with various references (bug1797 / HDFFV-5932) -# the references in attribute of compund or vlen datatype +# the references in attribute of compund or vlen datatype ADD_H5_TEST (HDFFV-5932 "TEST" ${FILE_ATTR_REF}) -# Add test for memory leak in attirbute. This test is verified by CTEST. -# 1. leak from vlen string +# Add test for memory leak in attirbute. This test is verified by CTEST. +# 1. leak from vlen string # 2. leak from compound type without reference member # (HDFFV-7840, ) # Note: this test is experimental for sharing test file among tools @@ -989,6 +1019,26 @@ ADD_H5_TEST_META (meta_short h5repack_layout.h5 -M 8192) ADD_H5_TEST_META (meta_long h5repack_layout.h5 --metadata_block_size=8192) +# VDS tests + +######################################################### +# layout options +######################################################### + ADD_H5_VERIFY_TEST (vds_dset_conti "TEST" 0 ${FILEV1} vds_dset CONTIGUOUS -l vds_dset:CONTI) + ADD_H5_VERIFY_TEST (vds_null_conti "TEST" 1 ${FILEV2} null CONTIGUOUS -l CONTI) + ADD_H5_VERIFY_TEST (vds_dset_compa "TEST" 0 ${FILEV1} vds_dset COMPACT -l vds_dset:COMPA) + ADD_H5_VERIFY_TEST (vds_null_compa "TEST" 1 ${FILEV2} null COMPACT -l COMPA) + +################################################################ +# layout conversions +############################################################### + ADD_H5_VERIFY_TEST (vds_compa_conti "TEST" 0 ${FILEV4} vds_dset CONTIGUOUS -l vds_dset:CONTI) + ADD_H5_VERIFY_TEST (vds_compa_compa "TEST" 0 ${FILEV4} vds_dset COMPACT -l vds_dset:COMPA) + ADD_H5_VERIFY_TEST (vds_conti_compa "TEST" 0 ${FILEV4} vds_dset COMPACT -l vds_dset:COMPA) + ADD_H5_VERIFY_TEST (vds_conti_conti "TEST" 0 ${FILEV4} vds_dset CONTIGUOUS -l vds_dset:CONTI) + ADD_H5_VERIFY_TEST (vds_compa "TEST" 0 ${FILEV4} vds_dset COMPACT -l vds_dset:COMPA) + ADD_H5_VERIFY_TEST (vds_conti "TEST" 0 ${FILEV4} vds_dset CONTIGUOUS -l vds_dset:CONTI) + ############################################################################## ### P L U G I N T E S T S ############################################################################## -- cgit v0.12 From bea58674e9b26a396b378436c880be91005e9302 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 17 Jun 2015 15:05:00 -0500 Subject: [svn-r27234] Add layout test from virtual to Contiguous and Compact generated files to clearall --- tools/h5repack/CMakeTests.cmake | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake index 40092d8..6b7199e 100644 --- a/tools/h5repack/CMakeTests.cmake +++ b/tools/h5repack/CMakeTests.cmake @@ -585,7 +585,36 @@ ./testfiles/out-meta_short_N.meta_short.h5 ./testfiles/out-meta_long_M.meta_long.h5 ./testfiles/out-meta_long_N.meta_long.h5 - # from the h5repacktst + ./testfiles/1_vds.h5-vds_dset_compa-v.out + ./testfiles/1_vds.h5-vds_dset_compa-v.out.err + ./testfiles/1_vds.h5-vds_dset_conti-v.out + ./testfiles/1_vds.h5-vds_dset_conti-v.out.err + ./testfiles/2_vds.h5-vds_null_compa-v.out + ./testfiles/2_vds.h5-vds_null_compa-v.out.err + ./testfiles/2_vds.h5-vds_null_conti-v.out + ./testfiles/2_vds.h5-vds_null_conti-v.out.err + ./testfiles/4_vds.h5-vds_compa-v.out + ./testfiles/4_vds.h5-vds_compa-v.out.err + ./testfiles/4_vds.h5-vds_compa_compa-v.out + ./testfiles/4_vds.h5-vds_compa_compa-v.out.err + ./testfiles/4_vds.h5-vds_compa_conti-v.out + ./testfiles/4_vds.h5-vds_compa_conti-v.out.err + ./testfiles/4_vds.h5-vds_conti-v.out + ./testfiles/4_vds.h5-vds_conti-v.out.err + ./testfiles/4_vds.h5-vds_conti_compa-v.out + ./testfiles/4_vds.h5-vds_conti_compa-v.out.err + ./testfiles/4_vds.h5-vds_conti_conti-v.out + ./testfiles/4_vds.h5-vds_conti_conti-v.out.err + ./testfiles/out-vds_compa.4_vds.h5 + ./testfiles/out-vds_compa_compa.4_vds.h5 + ./testfiles/out-vds_compa_conti.4_vds.h5 + ./testfiles/out-vds_conti.4_vds.h5 + ./testfiles/out-vds_conti_compa.4_vds.h5 + ./testfiles/out-vds_conti_conti.4_vds.h5 + ./testfiles/out-vds_dset_compa.1_vds.h5 + ./testfiles/out-vds_dset_conti.1_vds.h5 + ./testfiles/out-vds_null_compa.2_vds.h5 + ./testfiles/out-vds_null_conti.2_vds.h5 h5repack_attr.h5 h5repack_attr_out.h5 h5repack_attr_refs.h5 -- cgit v0.12 From 202fd2b6c192c94251862ea8093cbc9538c71c58 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 17 Jun 2015 15:22:25 -0500 Subject: [svn-r27235] Add vds h5diff tests --- MANIFEST | 4 ++ tools/h5diff/CMakeTests.cmake | 132 ++++++++++++++++++++++++++++-------------- 2 files changed, 93 insertions(+), 43 deletions(-) diff --git a/MANIFEST b/MANIFEST index 2ef4e14..80531ed 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2192,6 +2192,10 @@ ./tools/h5diff/testfiles/tmptest.he5 ./tools/h5diff/testfiles/h5diff_tmp2.txt ./tools/h5diff/testfiles/tmpSingleSiteBethe.output.h5 +#vds +./tools/h5diff/testfiles/h5diff_v1.txt +./tools/h5diff/testfiles/h5diff_v2.txt +./tools/h5diff/testfiles/h5diff_v3.txt #test files for h5repack ./tools/h5repack/testfiles/README diff --git a/tools/h5diff/CMakeTests.cmake b/tools/h5diff/CMakeTests.cmake index c650dbe..33d0971 100644 --- a/tools/h5diff/CMakeTests.cmake +++ b/tools/h5diff/CMakeTests.cmake @@ -4,7 +4,7 @@ ### T E S T I N G ### ############################################################################## ############################################################################## - + # -------------------------------------------------------------------- # Copy all the HDF5 files from the test directory into the source directory # -------------------------------------------------------------------- @@ -50,6 +50,30 @@ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/compounds_array_vlen2.h5 ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/non_comparables1.h5 ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/non_comparables2.h5 + # tools/testfiles/vds + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_a.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_b.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_c.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_d.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_e.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_f.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_vds.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_a.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_b.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_c.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_d.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_e.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_vds.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/3_1_vds.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/3_2_vds.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_0.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_1.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_vds.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_a.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_b.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_c.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_vds.h5 ) set (LIST_OTHER_TEST_FILES @@ -231,6 +255,9 @@ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_710.txt ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_80.txt ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_90.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v1.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v2.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v3.txt ) # Make testfiles dir under build dir @@ -283,7 +310,7 @@ ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_104.txt ) endif (WIN32) - + ############################################################################## ############################################################################## ### T H E T E S T S M A C R O S ### @@ -399,7 +426,7 @@ ############################################################################## # -------------------------------------------------------------------- - # test file names + # test file names # -------------------------------------------------------------------- set (FILE1 h5diff_basic1.h5) set (FILE2 h5diff_basic2.h5) @@ -425,7 +452,7 @@ set (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5) set (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5) set (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5) - # group recursive - same structure via external links through files + # group recursive - same structure via external links through files set (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5) set (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5) set (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5) @@ -447,13 +474,20 @@ # attrs with verbose option level set (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5) set (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5) +# VDS tests + set (FILEV1 1_vds.h5) + set (FILEV2 2_vds.h5) + set (FILEV3_1 3_1_vds.h5) + set (FILEV3_2 3_2_vds.h5) + set (FILEV4 4_vds.h5) + set (FILEV5 5_vds.h5) if (HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( NAME H5DIFF-clearall-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove h5diff_10.out h5diff_10.out.err h5diff_100.out @@ -800,6 +834,12 @@ h5diff_80.out.err h5diff_90.out h5diff_90.out.err + h5diff_v1.out + h5diff_v1.out.err + h5diff_v2.out + h5diff_v2.out.err + h5diff_v3.out + h5diff_v3.out.err ) set_tests_properties (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") if (NOT "${last_test}" STREQUAL "") @@ -816,13 +856,13 @@ ADD_H5_TEST (h5diff_10 0 -h) # 1.1 normal mode -ADD_H5_TEST (h5diff_11 1 ${FILE1} ${FILE2}) +ADD_H5_TEST (h5diff_11 1 ${FILE1} ${FILE2}) # 1.2 normal mode with objects ADD_H5_TEST (h5diff_12 1 ${FILE1} ${FILE2} g1/dset1 g1/dset2) # 1.3 report mode -ADD_H5_TEST (h5diff_13 1 -r ${FILE1} ${FILE2}) +ADD_H5_TEST (h5diff_13 1 -r ${FILE1} ${FILE2}) # 1.4 report mode with objects ADD_H5_TEST (h5diff_14 1 -r ${FILE1} ${FILE2} g1/dset1 g1/dset2) @@ -840,7 +880,7 @@ ADD_H5_TEST (h5diff_16_2 1 --verbose --relative=0.02 ${FILE1} ${FILE1} g1/dset7 ADD_H5_TEST (h5diff_16_3 1 -v -p 0.02 ${FILE1} ${FILE1} g1/dset9 g1/dset10) # 1.7 verbose mode -ADD_H5_TEST (h5diff_17 1 -v ${FILE1} ${FILE2}) +ADD_H5_TEST (h5diff_17 1 -v ${FILE1} ${FILE2}) # 1.7 test 32-bit INFINITY ADD_H5_TEST (h5diff_171 0 -v ${FILE1} ${FILE1} /g1/fp19 /g1/fp19_COPY) @@ -848,8 +888,8 @@ ADD_H5_TEST (h5diff_171 0 -v ${FILE1} ${FILE1} /g1/fp19 /g1/fp19_COPY) # 1.7 test 64-bit INFINITY ADD_H5_TEST (h5diff_172 0 -v ${FILE1} ${FILE1} /g1/fp20 /g1/fp20_COPY) -# 1.8 quiet mode -ADD_H5_TEST (h5diff_18 1 -q ${FILE1} ${FILE2}) +# 1.8 quiet mode +ADD_H5_TEST (h5diff_18 1 -q ${FILE1} ${FILE2}) # 1.8 -v and -q ADD_H5_TEST (h5diff_18_1 2 -v -q ${FILE1} ${FILE2}) @@ -878,7 +918,7 @@ ADD_H5_TEST (h5diff_23 0 -v ${FILE3} ${FILE3} g1 g1) ADD_H5_TEST (h5diff_24 0 -v ${FILE3} ${FILE3} t1 t1) # 2.5 -ADD_H5_TEST (h5diff_25 0 -v ${FILE3} ${FILE3} l1 l1) +ADD_H5_TEST (h5diff_25 0 -v ${FILE3} ${FILE3} l1 l1) # 2.6 ADD_H5_TEST (h5diff_26 0 -v ${FILE3} ${FILE3} g1 g2) @@ -920,7 +960,7 @@ ADD_H5_TEST (h5diff_57 0 -v ${FILE4} ${FILE4} dset7a dset7b) # 5.8 (region reference) ADD_H5_TEST (h5diff_58 1 -v ${FILE7} ${FILE8} refreg) -# test for both dset and attr with same type but with different size +# test for both dset and attr with same type but with different size # ( HDDFV-7942 ) ADD_H5_TEST (h5diff_59 0 -v ${FILE4} ${FILE4} dset11a dset11b) @@ -929,13 +969,13 @@ ADD_H5_TEST (h5diff_59 0 -v ${FILE4} ${FILE4} dset11a dset11b) # ############################################################################## # 6.0: Check if the command line number of arguments is less than 3 -ADD_H5_TEST (h5diff_600 1 ${FILE1}) +ADD_H5_TEST (h5diff_600 1 ${FILE1}) -# 6.1: Check if non-exist object name is specified +# 6.1: Check if non-exist object name is specified ADD_H5_TEST (h5diff_601 2 ${FILE1} ${FILE1} nono_obj) # ############################################################################## -# # -d +# # -d # ############################################################################## # 6.3: negative value @@ -953,7 +993,7 @@ ADD_H5_TEST (h5diff_606 1 -d 0x1 ${FILE1} ${FILE2} g1/dset3 g1/dset4) # 6.7: string ADD_H5_TEST (h5diff_607 1 -d "1" ${FILE1} ${FILE2} g1/dset3 g1/dset4) -# 6.8: use system epsilon +# 6.8: use system epsilon ADD_H5_TEST (h5diff_608 1 --use-system-epsilon ${FILE1} ${FILE2} g1/dset3 g1/dset4) # 6.9: number larger than biggest difference @@ -1032,12 +1072,12 @@ ADD_H5_TEST (h5diff_631 0 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp18 g1/f # ############################################################################## # 7. attributes # ############################################################################## -ADD_H5_TEST (h5diff_70 1 -v ${FILE5} ${FILE6}) +ADD_H5_TEST (h5diff_70 1 -v ${FILE5} ${FILE6}) # ################################################## # attrs with verbose option level # ################################################## -ADD_H5_TEST (h5diff_700 1 -v1 ${FILE5} ${FILE6}) +ADD_H5_TEST (h5diff_700 1 -v1 ${FILE5} ${FILE6}) ADD_H5_TEST (h5diff_701 1 -v2 ${FILE5} ${FILE6}) ADD_H5_TEST (h5diff_702 1 --verbose=1 ${FILE5} ${FILE6}) ADD_H5_TEST (h5diff_703 1 --verbose=2 ${FILE5} ${FILE6}) @@ -1054,7 +1094,7 @@ ADD_H5_TEST (h5diff_706 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_F # different attr number , same attr name (intersected) ADD_H5_TEST (h5diff_707 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g2) -# different attr number , all different attr name +# different attr number , all different attr name ADD_H5_TEST (h5diff_708 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g3) # when no attributes exist in both objects @@ -1066,31 +1106,31 @@ ADD_H5_TEST (h5diff_710 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_F # ############################################################################## # 8. all dataset datatypes # ############################################################################## -ADD_H5_TEST (h5diff_80 1 -v ${FILE7} ${FILE8}) +ADD_H5_TEST (h5diff_80 1 -v ${FILE7} ${FILE8}) # 9. compare a file with itself ADD_H5_TEST (h5diff_90 0 -v ${FILE2} ${FILE2}) # 10. read by hyperslab, print indexes -ADD_H5_TEST (h5diff_100 1 -v ${FILE9} ${FILE10}) +ADD_H5_TEST (h5diff_100 1 -v ${FILE9} ${FILE10}) # 11. floating point comparison -ADD_H5_TEST (h5diff_101 1 -v ${FILE1} ${FILE1} g1/d1 g1/d2) +ADD_H5_TEST (h5diff_101 1 -v ${FILE1} ${FILE1} g1/d1 g1/d2) -ADD_H5_TEST (h5diff_102 1 -v ${FILE1} ${FILE1} g1/fp1 g1/fp2) +ADD_H5_TEST (h5diff_102 1 -v ${FILE1} ${FILE1} g1/fp1 g1/fp2) -# with --use-system-epsilon for double value. expect less differences +# with --use-system-epsilon for double value. expect less differences ADD_H5_TEST (h5diff_103 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/d1 -g1/d2) +g1/d2) # with --use-system-epsilon for float value. expect less differences ADD_H5_TEST (h5diff_104 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp1 g1/fp2) # not comparable -c flag -ADD_H5_TEST (h5diff_200 0 ${FILE2} ${FILE2} g2/dset1 g2/dset2) +ADD_H5_TEST (h5diff_200 0 ${FILE2} ${FILE2} g2/dset1 g2/dset2) -ADD_H5_TEST (h5diff_201 0 -c ${FILE2} ${FILE2} g2/dset1 g2/dset2) +ADD_H5_TEST (h5diff_201 0 -c ${FILE2} ${FILE2} g2/dset1 g2/dset2) ADD_H5_TEST (h5diff_202 0 -c ${FILE2} ${FILE2} g2/dset2 g2/dset3) @@ -1106,9 +1146,9 @@ ADD_H5_TEST (h5diff_206 0 -c ${FILE2} ${FILE2} g2/dset7 g2/dset8) ADD_H5_TEST (h5diff_207 0 -c ${FILE2} ${FILE2} g2/dset8 g2/dset9) # not comparable in dataspace of zero dimension size -ADD_H5_TEST (h5diff_208 0 -c ${FILE19} ${FILE20}) +ADD_H5_TEST (h5diff_208 0 -c ${FILE19} ${FILE20}) -# non-comparable dataset with comparable attribute, and other comparable datasets. +# non-comparable dataset with comparable attribute, and other comparable datasets. # All the rest comparables should display differences. ADD_H5_TEST (h5diff_220 1 -c non_comparables1.h5 non_comparables2.h5 /g1) @@ -1221,28 +1261,28 @@ ADD_H5_TEST (h5diff_425 1 --follow-symlinks -v ${FILE17} ${FILE17} /ext_link_to_ ADD_H5_TEST (h5diff_450 1 --follow-symlinks -v ${DANGLE_LINK_FILE1} ${DANGLE_LINK_FILE2}) # dangling links --follow-symlinks and --no-dangling-links (FILE to FILE) -ADD_H5_TEST (h5diff_451 2 --follow-symlinks -v --no-dangling-links ${DANGLE_LINK_FILE1} ${DANGLE_LINK_FILE2}) +ADD_H5_TEST (h5diff_451 2 --follow-symlinks -v --no-dangling-links ${DANGLE_LINK_FILE1} ${DANGLE_LINK_FILE2}) # try --no-dangling-links without --follow-symlinks options ADD_H5_TEST (h5diff_452 2 --no-dangling-links ${FILE13} ${FILE13}) # dangling link found for soft links (FILE to FILE) -ADD_H5_TEST (h5diff_453 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13}) +ADD_H5_TEST (h5diff_453 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13}) # dangling link found for soft links (obj to obj) -ADD_H5_TEST (h5diff_454 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_dset2 /softlink_noexist) +ADD_H5_TEST (h5diff_454 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_dset2 /softlink_noexist) # dangling link found for soft links (obj to obj) Both dangle links -ADD_H5_TEST (h5diff_455 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_noexist /softlink_noexist) +ADD_H5_TEST (h5diff_455 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_noexist /softlink_noexist) # dangling link found for ext links (FILE to FILE) -ADD_H5_TEST (h5diff_456 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15}) +ADD_H5_TEST (h5diff_456 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15}) # dangling link found for ext links (obj to obj). target file exist -ADD_H5_TEST (h5diff_457 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist1) +ADD_H5_TEST (h5diff_457 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist1) # dangling link found for ext links (obj to obj). target file NOT exist -ADD_H5_TEST (h5diff_458 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist2) +ADD_H5_TEST (h5diff_458 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist2) # dangling link found for ext links (obj to obj). Both dangle links ADD_H5_TEST (h5diff_459 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_noexist2) @@ -1261,9 +1301,9 @@ ADD_H5_TEST (h5diff_468 0 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_dan ADD_H5_TEST (h5diff_469 1 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link2) #--------------------------------------------------- -# dangling links without follow symlink +# dangling links without follow symlink # (HDFFV-7998) -# test - soft dangle links (same and different paths), +# test - soft dangle links (same and different paths), # - external dangle links (same and different paths) ADD_H5_TEST (h5diff_471 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5) ADD_H5_TEST (h5diff_472 0 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1) @@ -1275,7 +1315,7 @@ ADD_H5_TEST (h5diff_475 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_ # ############################################################################## # # test for group diff recursivly # ############################################################################## -# root +# root ADD_H5_TEST (h5diff_500 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /) ADD_H5_TEST (h5diff_501 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /) @@ -1309,7 +1349,7 @@ ADD_H5_TEST (h5diff_513 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_gr ADD_H5_TEST (h5diff_514 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11) ############################################################################### -# Test for group recursive diff via multi-linked external links +# Test for group recursive diff via multi-linked external links # With follow-symlinks, file $GRP_RECURSE1_EXT and $GRP_RECURSE2_EXT1 should # be same with the external links. ############################################################################### @@ -1332,7 +1372,7 @@ ADD_H5_TEST (h5diff_480 0 -v --exclude-path /group1/dset3 ${EXCLUDE_FILE1_1} ${E ADD_H5_TEST (h5diff_481 1 -v ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2}) # -# Different structure, different names. +# Different structure, different names. # # Exclude all the different objects. Expect return - same ADD_H5_TEST (h5diff_482 0 -v --exclude-path "/group1" --exclude-path "/dset1" ${EXCLUDE_FILE2_1} ${EXCLUDE_FILE2_2}) @@ -1364,10 +1404,10 @@ ADD_H5_TEST (h5diff_530 0 -v ${COMP_VL_STRS_FILE} ${COMP_VL_STRS_FILE} /group / ADD_H5_TEST (h5diff_540 1 -v ${COMPS_ARRAY_VLEN_FILE1} ${COMPS_ARRAY_VLEN_FILE2}) # ############################################################################## -# # Test mutually exclusive options +# # Test mutually exclusive options # ############################################################################## # -# Test with -d , -p and --use-system-epsilon. +# Test with -d , -p and --use-system-epsilon. ADD_H5_TEST (h5diff_640 1 -v -d 5 -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) ADD_H5_TEST (h5diff_641 1 -v -d 5 -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) ADD_H5_TEST (h5diff_642 1 -v -p 0.05 -d 5 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) @@ -1375,3 +1415,9 @@ ADD_H5_TEST (h5diff_643 1 -v -d 5 --use-system-epsilon ${FILE1} ${FILE2} /g1/dse ADD_H5_TEST (h5diff_644 1 -v --use-system-epsilon -d 5 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) ADD_H5_TEST (h5diff_645 1 -v -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) + +# VDS +ADD_H5_TEST (h5diff_v1 0 -v ${FILEV1} ${FILEV2}) +ADD_H5_TEST (h5diff_v2 0 -r ${FILEV1} ${FILEV2}) +ADD_H5_TEST (h5diff_v3 0 -c ${FILEV1} ${FILEV2}) + -- cgit v0.12 From 4878a00ac2f791d14b1ecf65f83d0c125a93b4fa Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 17 Jun 2015 15:28:05 -0500 Subject: [svn-r27236] The vds h5diff files --- tools/h5diff/testfiles/h5diff_v1.txt | 18 ++++++++++++++++++ tools/h5diff/testfiles/h5diff_v2.txt | 7 +++++++ tools/h5diff/testfiles/h5diff_v3.txt | 4 ++++ 3 files changed, 29 insertions(+) create mode 100644 tools/h5diff/testfiles/h5diff_v1.txt create mode 100644 tools/h5diff/testfiles/h5diff_v2.txt create mode 100644 tools/h5diff/testfiles/h5diff_v3.txt diff --git a/tools/h5diff/testfiles/h5diff_v1.txt b/tools/h5diff/testfiles/h5diff_v1.txt new file mode 100644 index 0000000..31a3eae --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_v1.txt @@ -0,0 +1,18 @@ + +file1 file2 +--------------------------------------- + x x / + x x /vds_dset + +group : and +0 differences found +dataset: and +Not comparable: or is an empty dataset +Not comparable: has rank 3, dimensions [5x18x8], max dimensions [18446744073709551615x18x8] +and has rank 3, dimensions [6x8x14], max dimensions [18446744073709551615x8x14] +0 differences found +-------------------------------- +Some objects are not comparable +-------------------------------- +Use -c for a list of objects without details of differences. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_v2.txt b/tools/h5diff/testfiles/h5diff_v2.txt new file mode 100644 index 0000000..aa327b1 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_v2.txt @@ -0,0 +1,7 @@ +dataset: and +0 differences found +-------------------------------- +Some objects are not comparable +-------------------------------- +Use -c for a list of objects. +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_v3.txt b/tools/h5diff/testfiles/h5diff_v3.txt new file mode 100644 index 0000000..8c5d2a2 --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_v3.txt @@ -0,0 +1,4 @@ +Not comparable: or is an empty dataset +Not comparable: has rank 3, dimensions [5x18x8], max dimensions [18446744073709551615x18x8] +and has rank 3, dimensions [6x8x14], max dimensions [18446744073709551615x8x14] +EXIT CODE: 0 -- cgit v0.12 From 7fdb38eb6f07c3b24879885227993479849f107f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 18 Jun 2015 08:52:52 -0500 Subject: [svn-r27239] Add function prototype for local function --- tools/lib/h5tools_str.c | 59 +++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index cd1bec8..05a7dfb 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -48,6 +48,7 @@ static char *h5tools_escape(char *s, size_t size); static hbool_t h5tools_str_is_zero(const void *_mem, size_t size); static void h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch); +void h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, h5tools_context_t *ctx); /*------------------------------------------------------------------------- * Function: h5tools_str_close @@ -144,16 +145,16 @@ h5tools_str_append(h5tools_str_t *str/*in,out*/, const char *fmt, ...) nchars = HDvsnprintf(str->s + str->len, avail, fmt, ap); HDva_end(ap); - /* Note: HDvsnprintf() behaves differently on Windows as Unix, when - * buffer is smaller than source string. On Unix, this function - * returns length of the source string and copy string upto the - * buffer size with NULL at the end of the buffer. However on - * Windows with the same condition, this function returns -1 and + /* Note: HDvsnprintf() behaves differently on Windows as Unix, when + * buffer is smaller than source string. On Unix, this function + * returns length of the source string and copy string upto the + * buffer size with NULL at the end of the buffer. However on + * Windows with the same condition, this function returns -1 and * doesn't add NULL at the end of the buffer. * Because of this different return results, the strlen of the new string * is used to handle when HDvsnprintf() returns -1 on Windows due * to lack of buffer size, so try one more time after realloc more - * buffer size before return NULL. + * buffer size before return NULL. */ if (nchars < 0) { /* failure, such as bad format */ @@ -277,7 +278,7 @@ h5tools_str_fmt(h5tools_str_t *str/*in,out*/, size_t start, const char *fmt) if (HDstrchr(fmt, '%')) { size_t n = sizeof(_temp); if (str->len - start + 1 > n) { - n = str->len - start + 1; + n = str->len - start + 1; temp = (char*)HDmalloc(n); HDassert(temp); } @@ -729,12 +730,12 @@ h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, * * PVN, 28 March 2006 * added H5T_NATIVE_LDOUBLE case - * + * * Raymond Lu, 2011-09-01 * CLANG compiler complained about the line (about 800): * tempint = (tempint >> packed_data_offset) & packed_data_mask; - * The right shift may cause undefined behavior if PACKED_DATA_OFFSET is - * 32-bit or more. For every kind of native integers, I changed the code + * The right shift may cause undefined behavior if PACKED_DATA_OFFSET is + * 32-bit or more. For every kind of native integers, I changed the code * to make it zero if PACKED_DATA_OFFSET is greater than or equal to the * size of integer. *------------------------------------------------------------------------- @@ -1435,37 +1436,37 @@ h5tools_str_is_zero(const void *_mem, size_t size) * * Purpose: replace all occurrences of substring. * - * Return: char * + * Return: char * * * Programmer: Peter Cao * March 8, 2012 * * Notes: - * Applications need to call free() to free the memoery allocated for - * the return string + * Applications need to call free() to free the memoery allocated for + * the return string * *------------------------------------------------------------------------- */ char * h5tools_str_replace ( const char *string, const char *substr, const char *replacement ) { - char *tok = NULL; - char *newstr = NULL; - char *oldstr = NULL; - char *head = NULL; - - if ( substr == NULL || replacement == NULL ) - return HDstrdup (string); - - newstr = HDstrdup (string); - head = newstr; - while ( (tok = HDstrstr ( head, substr ))){ - oldstr = newstr; - newstr = HDmalloc ( HDstrlen ( oldstr ) - HDstrlen ( substr ) + HDstrlen ( replacement ) + 1 ); + char *tok = NULL; + char *newstr = NULL; + char *oldstr = NULL; + char *head = NULL; + + if ( substr == NULL || replacement == NULL ) + return HDstrdup (string); + + newstr = HDstrdup (string); + head = newstr; + while ( (tok = HDstrstr ( head, substr ))){ + oldstr = newstr; + newstr = HDmalloc ( HDstrlen ( oldstr ) - HDstrlen ( substr ) + HDstrlen ( replacement ) + 1 ); if ( newstr == NULL ){ - HDfree (oldstr); - return NULL; + HDfree (oldstr); + return NULL; } HDmemcpy ( newstr, oldstr, tok - oldstr ); HDmemcpy ( newstr + (tok - oldstr), replacement, HDstrlen ( replacement ) ); @@ -1475,6 +1476,6 @@ h5tools_str_replace ( const char *string, const char *substr, const char *replac head = newstr + (tok - oldstr) + HDstrlen( replacement ); HDfree (oldstr); } - + return newstr; } -- cgit v0.12 From b32c1bc3ff629ee15cc165094399dcc928f46b03 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Thu, 18 Jun 2015 16:54:51 -0500 Subject: [svn-r27245] Maintenance: Eiger example had wrong printf type of name (had dimension number in it). Fixed. Tested on jam. --- examples/h5_vds-eiger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/h5_vds-eiger.c b/examples/h5_vds-eiger.c index c459aa4..a6ab827 100644 --- a/examples/h5_vds-eiger.c +++ b/examples/h5_vds-eiger.c @@ -79,7 +79,7 @@ main (void) * */ status = H5Sselect_hyperslab (vspace, H5S_SELECT_SET, start, stride, count, block); - status = H5Pset_virtual (dcpl, vspace, "f-%0b.h5", "/A", src_space); + status = H5Pset_virtual (dcpl, vspace, "f-%b.h5", "/A", src_space); -- cgit v0.12 From 7cf40ce5e484fe9db3ceb804dd6019ef7fb77d6d Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 18 Jun 2015 17:18:29 -0500 Subject: [svn-r27246] Remove "clipped" status from unlimited selections, decoupling them from the extent. Improve algorithm for calculation of VDS extent by removing the need for a temporary copy of a dataspace. Other minor fixes/cleanup. Tested: ummon --- src/H5Dvirtual.c | 32 +--- src/H5Pdcpl.c | 10 - src/H5S.c | 12 -- src/H5Shyper.c | 544 ++++++++++++++++++++++++++++--------------------------- src/H5Spkg.h | 8 +- src/H5Sprivate.h | 7 +- src/H5Sselect.c | 6 - test/tselect.c | 380 +++++++++++--------------------------- 8 files changed, 392 insertions(+), 607 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 4804c72..226d879 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -1012,7 +1012,6 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) hsize_t clip_size; int rank; hbool_t changed = FALSE; /* Whether the VDS extent changed */ - H5S_t *tmp_space = NULL; /* Temporary dataspace */ size_t i, j, k; herr_t ret_value = SUCCEED; /* Return value */ @@ -1063,23 +1062,10 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) /* Use cached result for clip size */ clip_size = storage->list[i].clip_size_virtual; else { - /* Copy source mapping */ - if(NULL == (tmp_space = H5S_copy(storage->list[i].source_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") - - /* Clip temporary source space to source extent */ - if(H5S_hyper_clip_unlim(tmp_space, curr_dims[storage->list[i].unlim_dim_source])) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") - /* Get size that virtual selection would be clipped to - * to match size of source selection */ - if(H5S_hyper_get_clip_extent(storage->list[i].source_dset.virtual_select, tmp_space, &clip_size, storage->view == H5D_VDS_FIRST_MISSING) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") - - /* Close tmp_space */ - if(H5S_close(tmp_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace") - tmp_space = NULL; + * to match size of source selection within source + * extent */ + clip_size = H5S_hyper_get_clip_extent_match(storage->list[i].source_dset.virtual_select, storage->list[i].source_select, curr_dims[storage->list[i].unlim_dim_source], storage->view == H5D_VDS_FIRST_MISSING); /* If we are setting the extent by the last available * data, clip virtual_select and source_select. Note @@ -1307,9 +1293,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") /* Get size that source selection will be clipped to to - * match size of source selection */ - if(H5S_hyper_get_clip_extent(storage->list[i].source_select, storage->list[i].source_dset.clipped_virtual_select, &clip_size, FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get hyperslab clip size") + * match size of virtual selection */ + clip_size = H5S_hyper_get_clip_extent(storage->list[i].source_select, storage->list[i].source_dset.clipped_virtual_select, FALSE); /* Check if the clip size changed */ if(clip_size != storage->list[i].clip_size_source) { @@ -1440,13 +1425,6 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) storage->init = TRUE; done: - /* Close temporary space */ - if(tmp_space) { - HDassert(ret_value < 0); - if(H5S_close(tmp_space) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close temporary space") - } /* end if */ - FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_set_extent_unlim() */ diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 54694a0..1e2b91e 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1851,11 +1851,6 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t index) if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].source_dset.virtual_select, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") - /* Clip selection to extent */ - if(H5S_get_select_unlim_dim(space) >= 0) - if(H5S_hyper_clip_to_extent(space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") - /* Register ID */ if((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register data space") @@ -1914,11 +1909,6 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index) if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].source_select, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection") - /* Clip selection to extent */ - if(H5S_get_select_unlim_dim(space) >= 0) - if(H5S_hyper_clip_to_extent(space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") - /* Register ID */ if((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register data space") diff --git a/src/H5S.c b/src/H5S.c index 4a4ed8d..79e996e 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -519,12 +519,6 @@ H5S_extent_copy(H5S_t *dst, const H5S_t *src) if(H5S_select_all(dst, FALSE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") - /* If the selection is 'hyper', update the selection due to changed extent - */ - if(H5S_GET_SELECT_TYPE(dst) == H5S_SEL_HYPERSLABS) - if(H5S_hyper_clip_to_extent(dst) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") - done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_extent_copy() */ @@ -1360,12 +1354,6 @@ H5S__set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, if(H5S_select_all(space, FALSE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") - /* If the selection is 'hyper', update the selection due to changed - * extent */ - if(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS) - if(H5S_hyper_clip_to_extent(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") - done: FUNC_LEAVE_NOAPI(ret_value) } /* H5S__set_extent_simple() */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index fb34981..baeeec2 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -46,7 +46,9 @@ static herr_t H5S_hyper_generate_spans(H5S_t *space); static herr_t H5S_select_select (H5S_t *space1, H5S_seloper_t op, H5S_t *space2); #endif /*NEW_HYPERSLAB_API*/ static void H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, - hsize_t *count, hsize_t *block, hssize_t offset, hsize_t clip_size); + hsize_t *count, hsize_t *block, hsize_t clip_size); +static hsize_t H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, + hsize_t num_slices, hbool_t incl_trail); /* Selection callbacks */ static herr_t H5S_hyper_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection); @@ -254,6 +256,7 @@ H5S_hyper_iter_init(H5S_sel_iter_t *iter, const H5S_t *space) /* Check args */ HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space)); HDassert(iter); + HDassert(space->select.sel_info.hslab->unlim_dim < 0); /* Initialize the number of points to iterate over */ iter->elmt_left = space->select.num_elem; @@ -1651,15 +1654,6 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection) } /* end for */ } /* end if */ dst_hslab->unlim_dim = src_hslab->unlim_dim; - if(src_hslab->unlim_dim >= 0) { - size_t u; /* Local index variable */ - - for(u = 0; u < src->extent.rank; u++) { - dst_hslab->opt_unlim_diminfo[u] = src_hslab->opt_unlim_diminfo[u]; - dst_hslab->app_diminfo[u] = src_hslab->app_diminfo[u]; - } /* end for */ - } /* end for */ - dst_hslab->unlim_dim_clip_size = src_hslab->unlim_dim_clip_size; dst_hslab->num_elem_non_unlim = src_hslab->num_elem_non_unlim; dst->select.sel_info.hslab->span_lst=src->select.sel_info.hslab->span_lst; @@ -1675,13 +1669,6 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection) dst->select.sel_info.hslab->span_lst = H5S_hyper_copy_span(src->select.sel_info.hslab->span_lst); } /* end if */ - /* If there is an unlimited dimension, we must update the selection */ - /* Disabled to make chunk I/O work. This is a quick hack - no sense in a - * proper fix since we are planning to change how unlimited selections work - * anyways. VDSINC */ - /*if(H5S_hyper_clip_to_extent(dst) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab")*/ - done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_copy() */ @@ -1783,6 +1770,10 @@ H5S_hyper_is_valid (const H5S_t *space) HDassert(space); + /* Check for unlimited selection */ + if(space->select.sel_info.hslab->unlim_dim >= 0) + HGOTO_DONE(FALSE) + /* Check for a "regular" hyperslab selection */ if(space->select.sel_info.hslab->diminfo_valid) { const H5S_hyper_dim_t *diminfo=space->select.sel_info.hslab->opt_diminfo; /* local alias for diminfo */ @@ -1887,24 +1878,22 @@ H5S_get_select_hyper_nblocks(H5S_t *space) FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(space); + HDassert(space->select.sel_info.hslab->unlim_dim < 0); + + /* Check for unlimited selection */ + if((space->select.sel_info.hslab->unlim_dim >= 0) + && space->select.sel_info.hslab->app_diminfo[space->select.sel_info.hslab->unlim_dim].count == H5S_UNLIMITED) { + HDassert(space->select.sel_info.hslab->diminfo_valid); + HGOTO_DONE(H5S_UNLIMITED) + } /* end if */ /* Check for a "regular" hyperslab selection */ if(space->select.sel_info.hslab->diminfo_valid) { - const H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */ unsigned u; /* Local index variable */ - /* Set diminfo based on whether this is an unlimited selection */ - if(space->select.sel_info.hslab->unlim_dim >= 0) - diminfo = space->select.sel_info.hslab->opt_diminfo; - else - diminfo = space->select.sel_info.hslab->app_diminfo; - /* Check each dimension */ - for(ret_value = 1, u = 0; u < space->extent.rank; u++) { - if(diminfo[u].block == (hsize_t)0) - HGOTO_DONE((hsize_t)0) - ret_value *= diminfo[u].count; - } /* end for */ + for(ret_value = 1, u = 0; u < space->extent.rank; u++) + ret_value *= space->select.sel_info.hslab->app_diminfo[u].count; } /* end if */ else ret_value = H5S_hyper_span_nblocks(space->select.sel_info.hslab->span_lst); @@ -1945,6 +1934,8 @@ H5Sget_select_hyper_nblocks(hid_t spaceid) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space") if(H5S_GET_SELECT_TYPE(space) != H5S_SEL_HYPERSLABS) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a hyperslab selection") + if(space->select.sel_info.hslab->unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot get number of blocks for unlimited selection") ret_value = (hssize_t)H5S_get_select_hyper_nblocks(space); @@ -2178,10 +2169,10 @@ H5S_hyper_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p) /* Iterate over dimensions */ for(i = 0; i < space->extent.rank; i++) { /* Encode start/stride/block/count */ - H5F_size_encode(f, p, space->select.sel_info.hslab->opt_unlim_diminfo[i].start); - H5F_size_encode(f, p, space->select.sel_info.hslab->opt_unlim_diminfo[i].stride); - H5F_size_encode(f, p, space->select.sel_info.hslab->opt_unlim_diminfo[i].count); - H5F_size_encode(f, p, space->select.sel_info.hslab->opt_unlim_diminfo[i].block); + H5F_size_encode(f, p, space->select.sel_info.hslab->opt_diminfo[i].start); + H5F_size_encode(f, p, space->select.sel_info.hslab->opt_diminfo[i].stride); + H5F_size_encode(f, p, space->select.sel_info.hslab->opt_diminfo[i].count); + H5F_size_encode(f, p, space->select.sel_info.hslab->opt_diminfo[i].block); } /* end for */ } /* end if */ /* Check for a "regular" hyperslab selection */ @@ -2546,6 +2537,7 @@ H5S_get_select_hyper_blocklist(H5S_t *space, hbool_t internal, hsize_t startbloc HDassert(space); HDassert(buf); + HDassert(space->select.sel_info.hslab->unlim_dim < 0); /* Check for a "regular" hyperslab selection */ if(space->select.sel_info.hslab->diminfo_valid) { @@ -2718,6 +2710,8 @@ H5Sget_select_hyper_blocklist(hid_t spaceid, hsize_t startblock, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space") if(H5S_GET_SELECT_TYPE(space)!=H5S_SEL_HYPERSLABS) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a hyperslab selection") + if(space->select.sel_info.hslab->unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot get blocklist for unlimited selection") /* Go get the correct number of blocks */ if(numblocks > 0) @@ -2860,7 +2854,10 @@ H5S_hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end) start[i] = diminfo[i].start + (hsize_t)space->select.offset[i]; /* Compute the largest location in this dimension */ - end[i] = diminfo[i].start + diminfo[i].stride * (diminfo[i].count - 1) + (diminfo[i].block - 1) + (hsize_t)space->select.offset[i]; + if((int)i == space->select.sel_info.hslab->unlim_dim) + end[i] = H5S_UNLIMITED; + else + end[i] = diminfo[i].start + diminfo[i].stride * (diminfo[i].count - 1) + (diminfo[i].block - 1) + (hsize_t)space->select.offset[i]; } /* end for */ } /* end if */ else { @@ -3290,8 +3287,7 @@ H5S_hyper_is_regular(const H5S_t *space) HDassert(space); /* Only simple check for regular hyperslabs for now... */ - if(space->select.sel_info.hslab->diminfo_valid - || (space->select.sel_info.hslab->unlim_dim >= 0)) + if(space->select.sel_info.hslab->diminfo_valid) ret_value=TRUE; else ret_value=FALSE; @@ -6181,10 +6177,13 @@ H5S_hyper_generate_spans(H5S_t *space) /* Get the diminfo */ for(u=0; uextent.rank; u++) { /* Check for unlimited dimension and return error */ + /* These should be able to be converted to assertions once everything + * that calls this function checks for unlimited selections first + * (especially the new hyperslab API) -NAF */ if(space->select.sel_info.hslab->opt_diminfo[u].count == H5S_UNLIMITED) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "can't generate spans with unlimited count (only H5S_SELECT_SET supported)") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "can't generate spans with unlimited count") if(space->select.sel_info.hslab->opt_diminfo[u].block == H5S_UNLIMITED) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "can't generate spans with unlimited block (only H5S_SELECT_SET supported)") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "can't generate spans with unlimited block") tmp_start[u]=space->select.sel_info.hslab->opt_diminfo[u].start; tmp_stride[u]=space->select.sel_info.hslab->opt_diminfo[u].stride; @@ -6578,6 +6577,32 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, } /* end for */ } /* end else */ + /* Check for operating on unlimited selection */ + if((H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS) + && (space->select.sel_info.hslab->unlim_dim >= 0) + && (op != H5S_SELECT_SET)) + { + /* Check for invalid operation */ + if(unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection with another unlimited selection") + if(!((op == H5S_SELECT_AND) || (op == H5S_SELECT_NOTA))) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unsupported operation on unlimited selection") + HDassert(space->select.sel_info.hslab->diminfo_valid); + + /* Clip unlimited selection to include new selection */ + if(H5S_hyper_clip_unlim(space, + start[space->select.sel_info.hslab->unlim_dim] + + ((opt_count[space->select.sel_info.hslab->unlim_dim] + - (hsize_t)1) + * opt_stride[space->select.sel_info.hslab->unlim_dim]) + + opt_block[space->select.sel_info.hslab->unlim_dim]) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + + /* If an empty space was returned it must be "none" */ + HDassert((space->select.num_elem > (hsize_t)0) + || (space->select.type->type == H5S_SEL_NONE)); + } /* end if */ + /* Fixup operation for non-hyperslab selections */ switch(H5S_GET_SELECT_TYPE(space)) { case H5S_SEL_NONE: /* No elements selected in dataspace */ @@ -6700,10 +6725,6 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Save unlim_dim */ space->select.sel_info.hslab->unlim_dim = unlim_dim; - /* Initialize unlim_dim_clip_size to HSSIZET_MIN so the selection is - * clipped by H5S__hyper_clip_unlim() no matter what the extent is */ - space->select.sel_info.hslab->unlim_dim_clip_size = HSSIZET_MIN; - /* Indicate that the dimension information is valid */ space->select.sel_info.hslab->diminfo_valid = TRUE; @@ -6712,22 +6733,15 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Handle unlimited selections */ if(unlim_dim >= 0) { + /* Calculate num_elem_non_unlim */ space->select.sel_info.hslab->num_elem_non_unlim = (hsize_t)1; - for(u = 0; u < space->extent.rank; u++) { - /* Save start/stride/count/block */ - space->select.sel_info.hslab->opt_unlim_diminfo[u].start = start[u]; - space->select.sel_info.hslab->opt_unlim_diminfo[u].stride = opt_stride[u]; - space->select.sel_info.hslab->opt_unlim_diminfo[u].count = opt_count[u]; - space->select.sel_info.hslab->opt_unlim_diminfo[u].block = opt_block[u]; - - /* Calculate num_elem_non_unlim */ + for(u = 0; u < space->extent.rank; u++) if((int)u != unlim_dim) space->select.sel_info.hslab->num_elem_non_unlim *= (opt_count[u] * opt_block[u]); - } /* end for */ - /* Set opt_diminfo or span tree based on extent */ - if(H5S_hyper_clip_to_extent(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't set selection based on extent") + /* Set num_elem */ + if(space->select.num_elem != (hsize_t)0) + space->select.num_elem = H5S_UNLIMITED; } /* end if */ } /* end if */ else if(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA) { @@ -6754,7 +6768,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Patch count and block to remove unlimited and include the * existing selection */ - H5S__hyper_get_clip_diminfo(start[unlim_dim], opt_stride[unlim_dim], &tmp_count, &tmp_block, space->select.offset[unlim_dim], bounds_end[unlim_dim] + (hsize_t)1); + H5S__hyper_get_clip_diminfo(start[unlim_dim], opt_stride[unlim_dim], &tmp_count, &tmp_block, bounds_end[unlim_dim] + (hsize_t)1); HDassert((tmp_count == 1) || (opt_count != _ones)); HDassert((tmp_block == 1) || (opt_block != _ones)); if(opt_count != _ones) { @@ -6766,33 +6780,6 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, int_block[unlim_dim] = tmp_block; } /* end if */ } /* end if */ - else if(space->select.sel_info.hslab->unlim_dim >= 0) { - /* Check for invalid operation */ - if(unlim_dim >= 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection with another unlimited selection") - if(!((op == H5S_SELECT_AND) || (op == H5S_SELECT_NOTA))) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unsupported operation on unlimited selection") - - /* Convert to limited selection */ - space->select.sel_info.hslab->unlim_dim = -1; - - /* Currently just use the existing clip size. This is not ideal and - * may give surprising results. Note this will work differently - * when we switch to the new way of handling unlimited selections - * (unlimited selections have no clip size or clipped version). See - * below. VDSINC */ -#if 0 //VDSINC - /* Clip unlimited selection to include new selection */ - if(H5S_hyper_clip_unlim(space, - (hsize_t)((hssize_t)start[space->select.sel_info.hslab->unlim_dim] - + space->select.offset[space->select.sel_info.hslab->unlim_dim] - + (((hssize_t)opt_count[space->select.sel_info.hslab->unlim_dim] - - (hssize_t)1) - * (hssize_t)opt_stride[space->select.sel_info.hslab->unlim_dim]) - + (hssize_t)opt_block[space->select.sel_info.hslab->unlim_dim])) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") -#endif - } /* end if */ /* Check if there's no hyperslab span information currently */ if(NULL == space->select.sel_info.hslab->span_lst) @@ -7291,6 +7278,32 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, } /* end for */ } /* end else */ + /* Check for operating on unlimited selection */ + if((H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS) + && (space->select.sel_info.hslab->unlim_dim >= 0) + && (op != H5S_SELECT_SET)) + { + /* Check for invalid operation */ + if(unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection with another unlimited selection") + if(!((op == H5S_SELECT_AND) || (op == H5S_SELECT_NOTA))) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unsupported operation on unlimited selection") + HDassert(space->select.sel_info.hslab->diminfo_valid); + + /* Clip unlimited selection to include new selection */ + if(H5S_hyper_clip_unlim(space, + start[space->select.sel_info.hslab->unlim_dim] + + ((opt_count[space->select.sel_info.hslab->unlim_dim] + - (hsize_t)1) + * opt_stride[space->select.sel_info.hslab->unlim_dim]) + + opt_block[space->select.sel_info.hslab->unlim_dim]) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + + /* If an empty space was returned it must be "none" */ + HDassert((space->select.num_elem > (hsize_t)0) + || (space->select.type->type == H5S_SEL_NONE)); + } /* end if */ + /* Fixup operation for non-hyperslab selections */ switch(H5S_GET_SELECT_TYPE(space)) { case H5S_SEL_NONE: /* No elements selected in dataspace */ @@ -7404,11 +7417,6 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Save unlim_dim */ space->select.sel_info.hslab->unlim_dim = unlim_dim; - /* Initialize unlim_dim_clip_size to HSSIZET_MIN so the selection is - * clipped by H5S__hyper_clip_to_extent() no matter what the extent is - */ - space->select.sel_info.hslab->unlim_dim_clip_size = HSSIZET_MIN; - /* Indicate that the dimension information is valid */ space->select.sel_info.hslab->diminfo_valid = TRUE; @@ -7417,22 +7425,15 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Handle unlimited selections */ if(unlim_dim >= 0) { + /* Calculate num_elem_non_unlim */ space->select.sel_info.hslab->num_elem_non_unlim = (hsize_t)1; - for(u = 0; u < space->extent.rank; u++) { - /* Save start/stride/count/block */ - space->select.sel_info.hslab->opt_unlim_diminfo[u].start = start[u]; - space->select.sel_info.hslab->opt_unlim_diminfo[u].stride = opt_stride[u]; - space->select.sel_info.hslab->opt_unlim_diminfo[u].count = opt_count[u]; - space->select.sel_info.hslab->opt_unlim_diminfo[u].block = opt_block[u]; - - /* Calculate num_elem_non_unlim */ + for(u = 0; u < space->extent.rank; u++) if((int)u != unlim_dim) space->select.sel_info.hslab->num_elem_non_unlim *= (opt_count[u] * opt_block[u]); - } /* end for */ - /* Set opt_diminfo or span tree based on extent */ - if(H5S__hyper_clip_to_extent(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't set selection based on extent") + /* Set num_elem */ + if(space->select.num_elem != (hsize_t)0) + space->select.num_elem = H5S_UNLIMITED; } /* end if */ } /* end if */ else if(op>=H5S_SELECT_OR && op<=H5S_SELECT_NOTA) { @@ -7459,7 +7460,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Patch count and block to remove unlimited and include the * existing selection */ - H5S__hyper_get_clip_diminfo(start[unlim_dim], opt_stride[unlim_dim], &tmp_count, &tmp_block, space->select.offset[unlim_dim], bounds_end[unlim_dim] + (hsize_t)1); + H5S__hyper_get_clip_diminfo(start[unlim_dim], opt_stride[unlim_dim], &tmp_count, &tmp_block, bounds_end[unlim_dim] + (hsize_t)1); HDassert((tmp_count == 1) || (opt_count != _ones)); HDassert((tmp_block == 1) || (opt_block != _ones)); if(opt_count != _ones) { @@ -7471,33 +7472,6 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, int_block[unlim_dim] = tmp_block; } /* end if */ } /* end if */ - else if(space->select.sel_info.hslab->unlim_dim >= 0) { - /* Check for invalid operation */ - if(unlim_dim >= 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection with another unlimited selection") - if(!((op == H5S_SELECT_AND) || (op == H5S_SELECT_NOTA))) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unsupported operation on unlimited selection") - - /* Convert to limited selection */ - space->select.sel_info.hslab->unlim_dim = -1; - - /* Currently just use the existing clip size. This is not ideal and - * may give surprising results. Note this will work differently - * when we switch to the new way of handling unlimited selections - * (unlimited selections have no clip size or clipped version). See - * below. VDSINC */ -#if 0 //VDSINC - /* Clip unlimited selection to include new selection */ - if(H5S_hyper_clip_unlim(space, - (hsize_t)((hssize_t)start[space->select.sel_info.hslab->unlim_dim] - + space->select.offset[space->select.sel_info.hslab->unlim_dim] - + (((hssize_t)opt_count[space->select.sel_info.hslab->unlim_dim] - - (hssize_t)1) - * (hssize_t)opt_stride[space->select.sel_info.hslab->unlim_dim]) - + (hssize_t)opt_block[space->select.sel_info.hslab->unlim_dim])) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") -#endif - } /* end if */ /* Check if there's no hyperslab span information currently */ if(NULL == space->select.sel_info.hslab->span_lst) @@ -9111,6 +9085,7 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned H5_ATTR_UNUSED flags, H5S_se HDassert(nelem); HDassert(off); HDassert(len); + HDassert(space->select.sel_info.hslab->unlim_dim < 0); /* Check for the special case of just one H5Sselect_hyperslab call made */ if(space->select.sel_info.hslab->diminfo_valid) { @@ -9773,12 +9748,12 @@ done: --------------------------------------------------------------------------*/ void H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, - hsize_t *block, hssize_t offset, hsize_t clip_size) + hsize_t *block, hsize_t clip_size) { FUNC_ENTER_PACKAGE_NOERR /* Check for selection outside clip size */ - if((hsize_t)((hssize_t)start + offset) >= clip_size) { + if(start >= clip_size) { if(*block == H5S_UNLIMITED) *block = 0; else @@ -9787,16 +9762,14 @@ H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, /* Check for single block in unlimited dimension */ else if((*block == H5S_UNLIMITED) || (*block == stride)) { /* Calculate actual block size for this clip size */ - *block = (hsize_t)((hssize_t)clip_size - ((hssize_t)start + offset)); + *block = clip_size - start; *count = (hsize_t)1; } /* end if */ else { HDassert(*count == H5S_UNLIMITED); - HDassert((hssize_t)clip_size > offset); /* Calculate initial count (last block may be partial) */ - *count = (hsize_t)((hssize_t)clip_size - ((hssize_t)start + offset) - + (hssize_t)stride - (hssize_t)1) / stride; + *count = (clip_size - start + stride - (hsize_t)1) / stride; HDassert(*count > (hsize_t)0); } /* end else */ @@ -9819,7 +9792,7 @@ H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, to make the unlimited dimension extend to the specified extent. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS - Note this function takes the offset into account. + Note this function does not take the offset into account. EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ @@ -9827,7 +9800,8 @@ herr_t H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) { H5S_hyper_sel_t *hslab; /* Convenience pointer to hyperslab info */ - + hsize_t orig_count; /* Original count in unlimited dimension */ + int orig_unlim_dim; /* Original unliminted dimension */ H5S_hyper_dim_t *diminfo; /* Convenience pointer to opt_diminfo in unlimited dimension */ herr_t ret_value = SUCCEED; @@ -9838,38 +9812,30 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) hslab = space->select.sel_info.hslab; HDassert(hslab); HDassert(hslab->unlim_dim >= 0); + HDassert(!hslab->span_lst); - diminfo = &hslab->opt_diminfo[hslab->unlim_dim]; - - /* Check for no need to change size */ - if(((hssize_t)clip_size - space->select.offset[hslab->unlim_dim]) - == hslab->unlim_dim_clip_size) - HGOTO_DONE(SUCCEED) + /* Save original unlimited dimension */ + orig_unlim_dim = hslab->unlim_dim; - /* Free previous spans, if any */ - if(hslab->span_lst != NULL) { - if(H5S_hyper_free_span_info(hslab->span_lst) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans") - hslab->span_lst = NULL; - } /* end if */ + diminfo = &hslab->opt_diminfo[orig_unlim_dim]; - /* Initialize opt_diminfo with opt_unlim_diminfo */ - *diminfo = hslab->opt_unlim_diminfo[hslab->unlim_dim]; + /* Save original count in unlimited dimension */ + orig_count = diminfo->count; /* Get initial diminfo */ - H5S__hyper_get_clip_diminfo(diminfo->start, diminfo->stride, &diminfo->count, &diminfo->block, space->select.offset[hslab->unlim_dim], clip_size); + H5S__hyper_get_clip_diminfo(diminfo->start, diminfo->stride, &diminfo->count, &diminfo->block, clip_size); - /* Check for nothing returned */ - if((diminfo->block == 0) - || (diminfo->count == 0)) { - /* Set num_elem */ - space->select.num_elem = (hsize_t)0; + /* Selection is no longer unlimited */ + space->select.sel_info.hslab->unlim_dim = -1; - /* Mark that opt_diminfo is valid */ - hslab->diminfo_valid = TRUE; + /* Check for nothing returned */ + if((diminfo->block == 0) || (diminfo->count == 0)) { + /* Convert to "none" selection */ + if(H5S_select_none(space) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection") } /* end if */ /* Check for single block in unlimited dimension */ - else if(hslab->opt_unlim_diminfo[hslab->unlim_dim].count == (hsize_t)1) { + else if(orig_count == (hsize_t)1) { /* Calculate number of elements */ space->select.num_elem = diminfo->block * hslab->num_elem_non_unlim; @@ -9883,9 +9849,9 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) /* Check if last block is partial. If superset is set, just keep the * last block complete to speed computation. */ + HDassert(clip_size > diminfo->start); if(((diminfo->stride * (diminfo->count - (hsize_t)1)) + diminfo->block) - > ((hsize_t)((hssize_t)clip_size - ((hssize_t)diminfo->start - + space->select.offset[hslab->unlim_dim])))) { + > (clip_size - diminfo->start)) { hsize_t start[H5S_MAX_RANK]; hsize_t block[H5S_MAX_RANK]; unsigned i; @@ -9897,9 +9863,8 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) /* Set block to clip_size in unlimited dimension, H5S_MAX_SIZE in * others so only unlimited dimension is clipped */ for(i = 0; i < space->extent.rank; i++) - if((int)i == hslab->unlim_dim) - block[i] = (hsize_t)((hssize_t)clip_size - - space->select.offset[hslab->unlim_dim]); + if((int)i == orig_unlim_dim) + block[i] = clip_size; else block[i] = H5S_MAX_SIZE; @@ -9911,7 +9876,8 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) /* Indicate that the regular dimensions are no longer valid */ hslab->diminfo_valid = FALSE; - /* "And" selection with calculate block to perform clip operation */ + /* "And" selection with calculated block to perform clip operation + */ if(H5S_generate_hyperslab(space, H5S_SELECT_AND, start, _ones, _ones, block) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs") } /* end if */ @@ -9920,10 +9886,6 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) hslab->diminfo_valid = TRUE; } /* end else */ - /* Save clip size */ - hslab->unlim_dim_clip_size = (hssize_t)clip_size - - space->select.offset[hslab->unlim_dim]; - done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_clip_unlim() */ @@ -9931,55 +9893,7 @@ done: /*-------------------------------------------------------------------------- NAME - H5S_hyper_clip_to_extent - PURPOSE - Updates the hyperslab selection after a change to the dataspace extent - or offset - USAGE - VDSINC - RETURNS - Non-negative on success/Negative on failure. - DESCRIPTION - Since unlimited selections are internally described as limited - selections with maximal size, these internal selections need to be - updated whenever the maximum size changes. This function - recaluculates the unlimited dimension (if any) of the hyperslab - selection when the extent or offset is changed. - GLOBAL VARIABLES - COMMENTS, BUGS, ASSUMPTIONS - Note this function takes the offset into account. - EXAMPLES - REVISION LOG ---------------------------------------------------------------------------*/ -herr_t -H5S_hyper_clip_to_extent(H5S_t *space) -{ - H5S_hyper_sel_t *hslab; /* Convenience pointer to hyperslab info */ - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI(FAIL) - - /* Check parameters */ - HDassert(space); - hslab = space->select.sel_info.hslab; - HDassert(hslab); - - /* Check for unlimited dimension */ - if(hslab->unlim_dim < 0) - HGOTO_DONE(SUCCEED) - - /* Clip unlimited selection to extent */ - if(H5S_hyper_clip_unlim(space, space->extent.size[hslab->unlim_dim]) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5S_hyper_clip_to_extent() */ - - -/*-------------------------------------------------------------------------- - NAME - H5S_hyper_get_clip_extent + H5S__hyper_get_clip_extent_real PURPOSE VDSINC USAGE @@ -9994,46 +9908,34 @@ done: EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -herr_t -H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, - hsize_t *clip_size, hbool_t incl_trail) +static hsize_t +H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, + hbool_t incl_trail) { - const H5S_hyper_sel_t *clip_hslab; /* Convenience pointer to hyperslab info */ - const H5S_hyper_sel_t *match_hslab; /* Convenience pointer to hyperslab info */ const H5S_hyper_dim_t *diminfo; /* Convenience pointer to opt_unlim_diminfo in unlimited dimension */ - hsize_t num_slices; hsize_t count; hsize_t rem_slices; + hsize_t ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOERR + FUNC_ENTER_STATIC_NOERR /* Check parameters */ HDassert(clip_space); - clip_hslab = clip_space->select.sel_info.hslab; - HDassert(clip_hslab); - HDassert(match_space); - match_hslab = match_space->select.sel_info.hslab; - HDassert(match_space); - HDassert(clip_size); - HDassert(clip_hslab->unlim_dim >= 0); - HDassert(match_hslab->unlim_dim >= 0); - HDassert(clip_hslab->num_elem_non_unlim == match_hslab->num_elem_non_unlim); + HDassert(clip_space->select.sel_info.hslab); + HDassert(clip_space->select.sel_info.hslab->unlim_dim >= 0); - diminfo = &clip_hslab->opt_unlim_diminfo[clip_hslab->unlim_dim]; - - /* Calculate number of slices */ - num_slices = match_space->select.num_elem / match_hslab->num_elem_non_unlim; + diminfo = &clip_space->select.sel_info.hslab->opt_diminfo[clip_space->select.sel_info.hslab->unlim_dim]; if(num_slices == 0) { //HDassert(incl_trail && "Checking code coverage..."); //VDSINC HDassert(!incl_trail && "Checking code coverage..."); //VDSINC - *clip_size = incl_trail ? diminfo->start : 0; + ret_value = incl_trail ? diminfo->start : 0; } //VDSINC else if((diminfo->block == H5S_UNLIMITED) || (diminfo->block == diminfo->stride)) /* Unlimited block, just set the extent large enough for the block size * to match num_slices */ - *clip_size = diminfo->start + num_slices; + ret_value = diminfo->start + num_slices; else { /* Unlimited count, need to match extent so a block (possibly) gets cut * off so the number of slices matches num_slices */ @@ -10048,25 +9950,144 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, if(rem_slices > 0) /* Must end extent in middle of partial block (or beginning of empty * block if include_trailing_space and rem_slices == 0) */ - *clip_size = diminfo->start + (count * diminfo->stride) - + rem_slices; + ret_value = diminfo->start + (count * diminfo->stride) + rem_slices; else { if(incl_trail) /* End extent just before first missing block */ - *clip_size = diminfo->start + (count * diminfo->stride); + ret_value = diminfo->start + (count * diminfo->stride); else /* End extent at end of last block */ - *clip_size = diminfo->start + ((count - (hsize_t)1) + ret_value = diminfo->start + ((count - (hsize_t)1) * diminfo->stride) + diminfo->block; } /* end else */ } /* end else */ - FUNC_LEAVE_NOAPI(SUCCEED) + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5S__hyper_get_clip_extent_real() */ + + +/*-------------------------------------------------------------------------- + NAME + H5S_hyper_get_clip_extent + PURPOSE + VDSINC + USAGE + VDSINC + RETURNS + Non-negative on success/Negative on failure. + DESCRIPTION + VDSINC + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + Note this assumes the offset has been normalized. + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +hsize_t +H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, + hbool_t incl_trail) +{ + hsize_t num_slices; /* Number of slices in unlimited dimension */ + hsize_t ret_value; /* Return value */ + + FUNC_ENTER_NOAPI_NOERR + + /* Check parameters */ + HDassert(clip_space); + HDassert(match_space); + HDassert(match_space->select.sel_info.hslab); + HDassert(clip_space->select.sel_info.hslab->unlim_dim >= 0); + + /* Calculate number of slices */ + num_slices = match_space->select.num_elem + / clip_space->select.sel_info.hslab->num_elem_non_unlim; + HDassert((match_space->select.num_elem + % clip_space->select.sel_info.hslab->num_elem_non_unlim) == 0); + + /* Call "real" get_clip_extent function */ + ret_value = H5S__hyper_get_clip_extent_real(clip_space, num_slices, incl_trail); + + FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_get_clip_extent() */ /*-------------------------------------------------------------------------- NAME + H5S_hyper_get_clip_extent_match + PURPOSE + VDSINC + USAGE + VDSINC + RETURNS + Non-negative on success/Negative on failure. + DESCRIPTION + VDSINC + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + Note this assumes the offset has been normalized. + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +hsize_t +H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, + const H5S_t *match_space, hsize_t match_clip_size, hbool_t incl_trail) +{ + const H5S_hyper_dim_t *match_diminfo; /* Convenience pointer to opt_unlim_diminfo in unlimited dimension in match_space */ + hsize_t count; /* Temporary count */ + hsize_t block; /* Temporary block */ + hsize_t num_slices; /* Number of slices in unlimited dimension */ + hsize_t ret_value; /* Return value */ + + FUNC_ENTER_NOAPI_NOERR + + /* Check parameters */ + HDassert(clip_space); + HDassert(match_space); + HDassert(match_space->select.sel_info.hslab); + HDassert(clip_space->select.sel_info.hslab->unlim_dim >= 0); + HDassert(match_space->select.sel_info.hslab->unlim_dim >= 0); + HDassert(clip_space->select.sel_info.hslab->num_elem_non_unlim + == match_space->select.sel_info.hslab->num_elem_non_unlim); + + match_diminfo = &match_space->select.sel_info.hslab->opt_diminfo[match_space->select.sel_info.hslab->unlim_dim]; + + /* Get initial count and block */ + count = match_diminfo->count; + block = match_diminfo->block; + H5S__hyper_get_clip_diminfo(match_diminfo->start, match_diminfo->stride, &count, &block, match_clip_size); + + /* Calculate number of slices */ + /* Check for nothing returned */ + if((block == 0) || (count == 0)) + num_slices = (hsize_t)0; + /* Check for single block in unlimited dimension */ + else if(count == (hsize_t)1) + num_slices = block; + else { + /* Calculate initial num_slices */ + num_slices = block * count; + + /* Check for partial last block */ + HDassert(match_clip_size >= match_diminfo->start); + if(((match_diminfo->stride * (count - (hsize_t)1)) + block) + > (match_clip_size - match_diminfo->start)) { + /* Subtract slices missing from last block */ + HDassert((((match_diminfo->stride * (count - (hsize_t)1)) + block) + - (match_clip_size - match_diminfo->start)) < num_slices); + num_slices -= ((match_diminfo->stride * (count - (hsize_t)1)) + + block) - (match_clip_size - match_diminfo->start); + } /* end if */ + } /* end else */ + + /* Call "real" get_clip_extent function */ + ret_value = H5S__hyper_get_clip_extent_real(clip_space, num_slices, incl_trail); + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5S_hyper_get_clip_extent_match() */ + + +/*-------------------------------------------------------------------------- + NAME H5S_hyper_get_unlim_block PURPOSE VDSINC @@ -10101,23 +10122,23 @@ H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index) hslab = space->select.sel_info.hslab; HDassert(hslab); HDassert(hslab->unlim_dim >= 0); - HDassert(hslab->opt_unlim_diminfo[hslab->unlim_dim].count == H5S_UNLIMITED); + HDassert(hslab->opt_diminfo[hslab->unlim_dim].count == H5S_UNLIMITED); /* Set start to select block_indexth block in unlimited dimension and set * count to 1 in that dimension to only select that block. Copy all other * diminfo parameters. */ for(i = 0; i < space->extent.rank; i++) { if((int)i == hslab->unlim_dim){ - start[i] = hslab->opt_unlim_diminfo[i].start + (block_index - * hslab->opt_unlim_diminfo[i].stride); + start[i] = hslab->opt_diminfo[i].start + (block_index + * hslab->opt_diminfo[i].stride); count[i] = (hsize_t)1; } /* end if */ else { - start[i] = hslab->opt_unlim_diminfo[i].start; - count[i] = hslab->opt_unlim_diminfo[i].count; + start[i] = hslab->opt_diminfo[i].start; + count[i] = hslab->opt_diminfo[i].count; } /* end else */ - stride[i] = hslab->opt_unlim_diminfo[i].stride; - block[i] = hslab->opt_unlim_diminfo[i].block; + stride[i] = hslab->opt_diminfo[i].stride; + block[i] = hslab->opt_diminfo[i].block; } /* end for */ /* Create output space, copy extent */ @@ -10179,9 +10200,9 @@ H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, hslab = space->select.sel_info.hslab; HDassert(hslab); HDassert(hslab->unlim_dim >= 0); - HDassert(hslab->opt_unlim_diminfo[hslab->unlim_dim].count == H5S_UNLIMITED); + HDassert(hslab->opt_diminfo[hslab->unlim_dim].count == H5S_UNLIMITED); - diminfo = &hslab->opt_unlim_diminfo[hslab->unlim_dim]; + diminfo = &hslab->opt_diminfo[hslab->unlim_dim]; /* Check for selection outside of clip_size */ if(diminfo->start >= clip_size) { @@ -10280,7 +10301,6 @@ H5Sget_regular_hyperslab(hid_t spaceid, hsize_t start[], hsize_t stride[], hsize_t count[], hsize_t block[]) { H5S_t *space; /* Dataspace to query */ - H5S_hyper_dim_t *diminfo; /* Pointer to diminfo to return */ unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -10295,27 +10315,19 @@ H5Sget_regular_hyperslab(hid_t spaceid, hsize_t start[], hsize_t stride[], if(TRUE != H5S_hyper_is_regular(space)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a regular hyperslab selection") - /* Determine which diminfo to return */ - if(space->select.sel_info.hslab->diminfo_valid) - diminfo = space->select.sel_info.hslab->app_diminfo; - else { - HDassert(space->select.sel_info.hslab->unlim_dim >= 0); - diminfo = space->select.sel_info.hslab->opt_unlim_diminfo; - } /* end else */ - /* Retrieve hyperslab parameters */ if(start) for(u = 0; u < space->extent.rank; u++) - start[u] = diminfo[u].start; + start[u] = space->select.sel_info.hslab->app_diminfo[u].start; if(stride) for(u = 0; u < space->extent.rank; u++) - stride[u] = diminfo[u].stride; + stride[u] = space->select.sel_info.hslab->app_diminfo[u].stride; if(count) for(u = 0; u < space->extent.rank; u++) - count[u] = diminfo[u].count; + count[u] = space->select.sel_info.hslab->app_diminfo[u].count; if(block) for(u = 0; u < space->extent.rank; u++) - block[u] = diminfo[u].block; + block[u] = space->select.sel_info.hslab->app_diminfo[u].block; done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Spkg.h b/src/H5Spkg.h index 1359b00..7805777 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -117,18 +117,14 @@ struct H5S_hyper_span_info_t { typedef struct { hbool_t diminfo_valid; /* Whether the dataset has valid diminfo */ H5S_hyper_dim_t opt_diminfo[H5S_MAX_RANK]; /* per-dim selection info */ - H5S_hyper_dim_t opt_unlim_diminfo[H5S_MAX_RANK]; /* per-dim selections info */ H5S_hyper_dim_t app_diminfo[H5S_MAX_RANK]; /* per-dim selection info */ /* 'opt_diminfo' points to a [potentially] optimized version of the user's * hyperslab information. 'app_diminfo' points to the actual parameters * that the application used for setting the hyperslab selection. These * are only used for re-gurgitating the original values used to set the * hyperslab to the application when it queries the hyperslab selection - * information. 'opt_unlim_diminfo' is similar to opt_diminfo but - * contains H5S_UNLIMITED in the count or block of the unlimited - * dimension (if any). */ + * information. */ int unlim_dim; /* Dimension where selection is unlimited, or -1 if none */ - hssize_t unlim_dim_clip_size; /* Size to which the selection is clipped in unlimited dimension */ hsize_t num_elem_non_unlim; /* # of elements in a "slice" excluding the unlimited dimension */ H5S_hyper_span_info_t *span_lst; /* List of hyperslab span information */ } H5S_hyper_sel_t; @@ -276,7 +272,7 @@ H5_DLL herr_t H5S_extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, H5_DLL herr_t H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, const H5S_t *src_intersect_space, H5S_t *proj_space); -H5_DLL herr_t H5S__hyper_subtract (H5S_t *space, H5S_t *subtract_space); +H5_DLL herr_t H5S__hyper_subtract(H5S_t *space, H5S_t *subtract_space); /* Testing functions */ #ifdef H5S_TESTING diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 48fdf62..7658f76 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -268,9 +268,10 @@ H5_DLL herr_t H5S_hyper_adjust_s(H5S_t *space, const hssize_t *offset); H5_DLL htri_t H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset); H5_DLL herr_t H5S_hyper_denormalize_offset(H5S_t *space, const hssize_t *old_offset); H5_DLL herr_t H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size); -H5_DLL herr_t H5S_hyper_clip_to_extent(H5S_t *space); -H5_DLL herr_t H5S_hyper_get_clip_extent(const H5S_t *clip_space, - const H5S_t *match_space, hsize_t *clip_size, hbool_t incl_trail); +H5_DLL hsize_t H5S_hyper_get_clip_extent(const H5S_t *clip_space, + const H5S_t *match_space, hbool_t incl_trail); +H5_DLL hsize_t H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, + const H5S_t *match_space, hsize_t match_clip_size, hbool_t incl_trail); H5_DLL H5S_t *H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index); H5_DLL hsize_t H5S_hyper_get_first_inc_block(const H5S_t *space, diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 0af3dfa..535e955 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -78,12 +78,6 @@ H5S_select_offset(H5S_t *space, const hssize_t *offset) /* Indicate that the offset was changed */ space->select.offset_changed = TRUE; - /* If the selection is 'hyper', update the selection due to changed offset - */ - if(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS) - if(H5S_hyper_clip_to_extent(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't update hyperslab") - done: FUNC_LEAVE_NOAPI(ret_value) } /* H5S_select_offset() */ diff --git a/test/tselect.c b/test/tselect.c index 24a9274..7e142f3 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -13234,6 +13234,78 @@ test_hyper_regular(void) ** ****************************************************************/ static void +test_hyper_unlim_check(hid_t sid, hsize_t *dims, hssize_t enpoints, + hssize_t enblocks, hsize_t *eblock1, hsize_t *eblock2) +{ + hid_t lim_sid; + hsize_t start[3]; + H5S_sel_type sel_type; + hssize_t npoints; + hssize_t nblocks; + hsize_t blocklist[12]; + herr_t ret; + + HDassert(enblocks <= 2); + + /* Copy sid to lim_sid */ + lim_sid = H5Scopy(sid); + CHECK(lim_sid, FAIL, "H5Scopy"); + + /* "And" lim_sid with dims to create limited selection */ + HDmemset(start, 0, sizeof(start)); + ret = H5Sselect_hyperslab(lim_sid, H5S_SELECT_AND, start, NULL, dims, NULL); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + + /* Check number of elements */ + npoints = H5Sget_select_npoints(lim_sid); + CHECK(npoints, FAIL, "H5Sget_select_npoints"); + VERIFY(npoints, enpoints, "H5Sget_select_npoints"); + + /* Get selection type */ + sel_type = H5Sget_select_type(lim_sid); + CHECK(sel_type, H5S_SEL_ERROR, "H5Sget_select_type"); + + /* Only examine blocks for hyperslab selection */ + if(sel_type == H5S_SEL_HYPERSLABS) { + /* Get number of blocks */ + nblocks = H5Sget_select_hyper_nblocks(lim_sid); + CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); + VERIFY(nblocks, enblocks, "H5Sget_select_hyper_nblocks"); + + if(nblocks > 0) { + /* Get blocklist */ + ret = H5Sget_select_hyper_blocklist(lim_sid, (hsize_t)0, (hsize_t)nblocks, blocklist); + CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); + + /* Verify blocklist */ + if(nblocks == (hssize_t)1) { + if(HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0]))) + ERROR("H5Sget_select_hyper_blocklist"); + } /* end if */ + else { + HDassert(nblocks == (hssize_t)2); + if(HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0]))) { + if(HDmemcmp(blocklist, eblock2, 6 * sizeof(eblock2[0]))) + ERROR("H5Sget_select_hyper_blocklist"); + if(HDmemcmp(&blocklist[6], eblock1, 6 * sizeof(eblock1[0]))) + ERROR("H5Sget_select_hyper_blocklist"); + } /* end if */ + else + if(HDmemcmp(&blocklist[6], eblock2, 6 * sizeof(eblock2[0]))) + ERROR("H5Sget_select_hyper_blocklist"); + } /* end else */ + } /* end if */ + } /* end if */ + else + if(sel_type != H5S_SEL_NONE) + ERROR("H5Sget_select_type"); + + /* Close the limited dataspace */ + ret = H5Sclose(lim_sid); + CHECK(ret, FAIL, "H5Sclose"); +} /* end test_hyper_unlim_check() */ + +static void test_hyper_unlim(void) { hid_t sid; @@ -13243,12 +13315,9 @@ test_hyper_unlim(void) hsize_t stride[3] = {1, 1, 3}; hsize_t count[3] = {1, 1, 2}; hsize_t block[3] = {2, H5S_UNLIMITED, 2}; - hsize_t blocklist[12]; hsize_t eblock1[6] = {1, 2, 1, 2, 3, 2}; hsize_t eblock2[6] = {1, 2, 4, 2, 3, 5}; hssize_t offset[3] = {0, -1, 0}; - hssize_t npoints; - hssize_t nblocks; herr_t ret; /* Output message about test being performed */ @@ -13262,149 +13331,35 @@ test_hyper_unlim(void) ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); CHECK(ret, FAIL, "H5Sselect_hyperslab"); - /* Check number of elements */ - npoints = H5Sget_select_npoints(sid); - CHECK(npoints, FAIL, "H5Sget_select_npoints"); - VERIFY(npoints, (hssize_t)16, "H5Sget_select_npoints"); - - /* Get blocklist */ - nblocks = H5Sget_select_hyper_nblocks(sid); - CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); - VERIFY(nblocks, (hssize_t)2, "H5Sget_select_hyper_nblocks"); - ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); - CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); - - /* Verify blocklist */ - if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { - if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) - ERROR("H5Sget_select_hyper_blocklist"); - if(HDmemcmp(&blocklist[6], eblock1, sizeof(eblock1))) - ERROR("H5Sget_select_hyper_blocklist"); - } /* end if */ - else - if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) - ERROR("H5Sget_select_hyper_blocklist"); + /* Check with unlimited dimension clipped to 4 */ + test_hyper_unlim_check(sid, dims, (hssize_t)16, (hssize_t)2, eblock1, eblock2); - /* Shrink dataspace */ + /* Check with unlimited dimension clipped to 3 */ dims[1] = 3; - ret = H5Sset_extent_simple(sid, 3, dims, mdims); - CHECK(ret, FAIL, "H5Sset_extent_simple"); - - /* Check number of elements */ - npoints = H5Sget_select_npoints(sid); - CHECK(npoints, FAIL, "H5Sget_select_npoints"); - VERIFY(npoints, (hssize_t)8, "H5Sget_select_npoints"); - - /* Get blocklist */ - nblocks = H5Sget_select_hyper_nblocks(sid); - CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); - VERIFY(nblocks, (hssize_t)2, "H5Sget_select_hyper_nblocks"); - ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); - CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); - - /* Verify blocklist */ eblock1[4] = 2; eblock2[4] = 2; - if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { - if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) - ERROR("H5Sget_select_hyper_blocklist"); - if(HDmemcmp(&blocklist[6], eblock1, sizeof(eblock1))) - ERROR("H5Sget_select_hyper_blocklist"); - } /* end if */ - else - if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) - ERROR("H5Sget_select_hyper_blocklist"); + test_hyper_unlim_check(sid, dims, (hssize_t)8, (hssize_t)2, eblock1, eblock2); - /* Shrink dataspace */ + /* Check with unlimited dimension clipped to 2 */ dims[1] = 2; - ret = H5Sset_extent_simple(sid, 3, dims, mdims); - CHECK(ret, FAIL, "H5Sset_extent_simple"); + test_hyper_unlim_check(sid, dims, (hssize_t)0, (hssize_t)0, eblock1, eblock2); - /* Check number of elements */ - npoints = H5Sget_select_npoints(sid); - CHECK(npoints, FAIL, "H5Sget_select_npoints"); - VERIFY(npoints, (hssize_t)0, "H5Sget_select_npoints"); - - /* Make sure there are no blocks */ - nblocks = H5Sget_select_hyper_nblocks(sid); - CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); - VERIFY(nblocks, (hssize_t)0, "H5Sget_select_hyper_nblocks"); - - /* Shrink dataspace */ + /* Check with unlimited dimension clipped to 1 */ dims[1] = 1; - ret = H5Sset_extent_simple(sid, 3, dims, mdims); - CHECK(ret, FAIL, "H5Sset_extent_simple"); - - /* Check number of elements */ - npoints = H5Sget_select_npoints(sid); - CHECK(npoints, FAIL, "H5Sget_select_npoints"); - VERIFY(npoints, (hssize_t)0, "H5Sget_select_npoints"); - - /* Make sure there are no blocks */ - nblocks = H5Sget_select_hyper_nblocks(sid); - CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); - VERIFY(nblocks, (hssize_t)0, "H5Sget_select_hyper_nblocks"); + test_hyper_unlim_check(sid, dims, (hssize_t)0, (hssize_t)0, eblock1, eblock2); - /* Extend dataspace */ + /* Check with unlimited dimension clipped to 7 */ dims[1] = 7; - ret = H5Sset_extent_simple(sid, 3, dims, mdims); - CHECK(ret, FAIL, "H5Sset_extent_simple"); - - /* Check number of elements */ - npoints = H5Sget_select_npoints(sid); - CHECK(npoints, FAIL, "H5Sget_select_npoints"); - VERIFY(npoints, (hssize_t)40, "H5Sget_select_npoints"); - - /* Get blocklist */ - nblocks = H5Sget_select_hyper_nblocks(sid); - CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); - VERIFY(nblocks, (hssize_t)2, "H5Sget_select_hyper_nblocks"); - ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); - CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); - - /* Verify blocklist */ eblock1[4] = 6; eblock2[4] = 6; - if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { - if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) - ERROR("H5Sget_select_hyper_blocklist"); - if(HDmemcmp(&blocklist[6], eblock1, sizeof(eblock1))) - ERROR("H5Sget_select_hyper_blocklist"); - } /* end if */ - else - if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) - ERROR("H5Sget_select_hyper_blocklist"); + test_hyper_unlim_check(sid, dims, (hssize_t)40, (hssize_t)2, eblock1, eblock2); /* Set offset of selection */ ret = H5Soffset_simple(sid, offset); CHECK(ret, FAIL, "H5Soffset_simple"); - /* Check number of elements */ - npoints = H5Sget_select_npoints(sid); - CHECK(npoints, FAIL, "H5Sget_select_npoints"); - VERIFY(npoints, (hssize_t)48, "H5Sget_select_npoints"); - - /* Get blocklist */ - nblocks = H5Sget_select_hyper_nblocks(sid); - CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); - VERIFY(nblocks, (hssize_t)2, "H5Sget_select_hyper_nblocks"); - ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); - CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); - - /* Verify blocklist */ - eblock1[1] = 2; - eblock1[4] = 7; - eblock2[1] = 2; - eblock2[4] = 7; - if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { - if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) - ERROR("H5Sget_select_hyper_blocklist"); - if(HDmemcmp(&blocklist[6], eblock1, sizeof(eblock1))) - ERROR("H5Sget_select_hyper_blocklist"); - } /* end if */ - else - if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) - ERROR("H5Sget_select_hyper_blocklist"); + /* Check with adjusted offset (should not affect result) */ + test_hyper_unlim_check(sid, dims, (hssize_t)40, (hssize_t)2, eblock1, eblock2); /* Reset offset of selection */ offset[1] = (hssize_t)0; @@ -13424,183 +13379,51 @@ test_hyper_unlim(void) ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); CHECK(ret, FAIL, "H5Sselect_hyperslab"); - /* Check number of elements */ - npoints = H5Sget_select_npoints(sid); - CHECK(npoints, FAIL, "H5Sget_select_npoints"); - VERIFY(npoints, (hssize_t)16, "H5Sget_select_npoints"); - - /* Get blocklist */ - nblocks = H5Sget_select_hyper_nblocks(sid); - CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); - VERIFY(nblocks, (hssize_t)2, "H5Sget_select_hyper_nblocks"); - ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); - CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); - - /* Verify blocklist */ + /* Check with new selection */ eblock1[1] = 2; eblock1[4] = 3; eblock2[1] = 5; eblock2[2] = 1; eblock2[4] = 6; eblock2[5] = 2; - if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { - if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) - ERROR("H5Sget_select_hyper_blocklist"); - if(HDmemcmp(&blocklist[6], eblock1, sizeof(eblock1))) - ERROR("H5Sget_select_hyper_blocklist"); - } /* end if */ - else - if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) - ERROR("H5Sget_select_hyper_blocklist"); + test_hyper_unlim_check(sid, dims, (hssize_t)16, (hssize_t)2, eblock1, eblock2); - /* Shrink dataspace */ + /* Check with unlimited dimension clipped to 3 */ dims[1] = 3; - ret = H5Sset_extent_simple(sid, 3, dims, mdims); - CHECK(ret, FAIL, "H5Sset_extent_simple"); - - /* Check number of elements */ - npoints = H5Sget_select_npoints(sid); - CHECK(npoints, FAIL, "H5Sget_select_npoints"); - VERIFY(npoints, (hssize_t)4, "H5Sget_select_npoints"); - - /* Get blocklist */ - nblocks = H5Sget_select_hyper_nblocks(sid); - CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); - VERIFY(nblocks, (hssize_t)1, "H5Sget_select_hyper_nblocks"); - ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); - CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); - - /* Verify blocklist */ eblock1[4] = 2; - if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) - ERROR("H5Sget_select_hyper_blocklist"); + test_hyper_unlim_check(sid, dims, (hssize_t)4, (hssize_t)1, eblock1, eblock2); - /* Extend dataspace */ + /* Check with unlimited dimension clipped to 4 */ dims[1] = 4; - ret = H5Sset_extent_simple(sid, 3, dims, mdims); - CHECK(ret, FAIL, "H5Sset_extent_simple"); - - /* Check number of elements */ - npoints = H5Sget_select_npoints(sid); - CHECK(npoints, FAIL, "H5Sget_select_npoints"); - VERIFY(npoints, (hssize_t)8, "H5Sget_select_npoints"); - - /* Get blocklist */ - nblocks = H5Sget_select_hyper_nblocks(sid); - CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); - VERIFY(nblocks, (hssize_t)1, "H5Sget_select_hyper_nblocks"); - ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); - CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); - - /* Verify blocklist */ eblock1[4] = 3; - if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) - ERROR("H5Sget_select_hyper_blocklist"); + test_hyper_unlim_check(sid, dims, (hssize_t)8, (hssize_t)1, eblock1, eblock2); - /* Extend dataspace */ + /* Check with unlimited dimension clipped to 5 */ dims[1] = 5; - ret = H5Sset_extent_simple(sid, 3, dims, mdims); - CHECK(ret, FAIL, "H5Sset_extent_simple"); - - /* Check number of elements */ - npoints = H5Sget_select_npoints(sid); - CHECK(npoints, FAIL, "H5Sget_select_npoints"); - VERIFY(npoints, (hssize_t)8, "H5Sget_select_npoints"); - - /* Get blocklist */ - nblocks = H5Sget_select_hyper_nblocks(sid); - CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); - VERIFY(nblocks, (hssize_t)1, "H5Sget_select_hyper_nblocks"); - ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); - CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); - - /* Verify blocklist */ - if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) - ERROR("H5Sget_select_hyper_blocklist"); + eblock1[4] = 3; + test_hyper_unlim_check(sid, dims, (hssize_t)8, (hssize_t)1, eblock1, eblock2); - /* Extend dataspace */ + /* Check with unlimited dimension clipped to 6 */ dims[1] = 6; - ret = H5Sset_extent_simple(sid, 3, dims, mdims); - CHECK(ret, FAIL, "H5Sset_extent_simple"); - - /* Check number of elements */ - npoints = H5Sget_select_npoints(sid); - CHECK(npoints, FAIL, "H5Sget_select_npoints"); - VERIFY(npoints, (hssize_t)12, "H5Sget_select_npoints"); - - /* Get blocklist */ - nblocks = H5Sget_select_hyper_nblocks(sid); - CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); - VERIFY(nblocks, (hssize_t)2, "H5Sget_select_hyper_nblocks"); - ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); - CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); - - /* Verify blocklist */ + eblock1[4] = 3; eblock2[4] = 5; - if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { - if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) - ERROR("H5Sget_select_hyper_blocklist"); - if(HDmemcmp(&blocklist[6], eblock1, sizeof(eblock1))) - ERROR("H5Sget_select_hyper_blocklist"); - } /* end if */ - else - if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) - ERROR("H5Sget_select_hyper_blocklist"); + test_hyper_unlim_check(sid, dims, (hssize_t)12, (hssize_t)2, eblock1, eblock2); /* Set offset of selection */ offset[1] = (hssize_t)-1; ret = H5Soffset_simple(sid, offset); CHECK(ret, FAIL, "H5Soffset_simple"); - /* Check number of elements */ - npoints = H5Sget_select_npoints(sid); - CHECK(npoints, FAIL, "H5Sget_select_npoints"); - VERIFY(npoints, (hssize_t)16, "H5Sget_select_npoints"); - - /* Get blocklist */ - nblocks = H5Sget_select_hyper_nblocks(sid); - CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); - VERIFY(nblocks, (hssize_t)2, "H5Sget_select_hyper_nblocks"); - ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); - CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); - - /* Verify blocklist */ - eblock1[1] = 2; - eblock1[4] = 3; - eblock2[1] = 5; - eblock2[4] = 6; - if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) { - if(HDmemcmp(blocklist, eblock2, sizeof(eblock2))) - ERROR("H5Sget_select_hyper_blocklist"); - if(HDmemcmp(&blocklist[6], eblock1, sizeof(eblock1))) - ERROR("H5Sget_select_hyper_blocklist"); - } /* end if */ - else - if(HDmemcmp(&blocklist[6], eblock2, sizeof(eblock2))) - ERROR("H5Sget_select_hyper_blocklist"); + /* Check with adjusted offset (should not affect result) */ + test_hyper_unlim_check(sid, dims, (hssize_t)12, (hssize_t)2, eblock1, eblock2); /* Set offset of selection */ offset[1] = (hssize_t)3; ret = H5Soffset_simple(sid, offset); CHECK(ret, FAIL, "H5Soffset_simple"); - /* Check number of elements */ - npoints = H5Sget_select_npoints(sid); - CHECK(npoints, FAIL, "H5Sget_select_npoints"); - VERIFY(npoints, (hssize_t)4, "H5Sget_select_npoints"); - - /* Get blocklist */ - nblocks = H5Sget_select_hyper_nblocks(sid); - CHECK(nblocks, FAIL, "H5Sget_select_hyper_nblocks"); - VERIFY(nblocks, (hssize_t)1, "H5Sget_select_hyper_nblocks"); - ret = H5Sget_select_hyper_blocklist(sid, (hsize_t)0, (hsize_t)nblocks, blocklist); - CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist"); - - /* Verify blocklist */ - eblock1[1] = 2; - eblock1[4] = 2; - if(HDmemcmp(blocklist, eblock1, sizeof(eblock1))) - ERROR("H5Sget_select_hyper_blocklist"); + /* Check with adjusted offset (should not affect result) */ + test_hyper_unlim_check(sid, dims, (hssize_t)12, (hssize_t)2, eblock1, eblock2); /* Reset offset of selection */ offset[1] = (hssize_t)0; @@ -13608,6 +13431,9 @@ test_hyper_unlim(void) CHECK(ret, FAIL, "H5Soffset_simple"); //VDSINC write test saving unlim selection to file as region reference + //VDSINC write tests for more general AND/NOTA/NOTB operations with + //unlimited selections. Also return values from H5Sget_select_npoints and + // H5Shyper_get_select_nblocks for unlimited selections /* Close the dataspace */ ret = H5Sclose(sid); -- cgit v0.12 From 1e7ab81ff25ae5f6197ae83a58bc2a330fc8ffa9 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Fri, 19 Jun 2015 07:37:58 -0500 Subject: [svn-r27248] Daily tests in the VDS brnach reported missing file in MANIFEST. Fixed. --- MANIFEST | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST b/MANIFEST index 80531ed..58aad8d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1268,6 +1268,7 @@ ./tools/h5repack/testh5repack_detect_szip.c # h5ls sources +./tools/h5ls/CMakeTestsVDS.cmake ./tools/h5ls/Makefile.am ./tools/h5ls/Makefile.in ./tools/h5ls/h5ls.c -- cgit v0.12 From 3b1acf484e582941fa95173f6feca275800778ac Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Fri, 19 Jun 2015 08:07:30 -0500 Subject: [svn-r27249] Used versioned APIs to fix the daily tests errors with the --with-default-api-version=v16 builds. Tested on jam. --- examples/h5_vds-eiger.c | 4 ++-- examples/h5_vds-exc.c | 4 ++-- examples/h5_vds-exclim.c | 4 ++-- examples/h5_vds-percival-unlim-maxmin.c | 10 +++++----- examples/h5_vds-percival-unlim.c | 8 ++++---- examples/h5_vds-percival.c | 6 +++--- examples/h5_vds-simpleIO.c | 6 +++--- examples/h5_vds.c | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/examples/h5_vds-eiger.c b/examples/h5_vds-eiger.c index a6ab827..ea22243 100644 --- a/examples/h5_vds-eiger.c +++ b/examples/h5_vds-eiger.c @@ -84,7 +84,7 @@ main (void) /* Create a virtual dataset */ - dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, + dset = H5Dcreate2 (file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, dcpl, H5P_DEFAULT); status = H5Sclose (vspace); status = H5Sclose (src_space); @@ -100,7 +100,7 @@ main (void) * Open file and dataset using the default properties. */ file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); - dset = H5Dopen (file, DATASET, H5P_DEFAULT); + dset = H5Dopen2 (file, DATASET, H5P_DEFAULT); /* * Get creation property list and mapping properties. diff --git a/examples/h5_vds-exc.c b/examples/h5_vds-exc.c index 4a30d91..88d8f61 100644 --- a/examples/h5_vds-exc.c +++ b/examples/h5_vds-exc.c @@ -121,7 +121,7 @@ main (void) } /* Create a virtual dataset */ - dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, + dset = H5Dcreate2 (file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); status = H5Sclose (space); status = H5Sclose (nsrc_space); @@ -138,7 +138,7 @@ main (void) * Open file and dataset using the default properties. */ file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); - dset = H5Dopen (file, DATASET, H5P_DEFAULT); + dset = H5Dopen2 (file, DATASET, H5P_DEFAULT); /* * Get creation property list and mapping properties. diff --git a/examples/h5_vds-exclim.c b/examples/h5_vds-exclim.c index b24927b..4933471 100644 --- a/examples/h5_vds-exclim.c +++ b/examples/h5_vds-exclim.c @@ -122,7 +122,7 @@ main (void) } /* Create a virtual dataset */ - dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, + dset = H5Dcreate2 (file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); status = H5Sclose (space); status = H5Sclose (nsrc_space); @@ -139,7 +139,7 @@ main (void) * Open file and dataset using the default properties. */ file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); - dset = H5Dopen (file, DATASET, H5P_DEFAULT); + dset = H5Dopen2 (file, DATASET, H5P_DEFAULT); /* * Get creation property list and mapping properties. diff --git a/examples/h5_vds-percival-unlim-maxmin.c b/examples/h5_vds-percival-unlim-maxmin.c index feace69..a6eecfb 100644 --- a/examples/h5_vds-percival-unlim-maxmin.c +++ b/examples/h5_vds-percival-unlim-maxmin.c @@ -93,7 +93,7 @@ main (void) src_space = H5Screate_simple (RANK, dims, dims_max); dcpl = H5Pcreate(H5P_DATASET_CREATE); status = H5Pset_chunk (dcpl, RANK, chunk_dims); - dset = H5Dcreate (file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT, + dset = H5Dcreate2 (file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT, dcpl, H5P_DEFAULT); status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); @@ -146,7 +146,7 @@ main (void) H5Sselect_none(vspace); /* Create a virtual dataset */ - vdset = H5Dcreate (vfile, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, + vdset = H5Dcreate2 (vfile, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, dcpl, H5P_DEFAULT); status = H5Sclose (vspace); status = H5Sclose (src_space); @@ -168,7 +168,7 @@ main (void) */ file = H5Fopen (SRC_FILE[i], H5F_ACC_RDWR, H5P_DEFAULT); - dset = H5Dopen (file, SRC_DATASET[i], H5P_DEFAULT); + dset = H5Dopen2 (file, SRC_DATASET[i], H5P_DEFAULT); extdims[0] = DIM0_1+i+1; status = H5Dset_extent (dset, extdims); src_space = H5Dget_space (dset); @@ -212,7 +212,7 @@ main (void) for(i = 0; i < 2; i++) { status = H5Pset_virtual_view (dapl, i ? H5D_VDS_LAST_AVAILABLE : H5D_VDS_FIRST_MISSING); - vdset = H5Dopen (vfile, DATASET, dapl); + vdset = H5Dopen2 (vfile, DATASET, dapl); /* Let's get space of the VDS and its dimension; we should get 32(or 20)x10x10 */ vspace = H5Dget_space (vdset); @@ -229,7 +229,7 @@ main (void) status = H5Pclose (dapl); - vdset = H5Dopen (vfile, DATASET, H5P_DEFAULT); + vdset = H5Dopen2 (vfile, DATASET, H5P_DEFAULT); /* * Get creation property list and mapping properties. diff --git a/examples/h5_vds-percival-unlim.c b/examples/h5_vds-percival-unlim.c index b1acae1..b5f3ebd 100644 --- a/examples/h5_vds-percival-unlim.c +++ b/examples/h5_vds-percival-unlim.c @@ -92,7 +92,7 @@ main (void) src_space = H5Screate_simple (RANK, dims, dims_max); dcpl = H5Pcreate(H5P_DATASET_CREATE); status = H5Pset_chunk (dcpl, RANK, chunk_dims); - dset = H5Dcreate (file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT, + dset = H5Dcreate2 (file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT, dcpl, H5P_DEFAULT); status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); @@ -145,7 +145,7 @@ main (void) H5Sselect_none(vspace); /* Create a virtual dataset */ - vdset = H5Dcreate (vfile, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, + vdset = H5Dcreate2 (vfile, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, dcpl, H5P_DEFAULT); status = H5Sclose (vspace); status = H5Sclose (src_space); @@ -173,7 +173,7 @@ main (void) */ file = H5Fopen (SRC_FILE[i], H5F_ACC_RDWR, H5P_DEFAULT); - dset = H5Dopen (file, SRC_DATASET[i], H5P_DEFAULT); + dset = H5Dopen2 (file, SRC_DATASET[i], H5P_DEFAULT); status = H5Dset_extent (dset, extdims); src_space = H5Dget_space (dset); start[0] = DIM0_1; @@ -206,7 +206,7 @@ main (void) * Open file and dataset using the default properties. */ vfile = H5Fopen (VFILE, H5F_ACC_RDONLY, H5P_DEFAULT); - vdset = H5Dopen (vfile, DATASET, H5P_DEFAULT); + vdset = H5Dopen2 (vfile, DATASET, H5P_DEFAULT); /* * Get creation property list and mapping properties. diff --git a/examples/h5_vds-percival.c b/examples/h5_vds-percival.c index 79bb6b1..757bb69 100644 --- a/examples/h5_vds-percival.c +++ b/examples/h5_vds-percival.c @@ -89,7 +89,7 @@ main (void) file = H5Fcreate (SRC_FILE[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); src_space = H5Screate_simple (RANK, dims, NULL); - dset = H5Dcreate (file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT, + dset = H5Dcreate2 (file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); @@ -147,7 +147,7 @@ main (void) H5Sselect_none(vspace); /* Create a virtual dataset */ - dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, + dset = H5Dcreate2 (file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, dcpl, H5P_DEFAULT); status = H5Sclose (vspace); status = H5Sclose (src_space); @@ -162,7 +162,7 @@ main (void) * Open file and dataset using the default properties. */ file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); - dset = H5Dopen (file, DATASET, H5P_DEFAULT); + dset = H5Dopen2 (file, DATASET, H5P_DEFAULT); /* * Get creation property list and mapping properties. diff --git a/examples/h5_vds-simpleIO.c b/examples/h5_vds-simpleIO.c index 795a87c..b707ae4 100644 --- a/examples/h5_vds-simpleIO.c +++ b/examples/h5_vds-simpleIO.c @@ -55,7 +55,7 @@ main (void) file = H5Fcreate (SRC_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); space = H5Screate_simple (RANK, dims, NULL); - dset = H5Dcreate (file, SRC_DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, + dset = H5Dcreate2 (file, SRC_DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata[0]); @@ -82,7 +82,7 @@ main (void) status = H5Pset_virtual (dcpl, vspace, SRC_FILE, SRC_DATASET, src_space); /* Create a virtual dataset. */ - dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, + dset = H5Dcreate2 (file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, dcpl, H5P_DEFAULT); status = H5Sclose (vspace); status = H5Sclose (src_space); @@ -97,7 +97,7 @@ main (void) * Open the file and virtual dataset. */ file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); - dset = H5Dopen (file, DATASET, H5P_DEFAULT); + dset = H5Dopen2 (file, DATASET, H5P_DEFAULT); /* * Get creation property list and mapping properties. */ diff --git a/examples/h5_vds.c b/examples/h5_vds.c index a4909dc..1e502c6 100644 --- a/examples/h5_vds.c +++ b/examples/h5_vds.c @@ -101,7 +101,7 @@ main (void) file = H5Fcreate (SRC_FILE[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); space = H5Screate_simple (RANK1, dims, NULL); - dset = H5Dcreate (file, SRC_DATASET[i], H5T_NATIVE_INT, space, H5P_DEFAULT, + dset = H5Dcreate2 (file, SRC_DATASET[i], H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); @@ -143,7 +143,7 @@ main (void) } /* Create a virtual dataset. */ - dset = H5Dcreate (file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, + dset = H5Dcreate2 (file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); status = H5Sclose (space); status = H5Sclose (src_space); @@ -158,7 +158,7 @@ main (void) * Open the file and virtual dataset. */ file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); - dset = H5Dopen (file, DATASET, H5P_DEFAULT); + dset = H5Dopen2 (file, DATASET, H5P_DEFAULT); /* * Get creation property list and mapping properties. -- cgit v0.12 From 5a1be8e235c83970e053b2a4b2e0cc80e5e67d92 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 22 Jun 2015 11:03:14 -0500 Subject: [svn-r27265] corrected test params --- tools/h5ls/testh5lsvds.sh.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/h5ls/testh5lsvds.sh.in b/tools/h5ls/testh5lsvds.sh.in index 5d599e9..0f56234 100644 --- a/tools/h5ls/testh5lsvds.sh.in +++ b/tools/h5ls/testh5lsvds.sh.in @@ -239,12 +239,12 @@ COPY_TESTFILES_TO_TESTDIR ####### test for dataset vds ###### -TOOLTEST tvds-1.ls -w80 -v 1_vds.h5 -TOOLTEST tvds-2.ls -w80 -v 2_vds.h5 -TOOLTEST tvds-3_1.ls -w80 -v 3_1_vds.h5 -TOOLTEST tvds-3_2.ls -w80 -v 3_2_vds.h5 -TOOLTEST tvds-4.ls -w80 -v 4_vds.h5 -TOOLTEST tvds-5.ls -w80 -v 5_vds.h5 +TOOLTEST tvds-1.ls 0 -w80 -v 1_vds.h5 +TOOLTEST tvds-2.ls 0 -w80 -v 2_vds.h5 +TOOLTEST tvds-3_1.ls 0 -w80 -v 3_1_vds.h5 +TOOLTEST tvds-3_2.ls 0 -w80 -v 3_2_vds.h5 +TOOLTEST tvds-4.ls 0 -w80 -v 4_vds.h5 +TOOLTEST tvds-5.ls 0 -w80 -v 5_vds.h5 # Clean up temporary files/directories CLEAN_TESTFILES_AND_TESTDIR -- cgit v0.12 From 224c6cbe591b5e10a8340f5bcb722db59e8efff6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 22 Jun 2015 13:47:43 -0500 Subject: [svn-r27266] Change tests to use simple mode - eliminates native type use. Combine float checks and int checks to eliminate possible conflicts --- tools/h5ls/CMakeTestsVDS.cmake | 12 +- tools/h5ls/h5ls.c | 290 ++++++++++++++++++++-------------------- tools/h5ls/testh5lsvds.sh.in | 12 +- tools/testfiles/vds/tvds-1.ls | 2 +- tools/testfiles/vds/tvds-2.ls | 2 +- tools/testfiles/vds/tvds-3_1.ls | 2 +- tools/testfiles/vds/tvds-3_2.ls | 2 +- tools/testfiles/vds/tvds-4.ls | 2 +- tools/testfiles/vds/tvds-5.ls | 2 +- 9 files changed, 165 insertions(+), 161 deletions(-) diff --git a/tools/h5ls/CMakeTestsVDS.cmake b/tools/h5ls/CMakeTestsVDS.cmake index 71ff576..1ef3f20 100644 --- a/tools/h5ls/CMakeTestsVDS.cmake +++ b/tools/h5ls/CMakeTestsVDS.cmake @@ -140,10 +140,10 @@ set (last_test "H5LS_VDS-clearall-objects") endif (HDF5_ENABLE_USING_MEMCHECKER) - ADD_H5_VDS_TEST (tvds-1 0 -w80 -v 1_vds.h5) - ADD_H5_VDS_TEST (tvds-2 0 -w80 -v 2_vds.h5) - ADD_H5_VDS_TEST (tvds-3_1 0 -w80 -v 3_1_vds.h5) - ADD_H5_VDS_TEST (tvds-3_2 0 -w80 -v 3_2_vds.h5) - ADD_H5_VDS_TEST (tvds-4 0 -w80 -v 4_vds.h5) - ADD_H5_VDS_TEST (tvds-5 0 -w80 -v 5_vds.h5) + ADD_H5_VDS_TEST (tvds-1 0 -w80 -v -S 1_vds.h5) + ADD_H5_VDS_TEST (tvds-2 0 -w80 -v -S 2_vds.h5) + ADD_H5_VDS_TEST (tvds-3_1 0 -w80 -v -S 3_1_vds.h5) + ADD_H5_VDS_TEST (tvds-3_2 0 -w80 -v -S 3_2_vds.h5) + ADD_H5_VDS_TEST (tvds-4 0 -w80 -v -S 4_vds.h5) + ADD_H5_VDS_TEST (tvds-5 0 -w80 -v -S 5_vds.h5) diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index 0428960..98e3009 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -155,6 +155,8 @@ static struct dispatch_t { } static void print_type(h5tools_str_t *buffer, hid_t type, int ind); +static hbool_t print_int_type(h5tools_str_t *buffer, hid_t type, int ind); +static hbool_t print_float_type(h5tools_str_t *buffer, hid_t type, int ind); static herr_t visit_obj(hid_t file, const char *oname, iter_t *iter); @@ -294,7 +296,7 @@ print_string(h5tools_str_t *buffer, const char *s, hbool_t escape_spaces) if (escape_spaces) { if (buffer) h5tools_str_append(buffer, "\\ "); nprint += 2; - } + } else { if (buffer) h5tools_str_append(buffer, " "); nprint++; @@ -304,7 +306,7 @@ print_string(h5tools_str_t *buffer, const char *s, hbool_t escape_spaces) if (isprint((int)*s)) { if (buffer) h5tools_str_append(buffer, "%c", *s); nprint++; - } + } else { if (buffer) h5tools_str_append(buffer, "\\%03o", *((const unsigned char*)s)); nprint += 4; @@ -385,102 +387,106 @@ print_obj_name(h5tools_str_t *buffer, const iter_t *iter, const char *oname, *------------------------------------------------------------------------- */ static hbool_t -print_native_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind) +print_native_type(h5tools_str_t *buffer, hid_t type, int ind) { - if (H5Tequal(type, H5T_NATIVE_SCHAR)==TRUE) { - h5tools_str_append(buffer, "native signed char"); - } else if (H5Tequal(type, H5T_NATIVE_UCHAR)==TRUE) { - h5tools_str_append(buffer, "native unsigned char"); - } else if (H5Tequal(type, H5T_NATIVE_INT)==TRUE) { - h5tools_str_append(buffer, "native int"); - } else if (H5Tequal(type, H5T_NATIVE_UINT)==TRUE) { - h5tools_str_append(buffer, "native unsigned int"); - } else if (H5Tequal(type, H5T_NATIVE_SHORT)==TRUE) { - h5tools_str_append(buffer, "native short"); - } else if (H5Tequal(type, H5T_NATIVE_USHORT)==TRUE) { - h5tools_str_append(buffer, "native unsigned short"); - } else if (H5Tequal(type, H5T_NATIVE_LONG)==TRUE) { - h5tools_str_append(buffer, "native long"); - } else if (H5Tequal(type, H5T_NATIVE_ULONG)==TRUE) { - h5tools_str_append(buffer, "native unsigned long"); - } else if (H5Tequal(type, H5T_NATIVE_LLONG)==TRUE) { - h5tools_str_append(buffer, "native long long"); - } else if (H5Tequal(type, H5T_NATIVE_ULLONG)==TRUE) { - h5tools_str_append(buffer, "native unsigned long long"); - } else if (H5Tequal(type, H5T_NATIVE_FLOAT)==TRUE) { - h5tools_str_append(buffer, "native float"); - } else if (H5Tequal(type, H5T_NATIVE_DOUBLE)==TRUE) { - h5tools_str_append(buffer, "native double"); + if(!simple_output_g) { + if (H5Tequal(type, H5T_NATIVE_SCHAR)==TRUE) { + h5tools_str_append(buffer, "native signed char"); + } else if (H5Tequal(type, H5T_NATIVE_UCHAR)==TRUE) { + h5tools_str_append(buffer, "native unsigned char"); + } else if (H5Tequal(type, H5T_NATIVE_INT)==TRUE) { + h5tools_str_append(buffer, "native int"); + } else if (H5Tequal(type, H5T_NATIVE_UINT)==TRUE) { + h5tools_str_append(buffer, "native unsigned int"); + } else if (H5Tequal(type, H5T_NATIVE_SHORT)==TRUE) { + h5tools_str_append(buffer, "native short"); + } else if (H5Tequal(type, H5T_NATIVE_USHORT)==TRUE) { + h5tools_str_append(buffer, "native unsigned short"); + } else if (H5Tequal(type, H5T_NATIVE_LONG)==TRUE) { + h5tools_str_append(buffer, "native long"); + } else if (H5Tequal(type, H5T_NATIVE_ULONG)==TRUE) { + h5tools_str_append(buffer, "native unsigned long"); + } else if (H5Tequal(type, H5T_NATIVE_LLONG)==TRUE) { + h5tools_str_append(buffer, "native long long"); + } else if (H5Tequal(type, H5T_NATIVE_ULLONG)==TRUE) { + h5tools_str_append(buffer, "native unsigned long long"); + } else if (H5Tequal(type, H5T_NATIVE_FLOAT)==TRUE) { + h5tools_str_append(buffer, "native float"); + } else if (H5Tequal(type, H5T_NATIVE_DOUBLE)==TRUE) { + h5tools_str_append(buffer, "native double"); #if H5_SIZEOF_LONG_DOUBLE !=0 - } else if (H5Tequal(type, H5T_NATIVE_LDOUBLE)==TRUE) { - h5tools_str_append(buffer, "native long double"); + } else if (H5Tequal(type, H5T_NATIVE_LDOUBLE)==TRUE) { + h5tools_str_append(buffer, "native long double"); #endif - } else if (H5Tequal(type, H5T_NATIVE_INT8)==TRUE) { - h5tools_str_append(buffer, "native int8_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT8)==TRUE) { - h5tools_str_append(buffer, "native uint8_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT16)==TRUE) { - h5tools_str_append(buffer, "native int16_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT16)==TRUE) { - h5tools_str_append(buffer, "native uint16_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT32)==TRUE) { - h5tools_str_append(buffer, "native int32_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT32)==TRUE) { - h5tools_str_append(buffer, "native uint32_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT64)==TRUE) { - h5tools_str_append(buffer, "native int64_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT64)==TRUE) { - h5tools_str_append(buffer, "native uint64_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST8)==TRUE) { - h5tools_str_append(buffer, "native int_least8_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST8)==TRUE) { - h5tools_str_append(buffer, "native uint_least8_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST16)==TRUE) { - h5tools_str_append(buffer, "native int_least16_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST16)==TRUE) { - h5tools_str_append(buffer, "native uint_least16_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST32)==TRUE) { - h5tools_str_append(buffer, "native int_least32_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST32)==TRUE) { - h5tools_str_append(buffer, "native uint_least32_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST64)==TRUE) { - h5tools_str_append(buffer, "native int_least64_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST64)==TRUE) { - h5tools_str_append(buffer, "native uint_least64_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_FAST8)==TRUE) { - h5tools_str_append(buffer, "native int_fast8_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST8)==TRUE) { - h5tools_str_append(buffer, "native uint_fast8_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_FAST16)==TRUE) { - h5tools_str_append(buffer, "native int_fast16_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST16)==TRUE) { - h5tools_str_append(buffer, "native uint_fast16_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_FAST32)==TRUE) { - h5tools_str_append(buffer, "native int_fast32_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST32)==TRUE) { - h5tools_str_append(buffer, "native uint_fast32_t"); - } else if (H5Tequal(type, H5T_NATIVE_INT_FAST64)==TRUE) { - h5tools_str_append(buffer, "native int_fast64_t"); - } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST64)==TRUE) { - h5tools_str_append(buffer, "native uint_fast64_t"); - } else if (H5Tequal(type, H5T_NATIVE_B8)==TRUE) { - h5tools_str_append(buffer, "native 8-bit field"); - } else if (H5Tequal(type, H5T_NATIVE_B16)==TRUE) { - h5tools_str_append(buffer, "native 16-bit field"); - } else if (H5Tequal(type, H5T_NATIVE_B32)==TRUE) { - h5tools_str_append(buffer, "native 32-bit field"); - } else if (H5Tequal(type, H5T_NATIVE_B64)==TRUE) { - h5tools_str_append(buffer, "native 64-bit field"); - } else if (H5Tequal(type, H5T_NATIVE_HSIZE)==TRUE) { - h5tools_str_append(buffer, "native hsize_t"); - } else if (H5Tequal(type, H5T_NATIVE_HSSIZE)==TRUE) { - h5tools_str_append(buffer, "native hssize_t"); - } else if (H5Tequal(type, H5T_NATIVE_HERR)==TRUE) { - h5tools_str_append(buffer, "native herr_t"); - } else if (H5Tequal(type, H5T_NATIVE_HBOOL)==TRUE) { - h5tools_str_append(buffer, "native hbool_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT8)==TRUE) { + h5tools_str_append(buffer, "native int8_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT8)==TRUE) { + h5tools_str_append(buffer, "native uint8_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT16)==TRUE) { + h5tools_str_append(buffer, "native int16_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT16)==TRUE) { + h5tools_str_append(buffer, "native uint16_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT32)==TRUE) { + h5tools_str_append(buffer, "native int32_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT32)==TRUE) { + h5tools_str_append(buffer, "native uint32_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT64)==TRUE) { + h5tools_str_append(buffer, "native int64_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT64)==TRUE) { + h5tools_str_append(buffer, "native uint64_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST8)==TRUE) { + h5tools_str_append(buffer, "native int_least8_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST8)==TRUE) { + h5tools_str_append(buffer, "native uint_least8_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST16)==TRUE) { + h5tools_str_append(buffer, "native int_least16_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST16)==TRUE) { + h5tools_str_append(buffer, "native uint_least16_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST32)==TRUE) { + h5tools_str_append(buffer, "native int_least32_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST32)==TRUE) { + h5tools_str_append(buffer, "native uint_least32_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_LEAST64)==TRUE) { + h5tools_str_append(buffer, "native int_least64_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST64)==TRUE) { + h5tools_str_append(buffer, "native uint_least64_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_FAST8)==TRUE) { + h5tools_str_append(buffer, "native int_fast8_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST8)==TRUE) { + h5tools_str_append(buffer, "native uint_fast8_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_FAST16)==TRUE) { + h5tools_str_append(buffer, "native int_fast16_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST16)==TRUE) { + h5tools_str_append(buffer, "native uint_fast16_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_FAST32)==TRUE) { + h5tools_str_append(buffer, "native int_fast32_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST32)==TRUE) { + h5tools_str_append(buffer, "native uint_fast32_t"); + } else if (H5Tequal(type, H5T_NATIVE_INT_FAST64)==TRUE) { + h5tools_str_append(buffer, "native int_fast64_t"); + } else if (H5Tequal(type, H5T_NATIVE_UINT_FAST64)==TRUE) { + h5tools_str_append(buffer, "native uint_fast64_t"); + } else if (H5Tequal(type, H5T_NATIVE_B8)==TRUE) { + h5tools_str_append(buffer, "native 8-bit field"); + } else if (H5Tequal(type, H5T_NATIVE_B16)==TRUE) { + h5tools_str_append(buffer, "native 16-bit field"); + } else if (H5Tequal(type, H5T_NATIVE_B32)==TRUE) { + h5tools_str_append(buffer, "native 32-bit field"); + } else if (H5Tequal(type, H5T_NATIVE_B64)==TRUE) { + h5tools_str_append(buffer, "native 64-bit field"); + } else if (H5Tequal(type, H5T_NATIVE_HSIZE)==TRUE) { + h5tools_str_append(buffer, "native hsize_t"); + } else if (H5Tequal(type, H5T_NATIVE_HSSIZE)==TRUE) { + h5tools_str_append(buffer, "native hssize_t"); + } else if (H5Tequal(type, H5T_NATIVE_HERR)==TRUE) { + h5tools_str_append(buffer, "native herr_t"); + } else if (H5Tequal(type, H5T_NATIVE_HBOOL)==TRUE) { + h5tools_str_append(buffer, "native hbool_t"); + } else { + return print_int_type(buffer, type, ind); + } } else { - return FALSE; + return print_int_type(buffer, type, ind); } return TRUE; } @@ -503,22 +509,22 @@ print_native_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind) *------------------------------------------------------------------------- */ static hbool_t -print_ieee_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind) +print_ieee_type(h5tools_str_t *buffer, hid_t type, int ind) { if (H5Tequal(type, H5T_IEEE_F32BE)==TRUE) { h5tools_str_append(buffer, "IEEE 32-bit big-endian float"); - } + } else if (H5Tequal(type, H5T_IEEE_F32LE)==TRUE) { h5tools_str_append(buffer, "IEEE 32-bit little-endian float"); - } + } else if (H5Tequal(type, H5T_IEEE_F64BE)==TRUE) { h5tools_str_append(buffer, "IEEE 64-bit big-endian float"); - } + } else if (H5Tequal(type, H5T_IEEE_F64LE)==TRUE) { h5tools_str_append(buffer, "IEEE 64-bit little-endian float"); - } + } else { - return FALSE; + return print_float_type(buffer, type, ind); } return TRUE; } @@ -650,17 +656,17 @@ print_int_type(h5tools_str_t *buffer, hid_t type, int ind) order = H5Tget_order(type); if (H5T_ORDER_LE==order) { order_s = " little-endian"; - } + } else if (H5T_ORDER_BE==order) { order_s = " big-endian"; - } + } else if (H5T_ORDER_VAX==order) { order_s = " mixed-endian"; - } + } else { order_s = " unknown-byte-order"; } - } + } else { order_s = ""; } @@ -669,14 +675,14 @@ print_int_type(h5tools_str_t *buffer, hid_t type, int ind) if ((sign=H5Tget_sign(type))>=0) { if (H5T_SGN_NONE==sign) { sign_s = " unsigned"; - } + } else if (H5T_SGN_2==sign) { sign_s = ""; - } + } else { sign_s = " unknown-sign"; } - } + } else { sign_s = " unknown-sign"; } @@ -727,17 +733,17 @@ print_float_type(h5tools_str_t *buffer, hid_t type, int ind) order = H5Tget_order(type); if (H5T_ORDER_LE==order) { order_s = " little-endian"; - } + } else if (H5T_ORDER_BE==order) { order_s = " big-endian"; - } + } else if (H5T_ORDER_VAX==order) { order_s = " mixed-endian"; - } + } else { order_s = " unknown-byte-order"; } - } + } else { order_s = ""; } @@ -949,13 +955,13 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind) h5tools_str_append(buffer, "0x"); for(j = 0; j < dst_size; j++) h5tools_str_append(buffer, "%02x", value[i*dst_size+j]); - } + } else if(H5T_SGN_NONE == H5Tget_sign(native)) { /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size" *strangely, unless use another pointer "copy".*/ copy = value + i * dst_size; h5tools_str_append(buffer, HSIZE_T_FORMAT, *((unsigned long long*)((void*)copy))); - } + } else { /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size" *strangely, unless use another pointer "copy".*/ @@ -1074,7 +1080,7 @@ print_string_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind) if (H5Tis_variable_str(type)) { h5tools_str_append(buffer, "variable-length"); - } + } else { h5tools_str_append(buffer, "%lu-byte", (unsigned long)H5Tget_size(type)); } @@ -1108,10 +1114,10 @@ print_reference_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind) if (H5Tequal(type, H5T_STD_REF_OBJ)==TRUE) { h5tools_str_append(buffer, "object reference"); - } + } else if (H5Tequal(type, H5T_STD_REF_DSETREG)==TRUE) { h5tools_str_append(buffer, "dataset region reference"); - } + } else { h5tools_str_append(buffer, "%lu-byte unknown reference", (unsigned long)H5Tget_size(type)); @@ -1220,7 +1226,7 @@ print_array_type(h5tools_str_t *buffer, hid_t type, int ind) h5tools_str_append(buffer, "]"); HDfree(dims); - } + } else h5tools_str_append(buffer, " [SCALAR]\n", rawoutstream); @@ -1324,10 +1330,8 @@ print_type(h5tools_str_t *buffer, hid_t type, int ind) } /* end if */ /* Print the type */ - if((!simple_output_g && print_native_type(buffer, type, ind)) || + if(print_native_type(buffer, type, ind) || print_ieee_type(buffer, type, ind) || - print_int_type(buffer, type, ind) || - print_float_type(buffer, type, ind) || print_cmpd_type(buffer, type, ind) || print_enum_type(buffer, type, ind) || print_string_type(buffer, type, ind) || @@ -1371,7 +1375,7 @@ dump_dataset_values(hid_t dset) h5tools_context_t ctx; /* print context */ h5tool_format_t outputformat; h5tool_format_t *info = &ls_dataformat; - + hid_t f_type = H5Dget_type(dset); size_t size = H5Tget_size(f_type); @@ -1402,7 +1406,7 @@ dump_dataset_values(hid_t dset) outputformat.elmt_suf1 = " "; outputformat.str_locale = ESCAPE_HTML; - } + } else { if (no_line_wrap_g) { outputformat.line_per_line = 1; @@ -1422,7 +1426,7 @@ dump_dataset_values(hid_t dset) outputformat.cmpd_pre = NULL; outputformat.cmpd_suf = NULL; outputformat.cmpd_sep = NULL; - + outputformat.vlen_sep = NULL; outputformat.vlen_pre = NULL; outputformat.vlen_suf = NULL; @@ -1439,7 +1443,7 @@ dump_dataset_values(hid_t dset) /* Print all data in hexadecimal format if the `-x' or `--hexdump' * command line switch was given. */ outputformat.raw = TRUE; - } + } else if (string_g && 1==size && H5T_INTEGER==H5Tget_class(f_type)) { /* Print 1-byte integer data as an ASCI character string instead of * integers if the `-s' or `--string' command-line option was given. */ @@ -1469,7 +1473,7 @@ dump_dataset_values(hid_t dset) H5Tclose(f_type); h5tools_str_close(&buffer); - + PRINTVALSTREAM(rawoutstream, "\n"); } @@ -1517,7 +1521,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain h5tools_str_reset(&buffer); h5tools_str_append(&buffer, " Attribute: "); - + print_string(&buffer, attr_name, TRUE); if((attr = H5Aopen(obj, attr_name, H5P_DEFAULT))) { @@ -1576,7 +1580,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain outputformat.line_cont = " "; outputformat.str_repeat = 8; - } + } else { h5tools_str_reset(&buffer); h5tools_str_append(&buffer, " Data:\n"); @@ -1607,7 +1611,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain outputformat.cmpd_pre = NULL; outputformat.cmpd_suf = NULL; outputformat.cmpd_sep = NULL; - + outputformat.vlen_sep = NULL; outputformat.vlen_pre = NULL; outputformat.vlen_suf = NULL; @@ -1651,7 +1655,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain H5Sclose(space); H5Tclose(type); H5Aclose(attr); - } + } h5tools_str_close(&buffer); PRINTVALSTREAM(rawoutstream, "\n"); @@ -1708,7 +1712,7 @@ dataset_list1(hid_t dset) h5tools_str_append(&buffer, "%s"HSIZE_T_FORMAT, i?", ":"", cur_size[i]); if (max_size[i]==H5S_UNLIMITED) { h5tools_str_append(&buffer, "/%s", "Inf"); - } + } else if (max_size[i]!=cur_size[i] || verbose_g>0) { h5tools_str_append(&buffer, "/"HSIZE_T_FORMAT, max_size[i]); } @@ -2221,7 +2225,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) h5tools_str_append(&buffer, " "); /* Check if we have already seen this softlink */ - if(symlink_is_visited(iter->symlink_list, linfo->type, NULL, buf)) + if(symlink_is_visited(iter->symlink_list, linfo->type, NULL, buf)) { h5tools_str_append(&buffer, "{Already Visited}\n"); h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); @@ -2230,7 +2234,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); /* Add this link to the list of seen softlinks */ - if(symlink_visit_add(iter->symlink_list, linfo->type, NULL, buf) < 0) + if(symlink_visit_add(iter->symlink_list, linfo->type, NULL, buf) < 0) goto done; /* Adjust user data to specify that we are operating on the @@ -2242,7 +2246,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) if(!recursive_g) grp_literal_g = TRUE; /* Recurse through the soft link */ - if(visit_obj(iter->fid, name, iter) < 0) + if(visit_obj(iter->fid, name, iter) < 0) { grp_literal_g = orig_grp_literal; goto done; @@ -2275,7 +2279,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) else if (no_dangling_link_g && ret == 0) iter->symlink_list->dangle_link = TRUE; - if(H5Lunpack_elink_val(buf, linfo->u.val_size, NULL, &filename, &path) < 0) + if(H5Lunpack_elink_val(buf, linfo->u.val_size, NULL, &filename, &path) < 0) goto done; h5tools_str_append(&buffer, "External Link {"); @@ -2296,7 +2300,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) h5tools_str_append(&buffer, " "); /* Check if we have already seen this elink */ - if(symlink_is_visited(iter->symlink_list, linfo->type, filename, path)) + if(symlink_is_visited(iter->symlink_list, linfo->type, filename, path)) { h5tools_str_append(&buffer, "{Already Visited}\n"); h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); @@ -2305,7 +2309,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); /* Add this link to the list of seen elinks */ - if(symlink_visit_add(iter->symlink_list, linfo->type, filename, path) < 0) + if(symlink_visit_add(iter->symlink_list, linfo->type, filename, path) < 0) { goto done; } @@ -2355,7 +2359,7 @@ done: * * Purpose: Begins iteration on an object * - * Return: + * Return: * Success: 0 * Failure: -1 * @@ -2514,7 +2518,7 @@ get_width(void) * * Purpose: check if command line arguments are valid * - * Return: + * Return: * Success: TRUE (1) * Failure: FALSE (0) * @@ -2522,19 +2526,19 @@ get_width(void) * Jonathan Kim (06/15/2010) * *-------------------------------------------------------------------------*/ -static hbool_t +static hbool_t is_valid_args(void) { hbool_t ret = TRUE; - if(recursive_g && grp_literal_g) + if(recursive_g && grp_literal_g) { HDfprintf(rawerrorstream, "Error: 'recursive' option not compatible with 'group info' option!\n\n"); ret = FALSE; goto out; } - if(no_dangling_link_g && !follow_symlink_g) + if(no_dangling_link_g && !follow_symlink_g) { HDfprintf(rawerrorstream, "Error: --no-dangling-links must be used along with --follow-symlinks option!\n\n"); ret = FALSE; @@ -2912,7 +2916,7 @@ main(int argc, const char *argv[]) if(x) HDfree(oname); - for(u=0; u < symlink_list.nused; u++) + for(u=0; u < symlink_list.nused; u++) { if (symlink_list.objs[u].type == H5L_TYPE_EXTERNAL) HDfree(symlink_list.objs[u].file); @@ -2920,7 +2924,7 @@ main(int argc, const char *argv[]) HDfree(symlink_list.objs[u].path); } HDfree(symlink_list.objs); - + /* if no-dangling-links option specified and dangling link found */ if (no_dangling_link_g && iter.symlink_list->dangle_link) err_exit = 1; diff --git a/tools/h5ls/testh5lsvds.sh.in b/tools/h5ls/testh5lsvds.sh.in index 0f56234..d194992 100644 --- a/tools/h5ls/testh5lsvds.sh.in +++ b/tools/h5ls/testh5lsvds.sh.in @@ -239,12 +239,12 @@ COPY_TESTFILES_TO_TESTDIR ####### test for dataset vds ###### -TOOLTEST tvds-1.ls 0 -w80 -v 1_vds.h5 -TOOLTEST tvds-2.ls 0 -w80 -v 2_vds.h5 -TOOLTEST tvds-3_1.ls 0 -w80 -v 3_1_vds.h5 -TOOLTEST tvds-3_2.ls 0 -w80 -v 3_2_vds.h5 -TOOLTEST tvds-4.ls 0 -w80 -v 4_vds.h5 -TOOLTEST tvds-5.ls 0 -w80 -v 5_vds.h5 +TOOLTEST tvds-1.ls 0 -w80 -v -S 1_vds.h5 +TOOLTEST tvds-2.ls 0 -w80 -v -S 2_vds.h5 +TOOLTEST tvds-3_1.ls 0 -w80 -v -S 3_1_vds.h5 +TOOLTEST tvds-3_2.ls 0 -w80 -v -S 3_2_vds.h5 +TOOLTEST tvds-4.ls 0 -w80 -v -S 4_vds.h5 +TOOLTEST tvds-5.ls 0 -w80 -v -S 5_vds.h5 # Clean up temporary files/directories CLEAN_TESTFILES_AND_TESTDIR diff --git a/tools/testfiles/vds/tvds-1.ls b/tools/testfiles/vds/tvds-1.ls index 25a4a3b..61c9e46 100644 --- a/tools/testfiles/vds/tvds-1.ls +++ b/tools/testfiles/vds/tvds-1.ls @@ -11,4 +11,4 @@ vds_dset Dataset {5/Inf, 18/18, 8/8} 1_f.h5 /source_dset } Storage: 2880 logical bytes, 0 allocated bytes - Type: native int + Type: 32-bit little-endian integer diff --git a/tools/testfiles/vds/tvds-2.ls b/tools/testfiles/vds/tvds-2.ls index cbba5ff..49fe05f 100644 --- a/tools/testfiles/vds/tvds-2.ls +++ b/tools/testfiles/vds/tvds-2.ls @@ -10,4 +10,4 @@ vds_dset Dataset {6/Inf, 8/8, 14/14} 2_e.h5 /source_dset } Storage: 2688 logical bytes, 0 allocated bytes - Type: native int + Type: 32-bit little-endian integer diff --git a/tools/testfiles/vds/tvds-3_1.ls b/tools/testfiles/vds/tvds-3_1.ls index 0667c4e..fe24002 100644 --- a/tools/testfiles/vds/tvds-3_1.ls +++ b/tools/testfiles/vds/tvds-3_1.ls @@ -11,4 +11,4 @@ vds_dset Dataset {5/Inf, 25/25, 8/8} 1_f.h5 /source_dset } Storage: 4000 logical bytes, 0 allocated bytes - Type: native int + Type: 32-bit little-endian integer diff --git a/tools/testfiles/vds/tvds-3_2.ls b/tools/testfiles/vds/tvds-3_2.ls index 7d6824c..a4ad84f 100644 --- a/tools/testfiles/vds/tvds-3_2.ls +++ b/tools/testfiles/vds/tvds-3_2.ls @@ -10,4 +10,4 @@ vds_dset Dataset {6/Inf, 13/13, 19/19} 2_e.h5 /source_dset } Storage: 5928 logical bytes, 0 allocated bytes - Type: native int + Type: 32-bit little-endian integer diff --git a/tools/testfiles/vds/tvds-4.ls b/tools/testfiles/vds/tvds-4.ls index 8abc0dd..176529b 100644 --- a/tools/testfiles/vds/tvds-4.ls +++ b/tools/testfiles/vds/tvds-4.ls @@ -6,4 +6,4 @@ vds_dset Dataset {9/Inf, 4/4, 4/4} 4_%b.h5 /source_dset } Storage: 576 logical bytes, 0 allocated bytes - Type: native int + Type: 32-bit little-endian integer diff --git a/tools/testfiles/vds/tvds-5.ls b/tools/testfiles/vds/tvds-5.ls index 3bd811b..5f98e84 100644 --- a/tools/testfiles/vds/tvds-5.ls +++ b/tools/testfiles/vds/tvds-5.ls @@ -8,4 +8,4 @@ vds_dset Dataset {9/Inf, 4/4, 4/4} 5_c.h5 /source_dset } Storage: 576 logical bytes, 0 allocated bytes - Type: native int + Type: 32-bit little-endian integer -- cgit v0.12 From 2522e278a8fbaa308d6974493fb5f0c381642d94 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 25 Jun 2015 14:39:08 -0500 Subject: [svn-r27284] Modify VDS implementation to always use FAPL and DAPL from VDS file and dataset to open source files and datasets, instead of using the default property lists. Modify VDS to reject attempts at parallel I/O, fix parallel compile error. Modify VDS to not write fill value to memory buffer if the fill value is undefined. Other minor fixes/cleanup. Tested: ummon --- src/H5Dvirtual.c | 159 +++++++++++++++++++++++++++++++++++++------------------ src/H5Olayout.c | 3 ++ src/H5Oprivate.h | 2 + src/H5Pdcpl.c | 2 +- src/H5Shyper.c | 2 +- test/tselect.c | 5 +- 6 files changed, 118 insertions(+), 55 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 226d879..a783a5a 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -108,8 +108,8 @@ const H5D_layout_ops_t H5D_LOPS_VIRTUAL[1] = {{ H5D__virtual_read, H5D__virtual_write, #ifdef H5_HAVE_PARALLEL - H5D__virtual_collective_read, //VDSINC - H5D__virtual_collective_write, //VDSINC + NULL, + NULL, #endif /* H5_HAVE_PARALLEL */ NULL, NULL, @@ -132,9 +132,8 @@ H5FL_DEFINE(H5O_storage_virtual_name_seg_t); * * Purpose: Updates the virtual layout's "min_dims" field to take into * account the "idx"th entry in the mapping list. The entry - * must be complete, though top level fields list_nused does - * (and of course min_dims) do not need to take it into - * account. + * must be complete, though top level field list_nused (and + * of course min_dims) does not need to take it into account. * * Return: Non-negative on success/Negative on failure * @@ -206,6 +205,9 @@ herr_t H5D__virtual_copy_layout(H5O_layout_t *layout) { H5O_storage_virtual_ent_t *orig_list = NULL; + hid_t orig_source_fapl; + hid_t orig_source_dapl; + H5P_genplist_t *plist; size_t i; herr_t ret_value = SUCCEED; @@ -214,11 +216,18 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) HDassert(layout); HDassert(layout->type == H5D_VIRTUAL); - if(layout->storage.u.virt.list_nused > 0) { - HDassert(layout->storage.u.virt.list); + /* Save original entry list and top-level property lists and reset in layout + * so the originals aren't closed on error */ + orig_source_fapl = layout->storage.u.virt.source_fapl; + layout->storage.u.virt.source_fapl = -1; + orig_source_dapl = layout->storage.u.virt.source_dapl; + layout->storage.u.virt.source_dapl = -1; + orig_list = layout->storage.u.virt.list; + layout->storage.u.virt.list = NULL; - /* Save original entry list for use as the "source" */ - orig_list = layout->storage.u.virt.list; + /* Copy entry list */ + if(layout->storage.u.virt.list_nused > 0) { + HDassert(orig_list); /* Allocate memory for the list */ if(NULL == (layout->storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_calloc(layout->storage.u.virt.list_nused * sizeof(H5O_storage_virtual_ent_t)))) @@ -315,13 +324,26 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) layout->storage.u.virt.list_nalloc = 0; } /* end else */ + /* Copy property lists */ + if(orig_source_fapl >= 0) { + if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(orig_source_fapl, H5I_GENPROP_LST))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + if((layout->storage.u.virt.source_fapl = H5P_copy_plist(plist, FALSE)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy fapl") + } /* end if */ + if(orig_source_dapl >= 0) { + if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(orig_source_dapl, H5I_GENPROP_LST))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + if((layout->storage.u.virt.source_dapl = H5P_copy_plist(plist, FALSE)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dapl") + } /* end if */ + /* New layout is not fully initialized */ layout->storage.u.virt.init = FALSE; done: /* Release allocated resources on failure */ - if((ret_value < 0) && orig_list - && (orig_list != layout->storage.u.virt.list)) + if(ret_value < 0) if(H5D__virtual_reset_layout(layout) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset virtual layout") @@ -392,6 +414,14 @@ H5D__virtual_reset_layout(H5O_layout_t *layout) layout->storage.u.virt.list_nused = (size_t)0; (void)HDmemset(layout->storage.u.virt.min_dims, 0, sizeof(layout->storage.u.virt.min_dims)); + /* Close access property lists */ + if(layout->storage.u.virt.source_fapl >= 0) + if(H5I_dec_ref(layout->storage.u.virt.source_fapl) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't close source fapl") + if(layout->storage.u.virt.source_dapl >= 0) + if(H5I_dec_ref(layout->storage.u.virt.source_dapl) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't close source dapl") + /* The list is no longer initialized */ layout->storage.u.virt.init = FALSE; @@ -470,13 +500,11 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, HDassert(source_dset->dset_name); /* Get dapl and fapl from current (virtual dataset) location? VDSINC */ - /* Write code to check if these exist and return without opening dset - * otherwise VDSINC */ /* Check if we need to open the source file */ if(HDstrcmp(source_dset->file_name, ".")) { /* Open the source file */ - if(NULL == (src_file = H5F_open(source_dset->file_name, H5F_INTENT(vdset->oloc.file) & H5F_ACC_RDWR, H5P_FILE_CREATE_DEFAULT, H5P_FILE_ACCESS_DEFAULT, dxpl_id))) + if(NULL == (src_file = H5F_open(source_dset->file_name, H5F_INTENT(vdset->oloc.file) & H5F_ACC_RDWR, H5P_FILE_CREATE_DEFAULT, vdset->shared->layout.storage.u.virt.source_fapl, dxpl_id))) H5E_clear_stack(NULL); //Quick hack until proper support for H5Fopen with missing file is implemented VDSINC HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENFILE, FAIL, "unable to open source file") else src_file_open = TRUE; @@ -493,7 +521,7 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to get path for root group") /* Open the source dataset */ - if(NULL == (source_dset->dset = H5D__open_name(&src_root_loc, source_dset->dset_name, H5P_DATASET_ACCESS_DEFAULT, dxpl_id))) + if(NULL == (source_dset->dset = H5D__open_name(&src_root_loc, source_dset->dset_name, vdset->shared->layout.storage.u.virt.source_dapl, dxpl_id))) H5E_clear_stack(NULL); //Quick hack until proper support for H5Fopen with missing file is implemented VDSINC HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset") else /* Patch the source selection if necessary */ @@ -1443,8 +1471,8 @@ done: *------------------------------------------------------------------------- */ herr_t -H5D__virtual_init(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, - const H5D_t *dset, hid_t dapl_id) +H5D__virtual_init(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const H5D_t *dset, + hid_t dapl_id) { H5O_storage_virtual_t *storage; /* Convenience pointer */ H5P_genplist_t *dapl; /* Data access property list object pointer */ @@ -1484,6 +1512,14 @@ H5D__virtual_init(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, else storage->printf_gap = (hsize_t)0; + /* Retrieve VDS file FAPL to layout */ + if((storage->source_fapl = H5F_get_access_plist(f, FALSE)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get fapl") + + /* Copy DAPL to layout */ + if((storage->source_dapl = H5P_copy_plist(dapl, FALSE)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dapl") + done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_init() */ @@ -1838,6 +1874,12 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, storage = &io_info->dset->shared->layout.storage.u.virt; HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); +#ifdef H5_HAVE_PARALLEL + /* Parallel reads are not supported (yet) */ + if(H5F_HAS_FEATURE(io_info->dset->oloc.file, H5FD_FEAT_HAS_MPI)) + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "parallel reads not supported on virtual datasets") +#endif /* H5_HAVE_PARALLEL */ + /* Prepare for I/O operation */ if(H5D__virtual_pre_io(io_info, storage, file_space, mem_space, &tot_nelmts) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to prepare for I/O operation") @@ -1863,47 +1905,56 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Fill unmapped part of buffer with fill value */ if(tot_nelmts != nelmts) { - HDassert(tot_nelmts < nelmts); + H5D_fill_value_t fill_status; /* Fill value status */ - /* Start with fill space equal to memory space */ - if(NULL == (fill_space = H5S_copy(mem_space, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy memory selection") + HDassert(tot_nelmts < nelmts); - /* Iterate over mappings */ - for(i = 0; i < storage->list_nused; i++) - /* Check for "printf" source dataset resolution */ - if(storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) { - /* Iterate over sub-source dsets */ - for(j = storage->list[i].sub_dset_io_start; - j < storage->list[i].sub_dset_io_end; j++) - if(storage->list[i].sub_dset[j].projected_mem_space) - if(H5S_select_subtract(fill_space, storage->list[i].sub_dset[j].projected_mem_space) < 0) + /* Check the fill value status */ + if(H5P_is_fill_value_defined(&io_info->dset->shared->dcpl_cache.fill, &fill_status) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if fill value defined") + + /* Always write fill value to memory buffer unless it is undefined */ + if(fill_status != H5D_FILL_VALUE_UNDEFINED) { + /* Start with fill space equal to memory space */ + if(NULL == (fill_space = H5S_copy(mem_space, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy memory selection") + + /* Iterate over mappings */ + for(i = 0; i < storage->list_nused; i++) + /* Check for "printf" source dataset resolution */ + if(storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) { + /* Iterate over sub-source dsets */ + for(j = storage->list[i].sub_dset_io_start; + j < storage->list[i].sub_dset_io_end; j++) + if(storage->list[i].sub_dset[j].projected_mem_space) + if(H5S_select_subtract(fill_space, storage->list[i].sub_dset[j].projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to clip fill selection") + } /* end if */ + else + if(storage->list[i].source_dset.projected_mem_space) + /* Subtract projected memory space from fill space */ + if(H5S_select_subtract(fill_space, storage->list[i].source_dset.projected_mem_space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to clip fill selection") - } /* end if */ - else - if(storage->list[i].source_dset.projected_mem_space) - /* Subtract projected memory space from fill space */ - if(H5S_select_subtract(fill_space, storage->list[i].source_dset.projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to clip fill selection") - /* Write fill values to memory buffer */ - if(H5D__fill(io_info->dset->shared->dcpl_cache.fill.buf, io_info->dset->shared->type, io_info->u.rbuf, type_info->mem_type, fill_space, io_info->dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "filling buf failed") + /* Write fill values to memory buffer */ + if(H5D__fill(io_info->dset->shared->dcpl_cache.fill.buf, io_info->dset->shared->type, io_info->u.rbuf, type_info->mem_type, fill_space, io_info->dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "filling buf failed") #ifndef NDEBUG - /* Make sure the total number of elements written (including fill - * values) == nelmts */ - { - hssize_t select_nelmts; /* Number of elements in selection */ - - /* Get number of elements in fill dataspace */ - if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(fill_space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") - - /* Verify number of elements is correct */ - HDassert((tot_nelmts + (hsize_t)select_nelmts) == nelmts); - } /* end block */ + /* Make sure the total number of elements written (including fill + * values) == nelmts */ + { + hssize_t select_nelmts; /* Number of elements in selection */ + + /* Get number of elements in fill dataspace */ + if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(fill_space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + + /* Verify number of elements is correct */ + HDassert((tot_nelmts + (hsize_t)select_nelmts) == nelmts); + } /* end block */ #endif /* NDEBUG */ + } /* end if */ } /* end if */ done: @@ -2012,6 +2063,12 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, storage = &io_info->dset->shared->layout.storage.u.virt; HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); +#ifdef H5_HAVE_PARALLEL + /* Parallel writes are not supported (yet) */ + if(H5F_HAS_FEATURE(io_info->dset->oloc.file, H5FD_FEAT_HAS_MPI)) + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "parallel writes not supported on virtual datasets") +#endif /* H5_HAVE_PARALLEL */ + /* Prepare for I/O operation */ if(H5D__virtual_pre_io(io_info, storage, file_space, mem_space, &tot_nelmts) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to prepare for I/O operation") diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 5a388fe..b72d41b 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -253,6 +253,9 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED * mesg->storage.u.virt.list_nalloc = 0; mesg->storage.u.virt.view = H5D_VDS_ERROR; mesg->storage.u.virt.printf_gap = HSIZE_UNDEF; + mesg->storage.u.virt.source_fapl = -1; + mesg->storage.u.virt.source_dapl = -1; + mesg->storage.u.virt.init = FALSE; /* Decode heap block if it exists */ if(mesg->storage.u.virt.serial_list_hobjid.addr != HADDR_UNDEF) { diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index a9a5949..bb14d77 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -482,6 +482,8 @@ typedef struct H5O_storage_virtual_t { hsize_t min_dims[H5S_MAX_RANK]; /* Minimum extent of VDS (maximum of all non-unlimited selection bounds) */ H5D_vds_view_t view; /* Method for calculating the extent of the virtual dataset with unlimited selections */ hsize_t printf_gap; /* Maximum number of sequential missing source datasets before terminating the search for more */ + hid_t source_fapl; /* FAPL to use to open source files */ + hid_t source_dapl; /* DAPL to use to open source datasets */ hbool_t init; /* Whether all information has been completely initialized */ } H5O_storage_virtual_t; diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 1e2b91e..a900eb0 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -57,7 +57,7 @@ #define H5D_DEF_STORAGE_CONTIG_INIT {HADDR_UNDEF, (hsize_t)0} #define H5D_DEF_STORAGE_CHUNK_INIT {H5D_CHUNK_IDX_BTREE, HADDR_UNDEF, NULL, {{HADDR_UNDEF, NULL}}} #define H5D_DEF_LAYOUT_CHUNK_INIT {(unsigned)0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, (uint32_t)0, (hsize_t)0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}} -#define H5D_DEF_STORAGE_VIRTUAL_INIT {{HADDR_UNDEF, 0}, 0, NULL, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, H5D_VDS_ERROR, HSIZE_UNDEF, FALSE} +#define H5D_DEF_STORAGE_VIRTUAL_INIT {{HADDR_UNDEF, 0}, 0, NULL, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, H5D_VDS_ERROR, HSIZE_UNDEF, -1, -1, FALSE} #ifdef H5_HAVE_C99_DESIGNATED_INITIALIZER #define H5D_DEF_STORAGE_COMPACT {H5D_COMPACT, { .compact = H5D_DEF_STORAGE_COMPACT_INIT }} #define H5D_DEF_STORAGE_CONTIG {H5D_CONTIGUOUS, { .contig = H5D_DEF_STORAGE_CONTIG_INIT }} diff --git a/src/H5Shyper.c b/src/H5Shyper.c index baeeec2..f0879b6 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -9638,7 +9638,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S__hyper_subtract (H5S_t *space, H5S_t *subtract_space) +H5S__hyper_subtract(H5S_t *space, H5S_t *subtract_space) { H5S_hyper_span_info_t *a_not_b = NULL; /* Span tree for hyperslab spans in old span tree and not in new span tree */ H5S_hyper_span_info_t *a_and_b = NULL; /* Span tree for hyperslab spans in both old and new span trees */ diff --git a/test/tselect.c b/test/tselect.c index 7e142f3..a665cf2 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -13432,8 +13432,9 @@ test_hyper_unlim(void) //VDSINC write test saving unlim selection to file as region reference //VDSINC write tests for more general AND/NOTA/NOTB operations with - //unlimited selections. Also return values from H5Sget_select_npoints and - // H5Shyper_get_select_nblocks for unlimited selections + //unlimited selections. Also return values from H5Sget_select_npoints, + //H5Shyper_get_select_nblocks, and H5Sget_select_bounds for unlimited + //selections /* Close the dataspace */ ret = H5Sclose(sid); -- cgit v0.12 From 5af1fa67c4d2fa233f4afee0b11bb684210f76ac Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 30 Jun 2015 12:58:57 -0500 Subject: [svn-r27300] Add h5repack and h5diff VDS tests --- tools/h5diff/testh5diff.sh.in | 210 ++++++++++++++++++++++++------------------ tools/h5repack/h5repack.sh.in | 197 +++++++++++++++++++++++---------------- 2 files changed, 240 insertions(+), 167 deletions(-) diff --git a/tools/h5diff/testh5diff.sh.in b/tools/h5diff/testh5diff.sh.in index 3be0b80..66185ed 100644 --- a/tools/h5diff/testh5diff.sh.in +++ b/tools/h5diff/testh5diff.sh.in @@ -120,6 +120,29 @@ $SRC_H5DIFF_TESTFILES/h5diff_attr_v_level2.h5 $SRC_H5DIFF_TESTFILES/h5diff_enum_invalid_values.h5 $SRC_H5DIFF_TESTFILES/non_comparables1.h5 $SRC_H5DIFF_TESTFILES/non_comparables2.h5 +$SRC_TOOLS_TESTFILES/vds/1_a.h5 +$SRC_TOOLS_TESTFILES/vds/1_b.h5 +$SRC_TOOLS_TESTFILES/1_c.h5 +$SRC_TOOLS_TESTFILES/1_d.h5 +$SRC_TOOLS_TESTFILES/1_e.h5 +$SRC_TOOLS_TESTFILES/vds/1_f.h5 +$SRC_TOOLS_TESTFILES/vds/1_vds.h5 +$SRC_TOOLS_TESTFILES/vds/2_a.h5 +$SRC_TOOLS_TESTFILES/vds/2_b.h5 +$SRC_TOOLS_TESTFILES/vds/2_c.h5 +$SRC_TOOLS_TESTFILES/vds/2_d.h5 +$SRC_TOOLS_TESTFILES/vds/2_e.h5 +$SRC_TOOLS_TESTFILES/vds/2_vds.h5 +$SRC_TOOLS_TESTFILES/vds/3_1_vds.h5 +$SRC_TOOLS_TESTFILES/vds/3_2_vds.h5 +$SRC_TOOLS_TESTFILES/vds/4_0.h5 +$SRC_TOOLS_TESTFILES/vds/4_1.h5 +$SRC_TOOLS_TESTFILES/vds/4_2.h5 +$SRC_TOOLS_TESTFILES/vds/4_vds.h5 +$SRC_TOOLS_TESTFILES/vds/5_a.h5 +$SRC_TOOLS_TESTFILES/vds/5_b.h5 +$SRC_TOOLS_TESTFILES/vds/5_c.h5 +$SRC_TOOLS_TESTFILES/vds/5_vds.h5 " LIST_OTHER_TEST_FILES=" @@ -331,10 +354,10 @@ COPY_TESTFILES_TO_TESTDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR + $CP -f $tstfile $TESTDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." - + # Comment out this to CREATE expected file exit $EXIT_FAILURE fi @@ -362,23 +385,23 @@ CLEAN_TESTFILES_AND_TESTDIR() while [ $# -gt 0 ]; do case "$1" in -p) # reset the tool name and bin to run ph5diff tests - TESTNAME=ph5diff - H5DIFF=ph5diff # The tool name - H5DIFF_BIN=`pwd`/$H5DIFF - pmode=yes - shift - ;; + TESTNAME=ph5diff + H5DIFF=ph5diff # The tool name + H5DIFF_BIN=`pwd`/$H5DIFF + pmode=yes + shift + ;; -h) # print help page - echo "$0 [-p] [-h]" - echo " -p run ph5diff tests" - echo " -h print help page" - shift - exit 0 - ;; + echo "$0 [-p] [-h]" + echo " -p run ph5diff tests" + echo " -h print help page" + shift + exit 0 + ;; *) # unknown option echo "$0: Unknown option ($1)" - exit 1 - ;; + exit 1 + ;; esac done @@ -429,11 +452,11 @@ TOOLTEST() { # Run test. TESTING $H5DIFF $@ ( - #echo "#############################" - #echo "Expected output for '$H5DIFF $@'" - #echo "#############################" - cd $TESTDIR - eval $RUNCMD $H5DIFF_BIN "$@" + #echo "#############################" + #echo "Expected output for '$H5DIFF $@'" + #echo "#############################" + cd $TESTDIR + eval $RUNCMD $H5DIFF_BIN "$@" ) >$actual 2>$actual_err EXIT_CODE=$? # save actual and actual_err in case they are needed later. @@ -442,9 +465,9 @@ TOOLTEST() { cp $actual_err $actual_err_sav STDERR_FILTER $actual_err cat $actual_err >> $actual - # don't add exit code check in pmode, as it causes failure. (exit code + # don't add exit code check in pmode, as it causes failure. (exit code # is from mpirun not tool) - # if any problem occurs relate to an exit code, it will be caught in + # if any problem occurs relate to an exit code, it will be caught in # serial mode, so the test is fullfilled. if test $h5haveexitcode = 'yes' -a -z "$pmode"; then echo "EXIT CODE: $EXIT_CODE" >> $actual @@ -462,7 +485,7 @@ TOOLTEST() { nerrors="`expr $nerrors + 1`" test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' else - # parallel mode output are often of different ordering from serial + # parallel mode output are often of different ordering from serial # output. If the sorted expected and actual files compare the same, # it is safe to assume the actual output match the expected file. expect_sorted=expect_sorted @@ -473,44 +496,44 @@ TOOLTEST() { # is done by serial mode. grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit mv $expect_sorted.noexit $expect_sorted - if $CMP $expect_sorted $actual_sorted; then - echo " PASSED" - else - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - if test yes = "$verbose"; then - echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)" - $DIFF $expect_sorted $actual_sorted |sed 's/^/ /' - echo "====The actual output ($actual_sav)" - sed 's/^/ /' < $actual_sav - echo "====The actual stderr ($actual_err_sav)" - sed 's/^/ /' < $actual_err_sav - echo "====End of actual stderr ($actual_err_sav)" - echo "" - fi - fi + if $CMP $expect_sorted $actual_sorted; then + echo " PASSED" + else + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + if test yes = "$verbose"; then + echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)" + $DIFF $expect_sorted $actual_sorted |sed 's/^/ /' + echo "====The actual output ($actual_sav)" + sed 's/^/ /' < $actual_sav + echo "====The actual stderr ($actual_err_sav)" + sed 's/^/ /' < $actual_err_sav + echo "====End of actual stderr ($actual_err_sav)" + echo "" + fi + fi fi # Clean up output file if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav - rm -f $actual_sorted $expect_sorted + rm -f $actual $actual_err $actual_sav $actual_err_sav + rm -f $actual_sorted $expect_sorted fi } # Print a "SKIP" message SKIP() { - TESTING $H5DIFF $@ - echo " -SKIP-" + TESTING $H5DIFF $@ + echo " -SKIP-" } ############################################################################## -# The tests +# The tests # To avoid the printing of the complete full path of the test file, that hides -# all the other parameters for long paths, the printing of the command line +# all the other parameters for long paths, the printing of the command line # is done first in # TESTING with the name only of the test file $TOOL, not its full path $TESTFILE ############################################################################## @@ -525,13 +548,13 @@ COPY_TESTFILES_TO_TESTDIR TOOLTEST h5diff_10.txt -h # 1.1 normal mode -TOOLTEST h5diff_11.txt h5diff_basic1.h5 h5diff_basic2.h5 +TOOLTEST h5diff_11.txt h5diff_basic1.h5 h5diff_basic2.h5 # 1.2 normal mode with objects TOOLTEST h5diff_12.txt h5diff_basic1.h5 h5diff_basic2.h5 g1/dset1 g1/dset2 # 1.3 report mode -TOOLTEST h5diff_13.txt -r h5diff_basic1.h5 h5diff_basic2.h5 +TOOLTEST h5diff_13.txt -r h5diff_basic1.h5 h5diff_basic2.h5 # 1.4 report mode with objects TOOLTEST h5diff_14.txt -r h5diff_basic1.h5 h5diff_basic2.h5 g1/dset1 g1/dset2 @@ -549,7 +572,7 @@ TOOLTEST h5diff_16_2.txt --verbose --relative=0.02 h5diff_basic1.h5 h5diff_basic TOOLTEST h5diff_16_3.txt -v -p 0.02 h5diff_basic1.h5 h5diff_basic1.h5 g1/dset9 g1/dset10 # 1.7 verbose mode -TOOLTEST h5diff_17.txt -v h5diff_basic1.h5 h5diff_basic2.h5 +TOOLTEST h5diff_17.txt -v h5diff_basic1.h5 h5diff_basic2.h5 # 1.7 test 32-bit INFINITY TOOLTEST h5diff_171.txt -v h5diff_basic1.h5 h5diff_basic1.h5 /g1/fp19 /g1/fp19_COPY @@ -557,8 +580,8 @@ TOOLTEST h5diff_171.txt -v h5diff_basic1.h5 h5diff_basic1.h5 /g1/fp19 /g1/fp19_C # 1.7 test 64-bit INFINITY TOOLTEST h5diff_172.txt -v h5diff_basic1.h5 h5diff_basic1.h5 /g1/fp20 /g1/fp20_COPY -# 1.8 quiet mode -TOOLTEST h5diff_18.txt -q h5diff_basic1.h5 h5diff_basic2.h5 +# 1.8 quiet mode +TOOLTEST h5diff_18.txt -q h5diff_basic1.h5 h5diff_basic2.h5 # 1.8 -v and -q TOOLTEST h5diff_18_1.txt -v -q h5diff_basic1.h5 h5diff_basic2.h5 @@ -588,7 +611,7 @@ TOOLTEST h5diff_23.txt -v h5diff_types.h5 h5diff_types.h5 g1 g1 TOOLTEST h5diff_24.txt -v h5diff_types.h5 h5diff_types.h5 t1 t1 # 2.5 -TOOLTEST h5diff_25.txt -v h5diff_types.h5 h5diff_types.h5 l1 l1 +TOOLTEST h5diff_25.txt -v h5diff_types.h5 h5diff_types.h5 l1 l1 # 2.6 TOOLTEST h5diff_26.txt -v h5diff_types.h5 h5diff_types.h5 g1 g2 @@ -642,7 +665,7 @@ TOOLTEST h5diff_57.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset7a dset7b # 5.8 (region reference) TOOLTEST h5diff_58.txt -v h5diff_dset1.h5 h5diff_dset2.h5 refreg -# test for both dset and attr with same type but with different size +# test for both dset and attr with same type but with different size # ( HDDFV-7942 ) TOOLTEST h5diff_59.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset11a dset11b @@ -652,14 +675,14 @@ TOOLTEST h5diff_59.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset11a dset11b # 6.0: Check if the command line number of arguments is less than 3 -TOOLTEST h5diff_600.txt h5diff_basic1.h5 +TOOLTEST h5diff_600.txt h5diff_basic1.h5 -# 6.1: Check if non-exist object name is specified +# 6.1: Check if non-exist object name is specified TOOLTEST h5diff_601.txt h5diff_basic1.h5 h5diff_basic1.h5 nono_obj # ############################################################################## -# # -d +# # -d # ############################################################################## @@ -678,7 +701,7 @@ TOOLTEST h5diff_606.txt -d 0x1 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dse # 6.7: string TOOLTEST h5diff_607.txt -d "1" h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 -# 6.8: use system epsilon +# 6.8: use system epsilon TOOLTEST h5diff_608.txt --use-system-epsilon h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 # 6.9: number larger than biggest difference @@ -762,7 +785,7 @@ TOOLTEST h5diff_631.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h # ############################################################################## # 7. attributes # ############################################################################## -TOOLTEST h5diff_70.txt -v h5diff_attr1.h5 h5diff_attr2.h5 +TOOLTEST h5diff_70.txt -v h5diff_attr1.h5 h5diff_attr2.h5 # temporary test to verify HDF5-8625 TOOLTEST h5diff_tmp1.txt tmptest2.he5 tmptest.he5 # temporary test to verify HDF5-8639 @@ -772,10 +795,10 @@ TOOLTEST h5diff_tmp2.txt tmpSingleSiteBethe.output.h5 tmpSingleSiteBethe.referen # attrs with verbose option level # ################################################## -TOOLTEST h5diff_700.txt -v1 h5diff_attr1.h5 h5diff_attr2.h5 -TOOLTEST h5diff_701.txt -v2 h5diff_attr1.h5 h5diff_attr2.h5 -TOOLTEST h5diff_702.txt --verbose=1 h5diff_attr1.h5 h5diff_attr2.h5 -TOOLTEST h5diff_703.txt --verbose=2 h5diff_attr1.h5 h5diff_attr2.h5 +TOOLTEST h5diff_700.txt -v1 h5diff_attr1.h5 h5diff_attr2.h5 +TOOLTEST h5diff_701.txt -v2 h5diff_attr1.h5 h5diff_attr2.h5 +TOOLTEST h5diff_702.txt --verbose=1 h5diff_attr1.h5 h5diff_attr2.h5 +TOOLTEST h5diff_703.txt --verbose=2 h5diff_attr1.h5 h5diff_attr2.h5 # same attr number , all same attr name TOOLTEST h5diff_704.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /g @@ -789,7 +812,7 @@ TOOLTEST h5diff_706.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /nty # different attr number , same attr name (intersected) TOOLTEST h5diff_707.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /g2 -# different attr number , all different attr name +# different attr number , all different attr name TOOLTEST h5diff_708.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /g3 # when no attributes exist in both objects @@ -801,32 +824,32 @@ TOOLTEST h5diff_710.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 # ############################################################################## # 8. all dataset datatypes # ############################################################################## -TOOLTEST h5diff_80.txt -v h5diff_dset1.h5 h5diff_dset2.h5 +TOOLTEST h5diff_80.txt -v h5diff_dset1.h5 h5diff_dset2.h5 # 9. compare a file with itself TOOLTEST h5diff_90.txt -v h5diff_basic2.h5 h5diff_basic2.h5 # 10. read by hyperslab, print indexes -TOOLTEST h5diff_100.txt -v h5diff_hyper1.h5 h5diff_hyper2.h5 +TOOLTEST h5diff_100.txt -v h5diff_hyper1.h5 h5diff_hyper2.h5 # 11. floating point comparison # double value -TOOLTEST h5diff_101.txt -v h5diff_basic1.h5 h5diff_basic1.h5 g1/d1 g1/d2 +TOOLTEST h5diff_101.txt -v h5diff_basic1.h5 h5diff_basic1.h5 g1/d1 g1/d2 # float value -TOOLTEST h5diff_102.txt -v h5diff_basic1.h5 h5diff_basic1.h5 g1/fp1 g1/fp2 +TOOLTEST h5diff_102.txt -v h5diff_basic1.h5 h5diff_basic1.h5 g1/fp1 g1/fp2 -# with --use-system-epsilon for double value -TOOLTEST h5diff_103.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h5 g1/d1 g1/d2 +# with --use-system-epsilon for double value +TOOLTEST h5diff_103.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h5 g1/d1 g1/d2 # with --use-system-epsilon for float value -TOOLTEST h5diff_104.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h5 g1/fp1 g1/fp2 +TOOLTEST h5diff_104.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h5 g1/fp1 g1/fp2 # not comparable -c flag -TOOLTEST h5diff_200.txt h5diff_basic2.h5 h5diff_basic2.h5 g2/dset1 g2/dset2 +TOOLTEST h5diff_200.txt h5diff_basic2.h5 h5diff_basic2.h5 g2/dset1 g2/dset2 -TOOLTEST h5diff_201.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset1 g2/dset2 +TOOLTEST h5diff_201.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset1 g2/dset2 TOOLTEST h5diff_202.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset2 g2/dset3 @@ -842,9 +865,9 @@ TOOLTEST h5diff_206.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset7 g2/dset8 TOOLTEST h5diff_207.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset8 g2/dset9 # not comparable in dataspace of zero dimension size -TOOLTEST h5diff_208.txt -c h5diff_dset_zero_dim_size1.h5 h5diff_dset_zero_dim_size2.h5 +TOOLTEST h5diff_208.txt -c h5diff_dset_zero_dim_size1.h5 h5diff_dset_zero_dim_size2.h5 -# non-comparable dataset with comparable attribute, and other comparable datasets. +# non-comparable dataset with comparable attribute, and other comparable datasets. # Also test non-compatible attributes with different type, dimention, rank. # All the comparables should display differences. TOOLTEST h5diff_220.txt -c non_comparables1.h5 non_comparables2.h5 /g1 @@ -862,7 +885,7 @@ TOOLTEST h5diff_222.txt -c non_comparables1.h5 non_comparables2.h5 TOOLTEST h5diff_223.txt -c non_comparables1.h5 non_comparables2.h5 /diffobjtypes # swap files TOOLTEST h5diff_224.txt -c non_comparables2.h5 non_comparables1.h5 /diffobjtypes - + # ############################################################################## # # Links compare without --follow-symlinks nor --no-dangling-links # ############################################################################## @@ -958,28 +981,28 @@ TOOLTEST h5diff_425.txt --follow-symlinks -v h5diff_ext2softlink_src.h5 h5diff_e TOOLTEST h5diff_450.txt --follow-symlinks -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 # dangling links --follow-symlinks and --no-dangling-links (FILE to FILE) -TOOLTEST h5diff_451.txt --follow-symlinks -v --no-dangling-links h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 +TOOLTEST h5diff_451.txt --follow-symlinks -v --no-dangling-links h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 # try --no-dangling-links without --follow-symlinks options TOOLTEST h5diff_452.txt --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5 # dangling link found for soft links (FILE to FILE) -TOOLTEST h5diff_453.txt --follow-symlinks -v --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5 +TOOLTEST h5diff_453.txt --follow-symlinks -v --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5 # dangling link found for soft links (obj to obj) -TOOLTEST h5diff_454.txt --follow-symlinks -v --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_dset2 /softlink_noexist +TOOLTEST h5diff_454.txt --follow-symlinks -v --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_dset2 /softlink_noexist # dangling link found for soft links (obj to obj) Both dangle links -TOOLTEST h5diff_455.txt --follow-symlinks -v --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_noexist /softlink_noexist +TOOLTEST h5diff_455.txt --follow-symlinks -v --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_noexist /softlink_noexist # dangling link found for ext links (FILE to FILE) -TOOLTEST h5diff_456.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 +TOOLTEST h5diff_456.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 # dangling link found for ext links (obj to obj). target file exist -TOOLTEST h5diff_457.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset1 /ext_link_noexist1 +TOOLTEST h5diff_457.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset1 /ext_link_noexist1 # dangling link found for ext links (obj to obj). target file NOT exist -TOOLTEST h5diff_458.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset1 /ext_link_noexist2 +TOOLTEST h5diff_458.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset1 /ext_link_noexist2 # dangling link found for ext links (obj to obj). Both dangle links TOOLTEST h5diff_459.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_noexist1 /ext_link_noexist2 @@ -993,14 +1016,14 @@ TOOLTEST h5diff_466.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_dangl # soft link vs. soft dangling TOOLTEST h5diff_467.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link2 # ext dangling vs. ext dangling -TOOLTEST h5diff_468.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4 +TOOLTEST h5diff_468.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4 # ext link vs. ext dangling TOOLTEST h5diff_469.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link2 #---------------------------------------- -# dangling links without follow symlink +# dangling links without follow symlink # (HDFFV-7998) -# test - soft dangle links (same and different paths), +# test - soft dangle links (same and different paths), # - external dangle links (same and different paths) TOOLTEST h5diff_471.txt -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 TOOLTEST h5diff_472.txt -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1 @@ -1011,7 +1034,7 @@ TOOLTEST h5diff_475.txt -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_li # ############################################################################## # # test for group diff recursivly # ############################################################################## -# root +# root TOOLTEST h5diff_500.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 / / TOOLTEST h5diff_501.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 / / @@ -1045,7 +1068,7 @@ TOOLTEST h5diff_513.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /slink_ TOOLTEST h5diff_514.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /slink_grp10 /slink_grp11 ############################################################################### -# Test for group recursive diff via multi-linked external links +# Test for group recursive diff via multi-linked external links # With follow-symlinks, file h5diff_grp_recurse_ext1.h5 and h5diff_grp_recurse_ext2-1.h5 should # be same with the external links. ############################################################################### @@ -1068,7 +1091,7 @@ TOOLTEST h5diff_480.txt -v --exclude-path /group1/dset3 h5diff_exclude1-1.h5 h5d TOOLTEST h5diff_481.txt -v h5diff_exclude1-1.h5 h5diff_exclude1-2.h5 # -# Different structure, different names. +# Different structure, different names. # # Exclude all the different objects. Expect return - same TOOLTEST h5diff_482.txt -v --exclude-path "/group1" --exclude-path "/dset1" h5diff_exclude2-1.h5 h5diff_exclude2-2.h5 @@ -1099,9 +1122,9 @@ TOOLTEST h5diff_530.txt -v h5diff_comp_vl_strs.h5 h5diff_comp_vl_strs.h5 /group TOOLTEST h5diff_540.txt -v compounds_array_vlen1.h5 compounds_array_vlen2.h5 # ############################################################################## -# # Test mutually exclusive options +# # Test mutually exclusive options # ############################################################################## -# Test with -d , -p and --use-system-epsilon. +# Test with -d , -p and --use-system-epsilon. TOOLTEST h5diff_640.txt -v -d 5 -p 0.05 --use-system-epsilon h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 TOOLTEST h5diff_641.txt -v -d 5 -p 0.05 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 TOOLTEST h5diff_642.txt -v -p 0.05 -d 5 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 @@ -1110,6 +1133,13 @@ TOOLTEST h5diff_644.txt -v --use-system-epsilon -d 5 h5diff_basic1.h5 h5diff_bas TOOLTEST h5diff_645.txt -v -p 0.05 --use-system-epsilon h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 TOOLTEST h5diff_646.txt -v --use-system-epsilon -p 0.05 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 +# ############################################################################## +# VDS tests +# ############################################################################## +TOOLTEST h5diff_v1.txt -v 1_vds.h5 2_vds.h5 +TOOLTEST h5diff_v2.txt -r 1_vds.h5 2_vds.h5 +TOOLTEST h5diff_v3.txt -c 1_vds.h5 2_vds.h5 + # ############################################################################## # # END diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index 4a32491..e91883b 100644 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -18,7 +18,7 @@ # Modification: # Pedro Vicente Nunes, 11/15/2006 # Added $FILEN variables for file names -# +# srcdir=@srcdir@ @@ -32,7 +32,7 @@ EXIT_FAILURE=1 H5REPACK=h5repack # The tool name H5REPACK_BIN=`pwd`/$H5REPACK # The path of the tool binary -H5DIFF=../h5diff/h5diff # The h5diff tool name +H5DIFF=../h5diff/h5diff # The h5diff tool name H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary H5DUMP=../h5dump/h5dump # The h5dump tool name @@ -45,8 +45,8 @@ DIRNAME='dirname' LS='ls' AWK='awk' -H5DETECTSZIP=testh5repack_detect_szip -H5DETECTSZIP_BIN=`pwd`/$H5DETECTSZIP +H5DETECTSZIP=testh5repack_detect_szip +H5DETECTSZIP_BIN=`pwd`/$H5DETECTSZIP nerrors=0 @@ -113,6 +113,29 @@ $SRC_TOOLS_TESTFILES/tfamily00007.h5 $SRC_TOOLS_TESTFILES/tfamily00008.h5 $SRC_TOOLS_TESTFILES/tfamily00009.h5 $SRC_TOOLS_TESTFILES/tfamily00010.h5 +$SRC_TOOLS_TESTFILES/vds/1_a.h5 +$SRC_TOOLS_TESTFILES/vds/1_b.h5 +$SRC_TOOLS_TESTFILES/1_c.h5 +$SRC_TOOLS_TESTFILES/1_d.h5 +$SRC_TOOLS_TESTFILES/1_e.h5 +$SRC_TOOLS_TESTFILES/vds/1_f.h5 +$SRC_TOOLS_TESTFILES/vds/1_vds.h5 +$SRC_TOOLS_TESTFILES/vds/2_a.h5 +$SRC_TOOLS_TESTFILES/vds/2_b.h5 +$SRC_TOOLS_TESTFILES/vds/2_c.h5 +$SRC_TOOLS_TESTFILES/vds/2_d.h5 +$SRC_TOOLS_TESTFILES/vds/2_e.h5 +$SRC_TOOLS_TESTFILES/vds/2_vds.h5 +$SRC_TOOLS_TESTFILES/vds/3_1_vds.h5 +$SRC_TOOLS_TESTFILES/vds/3_2_vds.h5 +$SRC_TOOLS_TESTFILES/vds/4_0.h5 +$SRC_TOOLS_TESTFILES/vds/4_1.h5 +$SRC_TOOLS_TESTFILES/vds/4_2.h5 +$SRC_TOOLS_TESTFILES/vds/4_vds.h5 +$SRC_TOOLS_TESTFILES/vds/5_a.h5 +$SRC_TOOLS_TESTFILES/vds/5_b.h5 +$SRC_TOOLS_TESTFILES/vds/5_c.h5 +$SRC_TOOLS_TESTFILES/vds/5_vds.h5 " LIST_OTHER_TEST_FILES=" @@ -148,10 +171,10 @@ COPY_TESTFILES_TO_TESTDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR + $CP -f $tstfile $TESTDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." - + # Comment out this to CREATE expected file exit $EXIT_FAILURE fi @@ -203,12 +226,12 @@ SKIP() { # Call the h5diff tool # -DIFFTEST() +DIFFTEST() { VERIFY h5diff output $@ ( cd $TESTDIR - $RUNSERIAL $H5DIFF_BIN -q "$@" + $RUNSERIAL $H5DIFF_BIN -q "$@" ) RET=$? if [ $RET != 0 ] ; then @@ -217,7 +240,7 @@ DIFFTEST() else echo " PASSED" fi - + } # Call h5repack @@ -225,7 +248,7 @@ DIFFTEST() # call TOOLTEST_MAIN and delete $output file -TOOLTEST() +TOOLTEST() { echo $@ infile=$2 @@ -251,7 +274,7 @@ TOOLTEST() } #------------------------------------------ -# Verifying layouts of a dataset +# Verifying layouts of a dataset VERIFY_LAYOUT_DSET() { layoutfile=layout-$1.$2 @@ -263,9 +286,9 @@ VERIFY_LAYOUT_DSET() shift shift shift - + TESTING $H5REPACK $@ - ( + ( cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) @@ -277,7 +300,7 @@ VERIFY_LAYOUT_DSET() echo " PASSED" DIFFTEST $infile $outfile fi - + #--------------------------------- # check the layout from a dataset VERIFY "a dataset layout" @@ -309,9 +332,9 @@ VERIFY_LAYOUT_ALL() shift shift shift - + TESTING $H5REPACK $@ - ( + ( cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) @@ -323,8 +346,8 @@ VERIFY_LAYOUT_ALL() echo " PASSED" DIFFTEST $infile $outfile fi - - + + #--------------------------------- # check the layout from a dataset # check if the other layouts still exsit @@ -351,7 +374,7 @@ VERIFY_LAYOUT_ALL() echo " PASSED" fi fi - else + else # if COMPACT if [ $expectlayout = "COMPACT" ]; then TESTING $H5DUMP_BIN -pH $outfile @@ -403,7 +426,7 @@ VERIFY_LAYOUT_ALL() # same as TOOLTEST, but it uses the old syntax -i input_file -o output_file # -TOOLTEST0() +TOOLTEST0() { infile=$2 outfile=out-$1.$2 @@ -431,7 +454,7 @@ TOOLTEST0() # same as TOOLTEST, but it uses without -i -o options # used to test the family driver, where these files reside # -TOOLTEST1() +TOOLTEST1() { infile=$2 outfile=out-$1.$2 @@ -446,19 +469,19 @@ TOOLTEST1() ) RET=$? if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" else - echo " PASSED" - DIFFTEST $infile $outfile + echo " PASSED" + DIFFTEST $infile $outfile fi rm -f $outfile } - + # This is same as TOOLTEST() with comparing display output # from -v option # -TOOLTESTV() +TOOLTESTV() { expect="$TESTDIR/$2.tst" actual="$TESTDIR/`basename $2 .ddl`.out" @@ -468,7 +491,7 @@ TOOLTESTV() outfile=out-$1.$2 shift shift - + # Run test. TESTING $H5REPACK $@ ( @@ -477,11 +500,11 @@ TOOLTESTV() ) >$actual 2>$actual_err RET=$? if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" else - echo " PASSED" - DIFFTEST $infile $outfile + echo " PASSED" + DIFFTEST $infile $outfile fi # display output compare @@ -497,15 +520,15 @@ TOOLTESTV() nerrors="`expr $nerrors + 1`" test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /' fi - + rm -f $actual $actual_err rm -f $outfile } - + # This is same as TOOLTESTV() with comparing h5dump output # from -pH option # -TOOLTEST_DUMP() +TOOLTEST_DUMP() { infile=$2 outfile=out-$1.$2 @@ -515,7 +538,7 @@ TOOLTEST_DUMP() shift shift - + # Run test. TESTING $H5REPACK $@ ( @@ -531,12 +554,12 @@ TOOLTEST_DUMP() VERIFY h5dump output $@ ( cd $TESTDIR - $RUNSERIAL $H5DUMP_BIN -pH $outfile + $RUNSERIAL $H5DUMP_BIN -pH $outfile ) >$actual 2>$actual_err cat $actual_err >> $actual RET=$? - + fi if cmp -s $expect $actual; then @@ -547,7 +570,7 @@ TOOLTEST_DUMP() nerrors="`expr $nerrors + 1`" test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /' fi - + rm -f $actual $actual_err rm -f $outfile } @@ -611,14 +634,14 @@ TOOLTEST_META() # verify sizes. MESSAGE "Verify the sizes of both output files ($size1 vs $size2)" if [ $size1 -lt $size2 ]; then - # pass - echo " PASSED" + # pass + echo " PASSED" else - #fail - echo "*FAILED*" + #fail + echo "*FAILED*" nerrors="`expr $nerrors + 1`" fi - + rm -f $outfile } # ADD_HELP_TEST @@ -648,7 +671,7 @@ TOOLTEST_HELP() { echo " Expected output (*.txt) differs from actual output (*.out)" nerrors="`expr $nerrors + 1`" fi - + # Clean up output file if test -z "$HDF5_NOCLEANUP"; then rm -f $actual $actual_err @@ -674,28 +697,28 @@ STDOUT_FILTER() { # Each run generates ".out.h5" and the tool h5diff is used to # compare the input and output files # -# the tests are the same as the program h5repacktst, but run from the CLI +# the tests are the same as the program h5repacktst, but run from the CLI # # See which filters are usable (and skip tests for filters we # don't have). Do this by searching H5pubconf.h to see which # filters are defined. -# detect whether the encoder is present. +# detect whether the encoder is present. USE_FILTER_SZIP_ENCODER="no"; if test $USE_FILTER_SZIP = "yes"; then USE_FILTER_SZIP_ENCODER=`$RUNSERIAL $H5DETECTSZIP_BIN` fi ############################################################################## -### T H E T E S T S +### T H E T E S T S ############################################################################## # prepare for test COPY_TESTFILES_TO_TESTDIR TOOLTEST_HELP h5repack-help.txt -h -# copy files (these files have no filters) +# copy files (these files have no filters) TOOLTEST fill h5repack_fill.h5 TOOLTEST objs h5repack_objs.h5 TOOLTEST attr h5repack_attr.h5 @@ -719,8 +742,8 @@ if test $USE_FILTER_DEFLATE != "yes" ; then else TOOLTEST gzip_individual $arg fi - -# gzip for all + +# gzip for all arg="h5repack_layout.h5 -f GZIP=1" if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg @@ -733,7 +756,7 @@ arg="h5repack_layout.h5 -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10" if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then SKIP $arg else - TOOLTEST szip_individual $arg + TOOLTEST szip_individual $arg fi # szip for all @@ -741,18 +764,18 @@ arg="h5repack_layout.h5 -f SZIP=8,NN" if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then SKIP $arg else - TOOLTEST szip_all $arg + TOOLTEST szip_all $arg fi # shuffle with individual object arg="h5repack_layout.h5 -f dset2:SHUF -l dset2:CHUNK=20x10" -TOOLTEST shuffle_individual $arg - +TOOLTEST shuffle_individual $arg + # shuffle for all arg="h5repack_layout.h5 -f SHUF" TOOLTEST shuffle_all $arg - + # fletcher32 with individual object arg="h5repack_layout.h5 -f dset2:FLET -l dset2:CHUNK=20x10" TOOLTEST fletcher_individual $arg @@ -777,7 +800,7 @@ else # compare output TOOLTESTV gzip_verbose_filters $arg fi - + ########################################################### # the following tests assume the input files have filters ########################################################### @@ -789,7 +812,7 @@ if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then else TOOLTEST szip_copy $arg fi - + # szip remove arg="h5repack_szip.h5 --filter=dset_szip:NONE" if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then @@ -797,7 +820,7 @@ if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then else TOOLTEST szip_remove $arg fi - + # deflate copy arg="h5repack_deflate.h5" if test $USE_FILTER_DEFLATE != "yes" ; then @@ -813,7 +836,7 @@ if test $USE_FILTER_DEFLATE != "yes" ; then else TOOLTEST deflate_remove $arg fi - + # shuffle copy arg="h5repack_shuffle.h5" TOOLTEST shuffle_copy $arg @@ -868,14 +891,14 @@ arg="h5repack_deflate.h5 -f dset_deflate:SZIP=8,NN" if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else - TOOLTEST deflate_convert $arg + TOOLTEST deflate_convert $arg fi arg="h5repack_szip.h5 -f dset_szip:GZIP=1" if test $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else - TOOLTEST szip_convert $arg + TOOLTEST szip_convert $arg fi @@ -890,9 +913,9 @@ fi #file arg="h5repack_layout.h5 -e h5repack.info" if test $USE_FILTER_DEFLATE != "yes" ; then - SKIP $arg + SKIP $arg else - TOOLTEST deflate_file $arg + TOOLTEST deflate_file $arg fi ######################################################### @@ -937,18 +960,18 @@ VERIFY_LAYOUT_DSET contig_small_compa h5repack_layout2.h5 contig_small COMPACT - VERIFY_LAYOUT_DSET contig_small_fixed_compa h5repack_layout2.h5 chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA -#--------------------------------------------------------------------------- -# Test file contains chunked datasets (need multiple dsets) with +#--------------------------------------------------------------------------- +# Test file contains chunked datasets (need multiple dsets) with # unlimited max dims. (HDFFV-7933) # Use first dset to test. #--------------------------------------------------------------------------- # chunk to chunk - specify chunk dim bigger than any current dim VERIFY_LAYOUT_DSET chunk2chunk h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300 -# chunk to contiguous +# chunk to contiguous VERIFY_LAYOUT_DSET chunk2conti h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI -# chunk to compact - convert big dataset (should be > 64k) for this purpose, +# chunk to compact - convert big dataset (should be > 64k) for this purpose, # should remain as original layout (chunk) VERIFY_LAYOUT_DSET chunk2compa h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA @@ -956,7 +979,7 @@ VERIFY_LAYOUT_DSET chunk2compa h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk # Test -f for some specific cases. Chunked dataset with unlimited max dims. # (HDFFV-8012) #-------------------------------------------------------------------------- -# - should not fail +# - should not fail # - should not change max dims from unlimit # chunk dim is bigger than dataset dim. ( dset size < 64k ) @@ -972,14 +995,14 @@ VERIFY_LAYOUT_DSET error3 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f ch TOOLTEST error4 h5repack_layout3.h5 -f NONE #-------------------------------------------------------------------------- -# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset +# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset # (dset size < 64K) and with unlimited max dims on a condition as follow. # (HDFFV-8214) #-------------------------------------------------------------------------- # chunk dim is bigger than dataset dim. should succeed. VERIFY_LAYOUT_DSET ckdim_biger h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI -# chunk dim is smaller than dataset dim. should succeed. +# chunk dim is smaller than dataset dim. should succeed. VERIFY_LAYOUT_DSET ckdim_smaller h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI @@ -1022,7 +1045,7 @@ if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else TOOLTEST0 old_style_layout_short_switches $arg -fi +fi # add a userblock to file arg="h5repack_objs.h5 -u ublock.bin -b 2048" @@ -1049,20 +1072,40 @@ TOOLTEST1 family tfamily%05d.h5 TOOLTEST bug1814 h5repack_refs.h5 # test attribute with various references (bug1797 / HDFFV-5932) -# the references in attribute of compund or vlen datatype -TOOLTEST HDFFV-5932 h5repack_attr_refs.h5 +# the references in attribute of compund or vlen datatype +TOOLTEST HDFFV-5932 h5repack_attr_refs.h5 -# Add test for memory leak in attirbute. This test is verified by CTEST. -# 1. leak from vlen string +# Add test for memory leak in attirbute. This test is verified by CTEST. +# 1. leak from vlen string # 2. leak from compound type without reference member # (HDFFV-7840, ) # Note: this test is experimental for sharing test file among tools TOOLTEST HDFFV-7840 h5diff_attr1.h5 -# tests for metadata block size option +# tests for metadata block size option TOOLTEST_META meta_short h5repack_layout.h5 -M 8192 TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192 +# VDS tests + +######################################################### +# layout options +######################################################### +VERIFY_LAYOUT_DSET vds_dset_conti 1_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI +VERIFY_LAYOUT_ALL vds_null_conti 2_vds.h5 CONTIGUOUS -l CONTI +VERIFY_LAYOUT_DSET vds_dset_compa 1_vds.h5 vds_dset COMPACT -l vds_dset:COMPA +VERIFY_LAYOUT_ALL vds_null_compa 2_vds.h5 COMPACT -l COMPA + +################################################################ +# layout conversions +############################################################### +VERIFY_LAYOUT_DSET vds_compa_conti 4_vds.h5} vds_dset CONTIGUOUS -l vds_dset:CONTI +VERIFY_LAYOUT_DSET vds_compa_compa 4_vds.h5 vds_dset COMPACT -l vds_dset:COMPA +VERIFY_LAYOUT_DSET vds_conti_compa 4_vds.h5 vds_dset COMPACT -l vds_dset:COMPA +VERIFY_LAYOUT_DSET vds_conti_conti 4_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI +VERIFY_LAYOUT_DSET vds_compa 4_vds.h5 vds_dset COMPACT -l vds_dset:COMPA +VERIFY_LAYOUT_DSET vds_conti 4_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI + # Clean up temporary files/directories CLEAN_TESTFILES_AND_TESTDIR -- cgit v0.12 From 3dec75308acdd61e6ee44e580e69754684464c90 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 30 Jun 2015 14:52:23 -0500 Subject: [svn-r27309] switch public cdash URL --- CTestConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 7bbce4f..2104cbd 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -12,7 +12,7 @@ if (CDASH_LOCAL) set (CTEST_DROP_SITE "72.36.68.252") set (CTEST_DROP_LOCATION "/submit.php?project=HDF5Trunk") else (CDASH_LOCAL) - set (CTEST_DROP_SITE "cdash.hdfgroup.uiuc.edu") + set (CTEST_DROP_SITE "cdash.hdfgroup.org") set (CTEST_DROP_LOCATION "/submit.php?project=HDF5+Trunk") endif (CDASH_LOCAL) set (CTEST_DROP_SITE_CDASH TRUE) -- cgit v0.12 From 02d0de0452330598b0709cea595ff7dcd8f4588a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 30 Jun 2015 16:19:23 -0500 Subject: [svn-r27317] switch internal cdash URL --- CTestConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 2104cbd..7497b08 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -9,7 +9,7 @@ set (CTEST_NIGHTLY_START_TIME "18:00:00 CST") set (CTEST_DROP_METHOD "http") if (CDASH_LOCAL) - set (CTEST_DROP_SITE "72.36.68.252") + set (CTEST_DROP_SITE "10.10.10.82") set (CTEST_DROP_LOCATION "/submit.php?project=HDF5Trunk") else (CDASH_LOCAL) set (CTEST_DROP_SITE "cdash.hdfgroup.org") -- cgit v0.12 From 364c193744a84058038b54f4ae08317aee081b55 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 2 Jul 2015 09:11:55 -0500 Subject: [svn-r27321] Fixed VDS test framework to check for zlib, and fix file copy list paths --- tools/h5diff/testh5diff.sh.in | 6 +++--- tools/h5dump/CMakeTestsVDS.cmake | 41 ++++++++++++++++++++++++++++------------ tools/h5dump/testh5dumpvds.sh.in | 28 +++++++++++++++------------ tools/h5repack/h5repack.sh.in | 6 +++--- 4 files changed, 51 insertions(+), 30 deletions(-) diff --git a/tools/h5diff/testh5diff.sh.in b/tools/h5diff/testh5diff.sh.in index 66185ed..07fa7ba 100644 --- a/tools/h5diff/testh5diff.sh.in +++ b/tools/h5diff/testh5diff.sh.in @@ -122,9 +122,9 @@ $SRC_H5DIFF_TESTFILES/non_comparables1.h5 $SRC_H5DIFF_TESTFILES/non_comparables2.h5 $SRC_TOOLS_TESTFILES/vds/1_a.h5 $SRC_TOOLS_TESTFILES/vds/1_b.h5 -$SRC_TOOLS_TESTFILES/1_c.h5 -$SRC_TOOLS_TESTFILES/1_d.h5 -$SRC_TOOLS_TESTFILES/1_e.h5 +$SRC_TOOLS_TESTFILES/vds/1_c.h5 +$SRC_TOOLS_TESTFILES/vds/1_d.h5 +$SRC_TOOLS_TESTFILES/vds/1_e.h5 $SRC_TOOLS_TESTFILES/vds/1_f.h5 $SRC_TOOLS_TESTFILES/vds/1_vds.h5 $SRC_TOOLS_TESTFILES/vds/2_a.h5 diff --git a/tools/h5dump/CMakeTestsVDS.cmake b/tools/h5dump/CMakeTestsVDS.cmake index 17d923e..58287fa 100644 --- a/tools/h5dump/CMakeTestsVDS.cmake +++ b/tools/h5dump/CMakeTestsVDS.cmake @@ -204,18 +204,35 @@ set (last_VDS_test "H5DUMP_VDS-clearall-objects") endif (HDF5_ENABLE_USING_MEMCHECKER) +# See which filters are usable (and skip tests for filters we +# don't have). Do this by searching H5pubconf.h to see which +# filters are defined. + +# detect whether the encoder is present. + if (H5_HAVE_FILTER_DEFLATE) + set (USE_FILTER_DEFLATE "true") + endif (H5_HAVE_FILTER_DEFLATE) + + if (H5_HAVE_FILTER_SZIP) + set (USE_FILTER_SZIP "true") + endif (H5_HAVE_FILTER_SZIP) + # Data read - ADD_H5_VDS_TEST (tvds-1 0 --enable-error-stack 1_vds.h5) - ADD_H5_VDS_TEST (tvds-2 0 --enable-error-stack 2_vds.h5) - ADD_H5_VDS_TEST (tvds-3_1 0 --enable-error-stack 3_1_vds.h5) - ADD_H5_VDS_TEST (tvds-3_2 0 --enable-error-stack 3_2_vds.h5) - ADD_H5_VDS_TEST (tvds-4 0 --enable-error-stack 4_vds.h5) - ADD_H5_VDS_TEST (tvds-5 0 --enable-error-stack 5_vds.h5) + if (USE_FILTER_DEFLATE) + ADD_H5_VDS_TEST (tvds-1 0 --enable-error-stack 1_vds.h5) + ADD_H5_VDS_TEST (tvds-2 0 --enable-error-stack 2_vds.h5) + ADD_H5_VDS_TEST (tvds-3_1 0 --enable-error-stack 3_1_vds.h5) + ADD_H5_VDS_TEST (tvds-3_2 0 --enable-error-stack 3_2_vds.h5) + ADD_H5_VDS_TEST (tvds-4 0 --enable-error-stack 4_vds.h5) + ADD_H5_VDS_TEST (tvds-5 0 --enable-error-stack 5_vds.h5) + endif (USE_FILTER_DEFLATE) # Layout read - ADD_H5_VDS_LAYOUT (tvds_layout-1 0 --enable-error-stack 1_vds.h5) - ADD_H5_VDS_LAYOUT (tvds_layout-2 0 --enable-error-stack 2_vds.h5) - ADD_H5_VDS_LAYOUT (tvds_layout-3_1 0 --enable-error-stack 3_1_vds.h5) - ADD_H5_VDS_LAYOUT (tvds_layout-3_2 0 --enable-error-stack 3_2_vds.h5) - ADD_H5_VDS_LAYOUT (tvds_layout-4 0 --enable-error-stack 4_vds.h5) - ADD_H5_VDS_LAYOUT (tvds_layout-5 0 --enable-error-stack 5_vds.h5) + if (USE_FILTER_DEFLATE) + ADD_H5_VDS_LAYOUT (tvds_layout-1 0 --enable-error-stack 1_vds.h5) + ADD_H5_VDS_LAYOUT (tvds_layout-2 0 --enable-error-stack 2_vds.h5) + ADD_H5_VDS_LAYOUT (tvds_layout-3_1 0 --enable-error-stack 3_1_vds.h5) + ADD_H5_VDS_LAYOUT (tvds_layout-3_2 0 --enable-error-stack 3_2_vds.h5) + ADD_H5_VDS_LAYOUT (tvds_layout-4 0 --enable-error-stack 4_vds.h5) + ADD_H5_VDS_LAYOUT (tvds_layout-5 0 --enable-error-stack 5_vds.h5) + endif (USE_FILTER_DEFLATE) diff --git a/tools/h5dump/testh5dumpvds.sh.in b/tools/h5dump/testh5dumpvds.sh.in index 7a2032e..b15606f 100644 --- a/tools/h5dump/testh5dumpvds.sh.in +++ b/tools/h5dump/testh5dumpvds.sh.in @@ -473,20 +473,24 @@ COPY_TESTFILES_TO_TESTDIR ####### test for dataset vds ###### # Data read -TOOLTEST tvds-1.ddl --enable-error-stack 1_vds.h5 -TOOLTEST tvds-2.ddl --enable-error-stack 2_vds.h5 -TOOLTEST tvds-3_1.ddl --enable-error-stack 3_1_vds.h5 -TOOLTEST tvds-3_2.ddl --enable-error-stack 3_2_vds.h5 -TOOLTEST tvds-4.ddl --enable-error-stack 4_vds.h5 -TOOLTEST tvds-5.ddl --enable-error-stack 5_vds.h5 +if test $USE_FILTER_DEFLATE = "yes" ; then + TOOLTEST tvds-1.ddl --enable-error-stack 1_vds.h5 + TOOLTEST tvds-2.ddl --enable-error-stack 2_vds.h5 + TOOLTEST tvds-3_1.ddl --enable-error-stack 3_1_vds.h5 + TOOLTEST tvds-3_2.ddl --enable-error-stack 3_2_vds.h5 + TOOLTEST tvds-4.ddl --enable-error-stack 4_vds.h5 + TOOLTEST tvds-5.ddl --enable-error-stack 5_vds.h5 +fi # Layout read -TOOLTEST tvds_layout-1.ddl -p --enable-error-stack 1_vds.h5 -TOOLTEST tvds_layout-2.ddl -p --enable-error-stack 2_vds.h5 -TOOLTEST tvds_layout-3_1.ddl -p --enable-error-stack 3_1_vds.h5 -TOOLTEST tvds_layout-3_2.ddl -p --enable-error-stack 3_2_vds.h5 -TOOLTEST tvds_layout-4.ddl -p --enable-error-stack 4_vds.h5 -TOOLTEST tvds_layout-5.ddl -p --enable-error-stack 5_vds.h5 +if test $USE_FILTER_DEFLATE = "yes" ; then + TOOLTEST tvds_layout-1.ddl -p --enable-error-stack 1_vds.h5 + TOOLTEST tvds_layout-2.ddl -p --enable-error-stack 2_vds.h5 + TOOLTEST tvds_layout-3_1.ddl -p --enable-error-stack 3_1_vds.h5 + TOOLTEST tvds_layout-3_2.ddl -p --enable-error-stack 3_2_vds.h5 + TOOLTEST tvds_layout-4.ddl -p --enable-error-stack 4_vds.h5 + TOOLTEST tvds_layout-5.ddl -p --enable-error-stack 5_vds.h5 +fi # Clean up temporary files/directories CLEAN_TESTFILES_AND_TESTDIR diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index e91883b..ea2e74f 100644 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -115,9 +115,9 @@ $SRC_TOOLS_TESTFILES/tfamily00009.h5 $SRC_TOOLS_TESTFILES/tfamily00010.h5 $SRC_TOOLS_TESTFILES/vds/1_a.h5 $SRC_TOOLS_TESTFILES/vds/1_b.h5 -$SRC_TOOLS_TESTFILES/1_c.h5 -$SRC_TOOLS_TESTFILES/1_d.h5 -$SRC_TOOLS_TESTFILES/1_e.h5 +$SRC_TOOLS_TESTFILES/vds/1_c.h5 +$SRC_TOOLS_TESTFILES/vds/1_d.h5 +$SRC_TOOLS_TESTFILES/vds/1_e.h5 $SRC_TOOLS_TESTFILES/vds/1_f.h5 $SRC_TOOLS_TESTFILES/vds/1_vds.h5 $SRC_TOOLS_TESTFILES/vds/2_a.h5 -- cgit v0.12 From 3c4dd5fa530555ab8a0d4c84d3d880aafe158346 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 2 Jul 2015 12:04:19 -0500 Subject: [svn-r27323] Implement support for H5Dflush for VDS. Implement support for H5Ocopy on VDS. Testing for H5Ocopy on VDS. Fix check-vfd failure. Other minor fixes/cleanup. Note there is a preexisting failure in h5repack testing. Tested: ummon --- src/H5Dint.c | 14 +-- src/H5Dpkg.h | 4 +- src/H5Dvirtual.c | 128 ++++++++++++++------- src/H5Olayout.c | 5 +- test/vds.c | 338 ++++++++++++++++++++++++++++++++++++++++--------------- 5 files changed, 350 insertions(+), 139 deletions(-) diff --git a/src/H5Dint.c b/src/H5Dint.c index 10fa4ca..657f893 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1591,13 +1591,6 @@ H5D_close(H5D_t *dataset) #endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ - /* - * Release datatype, dataspace and creation property list -- there isn't - * much we can do if one of these fails, so we just continue. - */ - free_failed = (unsigned)(H5I_dec_ref(dataset->shared->type_id) < 0 || H5S_close(dataset->shared->space) < 0 || - H5I_dec_ref(dataset->shared->dcpl_id) < 0); - /* Remove the dataset from the list of opened objects in the file */ if(H5FO_top_decr(dataset->oloc.file, dataset->oloc.addr) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "can't decrement count for object") @@ -1610,6 +1603,13 @@ H5D_close(H5D_t *dataset) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release object header") /* + * Release datatype, dataspace and creation property list -- there isn't + * much we can do if one of these fails, so we just continue. + */ + free_failed = (unsigned)(H5I_dec_ref(dataset->shared->type_id) < 0 || H5S_close(dataset->shared->space) < 0 || + H5I_dec_ref(dataset->shared->dcpl_id) < 0); + + /* * Free memory. Before freeing the memory set the file pointer to NULL. * We always check for a null file pointer in other H5D functions to be * sure we're not accessing an already freed dataset (see the HDassert() diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 6a0b15e..44e119c 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -662,9 +662,7 @@ H5_DLL herr_t H5D__virtual_copy_layout(H5O_layout_t *layout); H5_DLL herr_t H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id); H5_DLL herr_t H5D__virtual_reset_layout(H5O_layout_t *layout); H5_DLL herr_t H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage); -H5_DLL herr_t H5D__virtual_copy(H5F_t *f_src, - const H5O_storage_virtual_t *storage_src, H5F_t *f_dst, - H5O_storage_virtual_t *storage_dst, H5T_t *dt_src, H5O_copy_t *cpy_info, +H5_DLL herr_t H5D__virtual_copy(H5F_t *f_src, H5O_layout_t *layout_dst, hid_t dxpl_id); H5_DLL herr_t H5D__virtual_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id); diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index a783a5a..b4a8060 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -432,6 +432,51 @@ H5D__virtual_reset_layout(H5O_layout_t *layout) /*------------------------------------------------------------------------- + * Function: H5D__virtual_copy + * + * Purpose: Copy virtual storage raw data from SRC file to DST file. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * February 6, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D__virtual_copy(H5F_t H5_ATTR_UNUSED *f_dst, H5O_layout_t *layout_dst, + hid_t H5_ATTR_UNUSED dxpl_id) +{ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_PACKAGE + + /* Copy message in memory */ + if(H5D__virtual_copy_layout(layout_dst) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual layout") + +#ifdef NOT_YET + /* Check for copy to the same file */ + if(f_dst == f_src) { + /* Increase reference count on global heap object */ + if((heap_rc = H5HG_link(f_dst, dxpl_id, (H5HG_t *)&(layout_dst->u.virt.serial_list_hobjid), 1)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTMODIFY, FAIL, "unable to adjust global heap refence count") + } /* end if */ + else +#endif /* NOT_YET */ + { + /* Reset global heap id so a new heap objerct is created when the + * message is flushed */ + layout_dst->storage.u.virt.serial_list_hobjid.addr = HADDR_UNDEF; + layout_dst->storage.u.virt.serial_list_hobjid.idx = (size_t)0; + } /* end block/else */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__virtual_copy() */ + + +/*------------------------------------------------------------------------- * Function: H5D__virtual_delete * * Purpose: Delete the file space for a virtual dataset @@ -446,7 +491,10 @@ H5D__virtual_reset_layout(H5O_layout_t *layout) herr_t H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage) { - herr_t ret_value = SUCCEED; /* Return value */ +#ifdef NOT_YET + int heap_rc; /* Reference count of global heap object */ +#endif /* NOT_YET */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -455,9 +503,15 @@ H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage) HDassert(storage); HDassert(storage->type == H5D_VIRTUAL); - /* Delete the global heap block */ - if(H5HG_remove(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "Unable to remove heap object") +#ifdef NOT_YET + /* Unlink the global heap block */ + if((heap_rc = H5HG_link(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid), -1)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTMODIFY, FAIL, "unable to adjust global heap refence count") + if(heap_rc == 0) +#endif /* NOT_YET */ + /* Delete the global heap block */ + if(H5HG_remove(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to remove heap object") /* Clear global heap ID in storage */ storage->u.virt.serial_list_hobjid.addr = HADDR_UNDEF; @@ -499,8 +553,6 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, HDassert(source_dset->file_name); HDassert(source_dset->dset_name); - /* Get dapl and fapl from current (virtual dataset) location? VDSINC */ - /* Check if we need to open the source file */ if(HDstrcmp(source_dset->file_name, ".")) { /* Open the source file */ @@ -2048,7 +2100,7 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, { H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */ hsize_t tot_nelmts; /* Total number of elements mapped to mem_space */ - size_t i, j; /* Local index variable */ + size_t i, j; /* Local index variables */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -2092,13 +2144,13 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, j < storage->list[i].sub_dset_io_end; j++) { HDassert(0 && "Checking code coverage..."); //VDSINC if(H5D__virtual_write_one(io_info, type_info, file_space, &storage->list[i].sub_dset[j]) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to write to source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write to source dataset") } //VDSINC } /* end if */ else /* Write to source dataset */ if(H5D__virtual_write_one(io_info, type_info, file_space, &storage->list[i].source_dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to write to source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write to source dataset") } /* end for */ done: @@ -2123,41 +2175,37 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5D__virtual_flush(H5D_t H5_ATTR_UNUSED *dset, hid_t H5_ATTR_UNUSED dxpl_id) +H5D__virtual_flush(H5D_t *dset, hid_t dxpl_id) { - FUNC_ENTER_STATIC_NOERR + H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */ + size_t i, j; /* Local index variables */ + herr_t ret_value = SUCCEED; /* Return value */ - /* Flush only open datasets */ - /* No-op for now VDSINC */ + FUNC_ENTER_STATIC - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5D__virtual_flush() */ + /* Sanity check */ + HDassert(dset); - -/*------------------------------------------------------------------------- - * Function: H5D__virtual_copy - * - * Purpose: Copy virtual storage raw data from SRC file to DST file. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Neil Fortner - * February 6, 2015 - * - *------------------------------------------------------------------------- - */ -herr_t -H5D__virtual_copy(H5F_t H5_ATTR_UNUSED *f_src, - const H5O_storage_virtual_t H5_ATTR_UNUSED *storage_src, - H5F_t H5_ATTR_UNUSED *f_dst, - H5O_storage_virtual_t H5_ATTR_UNUSED *storage_dst, - H5T_t H5_ATTR_UNUSED *dt_src, H5O_copy_t H5_ATTR_UNUSED *cpy_info, - hid_t H5_ATTR_UNUSED dxpl_id) -{ - FUNC_ENTER_PACKAGE_NOERR + storage = &dset->shared->layout.storage.u.virt; - HDassert(0 && "Not yet implemented...");//VDSINC + /* Flush only open datasets */ + for(i = 0; i < storage->list_nused; i++) + /* Check for "printf" source dataset resolution */ + if(storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) { + /* Iterate over sub-source dsets */ + for(j = 0; j < storage->list[i].sub_dset_nused; j++) + if(storage->list[i].sub_dset[j].dset) + /* Flush source dataset */ + if(H5D__flush_real(storage->list[i].sub_dset[j].dset, dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush source dataset") + } /* end if */ + else + if(storage->list[i].source_dset.dset) + /* Flush source dataset */ + if(H5D__flush_real(storage->list[i].source_dset.dset, dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to write to source dataset") - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5D__virtual_copy() */ +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__virtual_flush() */ diff --git a/src/H5Olayout.c b/src/H5Olayout.c index b72d41b..ba3df82 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -903,7 +903,10 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, break; case H5D_VIRTUAL: - HDassert(0 && "Not yet implemented...");//VDSINC + /* Copy virtual layout. Always copy so the memory fields get copied + * properly. */ + if(H5D__virtual_copy(file_dst, layout_dst, dxpl_id) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy virtual storage") break; case H5D_LAYOUT_ERROR: diff --git a/test/vds.c b/test/vds.c index 6540e5a..50026b6 100644 --- a/test/vds.c +++ b/test/vds.c @@ -32,7 +32,8 @@ typedef enum { } test_api_config_t; const char *FILENAME[] = { - "vds_virt", + "vds_virt_0", + "vds_virt_1", "vds_src_0", "vds_src_1", "vds%_src", @@ -994,11 +995,13 @@ test_basic_io(unsigned config, hid_t fapl) { char srcfilename[FILENAME_BUF_SIZE]; char vfilename[FILENAME_BUF_SIZE]; + char vfilename2[FILENAME_BUF_SIZE]; char srcfilenamepct[FILENAME_BUF_SIZE]; char srcfilenamepct_fmt_fix[FILENAME_BUF_SIZE]; const char *srcfilenamepct_fmt = "vds%%_src"; hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */ hid_t vfile = -1; /* File with virtual dset */ + hid_t vfile2 = -1; /* File with copied virtual dset */ hid_t dcpl = -1; /* Dataset creation property list */ hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */ hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */ @@ -1021,8 +1024,9 @@ test_basic_io(unsigned config, hid_t fapl) TESTING("basic virtual dataset I/O") h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename); - h5_fixname(FILENAME[1], fapl, srcfilename, sizeof srcfilename); - h5_fixname(FILENAME[3], fapl, srcfilenamepct, sizeof srcfilenamepct); + h5_fixname(FILENAME[1], fapl, vfilename2, sizeof vfilename2); + h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename); + h5_fixname(FILENAME[4], fapl, srcfilenamepct, sizeof srcfilenamepct); h5_fixname(srcfilenamepct_fmt, fapl, srcfilenamepct_fmt_fix, sizeof srcfilenamepct_fmt_fix); /* Create DCPL */ @@ -1107,7 +1111,7 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -1136,7 +1140,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen srcdset and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -1176,7 +1180,7 @@ test_basic_io(unsigned config, hid_t fapl) /* * Test 2: 2 Source datasets, hyperslab virtual mappings, '%' in source - * dataset name + * dataset name, also test H5Ocopy() */ /* Clear virtual layout in DCPL */ if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) @@ -1276,7 +1280,7 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -1305,7 +1309,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen srcdsets and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR @@ -1326,6 +1330,162 @@ test_basic_io(unsigned config, hid_t fapl) if(rbuf[i][j] != buf[i][j]) TEST_ERROR + /* Test H5Ocopy() to same file */ + /* Copy virtual dataset */ + if(H5Ocopy(vfile, "v_dset", vfile, "v_dset2", H5P_DEFAULT, H5P_DEFAULT) < 0) + TEST_ERROR + + /* Close v_dset */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Write data directly to source datasets */ + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Open v_dset2 */ + if((vdset = H5Dopen2(vfile, "v_dset2", H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Read data through copied virtual dataset */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + if(H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != buf[i][j]) + TEST_ERROR + + /* Reopen srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Only copy to a different file if the source datasets are in a different + * file */ + if(config & TEST_IO_DIFFERENT_FILE) { + /* Close v_dset2 */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + + /* Create file to copy virtual dataset to */ + if((vfile2 = H5Fcreate(vfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Copy virtual dataset */ + if(H5Ocopy(vfile, "v_dset", vfile2, "v_dset3", H5P_DEFAULT, H5P_DEFAULT) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Write data directly to source datasets */ + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen copied virtual file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile2) < 0) + TEST_ERROR + vfile2 = -1; + if((vfile2 = H5Fopen(vfilename2, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Open v_dset3 */ + if((vdset = H5Dopen2(vfile2, "v_dset3", H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Read data through copied virtual dataset */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + if(H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != buf[i][j]) + TEST_ERROR + + /* Reopen srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Close copied virtual file */ + if(H5Fclose(vfile2) < 0) + TEST_ERROR + vfile2 = -1; + } /* end if */ + /* Close */ if(H5Dclose(srcdset[0]) < 0) TEST_ERROR @@ -1455,7 +1615,7 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -1506,7 +1666,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen srcdsets and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR @@ -1687,7 +1847,7 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -1765,7 +1925,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen srcdsets and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR @@ -1989,7 +2149,7 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -2058,7 +2218,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen srcdsets and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR @@ -2313,7 +2473,7 @@ test_basic_io(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -2690,7 +2850,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen srcdset and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR @@ -2770,6 +2930,8 @@ error: } /* end for */ if(vfile >= 0) (void)H5Fclose(vfile); + if(vfile2 >= 0) + (void)H5Fclose(vfile2); for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) { if(srcspace[i] >= 0) (void)H5Sclose(srcspace[i]); @@ -2837,7 +2999,7 @@ test_unlim(unsigned config, hid_t fapl) TESTING("virtual dataset I/O with unlimited selections") h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename); - h5_fixname(FILENAME[1], fapl, srcfilename, sizeof srcfilename); + h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename); /* Create DCPLs */ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) @@ -2992,7 +3154,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -3057,7 +3219,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -3110,7 +3272,7 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR @@ -3160,7 +3322,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -3227,7 +3389,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -3291,7 +3453,7 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) TEST_ERROR @@ -3346,7 +3508,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -3427,7 +3589,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -3662,7 +3824,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -3726,7 +3888,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -3779,7 +3941,7 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR @@ -3834,7 +3996,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -3900,7 +4062,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -3962,7 +4124,7 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) TEST_ERROR @@ -4017,7 +4179,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -4098,7 +4260,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -4380,7 +4542,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -4444,7 +4606,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -4497,7 +4659,7 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR @@ -4547,7 +4709,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -4612,7 +4774,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -4677,7 +4839,7 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen srcdset[2] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR if((srcdset[2] = H5Dopen2(srcfile[0], "src_dset3", H5P_DEFAULT)) < 0) TEST_ERROR @@ -4734,7 +4896,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -4799,7 +4961,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -4856,7 +5018,7 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) TEST_ERROR @@ -4912,7 +5074,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -4976,7 +5138,7 @@ test_unlim(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -5211,10 +5373,10 @@ test_printf(unsigned config, hid_t fapl) TESTING("virtual dataset I/O with printf source") h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename); - h5_fixname(FILENAME[1], fapl, srcfilename, sizeof srcfilename); - h5_fixname(FILENAME[2], fapl, srcfilename2, sizeof srcfilename2); + h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename); + h5_fixname(FILENAME[3], fapl, srcfilename2, sizeof srcfilename2); h5_fixname(printf_srcfilename_fmt, fapl, printf_srcfilename, sizeof printf_srcfilename); - h5_fixname(FILENAME[3], fapl, srcfilenamepct, sizeof srcfilenamepct); + h5_fixname(FILENAME[4], fapl, srcfilenamepct, sizeof srcfilenamepct); h5_fixname(srcfilenamepct_fmt, fapl, srcfilenamepct_fmt_fix, sizeof srcfilenamepct_fmt_fix); /* Create DCPL */ @@ -5299,7 +5461,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -5332,7 +5494,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR /* Create 2 source datasets */ @@ -5400,7 +5562,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -5456,7 +5618,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR /* Create 3rd source dataset */ @@ -5500,7 +5662,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -5687,7 +5849,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -5720,7 +5882,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR /* Create source datasets in a pattern with increasing gaps: @@ -5846,7 +6008,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -5910,7 +6072,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -5974,7 +6136,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -6038,7 +6200,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -6102,7 +6264,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -6166,7 +6328,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -6309,7 +6471,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -6389,7 +6551,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -6445,7 +6607,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile[1] if config option specified */ if(config & TEST_IO_CLOSE_SRC) - if((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR /* Create 2nd source dataset */ @@ -6486,7 +6648,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -6619,7 +6781,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -6699,7 +6861,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -6755,7 +6917,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile[1] if config option specified */ if(config & TEST_IO_CLOSE_SRC) - if((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR /* Create 2nd source dataset */ @@ -6796,7 +6958,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -6962,7 +7124,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -6995,7 +7157,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR /* Create 2 source datasets */ @@ -7063,7 +7225,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -7119,7 +7281,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR /* Create 3rd source dataset */ @@ -7162,7 +7324,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -7226,7 +7388,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -7283,7 +7445,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR /* Create 4th source dataset */ @@ -7326,7 +7488,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -7390,7 +7552,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -7455,7 +7617,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -7634,7 +7796,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) TEST_ERROR @@ -7667,7 +7829,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR /* Create 2 source datasets */ @@ -7745,7 +7907,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -7809,7 +7971,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -7866,7 +8028,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR /* Create 3rd source dataset */ @@ -7913,7 +8075,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -7977,7 +8139,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) @@ -8033,7 +8195,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR /* Create 4th source dataset */ @@ -8077,7 +8239,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR @@ -8141,7 +8303,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Fclose(vfile) < 0) TEST_ERROR vfile = -1; - if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) -- cgit v0.12 From 1ed71c503796eea0e746726f041e2b5b4e181bf2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 2 Jul 2015 12:13:55 -0500 Subject: [svn-r27324] Remove extra character on end of file name --- tools/h5repack/h5repack.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index ea2e74f..478ca36 100644 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -1099,7 +1099,7 @@ VERIFY_LAYOUT_ALL vds_null_compa 2_vds.h5 COMPACT -l COMPA ################################################################ # layout conversions ############################################################### -VERIFY_LAYOUT_DSET vds_compa_conti 4_vds.h5} vds_dset CONTIGUOUS -l vds_dset:CONTI +VERIFY_LAYOUT_DSET vds_compa_conti 4_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI VERIFY_LAYOUT_DSET vds_compa_compa 4_vds.h5 vds_dset COMPACT -l vds_dset:COMPA VERIFY_LAYOUT_DSET vds_conti_compa 4_vds.h5 vds_dset COMPACT -l vds_dset:COMPA VERIFY_LAYOUT_DSET vds_conti_conti 4_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI -- cgit v0.12 From bd28a396d05511e53c44beb1bf65dcdca4545aa0 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 15 Jul 2015 16:01:03 -0500 Subject: [svn-r27398] Fixed potential issue layouts with compilers that do not support designated initializers. Tested: ummon --- src/H5Pdcpl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index a900eb0..39e8e77 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1297,9 +1297,12 @@ H5P__init_def_layout(void) FUNC_ENTER_STATIC_NOERR /* Initialize the default layout info for non-contigous layouts */ + H5D_def_layout_compact_g.storage.type = H5D_COMPACT; H5D_def_layout_compact_g.storage.u.compact = def_store_compact; H5D_def_layout_chunk_g.u.chunk = def_layout_chunk; + H5D_def_layout_chunk_g.storage.type = H5D_CHUNKED; H5D_def_layout_chunk_g.storage.u.chunk = def_store_chunk; + H5D_def_layout_virtual_g.storage.type = H5D_VIRTUAL; H5D_def_layout_virtual_g.storage.u.virt = def_store_virtual; /* Note that we've initialized the default values */ -- cgit v0.12 From a8fc7eeaecfcaf13480ca68c688ba91869bf8e16 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 21 Jul 2015 12:14:26 -0500 Subject: [svn-r27420] Fixed VDS test to handle the family driver correctly. Tested: ummon --- test/h5test.c | 36 +++++++++++++++++++++---- test/h5test.h | 1 + test/vds.c | 86 ++++++++++++++++++++++++++++++++--------------------------- 3 files changed, 79 insertions(+), 44 deletions(-) diff --git a/test/h5test.c b/test/h5test.c index dc13a27..aa99c1f 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -93,7 +93,7 @@ static const char *multi_letters = "msbrglo"; static herr_t h5_errors(hid_t estack, void *client_data); static char * h5_fixname_real(const char *base_name, hid_t fapl, const char *suffix, - char *fullname, size_t size); + char *fullname, size_t size, hbool_t nest_printf); /*------------------------------------------------------------------------- @@ -295,7 +295,7 @@ h5_reset(void) char * h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size) { - return (h5_fixname_real(base_name, fapl, ".h5", fullname, size)); + return (h5_fixname_real(base_name, fapl, ".h5", fullname, size, FALSE)); } @@ -315,7 +315,33 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size) char * h5_fixname_no_suffix(const char *base_name, hid_t fapl, char *fullname, size_t size) { - return (h5_fixname_real(base_name, fapl, NULL, fullname, size)); + return (h5_fixname_real(base_name, fapl, NULL, fullname, size, FALSE)); +} + + +/*------------------------------------------------------------------------- + * Function: h5_fixname_printf + * + * Purpose: Same as h5_fixname but returns a filename that can be passed + * through a printf-style function once before being passed to the file + * driver. Basically, replaces all % characters used by the file + * driver with %%. + * + * Return: Success: The FULLNAME pointer. + * + * Failure: NULL if BASENAME or FULLNAME is the null + * pointer or if FULLNAME isn't large enough for + * the result. + * + * Programmer: Neil Fortner + * Wednesday, July 15, 2015 + * + *------------------------------------------------------------------------- + */ +char * +h5_fixname_printf(const char *base_name, hid_t fapl, char *fullname, size_t size) +{ + return (h5_fixname_real(base_name, fapl, ".h5", fullname, size, TRUE)); } @@ -343,7 +369,7 @@ h5_fixname_no_suffix(const char *base_name, hid_t fapl, char *fullname, size_t s */ static char * h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, - char *fullname, size_t size) + char *fullname, size_t size, hbool_t nest_printf) { const char *prefix = NULL; char *ptr, last = '\0'; @@ -364,7 +390,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, if(suffix) { if(H5FD_FAMILY == driver) - suffix = "%05d.h5"; + suffix = nest_printf ? "%%05d.h5" : "%05d.h5"; else if (H5FD_MULTI == driver) suffix = NULL; } diff --git a/test/h5test.h b/test/h5test.h index 224ca84..9d097af 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -127,6 +127,7 @@ H5TEST_DLL int h5_cleanup(const char *base_name[], hid_t fapl); H5TEST_DLL void h5_cleanup_files(const char *base_name[], hid_t fapl); H5TEST_DLL char *h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size); H5TEST_DLL char *h5_fixname_no_suffix(const char *base_name, hid_t fapl, char *fullname, size_t size); +H5TEST_DLL char *h5_fixname_printf(const char *base_name, hid_t fapl, char *fullname, size_t size); H5TEST_DLL hid_t h5_fileaccess(void); H5TEST_DLL void h5_no_hwconv(void); H5TEST_DLL const char *h5_rmprefix(const char *filename); diff --git a/test/vds.c b/test/vds.c index 50026b6..62b444f 100644 --- a/test/vds.c +++ b/test/vds.c @@ -994,11 +994,12 @@ static int test_basic_io(unsigned config, hid_t fapl) { char srcfilename[FILENAME_BUF_SIZE]; + char srcfilename_map[FILENAME_BUF_SIZE]; char vfilename[FILENAME_BUF_SIZE]; char vfilename2[FILENAME_BUF_SIZE]; char srcfilenamepct[FILENAME_BUF_SIZE]; - char srcfilenamepct_fmt_fix[FILENAME_BUF_SIZE]; - const char *srcfilenamepct_fmt = "vds%%_src"; + char srcfilenamepct_map[FILENAME_BUF_SIZE]; + const char *srcfilenamepct_map_orig = "vds%%_src"; hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */ hid_t vfile = -1; /* File with virtual dset */ hid_t vfile2 = -1; /* File with copied virtual dset */ @@ -1026,8 +1027,9 @@ test_basic_io(unsigned config, hid_t fapl) h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename); h5_fixname(FILENAME[1], fapl, vfilename2, sizeof vfilename2); h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename); + h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map); h5_fixname(FILENAME[4], fapl, srcfilenamepct, sizeof srcfilenamepct); - h5_fixname(srcfilenamepct_fmt, fapl, srcfilenamepct_fmt_fix, sizeof srcfilenamepct_fmt_fix); + h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, sizeof srcfilenamepct_map); /* Create DCPL */ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) @@ -1055,7 +1057,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR /* Add virtual layout mapping */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset", srcspace[0]) < 0) TEST_ERROR /* Create virtual file */ @@ -1212,9 +1214,9 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR /* Add virtual layout mappings */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "%%src_dset1", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "%%src_dset1", srcspace[0]) < 0) TEST_ERROR - if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2%%", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2%%", srcspace[0]) < 0) TEST_ERROR /* Reset dims */ @@ -1547,9 +1549,9 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR /* Add virtual layout mappings */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_fmt_fix : ".", "src_dset1", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".", "src_dset1", srcspace[0]) < 0) TEST_ERROR - if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_fmt_fix : ".", "src_dset2", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".", "src_dset2", srcspace[0]) < 0) TEST_ERROR /* Reset dims */ @@ -1758,9 +1760,9 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR /* Add virtual layout mappings */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) TEST_ERROR - if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2", srcspace[1]) < 0) + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[1]) < 0) TEST_ERROR /* Create virtual file */ @@ -2066,9 +2068,9 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR /* Add virtual layout mappings */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) TEST_ERROR - if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[0]) < 0) TEST_ERROR /* Create virtual file */ @@ -2407,9 +2409,9 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR /* Add virtual layout mappings */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) TEST_ERROR - if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[1]) < 0) + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[1]) < 0) TEST_ERROR /* Create virtual file */ @@ -2970,6 +2972,7 @@ static int test_unlim(unsigned config, hid_t fapl) { char srcfilename[FILENAME_BUF_SIZE]; + char srcfilename_map[FILENAME_BUF_SIZE]; char vfilename[FILENAME_BUF_SIZE]; hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */ hid_t vfile = -1; /* File with virtual dset */ @@ -3000,6 +3003,7 @@ test_unlim(unsigned config, hid_t fapl) h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename); h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename); + h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map); /* Create DCPLs */ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) @@ -3060,9 +3064,9 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR /* Add virtual layout mappings */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) TEST_ERROR - if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[0]) < 0) TEST_ERROR /* Create virtual file */ @@ -3730,9 +3734,9 @@ test_unlim(unsigned config, hid_t fapl) start[1] = 0; /* Add virtual layout mappings */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) TEST_ERROR - if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[0]) < 0) TEST_ERROR /* Create virtual file */ @@ -4416,11 +4420,11 @@ test_unlim(unsigned config, hid_t fapl) start[1] = 0; /* Add virtual layout mappings */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset1", srcspace[0]) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) TEST_ERROR - if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset2", srcspace[1]) < 0) + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[1]) < 0) TEST_ERROR - if(H5Pset_virtual(dcpl, vspace[2], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset3", srcspace[2]) < 0) + if(H5Pset_virtual(dcpl, vspace[2], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset3", srcspace[2]) < 0) TEST_ERROR /* Create virtual file */ @@ -5340,13 +5344,15 @@ static int test_printf(unsigned config, hid_t fapl) { char srcfilename[FILENAME_BUF_SIZE]; + char srcfilename_map[FILENAME_BUF_SIZE]; char srcfilename2[FILENAME_BUF_SIZE]; + char srcfilename2_map[FILENAME_BUF_SIZE]; char vfilename[FILENAME_BUF_SIZE]; - char printf_srcfilename[FILENAME_BUF_SIZE]; - const char *printf_srcfilename_fmt = "vds_src_%b"; + char printf_srcfilename_map[FILENAME_BUF_SIZE]; + const char *printf_srcfilename_map_orig = "vds_src_%b"; char srcfilenamepct[FILENAME_BUF_SIZE]; - char srcfilenamepct_fmt_fix[FILENAME_BUF_SIZE]; - const char *srcfilenamepct_fmt = "vds%%_src"; + char srcfilenamepct_map[FILENAME_BUF_SIZE]; + const char *srcfilenamepct_map_orig = "vds%%_src"; hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */ hid_t vfile = -1; /* File with virtual dset */ hid_t dcpl = -1; /* Dataset creation property list */ @@ -5374,10 +5380,12 @@ test_printf(unsigned config, hid_t fapl) h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename); h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename); + h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map); h5_fixname(FILENAME[3], fapl, srcfilename2, sizeof srcfilename2); - h5_fixname(printf_srcfilename_fmt, fapl, printf_srcfilename, sizeof printf_srcfilename); + h5_fixname_printf(FILENAME[2], fapl, srcfilename2_map, sizeof srcfilename2_map); + h5_fixname_printf(printf_srcfilename_map_orig, fapl, printf_srcfilename_map, sizeof printf_srcfilename_map); h5_fixname(FILENAME[4], fapl, srcfilenamepct, sizeof srcfilenamepct); - h5_fixname(srcfilenamepct_fmt, fapl, srcfilenamepct_fmt_fix, sizeof srcfilenamepct_fmt_fix); + h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, sizeof srcfilenamepct_map); /* Create DCPL */ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) @@ -5423,7 +5431,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR /* Add virtual layout mapping */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset%b", srcspace) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset%b", srcspace) < 0) TEST_ERROR /* Create virtual file */ @@ -5811,7 +5819,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR /* Add virtual layout mapping */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_fmt_fix : ".", "src_dset%b", srcspace) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".", "src_dset%b", srcspace) < 0) TEST_ERROR /* Create virtual file */ @@ -6066,7 +6074,7 @@ test_printf(unsigned config, hid_t fapl) * config option specified */ if(H5Dclose(vdset) < 0) TEST_ERROR - if(H5Pset_virtual_printf_gap(dapl, (size_t)1) < 0) + if(H5Pset_virtual_printf_gap(dapl, (hsize_t)1) < 0) TEST_ERROR if(config & TEST_IO_REOPEN_VIRT) { if(H5Fclose(vfile) < 0) @@ -6130,7 +6138,7 @@ test_printf(unsigned config, hid_t fapl) * config option specified */ if(H5Dclose(vdset) < 0) TEST_ERROR - if(H5Pset_virtual_printf_gap(dapl, (size_t)2) < 0) + if(H5Pset_virtual_printf_gap(dapl, (hsize_t)2) < 0) TEST_ERROR if(config & TEST_IO_REOPEN_VIRT) { if(H5Fclose(vfile) < 0) @@ -6194,7 +6202,7 @@ test_printf(unsigned config, hid_t fapl) * config option specified */ if(H5Dclose(vdset) < 0) TEST_ERROR - if(H5Pset_virtual_printf_gap(dapl, (size_t)3) < 0) + if(H5Pset_virtual_printf_gap(dapl, (hsize_t)3) < 0) TEST_ERROR if(config & TEST_IO_REOPEN_VIRT) { if(H5Fclose(vfile) < 0) @@ -6258,7 +6266,7 @@ test_printf(unsigned config, hid_t fapl) * config option specified */ if(H5Dclose(vdset) < 0) TEST_ERROR - if(H5Pset_virtual_printf_gap(dapl, (size_t)4) < 0) + if(H5Pset_virtual_printf_gap(dapl, (hsize_t)4) < 0) TEST_ERROR if(config & TEST_IO_REOPEN_VIRT) { if(H5Fclose(vfile) < 0) @@ -6452,7 +6460,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR /* Add virtual layout mapping */ - if(H5Pset_virtual(dcpl, vspace[0], printf_srcfilename, "src_dset", srcspace) < 0) + if(H5Pset_virtual(dcpl, vspace[0], printf_srcfilename_map, "src_dset", srcspace) < 0) TEST_ERROR /* Create virtual file */ @@ -6762,7 +6770,7 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR /* Add virtual layout mapping */ - if(H5Pset_virtual(dcpl, vspace[0], printf_srcfilename, "%%src%%_dset%%%b", srcspace) < 0) + if(H5Pset_virtual(dcpl, vspace[0], printf_srcfilename_map, "%%src%%_dset%%%b", srcspace) < 0) TEST_ERROR /* Create virtual file */ @@ -7084,9 +7092,9 @@ test_printf(unsigned config, hid_t fapl) start[1] = 0; /* Add virtual layout mappings */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "%bsrc_dset_a%b%%", srcspace) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "%bsrc_dset_a%b%%", srcspace) < 0) TEST_ERROR - if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset_b%b%%%%", srcspace) < 0) + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset_b%b%%%%", srcspace) < 0) TEST_ERROR /* Create virtual file */ @@ -7754,11 +7762,11 @@ test_printf(unsigned config, hid_t fapl) /* Add virtual layout mappings (select ALL in source space for second * mapping) */ - if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset_a%b", srcspace) < 0) + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset_a%b", srcspace) < 0) TEST_ERROR if(H5Sselect_all(srcspace) < 0) TEST_ERROR - if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename : ".", "src_dset_b%b", srcspace) < 0) + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset_b%b", srcspace) < 0) TEST_ERROR /* Create virtual file */ -- cgit v0.12 From 6bb109bf6d0b17e4c67a1fc3d252a0b6547c875f Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 22 Jul 2015 13:36:30 -0500 Subject: [svn-r27424] Implement support for h5debug for VDS. Implement support for H5Pencode/decode with VDS properties. Testing for H5Pencode/decode with VDS. Relax assertion check for number of elements written to buffer as we do not check for overlaps in mappings. Other minor fixes/cleanup. Tested: ummon --- src/H5Dvirtual.c | 14 ++--- src/H5Olayout.c | 27 ++++++-- src/H5Pdcpl.c | 186 +++++++++++++++++++++++++++++++++++++++++++++++++++---- src/H5S.c | 44 +++++++------ src/H5Sprivate.h | 2 + test/vds.c | 27 +++++++- 6 files changed, 250 insertions(+), 50 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index b4a8060..8b8af36 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -1099,8 +1099,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) /* Sanity check */ HDassert(dset); - storage = &dset->shared->layout.storage.u.virt; HDassert(dset->shared->layout.storage.type == H5D_VIRTUAL); + storage = &dset->shared->layout.storage.u.virt; HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); /* Get rank of VDS */ @@ -1956,11 +1956,9 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, } /* end for */ /* Fill unmapped part of buffer with fill value */ - if(tot_nelmts != nelmts) { + if(tot_nelmts < nelmts) { H5D_fill_value_t fill_status; /* Fill value status */ - HDassert(tot_nelmts < nelmts); - /* Check the fill value status */ if(H5P_is_fill_value_defined(&io_info->dset->shared->dcpl_cache.fill, &fill_status) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if fill value defined") @@ -1994,7 +1992,7 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, #ifndef NDEBUG /* Make sure the total number of elements written (including fill - * values) == nelmts */ + * values) >= nelmts */ { hssize_t select_nelmts; /* Number of elements in selection */ @@ -2002,8 +2000,10 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(fill_space)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") - /* Verify number of elements is correct */ - HDassert((tot_nelmts + (hsize_t)select_nelmts) == nelmts); + /* Verify number of elements is correct. Note that since we + * don't check for overlap we can't assert that these are equal + */ + HDassert((tot_nelmts + (hsize_t)select_nelmts) >= nelmts); } /* end block */ #endif /* NDEBUG */ } /* end if */ diff --git a/src/H5Olayout.c b/src/H5Olayout.c index ba3df82..d747512 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -545,11 +545,11 @@ H5O_layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c /* Encode each entry */ for(i = 0; i < mesg->storage.u.virt.list_nused; i++) { /* Source file name */ - (void)HDstrcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_file_name); + (void)HDmemcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_file_name, str_size[2 * i]); heap_block_p += str_size[2 * i]; /* Source dataset name */ - (void)HDstrcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_dset_name); + (void)HDmemcpy((char *)heap_block_p, mesg->storage.u.virt.list[i].source_dset_name, str_size[(2 * i) + 1]); heap_block_p += str_size[(2 * i) + 1]; /* Source selection */ @@ -948,7 +948,7 @@ H5O_layout_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const vo FILE * stream, int indent, int fwidth) { const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg; - unsigned u; + size_t u; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -971,7 +971,7 @@ H5O_layout_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const vo "Number of dimensions:", (unsigned long)(mesg->u.chunk.ndims)); HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Size:"); - for(u = 0; u < mesg->u.chunk.ndims; u++) + for(u = 0; u < (size_t)mesg->u.chunk.ndims; u++) HDfprintf(stream, "%s%lu", u ? ", " : "", (unsigned long)(mesg->u.chunk.dim[u])); HDfprintf(stream, "}\n"); @@ -1009,8 +1009,23 @@ H5O_layout_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const vo break; case H5D_VIRTUAL: - HDassert(0 && "Not yet implemented...");//VDSINC - + HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Type:", "Virtual"); + HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + "Global heap address:", mesg->storage.u.virt.serial_list_hobjid.addr); + HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, + "Global heap index:", mesg->storage.u.virt.serial_list_hobjid.idx); + for(u = 0; u < mesg->storage.u.virt.list_nused; u++) { + HDfprintf(stream, "%*sMapping %u:\n", indent, "", u); + HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3, + "Virtual selection:", ""); + HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3, + "Source file name:", mesg->storage.u.virt.list[u].source_file_name); + HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3, + "Source dataset name:", mesg->storage.u.virt.list[u].source_dset_name); + HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3, + "Source selection:", ""); + } /* end for */ break; case H5D_LAYOUT_ERROR: diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 39e8e77..29976c2 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -438,8 +438,12 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size) { const H5O_layout_t *layout = (const H5O_layout_t *)value; /* Create local aliases for values */ uint8_t **pp = (uint8_t **)_pp; + uint8_t *tmp_p; + size_t tmp_size; + size_t u; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_NOERR + FUNC_ENTER_STATIC /* Sanity check */ HDassert(layout); @@ -451,19 +455,84 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size) /* If layout is chunked, encode chunking structure */ if(H5D_CHUNKED == layout->type) { - unsigned u; /* Local index variable */ - /* Encode rank */ *(*pp)++ = (uint8_t)layout->u.chunk.ndims; /* Encode chunk dims */ HDcompile_assert(sizeof(uint32_t) == sizeof(layout->u.chunk.dim[0])); - for(u = 0; u < layout->u.chunk.ndims; u++) + for(u = 0; u < (size_t)layout->u.chunk.ndims; u++) UINT32ENCODE(*pp, layout->u.chunk.dim[u]) } /* end if */ else if(H5D_VIRTUAL == layout->type) { - HDassert(0 && "Not yet implemented...");//VDSINC - } /* end else */ + uint64_t nentries = (uint64_t)layout->storage.u.virt.list_nused; + + /* Encode number of entries */ + UINT64ENCODE(*pp, nentries) + *size += (size_t)8; + + /* Iterate over entries */ + for(u = 0; u < layout->storage.u.virt.list_nused; u++) { + /* Source file name */ + tmp_size = HDstrlen(layout->storage.u.virt.list[u].source_file_name) + (size_t)1; + (void)HDmemcpy(*pp, layout->storage.u.virt.list[u].source_file_name, tmp_size); + *pp += tmp_size; + *size += tmp_size; + + /* Source dataset name */ + tmp_size = HDstrlen(layout->storage.u.virt.list[u].source_dset_name) + (size_t)1; + (void)HDmemcpy(*pp, layout->storage.u.virt.list[u].source_dset_name, tmp_size); + *pp += tmp_size; + *size += tmp_size; + + /* Source selection. Note that we are not passing the real + * allocated size because we do no know it. H5P__encode should + * have verified that the buffer is large enough for the entire + * list before we get here. */ + tmp_size = (size_t)-1; + tmp_p = *pp; + if(H5S_encode(layout->storage.u.virt.list[u].source_select, pp, &tmp_size) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize source selection") + *size += (size_t)(*pp - tmp_p); + + /* Virtual dataset selection. Same notes as above apply. */ + tmp_size = (size_t)-1; + tmp_p = *pp; + if(H5S_encode(layout->storage.u.virt.list[u].source_dset.virtual_select, pp, &tmp_size) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize virtual selection") + *size += (size_t)(*pp - tmp_p); + } /* end for */ + } /* end if */ + } /* end if */ + else if(H5D_VIRTUAL == layout->type) { + /* Calculate size of virtual layout info */ + /* number of entries */ + *size += (size_t)8; + + /* NULL pointer to pass to H5S_encode */ + tmp_p = NULL; + + /* Iterate over entries */ + for(u = 0; u < layout->storage.u.virt.list_nused; u++) { + /* Source file name */ + tmp_size = HDstrlen(layout->storage.u.virt.list[u].source_file_name) + (size_t)1; + *size += tmp_size; + + /* Source dataset name */ + tmp_size = HDstrlen(layout->storage.u.virt.list[u].source_dset_name) + (size_t)1; + *size += tmp_size; + + /* Source selection */ + tmp_size = (size_t)0; + if(H5S_encode(layout->storage.u.virt.list[u].source_select, &tmp_p, &tmp_size) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize source selection") + *size += tmp_size; + + /* Virtual dataset selection */ + tmp_size = (size_t)0; + if(H5S_encode(layout->storage.u.virt.list[u].source_dset.virtual_select, &tmp_p, &tmp_size) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize virtual selection") + *size += tmp_size; + } /* end for */ } /* end if */ /* Size of layout type */ @@ -475,7 +544,8 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size) *size += layout->u.chunk.ndims * sizeof(uint32_t); } /* end if */ - FUNC_LEAVE_NOAPI(SUCCEED) +done: + FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dcrt_layout_enc() */ @@ -498,7 +568,7 @@ static herr_t H5P__dcrt_layout_dec(const void **_pp, void *value) { const H5O_layout_t *layout; /* Storage layout */ - H5O_layout_t chunk_layout; /* Layout structure for chunk info */ + H5O_layout_t tmp_layout; /* Temporary local layout structure */ H5D_layout_t type; /* Layout type */ const uint8_t **pp = (const uint8_t **)_pp; herr_t ret_value = SUCCEED; /* Return value */ @@ -538,21 +608,111 @@ H5P__dcrt_layout_dec(const void **_pp, void *value) unsigned u; /* Local index variable */ /* Initialize to default values */ - chunk_layout = H5D_def_layout_chunk_g; + tmp_layout = H5D_def_layout_chunk_g; /* Set rank & dimensions */ - chunk_layout.u.chunk.ndims = (unsigned)ndims; + tmp_layout.u.chunk.ndims = (unsigned)ndims; for(u = 0; u < ndims; u++) - UINT32DECODE(*pp, chunk_layout.u.chunk.dim[u]) + UINT32DECODE(*pp, tmp_layout.u.chunk.dim[u]) /* Point at the newly set up struct */ - layout = &chunk_layout; + layout = &tmp_layout; } /* end else */ } break; case H5D_VIRTUAL: - HDassert(0 && "Not yet implemented...");//VDSINC + { + uint64_t nentries; /* Number of VDS mappings */ + + /* Decode number of entries */ + UINT64DECODE(*pp, nentries) + + if(nentries == (uint64_t)0) + /* Just use the default struct */ + layout = &H5D_def_layout_virtual_g; + else { + size_t tmp_size; + size_t u; /* Local index variable */ + + /* Initialize to default values */ + tmp_layout = H5D_def_layout_virtual_g; + + /* Allocate entry list */ + if(NULL == (tmp_layout.storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_calloc((size_t)nentries * sizeof(H5O_storage_virtual_ent_t)))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "unable to allocate heap block") + tmp_layout.storage.u.virt.list_nalloc = (size_t)nentries; + tmp_layout.storage.u.virt.list_nused = (size_t)nentries; + + /* Decode each entry */ + for(u = 0; u < (size_t)nentries; u++) { + /* Source file name */ + tmp_size = HDstrlen((const char *)*pp) + 1; + if(NULL == (tmp_layout.storage.u.virt.list[u].source_file_name = (char *)H5MM_malloc(tmp_size))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "unable to allocate memory for source file name") + (void)HDmemcpy(tmp_layout.storage.u.virt.list[u].source_file_name, *pp, tmp_size); + *pp += tmp_size; + + /* Source dataset name */ + tmp_size = HDstrlen((const char *)*pp) + 1; + if(NULL == (tmp_layout.storage.u.virt.list[u].source_dset_name = (char *)H5MM_malloc(tmp_size))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "unable to allocate memory for source dataset name") + (void)HDmemcpy(tmp_layout.storage.u.virt.list[u].source_dset_name, *pp, tmp_size); + *pp += tmp_size; + + /* Source selection */ + if(NULL == (tmp_layout.storage.u.virt.list[u].source_select = H5S_decode(pp))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "can't decode source space selection") + tmp_layout.storage.u.virt.list[u].source_space_status = H5O_VIRTUAL_STATUS_USER; + + /* Virtual selection */ + if(NULL == (tmp_layout.storage.u.virt.list[u].source_dset.virtual_select = H5S_decode(pp))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "can't decode virtual space selection") + tmp_layout.storage.u.virt.list[u].virtual_space_status = H5O_VIRTUAL_STATUS_USER; + + /* Parse source file and dataset names for "printf" + * style format specifiers */ + if(H5D_virtual_parse_source_name(tmp_layout.storage.u.virt.list[u].source_file_name, &tmp_layout.storage.u.virt.list[u].parsed_source_file_name, &tmp_layout.storage.u.virt.list[u].psfn_static_strlen, &tmp_layout.storage.u.virt.list[u].psfn_nsubs) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source file name") + if(H5D_virtual_parse_source_name(tmp_layout.storage.u.virt.list[u].source_dset_name, &tmp_layout.storage.u.virt.list[u].parsed_source_dset_name, &tmp_layout.storage.u.virt.list[u].psdn_static_strlen, &tmp_layout.storage.u.virt.list[u].psdn_nsubs) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source dataset name") + + /* Set source names in source_dset struct */ + if((tmp_layout.storage.u.virt.list[u].psfn_nsubs == 0) + && (tmp_layout.storage.u.virt.list[u].psdn_nsubs == 0)) { + if(tmp_layout.storage.u.virt.list[u].parsed_source_file_name) + tmp_layout.storage.u.virt.list[u].source_dset.file_name = tmp_layout.storage.u.virt.list[u].parsed_source_file_name->name_segment; + else + tmp_layout.storage.u.virt.list[u].source_dset.file_name = tmp_layout.storage.u.virt.list[u].source_file_name; + if(tmp_layout.storage.u.virt.list[u].parsed_source_dset_name) + tmp_layout.storage.u.virt.list[u].source_dset.dset_name = tmp_layout.storage.u.virt.list[u].parsed_source_dset_name->name_segment; + else + tmp_layout.storage.u.virt.list[u].source_dset.dset_name = tmp_layout.storage.u.virt.list[u].source_dset_name; + } /* end if */ + + /* unlim_dim fields */ + tmp_layout.storage.u.virt.list[u].unlim_dim_source = H5S_get_select_unlim_dim(tmp_layout.storage.u.virt.list[u].source_select); + tmp_layout.storage.u.virt.list[u].unlim_dim_virtual = H5S_get_select_unlim_dim(tmp_layout.storage.u.virt.list[u].source_dset.virtual_select); + tmp_layout.storage.u.virt.list[u].unlim_extent_source = HSIZE_UNDEF; + tmp_layout.storage.u.virt.list[u].unlim_extent_virtual = HSIZE_UNDEF; + tmp_layout.storage.u.virt.list[u].clip_size_source = HSIZE_UNDEF; + tmp_layout.storage.u.virt.list[u].clip_size_virtual = HSIZE_UNDEF; + + /* Clipped selections */ + if(tmp_layout.storage.u.virt.list[u].unlim_dim_virtual < 0) { + tmp_layout.storage.u.virt.list[u].source_dset.clipped_source_select = tmp_layout.storage.u.virt.list[u].source_select; + tmp_layout.storage.u.virt.list[u].source_dset.clipped_virtual_select = tmp_layout.storage.u.virt.list[u].source_dset.virtual_select; + } /* end if */ + + /* Update min_dims */ + if(H5D_virtual_update_min_dims(&tmp_layout, u) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to update virtual dataset minimum dimensions") + } /* end for */ + + /* Point at the newly set up struct */ + layout = &tmp_layout; + } /* end else */ + } /* end block */ break; case H5D_LAYOUT_ERROR: diff --git a/src/H5S.c b/src/H5S.c index 79e996e..6a6f45a 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -53,8 +53,6 @@ /* Local Prototypes */ /********************/ static htri_t H5S_is_simple(const H5S_t *sdim); -static herr_t H5S_encode(H5S_t *obj, unsigned char *buf, size_t *nalloc); -static H5S_t *H5S_decode(const unsigned char *buf); /*********************/ @@ -1506,7 +1504,7 @@ H5Sencode(hid_t obj_id, void *buf, size_t *nalloc) if (NULL==(dspace=(H5S_t *)H5I_object_verify(obj_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") - if(H5S_encode(dspace, (unsigned char *)buf, nalloc)<0) + if(H5S_encode(dspace, (unsigned char **)&buf, nalloc)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype") done: @@ -1530,8 +1528,8 @@ done: * *------------------------------------------------------------------------- */ -static herr_t -H5S_encode(H5S_t *obj, unsigned char *buf, size_t *nalloc) +herr_t +H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) { size_t extent_size; /* Size of serialized dataspace extent */ hssize_t sselect_size; /* Signed size of serialized dataspace selection */ @@ -1556,28 +1554,28 @@ H5S_encode(H5S_t *obj, unsigned char *buf, size_t *nalloc) /* Verify the size of buffer. If it's not big enough, simply return the * right size without filling the buffer. */ - if(!buf || *nalloc < (extent_size + select_size + 1 + 1 + 1 + 4)) + if(!*p || *nalloc < (extent_size + select_size + 1 + 1 + 1 + 4)) *nalloc = extent_size + select_size + 1 + 1 + 1 + 4; else { /* Encode the type of the information */ - *buf++ = H5O_SDSPACE_ID; + *(*p)++ = H5O_SDSPACE_ID; /* Encode the version of the dataspace information */ - *buf++ = H5S_ENCODE_VERSION; + *(*p)++ = H5S_ENCODE_VERSION; /* Encode the "size of size" information */ - *buf++ = (unsigned char)H5F_SIZEOF_SIZE(f); + *(*p)++ = (unsigned char)H5F_SIZEOF_SIZE(f); /* Encode size of extent information. Pointer is actually moved in this macro. */ - UINT32ENCODE(buf, extent_size); + UINT32ENCODE(*p, extent_size); /* Encode the extent part of dataspace */ - if(H5O_msg_encode(f, H5O_SDSPACE_ID, TRUE, buf, obj) < 0) + if(H5O_msg_encode(f, H5O_SDSPACE_ID, TRUE, *p, obj) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode extent space") - buf += extent_size; + *p += extent_size; /* Encode the selection part of dataspace. */ - if(H5S_SELECT_SERIALIZE(f, obj, &buf) < 0) + if(H5S_SELECT_SERIALIZE(f, obj, p) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode select space") } /* end else */ @@ -1618,7 +1616,7 @@ H5Sdecode(const void *buf) if(buf == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty buffer") - if((ds = H5S_decode((const unsigned char *)buf)) == NULL) + if((ds = H5S_decode((const unsigned char **)&buf)) == NULL) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, FAIL, "can't decode object") /* Register the type and return the ID */ @@ -1646,8 +1644,8 @@ done: * *------------------------------------------------------------------------- */ -static H5S_t* -H5S_decode(const unsigned char *buf) +H5S_t* +H5S_decode(const unsigned char **p) { H5S_t *ds; H5S_extent_t *extent; @@ -1659,28 +1657,28 @@ H5S_decode(const unsigned char *buf) FUNC_ENTER_NOAPI_NOINIT /* Decode the type of the information */ - if(*buf++ != H5O_SDSPACE_ID) + if(*(*p)++ != H5O_SDSPACE_ID) HGOTO_ERROR(H5E_DATASPACE, H5E_BADMESG, NULL, "not an encoded dataspace") /* Decode the version of the dataspace information */ - if(*buf++ != H5S_ENCODE_VERSION) + if(*(*p)++ != H5S_ENCODE_VERSION) HGOTO_ERROR(H5E_DATASPACE, H5E_VERSION, NULL, "unknown version of encoded dataspace") /* Decode the "size of size" information */ - sizeof_size = *buf++; + sizeof_size = *(*p)++; /* Allocate "fake" file structure */ if(NULL == (f = H5F_fake_alloc(sizeof_size))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate fake file struct") /* Decode size of extent information */ - UINT32DECODE(buf, extent_size); + UINT32DECODE(*p, extent_size); /* Decode the extent part of dataspace */ /* (pass mostly bogus file pointer and bogus DXPL) */ - if((extent = (H5S_extent_t *)H5O_msg_decode(f, H5P_DEFAULT, NULL, H5O_SDSPACE_ID, buf))==NULL) + if((extent = (H5S_extent_t *)H5O_msg_decode(f, H5P_DEFAULT, NULL, H5O_SDSPACE_ID, *p))==NULL) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode object") - buf += extent_size; + *p += extent_size; /* Copy the extent into dataspace structure */ if((ds = H5FL_CALLOC(H5S_t))==NULL) @@ -1696,7 +1694,7 @@ H5S_decode(const unsigned char *buf) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection") /* Decode the select part of dataspace. I believe this part always exists. */ - if(H5S_SELECT_DESERIALIZE(f, &ds, &buf) < 0) + if(H5S_SELECT_DESERIALIZE(f, &ds, p) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode space selection") /* Set return value */ diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 7658f76..91e4513 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -194,6 +194,8 @@ H5_DLL H5S_t *H5S_create(H5S_class_t type); H5_DLL H5S_t *H5S_create_simple(unsigned rank, const hsize_t dims[/*rank*/], const hsize_t maxdims[/*rank*/]); H5_DLL herr_t H5S_set_latest_version(H5S_t *ds); +H5_DLL herr_t H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc); +H5_DLL H5S_t *H5S_decode(const unsigned char **p); H5_DLL herr_t H5S_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent, int fwidth); #ifndef H5_NO_DEPRECATED_SYMBOLS diff --git a/test/vds.c b/test/vds.c index 62b444f..573af9e 100644 --- a/test/vds.c +++ b/test/vds.c @@ -25,6 +25,7 @@ typedef enum { TEST_API_BASIC, TEST_API_COPY_PLIST, + TEST_API_ENCDEC_PLIST, TEST_API_CREATE_DSET, TEST_API_REOPEN_DSET, TEST_API_REOPEN_FILE, @@ -45,7 +46,6 @@ const char *FILENAME[] = { #define TEST_IO_DIFFERENT_FILE 0x02u #define TEST_IO_REOPEN_VIRT 0x04u #define TEST_IO_NTESTS 0x08u -//VDSINC add close source, virtual file #define LIST_DOUBLE_SIZE (H5D_VIRTUAL_DEF_LIST_SIZE + 1) @@ -331,6 +331,7 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, { hid_t file = -1; /* File */ hid_t dset = -1; /* Virtual dataset */ + void *plist_buf = NULL; /* Serialized property list buffer */ HDassert((config >= TEST_API_BASIC) && (config < TEST_API_NTESTS)); HDassert(fapl >= 0); @@ -386,6 +387,25 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, if((*ex_dcpl = H5Pcopy(dcpl)) < 0) TEST_ERROR } /* end if */ + else if(config == TEST_API_ENCDEC_PLIST) { + size_t plist_buf_size; + + /* Encode property list to plist_buf */ + if(H5Pencode(dcpl, NULL, &plist_buf_size) < 0) + TEST_ERROR + if(NULL == (plist_buf = HDmalloc(plist_buf_size))) + TEST_ERROR + if(H5Pencode(dcpl, plist_buf, &plist_buf_size) < 0) + TEST_ERROR + + /* Decode serialized property list to *ex_dcpl */ + if((*ex_dcpl = H5Pdecode(plist_buf)) < 0) + TEST_ERROR + + /* Free plist_buf */ + HDfree(plist_buf); + plist_buf = NULL; + } /* end if */ else { /* Simply copy the id to ex_dcpl and increment the ref count so ex_dcpl * can be closed */ @@ -403,6 +423,8 @@ error: if(dset >= 0) (void)H5Dclose(dset); } H5E_END_TRY; + if(plist_buf) + HDfree(plist_buf); return -1; } /* end test_api_get_ex_dcpl() */ @@ -440,6 +462,9 @@ test_api(test_api_config_t config, hid_t fapl) case TEST_API_COPY_PLIST: TESTING("virtual dataset API functions with copied plists") break; + case TEST_API_ENCDEC_PLIST: + TESTING("virtual dataset API functions with encoded and decoded plists") + break; case TEST_API_CREATE_DSET: TESTING("virtual dataset create") break; -- cgit v0.12 From 49076d6d229abdf59cccac47a86431c977a60037 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 22 Jul 2015 16:41:18 -0500 Subject: [svn-r27425] Implement support for H5Pequal with VDS properties. Testing for H5Pequal with VDS. Tested: ummon --- src/H5Pdcpl.c | 43 ++++++++++++++++++++++++++++++++++++++++++- test/vds.c | 12 ++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 29976c2..bc32274 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -825,7 +825,48 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2, size_t H5_ATTR_ break; case H5D_VIRTUAL: - HDassert(0 && "Not yet implemented...");//VDSINC + { + htri_t equal; + int strcmp_ret; + size_t u; /* Local index variable */ + + /* Compare number of mappings */ + if(layout1->storage.u.virt.list_nused < layout2->storage.u.virt.list_nused) HGOTO_DONE(-1) + if(layout1->storage.u.virt.list_nused > layout2->storage.u.virt.list_nused) HGOTO_DONE(1) + + /* Iterate over mappings */ + for(u = 0; u < layout1->storage.u.virt.list_nused; u++) { + /* Compare virtual spaces. Note we cannot tell which is + * "greater", so just return 1 if different, -1 on failure. + */ + if((equal = H5S_extent_equal(layout1->storage.u.virt.list[u].source_dset.virtual_select, layout2->storage.u.virt.list[u].source_dset.virtual_select)) < 0) HGOTO_DONE(-1) + if(!equal) + HGOTO_DONE(1) + if((equal = H5S_select_shape_same(layout1->storage.u.virt.list[u].source_dset.virtual_select, layout2->storage.u.virt.list[u].source_dset.virtual_select)) < 0) HGOTO_DONE(-1) + if(!equal) + HGOTO_DONE(1) + + /* Compare source file names */ + strcmp_ret = HDstrcmp(layout1->storage.u.virt.list[u].source_file_name, layout2->storage.u.virt.list[u].source_file_name); + if(strcmp_ret < 0) HGOTO_DONE(-1) + if(strcmp_ret > 0) HGOTO_DONE(1) + + /* Compare source dataset names */ + strcmp_ret = HDstrcmp(layout1->storage.u.virt.list[u].source_dset_name, layout2->storage.u.virt.list[u].source_dset_name); + if(strcmp_ret < 0) HGOTO_DONE(-1) + if(strcmp_ret > 0) HGOTO_DONE(1) + + /* Compare source spaces. Note we cannot tell which is + * "greater", so just return 1 if different, -1 on failure. + */ + if((equal = H5S_extent_equal(layout1->storage.u.virt.list[u].source_select, layout2->storage.u.virt.list[u].source_select)) < 0) HGOTO_DONE(-1) + if(!equal) + HGOTO_DONE(1) + if((equal = H5S_select_shape_same(layout1->storage.u.virt.list[u].source_select, layout2->storage.u.virt.list[u].source_select)) < 0) HGOTO_DONE(-1) + if(!equal) + HGOTO_DONE(1) + } /* end for */ + } /* end block */ break; case H5D_LAYOUT_ERROR: diff --git a/test/vds.c b/test/vds.c index 573af9e..04c0e5f 100644 --- a/test/vds.c +++ b/test/vds.c @@ -332,6 +332,7 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, hid_t file = -1; /* File */ hid_t dset = -1; /* Virtual dataset */ void *plist_buf = NULL; /* Serialized property list buffer */ + htri_t tri_ret; HDassert((config >= TEST_API_BASIC) && (config < TEST_API_NTESTS)); HDassert(fapl >= 0); @@ -414,6 +415,17 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, *ex_dcpl = dcpl; } /* end else */ + /* Verify examination DCPL is equal to original DCPL. Do not compare the + * plist to itselt, and do not do the comparison if we reopened the file, + * because in that case the extent of the source dset will not be corrent. + */ + if((*ex_dcpl != dcpl) && (config != TEST_API_REOPEN_FILE)) { + if((tri_ret = H5Pequal(dcpl, *ex_dcpl)) < 0) + TEST_ERROR + if(!tri_ret) + TEST_ERROR + } /* end if */ + return 0; error: -- cgit v0.12 From 679a25a7c437355df289dfd3fbb18a7dfb65d9e8 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 31 Jul 2015 12:47:14 -0500 Subject: [svn-r27450] Add descriptions for all non-public functions. Other comments. Add some input checking. Tested: ummon --- src/H5Dvirtual.c | 21 +++++++++- src/H5Pdcpl.c | 12 ++++-- src/H5Sall.c | 9 ++++- src/H5Shyper.c | 119 ++++++++++++++++++++++++++++++++++++++++++------------- src/H5Snone.c | 7 +++- src/H5Spoint.c | 8 +++- src/H5Sselect.c | 25 +++++++++--- 7 files changed, 156 insertions(+), 45 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 8b8af36..09519bf 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -17,7 +17,24 @@ * Wednesday, January 28, 2015 * * Purpose: - * VDSINC + * Virtual Dataset (VDS) functions. Creates a layout type which allows + * definition of a virtual dataset, where the actual dataset is stored in + * other datasets (called source datasets). The mappings between the + * virtual and source datasets are specified by hyperslab or "all" + * dataspace selections. Point selections are not currently supported. + * Overlaps in the mappings in the virtual dataset result in undefined + * behaviour. + * + * Mapping selections may be unlimited, in which case the size of the + * virtual dataset is determined by the size of the source dataset(s). + * Names for the source datasets may also be generated procedurally, in + * which case the virtual selection should be unlimited with an unlimited + * count and the source selection should be limited with a size equal to + * that of the virtual selection with the unlimited count set to 1. + * + * Source datasets are opened lazily (only when needed for I/O or to + * determine the size of the virtual dataset), and are currently held open + * until the virtual dataset is closed. */ /****************/ @@ -1786,7 +1803,7 @@ done: /*------------------------------------------------------------------------- * Function: H5D__virtual_post_io * - * Purpose: VDSINC + * Purpose: Frees memory structures allocated by H5D__virtual_pre_io. * * Return: Non-negative on success/Negative on failure * diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index bc32274..f687104 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1805,6 +1805,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, H5O_layout_t layout; /* Layout information for setting chunk info */ H5S_t *vspace; /* Virtual dataset space selection */ H5S_t *src_space; /* Source dataset space selection */ + hssize_t nelmts; /* Number of elements */ hbool_t new_layout = FALSE; /* Whether we are adding a new virtual layout message to plist */ H5O_storage_virtual_ent_t *ent = NULL; /* Convenience pointer to new VDS entry */ hbool_t adding_entry = FALSE; /* Whether we are in the middle of adding an entry */ @@ -1824,9 +1825,14 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") if(NULL == (src_space = (H5S_t *)H5I_object_verify(src_space_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") - - //VDSINC add check for overlapping virtual spaces and same number of - // elements in vspace and src_space + nelmts = H5S_GET_SELECT_NPOINTS(vspace); + if((nelmts != H5S_UNLIMITED) + && (nelmts != H5S_GET_SELECT_NPOINTS(src_space))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "virtual and source space selections have different numbers of elements") + /* Check for unlimited selections having the same number of elements in the + * non-unlimited dimensions, and check for printf selections having the + * correct numbers of elements and unlimited/non-unlimited dimensions VDSINC + */ #ifndef H5_HAVE_C99_DESIGNATED_INITIALIZER /* If the compiler doesn't support C99 designated initializers, check if diff --git a/src/H5Sall.c b/src/H5Sall.c index 96ca1e5..1b9ceec 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -676,11 +676,16 @@ H5S_all_offset(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset) PURPOSE Return unlimited dimension of selection, or -1 if none USAGE - VDSINC + int H5S_all_unlim_dim(space) + H5S_t *space; IN: Dataspace pointer to check RETURNS Unlimited dimension of selection, or -1 if none (never fails). DESCRIPTION - VDSINC + Returns the index of the unlimited dimension in this selection, or -1 + if the selection has no unlimited dimension. "All" selections are + always unlimited in every dimension, though this is not reflected in + other calls, where the selection is "clipped" against the current + extent, so for consistency this function always returns -1. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS EXAMPLES diff --git a/src/H5Shyper.c b/src/H5Shyper.c index f0879b6..8736b69 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -2984,11 +2984,13 @@ done: PURPOSE Return unlimited dimension of selection, or -1 if none USAGE - VDSINC + int H5S_hyper_unlim_dim(space) + H5S_t *space; IN: Dataspace pointer to check RETURNS Unlimited dimension of selection, or -1 if none (never fails). DESCRIPTION - VDSINC + Returns the index of the unlimited dimension of the selection, or -1 + if the selection has no unlimited dimension. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS EXAMPLES @@ -9221,7 +9223,11 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned H5_ATTR_UNUSED flags, H5S_se src_intersect_space within the selection of src_space as a selection within the selection of dst_space USAGE - VDSINC + herr_t H5S__hyper_project_intersection(src_space,dst_space,src_intersect_space,proj_space) + H5S_t *src_space; IN: Selection that is mapped to dst_space, and intersected with src_intersect_space + H5S_t *dst_space; IN: Selection that is mapped to src_space, and which contains the result + H5S_t *src_intersect_space; IN: Selection whose intersection with src_space is projected to dst_space to obtain the result + H5S_t *proj_space; OUT: Will contain the result (intersection of src_intersect_space and src_space projected from src_space to dst_space) after the operation RETURNS Non-negative on success/Negative on failure. DESCRIPTION @@ -9621,13 +9627,17 @@ done: NAME H5S__hyper_subtract PURPOSE - VDSINC + Subtract one hyperslab selection from another USAGE - VDSINC + herr_t H5S__hyper_subtract(space,subtract_space) + H5S_t *space; IN/OUT: Selection to be operated on + H5S_t *subtract_space; IN: Selection that will be subtracted from space RETURNS Non-negative on success/Negative on failure. DESCRIPTION - VDSINC + Removes any and all portions of space that are also present in + subtract_space. In essence, performs an A_NOT_B operation with the + two selections. Note this function basically duplicates a subset of the functionality of H5S_select_select(). It should probably be removed when that @@ -9735,7 +9745,12 @@ done: unlimited dimension to include clip_size. The returned selection may extent beyond clip_size. USAGE - VDSINC + void H5S__hyper_get_clip_diminfo(start,stride,count,block,clip_size) + hsize_t start; IN: Start of hyperslab in unlimited dimension + hsize_t stride; IN: Stride of hyperslab in unlimited dimension + hsize_t *count; IN/OUT: Count of hyperslab in unlimited dimension + hsize_t *block; IN/OUT: Block of hyperslab in unlimited dimension + hsize_t clip_size; IN: Extent that hyperslab will be clipped to RETURNS Non-negative on success/Negative on failure. DESCRIPTION @@ -9784,12 +9799,15 @@ H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, Clips the unlimited dimension of the hyperslab selection to the specified size USAGE - VDSINC + void H5S_hyper_clip_unlim(space,clip_size) + H5S_t *space, IN/OUT: Unlimited space to clip + hsize_t clip_size; IN: Extent that hyperslab will be clipped to RETURNS Non-negative on success/Negative on failure. DESCRIPTION - This function recalculates the internal description of the hyperslab - to make the unlimited dimension extend to the specified extent. + This function changes the unlimited selection into a limited selection + with the extent of the formerly unlimited dimension specified by + * clip_size. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS Note this function does not take the offset into account. @@ -9895,13 +9913,23 @@ done: NAME H5S__hyper_get_clip_extent_real PURPOSE - VDSINC + Gets the extent a space should be clipped to in order to contain the + specified number of slices in the unlimited dimension USAGE - VDSINC + hsize_t H5S__hyper_get_clip_extent_real(clip_space,num_slices,incl_trail) + const H5S_t *clip_space, IN: Space that clip size will be calculated based on + hsize_t num_slizes, IN: Number of slices clip_space should contain when clipped + hbool_t incl_trail; IN: Whether to include trailing unselected space RETURNS - Non-negative on success/Negative on failure. + Clip extent to match num_slices (never fails) DESCRIPTION - VDSINC + Calculates and returns the extent that clip_space should be clipped to + (via H5S_hyper_clip_unlim) in order for it to contain num_slices + slices in the unlimited dimension. If the clipped selection would end + immediately before a section of unselected space (i.e. at the end of a + block), then if incl_trail is TRUE, the returned clip extent is + selected to include that trailing "blank" space, otherwise it is + selected to end at the end before the blank space. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS Note this assumes the offset has been normalized. @@ -9970,13 +9998,23 @@ H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, NAME H5S_hyper_get_clip_extent PURPOSE - VDSINC + Gets the extent a space should be clipped to in order to contain the + same number of elements as another space USAGE - VDSINC + hsize_t H5S__hyper_get_clip_extent(clip_space,match_space,incl_trail) + const H5S_t *clip_space, IN: Space that clip size will be calculated based on + const H5S_t *match_space, IN: Space containing the same number of elements as clip_space should after clipping + hbool_t incl_trail; IN: Whether to include trailing unselected space RETURNS - Non-negative on success/Negative on failure. + Calculated clip extent (never fails) DESCRIPTION - VDSINC + Calculates and returns the extent that clip_space should be clipped to + (via H5S_hyper_clip_unlim) in order for it to contain the same number + of elements as match_space. If the clipped selection would end + immediately before a section of unselected space (i.e. at the end of a + block), then if incl_trail is TRUE, the returned clip extent is + selected to include that trailing "blank" space, otherwise it is + selected to end at the end before the blank space. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS Note this assumes the offset has been normalized. @@ -10015,13 +10053,26 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, NAME H5S_hyper_get_clip_extent_match PURPOSE - VDSINC + Gets the extent a space should be clipped to in order to contain the + same number of elements as another unlimited space that has been + clipped to a different extent USAGE - VDSINC + hsize_t H5S__hyper_get_clip_extent_match(clip_space,match_space,match_clip_size,incl_trail) + const H5S_t *clip_space, IN: Space that clip size will be calculated based on + const H5S_t *match_space, IN: Space that, after being clipped to match_clip_size, contains the same number of elements as clip_space should after clipping + hsize_t match_clip_size, IN: Extent match_space would be clipped to to match the number of elements in clip_space + hbool_t incl_trail; IN: Whether to include trailing unselected space RETURNS - Non-negative on success/Negative on failure. + Calculated clip extent (never fails) DESCRIPTION - VDSINC + Calculates and returns the extent that clip_space should be clipped to + (via H5S_hyper_clip_unlim) in order for it to contain the same number + of elements as match_space would have after being clipped to + match_clip_size. If the clipped selection would end immediately + before a section of unselected space (i.e. at the end of a block), + then if incl_trail is TRUE, the returned clip extent is selected to + include that trailing "blank" space, otherwise it is selected to end + at the end before the blank space. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS Note this assumes the offset has been normalized. @@ -10090,13 +10141,18 @@ H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, NAME H5S_hyper_get_unlim_block PURPOSE - VDSINC + Get the nth block in the unlimited dimension USAGE - VDSINC + H5S_t *H5S_hyper_get_unlim_block(space,block_index) + const H5S_t *space, IN: Space with unlimited selection + hsize_t block_index, IN: Index of block to return in unlimited dimension + hbool_t incl_trail; IN: Whether to include trailing unselected space RETURNS New space on success/NULL on failure. DESCRIPTION - VDSINC + Returns a space containing only the block_indexth block in the + unlimited dimension on space. All blocks in all other dimensions are + preserved. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS Note this assumes the offset has been normalized. @@ -10172,13 +10228,20 @@ done: NAME H5S_hyper_get_first_inc_block PURPOSE - VDSINC + Get the index of the first incomplete block in the specified extent USAGE - VDSINC + hsize_t H5S_hyper_get_first_inc_block(space,clip_size,partial) + const H5S_t *space, IN: Space with unlimited selection + hsize_t clip_size, IN: Extent space would be clipped to + hbool_t *partial; OUT: Whether the ret_valueth block (first incomplete block) is partial RETURNS Index of first incomplete block in clip_size (never fails). DESCRIPTION - VDSINC + Calculates and returns the index (as would be passed to + H5S_hyper_get_unlim_block()) of the first block in the unlimited + dimension of space which would be incomplete or missing when space is + clipped to clip_size. partial is set to TRUE if the first incomplete + block is partial, and FALSE if the first incomplete block is missing. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS Note this assumes the offset has been normalized. diff --git a/src/H5Snone.c b/src/H5Snone.c index 196cf54..b4e2f0e 100644 --- a/src/H5Snone.c +++ b/src/H5Snone.c @@ -626,11 +626,14 @@ H5S_none_offset(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUSED *offse PURPOSE Return unlimited dimension of selection, or -1 if none USAGE - VDSINC + int H5S_none_unlim_dim(space) + H5S_t *space; IN: Dataspace pointer to check RETURNS Unlimited dimension of selection, or -1 if none (never fails). DESCRIPTION - VDSINC + Returns the index of the unlimited dimension in this selection, or -1 + if the selection has no unlimited dimension. "None" selections cannot + have an unlimited dimension, so this function always returns -1. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS EXAMPLES diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 8e04b18..1ea4a23 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -1202,11 +1202,15 @@ done: PURPOSE Return unlimited dimension of selection, or -1 if none USAGE - VDSINC + int H5S_point_unlim_dim(space) + H5S_t *space; IN: Dataspace pointer to check RETURNS Unlimited dimension of selection, or -1 if none (never fails). DESCRIPTION - VDSINC + Returns the index of the unlimited dimension in this selection, or -1 + if the selection has no unlimited dimension. Currently point + selections cannot have an unlimited dimension, so this function always + returns -1. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS EXAMPLES diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 535e955..bb74b14 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -2170,16 +2170,25 @@ done: H5S_select_project_intersection PURPOSE - VDSINC + Projects the intersection of of the selections of src_space and + src_intersect_space within the selection of src_space as a selection + within the selection of dst_space USAGE - VDSINC + herr_t H5S_select_project_intersection(src_space,dst_space,src_intersect_space,proj_space) + H5S_t *src_space; IN: Selection that is mapped to dst_space, and intersected with src_intersect_space + H5S_t *dst_space; IN: Selection that is mapped to src_space, and which contains the result + H5S_t *src_intersect_space; IN: Selection whose intersection with src_space is projected to dst_space to obtain the result + H5S_t *proj_space; OUT: Will contain the result (intersection of src_intersect_space and src_space projected from src_space to dst_space) after the operation RETURNS Non-negative on success/Negative on failure. DESCRIPTION - VDSINC + Projects the intersection of of the selections of src_space and + src_intersect_space within the selection of src_space as a selection + within the selection of dst_space. The result is placed in the + selection of proj_space. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS @@ -2259,16 +2268,20 @@ done: H5S_select_subtract PURPOSE - VDSINC + Subtract one selection from another USAGE - VDSINC + herr_t H5S_select_subtract(space,subtract_space) + H5S_t *space; IN/OUT: Selection to be operated on + H5S_t *subtract_space; IN: Selection that will be subtracted from space RETURNS Non-negative on success/Negative on failure. DESCRIPTION - VDSINC + Removes any and all portions of space that are also present in + subtract_space. In essence, performs an A_NOT_B operation with the + two selections. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS -- cgit v0.12 From 98f947ceaedbae472efbebad505680d2ca62b403 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 7 Aug 2015 11:15:39 -0500 Subject: [svn-r27479] Add checking for invalid inputs to H5Dset_virtual: point selections, incorrect numbers of elements selected, incorrect "slice" through limited dimensions, incorrect number of printf substitutions. Patch source selection space extent with bounds of selection if extent is unknown before returning via H5Pget_virtual_srcspace. Write updated VDS dataspace to file when it changes due to unlimited selections. Other minor fixes/cleanup. Tested: ummon --- src/H5Dvirtual.c | 44 ++++++++++++------- src/H5Pdcpl.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++++------- src/H5S.c | 12 +++--- src/H5Sall.c | 1 + src/H5Shyper.c | 45 +++++++++++++++++++ src/H5Snone.c | 1 + src/H5Spkg.h | 6 ++- src/H5Spoint.c | 1 + src/H5Sprivate.h | 4 ++ src/H5Sselect.c | 53 +++++++++++++++++++++-- test/vds.c | 53 +++++++++++++++++++++++ 11 files changed, 306 insertions(+), 42 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 09519bf..db45ceb 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -574,7 +574,7 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, if(HDstrcmp(source_dset->file_name, ".")) { /* Open the source file */ if(NULL == (src_file = H5F_open(source_dset->file_name, H5F_INTENT(vdset->oloc.file) & H5F_ACC_RDWR, H5P_FILE_CREATE_DEFAULT, vdset->shared->layout.storage.u.virt.source_fapl, dxpl_id))) - H5E_clear_stack(NULL); //Quick hack until proper support for H5Fopen with missing file is implemented VDSINC HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENFILE, FAIL, "unable to open source file") + H5E_clear_stack(NULL); /* Quick hack until proper support for H5Fopen with missing file is implemented */ else src_file_open = TRUE; } /* end if */ @@ -591,7 +591,7 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, /* Open the source dataset */ if(NULL == (source_dset->dset = H5D__open_name(&src_root_loc, source_dset->dset_name, vdset->shared->layout.storage.u.virt.source_dapl, dxpl_id))) - H5E_clear_stack(NULL); //Quick hack until proper support for H5Fopen with missing file is implemented VDSINC HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset") + H5E_clear_stack(NULL); /* Quick hack until proper support for H5Dopen with missing file is implemented */ else /* Patch the source selection if necessary */ if(virtual_ent->source_space_status != H5O_VIRTUAL_STATUS_CORRECT) { @@ -1352,13 +1352,21 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) changed = TRUE; } /* end for */ - /* If we did not change the VDS dimensions, there is nothing more to update - */ - if(changed || (!storage->init && (storage->view == H5D_VDS_FIRST_MISSING))) { + /* Update extent if it changed */ + if(changed) { /* Update VDS extent */ if(H5S_set_extent(dset->shared->space, new_dims) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + /* Mark the space as dirty, for later writing to the file */ + if(H5F_INTENT(dset->oloc.file) & H5F_ACC_RDWR) + if(H5D__mark(dset, dxpl_id, H5D_MARK_SPACE) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty") + } /* end if */ + + /* If we did not change the VDS dimensions, there is nothing more to update + */ + if(changed || (!storage->init && (storage->view == H5D_VDS_FIRST_MISSING))) { /* Iterate over mappings again to update source selections and virtual * mapping extents */ for(i = 0; i < storage->list_nalloc; i++) { @@ -1516,7 +1524,6 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) } /* end for */ } /* end if */ - /* Call H5D__mark so dataspace is updated on disk? VDSINC */ /* Mark layout as fully initialized */ storage->init = TRUE; @@ -1555,14 +1562,16 @@ H5D__virtual_init(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const H5D_t *dset, storage = &dset->shared->layout.storage.u.virt; HDassert(storage->list || (storage->list_nused == 0)); - /* Patch the virtual selection dataspaces */ + /* Patch the virtual selection dataspaces. Note we always patch the space + * status because this layout could be from an old version held in the + * object header message code. We cannot update that held message because + * the layout message is constant, so just overwrite the values here (and + * invalidate other fields by setting storage->init to FALSE below). */ for(i = 0; i < storage->list_nused; i++) { - if(storage->list[i].virtual_space_status != H5O_VIRTUAL_STATUS_CORRECT) { - if(H5S_extent_copy(storage->list[i].source_dset.virtual_select, dset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") - storage->list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; - HDassert(storage->list[i].sub_dset_nalloc == 0); - } /* end if */ + if(H5S_extent_copy(storage->list[i].source_dset.virtual_select, dset->shared->space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") + storage->list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; + HDassert(storage->list[i].sub_dset_nalloc == 0); } /* end for */ /* Get dataset access property list */ @@ -1589,6 +1598,10 @@ H5D__virtual_init(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const H5D_t *dset, if((storage->source_dapl = H5P_copy_plist(dapl, FALSE)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dapl") + /* Mark layout as not fully initialized (must be done prior to I/O for + * unlimited/printf selections) */ + storage->init = FALSE; + done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_init() */ @@ -2069,8 +2082,9 @@ H5D__virtual_write_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, HDassert(source_dset->dset); HDassert(source_dset->clipped_source_select); - /* Extend source dataset if necessary and there is an unlimited - * dimension VDSINC */ + /* In the future we may wish to extent this implementation to extend + * source datasets if a write to a virtual dataset goes past the current + * extent in the unlimited dimension. -NAF */ /* Project intersection of file space and mapping virtual space onto * mapping source space */ if(H5S_select_project_intersection(source_dset->virtual_select, source_dset->clipped_source_select, file_space, &projected_src_space) < 0) diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index f687104..0c6184b 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1805,7 +1805,10 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, H5O_layout_t layout; /* Layout information for setting chunk info */ H5S_t *vspace; /* Virtual dataset space selection */ H5S_t *src_space; /* Source dataset space selection */ - hssize_t nelmts; /* Number of elements */ + H5S_sel_type select_type; /* Selection type */ + hsize_t nelmts_vs; /* Number of elements in virtual selection */ + hsize_t nelmts_ss; /* Number of elements in source selection */ + H5S_t *tmp_space = NULL; /* Temporary dataspace */ hbool_t new_layout = FALSE; /* Whether we are adding a new virtual layout message to plist */ H5O_storage_virtual_ent_t *ent = NULL; /* Convenience pointer to new VDS entry */ hbool_t adding_entry = FALSE; /* Whether we are in the middle of adding an entry */ @@ -1825,14 +1828,43 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") if(NULL == (src_space = (H5S_t *)H5I_object_verify(src_space_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") - nelmts = H5S_GET_SELECT_NPOINTS(vspace); - if((nelmts != H5S_UNLIMITED) - && (nelmts != H5S_GET_SELECT_NPOINTS(src_space))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "virtual and source space selections have different numbers of elements") - /* Check for unlimited selections having the same number of elements in the - * non-unlimited dimensions, and check for printf selections having the - * correct numbers of elements and unlimited/non-unlimited dimensions VDSINC - */ + + /* Check for point selections (currently unsupported) */ + if(H5S_SEL_ERROR == (select_type = H5S_GET_SELECT_TYPE(vspace))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get selection type") + if(select_type == H5S_SEL_POINTS) + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "point selections not currently supported with virtual datasets") + if(H5S_SEL_ERROR == (select_type = H5S_GET_SELECT_TYPE(src_space))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get selection type") + if(select_type == H5S_SEL_POINTS) + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "point selections not currently supported with virtual datasets") + + /* Get number of elements in spaces */ + nelmts_vs = (hsize_t)H5S_GET_SELECT_NPOINTS(vspace); + nelmts_ss = (hsize_t)H5S_GET_SELECT_NPOINTS(src_space); + + /* Check for unlimited vspace */ + if(nelmts_vs == H5S_UNLIMITED) { + /* Check for unlimited src_space */ + if(nelmts_ss == H5S_UNLIMITED) { + hsize_t nenu_vs; /* Number of elements in the non-unlimited dimensions of vspace */ + hsize_t nenu_ss; /* Number of elements in the non-unlimited dimensions of src_space */ + + /* Non-printf unlimited selection. Make sure both selections have + * the same number of elements in the non-unlimited dimension */ + if(H5S_get_select_num_elem_non_unlim(vspace, &nenu_vs) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOUNT, FAIL, "can't get number of elements in non-unlimited dimension") + if(H5S_get_select_num_elem_non_unlim(src_space, &nenu_ss) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOUNT, FAIL, "can't get number of elements in non-unlimited dimension") + if(nenu_vs != nenu_ss) + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "numbers of elemnts in the non-unlimited dimensions is different for source and virtual spaces") + } /* end if */ + /* We will handle the printf case after parsing the source names */ + } /* end if */ + else + /* Limited selections. Check number of points is the same. */ + if(nelmts_vs != nelmts_ss) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "virtual and source space selections have different numbers of elements") #ifndef H5_HAVE_C99_DESIGNATED_INITIALIZER /* If the compiler doesn't support C99 designated initializers, check if @@ -1913,7 +1945,6 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, ent->source_dset.clipped_source_select = ent->source_select; ent->source_dset.clipped_virtual_select = ent->source_dset.virtual_select; } /* end if */ - ent->unlim_extent_source = HSIZE_UNDEF; ent->unlim_extent_virtual = HSIZE_UNDEF; ent->clip_size_source = HSIZE_UNDEF; @@ -1921,6 +1952,38 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, ent->source_space_status = H5O_VIRTUAL_STATUS_USER; ent->virtual_space_status = H5O_VIRTUAL_STATUS_USER; + /* Check for printf selection */ + if((nelmts_vs == H5S_UNLIMITED) && (nelmts_ss != H5S_UNLIMITED)) { + /* Make sure there at least one %b substitution in the source file or + * dataset name */ + if((ent->psfn_nsubs == 0) && (ent->psdn_nsubs == 0)) + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unlimited virtual selection, limited source selection, and no printf specifiers in source names") + + /* Make sure virtual space uses hyperslab selection */ + if(H5S_GET_SELECT_TYPE(vspace) != H5S_SEL_HYPERSLABS) + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "virtual selection with printf mapping must be hyperslab") + + /* Get first block in virtual selection */ + if(NULL == (tmp_space = H5S_hyper_get_unlim_block(vspace, (hsize_t)0))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get first block in virtual selection") + + /* Check that the number of elements in one block in the virtual + * selection matches the total number of elements in the source + * selection */ + nelmts_vs = (hsize_t)H5S_GET_SELECT_NPOINTS(tmp_space); + if(nelmts_vs != nelmts_ss) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "virtual (single block) and source space selections have different numbers of elements") + + /* Close tmp_space */ + if(H5S_close(tmp_space) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CLOSEERROR, FAIL, "can't close dataspace") + tmp_space = NULL; + } /* end if */ + else + /* Make sure there are no printf substitutions */ + if((ent->psfn_nsubs > 0) || (ent->psdn_nsubs > 0)) + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "printf specifier(s) in source name(s) without an unlimited virtual selection and limited source selection") + /* Update min_dims */ if(H5D_virtual_update_min_dims(&layout, layout.storage.u.virt.list_nused) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to update virtual dataset minimum dimensions") @@ -1972,6 +2035,11 @@ done: /* Free list if necessary */ if(free_list) layout.storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_xfree(layout.storage.u.virt.list); + + /* Free temporary space */ + if(tmp_space) + if(H5S_close(tmp_space) < 0) + HDONE_ERROR(H5E_PLIST, H5E_CLOSEERROR, FAIL, "can't close dataspace") } /* end if */ } /* end if */ @@ -2108,14 +2176,44 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index) if(H5D_VIRTUAL != layout.type) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") - /* Attempt to open source dataset and patch extent if extent status is not - * H5O_VIRTUAL_STATUS_CORRECT, otherwise if status is - * H5O_VIRTUAL_STATUS_INVALID, patch with bounds of selection VDSINC */ - - /* Get the source space */ + /* Check index */ if(index >= layout.storage.u.virt.list_nused) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); + + /* Attempt to open source dataset and patch extent if extent status is not + * H5O_VIRTUAL_STATUS_CORRECT? -NAF */ + /* If source space status is H5O_VIRTUAL_STATUS_INVALID, patch with bounds + * of selection */ + if((layout.storage.u.virt.list[index].source_space_status + == H5O_VIRTUAL_STATUS_INVALID) + && (layout.storage.u.virt.list[index].unlim_dim_source < 0)) { + hsize_t bounds_start[H5S_MAX_RANK]; + hsize_t bounds_end[H5S_MAX_RANK]; + int rank; + int i; + + /* Get rank of source space */ + if((rank = H5S_GET_EXTENT_NDIMS(layout.storage.u.virt.list[index].source_select)) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get source space rank") + + /* Get bounds of selection */ + if(H5S_SELECT_BOUNDS(layout.storage.u.virt.list[index].source_select, bounds_start, bounds_end) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get selection bounds") + + /* Adjust bounds to extent */ + for(i = 0; i < rank; i++) + bounds_end[i]++; + + /* Set extent */ + if(H5S_set_extent_simple(layout.storage.u.virt.list[index].source_select, (unsigned)rank, bounds_end, NULL) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set source space extent") + + /* Update source space status */ + layout.storage.u.virt.list[index].source_space_status = H5O_VIRTUAL_STATUS_SEL_BOUNDS; + } /* end if */ + + /* Get the source space */ if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].source_select, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection") diff --git a/src/H5S.c b/src/H5S.c index 6a6f45a..d8ab37c 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -1268,7 +1268,7 @@ H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[/*rank*/], } /* Do it */ - if (H5S__set_extent_simple(space, (unsigned)rank, dims, max)<0) + if (H5S_set_extent_simple(space, (unsigned)rank, dims, max)<0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set simple extent") done: @@ -1277,7 +1277,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5S__set_extent_simple + * Function: H5S_set_extent_simple * * Purpose: This is where the real work happens for * H5Sset_extent_simple(). @@ -1292,13 +1292,13 @@ done: *------------------------------------------------------------------------- */ herr_t -H5S__set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, +H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, const hsize_t *max) { unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE + FUNC_ENTER_NOAPI(FAIL) /* Check args */ HDassert(rank <= H5S_MAX_RANK); @@ -1354,7 +1354,7 @@ H5S__set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5S__set_extent_simple() */ +} /* H5S_set_extent_simple() */ /*------------------------------------------------------------------------- @@ -1465,7 +1465,7 @@ H5S_create_simple(unsigned rank, const hsize_t dims[/*rank*/], /* Create the space and set the extent */ if(NULL==(ret_value=H5S_create(H5S_SIMPLE))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "can't create simple dataspace") - if(H5S__set_extent_simple(ret_value,rank,dims,maxdims)<0) + if(H5S_set_extent_simple(ret_value,rank,dims,maxdims)<0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "can't set dimensions") done: diff --git a/src/H5Sall.c b/src/H5Sall.c index 1b9ceec..7e33980 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -78,6 +78,7 @@ const H5S_select_class_t H5S_sel_all[1] = {{ H5S_all_bounds, H5S_all_offset, H5S_all_unlim_dim, + NULL, H5S_all_is_contiguous, H5S_all_is_single, H5S_all_is_regular, diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 8736b69..898c3df 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -65,6 +65,8 @@ static herr_t H5S_hyper_deserialize(const H5F_t *f, H5S_t *space, static herr_t H5S_hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_hyper_offset(const H5S_t *space, hsize_t *offset); static int H5S_hyper_unlim_dim(const H5S_t *space); +static herr_t H5S_hyper_num_elem_non_unlim(const H5S_t *space, + hsize_t *num_elem_non_unlim); static htri_t H5S_hyper_is_contiguous(const H5S_t *space); static htri_t H5S_hyper_is_single(const H5S_t *space); static htri_t H5S_hyper_is_regular(const H5S_t *space); @@ -102,6 +104,7 @@ const H5S_select_class_t H5S_sel_hyper[1] = {{ H5S_hyper_bounds, H5S_hyper_offset, H5S_hyper_unlim_dim, + H5S_hyper_num_elem_non_unlim, H5S_hyper_is_contiguous, H5S_hyper_is_single, H5S_hyper_is_regular, @@ -3007,6 +3010,48 @@ H5S_hyper_unlim_dim(const H5S_t *space) /*-------------------------------------------------------------------------- NAME + H5S_hyper_num_elem_non_unlim + PURPOSE + Return number of elements in the non-unlimited dimensions + USAGE + herr_t H5S_hyper_num_elem_non_unlim(space,num_elem_non_unlim) + H5S_t *space; IN: Dataspace pointer to check + hsize_t *num_elem_non_unlim; OUT: Number of elements in the non-unlimited dimensions + RETURNS + Non-negative on success/Negative on failure + DESCRIPTION + Returns the number of elements in a slice through the non-unlimited + dimensions of the selection. Fails if the selection has no unlimited + dimension. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +static herr_t +H5S_hyper_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unlim) +{ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI(FAIL) + + /* Sanity check */ + HDassert(space); + HDassert(num_elem_non_unlim); + + /* Get number of elements in the non-unlimited dimensions */ + if(space->select.sel_info.hslab->unlim_dim >= 0) + *num_elem_non_unlim = space->select.sel_info.hslab->num_elem_non_unlim; + else + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "selection has no unlimited dimension") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5S_hyper_num_elem_non_unlim() */ + + +/*-------------------------------------------------------------------------- + NAME H5S_hyper_is_contiguous PURPOSE Check if a hyperslab selection is contiguous within the dataspace extent. diff --git a/src/H5Snone.c b/src/H5Snone.c index b4e2f0e..23433a1 100644 --- a/src/H5Snone.c +++ b/src/H5Snone.c @@ -79,6 +79,7 @@ const H5S_select_class_t H5S_sel_none[1] = {{ H5S_none_bounds, H5S_none_offset, H5S_none_unlim_dim, + NULL, H5S_none_is_contiguous, H5S_none_is_single, H5S_none_is_regular, diff --git a/src/H5Spkg.h b/src/H5Spkg.h index 7805777..f719201 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -154,6 +154,9 @@ typedef herr_t (*H5S_sel_bounds_func_t)(const H5S_t *space, hsize_t *start, hsiz typedef herr_t (*H5S_sel_offset_func_t)(const H5S_t *space, hsize_t *offset); /* Method to get unlimited dimension of selection (or -1 for none) */ typedef int (*H5S_sel_unlim_dim_func_t)(const H5S_t *space); +/* Method to get the number of elements in a slice through the unlimited dimension */ +typedef herr_t (*H5S_sel_num_elem_non_unlim_func_t)(const H5S_t *space, + hsize_t *num_elem_non_unlim); /* Method to determine if current selection is contiguous */ typedef htri_t (*H5S_sel_is_contiguous_func_t)(const H5S_t *space); /* Method to determine if current selection is a single block */ @@ -184,6 +187,7 @@ typedef struct { H5S_sel_bounds_func_t bounds; /* Method to determine to smallest n-D bounding box containing the current selection */ H5S_sel_offset_func_t offset; /* Method to determine linear offset of initial element in selection within dataspace */ H5S_sel_unlim_dim_func_t unlim_dim; /* Method to get unlimited dimension of selection (or -1 for none) */ + H5S_sel_num_elem_non_unlim_func_t num_elem_non_unlim; /* Method to get the number of elements in a slice through the unlimited dimension */ H5S_sel_is_contiguous_func_t is_contiguous; /* Method to determine if current selection is contiguous */ H5S_sel_is_single_func_t is_single; /* Method to determine if current selection is a single block */ H5S_sel_is_regular_func_t is_regular; /* Method to determine if current selection is "regular" */ @@ -262,8 +266,6 @@ H5_DLLVAR const H5S_select_class_t H5S_sel_none[1]; H5_DLLVAR const H5S_select_class_t H5S_sel_point[1]; /* Extent functions */ -H5_DLL herr_t H5S__set_extent_simple(H5S_t *space, unsigned rank, - const hsize_t *dims, const hsize_t *max); H5_DLL herr_t H5S_extent_release(H5S_extent_t *extent); H5_DLL herr_t H5S_extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max); diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 1ea4a23..d10b600 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -80,6 +80,7 @@ const H5S_select_class_t H5S_sel_point[1] = {{ H5S_point_bounds, H5S_point_offset, H5S_point_unlim_dim, + NULL, H5S_point_is_contiguous, H5S_point_is_single, H5S_point_is_regular, diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 91e4513..8918a4f 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -190,6 +190,8 @@ H5_DLL herr_t H5S_append(H5F_t *f, hid_t dxpl_id, struct H5O_t *oh, H5S_t *ds); H5_DLL H5S_t *H5S_read(const struct H5O_loc_t *loc, hid_t dxpl_id); H5_DLL htri_t H5S_set_extent(H5S_t *space, const hsize_t *size); H5_DLL herr_t H5S_set_extent_real(H5S_t *space, const hsize_t *size); +H5_DLL herr_t H5S_set_extent_simple(H5S_t *space, unsigned rank, + const hsize_t *dims, const hsize_t *max); H5_DLL H5S_t *H5S_create(H5S_class_t type); H5_DLL H5S_t *H5S_create_simple(unsigned rank, const hsize_t dims[/*rank*/], const hsize_t maxdims[/*rank*/]); @@ -221,6 +223,8 @@ H5_DLL hssize_t H5S_get_select_npoints(const H5S_t *space); H5_DLL herr_t H5S_get_select_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); H5_DLL herr_t H5S_get_select_offset(const H5S_t *space, hsize_t *offset); H5_DLL int H5S_get_select_unlim_dim(const H5S_t *space); +H5_DLL herr_t H5S_get_select_num_elem_non_unlim(const H5S_t *space, + hsize_t *num_elem_non_unlim); H5_DLL herr_t H5S_select_offset(H5S_t *space, const hssize_t *offset); H5_DLL herr_t H5S_select_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection); H5_DLL htri_t H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2); diff --git a/src/H5Sselect.c b/src/H5Sselect.c index bb74b14..86a8c43 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -507,7 +507,7 @@ H5S_select_deserialize(const H5F_t *f, H5S_t **space, const uint8_t **p) /* Patch the rank of the allocated dataspace */ (void)HDmemset(dims, 0, (size_t)rank * sizeof(dims[0])); - if(H5S__set_extent_simple(tmp_space, rank, dims, NULL) < 0) + if(H5S_set_extent_simple(tmp_space, rank, dims, NULL) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set dimensions") } /* end if */ else @@ -731,6 +731,51 @@ H5S_get_select_unlim_dim(const H5S_t *space) /*-------------------------------------------------------------------------- NAME + H5S_get_select_num_elem_non_unlim + PURPOSE + Gets the number of elements in the non-unlimited dimensions + USAGE + herr_t H5S_get_select_num_elem_non_unlim(space,num_elem_non_unlim) + H5S_t *space; IN: Dataspace pointer to check + hsize_t *num_elem_non_unlim; OUT: Number of elements in the non-unlimited dimensions + RETURNS + Non-negative on success/Negative on failure + DESCRIPTION + Returns the number of elements in a slice through the non-unlimited + dimensions of the selection. Fails if the selection has no unlimited + dimension. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5S_get_select_num_elem_non_unlim(const H5S_t *space, + hsize_t *num_elem_non_unlim) +{ + herr_t ret_value = SUCCEED; /* return value */ + + FUNC_ENTER_NOAPI(FAIL) + + /* Check args */ + HDassert(space); + HDassert(num_elem_non_unlim); + + /* Check for selection callback */ + if(!space->select.type->num_elem_non_unlim) + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "selection type has no num_elem_non_unlim callback") + + /* Make selection callback */ + if((*space->select.type->num_elem_non_unlim)(space, num_elem_non_unlim) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't get number of elements in non-unlimited dimension") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5S_get_select_unlim_dim() */ + + +/*-------------------------------------------------------------------------- + NAME H5S_select_is_contiguous PURPOSE Determines if a selection is contiguous in the dataspace @@ -2240,7 +2285,7 @@ H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, else if((src_intersect_space->select.type->type == H5S_SEL_POINTS) || (src_space->select.type->type == H5S_SEL_POINTS) || (dst_space->select.type->type == H5S_SEL_POINTS)) - HDassert(0 && "Not yet implemented...");//VDSINC + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "point selections not currently supported") else { HDassert(src_intersect_space->select.type->type == H5S_SEL_HYPERSLABS); /* Intersecting space is hyperslab selection. Call the hyperslab @@ -2314,7 +2359,7 @@ H5S_select_subtract(H5S_t *space, H5S_t *subtract_space) /* Check for point selection in subtract_space, convert to * hyperslab */ if(subtract_space->select.type->type == H5S_SEL_POINTS) - HDassert(0 && "Not yet implemented...");//VDSINC + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "point selections not currently supported") /* Check for point or all selection in space, convert to hyperslab */ @@ -2340,7 +2385,7 @@ H5S_select_subtract(H5S_t *space, H5S_t *subtract_space) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection") } /* end if */ else if(space->select.type->type == H5S_SEL_POINTS) - HDassert(0 && "Not yet implemented...");//VDSINC + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "point selections not currently supported") HDassert(space->select.type->type == H5S_SEL_HYPERSLABS); HDassert(subtract_space->select.type->type == H5S_SEL_HYPERSLABS); diff --git a/test/vds.c b/test/vds.c index 04c0e5f..547f775 100644 --- a/test/vds.c +++ b/test/vds.c @@ -461,6 +461,7 @@ test_api(test_api_config_t config, hid_t fapl) hsize_t block[2]; /* Hyperslab block */ hsize_t coord[10]; /* Point selection array */ size_t size_out; + herr_t ret; unsigned i; /* Initialize vspace */ @@ -616,6 +617,7 @@ test_api(test_api_config_t config, hid_t fapl) ex_dcpl = -1; +#ifdef VDS_POINT_SELECTIONS /* VDS does not currently support point selections */ /* * Test 3: Point - point selection */ @@ -892,6 +894,57 @@ test_api(test_api_config_t config, hid_t fapl) if(H5Pclose(ex_dcpl) < 0) TEST_ERROR ex_dcpl = -1; +#else /* VDS_POINT_SELECTIONS */ + /* + * Test 3: Verify point selections fail + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create source dataspace */ + if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Create virtual dataspace */ + if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select points in source space */ + coord[0] = 5; + coord[1] = 15; + coord[2] = 7; + coord[3] = 19; + coord[4] = 8; + coord[5] = 0; + coord[6] = 2; + coord[7] = 14; + coord[8] = 8; + coord[9] = 18; + if(H5Sselect_elements(srcspace[0], H5S_SELECT_SET, (size_t)5, coord) < 0) + TEST_ERROR + + /* Select points in virtual space */ + coord[0] = 3; + coord[1] = 12; + coord[2] = 7; + coord[3] = 11; + coord[4] = 4; + coord[5] = 9; + coord[6] = 7; + coord[7] = 11; + coord[8] = 5; + coord[9] = 5; + if(H5Sselect_elements(vspace[0], H5S_SELECT_SET, (size_t)5, coord) < 0) + TEST_ERROR + + /* Attempt to add virtual layout mapping */ + H5E_BEGIN_TRY { + ret = H5Pset_virtual(dcpl, vspace[0], src_file[0], src_dset[0], srcspace[0]); + } H5E_END_TRY + if(ret >= 0) + TEST_ERROR +#endif /* VDS_POINT_SELECTIONS */ /* -- cgit v0.12 From 0c4ec00cba82a900d22c3ba9bb0403a6b4cf8208 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 7 Aug 2015 15:06:56 -0500 Subject: [svn-r27481] Add support for offset selections passed to H5Pset_virtual. Add test for this. Tested: ummon --- src/H5Dvirtual.c | 16 ++++- test/vds.c | 197 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 207 insertions(+), 6 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index db45ceb..04f42c9 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -1552,6 +1552,7 @@ H5D__virtual_init(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const H5D_t *dset, { H5O_storage_virtual_t *storage; /* Convenience pointer */ H5P_genplist_t *dapl; /* Data access property list object pointer */ + hssize_t old_offset[H5O_LAYOUT_NDIMS]; /* Old selection offset (unused) */ size_t i; /* Local index variables */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1566,12 +1567,23 @@ H5D__virtual_init(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const H5D_t *dset, * status because this layout could be from an old version held in the * object header message code. We cannot update that held message because * the layout message is constant, so just overwrite the values here (and - * invalidate other fields by setting storage->init to FALSE below). */ + * invalidate other fields by setting storage->init to FALSE below). Also + * remove offset from selections. We only have to update + * source_space_status and virtual_space_status because others will be based + * on these and should therefore already have been normalized. */ for(i = 0; i < storage->list_nused; i++) { + HDassert(storage->list[i].sub_dset_nalloc == 0); + + /* Patch extent */ if(H5S_extent_copy(storage->list[i].source_dset.virtual_select, dset->shared->space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") storage->list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; - HDassert(storage->list[i].sub_dset_nalloc == 0); + + /* Normalize offsets, toss out old offset values */ + if(H5S_hyper_normalize_offset(storage->list[i].source_dset.virtual_select, old_offset) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset") + if(H5S_hyper_normalize_offset(storage->list[i].source_select, old_offset) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset") } /* end for */ /* Get dataset access property list */ diff --git a/test/vds.c b/test/vds.c index 547f775..64a72f5 100644 --- a/test/vds.c +++ b/test/vds.c @@ -1104,6 +1104,7 @@ test_basic_io(unsigned config, hid_t fapl) hsize_t stride[4]; /* Hyperslab stride */ hsize_t count[4]; /* Hyperslab count */ hsize_t block[4]; /* Hyperslab block */ + hssize_t offset[2] = {0, 0}; /* Selection offset */ int buf[10][26]; /* Write and expected read buffer */ int rbuf[10][26]; /* Read buffer */ int rbuf99[9][9]; /* 9x9 Read buffer */ @@ -1606,7 +1607,195 @@ test_basic_io(unsigned config, hid_t fapl) /* - * Test 3: 2 Source datasets, hyperslab virtual mappings on one mapping at a + * Test 3: 2 Source datasets, hyperslab virtual mappings with offsets + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Create source dataspace */ + dims[1] = 13; + if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select all in source space (should not be necessary, but just to be sure) + */ + if(H5Sselect_all(srcspace[0]) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual spaces */ + start[0] = 0; + start[1] = 3; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Add virtual layout mappings */ + offset[1] = -3; + if(H5Soffset_simple(vspace[0], offset) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "%%src_dset1", srcspace[0]) < 0) + TEST_ERROR + offset[1] = 10; + if(H5Soffset_simple(vspace[0], offset) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2%%", srcspace[0]) < 0) + TEST_ERROR + + /* Reset dims */ + dims[1] = 26; + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create source datasets */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "%src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2%", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] = (i * (int)(sizeof(buf[0]) / sizeof(buf[0][0]))) + j; + + /* Write data directly to source datasets */ + offset[1] = -3; + if(H5Soffset_simple(vspace[0], offset) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + offset[1] = 10; + if(H5Soffset_simple(vspace[0], offset) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Read data through virtual dataset */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + if(H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != buf[i][j]) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0])); + + /* Write data through virtual dataset */ + if(H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Reopen srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Read data directly from source datasets */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + offset[1] = -3; + if(H5Soffset_simple(vspace[0], offset) < 0) + TEST_ERROR + if(H5Dread(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + offset[1] = 10; + if(H5Soffset_simple(vspace[0], offset) < 0) + TEST_ERROR + if(H5Dread(srcdset[1], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) + for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++) + if(rbuf[i][j] != buf[i][j]) + TEST_ERROR + + /* Close */ + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + + + /* + * Test 4: 2 Source datasets, hyperslab virtual mappings on one mapping at a * time, '%' in source file name */ /* Clear virtual layout in DCPL */ @@ -1809,7 +1998,7 @@ test_basic_io(unsigned config, hid_t fapl) /* - * Test 4: 2 Source datasets, hyperslab virtual mappings and selections + * Test 5: 2 Source datasets, hyperslab virtual mappings and selections */ /* Clear virtual layout in DCPL */ if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) @@ -2090,7 +2279,7 @@ test_basic_io(unsigned config, hid_t fapl) /* - * Test 5: 2 Source datasets, checkerboard/stripe pattern to trigger + * Test 6: 2 Source datasets, checkerboard/stripe pattern to trigger * sequence list refresh internally */ /* Clear virtual layout in DCPL */ @@ -2383,7 +2572,7 @@ test_basic_io(unsigned config, hid_t fapl) /* - * Test 6: 1 Source dataset, two mappings, 4 dimensional virtual dataset + * Test 7: 1 Source dataset, two mappings, 4 dimensional virtual dataset * and 3 dimensional source dataset */ /* Clear virtual layout in DCPL */ -- cgit v0.12 From 1ba3706640c9280aa1900cbe934a716733131176 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 12 Aug 2015 13:19:48 -0500 Subject: [svn-r27498] Add support for I/O after reopening a VDS with unlimited and/or printf mappings without calling H5Dget_space first. Add tests for this. Other minor fixes/cleanup. Tested: ummon --- src/H5Dvirtual.c | 369 ++++++++++++++++++++++++++++++++++++++++++++----------- test/vds.c | 153 +++++++++++++++++++++++ 2 files changed, 449 insertions(+), 73 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 04f42c9..3407e00 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -100,16 +100,17 @@ static herr_t H5D__virtual_copy_parsed_name( static herr_t H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name_seg_t *parsed_name, size_t static_strlen, size_t nsubs, hsize_t blockno, char **built_name); +static herr_t H5D__virtual_init_all(const H5D_t *dset, hid_t dxpl_id); +static herr_t H5D__virtual_pre_io(H5D_io_info_t *io_info, + H5O_storage_virtual_t *storage, const H5S_t *file_space, + const H5S_t *mem_space, hsize_t *tot_nelmts); +static herr_t H5D__virtual_post_io(H5O_storage_virtual_t *storage); static herr_t H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, const H5S_t *file_space, H5O_storage_virtual_srcdset_t *source_dset); static herr_t H5D__virtual_write_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, const H5S_t *file_space, H5O_storage_virtual_srcdset_t *source_dset); -static herr_t H5D__virtual_pre_io(H5D_io_info_t *io_info, - H5O_storage_virtual_t *storage, const H5S_t *file_space, - const H5S_t *mem_space, hsize_t *tot_nelmts); -static herr_t H5D__virtual_post_io(H5O_storage_virtual_t *storage); /*********************/ @@ -482,8 +483,8 @@ H5D__virtual_copy(H5F_t H5_ATTR_UNUSED *f_dst, H5O_layout_t *layout_dst, else #endif /* NOT_YET */ { - /* Reset global heap id so a new heap objerct is created when the - * message is flushed */ + /* Reset global heap id so a new heap object is created when the message + * is flushed */ layout_dst->storage.u.virt.serial_list_hobjid.addr = HADDR_UNDEF; layout_dst->storage.u.virt.serial_list_hobjid.idx = (size_t)0; } /* end block/else */ @@ -1109,7 +1110,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) hsize_t clip_size; int rank; hbool_t changed = FALSE; /* Whether the VDS extent changed */ - size_t i, j, k; + size_t i, j; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -1452,41 +1453,14 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) storage->list[i].sub_dset[j].clipped_virtual_select = storage->list[i].sub_dset[j].virtual_select; } /* end if */ - /* Check for partial block */ - else if(partial_block && (j == (size_t)first_inc_block)) { - /* Partial block, must clip source and virtual - * selections */ - hsize_t start[H5S_MAX_RANK]; - - /* Get bounds of virtual selection */ - if(H5S_SELECT_BOUNDS(storage->list[i].sub_dset[j].virtual_select, start, curr_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") - - /* Convert bounds to extent (add 1) */ - for(k = 0; k < (size_t)rank; k++) - curr_dims[k]++; - - /* Temporarily set extent of virtual selection to bounds */ - if(H5S_set_extent(storage->list[i].sub_dset[j].virtual_select, curr_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") - - /* Copy virtual selection */ - if(NULL == (storage->list[i].sub_dset[j].clipped_virtual_select = H5S_copy(storage->list[i].sub_dset[j].virtual_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") - - /* Clip virtual selection to real virtual extent */ - (void)HDmemset(start, 0, sizeof(start)); - if(H5S_select_hyperslab(storage->list[i].sub_dset[j].clipped_virtual_select, H5S_SELECT_AND, start, NULL, new_dims, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to clip hyperslab") - - /* Project intersection of virtual space and clipped - * virtual space onto source space */ - if(H5S_select_project_intersection(storage->list[i].sub_dset[j].virtual_select, storage->list[i].source_select, storage->list[i].sub_dset[j].clipped_virtual_select, &storage->list[i].sub_dset[j].clipped_source_select) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") - } /* end if */ - else if(j >= (size_t)first_inc_block) { - /* Unused block, clear clipped source and virtual - * selections */ + /* Only initialize clipped selections if it is a + * complete block, for incomplete blocks defer to + * H5D__virtual_pre_io() as we may not have a valid + * source extent here. For unused blocks we will never + * need clipped selections (until the extent is + * recalculated in this function). */ + if(j >= (size_t)first_inc_block) { + /* Clear clipped source and virtual selections */ storage->list[i].sub_dset[j].clipped_source_select = NULL; storage->list[i].sub_dset[j].clipped_virtual_select = NULL; } /* end if */ @@ -1524,7 +1498,6 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) } /* end for */ } /* end if */ - /* Mark layout as fully initialized */ storage->init = TRUE; @@ -1534,6 +1507,185 @@ done: /*------------------------------------------------------------------------- + * Function: H5D__virtual_init_all + * + * Purpose: Finishes initializing layout in preparation for I/O. + * Only necessary if H5D__virtual_set_extent_unlim() has not + * been called yet. Initializes clipped_virtual_select and + * clipped_source_select for all mappings in this layout. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * August 10, 2015 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5D__virtual_init_all(const H5D_t *dset, hid_t dxpl_id) +{ + H5O_storage_virtual_t *storage; + hsize_t virtual_dims[H5S_MAX_RANK]; + hsize_t source_dims[H5S_MAX_RANK]; + hsize_t clip_size; + size_t i, j; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Sanity check */ + HDassert(dset); + HDassert(dset->shared->layout.storage.type == H5D_VIRTUAL); + storage = &dset->shared->layout.storage.u.virt; + HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); + + /* Get current VDS dimensions */ + if(H5S_get_simple_extent_dims(dset->shared->space, virtual_dims, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions") + + /* Iterate over mappings */ + for(i = 0; i < storage->list_nalloc; i++) + /* Check for unlimited dimension */ + if(storage->list[i].unlim_dim_virtual >= 0) { + /* Check for "printf" source dataset resolution */ + if(storage->list[i].unlim_dim_source >= 0 ) { + /* Non-printf mapping */ + /* Sanity checks - these should all have been set to NULL as + * this layout should have come directly from the API or via + * H5D__virtual_copy_layout(). */ + HDassert(!storage->list[i].source_dset.dset); + HDassert(!storage->list[i].source_dset.clipped_virtual_select); + HDassert(!storage->list[i].source_dset.clipped_source_select); + + /* Open source dataset */ + if(H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].source_dset, dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + + /* Check if source dataset is open */ + if(storage->list[i].source_dset.dset) { + /* Retrieve current source dataset extent and patch mapping + */ + if(H5S_extent_copy(storage->list[i].source_select, storage->list[i].source_dset.dset->shared->space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent") + + /* Get source space dimenstions */ + if(H5S_get_simple_extent_dims(storage->list[i].source_select, source_dims, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get source space dimensions") + + /* Get size that source selection would be clipped to to + * match size of virtual selection */ + clip_size = H5S_hyper_get_clip_extent_match(storage->list[i].source_select, storage->list[i].source_dset.virtual_select, virtual_dims[storage->list[i].unlim_dim_virtual], FALSE); + + /* Check if the clip size is within the current extent of + * the source dataset */ + if(clip_size <= source_dims[storage->list[i].unlim_dim_source]) { + /* Copy virtual selection */ + if(NULL == (storage->list[i].source_dset.clipped_virtual_select = H5S_copy(storage->list[i].source_dset.virtual_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + + /* Clip virtual selection to extent */ + if(H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_virtual_select, virtual_dims[storage->list[i].unlim_dim_virtual])) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + + /* Copy source selection */ + if(NULL == (storage->list[i].source_dset.clipped_source_select = H5S_copy(storage->list[i].source_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") + + /* Clip source selection to clip_size */ + if(H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_source_select, clip_size)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + } /* end if */ + else { + /* Get size that virtual selection will be clipped to to + * match size of source selection within source extent + */ + clip_size = H5S_hyper_get_clip_extent_match(storage->list[i].source_dset.virtual_select, storage->list[i].source_select, source_dims[storage->list[i].unlim_dim_source], FALSE); + + /* Copy virtual selection */ + if(NULL == (storage->list[i].source_dset.clipped_virtual_select = H5S_copy(storage->list[i].source_dset.virtual_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + + /* Clip virtual selection to clip_size */ + if(H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_virtual_select, clip_size)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + + /* Copy source selection */ + if(NULL == (storage->list[i].source_dset.clipped_source_select = H5S_copy(storage->list[i].source_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") + + /* Clip source selection to extent */ + if(H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_source_select, source_dims[storage->list[i].unlim_dim_source])) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + } /* end else */ + } /* end if */ + } /* end if */ + else { + /* printf mapping */ + size_t sub_dset_max; + hbool_t partial_block; + + /* Sanity checks - this should have been set to NULL as this + * layout should have come directly from the API or via + * H5D__virtual_copy_layout(). */ + HDassert(!storage->list[i].source_dset.dset); + + /* Get number of sub-source datasets in current extent */ + sub_dset_max = (size_t)H5S_hyper_get_first_inc_block(storage->list[i].source_dset.virtual_select, virtual_dims[storage->list[i].unlim_dim_virtual], &partial_block); + if(partial_block) + sub_dset_max++; + + /* Allocate sub dset array */ + if(NULL == (storage->list[i].sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_calloc(sub_dset_max * sizeof(H5O_storage_virtual_srcdset_t)))) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate sub dataset array") + storage->list[i].sub_dset_nalloc = sub_dset_max; + + /* Iterate over sub dsets */ + for(j = 0; j < sub_dset_max; j++) { + /* Resolve file name */ + if(H5D__virtual_build_source_name(storage->list[i].source_file_name, storage->list[i].parsed_source_file_name, storage->list[i].psfn_static_strlen, storage->list[i].psfn_nsubs, j, &storage->list[i].sub_dset[j].file_name) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source file name") + + /* Resolve dset name */ + if(H5D__virtual_build_source_name(storage->list[i].source_dset_name, storage->list[i].parsed_source_dset_name, storage->list[i].psdn_static_strlen, storage->list[i].psdn_nsubs, j, &storage->list[i].sub_dset[j].dset_name) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source dataset name") + + /* Resolve virtual selection for block */ + if(NULL == (storage->list[i].sub_dset[j].virtual_select = H5S_hyper_get_unlim_block(storage->list[i].source_dset.virtual_select, j))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get block in unlimited selection") + + /* Only initialize clipped selections if it is a complete + * block, otherwise defer to H5D__virtual_pre_io() as we may + * not have a valid source extent here */ + if((j < (sub_dset_max - 1)) || !partial_block) { + /* Complete block, just point clipped selections to + * unclipped selections (they are not unlimited) */ + storage->list[i].sub_dset[j].clipped_source_select = storage->list[i].source_select; + storage->list[i].sub_dset[j].clipped_virtual_select = storage->list[i].sub_dset[j].virtual_select; + } /* end else */ + /* Note we do not need to open the source file, this will + * happen later in H5D__virtual_pre_io() */ + } /* end for */ + + /* Update sub_dset_nused */ + storage->list[i].sub_dset_nused = sub_dset_max; + } /* end else */ + } /* end if */ + else { + /* Limited mapping, just make sure the clipped selections were + * already set. Again, no need to open the source file. */ + HDassert(storage->list[i].source_dset.clipped_virtual_select); + HDassert(storage->list[i].source_dset.clipped_source_select); + } /* end else */ + + /* Mark layout as fully initialized */ + storage->init = TRUE; + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D__virtual_init_all() */ + + +/*------------------------------------------------------------------------- * Function: H5D__virtual_init * * Purpose: Initialize the virtual layout information for a dataset. @@ -1579,6 +1731,9 @@ H5D__virtual_init(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const H5D_t *dset, HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") storage->list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; + /* Mark source extent as invalid */ + storage->list[i].source_space_status = H5O_VIRTUAL_STATUS_INVALID; + /* Normalize offsets, toss out old offset values */ if(H5S_hyper_normalize_offset(storage->list[i].source_dset.virtual_select, old_offset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset") @@ -1672,7 +1827,7 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, hsize_t bounds_end[H5S_MAX_RANK]; /* Selection bounds end */ int rank; hbool_t bounds_init = FALSE; /* Whether bounds_start, bounds_end, and rank are valid */ - size_t i, j; /* Local index variables */ + size_t i, j, k; /* Local index variables */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1685,7 +1840,8 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, /* Initialize layout if necessary */ if(!storage->init) - {} //VDSINC + if(H5D__virtual_init_all(io_info->dset, io_info->dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize virtual layout") /* Initialize tot_nelmts */ *tot_nelmts = 0; @@ -1733,41 +1889,108 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, /* Iterate over sub-source dsets */ for(j = storage->list[i].sub_dset_io_start; j < storage->list[i].sub_dset_io_end; j++) { - /* There should always be a clipped virtual selection here */ - HDassert(storage->list[i].sub_dset[j].clipped_virtual_select); + /* Check for clipped virtual selection */ + if(!storage->list[i].sub_dset[j].clipped_virtual_select) { + hsize_t start[H5S_MAX_RANK]; + /* This should only be NULL if this is a partial block */ + HDassert((j == (storage->list[i].sub_dset_io_end - 1)) + && partial_block); + + /* If the source space status is not correct, we must try to + * open the source dataset to patch it */ + if(storage->list[i].source_space_status != H5O_VIRTUAL_STATUS_CORRECT) { + HDassert(!storage->list[i].sub_dset[j].dset); + if(H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], &storage->list[i].sub_dset[j], io_info->dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + } /* end if */ - /* Project intersection of file space and mapping virtual space - * onto memory space */ - if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].sub_dset[j].clipped_virtual_select, &storage->list[i].sub_dset[j].projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") + /* If we obtained a valid source space, we must create + * clipped source and virtual selections, otherwise we + * cannot do this and we will leave them NULL. This doesn't + * hurt anything because we can't do I/O because the dataset + * must not have been found. */ + if(storage->list[i].source_space_status == H5O_VIRTUAL_STATUS_CORRECT) { + hsize_t tmp_dims[H5S_MAX_RANK]; + hsize_t vbounds_end[H5S_MAX_RANK]; + + /* Get bounds of virtual selection */ + if(H5S_SELECT_BOUNDS(storage->list[i].sub_dset[j].virtual_select, tmp_dims, vbounds_end) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") - /* Check number of elements selected */ - if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(storage->list[i].sub_dset[j].projected_mem_space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + HDassert(bounds_init); - /* Check if anything is selected */ - if(select_nelmts > (hssize_t)0) { - /* Open source dataset */ - if(!storage->list[i].sub_dset[j].dset) - /* Try to open dataset */ - if(H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], &storage->list[i].sub_dset[j], io_info->dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + /* Convert bounds to extent (add 1) */ + for(k = 0; k < (size_t)rank; k++) + vbounds_end[k]++; - /* If the source dataset is not open, mark the selected - * elements as zero so projected_mem_space is freed */ - if(!storage->list[i].sub_dset[j].dset) - select_nelmts = (hssize_t)0; + /* Temporarily set extent of virtual selection to bounds */ + if(H5S_set_extent(storage->list[i].sub_dset[j].virtual_select, vbounds_end) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + + /* Get current VDS dimensions */ + if(H5S_get_simple_extent_dims(io_info->dset->shared->space, tmp_dims, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions") + + /* Copy virtual selection */ + if(NULL == (storage->list[i].sub_dset[j].clipped_virtual_select = H5S_copy(storage->list[i].sub_dset[j].virtual_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + + /* Clip virtual selection to real virtual extent */ + (void)HDmemset(start, 0, sizeof(start)); + if(H5S_select_hyperslab(storage->list[i].sub_dset[j].clipped_virtual_select, H5S_SELECT_AND, start, NULL, tmp_dims, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to clip hyperslab") + + /* Project intersection of virtual space and clipped + * virtual space onto source space (create + * clipped_source_select) */ + if(H5S_select_project_intersection(storage->list[i].sub_dset[j].virtual_select, storage->list[i].source_select, storage->list[i].sub_dset[j].clipped_virtual_select, &storage->list[i].sub_dset[j].clipped_source_select) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") + + /* Set extents of virtual_select and + * clipped_virtual_select to virtual extent */ + if(H5S_set_extent(storage->list[i].sub_dset[j].virtual_select, tmp_dims) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + if(H5S_set_extent(storage->list[i].sub_dset[j].clipped_virtual_select, tmp_dims) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + } /* end if */ } /* end if */ - /* If there are not elements selected in this mapping, free - * projected_mem_space, otherwise update tot_nelmts */ - if(select_nelmts == (hssize_t)0) { - if(H5S_close(storage->list[i].sub_dset[j].projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") - storage->list[i].sub_dset[j].projected_mem_space = NULL; + /* Only continue if we managed to obtain a + * clipped_virtual_select */ + if(storage->list[i].sub_dset[j].clipped_virtual_select) { + /* Project intersection of file space and mapping virtual space + * onto memory space */ + if(H5S_select_project_intersection(file_space, mem_space, storage->list[i].sub_dset[j].clipped_virtual_select, &storage->list[i].sub_dset[j].projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project virtual intersection onto memory space") + + /* Check number of elements selected */ + if((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(storage->list[i].sub_dset[j].projected_mem_space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + + /* Check if anything is selected */ + if(select_nelmts > (hssize_t)0) { + /* Open source dataset */ + if(!storage->list[i].sub_dset[j].dset) + /* Try to open dataset */ + if(H5D__virtual_open_source_dset(io_info->dset, &storage->list[i], &storage->list[i].sub_dset[j], io_info->dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + + /* If the source dataset is not open, mark the selected + * elements as zero so projected_mem_space is freed */ + if(!storage->list[i].sub_dset[j].dset) + select_nelmts = (hssize_t)0; + } /* end if */ + + /* If there are not elements selected in this mapping, free + * projected_mem_space, otherwise update tot_nelmts */ + if(select_nelmts == (hssize_t)0) { + if(H5S_close(storage->list[i].sub_dset[j].projected_mem_space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") + storage->list[i].sub_dset[j].projected_mem_space = NULL; + } /* end if */ + else + *tot_nelmts += (hsize_t)select_nelmts; } /* end if */ - else - *tot_nelmts += (hsize_t)select_nelmts; } /* end for */ } /* end if */ else { diff --git a/test/vds.c b/test/vds.c index 64a72f5..d0d7267 100644 --- a/test/vds.c +++ b/test/vds.c @@ -3862,6 +3862,41 @@ test_unlim(unsigned config, hid_t fapl) if(rbuf[i][j] != 0) TEST_ERROR + /* Now test reopening virtual dataset without calling H5Dget_space, if + * REOPEN_VIRT flag set */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end if */ + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ if(H5Dclose(vdset) < 0) @@ -3934,6 +3969,46 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR } /* end for */ + /* Now test reopening virtual dataset without calling H5Dget_space, if + * REOPEN_VIRT flag set */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + } /* end if */ + /* Close */ if(!(config & TEST_IO_CLOSE_SRC)) { if(H5Dclose(srcdset[0]) < 0) @@ -8580,6 +8655,45 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR } /* end for */ + /* Now test reopening virtual dataset without calling H5Dget_space, if + * REOPEN_VIRT flag set */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + } /* end if */ + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ if(H5Dclose(vdset) < 0) @@ -8644,6 +8758,45 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR } /* end for */ + /* Now test reopening virtual dataset without calling H5Dget_space, if + * REOPEN_VIRT flag set */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + } /* end if */ + /* Reset dapl */ if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) TEST_ERROR -- cgit v0.12 From 07106823b4792cdb81bb8b6bf9b56af3e919781b Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 12 Aug 2015 15:11:59 -0500 Subject: [svn-r27501] Add mapping validity checking to VDS open. Other minor fixes/cleanup. Tested: ummon --- src/H5Dprivate.h | 3 ++ src/H5Dvirtual.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/H5Olayout.c | 12 ++++- src/H5Pdcpl.c | 82 +++------------------------------ 4 files changed, 157 insertions(+), 78 deletions(-) diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index 27585ba..3fed97c 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -180,6 +180,9 @@ H5_DLL herr_t H5D_vlen_reclaim(hid_t type_id, H5S_t *space, hid_t plist_id, H5_DLL herr_t H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr); /* Functions that operate on virtual storage */ +H5_DLL herr_t H5D_virtual_check_mapping_pre(H5S_t *vspace, H5S_t *src_space, + H5O_virtual_space_status_t space_status); +H5_DLL herr_t H5D_virtual_check_mapping_post(H5O_storage_virtual_ent_t *ent); H5_DLL herr_t H5D_virtual_update_min_dims(H5O_layout_t *layout, size_t idx); H5_DLL herr_t H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_seg_t **parsed_name, size_t *static_strlen, diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 3407e00..0b88ad5 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -146,6 +146,144 @@ H5FL_DEFINE(H5O_storage_virtual_name_seg_t); /*------------------------------------------------------------------------- + * Function: H5D_virtual_check_mapping_pre + * + * Purpose: Checks that the provided virtual and source selections are + * legal for use as a VDS mapping, prior to creating the rest + * of the mapping entry. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * August 12, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D_virtual_check_mapping_pre(H5S_t *vspace, H5S_t *src_space, + H5O_virtual_space_status_t space_status) +{ + H5S_sel_type select_type; /* Selection type */ + hsize_t nelmts_vs; /* Number of elements in virtual selection */ + hsize_t nelmts_ss; /* Number of elements in source selection */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + /* Check for point selections (currently unsupported) */ + if(H5S_SEL_ERROR == (select_type = H5S_GET_SELECT_TYPE(vspace))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get selection type") + if(select_type == H5S_SEL_POINTS) + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "point selections not currently supported with virtual datasets") + if(H5S_SEL_ERROR == (select_type = H5S_GET_SELECT_TYPE(src_space))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get selection type") + if(select_type == H5S_SEL_POINTS) + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "point selections not currently supported with virtual datasets") + + /* Get number of elements in spaces */ + nelmts_vs = (hsize_t)H5S_GET_SELECT_NPOINTS(vspace); + nelmts_ss = (hsize_t)H5S_GET_SELECT_NPOINTS(src_space); + + /* Check for unlimited vspace */ + if(nelmts_vs == H5S_UNLIMITED) { + /* Check for unlimited src_space */ + if(nelmts_ss == H5S_UNLIMITED) { + hsize_t nenu_vs; /* Number of elements in the non-unlimited dimensions of vspace */ + hsize_t nenu_ss; /* Number of elements in the non-unlimited dimensions of src_space */ + + /* Non-printf unlimited selection. Make sure both selections have + * the same number of elements in the non-unlimited dimension. Note + * we can always check this even if the space status is invalid + * because unlimited selections are never dependent on the extent. + */ + if(H5S_get_select_num_elem_non_unlim(vspace, &nenu_vs) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "can't get number of elements in non-unlimited dimension") + if(H5S_get_select_num_elem_non_unlim(src_space, &nenu_ss) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "can't get number of elements in non-unlimited dimension") + if(nenu_vs != nenu_ss) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "numbers of elemnts in the non-unlimited dimensions is different for source and virtual spaces") + } /* end if */ + /* We will handle the printf case after parsing the source names */ + } /* end if */ + else if(space_status != H5O_VIRTUAL_STATUS_INVALID) + /* Limited selections. Check number of points is the same. */ + if(nelmts_vs != nelmts_ss) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "virtual and source space selections have different numbers of elements") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D_virtual_check_mapping_pre() */ + + +/*------------------------------------------------------------------------- + * Function: H5D_virtual_check_mapping_post + * + * Purpose: Checks that the provided virtual dataset mapping entry is + * legal, after the mapping is otherwise complete. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * August 12, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D_virtual_check_mapping_post(H5O_storage_virtual_ent_t *ent) +{ + hsize_t nelmts_vs; /* Number of elements in virtual selection */ + hsize_t nelmts_ss; /* Number of elements in source selection */ + H5S_t *tmp_space = NULL; /* Temporary dataspace */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + /* Get number of elements in spaces */ + nelmts_vs = (hsize_t)H5S_GET_SELECT_NPOINTS(ent->source_dset.virtual_select); + nelmts_ss = (hsize_t)H5S_GET_SELECT_NPOINTS(ent->source_select); + + /* Check for printf selection */ + if((nelmts_vs == H5S_UNLIMITED) && (nelmts_ss != H5S_UNLIMITED)) { + /* Make sure there at least one %b substitution in the source file or + * dataset name */ + if((ent->psfn_nsubs == 0) && (ent->psdn_nsubs == 0)) + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unlimited virtual selection, limited source selection, and no printf specifiers in source names") + + /* Make sure virtual space uses hyperslab selection */ + if(H5S_GET_SELECT_TYPE(ent->source_dset.virtual_select) != H5S_SEL_HYPERSLABS) + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "virtual selection with printf mapping must be hyperslab") + + /* Check that the number of elements in one block in the virtual + * selection matches the total number of elements in the source + * selection, if the source space status is not invalid (virtual space + * status does not matter here because it is unlimited) */ + if(ent->source_space_status != H5O_VIRTUAL_STATUS_INVALID) { + /* Get first block in virtual selection */ + if(NULL == (tmp_space = H5S_hyper_get_unlim_block(ent->source_dset.virtual_select, (hsize_t)0))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get first block in virtual selection") + + /* Check number of points */ + nelmts_vs = (hsize_t)H5S_GET_SELECT_NPOINTS(tmp_space); + if(nelmts_vs != nelmts_ss) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "virtual (single block) and source space selections have different numbers of elements") + } /* end if */ + } /* end if */ + else + /* Make sure there are no printf substitutions */ + if((ent->psfn_nsubs > 0) || (ent->psdn_nsubs > 0)) + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "printf specifier(s) in source name(s) without an unlimited virtual selection and limited source selection") + +done: + /* Free temporary space */ + if(tmp_space) + if(H5S_close(tmp_space) < 0) + HDONE_ERROR(H5E_PLIST, H5E_CLOSEERROR, FAIL, "can't close dataspace") + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D_virtual_check_mapping_post() */ + + +/*------------------------------------------------------------------------- * Function: H5D_virtual_update_min_dims * * Purpose: Updates the virtual layout's "min_dims" field to take into diff --git a/src/H5Olayout.c b/src/H5Olayout.c index d747512..c462c80 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -299,11 +299,11 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED * heap_block_p += tmp_size; /* Source selection */ - if(H5S_SELECT_DESERIALIZE(f, &(mesg->storage.u.virt.list[i].source_select), &heap_block_p) < 0) + if(H5S_SELECT_DESERIALIZE(f, &mesg->storage.u.virt.list[i].source_select, &heap_block_p) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode source space selection") /* Virtual selection */ - if(H5S_SELECT_DESERIALIZE(f, &(mesg->storage.u.virt.list[i].source_dset.virtual_select), &heap_block_p) < 0) + if(H5S_SELECT_DESERIALIZE(f, &mesg->storage.u.virt.list[i].source_dset.virtual_select, &heap_block_p) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode virtual space selection") /* Parse source file and dataset names for "printf" @@ -340,6 +340,14 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED * mesg->storage.u.virt.list[i].source_dset.clipped_virtual_select = mesg->storage.u.virt.list[i].source_dset.virtual_select; } /* end if */ + /* Check mapping for validity (do both pre and post + * checks here, since we had to allocate the entry list + * before decoding the selections anyways) */ + if(H5D_virtual_check_mapping_pre(mesg->storage.u.virt.list[i].source_dset.virtual_select, mesg->storage.u.virt.list[i].source_select, H5O_VIRTUAL_STATUS_INVALID) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "invalid mapping selections") + if(H5D_virtual_check_mapping_post(&mesg->storage.u.virt.list[i]) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid mapping entry") + /* Update min_dims */ if(H5D_virtual_update_min_dims(mesg, i) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to update virtual dataset minimum dimensions") diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 0c6184b..787c88b 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1805,10 +1805,6 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, H5O_layout_t layout; /* Layout information for setting chunk info */ H5S_t *vspace; /* Virtual dataset space selection */ H5S_t *src_space; /* Source dataset space selection */ - H5S_sel_type select_type; /* Selection type */ - hsize_t nelmts_vs; /* Number of elements in virtual selection */ - hsize_t nelmts_ss; /* Number of elements in source selection */ - H5S_t *tmp_space = NULL; /* Temporary dataspace */ hbool_t new_layout = FALSE; /* Whether we are adding a new virtual layout message to plist */ H5O_storage_virtual_ent_t *ent = NULL; /* Convenience pointer to new VDS entry */ hbool_t adding_entry = FALSE; /* Whether we are in the middle of adding an entry */ @@ -1829,42 +1825,9 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, if(NULL == (src_space = (H5S_t *)H5I_object_verify(src_space_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") - /* Check for point selections (currently unsupported) */ - if(H5S_SEL_ERROR == (select_type = H5S_GET_SELECT_TYPE(vspace))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get selection type") - if(select_type == H5S_SEL_POINTS) - HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "point selections not currently supported with virtual datasets") - if(H5S_SEL_ERROR == (select_type = H5S_GET_SELECT_TYPE(src_space))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get selection type") - if(select_type == H5S_SEL_POINTS) - HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "point selections not currently supported with virtual datasets") - - /* Get number of elements in spaces */ - nelmts_vs = (hsize_t)H5S_GET_SELECT_NPOINTS(vspace); - nelmts_ss = (hsize_t)H5S_GET_SELECT_NPOINTS(src_space); - - /* Check for unlimited vspace */ - if(nelmts_vs == H5S_UNLIMITED) { - /* Check for unlimited src_space */ - if(nelmts_ss == H5S_UNLIMITED) { - hsize_t nenu_vs; /* Number of elements in the non-unlimited dimensions of vspace */ - hsize_t nenu_ss; /* Number of elements in the non-unlimited dimensions of src_space */ - - /* Non-printf unlimited selection. Make sure both selections have - * the same number of elements in the non-unlimited dimension */ - if(H5S_get_select_num_elem_non_unlim(vspace, &nenu_vs) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOUNT, FAIL, "can't get number of elements in non-unlimited dimension") - if(H5S_get_select_num_elem_non_unlim(src_space, &nenu_ss) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOUNT, FAIL, "can't get number of elements in non-unlimited dimension") - if(nenu_vs != nenu_ss) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "numbers of elemnts in the non-unlimited dimensions is different for source and virtual spaces") - } /* end if */ - /* We will handle the printf case after parsing the source names */ - } /* end if */ - else - /* Limited selections. Check number of points is the same. */ - if(nelmts_vs != nelmts_ss) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "virtual and source space selections have different numbers of elements") + /* Check selections for validity */ + if(H5D_virtual_check_mapping_pre(vspace, src_space, H5O_VIRTUAL_STATUS_USER) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid mapping selections") #ifndef H5_HAVE_C99_DESIGNATED_INITIALIZER /* If the compiler doesn't support C99 designated initializers, check if @@ -1952,37 +1915,9 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, ent->source_space_status = H5O_VIRTUAL_STATUS_USER; ent->virtual_space_status = H5O_VIRTUAL_STATUS_USER; - /* Check for printf selection */ - if((nelmts_vs == H5S_UNLIMITED) && (nelmts_ss != H5S_UNLIMITED)) { - /* Make sure there at least one %b substitution in the source file or - * dataset name */ - if((ent->psfn_nsubs == 0) && (ent->psdn_nsubs == 0)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unlimited virtual selection, limited source selection, and no printf specifiers in source names") - - /* Make sure virtual space uses hyperslab selection */ - if(H5S_GET_SELECT_TYPE(vspace) != H5S_SEL_HYPERSLABS) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "virtual selection with printf mapping must be hyperslab") - - /* Get first block in virtual selection */ - if(NULL == (tmp_space = H5S_hyper_get_unlim_block(vspace, (hsize_t)0))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get first block in virtual selection") - - /* Check that the number of elements in one block in the virtual - * selection matches the total number of elements in the source - * selection */ - nelmts_vs = (hsize_t)H5S_GET_SELECT_NPOINTS(tmp_space); - if(nelmts_vs != nelmts_ss) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "virtual (single block) and source space selections have different numbers of elements") - - /* Close tmp_space */ - if(H5S_close(tmp_space) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CLOSEERROR, FAIL, "can't close dataspace") - tmp_space = NULL; - } /* end if */ - else - /* Make sure there are no printf substitutions */ - if((ent->psfn_nsubs > 0) || (ent->psdn_nsubs > 0)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "printf specifier(s) in source name(s) without an unlimited virtual selection and limited source selection") + /* Check entry for validity */ + if(H5D_virtual_check_mapping_post(ent) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid mapping entry") /* Update min_dims */ if(H5D_virtual_update_min_dims(&layout, layout.storage.u.virt.list_nused) < 0) @@ -2035,11 +1970,6 @@ done: /* Free list if necessary */ if(free_list) layout.storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_xfree(layout.storage.u.virt.list); - - /* Free temporary space */ - if(tmp_space) - if(H5S_close(tmp_space) < 0) - HDONE_ERROR(H5E_PLIST, H5E_CLOSEERROR, FAIL, "can't close dataspace") } /* end if */ } /* end if */ -- cgit v0.12 From 51e16157c29eae46c391e896ed54de8e02ffdfea Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 13 Aug 2015 11:39:21 -0500 Subject: [svn-r27504] Change comments/code around to reflect decision to have virtual datasets always return TRUE when their is_alloc function is called. Tested: ummon --- src/H5Ddbg.c | 2 -- src/H5Dint.c | 12 +++++++++--- src/H5Doh.c | 3 ++- src/H5Dvirtual.c | 8 ++++++-- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c index 7e1d884..4e934f2 100644 --- a/src/H5Ddbg.c +++ b/src/H5Ddbg.c @@ -116,8 +116,6 @@ H5Ddebug(hid_t dset_id) (void)H5D__chunk_dump_index(dset, H5AC_ind_dxpl_id, stdout); else if(H5D_CONTIGUOUS == dset->shared->layout.type) HDfprintf(stdout, " %-10s %a\n", "Address:", dset->shared->layout.storage.u.contig.addr); - else if(H5D_VIRTUAL == dset->shared->layout.type) - HDassert(0 && "Not yet implemented...");//VDSINC done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Dint.c b/src/H5Dint.c index 657f893..dd37beb 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1827,7 +1827,12 @@ H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc break; case H5D_VIRTUAL: - /* No-op for now VDSINC */ + /* No-op, as the raw data is stored elsewhere and the global + * heap object containing the mapping information is created + * when the layout message is encoded. We may wish to move the + * creation of the global heap object here at some point, but we + * will have to make sure is it always created before the + * dataset is closed. */ break; case H5D_LAYOUT_ERROR: @@ -1950,7 +1955,7 @@ H5D__init_storage(const H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[], } /* end block */ case H5D_VIRTUAL: - /* No-op for now VDSINC */ + /* No-op, as the raw data is stored elsewhere */ case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: @@ -2009,7 +2014,8 @@ H5D__get_storage_size(H5D_t *dset, hid_t dxpl_id, hsize_t *storage_size) break; case H5D_VIRTUAL: - /* Just set to 0 until private data is implemented VDSINC */ + /* Just set to 0, as virtual datasets do not actually store raw data + */ *storage_size = 0; break; diff --git a/src/H5Doh.c b/src/H5Doh.c index 39a270f..388f4cf 100644 --- a/src/H5Doh.c +++ b/src/H5Doh.c @@ -398,7 +398,8 @@ H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info) if(H5D__chunk_bh_info(f, dxpl_id, &layout, &pline, &(bh_info->index_size)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine chunked dataset btree info") } /* end if */ - else if(layout.type == H5D_VIRTUAL && H5D__virtual_is_space_alloc(&layout.storage)) { + else if(layout.type == H5D_VIRTUAL + && (layout.storage.u.virt.serial_list_hobjid.addr != HADDR_UNDEF)) { size_t virtual_heap_size; /* Need to write a test for this. No assert here for now because the * code is reached by h5_verify_cached_stabs() but it is not properly diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 0b88ad5..99c090f 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -1933,8 +1933,12 @@ H5D__virtual_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage) FUNC_ENTER_PACKAGE_NOERR - /* Need to decide what to do here. For now just return TRUE VDSINC */ - ret_value = TRUE;//storage->u.virt.serial_list_hobjid.addr != HADDR_UNDEF; + /* Just return TRUE, since the global heap object containing the mappings is + * created when the layout message is encoded, and nothing else needs to be + * allocated for virtual datasets. This also ensures that the library never + * assumes (falsely) that no data is present in the dataset, causing errors. + */ + ret_value = TRUE; FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__virtual_is_space_alloc() */ -- cgit v0.12 From cefda2ef0c51922a9ab925b0f28b0c2a24a8c050 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 13 Aug 2015 21:55:15 -0500 Subject: [svn-r27505] Add support for H5Dset_extent for VDS. Add tests for this. Other bug fixes/cleanup Tested: Kubuntu 64 (home computer) --- src/H5Dint.c | 30 ++++++- src/H5Dprivate.h | 8 +- src/H5Dvirtual.c | 199 ++++++++++++++++++++++++++++++++++----------- test/vds.c | 244 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 420 insertions(+), 61 deletions(-) diff --git a/src/H5Dint.c b/src/H5Dint.c index dd37beb..490a3c5 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -2322,6 +2322,7 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id) { hsize_t curr_dims[H5S_MAX_RANK]; /* Current dimension sizes */ htri_t changed; /* Whether the dataspace changed size */ + size_t u, v; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE_TAG(dxpl_id, dset->oloc.addr, FAIL) @@ -2357,10 +2358,9 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id) hbool_t shrink = FALSE; /* Flag to indicate a dimension has shrank */ hbool_t expand = FALSE; /* Flag to indicate a dimension has grown */ hbool_t update_chunks = FALSE; /* Flag to indicate chunk cache update is needed */ - unsigned u; /* Local index variable */ /* Determine if we are shrinking and/or expanding any dimensions */ - for(u = 0; u < dset->shared->ndims; u++) { + for(u = 0; u < (size_t)dset->shared->ndims; u++) { /* Check for various status changes */ if(size[u] < curr_dims[u]) shrink = TRUE; @@ -2421,6 +2421,30 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update cached chunk indices") } /* end if */ + /* Operations for virtual datasets */ + if(H5D_VIRTUAL == dset->shared->layout.type) { + /* Check that the dimensions of the VDS are large enough */ + if(H5D_virtual_check_min_dims(dset) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "virtual dataset dimensions not large enough to contain all limited dimensions in all selections") + + /* Patch the virtual selection dataspaces */ + for(u = 0; u < dset->shared->layout.storage.u.virt.list_nused; u++) { + /* Patch extent */ + if(H5S_set_extent(dset->shared->layout.storage.u.virt.list[u].source_dset.virtual_select, size) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + dset->shared->layout.storage.u.virt.list[u].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; + + /* Patch sub-source datasets */ + for(v = 0; v < dset->shared->layout.storage.u.virt.list[u].sub_dset_nalloc; v++) + if(H5S_set_extent(dset->shared->layout.storage.u.virt.list[u].sub_dset[v].virtual_select, size) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space") + } /* end for */ + + /* Mark virtual datasets as not fully initialized so internal + * selections are recalculated (at next I/O operation) */ + dset->shared->layout.storage.u.virt.init = FALSE; + } /* end if */ + /* Allocate space for the new parts of the dataset, if appropriate */ if(expand && dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_EARLY) if(H5D__alloc_storage(dset, dxpl_id, H5D_ALLOC_EXTEND, FALSE, curr_dims) < 0) @@ -2443,8 +2467,6 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id) HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty") } /* end if */ - /* Make this function work with virtual layout VDSINC */ - done: FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5D__set_extent() */ diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index 3fed97c..d3a23eb 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -180,9 +180,11 @@ H5_DLL herr_t H5D_vlen_reclaim(hid_t type_id, H5S_t *space, hid_t plist_id, H5_DLL herr_t H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr); /* Functions that operate on virtual storage */ -H5_DLL herr_t H5D_virtual_check_mapping_pre(H5S_t *vspace, H5S_t *src_space, - H5O_virtual_space_status_t space_status); -H5_DLL herr_t H5D_virtual_check_mapping_post(H5O_storage_virtual_ent_t *ent); +H5_DLL herr_t H5D_virtual_check_mapping_pre(const H5S_t *vspace, + const H5S_t *src_space, H5O_virtual_space_status_t space_status); +H5_DLL herr_t H5D_virtual_check_mapping_post( + const H5O_storage_virtual_ent_t *ent); +H5_DLL herr_t H5D_virtual_check_min_dims(const H5D_t *dset); H5_DLL herr_t H5D_virtual_update_min_dims(H5O_layout_t *layout, size_t idx); H5_DLL herr_t H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_seg_t **parsed_name, size_t *static_strlen, diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 99c090f..40208fd 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -160,7 +160,7 @@ H5FL_DEFINE(H5O_storage_virtual_name_seg_t); *------------------------------------------------------------------------- */ herr_t -H5D_virtual_check_mapping_pre(H5S_t *vspace, H5S_t *src_space, +H5D_virtual_check_mapping_pre(const H5S_t *vspace, const H5S_t *src_space, H5O_virtual_space_status_t space_status) { H5S_sel_type select_type; /* Selection type */ @@ -229,7 +229,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5D_virtual_check_mapping_post(H5O_storage_virtual_ent_t *ent) +H5D_virtual_check_mapping_post(const H5O_storage_virtual_ent_t *ent) { hsize_t nelmts_vs; /* Number of elements in virtual selection */ hsize_t nelmts_ss; /* Number of elements in source selection */ @@ -343,6 +343,51 @@ done: /*------------------------------------------------------------------------- + * Function: H5D_virtual_check_min_dims + * + * Purpose: Checks if the dataset's dimensions are at least the + * calculated minimum dimensions from the mappings. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Neil Fortner + * August 13, 2015 + * + *------------------------------------------------------------------------- + */ +herr_t +H5D_virtual_check_min_dims(const H5D_t *dset) +{ + int rank; + hsize_t dims[H5S_MAX_RANK]; + int i; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI(FAIL) + + HDassert(dset); + HDassert(dset->shared); + HDassert(dset->shared->layout.type == H5D_VIRTUAL); + + /* Get rank of dataspace */ + if((rank = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions") + + /* Get VDS dimensions */ + if(H5S_get_simple_extent_dims(dset->shared->space, dims, NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions") + + /* Verify that dimensions are larger than min_dims */ + for(i = 0; i < rank; i++) + if(dims[i] < dset->shared->layout.storage.u.virt.min_dims[i]) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "virtual dataset dimensions not large enough to contain all limited dimensions in all selections") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D_virtual_check_min_dims() */ + + +/*------------------------------------------------------------------------- * Function: H5D__virtual_copy_layout * * Purpose: Deep copies virtual storage layout message in memory. @@ -1379,6 +1424,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) /* Extend sub_dset */ if(NULL == (tmp_sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_realloc(storage->list[i].sub_dset, 2 * storage->list[i].sub_dset_nalloc * sizeof(H5O_storage_virtual_srcdset_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to extend sub dataset array") + storage->list[i].sub_dset = tmp_sub_dset; /* Clear new space in sub_dset */ (void)HDmemset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0, storage->list[i].sub_dset_nalloc * sizeof(H5O_storage_virtual_srcdset_t)); @@ -1579,6 +1625,9 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if(storage->list[i].sub_dset[j].clipped_source_select) if(H5S_close(storage->list[i].sub_dset[j].clipped_source_select) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped source dataspace") + + /* Initialize clipped source selection to point to + * base source selection */ storage->list[i].sub_dset[j].clipped_source_select = storage->list[i].source_select; } /* end if */ @@ -1588,6 +1637,9 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if(storage->list[i].sub_dset[j].clipped_virtual_select) if(H5S_close(storage->list[i].sub_dset[j].clipped_virtual_select) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped virtual dataspace") + + /* Initialize clipped virtual selection to point to + * unclipped virtual selection */ storage->list[i].sub_dset[j].clipped_virtual_select = storage->list[i].sub_dset[j].virtual_select; } /* end if */ @@ -1688,16 +1740,10 @@ H5D__virtual_init_all(const H5D_t *dset, hid_t dxpl_id) /* Check for "printf" source dataset resolution */ if(storage->list[i].unlim_dim_source >= 0 ) { /* Non-printf mapping */ - /* Sanity checks - these should all have been set to NULL as - * this layout should have come directly from the API or via - * H5D__virtual_copy_layout(). */ - HDassert(!storage->list[i].source_dset.dset); - HDassert(!storage->list[i].source_dset.clipped_virtual_select); - HDassert(!storage->list[i].source_dset.clipped_source_select); - /* Open source dataset */ - if(H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].source_dset, dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + if(!storage->list[i].source_dset.dset) + if(H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].source_dset, dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") /* Check if source dataset is open */ if(storage->list[i].source_dset.dset) { @@ -1714,21 +1760,37 @@ H5D__virtual_init_all(const H5D_t *dset, hid_t dxpl_id) * match size of virtual selection */ clip_size = H5S_hyper_get_clip_extent_match(storage->list[i].source_select, storage->list[i].source_dset.virtual_select, virtual_dims[storage->list[i].unlim_dim_virtual], FALSE); + /* Close previous clipped virtual selection, if any */ + if(storage->list[i].source_dset.clipped_virtual_select) { + HDassert(storage->list[i].source_dset.clipped_virtual_select + != storage->list[i].source_dset.virtual_select); + if(H5S_close(storage->list[i].source_dset.clipped_virtual_select) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped virtual dataspace") + } /* end if */ + + /* Copy virtual selection */ + if(NULL == (storage->list[i].source_dset.clipped_virtual_select = H5S_copy(storage->list[i].source_dset.virtual_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + + /* Close previous clipped source selection, if any */ + if(storage->list[i].source_dset.clipped_source_select) { + HDassert(storage->list[i].source_dset.clipped_source_select + != storage->list[i].source_select); + if(H5S_close(storage->list[i].source_dset.clipped_source_select) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped source dataspace") + } /* end if */ + + /* Copy source selection */ + if(NULL == (storage->list[i].source_dset.clipped_source_select = H5S_copy(storage->list[i].source_select, FALSE, TRUE))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") + /* Check if the clip size is within the current extent of * the source dataset */ if(clip_size <= source_dims[storage->list[i].unlim_dim_source]) { - /* Copy virtual selection */ - if(NULL == (storage->list[i].source_dset.clipped_virtual_select = H5S_copy(storage->list[i].source_dset.virtual_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") - /* Clip virtual selection to extent */ if(H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_virtual_select, virtual_dims[storage->list[i].unlim_dim_virtual])) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") - /* Copy source selection */ - if(NULL == (storage->list[i].source_dset.clipped_source_select = H5S_copy(storage->list[i].source_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") - /* Clip source selection to clip_size */ if(H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_source_select, clip_size)) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") @@ -1739,66 +1801,103 @@ H5D__virtual_init_all(const H5D_t *dset, hid_t dxpl_id) */ clip_size = H5S_hyper_get_clip_extent_match(storage->list[i].source_dset.virtual_select, storage->list[i].source_select, source_dims[storage->list[i].unlim_dim_source], FALSE); - /* Copy virtual selection */ - if(NULL == (storage->list[i].source_dset.clipped_virtual_select = H5S_copy(storage->list[i].source_dset.virtual_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") - /* Clip virtual selection to clip_size */ if(H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_virtual_select, clip_size)) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") - /* Copy source selection */ - if(NULL == (storage->list[i].source_dset.clipped_source_select = H5S_copy(storage->list[i].source_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") - /* Clip source selection to extent */ if(H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_source_select, source_dims[storage->list[i].unlim_dim_source])) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") } /* end else */ } /* end if */ + else { + HDassert(!storage->list[i].source_dset.clipped_virtual_select); + HDassert(!storage->list[i].source_dset.clipped_source_select); + } /* end else */ } /* end if */ else { /* printf mapping */ size_t sub_dset_max; hbool_t partial_block; - /* Sanity checks - this should have been set to NULL as this - * layout should have come directly from the API or via - * H5D__virtual_copy_layout(). */ - HDassert(!storage->list[i].source_dset.dset); - /* Get number of sub-source datasets in current extent */ sub_dset_max = (size_t)H5S_hyper_get_first_inc_block(storage->list[i].source_dset.virtual_select, virtual_dims[storage->list[i].unlim_dim_virtual], &partial_block); if(partial_block) sub_dset_max++; - /* Allocate sub dset array */ - if(NULL == (storage->list[i].sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_calloc(sub_dset_max * sizeof(H5O_storage_virtual_srcdset_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate sub dataset array") + /* Allocate or grow the sub_dset array if necessary */ + if(!storage->list[i].sub_dset) { + /* Allocate sub_dset array */ + if(NULL == (storage->list[i].sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_calloc(sub_dset_max * sizeof(H5O_storage_virtual_srcdset_t)))) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate sub dataset array") + + /* Update sub_dset_nalloc */ storage->list[i].sub_dset_nalloc = sub_dset_max; + } /* end if */ + else if(sub_dset_max > storage->list[i].sub_dset_nalloc) { + H5O_storage_virtual_srcdset_t *tmp_sub_dset; + + /* Extend sub_dset array */ + if(NULL == (tmp_sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_realloc(storage->list[i].sub_dset, sub_dset_max * sizeof(H5O_storage_virtual_srcdset_t)))) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to extend sub dataset array") + storage->list[i].sub_dset = tmp_sub_dset; + + /* Clear new space in sub_dset */ + (void)HDmemset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0, (sub_dset_max - storage->list[i].sub_dset_nalloc) * sizeof(H5O_storage_virtual_srcdset_t)); + + /* Update sub_dset_nalloc */ + storage->list[i].sub_dset_nalloc = sub_dset_max; + } /* end if */ /* Iterate over sub dsets */ for(j = 0; j < sub_dset_max; j++) { /* Resolve file name */ - if(H5D__virtual_build_source_name(storage->list[i].source_file_name, storage->list[i].parsed_source_file_name, storage->list[i].psfn_static_strlen, storage->list[i].psfn_nsubs, j, &storage->list[i].sub_dset[j].file_name) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source file name") + if(!storage->list[i].sub_dset[j].file_name) + if(H5D__virtual_build_source_name(storage->list[i].source_file_name, storage->list[i].parsed_source_file_name, storage->list[i].psfn_static_strlen, storage->list[i].psfn_nsubs, j, &storage->list[i].sub_dset[j].file_name) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source file name") /* Resolve dset name */ - if(H5D__virtual_build_source_name(storage->list[i].source_dset_name, storage->list[i].parsed_source_dset_name, storage->list[i].psdn_static_strlen, storage->list[i].psdn_nsubs, j, &storage->list[i].sub_dset[j].dset_name) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source dataset name") + if(!storage->list[i].sub_dset[j].dset_name) + if(H5D__virtual_build_source_name(storage->list[i].source_dset_name, storage->list[i].parsed_source_dset_name, storage->list[i].psdn_static_strlen, storage->list[i].psdn_nsubs, j, &storage->list[i].sub_dset[j].dset_name) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source dataset name") /* Resolve virtual selection for block */ - if(NULL == (storage->list[i].sub_dset[j].virtual_select = H5S_hyper_get_unlim_block(storage->list[i].source_dset.virtual_select, j))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get block in unlimited selection") - - /* Only initialize clipped selections if it is a complete - * block, otherwise defer to H5D__virtual_pre_io() as we may - * not have a valid source extent here */ - if((j < (sub_dset_max - 1)) || !partial_block) { - /* Complete block, just point clipped selections to - * unclipped selections (they are not unlimited) */ + if(!storage->list[i].sub_dset[j].virtual_select) + if(NULL == (storage->list[i].sub_dset[j].virtual_select = H5S_hyper_get_unlim_block(storage->list[i].source_dset.virtual_select, j))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get block in unlimited selection") + + /* Close previous clipped source selection, if any */ + if(storage->list[i].sub_dset[j].clipped_source_select + != storage->list[i].source_select) { + if(storage->list[i].sub_dset[j].clipped_source_select) + if(H5S_close(storage->list[i].sub_dset[j].clipped_source_select) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped source dataspace") + + /* Initialize clipped source selection to point to base + * source selection */ storage->list[i].sub_dset[j].clipped_source_select = storage->list[i].source_select; + } /* end if */ + + /* Close previous clipped virtual selection, if any */ + if(storage->list[i].sub_dset[j].clipped_virtual_select + != storage->list[i].sub_dset[j].virtual_select) { + if(storage->list[i].sub_dset[j].clipped_virtual_select) + if(H5S_close(storage->list[i].sub_dset[j].clipped_virtual_select) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped virtual dataspace") + + /* Initialize clipped virtual selection to point to + * unclipped virtual selection */ storage->list[i].sub_dset[j].clipped_virtual_select = storage->list[i].sub_dset[j].virtual_select; + } /* end if */ + + /* Clear clipped selections if this is a partial block, + * defer calculation of real clipped selections to + * H5D__virtual_pre_io() as we may not have a valid source + * extent here */ + if((j == (sub_dset_max - 1)) && partial_block) { + /* Clear clipped source and virtual selections */ + storage->list[i].sub_dset[j].clipped_source_select = NULL; + storage->list[i].sub_dset[j].clipped_virtual_select = NULL; } /* end else */ /* Note we do not need to open the source file, this will * happen later in H5D__virtual_pre_io() */ @@ -1853,6 +1952,10 @@ H5D__virtual_init(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const H5D_t *dset, storage = &dset->shared->layout.storage.u.virt; HDassert(storage->list || (storage->list_nused == 0)); + /* Check that the dimensions of the VDS are large enough */ + if(H5D_virtual_check_min_dims(dset) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "virtual dataset dimensions not large enough to contain all limited dimensions in all selections") + /* Patch the virtual selection dataspaces. Note we always patch the space * status because this layout could be from an old version held in the * object header message code. We cannot update that held message because diff --git a/test/vds.c b/test/vds.c index d0d7267..67eb1cb 100644 --- a/test/vds.c +++ b/test/vds.c @@ -3895,6 +3895,69 @@ test_unlim(unsigned config, hid_t fapl) for(j = 0; j < (int)mdims[1]; j++) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR + + /* Now try setting extent manually */ + /* Shrink to 18 */ + dims[1] = 18; + if(H5Dset_extent(vdset, dims) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Shrink to 15 */ + dims[1] = 15; + if(H5Dset_extent(vdset, dims) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ } /* end if */ /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file @@ -3913,12 +3976,6 @@ test_unlim(unsigned config, hid_t fapl) if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR - /* Update erbuf to reflect new data that is no longer visible due to the - * change to H5D_VDS_FIRST_MISSING */ - for(i = 5; i < 10; i++) - for(j = 15; j < 20; j++) - erbuf[i][j] = fill; - /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR @@ -4007,6 +4064,63 @@ test_unlim(unsigned config, hid_t fapl) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR } /* end for */ + + /* Now try setting extent manually */ + /* Grow to 18 */ + dims[1] = 18; + if(H5Dset_extent(vdset, dims) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Grow to 20 */ + dims[1] = 20; + if(H5Dset_extent(vdset, dims) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR } /* end if */ /* Close */ @@ -8692,6 +8806,65 @@ test_printf(unsigned config, hid_t fapl) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR } /* end for */ + + /* Now try setting extent manually */ + /* Shrink to 12 */ + dims[1] = 12; + if(H5Dset_extent(vdset, dims) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Shrink to 10 */ + dims[1] = 12; + if(H5Dset_extent(vdset, dims) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ } /* end if */ /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file @@ -8795,6 +8968,65 @@ test_printf(unsigned config, hid_t fapl) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR } /* end for */ + + /* Now try setting extent manually */ + /* Grow to 12 */ + dims[1] = 12; + if(H5Dset_extent(vdset, dims) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Grow to 15 */ + dims[1] = 15; + if(H5Dset_extent(vdset, dims) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ } /* end if */ /* Reset dapl */ -- cgit v0.12 From 1eff550df3e20882f438b9fe54a34b2601041a31 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 14 Aug 2015 14:58:35 -0500 Subject: [svn-r27506] H5Dset_extent no longer holds all printf source datasets open. Other items identified during reviews. Tested: ummon --- src/H5Dvirtual.c | 13 +- src/H5Edefin.h | 225 ++++++++------- src/H5Einit.h | 867 ++++++++++++++++++++++++++++--------------------------- src/H5Epubgen.h | 412 +++++++++++++------------- src/H5Eterm.h | 227 +++++++-------- src/H5Pdcpl.c | 10 +- src/H5Shyper.c | 168 +++++------ src/H5err.txt | 1 + 8 files changed, 970 insertions(+), 953 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 40208fd..0d15685 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -1114,8 +1114,6 @@ H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst, if(NULL == ((*p_dst)->name_segment = HDstrdup(p_src->name_segment))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to duplicate name segment") } /* end if */ - else - (*p_dst)->name_segment = NULL; /* Advance pointers */ p_src = p_src->next; @@ -1463,9 +1461,16 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if(H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].sub_dset[j], dxpl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") - /* Update first_missing */ - if(storage->list[i].sub_dset[j].dset) + if(storage->list[i].sub_dset[j].dset) { + /* Update first_missing */ first_missing = j + 1; + + /* Close source dataset so we don't have huge + * numbers of datasets open */ + if(H5D_close(storage->list[i].sub_dset[j].dset) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to close source dataset") + storage->list[i].sub_dset[j].dset = NULL; + } /* end if */ } /* end else */ } /* end for */ diff --git a/src/H5Edefin.h b/src/H5Edefin.h index 183f72c..a5406f9 100644 --- a/src/H5Edefin.h +++ b/src/H5Edefin.h @@ -21,99 +21,76 @@ #define _H5Edefin_H /* Major error IDs */ -hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */ -hid_t H5E_FILE_g = FAIL; /* File accessibilty */ -hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */ -hid_t H5E_SYM_g = FAIL; /* Symbol table */ -hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */ -hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */ +hid_t H5E_EARRAY_g = FAIL; /* Extensible Array */ +hid_t H5E_PLIST_g = FAIL; /* Property lists */ +hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */ +hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */ +hid_t H5E_STORAGE_g = FAIL; /* Data storage */ +hid_t H5E_CACHE_g = FAIL; /* Object cache */ +hid_t H5E_IO_g = FAIL; /* Low-level I/O */ hid_t H5E_INTERNAL_g = FAIL; /* Internal error (too specific to document in detail) */ -hid_t H5E_BTREE_g = FAIL; /* B-Tree node */ -hid_t H5E_REFERENCE_g = FAIL; /* References */ +hid_t H5E_SYM_g = FAIL; /* Symbol table */ hid_t H5E_DATASPACE_g = FAIL; /* Dataspace */ -hid_t H5E_RESOURCE_g = FAIL; /* Resource unavailable */ -hid_t H5E_RS_g = FAIL; /* Reference Counted Strings */ hid_t H5E_FARRAY_g = FAIL; /* Fixed Array */ -hid_t H5E_HEAP_g = FAIL; /* Heap */ -hid_t H5E_ATTR_g = FAIL; /* Attribute */ -hid_t H5E_IO_g = FAIL; /* Low-level I/O */ +hid_t H5E_OHDR_g = FAIL; /* Object header */ +hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */ hid_t H5E_EFL_g = FAIL; /* External file list */ -hid_t H5E_TST_g = FAIL; /* Ternary Search Trees */ -hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */ +hid_t H5E_SLIST_g = FAIL; /* Skip Lists */ +hid_t H5E_BTREE_g = FAIL; /* B-Tree node */ +hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */ +hid_t H5E_ATOM_g = FAIL; /* Object atom */ +hid_t H5E_FILE_g = FAIL; /* File accessibilty */ +hid_t H5E_HEAP_g = FAIL; /* Heap */ +hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */ hid_t H5E_DATASET_g = FAIL; /* Dataset */ -hid_t H5E_STORAGE_g = FAIL; /* Data storage */ hid_t H5E_LINK_g = FAIL; /* Links */ -hid_t H5E_PLIST_g = FAIL; /* Property lists */ -hid_t H5E_DATATYPE_g = FAIL; /* Datatype */ -hid_t H5E_OHDR_g = FAIL; /* Object header */ -hid_t H5E_ATOM_g = FAIL; /* Object atom */ -hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */ -hid_t H5E_SLIST_g = FAIL; /* Skip Lists */ -hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */ -hid_t H5E_EARRAY_g = FAIL; /* Extensible Array */ hid_t H5E_PLINE_g = FAIL; /* Data filters */ +hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */ +hid_t H5E_TST_g = FAIL; /* Ternary Search Trees */ +hid_t H5E_ATTR_g = FAIL; /* Attribute */ hid_t H5E_ERROR_g = FAIL; /* Error API */ -hid_t H5E_CACHE_g = FAIL; /* Object cache */ +hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */ +hid_t H5E_RESOURCE_g = FAIL; /* Resource unavailable */ +hid_t H5E_DATATYPE_g = FAIL; /* Datatype */ +hid_t H5E_RS_g = FAIL; /* Reference Counted Strings */ +hid_t H5E_REFERENCE_g = FAIL; /* References */ /* Minor error IDs */ -/* 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 */ - -/* Resource errors */ -hid_t H5E_NOSPACE_g = FAIL; /* No space available for allocation */ -hid_t H5E_CANTALLOC_g = FAIL; /* Can't allocate space */ -hid_t H5E_CANTCOPY_g = FAIL; /* Unable to copy object */ -hid_t H5E_CANTFREE_g = FAIL; /* Unable to free object */ -hid_t H5E_ALREADYEXISTS_g = FAIL; /* Object already exists */ -hid_t H5E_CANTLOCK_g = FAIL; /* Unable to lock object */ -hid_t H5E_CANTUNLOCK_g = FAIL; /* Unable to unlock object */ -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 */ +/* No error */ +hid_t H5E_NONE_MINOR_g = FAIL; /* No 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 */ +/* 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 */ /* Function entry/exit interface errors */ 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 */ -/* 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 */ - -/* 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 */ -/* Object header related errors */ -hid_t H5E_LINKCOUNT_g = FAIL; /* Bad object header link count */ -hid_t H5E_VERSION_g = FAIL; /* Wrong version number */ -hid_t H5E_ALIGNMENT_g = FAIL; /* Alignment error */ -hid_t H5E_BADMESG_g = FAIL; /* Unrecognized message */ -hid_t H5E_CANTDELETE_g = FAIL; /* Can't delete message */ -hid_t H5E_BADITER_g = FAIL; /* Iteration failed */ -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 */ +/* 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 */ -/* System level errors */ -hid_t H5E_SYSERRSTR_g = FAIL; /* System error message */ +/* 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 */ /* I/O pipeline errors */ hid_t H5E_NOFILTER_g = FAIL; /* Requested filter is not available */ @@ -123,14 +100,11 @@ hid_t H5E_SETLOCAL_g = FAIL; /* Error from filter 'set local' callbac hid_t H5E_NOENCODER_g = FAIL; /* Filter present but encoding disabled */ hid_t H5E_CANTFILTER_g = FAIL; /* Filter operation failed */ -/* 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 */ - -/* No error */ -hid_t H5E_NONE_MINOR_g = FAIL; /* No error */ +/* 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 */ /* Plugin errors */ hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */ @@ -146,14 +120,6 @@ 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 */ -/* 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 */ - /* Cache related errors */ hid_t H5E_CANTFLUSH_g = FAIL; /* Unable to flush data from cache */ hid_t H5E_CANTSERIALIZE_g = FAIL; /* Unable to serialize data from cache */ @@ -175,6 +141,42 @@ hid_t H5E_CANTDEPEND_g = FAIL; /* Unable to create a flush dependency * hid_t H5E_CANTUNDEPEND_g = FAIL; /* Unable to destroy a flush dependency */ hid_t H5E_CANTNOTIFY_g = FAIL; /* Unable to notify object about action */ +/* 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 */ + +/* Resource errors */ +hid_t H5E_NOSPACE_g = FAIL; /* No space available for allocation */ +hid_t H5E_CANTALLOC_g = FAIL; /* Can't allocate space */ +hid_t H5E_CANTCOPY_g = FAIL; /* Unable to copy object */ +hid_t H5E_CANTFREE_g = FAIL; /* Unable to free object */ +hid_t H5E_ALREADYEXISTS_g = FAIL; /* Object already exists */ +hid_t H5E_CANTLOCK_g = FAIL; /* Unable to lock object */ +hid_t H5E_CANTUNLOCK_g = FAIL; /* Unable to unlock object */ +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 */ + +/* Object header related errors */ +hid_t H5E_LINKCOUNT_g = FAIL; /* Bad object header link count */ +hid_t H5E_VERSION_g = FAIL; /* Wrong version number */ +hid_t H5E_ALIGNMENT_g = FAIL; /* Alignment error */ +hid_t H5E_BADMESG_g = FAIL; /* Unrecognized message */ +hid_t H5E_CANTDELETE_g = FAIL; /* Can't delete message */ +hid_t H5E_BADITER_g = FAIL; /* Iteration failed */ +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 */ + /* Link related errors */ hid_t H5E_TRAVERSE_g = FAIL; /* Link traversal failure */ hid_t H5E_NLINKS_g = FAIL; /* Too many soft links in path */ @@ -182,10 +184,20 @@ 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 */ -/* 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 */ +/* 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 */ + +/* System level errors */ +hid_t H5E_SYSERRSTR_g = FAIL; /* System error message */ + +/* 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 */ /* Dataspace errors */ hid_t H5E_CANTCLIP_g = FAIL; /* Can't clip hyperslab region */ @@ -194,26 +206,15 @@ 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 */ +hid_t H5E_CANTAPPEND_g = FAIL; /* Can't append object */ -/* 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 */ +/* 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 */ /* Datatype conversion errors */ hid_t H5E_CANTCONVERT_g = FAIL; /* Can't convert datatypes */ diff --git a/src/H5Einit.h b/src/H5Einit.h index 9724748..eed93bd 100644 --- a/src/H5Einit.h +++ b/src/H5Einit.h @@ -24,170 +24,170 @@ /* Major error codes */ /*********************/ -assert(H5E_FUNC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Function entry/exit"))==NULL) +assert(H5E_EARRAY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Extensible Array"))==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_EARRAY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_FILE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "File accessibilty"))==NULL) +assert(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_FILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_SOHM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Shared Object Header Messages"))==NULL) +assert(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_SOHM_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") -assert(H5E_SYM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Symbol table"))==NULL) +assert(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_SYM_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") -assert(H5E_PLUGIN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Plugin for dynamically loaded library"))==NULL) +assert(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_PLUGIN_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") -assert(H5E_VFL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Virtual File Layer"))==NULL) +assert(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_VFL_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") +assert(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_IO_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") assert(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_INTERNAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_BTREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_REFERENCE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "References"))==NULL) +assert(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_REFERENCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SYM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") assert(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_DATASPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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") -assert(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_RS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") assert(H5E_FARRAY_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Fixed Array"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_FARRAY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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") -assert(H5E_ATTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Attribute"))==NULL) +assert(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_ATTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_OHDR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_IO_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Low-level I/O"))==NULL) +assert(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_IO_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") assert(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_EFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_TST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Ternary Search Trees"))==NULL) +assert(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_TST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_FSPACE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Free Space Manager"))==NULL) +assert(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_FSPACE_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") +assert(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") +assert(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") +assert(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") +assert(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") +assert(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_VFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") assert(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_DATASET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_STORAGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") assert(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") -assert(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") -assert(H5E_DATATYPE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Datatype"))==NULL) +assert(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_DATATYPE_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") -assert(H5E_OHDR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object header"))==NULL) +assert(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_OHDR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FUNC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_ATOM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object atom"))==NULL) +assert(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_ATOM_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") -assert(H5E_NONE_MAJOR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "No error"))==NULL) +assert(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_NONE_MAJOR_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") -assert(H5E_SLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Skip Lists"))==NULL) +assert(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_SLIST_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") assert(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_ARGS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_EARRAY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Extensible Array"))==NULL) +assert(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_EARRAY_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") -assert(H5E_PLINE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data filters"))==NULL) +assert(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_PLINE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_DATATYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_ERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Error API"))==NULL) +assert(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_ERROR_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") -assert(H5E_CACHE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object cache"))==NULL) +assert(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_CACHE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_REFERENCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /*********************/ @@ -195,120 +195,33 @@ if((H5E_CACHE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) /*********************/ -/* Generic low-level file I/O errors */ -assert(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_SEEKERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_READERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_WRITEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_CLOSEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_OVERFLOW_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_FCNTL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Resource errors */ -assert(H5E_NOSPACE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "No space available for allocation"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTALLOC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't allocate space"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTALLOC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTCOPY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to copy object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCOPY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTFREE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to free object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTFREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_ALREADYEXISTS_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_ALREADYEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTLOCK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to lock object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTUNLOCK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unlock object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUNLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTGC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to garbage collect"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTGC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTGETSIZE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to compute size"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTGETSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_OBJOPEN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object is already open"))==NULL) +/* No error */ +assert(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_OBJOPEN_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") -/* Heap errors */ -assert(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_CANTRESTORE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_CANTCOMPUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTEXTEND_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't extend heap's space"))==NULL) +/* Group related errors */ +assert(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_CANTEXTEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTOPENOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTATTACH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't attach object"))==NULL) +assert(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_CANTATTACH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCLOSEOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTUPDATE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't update object"))==NULL) +assert(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_CANTUPDATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_COMPLEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTOPERATE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't operate on object"))==NULL) +assert(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_CANTOPERATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PATH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Function entry/exit interface errors */ @@ -328,97 +241,85 @@ 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") -/* Property list errors */ -assert(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") -assert(H5E_CANTSET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't set value"))==NULL) +/* Parallel MPI errors */ +assert(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_CANTSET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_MPI_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_DUPCLASS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Duplicate class name in parent class"))==NULL) +assert(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_DUPCLASS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_MPIERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_SETDISALLOWED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Disallowed operation"))==NULL) +assert(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_SETDISALLOWED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRECV_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Free space errors */ -assert(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_CANTMERGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTREVIVE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't revive object"))==NULL) +/* Object atom related errors */ +assert(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_CANTREVIVE_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") -assert(H5E_CANTSHRINK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't shrink container"))==NULL) +assert(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_CANTSHRINK_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") - -/* Object header related errors */ -assert(H5E_LINKCOUNT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad object header link count"))==NULL) +assert(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_LINKCOUNT_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") -assert(H5E_VERSION_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Wrong version number"))==NULL) +assert(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_VERSION_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") -assert(H5E_ALIGNMENT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Alignment error"))==NULL) +assert(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_ALIGNMENT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTDEC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_BADMESG_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unrecognized message"))==NULL) +assert(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_BADMESG_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOIDS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTDELETE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't delete message"))==NULL) + +/* Generic low-level file I/O errors */ +assert(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_CANTDELETE_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") -assert(H5E_BADITER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Iteration failed"))==NULL) +assert(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_BADITER_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") -assert(H5E_CANTPACK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't pack messages"))==NULL) +assert(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_CANTPACK_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") -assert(H5E_CANTRESET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't reset object"))==NULL) +assert(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_CANTRESET_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") -assert(H5E_CANTRENAME_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to rename object"))==NULL) +assert(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_CANTRENAME_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") - -/* System level errors */ -assert(H5E_SYSERRSTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "System error message"))==NULL) +assert(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_SYSERRSTR_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") /* I/O pipeline errors */ @@ -453,33 +354,26 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter operation failed"))==NULL) if((H5E_CANTFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Group related errors */ -assert(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") -assert(H5E_CANTCLOSEOBJ_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't close object"))==NULL) +/* Property list errors */ +assert(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_CANTCLOSEOBJ_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") -assert(H5E_COMPLEN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Name component is too long"))==NULL) +assert(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_COMPLEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_PATH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Problem with path to object"))==NULL) +assert(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_PATH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_DUPCLASS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* No error */ -assert(H5E_NONE_MINOR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL) +assert(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_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SETDISALLOWED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Plugin errors */ @@ -536,133 +430,257 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "File mount error"))==NULL) if((H5E_MOUNT_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 */ -assert(H5E_BADATOM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find atom information (already closed?)"))==NULL) +/* Cache related errors */ +assert(H5E_CANTFLUSH_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to flush data from cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTFLUSH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_BADGROUP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find ID group information"))==NULL) +assert(H5E_CANTSERIALIZE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to serialize data from cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADGROUP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSERIALIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTREGISTER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to register new atom"))==NULL) +assert(H5E_CANTTAG_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to tag metadata in the cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTREGISTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTTAG_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTINC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to increment reference count"))==NULL) +assert(H5E_CANTLOAD_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to load metadata into cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTINC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTLOAD_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTDEC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decrement reference count"))==NULL) +assert(H5E_PROTECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Protected metadata error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDEC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_NOIDS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of IDs for group"))==NULL) +assert(H5E_NOTCACHED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Metadata not currently cached"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOIDS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOTCACHED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_SYSTEM_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Internal error detected"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_SYSTEM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTINS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert metadata into cache"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTINS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTPROTECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to protect metadata"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTPROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTUNPROTECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unprotect metadata"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTUNPROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTPIN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to pin cache entry"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTPIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTUNPIN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to un-pin cache entry"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTUNPIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTMARKDIRTY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to mark a pinned entry as dirty"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTMARKDIRTY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTDIRTY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to mark metadata as dirty"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTDIRTY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTEXPUNGE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to expunge a metadata cache entry"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTEXPUNGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTRESIZE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to resize a metadata cache entry"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTRESIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTDEPEND_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to create a flush dependency"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTDEPEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTUNDEPEND_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to destroy a flush dependency"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTUNDEPEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTNOTIFY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to notify object about action"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTNOTIFY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Cache related errors */ -assert(H5E_CANTFLUSH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to flush data from cache"))==NULL) +/* B-tree related errors */ +assert(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") +assert(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") +assert(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") +assert(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") +assert(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") +assert(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") +assert(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") +assert(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") +assert(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") +assert(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") +assert(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") + +/* Resource errors */ +assert(H5E_NOSPACE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "No space available for allocation"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTFLUSH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTSERIALIZE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to serialize data from cache"))==NULL) +assert(H5E_CANTALLOC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't allocate space"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSERIALIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTALLOC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTTAG_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to tag metadata in the cache"))==NULL) +assert(H5E_CANTCOPY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to copy object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTTAG_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCOPY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTLOAD_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to load metadata into cache"))==NULL) +assert(H5E_CANTFREE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to free object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTLOAD_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTFREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_PROTECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Protected metadata error"))==NULL) +assert(H5E_ALREADYEXISTS_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_PROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ALREADYEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_NOTCACHED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Metadata not currently cached"))==NULL) +assert(H5E_CANTLOCK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to lock object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOTCACHED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_SYSTEM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Internal error detected"))==NULL) +assert(H5E_CANTUNLOCK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unlock object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SYSTEM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTUNLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTINS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert metadata into cache"))==NULL) +assert(H5E_CANTGC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to garbage collect"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTINS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTGC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTPROTECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to protect metadata"))==NULL) +assert(H5E_CANTGETSIZE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to compute size"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTPROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTGETSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTUNPROTECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unprotect metadata"))==NULL) +assert(H5E_OBJOPEN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object is already open"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUNPROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_OBJOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTPIN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to pin cache entry"))==NULL) + +/* Object header related errors */ +assert(H5E_LINKCOUNT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad object header link count"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTPIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_LINKCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTUNPIN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to un-pin cache entry"))==NULL) +assert(H5E_VERSION_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Wrong version number"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUNPIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_VERSION_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTMARKDIRTY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to mark a pinned entry as dirty"))==NULL) +assert(H5E_ALIGNMENT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Alignment error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTMARKDIRTY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ALIGNMENT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTDIRTY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to mark metadata as dirty"))==NULL) +assert(H5E_BADMESG_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unrecognized message"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDIRTY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADMESG_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTEXPUNGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to expunge a metadata cache entry"))==NULL) +assert(H5E_CANTDELETE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't delete message"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTEXPUNGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTDELETE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTRESIZE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to resize a metadata cache entry"))==NULL) +assert(H5E_BADITER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Iteration failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRESIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADITER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTDEPEND_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to create a flush dependency"))==NULL) +assert(H5E_CANTPACK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't pack messages"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDEPEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTPACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTUNDEPEND_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to destroy a flush dependency"))==NULL) +assert(H5E_CANTRESET_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't reset object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUNDEPEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRESET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTNOTIFY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to notify object about action"))==NULL) +assert(H5E_CANTRENAME_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to rename object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTNOTIFY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRENAME_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Link related errors */ @@ -692,21 +710,55 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't sort objects"))==NULL) if((H5E_CANTSORT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Parallel MPI errors */ -assert(H5E_MPI_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Some MPI function failed"))==NULL) +/* Argument errors */ +assert(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_MPI_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") -assert(H5E_MPIERRSTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "MPI Error String"))==NULL) +assert(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_MPIERRSTR_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") -assert(H5E_CANTRECV_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't receive data"))==NULL) +assert(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_CANTRECV_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") +assert(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_BADRANGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(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_BADVALUE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + +/* System level errors */ +assert(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") + +/* Free space errors */ +assert(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_CANTMERGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(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_CANTREVIVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(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_CANTSHRINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Dataspace errors */ @@ -740,89 +792,42 @@ 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_CANTCOMPARE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Argument errors */ -assert(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_UNINITIALIZED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_UNSUPPORTED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_BADTYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_BADRANGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_BADVALUE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad value"))==NULL) +assert(H5E_CANTAPPEND_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't append object"))==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_CANTAPPEND_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 */ -assert(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") -assert(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") -assert(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") -assert(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") -assert(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") -assert(H5E_CANTREDISTRIBUTE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to redistribute records"))==NULL) +/* Heap errors */ +assert(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_CANTREDISTRIBUTE_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") -assert(H5E_CANTSWAP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to swap records"))==NULL) +assert(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_CANTSWAP_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") -assert(H5E_CANTINSERT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert object"))==NULL) +assert(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_CANTINSERT_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") -assert(H5E_CANTLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to list node"))==NULL) +assert(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_CANTLIST_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") -assert(H5E_CANTMODIFY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to modify record"))==NULL) +assert(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_CANTMODIFY_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") -assert(H5E_CANTREMOVE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to remove object"))==NULL) +assert(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_CANTREMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTOPERATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Datatype conversion errors */ diff --git a/src/H5Epubgen.h b/src/H5Epubgen.h index e79106f..9011fd3 100644 --- a/src/H5Epubgen.h +++ b/src/H5Epubgen.h @@ -24,77 +24,121 @@ /* Major error codes */ /*********************/ -#define H5E_FUNC (H5OPEN H5E_FUNC_g) -#define H5E_FILE (H5OPEN H5E_FILE_g) -#define H5E_SOHM (H5OPEN H5E_SOHM_g) -#define H5E_SYM (H5OPEN H5E_SYM_g) -#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g) -#define H5E_VFL (H5OPEN H5E_VFL_g) +#define H5E_EARRAY (H5OPEN H5E_EARRAY_g) +#define H5E_PLIST (H5OPEN H5E_PLIST_g) +#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g) +#define H5E_FSPACE (H5OPEN H5E_FSPACE_g) +#define H5E_STORAGE (H5OPEN H5E_STORAGE_g) +#define H5E_CACHE (H5OPEN H5E_CACHE_g) +#define H5E_IO (H5OPEN H5E_IO_g) #define H5E_INTERNAL (H5OPEN H5E_INTERNAL_g) -#define H5E_BTREE (H5OPEN H5E_BTREE_g) -#define H5E_REFERENCE (H5OPEN H5E_REFERENCE_g) +#define H5E_SYM (H5OPEN H5E_SYM_g) #define H5E_DATASPACE (H5OPEN H5E_DATASPACE_g) -#define H5E_RESOURCE (H5OPEN H5E_RESOURCE_g) -#define H5E_RS (H5OPEN H5E_RS_g) #define H5E_FARRAY (H5OPEN H5E_FARRAY_g) -#define H5E_HEAP (H5OPEN H5E_HEAP_g) -#define H5E_ATTR (H5OPEN H5E_ATTR_g) -#define H5E_IO (H5OPEN H5E_IO_g) +#define H5E_OHDR (H5OPEN H5E_OHDR_g) +#define H5E_SOHM (H5OPEN H5E_SOHM_g) #define H5E_EFL (H5OPEN H5E_EFL_g) -#define H5E_TST (H5OPEN H5E_TST_g) -#define H5E_FSPACE (H5OPEN H5E_FSPACE_g) +#define H5E_SLIST (H5OPEN H5E_SLIST_g) +#define H5E_BTREE (H5OPEN H5E_BTREE_g) +#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g) +#define H5E_ATOM (H5OPEN H5E_ATOM_g) +#define H5E_FILE (H5OPEN H5E_FILE_g) +#define H5E_HEAP (H5OPEN H5E_HEAP_g) +#define H5E_VFL (H5OPEN H5E_VFL_g) #define H5E_DATASET (H5OPEN H5E_DATASET_g) -#define H5E_STORAGE (H5OPEN H5E_STORAGE_g) #define H5E_LINK (H5OPEN H5E_LINK_g) -#define H5E_PLIST (H5OPEN H5E_PLIST_g) -#define H5E_DATATYPE (H5OPEN H5E_DATATYPE_g) -#define H5E_OHDR (H5OPEN H5E_OHDR_g) -#define H5E_ATOM (H5OPEN H5E_ATOM_g) -#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g) -#define H5E_SLIST (H5OPEN H5E_SLIST_g) -#define H5E_ARGS (H5OPEN H5E_ARGS_g) -#define H5E_EARRAY (H5OPEN H5E_EARRAY_g) #define H5E_PLINE (H5OPEN H5E_PLINE_g) +#define H5E_FUNC (H5OPEN H5E_FUNC_g) +#define H5E_TST (H5OPEN H5E_TST_g) +#define H5E_ATTR (H5OPEN H5E_ATTR_g) #define H5E_ERROR (H5OPEN H5E_ERROR_g) -#define H5E_CACHE (H5OPEN H5E_CACHE_g) -H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */ -H5_DLLVAR hid_t H5E_FILE_g; /* File accessibilty */ -H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */ -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_VFL_g; /* Virtual File Layer */ +#define H5E_ARGS (H5OPEN H5E_ARGS_g) +#define H5E_RESOURCE (H5OPEN H5E_RESOURCE_g) +#define H5E_DATATYPE (H5OPEN H5E_DATATYPE_g) +#define H5E_RS (H5OPEN H5E_RS_g) +#define H5E_REFERENCE (H5OPEN H5E_REFERENCE_g) +H5_DLLVAR hid_t H5E_EARRAY_g; /* Extensible Array */ +H5_DLLVAR hid_t H5E_PLIST_g; /* Property lists */ +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_STORAGE_g; /* Data storage */ +H5_DLLVAR hid_t H5E_CACHE_g; /* Object cache */ +H5_DLLVAR hid_t H5E_IO_g; /* Low-level I/O */ H5_DLLVAR hid_t H5E_INTERNAL_g; /* Internal error (too specific to document in detail) */ -H5_DLLVAR hid_t H5E_BTREE_g; /* B-Tree node */ -H5_DLLVAR hid_t H5E_REFERENCE_g; /* References */ +H5_DLLVAR hid_t H5E_SYM_g; /* Symbol table */ H5_DLLVAR hid_t H5E_DATASPACE_g; /* Dataspace */ -H5_DLLVAR hid_t H5E_RESOURCE_g; /* Resource unavailable */ -H5_DLLVAR hid_t H5E_RS_g; /* Reference Counted Strings */ H5_DLLVAR hid_t H5E_FARRAY_g; /* Fixed Array */ -H5_DLLVAR hid_t H5E_HEAP_g; /* Heap */ -H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */ -H5_DLLVAR hid_t H5E_IO_g; /* Low-level I/O */ +H5_DLLVAR hid_t H5E_OHDR_g; /* Object header */ +H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */ H5_DLLVAR hid_t H5E_EFL_g; /* External file list */ -H5_DLLVAR hid_t H5E_TST_g; /* Ternary Search Trees */ -H5_DLLVAR hid_t H5E_FSPACE_g; /* Free Space Manager */ +H5_DLLVAR hid_t H5E_SLIST_g; /* Skip Lists */ +H5_DLLVAR hid_t H5E_BTREE_g; /* B-Tree node */ +H5_DLLVAR hid_t H5E_PLUGIN_g; /* Plugin for dynamically loaded library */ +H5_DLLVAR hid_t H5E_ATOM_g; /* Object atom */ +H5_DLLVAR hid_t H5E_FILE_g; /* File accessibilty */ +H5_DLLVAR hid_t H5E_HEAP_g; /* Heap */ +H5_DLLVAR hid_t H5E_VFL_g; /* Virtual File Layer */ H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */ -H5_DLLVAR hid_t H5E_STORAGE_g; /* Data storage */ H5_DLLVAR hid_t H5E_LINK_g; /* Links */ -H5_DLLVAR hid_t H5E_PLIST_g; /* Property lists */ -H5_DLLVAR hid_t H5E_DATATYPE_g; /* Datatype */ -H5_DLLVAR hid_t H5E_OHDR_g; /* Object header */ -H5_DLLVAR hid_t H5E_ATOM_g; /* Object atom */ -H5_DLLVAR hid_t H5E_NONE_MAJOR_g; /* No error */ -H5_DLLVAR hid_t H5E_SLIST_g; /* Skip Lists */ -H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */ -H5_DLLVAR hid_t H5E_EARRAY_g; /* Extensible Array */ H5_DLLVAR hid_t H5E_PLINE_g; /* Data filters */ +H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */ +H5_DLLVAR hid_t H5E_TST_g; /* Ternary Search Trees */ +H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */ H5_DLLVAR hid_t H5E_ERROR_g; /* Error API */ -H5_DLLVAR hid_t H5E_CACHE_g; /* Object cache */ +H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */ +H5_DLLVAR hid_t H5E_RESOURCE_g; /* Resource unavailable */ +H5_DLLVAR hid_t H5E_DATATYPE_g; /* Datatype */ +H5_DLLVAR hid_t H5E_RS_g; /* Reference Counted Strings */ +H5_DLLVAR hid_t H5E_REFERENCE_g; /* References */ /*********************/ /* Minor error codes */ /*********************/ +/* No error */ +#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g) +H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */ + +/* 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 */ + +/* Function entry/exit interface errors */ +#define H5E_CANTINIT (H5OPEN H5E_CANTINIT_g) +#define H5E_ALREADYINIT (H5OPEN H5E_ALREADYINIT_g) +#define H5E_CANTRELEASE (H5OPEN H5E_CANTRELEASE_g) +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 */ + +/* 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 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 */ + /* Generic low-level file I/O errors */ #define H5E_SEEKERROR (H5OPEN H5E_SEEKERROR_g) #define H5E_READERROR (H5OPEN H5E_READERROR_g) @@ -109,92 +153,6 @@ 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 */ -/* Resource errors */ -#define H5E_NOSPACE (H5OPEN H5E_NOSPACE_g) -#define H5E_CANTALLOC (H5OPEN H5E_CANTALLOC_g) -#define H5E_CANTCOPY (H5OPEN H5E_CANTCOPY_g) -#define H5E_CANTFREE (H5OPEN H5E_CANTFREE_g) -#define H5E_ALREADYEXISTS (H5OPEN H5E_ALREADYEXISTS_g) -#define H5E_CANTLOCK (H5OPEN H5E_CANTLOCK_g) -#define H5E_CANTUNLOCK (H5OPEN H5E_CANTUNLOCK_g) -#define H5E_CANTGC (H5OPEN H5E_CANTGC_g) -#define H5E_CANTGETSIZE (H5OPEN H5E_CANTGETSIZE_g) -#define H5E_OBJOPEN (H5OPEN H5E_OBJOPEN_g) -H5_DLLVAR hid_t H5E_NOSPACE_g; /* No space available for allocation */ -H5_DLLVAR hid_t H5E_CANTALLOC_g; /* Can't allocate space */ -H5_DLLVAR hid_t H5E_CANTCOPY_g; /* Unable to copy object */ -H5_DLLVAR hid_t H5E_CANTFREE_g; /* Unable to free object */ -H5_DLLVAR hid_t H5E_ALREADYEXISTS_g; /* Object already exists */ -H5_DLLVAR hid_t H5E_CANTLOCK_g; /* Unable to lock object */ -H5_DLLVAR hid_t H5E_CANTUNLOCK_g; /* Unable to unlock object */ -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 */ - -/* 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 */ - -/* Function entry/exit interface errors */ -#define H5E_CANTINIT (H5OPEN H5E_CANTINIT_g) -#define H5E_ALREADYINIT (H5OPEN H5E_ALREADYINIT_g) -#define H5E_CANTRELEASE (H5OPEN H5E_CANTRELEASE_g) -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 */ - -/* 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 */ - -/* 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 */ - -/* Object header related errors */ -#define H5E_LINKCOUNT (H5OPEN H5E_LINKCOUNT_g) -#define H5E_VERSION (H5OPEN H5E_VERSION_g) -#define H5E_ALIGNMENT (H5OPEN H5E_ALIGNMENT_g) -#define H5E_BADMESG (H5OPEN H5E_BADMESG_g) -#define H5E_CANTDELETE (H5OPEN H5E_CANTDELETE_g) -#define H5E_BADITER (H5OPEN H5E_BADITER_g) -#define H5E_CANTPACK (H5OPEN H5E_CANTPACK_g) -#define H5E_CANTRESET (H5OPEN H5E_CANTRESET_g) -#define H5E_CANTRENAME (H5OPEN H5E_CANTRENAME_g) -H5_DLLVAR hid_t H5E_LINKCOUNT_g; /* Bad object header link count */ -H5_DLLVAR hid_t H5E_VERSION_g; /* Wrong version number */ -H5_DLLVAR hid_t H5E_ALIGNMENT_g; /* Alignment error */ -H5_DLLVAR hid_t H5E_BADMESG_g; /* Unrecognized message */ -H5_DLLVAR hid_t H5E_CANTDELETE_g; /* Can't delete message */ -H5_DLLVAR hid_t H5E_BADITER_g; /* Iteration failed */ -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 */ - /* I/O pipeline errors */ #define H5E_NOFILTER (H5OPEN H5E_NOFILTER_g) #define H5E_CALLBACK (H5OPEN H5E_CALLBACK_g) @@ -209,19 +167,15 @@ 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 */ -/* 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 */ - -/* No error */ -#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g) -H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */ +/* 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 */ /* Plugin errors */ #define H5E_OPENERROR (H5OPEN H5E_OPENERROR_g) @@ -247,20 +201,6 @@ 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 */ -/* 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 */ - /* Cache related errors */ #define H5E_CANTFLUSH (H5OPEN H5E_CANTFLUSH_g) #define H5E_CANTSERIALIZE (H5OPEN H5E_CANTSERIALIZE_g) @@ -301,6 +241,72 @@ H5_DLLVAR hid_t H5E_CANTDEPEND_g; /* Unable to create a flush dependency */ H5_DLLVAR hid_t H5E_CANTUNDEPEND_g; /* Unable to destroy a flush dependency */ H5_DLLVAR hid_t H5E_CANTNOTIFY_g; /* Unable to notify object about action */ +/* 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 */ + +/* Resource errors */ +#define H5E_NOSPACE (H5OPEN H5E_NOSPACE_g) +#define H5E_CANTALLOC (H5OPEN H5E_CANTALLOC_g) +#define H5E_CANTCOPY (H5OPEN H5E_CANTCOPY_g) +#define H5E_CANTFREE (H5OPEN H5E_CANTFREE_g) +#define H5E_ALREADYEXISTS (H5OPEN H5E_ALREADYEXISTS_g) +#define H5E_CANTLOCK (H5OPEN H5E_CANTLOCK_g) +#define H5E_CANTUNLOCK (H5OPEN H5E_CANTUNLOCK_g) +#define H5E_CANTGC (H5OPEN H5E_CANTGC_g) +#define H5E_CANTGETSIZE (H5OPEN H5E_CANTGETSIZE_g) +#define H5E_OBJOPEN (H5OPEN H5E_OBJOPEN_g) +H5_DLLVAR hid_t H5E_NOSPACE_g; /* No space available for allocation */ +H5_DLLVAR hid_t H5E_CANTALLOC_g; /* Can't allocate space */ +H5_DLLVAR hid_t H5E_CANTCOPY_g; /* Unable to copy object */ +H5_DLLVAR hid_t H5E_CANTFREE_g; /* Unable to free object */ +H5_DLLVAR hid_t H5E_ALREADYEXISTS_g; /* Object already exists */ +H5_DLLVAR hid_t H5E_CANTLOCK_g; /* Unable to lock object */ +H5_DLLVAR hid_t H5E_CANTUNLOCK_g; /* Unable to unlock object */ +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 */ + +/* Object header related errors */ +#define H5E_LINKCOUNT (H5OPEN H5E_LINKCOUNT_g) +#define H5E_VERSION (H5OPEN H5E_VERSION_g) +#define H5E_ALIGNMENT (H5OPEN H5E_ALIGNMENT_g) +#define H5E_BADMESG (H5OPEN H5E_BADMESG_g) +#define H5E_CANTDELETE (H5OPEN H5E_CANTDELETE_g) +#define H5E_BADITER (H5OPEN H5E_BADITER_g) +#define H5E_CANTPACK (H5OPEN H5E_CANTPACK_g) +#define H5E_CANTRESET (H5OPEN H5E_CANTRESET_g) +#define H5E_CANTRENAME (H5OPEN H5E_CANTRENAME_g) +H5_DLLVAR hid_t H5E_LINKCOUNT_g; /* Bad object header link count */ +H5_DLLVAR hid_t H5E_VERSION_g; /* Wrong version number */ +H5_DLLVAR hid_t H5E_ALIGNMENT_g; /* Alignment error */ +H5_DLLVAR hid_t H5E_BADMESG_g; /* Unrecognized message */ +H5_DLLVAR hid_t H5E_CANTDELETE_g; /* Can't delete message */ +H5_DLLVAR hid_t H5E_BADITER_g; /* Iteration failed */ +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 */ + /* Link related errors */ #define H5E_TRAVERSE (H5OPEN H5E_TRAVERSE_g) #define H5E_NLINKS (H5OPEN H5E_NLINKS_g) @@ -313,13 +319,29 @@ 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 */ -/* 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 */ +/* 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 */ + +/* System level errors */ +#define H5E_SYSERRSTR (H5OPEN H5E_SYSERRSTR_g) +H5_DLLVAR hid_t H5E_SYSERRSTR_g; /* System error message */ + +/* 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 */ /* Dataspace errors */ #define H5E_CANTCLIP (H5OPEN H5E_CANTCLIP_g) @@ -328,48 +350,28 @@ H5_DLLVAR hid_t H5E_CANTRECV_g; /* Can't receive data */ #define H5E_CANTNEXT (H5OPEN H5E_CANTNEXT_g) #define H5E_BADSELECT (H5OPEN H5E_BADSELECT_g) #define H5E_CANTCOMPARE (H5OPEN H5E_CANTCOMPARE_g) +#define H5E_CANTAPPEND (H5OPEN H5E_CANTAPPEND_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 */ +H5_DLLVAR hid_t H5E_CANTAPPEND_g; /* Can't append object */ -/* 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 */ +/* 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 */ /* Datatype conversion errors */ #define H5E_CANTCONVERT (H5OPEN H5E_CANTCONVERT_g) diff --git a/src/H5Eterm.h b/src/H5Eterm.h index 5db503c..2e99bc6 100644 --- a/src/H5Eterm.h +++ b/src/H5Eterm.h @@ -22,100 +22,77 @@ /* Reset major error IDs */ -H5E_FUNC_g= -H5E_FILE_g= -H5E_SOHM_g= -H5E_SYM_g= -H5E_PLUGIN_g= -H5E_VFL_g= +H5E_EARRAY_g= +H5E_PLIST_g= +H5E_NONE_MAJOR_g= +H5E_FSPACE_g= +H5E_STORAGE_g= +H5E_CACHE_g= +H5E_IO_g= H5E_INTERNAL_g= -H5E_BTREE_g= -H5E_REFERENCE_g= +H5E_SYM_g= H5E_DATASPACE_g= -H5E_RESOURCE_g= -H5E_RS_g= H5E_FARRAY_g= -H5E_HEAP_g= -H5E_ATTR_g= -H5E_IO_g= +H5E_OHDR_g= +H5E_SOHM_g= H5E_EFL_g= -H5E_TST_g= -H5E_FSPACE_g= +H5E_SLIST_g= +H5E_BTREE_g= +H5E_PLUGIN_g= +H5E_ATOM_g= +H5E_FILE_g= +H5E_HEAP_g= +H5E_VFL_g= H5E_DATASET_g= -H5E_STORAGE_g= H5E_LINK_g= -H5E_PLIST_g= -H5E_DATATYPE_g= -H5E_OHDR_g= -H5E_ATOM_g= -H5E_NONE_MAJOR_g= -H5E_SLIST_g= -H5E_ARGS_g= -H5E_EARRAY_g= H5E_PLINE_g= +H5E_FUNC_g= +H5E_TST_g= +H5E_ATTR_g= H5E_ERROR_g= -H5E_CACHE_g= (-1); +H5E_ARGS_g= +H5E_RESOURCE_g= +H5E_DATATYPE_g= +H5E_RS_g= +H5E_REFERENCE_g= (-1); /* Reset minor error IDs */ -/* 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= - -/* Resource errors */ -H5E_NOSPACE_g= -H5E_CANTALLOC_g= -H5E_CANTCOPY_g= -H5E_CANTFREE_g= -H5E_ALREADYEXISTS_g= -H5E_CANTLOCK_g= -H5E_CANTUNLOCK_g= -H5E_CANTGC_g= -H5E_CANTGETSIZE_g= -H5E_OBJOPEN_g= +/* No error */ +H5E_NONE_MINOR_g= -/* Heap errors */ -H5E_CANTRESTORE_g= -H5E_CANTCOMPUTE_g= -H5E_CANTEXTEND_g= -H5E_CANTATTACH_g= -H5E_CANTUPDATE_g= -H5E_CANTOPERATE_g= +/* Group related errors */ +H5E_CANTOPENOBJ_g= +H5E_CANTCLOSEOBJ_g= +H5E_COMPLEN_g= +H5E_PATH_g= /* Function entry/exit interface errors */ H5E_CANTINIT_g= H5E_ALREADYINIT_g= H5E_CANTRELEASE_g= -/* Property list errors */ -H5E_CANTGET_g= -H5E_CANTSET_g= -H5E_DUPCLASS_g= -H5E_SETDISALLOWED_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= -/* Object header related errors */ -H5E_LINKCOUNT_g= -H5E_VERSION_g= -H5E_ALIGNMENT_g= -H5E_BADMESG_g= -H5E_CANTDELETE_g= -H5E_BADITER_g= -H5E_CANTPACK_g= -H5E_CANTRESET_g= -H5E_CANTRENAME_g= +/* Object atom related errors */ +H5E_BADATOM_g= +H5E_BADGROUP_g= +H5E_CANTREGISTER_g= +H5E_CANTINC_g= +H5E_CANTDEC_g= +H5E_NOIDS_g= -/* System level errors */ -H5E_SYSERRSTR_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= /* I/O pipeline errors */ H5E_NOFILTER_g= @@ -125,14 +102,11 @@ H5E_SETLOCAL_g= H5E_NOENCODER_g= H5E_CANTFILTER_g= -/* Group related errors */ -H5E_CANTOPENOBJ_g= -H5E_CANTCLOSEOBJ_g= -H5E_COMPLEN_g= -H5E_PATH_g= - -/* No error */ -H5E_NONE_MINOR_g= +/* Property list errors */ +H5E_CANTGET_g= +H5E_CANTSET_g= +H5E_DUPCLASS_g= +H5E_SETDISALLOWED_g= /* Plugin errors */ H5E_OPENERROR_g= @@ -148,14 +122,6 @@ H5E_BADFILE_g= H5E_TRUNCATED_g= H5E_MOUNT_g= -/* Object atom related errors */ -H5E_BADATOM_g= -H5E_BADGROUP_g= -H5E_CANTREGISTER_g= -H5E_CANTINC_g= -H5E_CANTDEC_g= -H5E_NOIDS_g= - /* Cache related errors */ H5E_CANTFLUSH_g= H5E_CANTSERIALIZE_g= @@ -177,6 +143,42 @@ H5E_CANTDEPEND_g= H5E_CANTUNDEPEND_g= H5E_CANTNOTIFY_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= + +/* Resource errors */ +H5E_NOSPACE_g= +H5E_CANTALLOC_g= +H5E_CANTCOPY_g= +H5E_CANTFREE_g= +H5E_ALREADYEXISTS_g= +H5E_CANTLOCK_g= +H5E_CANTUNLOCK_g= +H5E_CANTGC_g= +H5E_CANTGETSIZE_g= +H5E_OBJOPEN_g= + +/* Object header related errors */ +H5E_LINKCOUNT_g= +H5E_VERSION_g= +H5E_ALIGNMENT_g= +H5E_BADMESG_g= +H5E_CANTDELETE_g= +H5E_BADITER_g= +H5E_CANTPACK_g= +H5E_CANTRESET_g= +H5E_CANTRENAME_g= + /* Link related errors */ H5E_TRAVERSE_g= H5E_NLINKS_g= @@ -184,10 +186,20 @@ H5E_NOTREGISTERED_g= H5E_CANTMOVE_g= H5E_CANTSORT_g= -/* Parallel MPI errors */ -H5E_MPI_g= -H5E_MPIERRSTR_g= -H5E_CANTRECV_g= +/* Argument errors */ +H5E_UNINITIALIZED_g= +H5E_UNSUPPORTED_g= +H5E_BADTYPE_g= +H5E_BADRANGE_g= +H5E_BADVALUE_g= + +/* System level errors */ +H5E_SYSERRSTR_g= + +/* Free space errors */ +H5E_CANTMERGE_g= +H5E_CANTREVIVE_g= +H5E_CANTSHRINK_g= /* Dataspace errors */ H5E_CANTCLIP_g= @@ -195,27 +207,16 @@ H5E_CANTCOUNT_g= H5E_CANTSELECT_g= H5E_CANTNEXT_g= H5E_BADSELECT_g= -H5E_CANTCOMPARE_g= - -/* Argument errors */ -H5E_UNINITIALIZED_g= -H5E_UNSUPPORTED_g= -H5E_BADTYPE_g= -H5E_BADRANGE_g= -H5E_BADVALUE_g= +H5E_CANTCOMPARE_g= +H5E_CANTAPPEND_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= +/* Heap errors */ +H5E_CANTRESTORE_g= +H5E_CANTCOMPUTE_g= +H5E_CANTEXTEND_g= +H5E_CANTATTACH_g= +H5E_CANTUPDATE_g= +H5E_CANTOPERATE_g= /* Datatype conversion errors */ H5E_CANTCONVERT_g= diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 787c88b..b70004b 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1931,10 +1931,12 @@ done: if(adding_entry) { hbool_t free_list = FALSE; - /* Set chunk information in property list. If we are adding a new layout, - * use H5P__set_layout so other fields are initialized properly. If we are - * extending the layout, just use H5P_set directly so we don't mess with - * anything else. */ + /* Set VDS layout information in property list. If we are adding a new + * layout, use H5P__set_layout so other fields are initialized properly. + * If we are extending the layout, just use H5P_set directly so we don't + * mess with anything else. Put this after the done: label because the + * original list may no longer be valid due to the use of realloc(), so + * we want to make sure the list is available if possible. */ if(new_layout) { if(H5P__set_layout(plist, &layout) < 0) { HDONE_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout") diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 898c3df..99f8838 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -5027,7 +5027,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Merge/add span 'a' with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_a->high,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Advance span 'a', leave span 'b' */ H5S_hyper_recover_span(&recover_a,&span_a,span_a->next); @@ -5042,7 +5042,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Merge/add lower part of span 'a' with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Check for overlaps between upper part of span 'a' and lower part of span 'b' */ @@ -5053,7 +5053,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(span_a->down==NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_a->high,NULL,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") } /* end if */ /* If there are down spans, check for the overlap in them and add to each appropriate list */ else { @@ -5070,7 +5070,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_not_b!=NULL) { /* Merge/add overlapped part with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_b->low,span_a->high,down_a_not_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_not_b); @@ -5080,7 +5080,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_and_b!=NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_a->high,down_a_and_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_and_b); @@ -5090,7 +5090,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_b_not_a!=NULL) { /* Merge/add overlapped part with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_a->high,down_b_not_a,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_b_not_a); @@ -5129,7 +5129,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Merge/add lower part of span 'a' with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Check for overlaps between middle part of span 'a' and span 'b' */ @@ -5140,7 +5140,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(span_a->down==NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_b->high,NULL,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") } /* end if */ /* If there are down spans, check for the overlap in them and add to each appropriate list */ else { @@ -5157,7 +5157,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_not_b!=NULL) { /* Merge/add overlapped part with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_b->low,span_b->high,down_a_not_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_not_b); @@ -5167,7 +5167,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_and_b!=NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_b->high,down_a_and_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_and_b); @@ -5177,7 +5177,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_b_not_a!=NULL) { /* Merge/add overlapped part with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_b->high,down_b_not_a,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_b_not_a); @@ -5208,7 +5208,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(span_a->low>span_b->low) { /* Merge/add lower part of span 'b' with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") } /* end if */ else { /* Keep going, nothing to split off */ @@ -5223,7 +5223,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(span_a->down==NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_a->high,NULL,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") } /* end if */ /* If there are down spans, check for the overlap in them and add to each appropriate list */ else { @@ -5240,7 +5240,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_not_b!=NULL) { /* Merge/add overlapped part with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_a->high,down_a_not_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_not_b); @@ -5250,7 +5250,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_and_b!=NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_a->high,down_a_and_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_and_b); @@ -5260,7 +5260,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_b_not_a!=NULL) { /* Merge/add overlapped part with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_a->low,span_a->high,down_b_not_a,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_b_not_a); @@ -5300,7 +5300,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Merge/add lower part of span 'b' with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") } /* end if */ else { /* Keep going, nothing to split off */ @@ -5315,7 +5315,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(span_a->down==NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_b->high,NULL,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") } /* end if */ /* If there are down spans, check for the overlap in them and add to each appropriate list */ else { @@ -5332,7 +5332,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_not_b!=NULL) { /* Merge/add overlapped part with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_b->high,down_a_not_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_not_b); @@ -5342,7 +5342,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_and_b!=NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_b->high,down_a_and_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_and_b); @@ -5352,7 +5352,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_b_not_a!=NULL) { /* Merge/add overlapped part with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_a->low,span_b->high,down_b_not_a,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_b_not_a); @@ -5381,7 +5381,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Merge/add span 'b' with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_b->high,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Advance span 'b', leave span 'a' */ H5S_hyper_recover_span(&recover_b,&span_b,span_b->next); @@ -5395,7 +5395,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Merge/add span 'a' with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_a->high,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Advance to the next 'a' span */ H5S_hyper_recover_span(&recover_a,&span_a,span_a->next); @@ -5408,7 +5408,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Merge/add span 'b' with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_b->high,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Advance to the next 'b' span */ H5S_hyper_recover_span(&recover_b,&span_b,span_b->next); @@ -5490,7 +5490,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf if(span_a->highlow) { /* Merge/add span 'a' with/to the merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Advance span 'a' */ H5S_hyper_recover_span(&recover_a,&span_a,span_a->next); @@ -5505,19 +5505,19 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) { /* Merge/add copy of span 'a' with/to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") } /* end if */ else { /* Merge/add lower part of span 'a' with/to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Get merged span tree for overlapped section */ tmp_spans=H5S_hyper_merge_spans_helper(span_a->down,span_b->down); /* Merge/add overlapped section to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->high,tmp_spans,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Release merged span tree for overlapped section */ H5S_hyper_free_span_info(tmp_spans); @@ -5554,19 +5554,19 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) { /* Merge/add copy of lower & middle parts of span 'a' to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->high,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") } /* end if */ else { /* Merge/add lower part of span 'a' to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Get merged span tree for overlapped section */ tmp_spans=H5S_hyper_merge_spans_helper(span_a->down,span_b->down); /* Merge/add overlapped section to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,tmp_spans,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Release merged span tree for overlapped section */ H5S_hyper_free_span_info(tmp_spans); @@ -5594,14 +5594,14 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) { /* Merge/add copy of lower & middle parts of span 'b' to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->high,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") } /* end if */ else { /* Check if there is a lower part of span 'b' */ if(span_a->low>span_b->low) { /* Merge/add lower part of span 'b' to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") } /* end if */ else { /* No lower part of span 'b' , keep going... */ @@ -5612,7 +5612,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Merge/add overlapped section to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,tmp_spans,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Release merged span tree for overlapped section */ H5S_hyper_free_span_info(tmp_spans); @@ -5649,14 +5649,14 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) { /* Merge/add copy of span 'b' to merged spans if so */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") } /* end if */ else { /* Check if there is a lower part of span 'b' */ if(span_a->low>span_b->low) { /* Merge/add lower part of span 'b' to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") } /* end if */ else { /* No lower part of span 'b' , keep going... */ @@ -5667,7 +5667,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Merge/add overlapped section to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->high,tmp_spans,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Release merged span tree for overlapped section */ H5S_hyper_free_span_info(tmp_spans); @@ -5693,7 +5693,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf else { /* Merge/add span 'b' with the merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Advance span 'b' */ H5S_hyper_recover_span(&recover_b,&span_b,span_b->next); @@ -5705,7 +5705,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf while(span_a!=NULL) { /* Merge/add all 'a' spans into the merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Advance to next 'a' span, until all processed */ H5S_hyper_recover_span(&recover_a,&span_a,span_a->next); @@ -5717,7 +5717,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf while(span_b!=NULL) { /* Merge/add all 'b' spans into the merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Advance to next 'b' span, until all processed */ H5S_hyper_recover_span(&recover_b,&span_b,span_b->next); @@ -9292,47 +9292,47 @@ herr_t H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, const H5S_t *src_intersect_space, H5S_t *proj_space) { - hsize_t ss_off[H5S_PROJECT_INTERSECT_NSEQS]; - size_t ss_len[H5S_PROJECT_INTERSECT_NSEQS]; - size_t ss_nseq; - size_t ss_nelem; - size_t ss_i = (size_t)0; - hbool_t advance_ss = FALSE; - H5S_sel_iter_t ss_iter; - hbool_t ss_iter_init = FALSE; - hsize_t ss_sel_off = (hsize_t)0; - hsize_t ds_off[H5S_PROJECT_INTERSECT_NSEQS]; - size_t ds_len[H5S_PROJECT_INTERSECT_NSEQS]; - size_t ds_nseq; - size_t ds_nelem; - size_t ds_i = (size_t)0; - H5S_sel_iter_t ds_iter; - hbool_t ds_iter_init = FALSE; - hsize_t ds_sel_off = (hsize_t)0; - hsize_t sis_off[H5S_PROJECT_INTERSECT_NSEQS]; - size_t sis_len[H5S_PROJECT_INTERSECT_NSEQS]; - size_t sis_nseq; - size_t sis_nelem; - size_t sis_i = (size_t)0; - hbool_t advance_sis = FALSE; - H5S_sel_iter_t sis_iter; - hbool_t sis_iter_init = FALSE; - hsize_t int_sel_off; - size_t int_len; - hsize_t proj_off; - size_t proj_len; - size_t proj_len_rem; - hsize_t proj_down_dims[H5S_MAX_RANK]; - H5S_hyper_span_info_t *curr_span_tree[H5S_MAX_RANK]; - H5S_hyper_span_t *prev_span[H5S_MAX_RANK]; - hsize_t curr_span_up_dim[H5S_MAX_RANK]; - unsigned proj_rank; - hsize_t low; - hsize_t high; - size_t span_len; - size_t nelem; - unsigned i; - herr_t ret_value = SUCCEED; + hsize_t ss_off[H5S_PROJECT_INTERSECT_NSEQS]; /* Offset array for src_space */ + size_t ss_len[H5S_PROJECT_INTERSECT_NSEQS]; /* Length array for src_space */ + size_t ss_nseq; /* Number of sequences for src_space */ + size_t ss_nelem; /* Number of elements for src_space */ + size_t ss_i = (size_t)0; /* Index into offset/length arrays for src_space */ + hbool_t advance_ss = FALSE; /* Whether to advance ss_i on the next iteration */ + H5S_sel_iter_t ss_iter; /* Selection iterator for src_space */ + hbool_t ss_iter_init = FALSE; /* Whether ss_iter is initialized */ + hsize_t ss_sel_off = (hsize_t)0; /* Offset within src_space selection */ + hsize_t ds_off[H5S_PROJECT_INTERSECT_NSEQS]; /* Offset array for dst_space */ + size_t ds_len[H5S_PROJECT_INTERSECT_NSEQS]; /* Length array for dst_space */ + size_t ds_nseq; /* Number of sequences for dst_space */ + size_t ds_nelem; /* Number of elements for dst_space */ + size_t ds_i = (size_t)0; /* Index into offset/length arrays for dst_space */ + H5S_sel_iter_t ds_iter; /* Selection iterator for dst_space */ + hbool_t ds_iter_init = FALSE; /* Whether ds_iter is initialized */ + hsize_t ds_sel_off = (hsize_t)0; /* Offset within dst_space selection */ + hsize_t sis_off[H5S_PROJECT_INTERSECT_NSEQS]; /* Offset array for src_intersect_space */ + size_t sis_len[H5S_PROJECT_INTERSECT_NSEQS]; /* Length array for src_intersect_space */ + size_t sis_nseq; /* Number of sequences for src_intersect_space */ + size_t sis_nelem; /* Number of elements for src_intersect_space */ + size_t sis_i = (size_t)0; /* Index into offset/length arrays for src_intersect_space */ + hbool_t advance_sis = FALSE; /* Whether to advance sis_i on the next iteration */ + H5S_sel_iter_t sis_iter; /* Selection iterator for src_intersect_space */ + hbool_t sis_iter_init = FALSE; /* Whether sis_iter is initialized */ + hsize_t int_sel_off; /* Offset within intersected selections (ss/sis and ds/ps) */ + size_t int_len; /* Length of segment in intersected selections */ + hsize_t proj_off; /* Segment offset in proj_space */ + size_t proj_len; /* Segment length in proj_space */ + size_t proj_len_rem; /* Remaining length in proj_space for segment */ + hsize_t proj_down_dims[H5S_MAX_RANK]; /* "Down" dimensions in proj_space */ + H5S_hyper_span_info_t *curr_span_tree[H5S_MAX_RANK]; /* Current span tree being built (in each dimension) */ + H5S_hyper_span_t *prev_span[H5S_MAX_RANK]; /* Previous span in tree (in each dimension) */ + hsize_t curr_span_up_dim[H5S_MAX_RANK]; /* "Up" dimensions for current span */ + unsigned proj_rank; /* Rank of proj_space */ + hsize_t low; /* Low value of span */ + hsize_t high; /* High value of span */ + size_t span_len; /* Length of span */ + size_t nelem; /* Number of elements returned for get_seq_list op */ + unsigned i; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -9559,7 +9559,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, * current dimension */ low = curr_span_up_dim[i - 1] % proj_space->extent.size[i - 1]; if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], low, low, curr_span_tree[i], NULL) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSELECT, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Reset lower dimension's span tree and previous * span since we just committed it and will start @@ -9584,7 +9584,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, /* Append span in lowest dimension */ if(H5S_hyper_append_span(&prev_span[proj_rank - 1], &curr_span_tree[proj_rank - 1], low, high, NULL, NULL) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSELECT, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Update remaining offset and length */ proj_off += (hsize_t)span_len; @@ -9607,7 +9607,7 @@ loop_end: /* Append remaining span tree to higher dimension */ low = curr_span_up_dim[i - 1] % proj_space->extent.size[i - 1]; if(H5S_hyper_append_span(&prev_span[i - 1], &curr_span_tree[i - 1], low, low, curr_span_tree[i], NULL) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSELECT, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Reset span tree */ if(H5S_hyper_free_span_info(curr_span_tree[i]) < 0) diff --git a/src/H5err.txt b/src/H5err.txt index 5a38cdf..e0ebf5e 100644 --- a/src/H5err.txt +++ b/src/H5err.txt @@ -217,6 +217,7 @@ MINOR, DSPACE, H5E_CANTSELECT, Can't select hyperslab MINOR, DSPACE, H5E_CANTNEXT, Can't move to next iterator location MINOR, DSPACE, H5E_BADSELECT, Invalid selection MINOR, DSPACE, H5E_CANTCOMPARE, Can't compare objects +MINOR, DSPACE, H5E_CANTAPPEND, Can't append object # Property list errors MINOR, PLIST, H5E_CANTGET, Can't get value -- cgit v0.12 From 69e2f53edbfba4bee9865cec3df78c0cbab42182 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 18 Aug 2015 15:45:46 -0500 Subject: [svn-r27520] Add new test for all 3 selection types in the same VDS. Minor cleanup in the tests. Tested: ummon --- src/H5Dvirtual.c | 9 +- test/vds.c | 1130 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 1097 insertions(+), 42 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 0d15685..638ad6d 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -1534,10 +1534,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) for(i = 0; i < (size_t)rank; i++) { if(new_dims[i] == HSIZE_UNDEF) new_dims[i] = curr_dims[i]; - else if(new_dims[i] < storage->min_dims[i]) { - HDassert(0 && "Checking code coverage..."); //VDSINC + else if(new_dims[i] < storage->min_dims[i]) new_dims[i] = storage->min_dims[i]; - } //VDSINC if(new_dims[i] != curr_dims[i]) changed = TRUE; } /* end for */ @@ -2264,10 +2262,8 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, /* If the source dataset is not open, mark the selected elements * as zero so projected_mem_space is freed */ - if(!storage->list[i].source_dset.dset) { - HDassert(0 && "Checking code coverage..."); //VDSINC + if(!storage->list[i].source_dset.dset) select_nelmts = (hssize_t)0; - } //VDSINC } /* end if */ /* If there are not elements selected in this mapping, free @@ -2281,7 +2277,6 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, *tot_nelmts += (hsize_t)select_nelmts; } /* end if */ else { - HDassert(0 && "Checking code coverage..."); //VDSINC /* If there is no clipped_dim_virtual, this must be an unlimited * selection whose dataset was not found in the last call to * H5Dget_space(). Do not attempt to open it as this might diff --git a/test/vds.c b/test/vds.c index 67eb1cb..2804227 100644 --- a/test/vds.c +++ b/test/vds.c @@ -1402,7 +1402,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen srcdsets and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR @@ -1487,7 +1487,7 @@ test_basic_io(unsigned config, hid_t fapl) /* Reopen srcdsets and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR @@ -3370,7 +3370,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR /* Create virtual dataset */ - if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) TEST_ERROR /* Populate write buffer */ @@ -3439,7 +3439,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR } /* end if */ @@ -3555,7 +3555,7 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR @@ -3583,6 +3583,8 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) TEST_ERROR + if(H5Sclose(filespace) < 0) + TEST_ERROR /* Close srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -3736,7 +3738,7 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) TEST_ERROR @@ -3764,6 +3766,8 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) TEST_ERROR + if(H5Sclose(filespace) < 0) + TEST_ERROR /* Update erbuf */ for(i = 0; i < 5; i++) @@ -4229,7 +4233,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR /* Create virtual dataset */ - if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) TEST_ERROR /* Populate write buffer */ @@ -4298,7 +4302,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR } /* end if */ @@ -4413,7 +4417,7 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR @@ -4441,6 +4445,8 @@ test_unlim(unsigned config, hid_t fapl) start[1] = 0; if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) TEST_ERROR + if(H5Sclose(filespace) < 0) + TEST_ERROR /* Update erbuf to reflect only new data that is now visible under * H5D_VDS_FIRST_MISSING (first slice) */ @@ -4596,7 +4602,7 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) TEST_ERROR @@ -4624,6 +4630,8 @@ test_unlim(unsigned config, hid_t fapl) start[1] = 0; if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) TEST_ERROR + if(H5Sclose(filespace) < 0) + TEST_ERROR /* Update erbuf */ for(i = 0; i < 10; i++) @@ -4919,7 +4927,7 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR /* Create virtual dataset */ - if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) TEST_ERROR /* Populate write buffer */ @@ -5016,7 +5024,7 @@ test_unlim(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR } /* end if */ @@ -5131,7 +5139,7 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR @@ -5159,6 +5167,8 @@ test_unlim(unsigned config, hid_t fapl) start[1] = 0; if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) TEST_ERROR + if(H5Sclose(filespace) < 0) + TEST_ERROR /* Close srcdset[0] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { @@ -5311,7 +5321,7 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen srcdset[2] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((srcdset[2] = H5Dopen2(srcfile[0], "src_dset3", H5P_DEFAULT)) < 0) TEST_ERROR @@ -5339,6 +5349,8 @@ test_unlim(unsigned config, hid_t fapl) start[1] = 0; if(H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) TEST_ERROR + if(H5Sclose(filespace) < 0) + TEST_ERROR /* Update erbuf */ for(i = 0; i < 10; i++) { @@ -5490,7 +5502,7 @@ test_unlim(unsigned config, hid_t fapl) /* Reopen srcdset[1] and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) TEST_ERROR @@ -5518,6 +5530,8 @@ test_unlim(unsigned config, hid_t fapl) start[1] = 0; if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) TEST_ERROR + if(H5Sclose(filespace) < 0) + TEST_ERROR /* Update erbuf */ for(i = 0; i < 10; i++) { @@ -5825,7 +5839,7 @@ test_printf(unsigned config, hid_t fapl) hid_t vfile = -1; /* File with virtual dset */ hid_t dcpl = -1; /* Dataset creation property list */ hid_t dapl = -1; /* Dataset access property list */ - hid_t srcspace = -1; /* Source dataspaces */ + hid_t srcspace = -1; /* Source dataspace */ hid_t vspace[2] = {-1, -1}; /* Virtual dset dataspaces */ hid_t memspace = -1; /* Memory dataspace */ hid_t filespace = -1; /* File dataspace */ @@ -5833,10 +5847,10 @@ test_printf(unsigned config, hid_t fapl) hid_t vdset = -1; /* Virtual dataset */ hsize_t dims[2] = {10, 0}; /* Data space current size */ hsize_t mdims[2] = {10, 20}; /* Data space maximum size */ - hsize_t start[4] = {0, 0}; /* Hyperslab start */ - hsize_t stride[4]; /* Hyperslab stride */ - hsize_t count[4]; /* Hyperslab count */ - hsize_t block[4]; /* Hyperslab block */ + hsize_t start[2] = {0, 0}; /* Hyperslab start */ + hsize_t stride[2]; /* Hyperslab stride */ + hsize_t count[2]; /* Hyperslab count */ + hsize_t block[2]; /* Hyperslab block */ int buf[10][20]; /* Write and expected read buffer */ int rbuf[10][20]; /* Read buffer */ int erbuf[10][20]; /* Expected read buffer */ @@ -5879,7 +5893,7 @@ test_printf(unsigned config, hid_t fapl) if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) TEST_ERROR - /* Create virtual dataspaces */ + /* Create virtual dataspace */ if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) TEST_ERROR @@ -5939,7 +5953,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR } /* end if */ @@ -6094,7 +6108,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR /* Create 3rd source dataset */ @@ -6327,7 +6341,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR } /* end if */ @@ -6949,7 +6963,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR } /* end if */ @@ -7259,7 +7273,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR } /* end if */ @@ -7581,7 +7595,7 @@ test_printf(unsigned config, hid_t fapl) } /* end if */ /* Create virtual dataset */ - if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) TEST_ERROR /* Close srcfile if config option specified */ @@ -7602,7 +7616,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR } /* end if */ @@ -7757,7 +7771,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR /* Create 3rd source dataset */ @@ -7921,7 +7935,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR /* Create 4th source dataset */ @@ -8253,7 +8267,7 @@ test_printf(unsigned config, hid_t fapl) } /* end if */ /* Create virtual dataset */ - if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) TEST_ERROR /* Close srcfile if config option specified */ @@ -8274,7 +8288,7 @@ test_printf(unsigned config, hid_t fapl) vfile = -1; if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR - if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR } /* end if */ @@ -8504,7 +8518,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR /* Create 3rd source dataset */ @@ -8671,7 +8685,7 @@ test_printf(unsigned config, hid_t fapl) /* Reopen srcfile if config option specified */ if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) - if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR /* Create 4th source dataset */ @@ -9092,7 +9106,7 @@ error: if(srcfile[i] >= 0) (void)H5Fclose(srcfile[i]); } /* end for */ - if(vfile >= 0) + if(vfile >= 0) (void)H5Fclose(vfile); if(srcspace >= 0) (void)H5Sclose(srcspace); @@ -9115,6 +9129,1051 @@ error: /*------------------------------------------------------------------------- + * Function: test_all + * + * Purpose: Tests fixed, unlimited, and printf selections in the same + * VDS + * + * Return: Success: 0 + * + * Failure: number of errors + * + * Programmer: Neil Fortner + * Friday, August 14, 2015 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static int +test_all(unsigned config, hid_t fapl) +{ + char vfilename[FILENAME_BUF_SIZE]; + char srcfilename[FILENAME_BUF_SIZE]; + char srcfilename_map[FILENAME_BUF_SIZE]; + hid_t srcfile = -1; /* File with source dsets */ + hid_t vfile = -1; /* File with virtual dset */ + hid_t dcpl = -1; /* Dataset creation property list */ + hid_t srcdcpl = -1; /* DCPL for source dset */ + hid_t srcspace[3] = {-1, -1, -1}; /* Source dataspaces */ + hid_t vspace[3] = {-1, -1, -1}; /* Virtual dset dataspaces */ + hid_t memspace = -1; /* Memory dataspace */ + hid_t filespace = -1; /* File dataspace */ + hid_t srcdset[5] = {-1, -1, -1, -1, -1}; /* Source datsets */ + hid_t vdset = -1; /* Virtual dataset */ + hsize_t dims[2] = {6, 6}; /* Data space current size */ + hsize_t mdims[2] = {10, 10}; /* Data space maximum size */ + hsize_t cdims[2] = {2, 2}; /* Chunk dimensions */ + hsize_t start[2]; /* Hyperslab start */ + hsize_t stride[2]; /* Hyperslab stride */ + hsize_t count[2]; /* Hyperslab count */ + hsize_t block[2]; /* Hyperslab block */ + int buf[10][10]; /* Write and expected read buffer */ + int rbuf[10][10]; /* Read buffer */ + int erbuf[10][10]; /* Expected read buffer */ + int ndims; /* Number of dimensions */ + int fill = -1; /* Fill value */ + int i, j; + + TESTING("virtual dataset I/O with mixed selection types") + + h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename); + h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename); + h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map); + + /* Create DCPLs */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + TEST_ERROR + if((srcdcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + TEST_ERROR + + /* Set fill value */ + if(H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0) + TEST_ERROR + + /* Set chunk dimensions */ + if(H5Pset_chunk(srcdcpl, 2, cdims) < 0) + TEST_ERROR + + /* Create memory space */ + if((memspace = H5Screate_simple(2, mdims, NULL)) < 0) + TEST_ERROR + + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create fixed mapping */ + if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + start[0] = 3; + start[1] = 3; + count[0] = 3; + count[1] = 3; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if((srcspace[0] = H5Screate_simple(2, count, NULL)) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset_fixed", srcspace[0]) < 0) + TEST_ERROR + + /* Create unlimited mapping */ + if((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + start[0] = 3; + start[1] = 0; + count[0] = 1; + count[1] = 1; + block[0] = H5S_UNLIMITED; + block[1] = 3; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, block) < 0) + TEST_ERROR + dims[0] = 0; + dims[1] = 3; + if((srcspace[1] = H5Screate_simple(2, dims, block)) < 0) + TEST_ERROR + start[0] = 0; + if(H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset_unlim", srcspace[1]) < 0) + TEST_ERROR + + /* Create printf mapping */ + if((vspace[2] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + start[0] = 0; + start[1] = 2; + stride[0] = 1; + stride[1] = 3; + count[0] = 1; + count[1] = H5S_UNLIMITED; + block[0] = 3; + block[1] = 2; + if(H5Sselect_hyperslab(vspace[2], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + if((srcspace[2] = H5Screate_simple(2, block, NULL)) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[2], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset_printf_%b", srcspace[2]) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile = vfile; + if(H5Iinc_ref(srcfile) < 0) + TEST_ERROR + } /* end if */ + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Close srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile) < 0) + TEST_ERROR + srcfile = -1; + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 6) + TEST_ERROR + if(dims[1] != 6) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 10) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Reopen srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + + /* Create fixed source dataset */ + if((srcdset[0] = H5Dcreate2(srcfile, "src_dset_fixed", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create unlimited source_dataset */ + if((srcdset[1] = H5Dcreate2(srcfile, "src_dset_unlim", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] = (i * (int)mdims[1]) + j; + + /* Initialize erbuf */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + erbuf[i][j] = fill; + + /* Write to srcdset[0] */ + start[0] = 0; + start[1] = 0; + block[0] = 3; + block[1] = 3; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 3; i++) + for(j = 0; j < 3; j++) + erbuf[i + 3][j + 3] = buf[i][j]; + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + for(i = 0; i < 2; i++) { + if(H5Dclose(srcdset[i]) < 0) + TEST_ERROR + srcdset[i] = -1; + } /* end for */ + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile) < 0) + TEST_ERROR + srcfile = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 6) + TEST_ERROR + if(dims[1] != 6) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 10) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if((i >= (int)dims[0]) || (j >= (int)dims[1])) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Reopen srcdset[1] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Extend srcdset[1] */ + dims[0] = 2; + dims[1] = 3; + if(H5Dset_extent(srcdset[1], dims) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[1] */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 2; i++) + for(j = 0; j < 3; j++) + erbuf[i + 3][j] = buf[i][j]; + + /* Close srcdset[1] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile) < 0) + TEST_ERROR + srcfile = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 6) + TEST_ERROR + if(dims[1] != 6) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 10) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if((i >= (int)dims[0]) || (j >= (int)dims[1])) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Reopen srcfile if config option specified */ + if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) + if((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + + /* Create first printf source dataset */ + if((srcdset[2] = H5Dcreate2(srcfile, "src_dset_printf_0", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[2] */ + start[0] = 0; + start[1] = 0; + block[0] = 3; + block[1] = 2; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 3; i++) + for(j = 0; j < 2; j++) + erbuf[i][j + 2] = buf[i][j]; + + /* Close srcdset[2] srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[2]) < 0) + TEST_ERROR + srcdset[2] = -1; + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile) < 0) + TEST_ERROR + srcfile = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 6) + TEST_ERROR + if(dims[1] != 6) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 10) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if((i >= (int)dims[0]) || (j >= (int)dims[1])) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Reopen srcdset[1] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Extend srcdset[1] */ + dims[0] = 3; + dims[1] = 3; + if(H5Dset_extent(srcdset[1], dims) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to new area of srcdset[1] */ + start[0] = 0; + start[1] = 0; + block[0] = 1; + block[1] = 3; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if((filespace = H5Dget_space(srcdset[1])) < 0) + TEST_ERROR + start[0] = 2; + start[1] = 0; + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 3; i++) + erbuf[5][i] = buf[0][i]; + + /* Close srcdset[1] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile) < 0) + TEST_ERROR + srcfile = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 6) + TEST_ERROR + if(dims[1] != 6) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 10) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if((i >= (int)dims[0]) || (j >= (int)dims[1])) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Reopen srcfile if config option specified */ + if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) + if((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + + /* Create second printf source dataset, this time without using srcdcpl */ + if((srcdset[3] = H5Dcreate2(srcfile, "src_dset_printf_1", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[3] */ + start[0] = 0; + start[1] = 0; + block[0] = 3; + block[1] = 2; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 3; i++) + for(j = 0; j < 2; j++) + erbuf[i][j + 5] = buf[i][j]; + + /* Close srcdset[3] srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[3]) < 0) + TEST_ERROR + srcdset[3] = -1; + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile) < 0) + TEST_ERROR + srcfile = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 6) + TEST_ERROR + if(dims[1] != 7) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 10) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if((i >= (int)dims[0]) || (j >= (int)dims[1])) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Reopen srcdset[1] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Extend srcdset[1] */ + dims[0] = 7; + dims[1] = 3; + if(H5Dset_extent(srcdset[1], dims) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to new area of srcdset[1] */ + start[0] = 0; + start[1] = 0; + block[0] = 4; + block[1] = 3; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if((filespace = H5Dget_space(srcdset[1])) < 0) + TEST_ERROR + start[0] = 3; + start[1] = 0; + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 4; i++) + for(j = 0; j < 3; j++) + erbuf[i + 6][j] = buf[i][j]; + + /* Close srcdset[1] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile) < 0) + TEST_ERROR + srcfile = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 7) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 10) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Reopen srcfile if config option specified */ + if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE)) + if((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + + /* Create third printf source dataset */ + if((srcdset[4] = H5Dcreate2(srcfile, "src_dset_printf_2", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[4] */ + start[0] = 0; + start[1] = 0; + block[0] = 3; + block[1] = 2; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[4], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 3; i++) + for(j = 0; j < 2; j++) + erbuf[i][j + 8] = buf[i][j]; + + /* Close srcdset[4] srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[4]) < 0) + TEST_ERROR + srcdset[4] = -1; + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile) < 0) + TEST_ERROR + srcfile = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 10) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 10) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + + /* Close */ + if(!(config & TEST_IO_CLOSE_SRC)) { + for(i = 0; i < 5; i++) { + if(H5Dclose(srcdset[i]) < 0) + TEST_ERROR + srcdset[i] = -1; + } /* end for */ + if(H5Fclose(srcfile) < 0) + TEST_ERROR + srcfile = -1; + } /* end if */ + else if(!(config & TEST_IO_DIFFERENT_FILE)) { + if(H5Fclose(srcfile) < 0) + TEST_ERROR + srcfile = -1; + } /* end if */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) { + if(H5Sclose(srcspace[i]) < 0) + TEST_ERROR + srcspace[i] = -1; + } /* end for */ + for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) { + if(H5Sclose(vspace[i]) < 0) + TEST_ERROR + vspace[i] = -1; + } /* end for */ + if(H5Pclose(dcpl) < 0) + TEST_ERROR + dcpl = -1; + if(H5Pclose(srcdcpl) < 0) + TEST_ERROR + srcdcpl = -1; + if(H5Sclose(memspace) < 0) + TEST_ERROR + memspace = -1; + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) { + if(srcdset[i] >= 0) + (void)H5Dclose(srcdset[i]); + } /* end for */ + if(vdset >= 0) + (void)H5Dclose(vdset); + if(srcfile >= 0) + (void)H5Fclose(srcfile); + if(vfile >= 0) + (void)H5Fclose(vfile); + for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) { + if(srcspace[i] >= 0) + (void)H5Sclose(srcspace[i]); + } /* end for */ + for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) { + if(vspace[i] >= 0) + (void)H5Sclose(vspace[i]); + } /* end for */ + if(filespace >= 0) + (void)H5Sclose(filespace); + if(memspace >= 0) + (void)H5Sclose(memspace); + if(dcpl >= 0) + (void)H5Pclose(dcpl); + if(srcdcpl >= 0) + (void)H5Pclose(srcdcpl); + } H5E_END_TRY; + + return 1; +} /* end test_printf() */ + + +/*------------------------------------------------------------------------- * Function: main * * Purpose: Tests datasets with virtual layout @@ -9150,6 +10209,7 @@ main(void) nerrors += test_basic_io(bit_config, fapl); nerrors += test_unlim(bit_config, fapl); nerrors += test_printf(bit_config, fapl); + nerrors += test_all(bit_config, fapl); } /* end for */ /* Verify symbol table messages are cached */ -- cgit v0.12 From 6909d2033f0d7d87c9fc03dfc778ea3e9437032a Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 19 Aug 2015 11:21:27 -0500 Subject: [svn-r27527] Add tests to hit code coverage assertions in H5Olayout.c. Fix issue in VDS delete routine. Tested: ummon --- src/H5Dvirtual.c | 18 ++++++++++-------- src/H5Olayout.c | 3 --- test/vds.c | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 54 insertions(+), 13 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 638ad6d..9a25494 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -519,7 +519,6 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) } /* end for */ } /* end if */ else { - HDassert(0 && "checking code coverage..."); //VDSINC /* Zero out other fields related to list, just to be sure */ layout->storage.u.virt.list = NULL; layout->storage.u.virt.list_nalloc = 0; @@ -704,15 +703,18 @@ H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage) HDassert(storage); HDassert(storage->type == H5D_VIRTUAL); + /* Check for global heap block */ + if(storage->u.virt.serial_list_hobjid.addr != HADDR_UNDEF) { #ifdef NOT_YET - /* Unlink the global heap block */ - if((heap_rc = H5HG_link(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid), -1)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTMODIFY, FAIL, "unable to adjust global heap refence count") - if(heap_rc == 0) + /* Unlink the global heap block */ + if((heap_rc = H5HG_link(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid), -1)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTMODIFY, FAIL, "unable to adjust global heap refence count") + if(heap_rc == 0) #endif /* NOT_YET */ - /* Delete the global heap block */ - if(H5HG_remove(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to remove heap object") + /* Delete the global heap block */ + if(H5HG_remove(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to remove heap object") + } /* end if */ /* Clear global heap ID in storage */ storage->u.virt.serial_list_hobjid.addr = HADDR_UNDEF; diff --git a/src/H5Olayout.c b/src/H5Olayout.c index c462c80..6018539 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -578,8 +578,6 @@ H5O_layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to insert virtual dataset heap block") } /* end if */ - HDassert((mesg->storage.u.virt.list_nused > 0) && "checking code coverage...");//VDSINC - /* Heap information */ H5F_addr_encode(f, &p, mesg->storage.u.virt.serial_list_hobjid.addr); UINT32ENCODE(p, mesg->storage.u.virt.serial_list_hobjid.idx); @@ -817,7 +815,6 @@ H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg) break; case H5D_VIRTUAL: /* Virtual dataset */ - HDassert(0 && "checking code coverage...");//VDSINC /* Free the file space virtual dataset */ if(H5D__virtual_delete(f, dxpl_id, &mesg->storage) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data") diff --git a/test/vds.c b/test/vds.c index 2804227..fab2c4f 100644 --- a/test/vds.c +++ b/test/vds.c @@ -362,7 +362,7 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, if(H5Fclose(file) < 0) TEST_ERROR file = -1; - if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) + if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR } /* end if */ @@ -375,10 +375,16 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, if((*ex_dcpl = H5Dget_create_plist(dset)) < 0) TEST_ERROR - /* Close dataset and file */ + /* Close dataset */ if(H5Dclose(dset) < 0) TEST_ERROR dset = -1; + + /* Delete dataset */ + if(H5Ldelete(file, "vdset", H5P_DEFAULT) < 0) + TEST_ERROR + + /* Close file */ if(H5Fclose(file) < 0) TEST_ERROR file = -1; @@ -894,7 +900,9 @@ test_api(test_api_config_t config, hid_t fapl) if(H5Pclose(ex_dcpl) < 0) TEST_ERROR ex_dcpl = -1; + #else /* VDS_POINT_SELECTIONS */ + /* * Test 3: Verify point selections fail */ @@ -1035,6 +1043,40 @@ test_api(test_api_config_t config, hid_t fapl) ex_dcpl = -1; + /* + * Test 7: Empty VDS + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspace */ + if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select all (should not be necessary, but just to be sure) */ + if(H5Sselect_all(vspace[0]) < 0) + TEST_ERROR + + /* Get examination DCPL */ + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + TEST_ERROR + + /* Test H5Pget_virtual_count */ + if(H5Pget_virtual_count(ex_dcpl, &size_out) < 0) + TEST_ERROR + if(size_out != (size_t)0) + TEST_ERROR + + /* Close */ + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + if(H5Pclose(ex_dcpl) < 0) + TEST_ERROR + ex_dcpl = -1; + + /* Close */ if(H5Pclose(dcpl) < 0) TEST_ERROR -- cgit v0.12 From b1dcfc7a84e5e804c84426fc6fa10d323c7f3b24 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 19 Aug 2015 11:45:36 -0500 Subject: [svn-r27528] Modify printf implementation to not open source datasets that were previously opened when calculating the VDS extent, instead assuming they still exist. Tested: ummon --- src/H5Dvirtual.c | 16 ++++++++++++---- src/H5Oprivate.h | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 9a25494..46255dd 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -776,15 +776,23 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to get path for root group") /* Open the source dataset */ - if(NULL == (source_dset->dset = H5D__open_name(&src_root_loc, source_dset->dset_name, vdset->shared->layout.storage.u.virt.source_dapl, dxpl_id))) + if(NULL == (source_dset->dset = H5D__open_name(&src_root_loc, source_dset->dset_name, vdset->shared->layout.storage.u.virt.source_dapl, dxpl_id))) { H5E_clear_stack(NULL); /* Quick hack until proper support for H5Dopen with missing file is implemented */ - else + + /* Dataset does not exist */ + source_dset->dset_exists = FALSE; + } /* end if */ + else { + /* Dataset exists */ + source_dset->dset_exists = TRUE; + /* Patch the source selection if necessary */ if(virtual_ent->source_space_status != H5O_VIRTUAL_STATUS_CORRECT) { if(H5S_extent_copy(virtual_ent->source_select, source_dset->dset->shared->space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent") virtual_ent->source_space_status = H5O_VIRTUAL_STATUS_CORRECT; } /* end if */ + } /* end else */ } /* end if */ done: @@ -1434,8 +1442,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) } /* end else */ } /* end if */ - /* Check if the dataset is already open */ - if(storage->list[i].sub_dset[j].dset) + /* Check if the dataset was already opened */ + if(storage->list[i].sub_dset[j].dset_exists) first_missing = j + 1; else { /* Resolve file name */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index c5e3f8b..77a11cd 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -426,6 +426,7 @@ typedef struct H5O_storage_virtual_srcdset_t { struct H5S_t *clipped_source_select; /* Clipped version of source_select */ struct H5S_t *clipped_virtual_select; /* Clipped version of virtual_select */ struct H5D_t *dset; /* Source dataset */ + hbool_t dset_exists; /* Whether the dataset exists (was opened successfully) */ /* Temporary - only used during I/O operation, NULL at all other times */ struct H5S_t *projected_mem_space; /* Selection within mem_space for this mapping */ -- cgit v0.12 From e3bea916863c05b93c1a9277edd7fb91c95805c2 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 20 Aug 2015 11:38:05 -0500 Subject: [svn-r27538] Add tests to cover remaining code coverage assertions in src directory except for those in H5Doh.c and H5Shyper.c. Tested: ummon --- src/H5Dint.c | 1 - src/H5Dvirtual.c | 9 +- src/H5Pdapl.c | 8 +- src/H5Pdcpl.c | 1 - src/H5Sselect.c | 1 - test/vds.c | 431 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 6 files changed, 418 insertions(+), 33 deletions(-) diff --git a/src/H5Dint.c b/src/H5Dint.c index 490a3c5..97f4fc5 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -2056,7 +2056,6 @@ H5D__get_offset(const H5D_t *dset) switch(dset->shared->layout.type) { case H5D_VIRTUAL: - HDassert(0 && "checking code coverage...");//VDSINC case H5D_CHUNKED: case H5D_COMPACT: break; diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 46255dd..10e53c9 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -1428,7 +1428,6 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) else { H5O_storage_virtual_srcdset_t *tmp_sub_dset; - HDassert(0 && "Checking code coverage..."); //VDSINC /* Extend sub_dset */ if(NULL == (tmp_sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_realloc(storage->list[i].sub_dset, 2 * storage->list[i].sub_dset_nalloc * sizeof(H5O_storage_virtual_srcdset_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to extend sub dataset array") @@ -2648,10 +2647,8 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Fail if there are unmapped parts of the selection as they would not be * written */ - if(tot_nelmts != nelmts) { - HDassert(0 && "Checking code coverage..."); //VDSINC + if(tot_nelmts != nelmts) HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "write requested to unmapped portion of virtual dataset") - } //VDSINC /* Iterate over mappings */ for(i = 0; i < storage->list_nused; i++) { @@ -2662,11 +2659,9 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, if(storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) { /* Iterate over sub-source dsets */ for(j = storage->list[i].sub_dset_io_start; - j < storage->list[i].sub_dset_io_end; j++) { - HDassert(0 && "Checking code coverage..."); //VDSINC + j < storage->list[i].sub_dset_io_end; j++) if(H5D__virtual_write_one(io_info, type_info, file_space, &storage->list[i].sub_dset[j]) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write to source dataset") - } //VDSINC } /* end if */ else /* Write to source dataset */ diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index b439009..5574fa9 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -379,11 +379,9 @@ H5Pget_virtual_view(hid_t plist_id, H5D_vds_view_t *view) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5D_VDS_ERROR, "can't find object for ID") /* Get value from property list */ - if(view) { - HDassert(0 && "Checking code coverage..."); //VDSINC + if(view) if(H5P_get(plist, H5D_ACS_VDS_VIEW_NAME, view) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5D_VDS_ERROR, "unable to get value") - } //VDSINC done: FUNC_LEAVE_API(ret_value) @@ -525,11 +523,9 @@ H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5D_VDS_ERROR, "can't find object for ID") /* Get value from property list */ - if(gap_size) { - HDassert(0 && "Checking code coverage..."); //VDSINC + if(gap_size) if(H5P_get(plist, H5D_ACS_VDS_PRINTF_GAP_NAME, gap_size) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5D_VDS_ERROR, "unable to get value") - } //VDSINC done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index b70004b..ebc3919 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1868,7 +1868,6 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, } /* end if */ else if(layout.storage.u.virt.list_nused == layout.storage.u.virt.list_nalloc) { - HDassert((layout.storage.u.virt.list_nused > 0) && "checking code coverage...");//VDSINC /* Double size of entry list. Make sure to zero out new memory. */ if(NULL == (layout.storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_realloc(layout.storage.u.virt.list, (size_t)2 * layout.storage.u.virt.list_nalloc * sizeof(H5O_storage_virtual_ent_t)))) HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't reallocate virtual dataset mapping list") diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 86a8c43..e965dba 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -2350,7 +2350,6 @@ H5S_select_subtract(H5S_t *space, H5S_t *subtract_space) && (subtract_space->select.type->type != H5S_SEL_NONE)) { /* If subtract_space is using the all selection, set space to none */ if(subtract_space->select.type->type == H5S_SEL_ALL) { - HDassert(0 && "Checking code coverage...");//VDSINC /* Change to "none" selection */ if(H5S_select_none(space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") diff --git a/test/vds.c b/test/vds.c index fab2c4f..9d71a46 100644 --- a/test/vds.c +++ b/test/vds.c @@ -375,6 +375,10 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, if((*ex_dcpl = H5Dget_create_plist(dset)) < 0) TEST_ERROR + /* Test H5Dget_offset() (just returns HADDR_UNDEF) */ + if(HADDR_UNDEF != H5Dget_offset(dset)) + TEST_ERROR + /* Close dataset */ if(H5Dclose(dset) < 0) TEST_ERROR @@ -1153,6 +1157,7 @@ test_basic_io(unsigned config, hid_t fapl) int evbuf[10][26]; /* Expected VDS "buffer" */ int erbuf[10][26]; /* Expected read buffer */ int fill = -1; /* Fill value */ + herr_t ret; /* Generic return value */ int i, j; TESTING("basic virtual dataset I/O") @@ -2965,7 +2970,7 @@ test_basic_io(unsigned config, hid_t fapl) TEST_ERROR /* Now read entire VDS */ - /* Set memory space extent to 9x9, select all in order to reach part of the + /* Set memory space extent to 9x9, select all in order to reach part of the * code in H5S_select_subtract() */ dims[0] = 9; dims[1] = 9; @@ -3201,6 +3206,17 @@ test_basic_io(unsigned config, hid_t fapl) if(rbuf[i][j] != erbuf[i][j]) TEST_ERROR + /* Now try writing to whole VDS (should fail due to unmapped elements) */ + count[0] = 9; + count[1] = 9; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + H5E_BEGIN_TRY { + ret = H5Dwrite(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]); + } H5E_END_TRY + if(ret >= 0) + TEST_ERROR + /* Close */ if(H5Dclose(srcdset[0]) < 0) TEST_ERROR @@ -3318,6 +3334,7 @@ test_unlim(unsigned config, hid_t fapl) int erbuf[10][20]; /* Expected read buffer */ int ndims; /* Number of dimensions */ int fill = -1; /* Fill value */ + H5D_vds_view_t virtual_view; /* Virtual view property */ int i, j; TESTING("virtual dataset I/O with unlimited selections") @@ -3534,6 +3551,12 @@ test_unlim(unsigned config, hid_t fapl) TEST_ERROR } /* end for */ + /* Test H5Pget_virtual_view() */ + if(H5Pget_virtual_view(dapl, &virtual_view) < 0) + TEST_ERROR + if(virtual_view != H5D_VDS_LAST_AVAILABLE) + TEST_ERROR + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file * as well if config option specified */ if(H5Dclose(vdset) < 0) @@ -3550,6 +3573,12 @@ test_unlim(unsigned config, hid_t fapl) if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR + /* Test H5Pget_virtual_view() */ + if(H5Pget_virtual_view(dapl, &virtual_view) < 0) + TEST_ERROR + if(virtual_view != H5D_VDS_FIRST_MISSING) + TEST_ERROR + /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR @@ -5898,6 +5927,7 @@ test_printf(unsigned config, hid_t fapl) int erbuf[10][20]; /* Expected read buffer */ int ndims; /* Number of dimensions */ int fill = -1; /* Fill value */ + hsize_t gap_size; /* Gap size property */ int i, j; TESTING("virtual dataset I/O with printf source") @@ -6277,30 +6307,88 @@ test_printf(unsigned config, hid_t fapl) } /* end for */ start[1] = 0; + /* Now try writing through VDS */ + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Select hyperslab in file space */ + if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write data through VDS */ + if(H5Dwrite(vdset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + /* Close filespace */ if(H5Sclose(filespace) < 0) TEST_ERROR - /* Close */ - if(!(config & TEST_IO_CLOSE_SRC)) { - if(H5Dclose(srcdset[0]) < 0) - TEST_ERROR - srcdset[0] = -1; - if(H5Dclose(srcdset[1]) < 0) + /* Reopen srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset0", H5P_DEFAULT)) < 0) TEST_ERROR - srcdset[1] = -1; - if(H5Dclose(srcdset[2]) < 0) + if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) TEST_ERROR - srcdset[2] = -1; - if(H5Fclose(srcfile[0]) < 0) + if((srcdset[2] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0) TEST_ERROR - srcfile[0] = -1; - } /* end if */ - else if(!(config & TEST_IO_DIFFERENT_FILE)) { - if(H5Fclose(srcfile[0]) < 0) - TEST_ERROR - srcfile[0] = -1; } /* end if */ + + /* Read srcdset[0] */ + count[0] = 10; + count[1] = 5; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if(H5Dread(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + if(rbuf[i][j] != buf[i][j]) + TEST_ERROR + + /* Read srcdset[1] */ + if(H5Dread(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + if(rbuf[i][j] != buf[i][j + 5]) + TEST_ERROR + + /* Read srcdset[2] */ + if(H5Dread(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < 10; i++) + for(j = 0; j < 5; j++) + if(rbuf[i][j] != buf[i][j + 10]) + TEST_ERROR + + /* Close */ + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Dclose(srcdset[2]) < 0) + TEST_ERROR + srcdset[2] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; if(H5Dclose(vdset) < 0) TEST_ERROR vdset = -1; @@ -6594,6 +6682,12 @@ test_printf(unsigned config, hid_t fapl) TEST_ERROR } /* end for */ + /* Test H5Pget_virtual_printf_gap() */ + if(H5Pget_virtual_printf_gap(dapl, &gap_size) < 0) + TEST_ERROR + if(gap_size != (hsize_t)0) + TEST_ERROR + /* Close VDS and reopen with printf gap set to 1, reopen file as well if * config option specified */ if(H5Dclose(vdset) < 0) @@ -6610,6 +6704,12 @@ test_printf(unsigned config, hid_t fapl) if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) TEST_ERROR + /* Test H5Pget_virtual_printf_gap() */ + if(H5Pget_virtual_printf_gap(dapl, &gap_size) < 0) + TEST_ERROR + if(gap_size != (hsize_t)1) + TEST_ERROR + /* Get VDS space */ if((filespace = H5Dget_space(vdset)) < 0) TEST_ERROR @@ -9122,6 +9222,303 @@ test_printf(unsigned config, hid_t fapl) vspace[1] = -1; + /* + * Test 7: 1 Source dataset mapping, 10x1 blocks, test reallocating sub_dset + * array + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + + /* Create source dataspace */ + dims[1] = 1; + if((srcspace = H5Screate_simple(2, dims, NULL)) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual space */ + stride[0] = 1; + stride[1] = 1; + count[0] = 1; + count[1] = H5S_UNLIMITED; + block[0] = 10; + block[1] = 1; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0) + TEST_ERROR + + /* Add virtual layout mapping */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".", "src_dset%b", srcspace) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) + TEST_ERROR + + /* Close srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 0) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Reopen srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + + /* Create 1 source dataset */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] = (i * (int)mdims[1]) + j; + + /* Initialize erbuf */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + erbuf[i][j] = fill; + + /* Write to srcdset[0] */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 10; i++) + erbuf[i][0] = buf[i][0]; + + /* Close srcdset[0] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 1) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Close VDS and reopen with printf gap set to 127, reopen file as well if + * config option specified */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_printf_gap(dapl, (hsize_t)127) < 0) + TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + } /* end if */ + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 1) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Reset dapl */ + if(H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0) + TEST_ERROR + + /* Close */ + if(!(config & TEST_IO_CLOSE_SRC)) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + else if(!(config & TEST_IO_DIFFERENT_FILE)) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace) < 0) + TEST_ERROR + srcspace = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + + /* Close */ if(H5Pclose(dcpl) < 0) TEST_ERROR -- cgit v0.12 From 1821b64d49521335c4b364d8504e57782120419b Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 20 Aug 2015 17:18:52 -0500 Subject: [svn-r27543] Add tests to cover remaining code coverage assertions in H5Shyper.c. Add more tests for unlimited selections. Fix bug related to empty unlimited source dataset. Tested: ummon --- src/H5Shyper.c | 44 +++--- test/tselect.c | 230 ++++++++++++++++++++++++++++- test/vds.c | 457 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 702 insertions(+), 29 deletions(-) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 99f8838..88a3d21 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -6541,15 +6541,11 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Check for unlimited dimension */ for(u = 0; uextent.rank; u++) if((count[u] == H5S_UNLIMITED) || (block[u] == H5S_UNLIMITED)) { - if(unlim_dim >= 0) { - HDassert(0 && "Checking code coverage..."); //VDSINC + if(unlim_dim >= 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot have more than one unlimited dimension in selection") - } //VDSINC else { - if(count[u] == block[u] /* == H5S_UNLIMITED */) { - HDassert(0 && "Checking code coverage..."); //VDSINC + if(count[u] == block[u] /* == H5S_UNLIMITED */) HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "count and block cannot both be unlimited") - } //VDSINC unlim_dim = (int)u; } /* end else */ } /* end if */ @@ -6802,7 +6798,6 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, hsize_t tmp_count = opt_count[unlim_dim]; hsize_t tmp_block = opt_block[unlim_dim]; - HDassert(0 && "Checking code coverage..."); //VDSINC /* Check for invalid operation */ if(space->select.sel_info.hslab->unlim_dim >= 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection with another unlimited selection") @@ -7246,15 +7241,11 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Check for unlimited dimension */ for(u = 0; uextent.rank; u++) if((count[u] == H5S_UNLIMITED) || (block[u] == H5S_UNLIMITED)) { - if(unlim_dim >= 0) { - HDassert(0 && "Checking code coverage..."); //VDSINC + if(unlim_dim >= 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot have more than one unlimited dimension in selection") - } //VDSINC else { - if(count[u] == block[u] /* == H5S_UNLIMITED */) { - HDassert(0 && "Checking code coverage..."); //VDSINC + if(count[u] == block[u] /* == H5S_UNLIMITED */) HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "count and block cannot both be unlimited") - } //VDSINC unlim_dim = (int)u; } /* end else */ } /* end if */ @@ -7494,7 +7485,6 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, hsize_t tmp_count = opt_count[unlim_dim]; hsize_t tmp_block = opt_block[unlim_dim]; - HDassert(0 && "Checking code coverage..."); //VDSINC /* Check for invalid operation */ if(space->select.sel_info.hslab->unlim_dim >= 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot modify unlimited selection with another unlimited selection") @@ -9746,7 +9736,6 @@ H5S__hyper_subtract(H5S_t *space, H5S_t *subtract_space) else { H5S_hyper_span_info_t *spans; /* Empty hyperslab span tree */ - HDassert(0 && "Checking code coverage..."); //VDSINC /* Set number of elements */ space->select.num_elem = 0; @@ -9999,11 +9988,8 @@ H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, diminfo = &clip_space->select.sel_info.hslab->opt_diminfo[clip_space->select.sel_info.hslab->unlim_dim]; - if(num_slices == 0) { - //HDassert(incl_trail && "Checking code coverage..."); //VDSINC - HDassert(!incl_trail && "Checking code coverage..."); //VDSINC + if(num_slices == 0) ret_value = incl_trail ? diminfo->start : 0; - } //VDSINC else if((diminfo->block == H5S_UNLIMITED) || (diminfo->block == diminfo->stride)) /* Unlimited block, just set the extent large enough for the block size @@ -10078,14 +10064,21 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, /* Check parameters */ HDassert(clip_space); HDassert(match_space); - HDassert(match_space->select.sel_info.hslab); HDassert(clip_space->select.sel_info.hslab->unlim_dim >= 0); - /* Calculate number of slices */ - num_slices = match_space->select.num_elem - / clip_space->select.sel_info.hslab->num_elem_non_unlim; - HDassert((match_space->select.num_elem - % clip_space->select.sel_info.hslab->num_elem_non_unlim) == 0); + /* Check for "none" match space */ + if(match_space->select.type->type == H5S_SEL_NONE) + num_slices = (hsize_t)0; + else { + HDassert(match_space->select.type->type == H5S_SEL_HYPERSLABS); + HDassert(match_space->select.sel_info.hslab); + + /* Calculate number of slices */ + num_slices = match_space->select.num_elem + / clip_space->select.sel_info.hslab->num_elem_non_unlim; + HDassert((match_space->select.num_elem + % clip_space->select.sel_info.hslab->num_elem_non_unlim) == 0); + } /* end else */ /* Call "real" get_clip_extent function */ ret_value = H5S__hyper_get_clip_extent_real(clip_space, num_slices, incl_trail); @@ -10139,6 +10132,7 @@ H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, /* Check parameters */ HDassert(clip_space); HDassert(match_space); + HDassert(clip_space->select.sel_info.hslab); HDassert(match_space->select.sel_info.hslab); HDassert(clip_space->select.sel_info.hslab->unlim_dim >= 0); HDassert(match_space->select.sel_info.hslab->unlim_dim >= 0); diff --git a/test/tselect.c b/test/tselect.c index a665cf2..2a975d0 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -13315,9 +13315,12 @@ test_hyper_unlim(void) hsize_t stride[3] = {1, 1, 3}; hsize_t count[3] = {1, 1, 2}; hsize_t block[3] = {2, H5S_UNLIMITED, 2}; + hsize_t start2[3]; + hsize_t count2[3]; hsize_t eblock1[6] = {1, 2, 1, 2, 3, 2}; hsize_t eblock2[6] = {1, 2, 4, 2, 3, 5}; hssize_t offset[3] = {0, -1, 0}; + hssize_t ssize_out; herr_t ret; /* Output message about test being performed */ @@ -13430,11 +13433,230 @@ test_hyper_unlim(void) ret = H5Soffset_simple(sid, offset); CHECK(ret, FAIL, "H5Soffset_simple"); + /* + * Now try invalid operations + */ + H5E_BEGIN_TRY { + /* Try multiple unlimited dimensions */ + start[0] = 1; + start[1] = 2; + start[2] = 1; + stride[0] = 1; + stride[1] = 3; + stride[2] = 3; + count[0] = 1; + count[1] = H5S_UNLIMITED; + count[2] = H5S_UNLIMITED; + block[0] = 2; + block[1] = 2; + block[2] = 2; + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); + VERIFY(ret, FAIL, "H5Sselect_hyperslab"); + + /* Try unlimited count and block */ + count[2] = 2; + block[1] = H5S_UNLIMITED; + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); + VERIFY(ret, FAIL, "H5Sselect_hyperslab"); + } H5E_END_TRY + + /* Try operations with two unlimited selections */ + block[1] = 2; + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + H5E_BEGIN_TRY { + ret = H5Sselect_hyperslab(sid, H5S_SELECT_OR, start, NULL, count, NULL); + VERIFY(ret, FAIL, "H5Sselect_hyperslab"); + ret = H5Sselect_hyperslab(sid, H5S_SELECT_AND, start, NULL, count, NULL); + VERIFY(ret, FAIL, "H5Sselect_hyperslab"); + ret = H5Sselect_hyperslab(sid, H5S_SELECT_XOR, start, NULL, count, NULL); + VERIFY(ret, FAIL, "H5Sselect_hyperslab"); + ret = H5Sselect_hyperslab(sid, H5S_SELECT_NOTB, start, NULL, count, NULL); + VERIFY(ret, FAIL, "H5Sselect_hyperslab"); + ret = H5Sselect_hyperslab(sid, H5S_SELECT_NOTA, start, NULL, count, NULL); + VERIFY(ret, FAIL, "H5Sselect_hyperslab"); + } H5E_END_TRY + + /* Try invalid combination operations */ + H5E_BEGIN_TRY { + ret = H5Sselect_hyperslab(sid, H5S_SELECT_OR, start, NULL, block, NULL); + VERIFY(ret, FAIL, "H5Sselect_hyperslab"); + ret = H5Sselect_hyperslab(sid, H5S_SELECT_XOR, start, NULL, block, NULL); + VERIFY(ret, FAIL, "H5Sselect_hyperslab"); + ret = H5Sselect_hyperslab(sid, H5S_SELECT_NOTB, start, NULL, block, NULL); + VERIFY(ret, FAIL, "H5Sselect_hyperslab"); + } H5E_END_TRY + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, NULL, block, NULL); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + H5E_BEGIN_TRY { + ret = H5Sselect_hyperslab(sid, H5S_SELECT_OR, start, stride, count, block); + VERIFY(ret, FAIL, "H5Sselect_hyperslab"); + ret = H5Sselect_hyperslab(sid, H5S_SELECT_XOR, start, stride, count, block); + VERIFY(ret, FAIL, "H5Sselect_hyperslab"); + ret = H5Sselect_hyperslab(sid, H5S_SELECT_NOTA, start, stride, count, block); + VERIFY(ret, FAIL, "H5Sselect_hyperslab"); + } H5E_END_TRY + + /* + * Now test valid combination operations + */ + /* unlim AND non-unlim */ + count[0] = 1; + count[1] = H5S_UNLIMITED; + count[2] = 2; + block[0] = 2; + block[1] = 2; + block[2] = 2; + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + start2[0] = 2; + start2[1] = 2; + start2[2] = 0; + count2[0] = 5; + count2[1] = 4; + count2[2] = 2; + ret = H5Sselect_hyperslab(sid, H5S_SELECT_AND, start2, NULL, count2, NULL); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + eblock1[0] = 2; + eblock1[3] = 2; + eblock1[1] = 2; + eblock1[4] = 3; + eblock1[2] = 1; + eblock1[5] = 1; + eblock2[0] = 2; + eblock2[3] = 2; + eblock2[1] = 5; + eblock2[4] = 5; + eblock2[2] = 1; + eblock2[5] = 1; + dims[0] = 50; + dims[1] = 50; + dims[2] = 50; + test_hyper_unlim_check(sid, dims, (hssize_t)3, (hssize_t)2, eblock1, eblock2); + + /* unlim NOTA non-unlim */ + count[0] = 1; + count[1] = H5S_UNLIMITED; + count[2] = 2; + block[0] = 2; + block[1] = 2; + block[2] = 2; + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + start2[0] = 1; + start2[1] = 5; + start2[2] = 2; + count2[0] = 2; + count2[1] = 2; + count2[2] = 6; + ret = H5Sselect_hyperslab(sid, H5S_SELECT_NOTA, start2, NULL, count2, NULL); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + eblock1[0] = 1; + eblock1[3] = 2; + eblock1[1] = 5; + eblock1[4] = 6; + eblock1[2] = 3; + eblock1[5] = 3; + eblock2[0] = 1; + eblock2[3] = 2; + eblock2[1] = 5; + eblock2[4] = 6; + eblock2[2] = 6; + eblock2[5] = 7; + dims[0] = 50; + dims[1] = 50; + dims[2] = 50; + test_hyper_unlim_check(sid, dims, (hssize_t)12, (hssize_t)2, eblock1, eblock2); + + /* non-unlim AND unlim */ + start2[0] = 2; + start2[1] = 2; + start2[2] = 0; + count2[0] = 5; + count2[1] = 4; + count2[2] = 2; + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start2, NULL, count2, NULL); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + count[0] = 1; + count[1] = H5S_UNLIMITED; + count[2] = 2; + block[0] = 2; + block[1] = 2; + block[2] = 2; + ret = H5Sselect_hyperslab(sid, H5S_SELECT_AND, start, stride, count, block); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + eblock1[0] = 2; + eblock1[3] = 2; + eblock1[1] = 2; + eblock1[4] = 3; + eblock1[2] = 1; + eblock1[5] = 1; + eblock2[0] = 2; + eblock2[3] = 2; + eblock2[1] = 5; + eblock2[4] = 5; + eblock2[2] = 1; + eblock2[5] = 1; + dims[0] = 50; + dims[1] = 50; + dims[2] = 50; + test_hyper_unlim_check(sid, dims, (hssize_t)3, (hssize_t)2, eblock1, eblock2); + + /* non-unlim NOTB unlim */ + start2[0] = 1; + start2[1] = 5; + start2[2] = 2; + count2[0] = 2; + count2[1] = 2; + count2[2] = 6; + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start2, NULL, count2, NULL); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + count[0] = 1; + count[1] = H5S_UNLIMITED; + count[2] = 2; + block[0] = 2; + block[1] = 2; + block[2] = 2; + ret = H5Sselect_hyperslab(sid, H5S_SELECT_NOTB, start, stride, count, block); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + eblock1[0] = 1; + eblock1[3] = 2; + eblock1[1] = 5; + eblock1[4] = 6; + eblock1[2] = 3; + eblock1[5] = 3; + eblock2[0] = 1; + eblock2[3] = 2; + eblock2[1] = 5; + eblock2[4] = 6; + eblock2[2] = 6; + eblock2[5] = 7; + dims[0] = 50; + dims[1] = 50; + dims[2] = 50; + test_hyper_unlim_check(sid, dims, (hssize_t)12, (hssize_t)2, eblock1, eblock2); + + /* Test H5Sget_select_npoints() */ + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + ssize_out = H5Sget_select_npoints(sid); + VERIFY(ssize_out, (hssize_t)H5S_UNLIMITED, "H5Sget_select_npoints"); + + /* Test H5Sget_select_hyper_nblocks() */ + ssize_out = H5Sget_select_hyper_nblocks(sid); + VERIFY(ssize_out, (hssize_t)H5S_UNLIMITED, "H5Sget_select_hyper_nblocks"); + + /* Test H5Sget_select_bounds() */ + ret = H5Sget_select_bounds(sid, start2, count2); + CHECK(ret, FAIL, "H5Sget_select_bounds"); + VERIFY(start2[0], start[0], "H5Sget_select_bounds"); + VERIFY(start2[1], start[1], "H5Sget_select_bounds"); + VERIFY(start2[2], start[2], "H5Sget_select_bounds"); + VERIFY(count2[0], start[0] + (stride[0] * (count[0] - (hsize_t)1)) + block[0] - (hsize_t)1, "H5Sget_select_bounds"); + VERIFY(count2[1], H5S_UNLIMITED, "H5Sget_select_bounds"); + VERIFY(count2[2], start[2] + (stride[2] * (count[2] - (hsize_t)1)) + block[2] - (hsize_t)1, "H5Sget_select_bounds"); + //VDSINC write test saving unlim selection to file as region reference - //VDSINC write tests for more general AND/NOTA/NOTB operations with - //unlimited selections. Also return values from H5Sget_select_npoints, - //H5Shyper_get_select_nblocks, and H5Sget_select_bounds for unlimited - //selections /* Close the dataspace */ ret = H5Sclose(sid); diff --git a/test/vds.c b/test/vds.c index 9d71a46..1a86708 100644 --- a/test/vds.c +++ b/test/vds.c @@ -5821,6 +5821,463 @@ test_unlim(unsigned config, hid_t fapl) vspace[1] = -1; + /* + * Test 4: 2 Source datasets, offset starts + */ + /* Clear virtual layout in DCPL */ + if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) + TEST_ERROR + + /* Create virtual dataspaces */ + if((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + if((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + + /* Create source dataspaces */ + dims[0] = 5; + dims[1] = 0; + mdims[0] = 5; + if((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + dims[1] = 5; + if((srcspace[1] = H5Screate_simple(2, dims, mdims)) < 0) + TEST_ERROR + mdims[0] = 10; + + /* Select hyperslab in source spaces */ + start[0] = 0; + start[1] = 0; + count[0] = 5; + count[1] = H5S_UNLIMITED; + if(H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if(H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Select hyperslabs in virtual spaces */ + start[1] = 10; + if(H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + start[0] = 5; + start[1] = 0; + if(H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Add virtual layout mappings */ + if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1", srcspace[0]) < 0) + TEST_ERROR + if(H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2", srcspace[1]) < 0) + TEST_ERROR + + /* Create virtual file */ + if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + + /* Create source file if requested */ + if(config & TEST_IO_DIFFERENT_FILE) { + if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + TEST_ERROR + } /* end if */ + else { + srcfile[0] = vfile; + if(H5Iinc_ref(srcfile[0]) < 0) + TEST_ERROR + } /* end if */ + + /* Create source datasets */ + if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + if((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0) + TEST_ERROR + + /* Create virtual dataset */ + if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0) + TEST_ERROR + + /* Populate write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] = (i * (int)mdims[1]) + j; + + /* Initialize erbuf */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + erbuf[i][j] = fill; + + /* Write data directly to second source dataset */ + /* Select hyperslab in memory */ + start[0] = 0; + start[1] = 0; + count[0] = 5; + count[1] = 5; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + + /* Write second dataset */ + if(H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 5; i++) + for(j = 0; j < 5; j++) + erbuf[i + 5][j] = buf[i][j]; + + /* Close srcdsets and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 5) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file + * as well if config option specified */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0) + TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + } /* end if */ + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 5) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Reopen srcdset[0] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(config & TEST_IO_DIFFERENT_FILE) + if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0) + TEST_ERROR + } /* end if */ + + /* Extend srcdset[0] */ + dims[0] = 5; + dims[1] = 5; + if(H5Dset_extent(srcdset[0], dims) < 0) + TEST_ERROR + + /* Adjust write buffer */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) + buf[i][j] += (int)mdims[0] * (int)mdims[1]; + + /* Write to srcdset[0] */ + start[0] = 0; + start[1] = 0; + count[0] = 5; + count[1] = 5; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0) + TEST_ERROR + if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + TEST_ERROR + + /* Update erbuf */ + for(i = 0; i < 5; i++) + for(j = 0; j < 5; j++) + erbuf[i][j + 10] = buf[i][j]; + + /* Close srcdset[0] and srcfile if config option specified */ + if(config & TEST_IO_CLOSE_SRC) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + + if(config & TEST_IO_DIFFERENT_FILE) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + } /* end if */ + + /* Reopen virtual dataset and file if config option specified */ + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + } /* end if */ + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 5) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file + * as well if config option specified */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0) + TEST_ERROR + if(config & TEST_IO_REOPEN_VIRT) { + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0) + TEST_ERROR + } /* end if */ + if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0) + TEST_ERROR + + /* Get VDS space */ + if((filespace = H5Dget_space(vdset)) < 0) + TEST_ERROR + + /* Get VDS space dimensions */ + if((ndims = H5Sget_simple_extent_ndims(filespace)) < 0) + TEST_ERROR + if(ndims != 2) + TEST_ERROR + if(H5Sget_simple_extent_dims(filespace, dims, mdims) < 0) + TEST_ERROR + if(dims[0] != 10) + TEST_ERROR + if(dims[1] != 15) + TEST_ERROR + if(mdims[0] != 10) + TEST_ERROR + if(mdims[1] != 20) + TEST_ERROR + + /* Close filespace */ + if(H5Sclose(filespace) < 0) + TEST_ERROR + + /* Read data through virtual dataset */ + /* Reset rbuf */ + HDmemset(rbuf[0], 0, sizeof(rbuf)); + + /* Select hyperslab in memory space */ + start[0] = 0; + start[1] = 0; + if(H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0) + TEST_ERROR + + /* Read data */ + if(H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0) + TEST_ERROR + + /* Verify read data */ + for(i = 0; i < (int)mdims[0]; i++) + for(j = 0; j < (int)mdims[1]; j++) { + if(j >= (int)dims[1]) { + if(rbuf[i][j] != 0) + TEST_ERROR + } /* end if */ + else + if(rbuf[i][j] != erbuf[i][j]) + TEST_ERROR + } /* end for */ + + /* Close */ + if(!(config & TEST_IO_CLOSE_SRC)) { + if(H5Dclose(srcdset[0]) < 0) + TEST_ERROR + srcdset[0] = -1; + if(H5Dclose(srcdset[1]) < 0) + TEST_ERROR + srcdset[1] = -1; + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + else if(!(config & TEST_IO_DIFFERENT_FILE)) { + if(H5Fclose(srcfile[0]) < 0) + TEST_ERROR + srcfile[0] = -1; + } /* end if */ + if(H5Dclose(vdset) < 0) + TEST_ERROR + vdset = -1; + if(H5Fclose(vfile) < 0) + TEST_ERROR + vfile = -1; + if(H5Sclose(srcspace[0]) < 0) + TEST_ERROR + srcspace[0] = -1; + if(H5Sclose(srcspace[1]) < 0) + TEST_ERROR + srcspace[1] = -1; + if(H5Sclose(vspace[0]) < 0) + TEST_ERROR + vspace[0] = -1; + if(H5Sclose(vspace[1]) < 0) + TEST_ERROR + vspace[1] = -1; + + /* Close */ if(H5Pclose(dcpl) < 0) TEST_ERROR -- cgit v0.12 From 32bf83f1cf00df5079d8a5e2f16422a28d1fa53d Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 21 Aug 2015 14:57:29 -0500 Subject: [svn-r27546] Add tests for H5O__dset_bh_info (H5Oget_info) and unlimited selections in a region reference. Tested: ummon --- src/H5Doh.c | 4 +--- test/trefer.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ test/tselect.c | 2 -- test/vds.c | 35 +++++++++++++++++++++++++++-------- 4 files changed, 73 insertions(+), 13 deletions(-) diff --git a/src/H5Doh.c b/src/H5Doh.c index 388f4cf..2e52102 100644 --- a/src/H5Doh.c +++ b/src/H5Doh.c @@ -401,9 +401,7 @@ H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info) else if(layout.type == H5D_VIRTUAL && (layout.storage.u.virt.serial_list_hobjid.addr != HADDR_UNDEF)) { size_t virtual_heap_size; - /* Need to write a test for this. No assert here for now because the - * code is reached by h5_verify_cached_stabs() but it is not properly - * tested. VDSINC */ + /* Get size of global heap object for virtual dataset */ if(H5HG_get_obj_size(f, dxpl_id, &(layout.storage.u.virt.serial_list_hobjid), &virtual_heap_size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get global heap size for virtual dataset mapping") diff --git a/test/trefer.c b/test/trefer.c index 203b602..4b1f36b 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -521,6 +521,8 @@ test_reference_region(void) uint8_t *tu8; /* Temporary pointer to uint8 data */ H5O_type_t obj_type; /* Type of object */ int i, j; /* counting variables */ + hssize_t hssize_ret; /* hssize_t return value */ + htri_t tri_ret; /* htri_t return value */ herr_t ret; /* Generic return value */ haddr_t addr = HADDR_UNDEF; /* test for undefined reference */ hid_t dset_NA; /* Dataset id for undefined reference */ @@ -614,6 +616,24 @@ test_reference_region(void) ret = H5Rcreate(&wbuf[1], fid1, "/Dataset2", H5R_DATASET_REGION, sid2); CHECK(ret, FAIL, "H5Rcreate"); + /* Select unlimited hyperslab for third reference */ + start[0] = 1; start[1] = 8; + stride[0] = 4; stride[1] = 1; + count[0] = H5S_UNLIMITED; count[1] = 1; + block[0] = 2; block[1] = 2; + ret = H5Sselect_hyperslab(sid2, H5S_SELECT_SET, start, stride, count, block); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + + hssize_ret = H5Sget_select_npoints(sid2); + VERIFY(hssize_ret, (hssize_t)H5S_UNLIMITED, "H5Sget_select_npoints"); + + /* Store third dataset region */ + ret = H5Rcreate(&wbuf[2], fid1, "/Dataset2", H5R_DATASET_REGION, sid2); + CHECK(ret, FAIL, "H5Rcreate"); + ret = H5Rget_obj_type2(dset1, H5R_DATASET_REGION, &wbuf[0], &obj_type); + CHECK(ret, FAIL, "H5Rget_obj_type2"); + VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type2"); + /* Write selection to disk */ ret = H5Dwrite(dset1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf); CHECK(ret, FAIL, "H5Dwrite"); @@ -805,6 +825,31 @@ test_reference_region(void) ret = H5Sclose(sid2); CHECK(ret, FAIL, "H5Sclose"); + /* Get the unlimited selection */ + sid2 = H5Rget_region(dset1, H5R_DATASET_REGION, &rbuf[2]); + CHECK(sid2, FAIL, "H5Rget_region"); + + /* Verify correct hyperslab selected */ + hssize_ret = H5Sget_select_npoints(sid2); + VERIFY(hssize_ret, (hssize_t)H5S_UNLIMITED, "H5Sget_select_npoints"); + tri_ret = H5Sis_regular_hyperslab(sid2); + CHECK(tri_ret, FAIL, "H5Sis_regular_hyperslab"); + VERIFY(tri_ret, TRUE, "H5Sis_regular_hyperslab Result"); + ret = H5Sget_regular_hyperslab(sid2, start, stride, count, block); + CHECK(ret, FAIL, "H5Sget_regular_hyperslab"); + VERIFY(start[0], (hsize_t)1, "Hyperslab Coordinates"); + VERIFY(start[1], (hsize_t)8, "Hyperslab Coordinates"); + VERIFY(stride[0], (hsize_t)4, "Hyperslab Coordinates"); + VERIFY(stride[1], (hsize_t)1, "Hyperslab Coordinates"); + VERIFY(count[0], H5S_UNLIMITED, "Hyperslab Coordinates"); + VERIFY(count[1], (hsize_t)1, "Hyperslab Coordinates"); + VERIFY(block[0], (hsize_t)2, "Hyperslab Coordinates"); + VERIFY(block[1], (hsize_t)2, "Hyperslab Coordinates"); + + /* Close region space */ + ret = H5Sclose(sid2); + CHECK(ret, FAIL, "H5Sclose"); + /* Close first space */ ret = H5Sclose(sid1); CHECK(ret, FAIL, "H5Sclose"); diff --git a/test/tselect.c b/test/tselect.c index 2a975d0..2062e73 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -13656,8 +13656,6 @@ test_hyper_unlim(void) VERIFY(count2[1], H5S_UNLIMITED, "H5Sget_select_bounds"); VERIFY(count2[2], start[2] + (stride[2] * (count[2] - (hsize_t)1)) + block[2] - (hsize_t)1, "H5Sget_select_bounds"); - //VDSINC write test saving unlim selection to file as region reference - /* Close the dataspace */ ret = H5Sclose(sid); CHECK(ret, FAIL, "H5Sclose"); diff --git a/test/vds.c b/test/vds.c index 1a86708..5cdcef4 100644 --- a/test/vds.c +++ b/test/vds.c @@ -327,11 +327,12 @@ error: /* Helper function to get DCPL for examination depending on config */ static int test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, - hid_t *ex_dcpl, hid_t vspace, char *filename) + hid_t *ex_dcpl, hid_t vspace, char *filename, hsize_t exp_meta_size) { hid_t file = -1; /* File */ hid_t dset = -1; /* Virtual dataset */ void *plist_buf = NULL; /* Serialized property list buffer */ + H5O_info_t oinfo; /* Object info struct */ htri_t tri_ret; HDassert((config >= TEST_API_BASIC) && (config < TEST_API_NTESTS)); @@ -379,6 +380,24 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, if(HADDR_UNDEF != H5Dget_offset(dset)) TEST_ERROR + /* Test H5Oget_info returns correct metadata size */ + if(H5Oget_info(dset, &oinfo) < 0) + TEST_ERROR + if(oinfo.meta_size.obj.index_size != (hsize_t)0) + TEST_ERROR + if(config == TEST_API_REOPEN_FILE) { + if(oinfo.meta_size.obj.heap_size != exp_meta_size) { printf("%llu\n", (long long unsigned)oinfo.meta_size.obj.heap_size); + TEST_ERROR } + } /* end if */ + else + if((oinfo.meta_size.obj.heap_size != exp_meta_size) + && (oinfo.meta_size.obj.heap_size != (hsize_t)0)) + TEST_ERROR + if(oinfo.meta_size.attr.index_size != (hsize_t)0) + TEST_ERROR + if(oinfo.meta_size.attr.index_size != (hsize_t)0) + TEST_ERROR + /* Close dataset */ if(H5Dclose(dset) < 0) TEST_ERROR @@ -531,7 +550,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)68) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -602,7 +621,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)212) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -676,7 +695,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)0) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -745,7 +764,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)0) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -878,7 +897,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)0) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -1009,7 +1028,7 @@ test_api(test_api_config_t config, hid_t fapl) } /* end if */ /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)696) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -1063,7 +1082,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)0) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ -- cgit v0.12 From 3c5a088df0afced706a07c92df46494741a2c9ae Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 21 Aug 2015 16:12:57 -0500 Subject: [svn-r27547] Fill in public function descriptions from RM entries. Tested: ummon --- src/H5Pdapl.c | 39 +++++++++++++++++++++++++++++---- src/H5Pdcpl.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 94 insertions(+), 15 deletions(-) diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index 5574fa9..94ae0b4 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -316,7 +316,16 @@ done: /*------------------------------------------------------------------------- * Function: H5Pset_virtual_view * - * Purpose: VDSINC + * Purpose: Takes the access property list for the virtual dataset, + * dapl_id, and the flag, view, and sets the VDS view + * according to the flag value. The view will include all + * data before the first missing mapped data found if the + * flag is set to H5D_VDS_FIRST_MISSING or to include all + * available mapped data if the flag is set to + * H5D_VDS_LAST_AVAIALBLE. Missing mapped data will be + * filled with the fill value according to the VDS creation + * property settings. For VDS with unlimited mappings, the + * view defines the extent. * * Return: Non-negative on success/Negative on failure * @@ -354,7 +363,10 @@ done: /*------------------------------------------------------------------------- * Function: H5Pget_virtual_view * - * Purpose: VDSINC + * Purpose: Takes the access property list for the virtual dataset, + * dapl_id, and gets the flag, view, set by the + * H5Pset_virtual_view call. The possible values of view are + * H5D_VDS_FIRST_MISSING or H5D_VDS_LAST_AVAIALBLE. * * Return: Success: H5D_VDS_FIRST_MISSING or * H5D_VDS_LAST_AVAILABLE @@ -462,7 +474,22 @@ H5P__dacc_vds_view_dec(const void **_pp, void *_value) /*------------------------------------------------------------------------- * Function: H5Pset_virtual_printf_gap * - * Purpose: VDSINC + * Purpose: Sets the access property list for the virtual dataset, + * dapl_id, to instruct the library to stop looking for the + * mapped data stored in the files and/or datasets with the + * printf-style names after not finding gap_size files and/or + * datasets. The found source files and datasets will + * determine the extent of the unlimited VDS with the printf + * -style mappings. + * + * For example, if regularly spaced blocks of VDS are mapped + * to datasets with the names d-1, d-2, d-3, ..., d-N, ..., + * and d-2 dataset is missing and gap_size is set to 0, then + * VDS will contain only data found in d-1. If d-2 and d-3 + * are missing and gap_size is set to 2, then VDS will + * contain the data from d-1, d-3, ..., d-N, .... The blocks + * that are mapped to d-2 and d-3 will be filled according to + * the VDS fill value setting. * * Return: Non-negative on success/Negative on failure * @@ -500,7 +527,11 @@ done: /*------------------------------------------------------------------------- * Function: H5Pget_virtual_printf_gap * - * Purpose: VDSINC + * Purpose: Gets the maximum number of missing printf-style files + * and/or datasets for determining the extent of the + * unlimited VDS, gap_size, using the access property list + * for the virtual dataset, dapl_id. The default library + * value for gap_size is 0. * * Return: Non-negative on success/Negative on failure * diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index ebc3919..16577e7 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1785,7 +1785,12 @@ done: /*------------------------------------------------------------------------- * Function: H5Pset_virtual * - * Purpose: VDSINC + * Purpose: Maps elements of the virtual dataset described by the + * virtual dataspace identifier vspace_id to the elements of + * the source dataset described by the source dataset + * dataspace identifier src_space_id. The source dataset is + * identified by the name of the file where it is located, + * src_file_name, and the name of the dataset, src_dset_name. * * As a side effect, the layout method is changed to * H5D_VIRTUAL. @@ -1981,7 +1986,9 @@ done: /*------------------------------------------------------------------------- * Function: H5Pget_virtual_count * - * Purpose: VDSINC + * Purpose: Gets the number of mappings for the virtual dataset that + * has a creation property list specified by the dcpl_id + * parameter. * * Return: Non-negative on success/Negative on failure * @@ -2023,9 +2030,13 @@ done: /*------------------------------------------------------------------------- * Function: H5Pget_virtual_vspace * - * Purpose: VDSINC + * Purpose: Takes the dataset creation property list for the virtual + * dataset, dcpl_id, and the mapping index, index, and + * returns a dataspace identifier for the selection within + * the virtual dataset used in the mapping. * - * Return: VDSINC + * Return: Returns a dataspace identifier if successful; otherwise + * returns a negative value. * * Programmer: Neil Fortner * Friday, February 13, 2015 @@ -2077,9 +2088,13 @@ done: /*------------------------------------------------------------------------- * Function: H5Pget_virtual_srcspace * - * Purpose: VDSINC + * Purpose: Takes the dataset creation property list for the virtual + * dataset, dcpl_id, and the mapping index, index, and + * returns a dataspace identifier for the selection within + * the source dataset used in the mapping. * - * Return: VDSINC + * Return: Returns a dataspace identifier if successful; otherwise + * returns a negative value. * * Programmer: Neil Fortner * Saturday, February 14, 2015 @@ -2165,9 +2180,26 @@ done: /*------------------------------------------------------------------------- * Function: H5Pget_virtual_filename * - * Purpose: VDSINC + * Purpose: Takes the dataset creation property list for the virtual + * dataset, dcpl_id, and the mapping index, index, and + * retrieves a name of a file for a source dataset used in + * the mapping. * - * Return: VDSINC + * Up to size characters of the filename are returned in + * name; additional characters, if any, are not returned to + * the user application. + * + * If the length of the filename, which determines the + * required value of size, is unknown, a preliminary call to + * H5Pget_virtual_filename with the last two parameters set + * to NULL can be made. The return value of this call will + * be the size in bytes of the filename. That value, plus 1 + * for a NULL terminator, is then assigned to size for a + * second H5Pget_virtual_filename call, which will retrieve + * the actual filename. + * + * Return: Returns the length of the name if successful, otherwise + * returns a negative value. * * Programmer: Neil Fortner * Saturday, February 14, 2015 @@ -2212,9 +2244,25 @@ done: /*------------------------------------------------------------------------- * Function: H5Pget_virtual_dsetname * - * Purpose: VDSINC - * - * Return: VDSINC + * Purpose: Takes the dataset creation property list for the virtual + * dataset, dcpl_id, and the mapping index, index, and + * retrieves the name of a source dataset used in the mapping. + * + * Up to size characters of the name are returned in name; + * additional characters, if any, are not returned to the + * user application. + * + * If the length of the filename, which determines the + * required value of size, is unknown, a preliminary call to + * H5Pget_virtual_dsetname with the last two parameters set + * to NULL can be made. The return value of this call will + * be the size in bytes of the filename. That value, plus 1 + * for a NULL terminator, is then assigned to size for a + * second H5Pget_virtual_dsetname call, which will retrieve + * the actual filename. + * + * Return: Returns the length of the name if successful, otherwise + * returns a negative value. * * Programmer: Neil Fortner * Saturday, February 14, 2015 -- cgit v0.12 From c2ce904d5d2d1e6d00798a8516135e0867a761c4 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Thu, 27 Aug 2015 16:52:15 -0500 Subject: [svn-r27598] Description: Check in misc. minor code cleanups, found during code review --- MANIFEST | 3 +-- configure.ac | 22 +++++++++++----------- examples/CMakeLists.txt | 18 +++++++++--------- src/H5Pdcpl.c | 3 +-- src/H5S.c | 16 +--------------- 5 files changed, 23 insertions(+), 39 deletions(-) diff --git a/MANIFEST b/MANIFEST index 45eaefc..10c2e57 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,4 @@ - +# # Copyright by The HDF Group. # Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. @@ -1234,7 +1234,6 @@ ./tools/misc/vds/UC_5_stride_gen.c ./tools/misc/vds/UC_common.h - # h5stat sources ./tools/h5stat/Makefile.am ./tools/h5stat/Makefile.in diff --git a/configure.ac b/configure.ac index eef593a..33f18f7 100644 --- a/configure.ac +++ b/configure.ac @@ -1882,16 +1882,16 @@ AC_ARG_ENABLE([debug], also specify a comma-separated list of package names without the leading H5 or the word no. The default is most packages - if production is disabled; no if it is enabled. + if production is disabled; no if it is enabled. ])], [DEBUG_PKG=$enableval]) ## Default to no if producton is enabled if test "X-$DEBUG_PKG" = X- ; then if test "$enable_production" = yes ; then - DEBUG_PKG=no + DEBUG_PKG=no else - DEBUG_PKG=yes + DEBUG_PKG=yes fi fi @@ -2139,11 +2139,11 @@ case "X-$enable_parallel" in ## Try link a simple MPI program. AC_MSG_CHECKING([whether a simple MPI-IO C program can be linked]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[ MPI_Init(0, (void *)0); - MPI_File_open(0, (void *)0, 0, 0, (void *)0);]])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([unable to link a simple MPI-IO C program])]) + [[ MPI_Init(0, (void *)0); + MPI_File_open(0, (void *)0, 0, 0, (void *)0);]])], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([unable to link a simple MPI-IO C program])]) if test "X$HDF_FORTRAN" = "Xyes"; then PAC_PROG_FC_MPI_CHECK @@ -2928,9 +2928,9 @@ esac AC_MSG_CHECKING([whether to have library information embedded in the executables]) AC_ARG_ENABLE([embedded-libinfo], [AS_HELP_STRING([--enable-embedded-libinfo], - [Enable embedded library information [default=yes]])], - [enable_embedded_libinfo=$enableval], - [enable_embedded_libinfo=yes]) + [Enable embedded library information [default=yes]])], + [enable_embedded_libinfo=$enableval], + [enable_embedded_libinfo=yes]) if test "${enable_embedded_libinfo}" = "yes"; then AC_MSG_RESULT([yes]) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 8cabba6..8849ce7 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -10,20 +10,20 @@ add_definitions (${HDF_EXTRA_C_FLAGS}) # Define Sources #----------------------------------------------------------------------------- set (examples + h5_crtdat + h5_rdwt + h5_crtatt + h5_crtgrp + h5_crtgrpar + h5_crtgrpd + h5_cmprss + h5_extend + h5_subset h5_write h5_read h5_extend_write h5_chunk_read h5_compound - h5_crtgrpar - h5_crtgrpd - h5_subset - h5_cmprss - h5_crtdat - h5_rdwt - h5_crtatt - h5_extend - h5_crtgrp h5_group h5_select h5_attribute diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 16577e7..69645a4 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1478,8 +1478,7 @@ done: * * Purpose: Set the default layout information for the various types of * dataset layouts - - + * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol diff --git a/src/H5S.c b/src/H5S.c index d8ab37c..bc95472 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -1869,14 +1869,7 @@ done: /*------------------------------------------------------------------------- * Function: H5S_set_extent * - * Purpose: Modify the dimensions of a dataspace. Based on H5S_extend. - * - * Note that this function does *not* clip unlimited - * selections, because it is not currently necessary to do - * that anywhere this function is called. If this becomes - * necessary (if the selection could be unlimited and the - * clip size is not being handled separately), this function - * must be updated to (optionally) clip the selection. + * Purpose: Modify the dimensions of a dataspace. Based on H5S_extend * * Return: Success: Non-negative * Failure: Negative @@ -1959,13 +1952,6 @@ H5S_has_extent(const H5S_t *ds) * * Purpose: Modify the dimensions of a dataspace. Based on H5S_extend * - * Note that this function does *not* clip unlimited - * selections, because it is not currently necessary to do - * that anywhere this function is called. If this becomes - * necessary (if the selection could be unlimited and the - * clip size is not being handled separately), this function - * must be updated to (optionally) clip the selection. - * * Return: Success: Non-negative * Failure: Negative * -- cgit v0.12 From 05bf2c042c1ac3da45b03dc7a7954890378fcac1 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 27 Aug 2015 16:56:25 -0500 Subject: [svn-r27599] Ran bin/reconfigure tested on: jam --- configure | 12 +- src/H5Edefin.h | 224 ++++++------ src/H5Einit.h | 866 ++++++++++++++++++++++----------------------- src/H5Epubgen.h | 410 ++++++++++----------- src/H5Eterm.h | 224 ++++++------ tools/misc/vds/Makefile.in | 30 +- 6 files changed, 892 insertions(+), 874 deletions(-) diff --git a/configure b/configure index fd230cc..de1b6c2 100755 --- a/configure +++ b/configure @@ -22856,7 +22856,7 @@ $as_echo_n "checking whether make will build with undefined variables... " >&6; cat >maketest </dev/null 2>&1; then @@ -27178,9 +27178,9 @@ fi ## Default to no if producton is enabled if test "X-$DEBUG_PKG" = X- ; then if test "$enable_production" = yes ; then - DEBUG_PKG=no + DEBUG_PKG=no else - DEBUG_PKG=yes + DEBUG_PKG=yes fi fi @@ -27554,7 +27554,7 @@ int main () { MPI_Init(0, (void *)0); - MPI_File_open(0, (void *)0, 0, 0, (void *)0); + MPI_File_open(0, (void *)0, 0, 0, (void *)0); ; return 0; } @@ -27565,7 +27565,7 @@ $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - as_fn_error $? "unable to link a simple MPI-IO C program" "$LINENO" 5 + as_fn_error $? "unable to link a simple MPI-IO C program" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -30978,7 +30978,7 @@ else fi -ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/src/H5fort_type_defines.h fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" +ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpvds.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5ls/testh5lsvds.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/misc/vds/Makefile tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/src/H5fort_type_defines.h fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" cat >confcache <<\_ACEOF diff --git a/src/H5Edefin.h b/src/H5Edefin.h index a5406f9..066c35d 100644 --- a/src/H5Edefin.h +++ b/src/H5Edefin.h @@ -21,76 +21,99 @@ #define _H5Edefin_H /* Major error IDs */ -hid_t H5E_EARRAY_g = FAIL; /* Extensible Array */ -hid_t H5E_PLIST_g = FAIL; /* Property lists */ -hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */ -hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */ -hid_t H5E_STORAGE_g = FAIL; /* Data storage */ -hid_t H5E_CACHE_g = FAIL; /* Object cache */ -hid_t H5E_IO_g = FAIL; /* Low-level I/O */ -hid_t H5E_INTERNAL_g = FAIL; /* Internal error (too specific to document in detail) */ +hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */ +hid_t H5E_FILE_g = FAIL; /* File accessibilty */ +hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */ hid_t H5E_SYM_g = FAIL; /* Symbol table */ +hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */ +hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */ +hid_t H5E_INTERNAL_g = FAIL; /* Internal error (too specific to document in detail) */ +hid_t H5E_BTREE_g = FAIL; /* B-Tree node */ +hid_t H5E_REFERENCE_g = FAIL; /* References */ hid_t H5E_DATASPACE_g = FAIL; /* Dataspace */ +hid_t H5E_RESOURCE_g = FAIL; /* Resource unavailable */ +hid_t H5E_RS_g = FAIL; /* Reference Counted Strings */ hid_t H5E_FARRAY_g = FAIL; /* Fixed Array */ -hid_t H5E_OHDR_g = FAIL; /* Object header */ -hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */ -hid_t H5E_EFL_g = FAIL; /* External file list */ -hid_t H5E_SLIST_g = FAIL; /* Skip Lists */ -hid_t H5E_BTREE_g = FAIL; /* B-Tree node */ -hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */ -hid_t H5E_ATOM_g = FAIL; /* Object atom */ -hid_t H5E_FILE_g = FAIL; /* File accessibilty */ hid_t H5E_HEAP_g = FAIL; /* Heap */ -hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */ +hid_t H5E_ATTR_g = FAIL; /* Attribute */ +hid_t H5E_IO_g = FAIL; /* Low-level I/O */ +hid_t H5E_EFL_g = FAIL; /* External file list */ +hid_t H5E_TST_g = FAIL; /* Ternary Search Trees */ +hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */ hid_t H5E_DATASET_g = FAIL; /* Dataset */ +hid_t H5E_STORAGE_g = FAIL; /* Data storage */ hid_t H5E_LINK_g = FAIL; /* Links */ +hid_t H5E_PLIST_g = FAIL; /* Property lists */ +hid_t H5E_DATATYPE_g = FAIL; /* Datatype */ +hid_t H5E_OHDR_g = FAIL; /* Object header */ +hid_t H5E_ATOM_g = FAIL; /* Object atom */ +hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */ +hid_t H5E_SLIST_g = FAIL; /* Skip Lists */ +hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */ +hid_t H5E_EARRAY_g = FAIL; /* Extensible Array */ hid_t H5E_PLINE_g = FAIL; /* Data filters */ -hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */ -hid_t H5E_TST_g = FAIL; /* Ternary Search Trees */ -hid_t H5E_ATTR_g = FAIL; /* Attribute */ hid_t H5E_ERROR_g = FAIL; /* Error API */ -hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */ -hid_t H5E_RESOURCE_g = FAIL; /* Resource unavailable */ -hid_t H5E_DATATYPE_g = FAIL; /* Datatype */ -hid_t H5E_RS_g = FAIL; /* Reference Counted Strings */ -hid_t H5E_REFERENCE_g = FAIL; /* References */ +hid_t H5E_CACHE_g = FAIL; /* Object cache */ /* Minor error IDs */ -/* No error */ -hid_t H5E_NONE_MINOR_g = FAIL; /* No error */ +/* 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 */ -/* 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 */ +/* Resource errors */ +hid_t H5E_NOSPACE_g = FAIL; /* No space available for allocation */ +hid_t H5E_CANTALLOC_g = FAIL; /* Can't allocate space */ +hid_t H5E_CANTCOPY_g = FAIL; /* Unable to copy object */ +hid_t H5E_CANTFREE_g = FAIL; /* Unable to free object */ +hid_t H5E_ALREADYEXISTS_g = FAIL; /* Object already exists */ +hid_t H5E_CANTLOCK_g = FAIL; /* Unable to lock object */ +hid_t H5E_CANTUNLOCK_g = FAIL; /* Unable to unlock object */ +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 */ + +/* 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 */ /* Function entry/exit interface errors */ 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 */ -/* 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 */ +/* 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 */ -/* 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 */ +/* 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 */ -/* 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 */ +/* Object header related errors */ +hid_t H5E_LINKCOUNT_g = FAIL; /* Bad object header link count */ +hid_t H5E_VERSION_g = FAIL; /* Wrong version number */ +hid_t H5E_ALIGNMENT_g = FAIL; /* Alignment error */ +hid_t H5E_BADMESG_g = FAIL; /* Unrecognized message */ +hid_t H5E_CANTDELETE_g = FAIL; /* Can't delete message */ +hid_t H5E_BADITER_g = FAIL; /* Iteration failed */ +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 */ /* I/O pipeline errors */ hid_t H5E_NOFILTER_g = FAIL; /* Requested filter is not available */ @@ -100,11 +123,14 @@ hid_t H5E_SETLOCAL_g = FAIL; /* Error from filter 'set local' callbac hid_t H5E_NOENCODER_g = FAIL; /* Filter present but encoding disabled */ hid_t H5E_CANTFILTER_g = FAIL; /* Filter operation failed */ -/* 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 */ +/* 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 */ + +/* No error */ +hid_t H5E_NONE_MINOR_g = FAIL; /* No error */ /* Plugin errors */ hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */ @@ -120,6 +146,14 @@ 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 */ +/* 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 */ + /* Cache related errors */ hid_t H5E_CANTFLUSH_g = FAIL; /* Unable to flush data from cache */ hid_t H5E_CANTSERIALIZE_g = FAIL; /* Unable to serialize data from cache */ @@ -141,42 +175,6 @@ hid_t H5E_CANTDEPEND_g = FAIL; /* Unable to create a flush dependency * hid_t H5E_CANTUNDEPEND_g = FAIL; /* Unable to destroy a flush dependency */ hid_t H5E_CANTNOTIFY_g = FAIL; /* Unable to notify object about action */ -/* 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 */ - -/* Resource errors */ -hid_t H5E_NOSPACE_g = FAIL; /* No space available for allocation */ -hid_t H5E_CANTALLOC_g = FAIL; /* Can't allocate space */ -hid_t H5E_CANTCOPY_g = FAIL; /* Unable to copy object */ -hid_t H5E_CANTFREE_g = FAIL; /* Unable to free object */ -hid_t H5E_ALREADYEXISTS_g = FAIL; /* Object already exists */ -hid_t H5E_CANTLOCK_g = FAIL; /* Unable to lock object */ -hid_t H5E_CANTUNLOCK_g = FAIL; /* Unable to unlock object */ -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 */ - -/* Object header related errors */ -hid_t H5E_LINKCOUNT_g = FAIL; /* Bad object header link count */ -hid_t H5E_VERSION_g = FAIL; /* Wrong version number */ -hid_t H5E_ALIGNMENT_g = FAIL; /* Alignment error */ -hid_t H5E_BADMESG_g = FAIL; /* Unrecognized message */ -hid_t H5E_CANTDELETE_g = FAIL; /* Can't delete message */ -hid_t H5E_BADITER_g = FAIL; /* Iteration failed */ -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 */ - /* Link related errors */ hid_t H5E_TRAVERSE_g = FAIL; /* Link traversal failure */ hid_t H5E_NLINKS_g = FAIL; /* Too many soft links in path */ @@ -184,20 +182,10 @@ 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 */ -/* 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 */ - -/* System level errors */ -hid_t H5E_SYSERRSTR_g = FAIL; /* System error message */ - -/* 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 */ /* Dataspace errors */ hid_t H5E_CANTCLIP_g = FAIL; /* Can't clip hyperslab region */ @@ -208,13 +196,25 @@ hid_t H5E_BADSELECT_g = FAIL; /* Invalid selection */ hid_t H5E_CANTCOMPARE_g = FAIL; /* Can't compare objects */ hid_t H5E_CANTAPPEND_g = FAIL; /* Can't append object */ -/* 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 */ +/* 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 */ /* Datatype conversion errors */ hid_t H5E_CANTCONVERT_g = FAIL; /* Can't convert datatypes */ diff --git a/src/H5Einit.h b/src/H5Einit.h index eed93bd..35049b2 100644 --- a/src/H5Einit.h +++ b/src/H5Einit.h @@ -24,170 +24,170 @@ /* Major error codes */ /*********************/ -assert(H5E_EARRAY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Extensible Array"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_EARRAY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_PLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Property lists"))==NULL) +assert(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_PLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FUNC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_NONE_MAJOR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "No error"))==NULL) +assert(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_NONE_MAJOR_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") -assert(H5E_FSPACE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Free Space Manager"))==NULL) +assert(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_FSPACE_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") -assert(H5E_STORAGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data storage"))==NULL) +assert(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_STORAGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SYM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CACHE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object cache"))==NULL) +assert(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_CACHE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PLUGIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_IO_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Low-level I/O"))==NULL) +assert(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_IO_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") assert(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_INTERNAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_SYM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Symbol table"))==NULL) +assert(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_SYM_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") +assert(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") assert(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_DATASPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_FARRAY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Fixed Array"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FARRAY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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") -assert(H5E_SOHM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Shared Object Header Messages"))==NULL) +assert(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_SOHM_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") -assert(H5E_EFL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "External file list"))==NULL) +assert(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_EFL_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") -assert(H5E_SLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Skip Lists"))==NULL) +assert(H5E_FARRAY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Fixed Array"))==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_FARRAY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_BTREE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "B-Tree node"))==NULL) +assert(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_BTREE_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") -assert(H5E_PLUGIN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Plugin for dynamically loaded library"))==NULL) +assert(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_PLUGIN_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") -assert(H5E_ATOM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object atom"))==NULL) +assert(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_ATOM_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") -assert(H5E_FILE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "File accessibilty"))==NULL) +assert(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_FILE_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") -assert(H5E_HEAP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Heap"))==NULL) +assert(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_HEAP_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") -assert(H5E_VFL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Virtual File Layer"))==NULL) +assert(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_VFL_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") assert(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_DATASET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(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_STORAGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") assert(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") -assert(H5E_PLINE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data filters"))==NULL) +assert(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_PLINE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_FUNC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Function entry/exit"))==NULL) +assert(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_FUNC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_DATATYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_TST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Ternary Search Trees"))==NULL) +assert(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_TST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_OHDR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_ATTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Attribute"))==NULL) +assert(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_ATTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_ERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Error API"))==NULL) +assert(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_ERROR_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") +assert(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") assert(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_ARGS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_RESOURCE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Resource unavailable"))==NULL) +assert(H5E_EARRAY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Extensible Array"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_RESOURCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_EARRAY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_DATATYPE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Datatype"))==NULL) +assert(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_DATATYPE_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") -assert(H5E_RS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Reference Counted Strings"))==NULL) +assert(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_RS_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") -assert(H5E_REFERENCE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "References"))==NULL) +assert(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_REFERENCE_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") /*********************/ @@ -195,33 +195,120 @@ if((H5E_REFERENCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) /*********************/ -/* No error */ -assert(H5E_NONE_MINOR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL) +/* Generic low-level file I/O errors */ +assert(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_NONE_MINOR_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") +assert(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_READERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(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_WRITEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(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_CLOSEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(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_OVERFLOW_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(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_FCNTL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Group related errors */ -assert(H5E_CANTOPENOBJ_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open object"))==NULL) +/* Resource errors */ +assert(H5E_NOSPACE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "No space available for allocation"))==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_NOSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTCLOSEOBJ_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't close object"))==NULL) +assert(H5E_CANTALLOC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't allocate space"))==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_CANTALLOC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_COMPLEN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Name component is too long"))==NULL) +assert(H5E_CANTCOPY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to copy object"))==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_CANTCOPY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_PATH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Problem with path to object"))==NULL) +assert(H5E_CANTFREE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to free 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) +if((H5E_CANTFREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_ALREADYEXISTS_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_ALREADYEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTLOCK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to lock object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTUNLOCK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unlock object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTUNLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTGC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to garbage collect"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTGC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTGETSIZE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to compute size"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTGETSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_OBJOPEN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object is already open"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_OBJOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + +/* Heap errors */ +assert(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_CANTRESTORE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(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_CANTCOMPUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(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_CANTEXTEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(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_CANTATTACH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(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_CANTUPDATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(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") /* Function entry/exit interface errors */ @@ -241,85 +328,97 @@ 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") -/* Parallel MPI errors */ -assert(H5E_MPI_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Some MPI function failed"))==NULL) +/* Property list errors */ +assert(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_MPI_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") -assert(H5E_MPIERRSTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "MPI Error String"))==NULL) +assert(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_MPIERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTRECV_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't receive data"))==NULL) +assert(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_CANTRECV_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_DUPCLASS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(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") -/* Object atom related errors */ -assert(H5E_BADATOM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find atom information (already closed?)"))==NULL) +/* Free space errors */ +assert(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_BADATOM_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") -assert(H5E_BADGROUP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find ID group information"))==NULL) +assert(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_BADGROUP_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") -assert(H5E_CANTREGISTER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to register new atom"))==NULL) +assert(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_CANTREGISTER_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") -assert(H5E_CANTINC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to increment reference count"))==NULL) + +/* Object header related errors */ +assert(H5E_LINKCOUNT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad object header link count"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_LINKCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_VERSION_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Wrong version number"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTINC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_VERSION_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTDEC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decrement reference count"))==NULL) +assert(H5E_ALIGNMENT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Alignment error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDEC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ALIGNMENT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_NOIDS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of IDs for group"))==NULL) +assert(H5E_BADMESG_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unrecognized message"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOIDS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADMESG_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 */ -assert(H5E_SEEKERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Seek failed"))==NULL) +assert(H5E_CANTDELETE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't delete message"))==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_CANTDELETE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_READERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Read failed"))==NULL) +assert(H5E_BADITER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Iteration failed"))==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_BADITER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_WRITEERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Write failed"))==NULL) +assert(H5E_CANTPACK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't pack messages"))==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_CANTPACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CLOSEERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Close failed"))==NULL) +assert(H5E_CANTRESET_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't reset object"))==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_CANTRESET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_OVERFLOW_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Address overflowed"))==NULL) +assert(H5E_CANTRENAME_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to rename object"))==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_CANTRENAME_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_FCNTL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "File control (fcntl) failed"))==NULL) + +/* System level errors */ +assert(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_FCNTL_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") /* I/O pipeline errors */ @@ -354,26 +453,33 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter operation failed"))==NULL) if((H5E_CANTFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Property list errors */ -assert(H5E_CANTGET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't get value"))==NULL) +/* Group related errors */ +assert(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_CANTGET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTOPENOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTSET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't set value"))==NULL) +assert(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_CANTSET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCLOSEOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_DUPCLASS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Duplicate class name in parent class"))==NULL) +assert(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_DUPCLASS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_COMPLEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_SETDISALLOWED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Disallowed operation"))==NULL) +assert(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_SETDISALLOWED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PATH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + +/* No error */ +assert(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_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Plugin errors */ @@ -430,257 +536,133 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "File mount error"))==NULL) if((H5E_MOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Cache related errors */ -assert(H5E_CANTFLUSH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to flush data from cache"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTFLUSH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTSERIALIZE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to serialize data from cache"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSERIALIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTTAG_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to tag metadata in the cache"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTTAG_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTLOAD_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to load metadata into cache"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTLOAD_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_PROTECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Protected metadata error"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_NOTCACHED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Metadata not currently cached"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOTCACHED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_SYSTEM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Internal error detected"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SYSTEM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTINS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert metadata into cache"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTINS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTPROTECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to protect metadata"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTPROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTUNPROTECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unprotect metadata"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUNPROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTPIN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to pin cache entry"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTPIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTUNPIN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to un-pin cache entry"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUNPIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTMARKDIRTY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to mark a pinned entry as dirty"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTMARKDIRTY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTDIRTY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to mark metadata as dirty"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDIRTY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTEXPUNGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to expunge a metadata cache entry"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTEXPUNGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTRESIZE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to resize a metadata cache entry"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRESIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTDEPEND_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to create a flush dependency"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDEPEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTUNDEPEND_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to destroy a flush dependency"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUNDEPEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTNOTIFY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to notify object about action"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTNOTIFY_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 */ -assert(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") -assert(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") -assert(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") -assert(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") -assert(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") -assert(H5E_CANTREDISTRIBUTE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to redistribute records"))==NULL) +/* Object atom related errors */ +assert(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_CANTREDISTRIBUTE_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") -assert(H5E_CANTSWAP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to swap records"))==NULL) +assert(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_CANTSWAP_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") -assert(H5E_CANTINSERT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert object"))==NULL) +assert(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_CANTINSERT_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") -assert(H5E_CANTLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to list node"))==NULL) +assert(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_CANTLIST_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") -assert(H5E_CANTMODIFY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to modify record"))==NULL) +assert(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_CANTMODIFY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTDEC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTREMOVE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to remove object"))==NULL) +assert(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_CANTREMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOIDS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Resource errors */ -assert(H5E_NOSPACE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "No space available for allocation"))==NULL) +/* Cache related errors */ +assert(H5E_CANTFLUSH_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to flush data from cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTFLUSH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTALLOC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't allocate space"))==NULL) +assert(H5E_CANTSERIALIZE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to serialize data from cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTALLOC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSERIALIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTCOPY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to copy object"))==NULL) +assert(H5E_CANTTAG_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to tag metadata in the cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCOPY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTTAG_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTFREE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to free object"))==NULL) +assert(H5E_CANTLOAD_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to load metadata into cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTFREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTLOAD_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_ALREADYEXISTS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL) +assert(H5E_PROTECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Protected metadata error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ALREADYEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTLOCK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to lock object"))==NULL) +assert(H5E_NOTCACHED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Metadata not currently cached"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOTCACHED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTUNLOCK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unlock object"))==NULL) +assert(H5E_SYSTEM_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Internal error detected"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUNLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SYSTEM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTGC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to garbage collect"))==NULL) +assert(H5E_CANTINS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert metadata into cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTGC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTINS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTGETSIZE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to compute size"))==NULL) +assert(H5E_CANTPROTECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to protect metadata"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTGETSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTPROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_OBJOPEN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object is already open"))==NULL) +assert(H5E_CANTUNPROTECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unprotect metadata"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_OBJOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTUNPROTECT_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 */ -assert(H5E_LINKCOUNT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad object header link count"))==NULL) +assert(H5E_CANTPIN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to pin cache entry"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_LINKCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTPIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_VERSION_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Wrong version number"))==NULL) +assert(H5E_CANTUNPIN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to un-pin cache entry"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_VERSION_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTUNPIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_ALIGNMENT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Alignment error"))==NULL) +assert(H5E_CANTMARKDIRTY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to mark a pinned entry as dirty"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ALIGNMENT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTMARKDIRTY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_BADMESG_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unrecognized message"))==NULL) +assert(H5E_CANTDIRTY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to mark metadata as dirty"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADMESG_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTDIRTY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTDELETE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't delete message"))==NULL) +assert(H5E_CANTEXPUNGE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to expunge a metadata cache entry"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDELETE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTEXPUNGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_BADITER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Iteration failed"))==NULL) +assert(H5E_CANTRESIZE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to resize a metadata cache entry"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADITER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRESIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTPACK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't pack messages"))==NULL) +assert(H5E_CANTDEPEND_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to create a flush dependency"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTPACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTDEPEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTRESET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't reset object"))==NULL) +assert(H5E_CANTUNDEPEND_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to destroy a flush dependency"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRESET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTUNDEPEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTRENAME_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to rename object"))==NULL) +assert(H5E_CANTNOTIFY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to notify object about action"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRENAME_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTNOTIFY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Link related errors */ @@ -710,55 +692,21 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't sort objects"))==NULL) if((H5E_CANTSORT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Argument errors */ -assert(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_UNINITIALIZED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_UNSUPPORTED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_BADTYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_BADRANGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(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_BADVALUE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* System level errors */ -assert(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") - -/* Free space errors */ -assert(H5E_CANTMERGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't merge objects"))==NULL) +/* Parallel MPI errors */ +assert(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_CANTMERGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_MPI_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTREVIVE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't revive object"))==NULL) +assert(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_CANTREVIVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_MPIERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_CANTSHRINK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't shrink container"))==NULL) +assert(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_CANTSHRINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRECV_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Dataspace errors */ @@ -798,36 +746,88 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't append object"))==NULL) if((H5E_CANTAPPEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Heap errors */ -assert(H5E_CANTRESTORE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't restore condition"))==NULL) +/* Argument errors */ +assert(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_CANTRESTORE_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") -assert(H5E_CANTCOMPUTE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compute value"))==NULL) +assert(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_CANTCOMPUTE_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") -assert(H5E_CANTEXTEND_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't extend heap's space"))==NULL) +assert(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_CANTEXTEND_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") -assert(H5E_CANTATTACH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't attach object"))==NULL) +assert(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_CANTATTACH_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") -assert(H5E_CANTUPDATE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't update object"))==NULL) +assert(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_CANTUPDATE_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") -assert(H5E_CANTOPERATE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't operate on object"))==NULL) + +/* B-tree related errors */ +assert(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_CANTOPERATE_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") +assert(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") +assert(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") +assert(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") +assert(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") +assert(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") +assert(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") +assert(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") +assert(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") +assert(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") +assert(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") /* Datatype conversion errors */ diff --git a/src/H5Epubgen.h b/src/H5Epubgen.h index 9011fd3..8b60079 100644 --- a/src/H5Epubgen.h +++ b/src/H5Epubgen.h @@ -24,121 +24,77 @@ /* Major error codes */ /*********************/ -#define H5E_EARRAY (H5OPEN H5E_EARRAY_g) -#define H5E_PLIST (H5OPEN H5E_PLIST_g) -#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g) -#define H5E_FSPACE (H5OPEN H5E_FSPACE_g) -#define H5E_STORAGE (H5OPEN H5E_STORAGE_g) -#define H5E_CACHE (H5OPEN H5E_CACHE_g) -#define H5E_IO (H5OPEN H5E_IO_g) -#define H5E_INTERNAL (H5OPEN H5E_INTERNAL_g) +#define H5E_FUNC (H5OPEN H5E_FUNC_g) +#define H5E_FILE (H5OPEN H5E_FILE_g) +#define H5E_SOHM (H5OPEN H5E_SOHM_g) #define H5E_SYM (H5OPEN H5E_SYM_g) +#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g) +#define H5E_VFL (H5OPEN H5E_VFL_g) +#define H5E_INTERNAL (H5OPEN H5E_INTERNAL_g) +#define H5E_BTREE (H5OPEN H5E_BTREE_g) +#define H5E_REFERENCE (H5OPEN H5E_REFERENCE_g) #define H5E_DATASPACE (H5OPEN H5E_DATASPACE_g) +#define H5E_RESOURCE (H5OPEN H5E_RESOURCE_g) +#define H5E_RS (H5OPEN H5E_RS_g) #define H5E_FARRAY (H5OPEN H5E_FARRAY_g) -#define H5E_OHDR (H5OPEN H5E_OHDR_g) -#define H5E_SOHM (H5OPEN H5E_SOHM_g) -#define H5E_EFL (H5OPEN H5E_EFL_g) -#define H5E_SLIST (H5OPEN H5E_SLIST_g) -#define H5E_BTREE (H5OPEN H5E_BTREE_g) -#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g) -#define H5E_ATOM (H5OPEN H5E_ATOM_g) -#define H5E_FILE (H5OPEN H5E_FILE_g) #define H5E_HEAP (H5OPEN H5E_HEAP_g) -#define H5E_VFL (H5OPEN H5E_VFL_g) +#define H5E_ATTR (H5OPEN H5E_ATTR_g) +#define H5E_IO (H5OPEN H5E_IO_g) +#define H5E_EFL (H5OPEN H5E_EFL_g) +#define H5E_TST (H5OPEN H5E_TST_g) +#define H5E_FSPACE (H5OPEN H5E_FSPACE_g) #define H5E_DATASET (H5OPEN H5E_DATASET_g) +#define H5E_STORAGE (H5OPEN H5E_STORAGE_g) #define H5E_LINK (H5OPEN H5E_LINK_g) +#define H5E_PLIST (H5OPEN H5E_PLIST_g) +#define H5E_DATATYPE (H5OPEN H5E_DATATYPE_g) +#define H5E_OHDR (H5OPEN H5E_OHDR_g) +#define H5E_ATOM (H5OPEN H5E_ATOM_g) +#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g) +#define H5E_SLIST (H5OPEN H5E_SLIST_g) +#define H5E_ARGS (H5OPEN H5E_ARGS_g) +#define H5E_EARRAY (H5OPEN H5E_EARRAY_g) #define H5E_PLINE (H5OPEN H5E_PLINE_g) -#define H5E_FUNC (H5OPEN H5E_FUNC_g) -#define H5E_TST (H5OPEN H5E_TST_g) -#define H5E_ATTR (H5OPEN H5E_ATTR_g) #define H5E_ERROR (H5OPEN H5E_ERROR_g) -#define H5E_ARGS (H5OPEN H5E_ARGS_g) -#define H5E_RESOURCE (H5OPEN H5E_RESOURCE_g) -#define H5E_DATATYPE (H5OPEN H5E_DATATYPE_g) -#define H5E_RS (H5OPEN H5E_RS_g) -#define H5E_REFERENCE (H5OPEN H5E_REFERENCE_g) -H5_DLLVAR hid_t H5E_EARRAY_g; /* Extensible Array */ -H5_DLLVAR hid_t H5E_PLIST_g; /* Property lists */ -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_STORAGE_g; /* Data storage */ -H5_DLLVAR hid_t H5E_CACHE_g; /* Object cache */ -H5_DLLVAR hid_t H5E_IO_g; /* Low-level I/O */ -H5_DLLVAR hid_t H5E_INTERNAL_g; /* Internal error (too specific to document in detail) */ +#define H5E_CACHE (H5OPEN H5E_CACHE_g) +H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */ +H5_DLLVAR hid_t H5E_FILE_g; /* File accessibilty */ +H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */ 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_VFL_g; /* Virtual File Layer */ +H5_DLLVAR hid_t H5E_INTERNAL_g; /* Internal error (too specific to document in detail) */ +H5_DLLVAR hid_t H5E_BTREE_g; /* B-Tree node */ +H5_DLLVAR hid_t H5E_REFERENCE_g; /* References */ H5_DLLVAR hid_t H5E_DATASPACE_g; /* Dataspace */ +H5_DLLVAR hid_t H5E_RESOURCE_g; /* Resource unavailable */ +H5_DLLVAR hid_t H5E_RS_g; /* Reference Counted Strings */ H5_DLLVAR hid_t H5E_FARRAY_g; /* Fixed Array */ -H5_DLLVAR hid_t H5E_OHDR_g; /* Object header */ -H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */ -H5_DLLVAR hid_t H5E_EFL_g; /* External file list */ -H5_DLLVAR hid_t H5E_SLIST_g; /* Skip Lists */ -H5_DLLVAR hid_t H5E_BTREE_g; /* B-Tree node */ -H5_DLLVAR hid_t H5E_PLUGIN_g; /* Plugin for dynamically loaded library */ -H5_DLLVAR hid_t H5E_ATOM_g; /* Object atom */ -H5_DLLVAR hid_t H5E_FILE_g; /* File accessibilty */ H5_DLLVAR hid_t H5E_HEAP_g; /* Heap */ -H5_DLLVAR hid_t H5E_VFL_g; /* Virtual File Layer */ +H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */ +H5_DLLVAR hid_t H5E_IO_g; /* Low-level I/O */ +H5_DLLVAR hid_t H5E_EFL_g; /* External file list */ +H5_DLLVAR hid_t H5E_TST_g; /* Ternary Search Trees */ +H5_DLLVAR hid_t H5E_FSPACE_g; /* Free Space Manager */ H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */ +H5_DLLVAR hid_t H5E_STORAGE_g; /* Data storage */ H5_DLLVAR hid_t H5E_LINK_g; /* Links */ +H5_DLLVAR hid_t H5E_PLIST_g; /* Property lists */ +H5_DLLVAR hid_t H5E_DATATYPE_g; /* Datatype */ +H5_DLLVAR hid_t H5E_OHDR_g; /* Object header */ +H5_DLLVAR hid_t H5E_ATOM_g; /* Object atom */ +H5_DLLVAR hid_t H5E_NONE_MAJOR_g; /* No error */ +H5_DLLVAR hid_t H5E_SLIST_g; /* Skip Lists */ +H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */ +H5_DLLVAR hid_t H5E_EARRAY_g; /* Extensible Array */ H5_DLLVAR hid_t H5E_PLINE_g; /* Data filters */ -H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */ -H5_DLLVAR hid_t H5E_TST_g; /* Ternary Search Trees */ -H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */ H5_DLLVAR hid_t H5E_ERROR_g; /* Error API */ -H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */ -H5_DLLVAR hid_t H5E_RESOURCE_g; /* Resource unavailable */ -H5_DLLVAR hid_t H5E_DATATYPE_g; /* Datatype */ -H5_DLLVAR hid_t H5E_RS_g; /* Reference Counted Strings */ -H5_DLLVAR hid_t H5E_REFERENCE_g; /* References */ +H5_DLLVAR hid_t H5E_CACHE_g; /* Object cache */ /*********************/ /* Minor error codes */ /*********************/ -/* No error */ -#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g) -H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */ - -/* 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 */ - -/* Function entry/exit interface errors */ -#define H5E_CANTINIT (H5OPEN H5E_CANTINIT_g) -#define H5E_ALREADYINIT (H5OPEN H5E_ALREADYINIT_g) -#define H5E_CANTRELEASE (H5OPEN H5E_CANTRELEASE_g) -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 */ - -/* 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 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 */ - /* Generic low-level file I/O errors */ #define H5E_SEEKERROR (H5OPEN H5E_SEEKERROR_g) #define H5E_READERROR (H5OPEN H5E_READERROR_g) @@ -153,6 +109,92 @@ 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 */ +/* Resource errors */ +#define H5E_NOSPACE (H5OPEN H5E_NOSPACE_g) +#define H5E_CANTALLOC (H5OPEN H5E_CANTALLOC_g) +#define H5E_CANTCOPY (H5OPEN H5E_CANTCOPY_g) +#define H5E_CANTFREE (H5OPEN H5E_CANTFREE_g) +#define H5E_ALREADYEXISTS (H5OPEN H5E_ALREADYEXISTS_g) +#define H5E_CANTLOCK (H5OPEN H5E_CANTLOCK_g) +#define H5E_CANTUNLOCK (H5OPEN H5E_CANTUNLOCK_g) +#define H5E_CANTGC (H5OPEN H5E_CANTGC_g) +#define H5E_CANTGETSIZE (H5OPEN H5E_CANTGETSIZE_g) +#define H5E_OBJOPEN (H5OPEN H5E_OBJOPEN_g) +H5_DLLVAR hid_t H5E_NOSPACE_g; /* No space available for allocation */ +H5_DLLVAR hid_t H5E_CANTALLOC_g; /* Can't allocate space */ +H5_DLLVAR hid_t H5E_CANTCOPY_g; /* Unable to copy object */ +H5_DLLVAR hid_t H5E_CANTFREE_g; /* Unable to free object */ +H5_DLLVAR hid_t H5E_ALREADYEXISTS_g; /* Object already exists */ +H5_DLLVAR hid_t H5E_CANTLOCK_g; /* Unable to lock object */ +H5_DLLVAR hid_t H5E_CANTUNLOCK_g; /* Unable to unlock object */ +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 */ + +/* 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 */ + +/* Function entry/exit interface errors */ +#define H5E_CANTINIT (H5OPEN H5E_CANTINIT_g) +#define H5E_ALREADYINIT (H5OPEN H5E_ALREADYINIT_g) +#define H5E_CANTRELEASE (H5OPEN H5E_CANTRELEASE_g) +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 */ + +/* 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 */ + +/* 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 */ + +/* Object header related errors */ +#define H5E_LINKCOUNT (H5OPEN H5E_LINKCOUNT_g) +#define H5E_VERSION (H5OPEN H5E_VERSION_g) +#define H5E_ALIGNMENT (H5OPEN H5E_ALIGNMENT_g) +#define H5E_BADMESG (H5OPEN H5E_BADMESG_g) +#define H5E_CANTDELETE (H5OPEN H5E_CANTDELETE_g) +#define H5E_BADITER (H5OPEN H5E_BADITER_g) +#define H5E_CANTPACK (H5OPEN H5E_CANTPACK_g) +#define H5E_CANTRESET (H5OPEN H5E_CANTRESET_g) +#define H5E_CANTRENAME (H5OPEN H5E_CANTRENAME_g) +H5_DLLVAR hid_t H5E_LINKCOUNT_g; /* Bad object header link count */ +H5_DLLVAR hid_t H5E_VERSION_g; /* Wrong version number */ +H5_DLLVAR hid_t H5E_ALIGNMENT_g; /* Alignment error */ +H5_DLLVAR hid_t H5E_BADMESG_g; /* Unrecognized message */ +H5_DLLVAR hid_t H5E_CANTDELETE_g; /* Can't delete message */ +H5_DLLVAR hid_t H5E_BADITER_g; /* Iteration failed */ +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 */ + /* I/O pipeline errors */ #define H5E_NOFILTER (H5OPEN H5E_NOFILTER_g) #define H5E_CALLBACK (H5OPEN H5E_CALLBACK_g) @@ -167,15 +209,19 @@ 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 */ -/* 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 */ +/* 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 */ + +/* No error */ +#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g) +H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */ /* Plugin errors */ #define H5E_OPENERROR (H5OPEN H5E_OPENERROR_g) @@ -201,6 +247,20 @@ 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 */ +/* 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 */ + /* Cache related errors */ #define H5E_CANTFLUSH (H5OPEN H5E_CANTFLUSH_g) #define H5E_CANTSERIALIZE (H5OPEN H5E_CANTSERIALIZE_g) @@ -241,72 +301,6 @@ H5_DLLVAR hid_t H5E_CANTDEPEND_g; /* Unable to create a flush dependency */ H5_DLLVAR hid_t H5E_CANTUNDEPEND_g; /* Unable to destroy a flush dependency */ H5_DLLVAR hid_t H5E_CANTNOTIFY_g; /* Unable to notify object about action */ -/* 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 */ - -/* Resource errors */ -#define H5E_NOSPACE (H5OPEN H5E_NOSPACE_g) -#define H5E_CANTALLOC (H5OPEN H5E_CANTALLOC_g) -#define H5E_CANTCOPY (H5OPEN H5E_CANTCOPY_g) -#define H5E_CANTFREE (H5OPEN H5E_CANTFREE_g) -#define H5E_ALREADYEXISTS (H5OPEN H5E_ALREADYEXISTS_g) -#define H5E_CANTLOCK (H5OPEN H5E_CANTLOCK_g) -#define H5E_CANTUNLOCK (H5OPEN H5E_CANTUNLOCK_g) -#define H5E_CANTGC (H5OPEN H5E_CANTGC_g) -#define H5E_CANTGETSIZE (H5OPEN H5E_CANTGETSIZE_g) -#define H5E_OBJOPEN (H5OPEN H5E_OBJOPEN_g) -H5_DLLVAR hid_t H5E_NOSPACE_g; /* No space available for allocation */ -H5_DLLVAR hid_t H5E_CANTALLOC_g; /* Can't allocate space */ -H5_DLLVAR hid_t H5E_CANTCOPY_g; /* Unable to copy object */ -H5_DLLVAR hid_t H5E_CANTFREE_g; /* Unable to free object */ -H5_DLLVAR hid_t H5E_ALREADYEXISTS_g; /* Object already exists */ -H5_DLLVAR hid_t H5E_CANTLOCK_g; /* Unable to lock object */ -H5_DLLVAR hid_t H5E_CANTUNLOCK_g; /* Unable to unlock object */ -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 */ - -/* Object header related errors */ -#define H5E_LINKCOUNT (H5OPEN H5E_LINKCOUNT_g) -#define H5E_VERSION (H5OPEN H5E_VERSION_g) -#define H5E_ALIGNMENT (H5OPEN H5E_ALIGNMENT_g) -#define H5E_BADMESG (H5OPEN H5E_BADMESG_g) -#define H5E_CANTDELETE (H5OPEN H5E_CANTDELETE_g) -#define H5E_BADITER (H5OPEN H5E_BADITER_g) -#define H5E_CANTPACK (H5OPEN H5E_CANTPACK_g) -#define H5E_CANTRESET (H5OPEN H5E_CANTRESET_g) -#define H5E_CANTRENAME (H5OPEN H5E_CANTRENAME_g) -H5_DLLVAR hid_t H5E_LINKCOUNT_g; /* Bad object header link count */ -H5_DLLVAR hid_t H5E_VERSION_g; /* Wrong version number */ -H5_DLLVAR hid_t H5E_ALIGNMENT_g; /* Alignment error */ -H5_DLLVAR hid_t H5E_BADMESG_g; /* Unrecognized message */ -H5_DLLVAR hid_t H5E_CANTDELETE_g; /* Can't delete message */ -H5_DLLVAR hid_t H5E_BADITER_g; /* Iteration failed */ -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 */ - /* Link related errors */ #define H5E_TRAVERSE (H5OPEN H5E_TRAVERSE_g) #define H5E_NLINKS (H5OPEN H5E_NLINKS_g) @@ -319,29 +313,13 @@ 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 */ -/* 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 */ - -/* System level errors */ -#define H5E_SYSERRSTR (H5OPEN H5E_SYSERRSTR_g) -H5_DLLVAR hid_t H5E_SYSERRSTR_g; /* System error message */ - -/* 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 */ /* Dataspace errors */ #define H5E_CANTCLIP (H5OPEN H5E_CANTCLIP_g) @@ -359,19 +337,41 @@ H5_DLLVAR hid_t H5E_BADSELECT_g; /* Invalid selection */ H5_DLLVAR hid_t H5E_CANTCOMPARE_g; /* Can't compare objects */ H5_DLLVAR hid_t H5E_CANTAPPEND_g; /* Can't append object */ -/* 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 */ +/* 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 */ /* Datatype conversion errors */ #define H5E_CANTCONVERT (H5OPEN H5E_CANTCONVERT_g) diff --git a/src/H5Eterm.h b/src/H5Eterm.h index 2e99bc6..bf39a6b 100644 --- a/src/H5Eterm.h +++ b/src/H5Eterm.h @@ -22,77 +22,100 @@ /* Reset major error IDs */ -H5E_EARRAY_g= -H5E_PLIST_g= -H5E_NONE_MAJOR_g= -H5E_FSPACE_g= -H5E_STORAGE_g= -H5E_CACHE_g= -H5E_IO_g= -H5E_INTERNAL_g= +H5E_FUNC_g= +H5E_FILE_g= +H5E_SOHM_g= H5E_SYM_g= +H5E_PLUGIN_g= +H5E_VFL_g= +H5E_INTERNAL_g= +H5E_BTREE_g= +H5E_REFERENCE_g= H5E_DATASPACE_g= +H5E_RESOURCE_g= +H5E_RS_g= H5E_FARRAY_g= -H5E_OHDR_g= -H5E_SOHM_g= -H5E_EFL_g= -H5E_SLIST_g= -H5E_BTREE_g= -H5E_PLUGIN_g= -H5E_ATOM_g= -H5E_FILE_g= H5E_HEAP_g= -H5E_VFL_g= +H5E_ATTR_g= +H5E_IO_g= +H5E_EFL_g= +H5E_TST_g= +H5E_FSPACE_g= H5E_DATASET_g= +H5E_STORAGE_g= H5E_LINK_g= +H5E_PLIST_g= +H5E_DATATYPE_g= +H5E_OHDR_g= +H5E_ATOM_g= +H5E_NONE_MAJOR_g= +H5E_SLIST_g= +H5E_ARGS_g= +H5E_EARRAY_g= H5E_PLINE_g= -H5E_FUNC_g= -H5E_TST_g= -H5E_ATTR_g= H5E_ERROR_g= -H5E_ARGS_g= -H5E_RESOURCE_g= -H5E_DATATYPE_g= -H5E_RS_g= -H5E_REFERENCE_g= (-1); +H5E_CACHE_g= (-1); /* Reset minor error IDs */ -/* No error */ -H5E_NONE_MINOR_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= -/* Group related errors */ -H5E_CANTOPENOBJ_g= -H5E_CANTCLOSEOBJ_g= -H5E_COMPLEN_g= -H5E_PATH_g= +/* Resource errors */ +H5E_NOSPACE_g= +H5E_CANTALLOC_g= +H5E_CANTCOPY_g= +H5E_CANTFREE_g= +H5E_ALREADYEXISTS_g= +H5E_CANTLOCK_g= +H5E_CANTUNLOCK_g= +H5E_CANTGC_g= +H5E_CANTGETSIZE_g= +H5E_OBJOPEN_g= + +/* Heap errors */ +H5E_CANTRESTORE_g= +H5E_CANTCOMPUTE_g= +H5E_CANTEXTEND_g= +H5E_CANTATTACH_g= +H5E_CANTUPDATE_g= +H5E_CANTOPERATE_g= /* Function entry/exit interface errors */ H5E_CANTINIT_g= H5E_ALREADYINIT_g= H5E_CANTRELEASE_g= -/* Parallel MPI errors */ -H5E_MPI_g= -H5E_MPIERRSTR_g= -H5E_CANTRECV_g= +/* Property list errors */ +H5E_CANTGET_g= +H5E_CANTSET_g= +H5E_DUPCLASS_g= +H5E_SETDISALLOWED_g= -/* Object atom related errors */ -H5E_BADATOM_g= -H5E_BADGROUP_g= -H5E_CANTREGISTER_g= -H5E_CANTINC_g= -H5E_CANTDEC_g= -H5E_NOIDS_g= +/* Free space errors */ +H5E_CANTMERGE_g= +H5E_CANTREVIVE_g= +H5E_CANTSHRINK_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= +/* Object header related errors */ +H5E_LINKCOUNT_g= +H5E_VERSION_g= +H5E_ALIGNMENT_g= +H5E_BADMESG_g= +H5E_CANTDELETE_g= +H5E_BADITER_g= +H5E_CANTPACK_g= +H5E_CANTRESET_g= +H5E_CANTRENAME_g= + +/* System level errors */ +H5E_SYSERRSTR_g= /* I/O pipeline errors */ H5E_NOFILTER_g= @@ -102,11 +125,14 @@ H5E_SETLOCAL_g= H5E_NOENCODER_g= H5E_CANTFILTER_g= -/* Property list errors */ -H5E_CANTGET_g= -H5E_CANTSET_g= -H5E_DUPCLASS_g= -H5E_SETDISALLOWED_g= +/* Group related errors */ +H5E_CANTOPENOBJ_g= +H5E_CANTCLOSEOBJ_g= +H5E_COMPLEN_g= +H5E_PATH_g= + +/* No error */ +H5E_NONE_MINOR_g= /* Plugin errors */ H5E_OPENERROR_g= @@ -122,6 +148,14 @@ H5E_BADFILE_g= H5E_TRUNCATED_g= H5E_MOUNT_g= +/* Object atom related errors */ +H5E_BADATOM_g= +H5E_BADGROUP_g= +H5E_CANTREGISTER_g= +H5E_CANTINC_g= +H5E_CANTDEC_g= +H5E_NOIDS_g= + /* Cache related errors */ H5E_CANTFLUSH_g= H5E_CANTSERIALIZE_g= @@ -143,42 +177,6 @@ H5E_CANTDEPEND_g= H5E_CANTUNDEPEND_g= H5E_CANTNOTIFY_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= - -/* Resource errors */ -H5E_NOSPACE_g= -H5E_CANTALLOC_g= -H5E_CANTCOPY_g= -H5E_CANTFREE_g= -H5E_ALREADYEXISTS_g= -H5E_CANTLOCK_g= -H5E_CANTUNLOCK_g= -H5E_CANTGC_g= -H5E_CANTGETSIZE_g= -H5E_OBJOPEN_g= - -/* Object header related errors */ -H5E_LINKCOUNT_g= -H5E_VERSION_g= -H5E_ALIGNMENT_g= -H5E_BADMESG_g= -H5E_CANTDELETE_g= -H5E_BADITER_g= -H5E_CANTPACK_g= -H5E_CANTRESET_g= -H5E_CANTRENAME_g= - /* Link related errors */ H5E_TRAVERSE_g= H5E_NLINKS_g= @@ -186,20 +184,10 @@ H5E_NOTREGISTERED_g= H5E_CANTMOVE_g= H5E_CANTSORT_g= -/* Argument errors */ -H5E_UNINITIALIZED_g= -H5E_UNSUPPORTED_g= -H5E_BADTYPE_g= -H5E_BADRANGE_g= -H5E_BADVALUE_g= - -/* System level errors */ -H5E_SYSERRSTR_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= /* Dataspace errors */ H5E_CANTCLIP_g= @@ -210,13 +198,25 @@ H5E_BADSELECT_g= H5E_CANTCOMPARE_g= H5E_CANTAPPEND_g= -/* Heap errors */ -H5E_CANTRESTORE_g= -H5E_CANTCOMPUTE_g= -H5E_CANTEXTEND_g= -H5E_CANTATTACH_g= -H5E_CANTUPDATE_g= -H5E_CANTOPERATE_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= /* Datatype conversion errors */ H5E_CANTCONVERT_g= diff --git a/tools/misc/vds/Makefile.in b/tools/misc/vds/Makefile.in index e9c73ad..9fa9426 100644 --- a/tools/misc/vds/Makefile.in +++ b/tools/misc/vds/Makefile.in @@ -107,7 +107,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_HEADER = $(top_builddir)/src/H5config.h \ + $(top_builddir)/fortran/src/H5config_f.inc CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = UC_1_one_dim_gen$(EXEEXT) UC_2_two_dims_gen$(EXEEXT) \ @@ -149,7 +150,7 @@ AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f @@ -465,14 +466,21 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FC2003 = @FC2003@ FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FC_VERSION = @FC_VERSION@ FGREP = @FGREP@ +FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ +FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ +FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ GREP = @GREP@ +H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ +H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ +H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ +H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ +H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ H5_CFLAGS = @H5_CFLAGS@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ @@ -482,13 +490,12 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ HDF_FORTRAN = @HDF_FORTRAN@ -HDF_FORTRAN2003 = @HDF_FORTRAN2003@ HID_T = @HID_T@ HL = @HL@ HL_FOR = @HL_FOR@ @@ -530,9 +537,20 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ RUNPARALLEL = @RUNPARALLEL@ -- cgit v0.12 From db8e289abe67b506d2a1096d1a39151aca0935e9 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 31 Aug 2015 16:58:15 -0500 Subject: [svn-r27632] Description: Revert changes to pass file pointer to selection serialize/deserialize routines. Also patch back in some changes that were merged out in the previous merge w/trunk. Tested on: MacOSX/64 10.10.5 (amazon) w/serial (h5committest not required on this branch) --- src/H5Fint.c | 127 ----------------------------------------------- src/H5Fprivate.h | 6 --- src/H5Olayout.c | 12 ++--- src/H5R.c | 6 +-- src/H5S.c | 6 +-- src/H5Sall.c | 27 ++++------ src/H5Shyper.c | 46 ++++++++--------- src/H5Snone.c | 28 ++++------- src/H5Spkg.h | 9 ++-- src/H5Spoint.c | 22 +++----- src/H5Sprivate.h | 18 +++---- src/H5Sselect.c | 25 ++++------ tools/h5ls/h5ls.c | 1 + tools/lib/h5tools_dump.c | 1 + 14 files changed, 87 insertions(+), 247 deletions(-) diff --git a/src/H5Fint.c b/src/H5Fint.c index c9e1ac0..0e77349 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -1653,9 +1653,6 @@ done: * then increments the pointer to the first byte after the * address. An undefined value is stored as all 1's. * - * Note this function is almost identical to H5F_size_encode. - * Changes should be made in both places. - * * Return: void * * Programmer: Robb Matzke @@ -1728,9 +1725,6 @@ H5F_addr_encode(const H5F_t *f, uint8_t **pp/*in,out*/, haddr_t addr) * If the value read is all 1's then the address is returned * with an undefined value. * - * Note this function is almost identical to H5F_size_decode. - * Changes should be made in both places. - * * Return: void * * Programmer: Robb Matzke @@ -1821,127 +1815,6 @@ H5F_addr_decode(const H5F_t *f, const uint8_t **pp/*in,out*/, haddr_t *addr_p/*o /*------------------------------------------------------------------------- - * Function: H5F_size_encode - * - * Purpose: Encodes a size into the buffer pointed to by *PP and then - * increments the pointer to the first byte after the size. - * An undefined value is stored as all 1's. If size cannot - * be HSIZE_UNDEF, then you can use H5F_ENCODE_LENGTH - * instead. - * - * Note this function is almost identical to H5F_addr_encode - * and H5F_addr_encode_len. Changes should be made in both - * places. - * - * Return: void - * - * Programmer: Neil Fortner - * Friday, April 10, 2015 - * - *------------------------------------------------------------------------- - */ -void -H5F_size_encode(const H5F_t *f, uint8_t **pp/*in,out*/, hsize_t size) -{ - unsigned u; /* Local index variable */ - - /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ - FUNC_ENTER_NOAPI_NOINIT_NOERR - - HDassert(f); - HDassert(pp && *pp); - - if(size != HSIZE_UNDEF) { - for(u = 0; u < H5F_SIZEOF_SIZE(f); u++) { - *(*pp)++ = (uint8_t)(size & 0xff); - size >>= 8; - } /* end for */ - HDassert("overflow" && 0 == size); - } /* end if */ - else { - for(u = 0; u < H5F_SIZEOF_SIZE(f); u++) - *(*pp)++ = 0xff; - } /* end else */ - - FUNC_LEAVE_NOAPI_VOID -} /* end H5F_size_encode() */ - - -/*------------------------------------------------------------------------- - * Function: H5F_size_decode - * - * Purpose: Decodes a size from the buffer pointed to by *PP and - * updates the pointer to point to the next byte after the - * size. - * - * If the value read is all 1's then the size is returned - * with an undefined value. If size cannot be HSIZE_UNDEF, - * then you can use H5F_DECODE_LENGTH instead. - * - * Note this function is almost identical to H5F_addr_decode - * and H5F_addr_decode_len. Changes should be made in both - * places. - * - * Return: void - * - * Programmer: Neil Fortner - * Friday, April 10, 2015 - * - *------------------------------------------------------------------------- - */ -void -H5F_size_decode(const H5F_t *f, const uint8_t **pp/*in,out*/, - hsize_t *size_p/*out*/) -{ - hbool_t all_zero = TRUE; /* True if address was all zeroes */ - unsigned u; /* Local index variable */ - - /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ - FUNC_ENTER_NOAPI_NOINIT_NOERR - - HDassert(f); - HDassert(pp && *pp); - HDassert(size_p); - - /* Reset value in destination */ - *size_p = 0; - - /* Decode bytes from size */ - for(u = 0; u < H5F_SIZEOF_SIZE(f); u++) { - uint8_t c; /* Local decoded byte */ - - /* Get decoded byte (and advance pointer) */ - c = *(*pp)++; - - /* Check for non-undefined size byte value */ - if(c != 0xff) - all_zero = FALSE; - - if(u < sizeof(*size_p)) { - haddr_t tmp = c; /* Local copy of size, for casting */ - - /* Shift decoded byte to correct position */ - tmp <<= (u * 8); /*use tmp to get casting right */ - - /* Merge into already decoded bytes */ - *size_p |= tmp; - } /* end if */ - else - if(!all_zero) - HDassert(0 == **pp); /*overflow */ - } /* end for */ - - /* If 'all_zero' is still TRUE, the size_p was entirely composed of '0xff' - * bytes, which is the encoded form of 'HSIZE_UNDEF', so set the destination - * to that value */ - if(all_zero) - *size_p = HSIZE_UNDEF; - - FUNC_LEAVE_NOAPI_VOID -} /* end H5F_size_decode() */ - - -/*------------------------------------------------------------------------- * Function: H5F_set_grp_btree_shared * * Purpose: Set the grp_btree_shared field with a valid ref-count pointer. diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 1533d2c..36d7429 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -667,12 +667,6 @@ H5_DLL void H5F_addr_encode_len(size_t addr_len, uint8_t **pp, haddr_t addr); H5_DLL void H5F_addr_decode(const H5F_t *f, const uint8_t **pp, haddr_t *addr_p); H5_DLL void H5F_addr_decode_len(size_t addr_len, const uint8_t **pp, haddr_t *addr_p); -/* Size-related functions */ -H5_DLL void H5F_size_encode(const H5F_t *f, uint8_t **pp/*in,out*/, - hsize_t size); -H5_DLL void H5F_size_decode(const H5F_t *f, const uint8_t **pp/*in,out*/, - hsize_t *size_p/*out*/); - /* File access property list callbacks */ H5_DLL herr_t H5P_facc_close(hid_t dxpl_id, void *close_data); diff --git a/src/H5Olayout.c b/src/H5Olayout.c index dae43f3..130bf67 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -299,11 +299,11 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED * heap_block_p += tmp_size; /* Source selection */ - if(H5S_SELECT_DESERIALIZE(f, &mesg->storage.u.virt.list[i].source_select, &heap_block_p) < 0) + if(H5S_SELECT_DESERIALIZE(&mesg->storage.u.virt.list[i].source_select, &heap_block_p) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode source space selection") /* Virtual selection */ - if(H5S_SELECT_DESERIALIZE(f, &mesg->storage.u.virt.list[i].source_dset.virtual_select, &heap_block_p) < 0) + if(H5S_SELECT_DESERIALIZE(&mesg->storage.u.virt.list[i].source_dset.virtual_select, &heap_block_p) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode virtual space selection") /* Parse source file and dataset names for "printf" @@ -524,12 +524,12 @@ H5O_layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c block_size += str_size[(2 * i) + 1]; /* Source selection */ - if((select_serial_size = H5S_SELECT_SERIAL_SIZE(f, mesg->storage.u.virt.list[i].source_select)) < 0) + if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virt.list[i].source_select)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") block_size += (size_t)select_serial_size; /* Virtual dataset selection */ - if((select_serial_size = H5S_SELECT_SERIAL_SIZE(f, mesg->storage.u.virt.list[i].source_dset.virtual_select)) < 0) + if((select_serial_size = H5S_SELECT_SERIAL_SIZE(mesg->storage.u.virt.list[i].source_dset.virtual_select)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") block_size += (size_t)select_serial_size; } /* end for */ @@ -561,11 +561,11 @@ H5O_layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c heap_block_p += str_size[(2 * i) + 1]; /* Source selection */ - if(H5S_SELECT_SERIALIZE(f, mesg->storage.u.virt.list[i].source_select, &heap_block_p) < 0) + if(H5S_SELECT_SERIALIZE(mesg->storage.u.virt.list[i].source_select, &heap_block_p) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize source selection") /* Virtual selection */ - if(H5S_SELECT_SERIALIZE(f, mesg->storage.u.virt.list[i].source_dset.virtual_select, &heap_block_p) < 0) + if(H5S_SELECT_SERIALIZE(mesg->storage.u.virt.list[i].source_dset.virtual_select, &heap_block_p) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize virtual selection") } /* end for */ diff --git a/src/H5R.c b/src/H5R.c index c9474c7..d96f5e6 100644 --- a/src/H5R.c +++ b/src/H5R.c @@ -275,7 +275,7 @@ H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5 HDmemset(ref, 0, H5R_DSET_REG_REF_BUF_SIZE); /* Get the amount of space required to serialize the selection */ - if((buf_size = H5S_SELECT_SERIAL_SIZE(loc->oloc->file, space)) < 0) + if((buf_size = H5S_SELECT_SERIAL_SIZE(space)) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "Invalid amount of space for serializing selection") /* Increase buffer size to allow for the dataset OID */ @@ -291,7 +291,7 @@ H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5 H5F_addr_encode(loc->oloc->file, &p, obj_loc.oloc->addr); /* Serialize the selection into heap buffer */ - if(H5S_SELECT_SERIALIZE(loc->oloc->file, space, &p) < 0) + if(H5S_SELECT_SERIALIZE(space, &p) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Unable to serialize selection") /* Save the serialized buffer for later */ @@ -668,7 +668,7 @@ H5R_get_region(H5F_t *file, hid_t dxpl_id, const void *_ref) HGOTO_ERROR(H5E_DATASPACE, H5E_NOTFOUND, NULL, "not found") /* Unserialize the selection */ - if(H5S_SELECT_DESERIALIZE(file, &ret_value, &p) < 0) + if(H5S_SELECT_DESERIALIZE(&ret_value, &p) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, NULL, "can't deserialize selection") done: diff --git a/src/H5S.c b/src/H5S.c index f3dc48c..c70c9b0 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -1548,7 +1548,7 @@ H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace size") /* Find out the size of buffer needed for selection */ - if((sselect_size = H5S_SELECT_SERIAL_SIZE(f, obj)) < 0) + if((sselect_size = H5S_SELECT_SERIAL_SIZE(obj)) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace selection size") H5_CHECKED_ASSIGN(select_size, size_t, sselect_size, hssize_t); @@ -1575,7 +1575,7 @@ H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) *p += extent_size; /* Encode the selection part of dataspace. */ - if(H5S_SELECT_SERIALIZE(f, obj, p) < 0) + if(H5S_SELECT_SERIALIZE(obj, p) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode select space") } /* end else */ @@ -1694,7 +1694,7 @@ H5S_decode(const unsigned char **p) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection") /* Decode the select part of dataspace. I believe this part always exists. */ - if(H5S_SELECT_DESERIALIZE(f, &ds, p) < 0) + if(H5S_SELECT_DESERIALIZE(&ds, p) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode space selection") /* Set return value */ diff --git a/src/H5Sall.c b/src/H5Sall.c index 7e33980..568327a 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -38,11 +38,10 @@ static herr_t H5S_all_get_seq_list(const H5S_t *space, unsigned flags, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); static herr_t H5S_all_release(H5S_t *space); static htri_t H5S_all_is_valid(const H5S_t *space); -static hssize_t H5S_all_serial_size(const H5F_t *f, const H5S_t *space); -static herr_t H5S_all_serialize(const H5F_t *f, const H5S_t *space, - uint8_t **p); -static herr_t H5S_all_deserialize(const H5F_t *f, H5S_t *space, - uint32_t version, uint8_t flags, const uint8_t **p); +static hssize_t H5S_all_serial_size(const H5S_t *space); +static herr_t H5S_all_serialize(const H5S_t *space, uint8_t **p); +static herr_t H5S_all_deserialize(H5S_t *space, uint32_t version, uint8_t flags, + const uint8_t **p); static herr_t H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_all_offset(const H5S_t *space, hsize_t *off); static int H5S_all_unlim_dim(const H5S_t *space); @@ -468,9 +467,8 @@ H5S_all_is_valid (const H5S_t H5_ATTR_UNUSED *space) Determine the number of bytes needed to store the serialized "all" selection information. USAGE - hssize_t H5S_all_serial_size(f, space) - H5F_t *f IN: File pointer - H5S_t *space; IN: Dataspace pointer to query + hssize_t H5S_all_serial_size(space) + H5S_t *space; IN: Dataspace pointer to query RETURNS The number of bytes required on success, negative on an error. DESCRIPTION @@ -482,8 +480,7 @@ H5S_all_is_valid (const H5S_t H5_ATTR_UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ static hssize_t -H5S_all_serial_size(const H5F_t H5_ATTR_UNUSED *f, - const H5S_t H5_ATTR_UNUSED *space) +H5S_all_serial_size (const H5S_t H5_ATTR_UNUSED *space) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -503,8 +500,7 @@ H5S_all_serial_size(const H5F_t H5_ATTR_UNUSED *f, PURPOSE Serialize the current selection into a user-provided buffer. USAGE - herr_t H5S_all_serialize(f, space, p) - H5F_t *f IN: File pointer + herr_t H5S_all_serialize(space, p) const H5S_t *space; IN: Dataspace with selection to serialize uint8_t **p; OUT: Pointer to buffer to put serialized selection. Will be advanced to end of @@ -520,8 +516,7 @@ H5S_all_serial_size(const H5F_t H5_ATTR_UNUSED *f, REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_all_serialize(const H5F_t H5_ATTR_UNUSED *f, const H5S_t *space, - uint8_t **p) +H5S_all_serialize (const H5S_t *space, uint8_t **p) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -546,7 +541,6 @@ H5S_all_serialize(const H5F_t H5_ATTR_UNUSED *f, const H5S_t *space, Deserialize the current selection from a user-provided buffer. USAGE herr_t H5S_all_deserialize(space, p) - H5F_t *f IN: File pointer H5S_t *space; IN/OUT: Dataspace pointer to place selection into uint32_t version IN: Selection version @@ -565,8 +559,7 @@ H5S_all_serialize(const H5F_t H5_ATTR_UNUSED *f, const H5S_t *space, REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_all_deserialize(const H5F_t H5_ATTR_UNUSED *f, H5S_t *space, - uint32_t H5_ATTR_UNUSED version, uint8_t H5_ATTR_UNUSED flags, +H5S_all_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t H5_ATTR_UNUSED flags, const uint8_t H5_ATTR_UNUSED **p) { herr_t ret_value = SUCCEED; /* return value */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 88a3d21..9fa053b 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -57,11 +57,10 @@ static herr_t H5S_hyper_get_seq_list(const H5S_t *space, unsigned flags, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); static herr_t H5S_hyper_release(H5S_t *space); static htri_t H5S_hyper_is_valid(const H5S_t *space); -static hssize_t H5S_hyper_serial_size(const H5F_t *f, const H5S_t *space); -static herr_t H5S_hyper_serialize(const H5F_t *f, const H5S_t *space, - uint8_t **p); -static herr_t H5S_hyper_deserialize(const H5F_t *f, H5S_t *space, - uint32_t version, uint8_t flags, const uint8_t **p); +static hssize_t H5S_hyper_serial_size(const H5S_t *space); +static herr_t H5S_hyper_serialize(const H5S_t *space, uint8_t **p); +static herr_t H5S_hyper_deserialize(H5S_t *space, uint32_t version, uint8_t flags, + const uint8_t **p); static herr_t H5S_hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_hyper_offset(const H5S_t *space, hsize_t *offset); static int H5S_hyper_unlim_dim(const H5S_t *space); @@ -1954,9 +1953,8 @@ done: Determine the number of bytes needed to store the serialized hyperslab selection information. USAGE - hssize_t H5S_hyper_serial_size(f, space) - H5F_t *f IN: File pointer - H5S_t *space; IN: Dataspace pointer to query + hssize_t H5S_hyper_serial_size(space) + H5S_t *space; IN: Dataspace pointer to query RETURNS The number of bytes required on success, negative on an error. DESCRIPTION @@ -1968,7 +1966,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ static hssize_t -H5S_hyper_serial_size(const H5F_t *f, const H5S_t *space) +H5S_hyper_serial_size(const H5S_t *space) { unsigned u; /* Counter */ hsize_t block_count; /* block counter for regular hyperslabs */ @@ -1985,11 +1983,11 @@ H5S_hyper_serial_size(const H5F_t *f, const H5S_t *space) /* Size required is always: * + + + * + + - * (4 * * ) = - * 17 + (4 * sizeof_size) bytes + * (4 (start/stride/count/block) * * ) = + * 17 + (4 * rank * 8) bytes */ ret_value = (hssize_t)17 + ((hssize_t)4 * (hssize_t)space->extent.rank - * (hssize_t)H5F_SIZEOF_SIZE(f)); + * (hssize_t)8); else { /* Version 1 */ /* Basic number of bytes required to serialize hyperslab selection: @@ -2104,7 +2102,6 @@ done: Serialize the current selection into a user-provided buffer. USAGE herr_t H5S_hyper_serialize(space, p) - H5F_t *f IN: File pointer const H5S_t *space; IN: Dataspace with selection to serialize uint8_t **p; OUT: Pointer to buffer to put serialized selection. Will be advanced to end of @@ -2120,7 +2117,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_hyper_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p) +H5S_hyper_serialize (const H5S_t *space, uint8_t **p) { const H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */ hsize_t tmp_count[H5O_LAYOUT_NDIMS]; /* Temporary hyperslab counts */ @@ -2172,10 +2169,10 @@ H5S_hyper_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p) /* Iterate over dimensions */ for(i = 0; i < space->extent.rank; i++) { /* Encode start/stride/block/count */ - H5F_size_encode(f, p, space->select.sel_info.hslab->opt_diminfo[i].start); - H5F_size_encode(f, p, space->select.sel_info.hslab->opt_diminfo[i].stride); - H5F_size_encode(f, p, space->select.sel_info.hslab->opt_diminfo[i].count); - H5F_size_encode(f, p, space->select.sel_info.hslab->opt_diminfo[i].block); + UINT64ENCODE(*p, space->select.sel_info.hslab->opt_diminfo[i].start); + UINT64ENCODE(*p, space->select.sel_info.hslab->opt_diminfo[i].stride); + UINT64ENCODE(*p, space->select.sel_info.hslab->opt_diminfo[i].count); + UINT64ENCODE(*p, space->select.sel_info.hslab->opt_diminfo[i].block); } /* end for */ } /* end if */ /* Check for a "regular" hyperslab selection */ @@ -2296,7 +2293,6 @@ H5S_hyper_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p) Deserialize the current selection from a user-provided buffer. USAGE herr_t H5S_hyper_deserialize(space, p) - H5F_t *f IN: File pointer H5S_t *space; IN/OUT: Dataspace pointer to place selection into uint32_t version IN: Selection version @@ -2315,8 +2311,8 @@ H5S_hyper_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_hyper_deserialize(const H5F_t *f, H5S_t *space, - uint32_t H5_ATTR_UNUSED version, uint8_t flags, const uint8_t **p) +H5S_hyper_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t flags, + const uint8_t **p) { unsigned rank; /* rank of points */ size_t num_elem=0; /* number of elements in selection */ @@ -2352,10 +2348,10 @@ H5S_hyper_deserialize(const H5F_t *f, H5S_t *space, /* Iterate over dimensions */ for(i = 0; i < space->extent.rank; i++) { /* Decode start/stride/block/count */ - H5F_size_decode(f, p, &start[i]); - H5F_size_decode(f, p, &stride[i]); - H5F_size_decode(f, p, &count[i]); - H5F_size_decode(f, p, &block[i]); + UINT64DECODE(*p, start[i]); + UINT64DECODE(*p, stride[i]); + UINT64DECODE(*p, count[i]); + UINT64DECODE(*p, block[i]); } /* end for */ /* Select the hyperslab to the current selection */ diff --git a/src/H5Snone.c b/src/H5Snone.c index 23433a1..74a9b82 100644 --- a/src/H5Snone.c +++ b/src/H5Snone.c @@ -39,11 +39,10 @@ static herr_t H5S_none_get_seq_list(const H5S_t *space, unsigned flags, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); static herr_t H5S_none_release(H5S_t *space); static htri_t H5S_none_is_valid(const H5S_t *space); -static hssize_t H5S_none_serial_size(const H5F_t *f, const H5S_t *space); -static herr_t H5S_none_serialize(const H5F_t *f, const H5S_t *space, - uint8_t **p); -static herr_t H5S_none_deserialize(const H5F_t *f, H5S_t *space, - uint32_t version, uint8_t flags, const uint8_t **p); +static hssize_t H5S_none_serial_size(const H5S_t *space); +static herr_t H5S_none_serialize(const H5S_t *space, uint8_t **p); +static herr_t H5S_none_deserialize(H5S_t *space, uint32_t version, uint8_t flags, + const uint8_t **p); static herr_t H5S_none_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_none_offset(const H5S_t *space, hsize_t *off); static int H5S_none_unlim_dim(const H5S_t *space); @@ -436,9 +435,8 @@ H5S_none_is_valid(const H5S_t H5_ATTR_UNUSED *space) Determine the number of bytes needed to store the serialized "none" selection information. USAGE - hssize_t H5S_none_serial_size(f, space) - H5F_t *f IN: File pointer - H5S_t *space; IN: Dataspace pointer to query + hssize_t H5S_none_serial_size(space) + H5S_t *space; IN: Dataspace pointer to query RETURNS The number of bytes required on success, negative on an error. DESCRIPTION @@ -450,8 +448,7 @@ H5S_none_is_valid(const H5S_t H5_ATTR_UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ static hssize_t -H5S_none_serial_size(const H5F_t H5_ATTR_UNUSED *f, - const H5S_t H5_ATTR_UNUSED *space) +H5S_none_serial_size(const H5S_t H5_ATTR_UNUSED *space) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -471,8 +468,7 @@ H5S_none_serial_size(const H5F_t H5_ATTR_UNUSED *f, PURPOSE Serialize the current selection into a user-provided buffer. USAGE - herr_t H5S_none_serialize(f, space, p) - H5F_t *f IN: File pointer + herr_t H5S_none_serialize(space, p) const H5S_t *space; IN: Dataspace with selection to serialize uint8_t **p; OUT: Pointer to buffer to put serialized selection. Will be advanced to end of @@ -488,7 +484,7 @@ H5S_none_serial_size(const H5F_t H5_ATTR_UNUSED *f, REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_none_serialize(const H5F_t H5_ATTR_UNUSED *f, const H5S_t *space, uint8_t **p) +H5S_none_serialize(const H5S_t *space, uint8_t **p) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -510,8 +506,7 @@ H5S_none_serialize(const H5F_t H5_ATTR_UNUSED *f, const H5S_t *space, uint8_t ** PURPOSE Deserialize the current selection from a user-provided buffer. USAGE - herr_t H5S_none_deserialize(f, space, version, flags, p) - H5F_t *f IN: File pointer + herr_t H5S_none_deserialize(space, version, flags, p) H5S_t *space; IN/OUT: Dataspace pointer to place selection into uint32_t version IN: Selection version @@ -530,8 +525,7 @@ H5S_none_serialize(const H5F_t H5_ATTR_UNUSED *f, const H5S_t *space, uint8_t ** REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_none_deserialize(const H5F_t H5_ATTR_UNUSED *f, H5S_t *space, - uint32_t H5_ATTR_UNUSED version, uint8_t H5_ATTR_UNUSED flags, +H5S_none_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t H5_ATTR_UNUSED flags, const uint8_t H5_ATTR_UNUSED **p) { herr_t ret_value = SUCCEED; /* return value */ diff --git a/src/H5Spkg.h b/src/H5Spkg.h index f719201..b4210c2 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -141,13 +141,12 @@ typedef herr_t (*H5S_sel_release_func_t)(H5S_t *space); /* Method to determine if current selection is valid for dataspace */ typedef htri_t (*H5S_sel_is_valid_func_t)(const H5S_t *space); /* Method to determine number of bytes required to store current selection */ -typedef hssize_t (*H5S_sel_serial_size_func_t)(const H5F_t *f, const H5S_t *space); +typedef hssize_t (*H5S_sel_serial_size_func_t)(const H5S_t *space); /* Method to store current selection in "serialized" form (a byte sequence suitable for storing on disk) */ -typedef herr_t (*H5S_sel_serialize_func_t)(const H5F_t *f, const H5S_t *space, - uint8_t **p); +typedef herr_t (*H5S_sel_serialize_func_t)(const H5S_t *space, uint8_t **p); /* Method to create selection from "serialized" form (a byte sequence suitable for storing on disk) */ -typedef herr_t (*H5S_sel_deserialize_func_t)(const H5F_t *f, H5S_t *space, - uint32_t version, uint8_t flags, const uint8_t **p); +typedef herr_t (*H5S_sel_deserialize_func_t)(H5S_t *space, uint32_t version, uint8_t flags, + const uint8_t **p); /* Method to determine smallest n-D bounding box containing the current selection */ typedef herr_t (*H5S_sel_bounds_func_t)(const H5S_t *space, hsize_t *start, hsize_t *end); /* Method to determine linear offset of initial element in selection within dataspace */ diff --git a/src/H5Spoint.c b/src/H5Spoint.c index d10b600..202da85 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -40,11 +40,10 @@ static herr_t H5S_point_get_seq_list(const H5S_t *space, unsigned flags, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); static herr_t H5S_point_release(H5S_t *space); static htri_t H5S_point_is_valid(const H5S_t *space); -static hssize_t H5S_point_serial_size(const H5F_t *f, const H5S_t *space); -static herr_t H5S_point_serialize(const H5F_t *f, const H5S_t *space, - uint8_t **p); -static herr_t H5S_point_deserialize(const H5F_t *f, H5S_t *space, - uint32_t version, uint8_t flags, const uint8_t **p); +static hssize_t H5S_point_serial_size(const H5S_t *space); +static herr_t H5S_point_serialize(const H5S_t *space, uint8_t **p); +static herr_t H5S_point_deserialize(H5S_t *space, uint32_t version, uint8_t flags, + const uint8_t **p); static herr_t H5S_point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_point_offset(const H5S_t *space, hsize_t *off); static int H5S_point_unlim_dim(const H5S_t *space); @@ -764,8 +763,7 @@ done: information. USAGE hssize_t H5S_point_serial_size(space) - H5F_t *f IN: File pointer - H5S_t *space; IN: Dataspace pointer to query + H5S_t *space; IN: Dataspace pointer to query RETURNS The number of bytes required on success, negative on an error. DESCRIPTION @@ -777,7 +775,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ static hssize_t -H5S_point_serial_size(const H5F_t H5_ATTR_UNUSED *f, const H5S_t *space) +H5S_point_serial_size (const H5S_t *space) { H5S_pnt_node_t *curr; /* Point information nodes */ hssize_t ret_value; /* return value */ @@ -811,7 +809,6 @@ H5S_point_serial_size(const H5F_t H5_ATTR_UNUSED *f, const H5S_t *space) Serialize the current selection into a user-provided buffer. USAGE herr_t H5S_point_serialize(space, p) - H5F_t *f IN: File pointer const H5S_t *space; IN: Dataspace with selection to serialize uint8_t **p; OUT: Pointer to buffer to put serialized selection. Will be advanced to end of @@ -827,8 +824,7 @@ H5S_point_serial_size(const H5F_t H5_ATTR_UNUSED *f, const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_point_serialize(const H5F_t H5_ATTR_UNUSED *f, const H5S_t *space, - uint8_t **p) +H5S_point_serialize (const H5S_t *space, uint8_t **p) { H5S_pnt_node_t *curr; /* Point information nodes */ uint8_t *lenp; /* pointer to length location for later storage */ @@ -881,7 +877,6 @@ H5S_point_serialize(const H5F_t H5_ATTR_UNUSED *f, const H5S_t *space, Deserialize the current selection from a user-provided buffer. USAGE herr_t H5S_point_deserialize(space, p) - H5F_t *f IN: File pointer H5S_t *space; IN/OUT: Dataspace pointer to place selection into uint32_t version IN: Selection version @@ -900,8 +895,7 @@ H5S_point_serialize(const H5F_t H5_ATTR_UNUSED *f, const H5S_t *space, REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_point_deserialize(const H5F_t H5_ATTR_UNUSED *f, H5S_t *space, - uint32_t H5_ATTR_UNUSED version, uint8_t H5_ATTR_UNUSED flags, +H5S_point_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t H5_ATTR_UNUSED flags, const uint8_t **p) { H5S_seloper_t op=H5S_SELECT_SET; /* Selection operation */ diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 8918a4f..e6816e2 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -125,8 +125,8 @@ typedef struct H5S_sel_iter_t { #define H5S_SELECT_GET_SEQ_LIST(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN) ((*(S)->select.type->get_seq_list)(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN)) #define H5S_SELECT_VALID(S) ((*(S)->select.type->is_valid)(S)) #define H5S_SELECT_RELEASE(S) ((*(S)->select.type->release)(S)) -#define H5S_SELECT_SERIAL_SIZE(F,S) ((*(S)->select.type->serial_size)(F,S)) -#define H5S_SELECT_SERIALIZE(F,S,BUF) ((*(S)->select.type->serialize)(F,S,BUF)) +#define H5S_SELECT_SERIAL_SIZE(S) ((*(S)->select.type->serial_size)(S)) +#define H5S_SELECT_SERIALIZE(S,BUF) ((*(S)->select.type->serialize)(S,BUF)) #define H5S_SELECT_BOUNDS(S,START,END) ((*(S)->select.type->bounds)(S,START,END)) #define H5S_SELECT_OFFSET(S, OFFSET) ((*(S)->select.type->offset)(S, OFFSET)) #define H5S_SELECT_IS_CONTIGUOUS(S) ((*(S)->select.type->is_contiguous)(S)) @@ -151,8 +151,8 @@ typedef struct H5S_sel_iter_t { #define H5S_SELECT_GET_SEQ_LIST(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN) (H5S_select_get_seq_list(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN)) #define H5S_SELECT_VALID(S) (H5S_select_valid(S)) #define H5S_SELECT_RELEASE(S) (H5S_select_release(S)) -#define H5S_SELECT_SERIAL_SIZE(F,S) (H5S_select_serial_size(F,S)) -#define H5S_SELECT_SERIALIZE(F,S,BUF) (H5S_select_serialize(F,S,BUF)) +#define H5S_SELECT_SERIAL_SIZE(S) (H5S_select_serial_size(S)) +#define H5S_SELECT_SERIALIZE(S,BUF) (H5S_select_serialize(S,BUF)) #define H5S_SELECT_BOUNDS(S,START,END) (H5S_get_select_bounds(S,START,END)) #define H5S_SELECT_OFFSET(S, OFFSET) (H5S_get_select_offset(S, OFFSET)) #define H5S_SELECT_IS_CONTIGUOUS(S) (H5S_select_is_contiguous(S)) @@ -171,7 +171,7 @@ typedef struct H5S_sel_iter_t { #endif /* H5S_PACKAGE */ /* Handle these two callbacks in a special way, since they have prologs that need to be executed */ #define H5S_SELECT_COPY(DST,SRC,SHARE) (H5S_select_copy(DST,SRC,SHARE)) -#define H5S_SELECT_DESERIALIZE(F,S,BUF) (H5S_select_deserialize(F,S,BUF)) +#define H5S_SELECT_DESERIALIZE(S,BUF) (H5S_select_deserialize(S,BUF)) /* Operations on dataspaces */ @@ -211,8 +211,7 @@ H5_DLL htri_t H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2); H5_DLL herr_t H5S_extent_copy(H5S_t *dst, const H5S_t *src); /* Operations on selections */ -H5_DLL herr_t H5S_select_deserialize(const H5F_t *f, H5S_t **space, - const uint8_t **p); +H5_DLL herr_t H5S_select_deserialize(H5S_t **space, const uint8_t **p); H5_DLL H5S_sel_type H5S_get_select_type(const H5S_t *space); H5_DLL herr_t H5S_select_iterate(void *buf, hid_t type_id, const H5S_t *space, H5D_operator_t op, void *operator_data); @@ -235,9 +234,8 @@ H5_DLL herr_t H5S_select_release(H5S_t *ds); H5_DLL herr_t H5S_select_get_seq_list(const H5S_t *space, unsigned flags, H5S_sel_iter_t *iter, size_t maxseq, size_t maxbytes, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); -H5_DLL hssize_t H5S_select_serial_size(const H5F_t *f, const H5S_t *space); -H5_DLL herr_t H5S_select_serialize(const H5F_t *f, const H5S_t *space, - uint8_t **p); +H5_DLL hssize_t H5S_select_serial_size(const H5S_t *space); +H5_DLL herr_t H5S_select_serialize(const H5S_t *space, uint8_t **p); H5_DLL htri_t H5S_select_is_contiguous(const H5S_t *space); H5_DLL htri_t H5S_select_is_single(const H5S_t *space); H5_DLL htri_t H5S_select_is_regular(const H5S_t *space); diff --git a/src/H5Sselect.c b/src/H5Sselect.c index e965dba..3a1c6c9 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -63,9 +63,7 @@ static herr_t H5S_select_iter_next_block(H5S_sel_iter_t *iter); herr_t H5S_select_offset(H5S_t *space, const hssize_t *offset) { - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Check args */ HDassert(space); @@ -78,8 +76,7 @@ H5S_select_offset(H5S_t *space, const hssize_t *offset) /* Indicate that the offset was changed */ space->select.offset_changed = TRUE; -done: - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI(SUCCEED) } /* H5S_select_offset() */ @@ -221,7 +218,7 @@ H5S_select_get_seq_list(const H5S_t *space, unsigned flags, *------------------------------------------------------------------------- */ hssize_t -H5S_select_serial_size(const H5F_t *f, const H5S_t *space) +H5S_select_serial_size(const H5S_t *space) { hssize_t ret_value; /* Return value */ @@ -230,7 +227,7 @@ H5S_select_serial_size(const H5F_t *f, const H5S_t *space) HDassert(space); /* Call the selection type's serial_size function */ - ret_value=(*space->select.type->serial_size)(f, space); + ret_value=(*space->select.type->serial_size)(space); FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_select_serial_size() */ @@ -261,7 +258,7 @@ H5S_select_serial_size(const H5F_t *f, const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_select_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p) +H5S_select_serialize(const H5S_t *space, uint8_t **p) { herr_t ret_value=SUCCEED; /* Return value */ @@ -271,7 +268,7 @@ H5S_select_serialize(const H5F_t *f, const H5S_t *space, uint8_t **p) HDassert(p); /* Call the selection type's serialize function */ - ret_value = (*space->select.type->serialize)(f, space, p); + ret_value=(*space->select.type->serialize)(space,p); FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_select_serialize() */ @@ -453,7 +450,7 @@ H5S_select_valid(const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_select_deserialize(const H5F_t *f, H5S_t **space, const uint8_t **p) +H5S_select_deserialize(H5S_t **space, const uint8_t **p) { H5S_t *tmp_space; /* Pointer to actual dataspace to use, either *space or a newly allocated one */ @@ -519,19 +516,19 @@ H5S_select_deserialize(const H5F_t *f, H5S_t **space, const uint8_t **p) /* Make routine for selection type */ switch(sel_type) { case H5S_SEL_POINTS: /* Sequence of points selected */ - ret_value = (*H5S_sel_point->deserialize)(f, tmp_space, version, flags, p); + ret_value = (*H5S_sel_point->deserialize)(tmp_space, version, flags, p); break; case H5S_SEL_HYPERSLABS: /* Hyperslab selection defined */ - ret_value = (*H5S_sel_hyper->deserialize)(f, tmp_space, version, flags, p); + ret_value = (*H5S_sel_hyper->deserialize)(tmp_space, version, flags, p); break; case H5S_SEL_ALL: /* Entire extent selected */ - ret_value = (*H5S_sel_all->deserialize)(f, tmp_space, version, flags, p); + ret_value = (*H5S_sel_all->deserialize)(tmp_space, version, flags, p); break; case H5S_SEL_NONE: /* Nothing selected */ - ret_value = (*H5S_sel_none->deserialize)(f, tmp_space, version, flags, p); + ret_value = (*H5S_sel_none->deserialize)(tmp_space, version, flags, p); break; default: diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index 592645d..f291958 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1759,6 +1759,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name) size_t cd_nelmts; /* filter client number of values */ size_t cd_num; /* filter client data counter */ char f_name[256]; /* filter/file name */ + char dset_name[256]; /* filter/file name */ char s[64]; /* temporary string buffer */ off_t f_offset; /* offset in external file */ hsize_t f_size; /* bytes used in external file */ diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index d9418a6..2afe3e4 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2997,6 +2997,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, off_t offset; /* offset of external file */ char f_name[256]; /* filter name */ char name[256]; /* external or virtual file name */ + char dsetname[256]; /* virtual datset name */ hsize_t chsize[64]; /* chunk size in elements */ hsize_t size; /* size of external file */ hsize_t storage_size; -- cgit v0.12 From c839ed338399301b3f861bde5fc8eecb9434462a Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 1 Sep 2015 08:03:33 -0500 Subject: [svn-r27646] Add version number to VDS global heap object encoding. Fix handling of layout version number. Other minor fixes/cleanup. NOTE: This commit changes the file format for VDS, all files must be re-generated. Tested: ummon --- src/H5Dvirtual.c | 2 +- src/H5Olayout.c | 25 +++++++++++++++++++++---- src/H5Pdapl.c | 12 +++++------- test/vds.c | 12 +++++++----- tools/testfiles/vds/1_a.h5 | Bin 4856 -> 4856 bytes tools/testfiles/vds/1_b.h5 | Bin 4611 -> 4611 bytes tools/testfiles/vds/1_c.h5 | Bin 4856 -> 4856 bytes tools/testfiles/vds/1_d.h5 | Bin 4611 -> 4611 bytes tools/testfiles/vds/1_e.h5 | Bin 4856 -> 4856 bytes tools/testfiles/vds/1_f.h5 | Bin 4611 -> 4611 bytes tools/testfiles/vds/1_vds.h5 | Bin 5496 -> 5496 bytes tools/testfiles/vds/2_a.h5 | Bin 4576 -> 4576 bytes tools/testfiles/vds/2_b.h5 | Bin 4578 -> 4578 bytes tools/testfiles/vds/2_c.h5 | Bin 4576 -> 4576 bytes tools/testfiles/vds/2_d.h5 | Bin 4578 -> 4578 bytes tools/testfiles/vds/2_e.h5 | Bin 4578 -> 4578 bytes tools/testfiles/vds/2_vds.h5 | Bin 5496 -> 5496 bytes tools/testfiles/vds/3_1_vds.h5 | Bin 5496 -> 5496 bytes tools/testfiles/vds/3_2_vds.h5 | Bin 5496 -> 5496 bytes tools/testfiles/vds/4_0.h5 | Bin 4581 -> 4581 bytes tools/testfiles/vds/4_1.h5 | Bin 4581 -> 4581 bytes tools/testfiles/vds/4_2.h5 | Bin 4581 -> 4581 bytes tools/testfiles/vds/4_vds.h5 | Bin 5496 -> 5496 bytes tools/testfiles/vds/5_a.h5 | Bin 4581 -> 4581 bytes tools/testfiles/vds/5_b.h5 | Bin 4581 -> 4581 bytes tools/testfiles/vds/5_c.h5 | Bin 4581 -> 4581 bytes tools/testfiles/vds/5_vds.h5 | Bin 5496 -> 5496 bytes 27 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 10e53c9..a611321 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -808,7 +808,7 @@ done: /*------------------------------------------------------------------------- * Function: H5D__virtual_reset_source_dset * - * Purpose: Frees space reference by a source dataset struct. + * Purpose: Frees space referenced by a source dataset struct. * * Return: Non-negative on success/Negative on failure * diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 130bf67..81ef061 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -34,6 +34,9 @@ /* Local macros */ +/* Version # of encoded virtual dataset global heap blocks */ +#define H5O_LAYOUT_VDS_GH_ENC_VERS 0 + /* PRIVATE PROTOTYPES */ static void *H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, @@ -115,7 +118,7 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED * HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") mesg->version = *p++; - if(mesg->version < H5O_LAYOUT_VERSION_1 || mesg->version > H5O_LAYOUT_VERSION_3) + if(mesg->version < H5O_LAYOUT_VERSION_1 || mesg->version > H5O_LAYOUT_VERSION_4) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for layout message") if(mesg->version < H5O_LAYOUT_VERSION_3) { @@ -243,6 +246,10 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED * break; case H5D_VIRTUAL: + /* Check version */ + if(mesg->version < H5O_LAYOUT_VERSION_4) + HGOTO_ERROR(H5E_OHDR, H5E_VERSION, NULL, "invalid layout version with virtual layout") + /* Heap information */ H5F_addr_decode(f, &p, &(mesg->storage.u.virt.serial_list_hobjid.addr)); UINT32DECODE(p, mesg->storage.u.virt.serial_list_hobjid.idx); @@ -260,6 +267,7 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED * /* Decode heap block if it exists */ if(mesg->storage.u.virt.serial_list_hobjid.addr != HADDR_UNDEF) { const uint8_t *heap_block_p; + uint8_t heap_vers; size_t block_size = 0; size_t tmp_size; hsize_t tmp_hsize; @@ -273,6 +281,11 @@ H5O_layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED * heap_block_p = (const uint8_t *)heap_block; + /* Decode the version number of the heap block encoding */ + heap_vers = (uint8_t)*heap_block_p++; + if((uint8_t)H5O_LAYOUT_VDS_GH_ENC_VERS != heap_vers) + HGOTO_ERROR(H5E_OHDR, H5E_VERSION, NULL, "bad version # of encoded VDS heap information, expected %u, got %u", (unsigned)H5O_LAYOUT_VDS_GH_ENC_VERS, (unsigned)heap_vers) + /* Number of entries */ H5F_DECODE_LENGTH(f, heap_block_p, tmp_hsize) @@ -445,7 +458,8 @@ H5O_layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c HDassert(p); /* Message version */ - *p++ = (uint8_t)H5O_LAYOUT_VERSION_3; + *p++ = mesg->type == H5D_VIRTUAL ? (uint8_t)H5O_LAYOUT_VERSION_4 + : (uint8_t)H5O_LAYOUT_VERSION_3; /* Layout class */ *p++ = mesg->type; @@ -505,8 +519,8 @@ H5O_layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c /* * Calculate heap block size */ - /* Number of entries */ - block_size = H5F_SIZEOF_SIZE(f); + /* Version and number of entries */ + block_size = (size_t)1 + H5F_SIZEOF_SIZE(f); /* Calculate size of each entry */ for(i = 0; i < mesg->storage.u.virt.list_nused; i++) { @@ -546,6 +560,9 @@ H5O_layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c */ heap_block_p = heap_block; + /* Encode heap block encoding version */ + *heap_block_p++ = (uint8_t)H5O_LAYOUT_VDS_GH_ENC_VERS; + /* Number of entries */ tmp_hsize = (hsize_t)mesg->storage.u.virt.list_nused; H5F_ENCODE_LENGTH(f, heap_block_p, tmp_hsize) diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index 94ae0b4..c8df45b 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -368,9 +368,7 @@ done: * H5Pset_virtual_view call. The possible values of view are * H5D_VDS_FIRST_MISSING or H5D_VDS_LAST_AVAIALBLE. * - * Return: Success: H5D_VDS_FIRST_MISSING or - * H5D_VDS_LAST_AVAILABLE - * Failure: H5D_VDS_ERROR + * Return: Non-negative on success/Negative on failure * * Programmer: Neil Fortner * May 4, 2015 @@ -388,12 +386,12 @@ H5Pget_virtual_view(hid_t plist_id, H5D_vds_view_t *view) /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5D_VDS_ERROR, "can't find object for ID") + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get value from property list */ if(view) if(H5P_get(plist, H5D_ACS_VDS_VIEW_NAME, view) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5D_VDS_ERROR, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") done: FUNC_LEAVE_API(ret_value) @@ -551,12 +549,12 @@ H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size) /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5D_VDS_ERROR, "can't find object for ID") + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get value from property list */ if(gap_size) if(H5P_get(plist, H5D_ACS_VDS_PRINTF_GAP_NAME, gap_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5D_VDS_ERROR, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") done: FUNC_LEAVE_API(ret_value) diff --git a/test/vds.c b/test/vds.c index 5cdcef4..3e1bc18 100644 --- a/test/vds.c +++ b/test/vds.c @@ -386,8 +386,10 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, if(oinfo.meta_size.obj.index_size != (hsize_t)0) TEST_ERROR if(config == TEST_API_REOPEN_FILE) { - if(oinfo.meta_size.obj.heap_size != exp_meta_size) { printf("%llu\n", (long long unsigned)oinfo.meta_size.obj.heap_size); - TEST_ERROR } + if(oinfo.meta_size.obj.heap_size != exp_meta_size) { + printf("VDS metadata size: %llu Expected: %llu\n", (long long unsigned)oinfo.meta_size.obj.heap_size, (long long unsigned)exp_meta_size); + TEST_ERROR + } /* end if */ } /* end if */ else if((oinfo.meta_size.obj.heap_size != exp_meta_size) @@ -550,7 +552,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)68) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)69) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -621,7 +623,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)212) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)213) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -1028,7 +1030,7 @@ test_api(test_api_config_t config, hid_t fapl) } /* end if */ /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)696) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)697) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ diff --git a/tools/testfiles/vds/1_a.h5 b/tools/testfiles/vds/1_a.h5 index 533728f..953d33d 100644 Binary files a/tools/testfiles/vds/1_a.h5 and b/tools/testfiles/vds/1_a.h5 differ diff --git a/tools/testfiles/vds/1_b.h5 b/tools/testfiles/vds/1_b.h5 index 4195588..6ba95e6 100644 Binary files a/tools/testfiles/vds/1_b.h5 and b/tools/testfiles/vds/1_b.h5 differ diff --git a/tools/testfiles/vds/1_c.h5 b/tools/testfiles/vds/1_c.h5 index cc6c2c7..4bcebbd 100644 Binary files a/tools/testfiles/vds/1_c.h5 and b/tools/testfiles/vds/1_c.h5 differ diff --git a/tools/testfiles/vds/1_d.h5 b/tools/testfiles/vds/1_d.h5 index 20bea0b..9c2d795 100644 Binary files a/tools/testfiles/vds/1_d.h5 and b/tools/testfiles/vds/1_d.h5 differ diff --git a/tools/testfiles/vds/1_e.h5 b/tools/testfiles/vds/1_e.h5 index 43e9cea..4f7aa7b 100644 Binary files a/tools/testfiles/vds/1_e.h5 and b/tools/testfiles/vds/1_e.h5 differ diff --git a/tools/testfiles/vds/1_f.h5 b/tools/testfiles/vds/1_f.h5 index c49843e..62e86bc 100644 Binary files a/tools/testfiles/vds/1_f.h5 and b/tools/testfiles/vds/1_f.h5 differ diff --git a/tools/testfiles/vds/1_vds.h5 b/tools/testfiles/vds/1_vds.h5 index 59c76ea..707a37f 100644 Binary files a/tools/testfiles/vds/1_vds.h5 and b/tools/testfiles/vds/1_vds.h5 differ diff --git a/tools/testfiles/vds/2_a.h5 b/tools/testfiles/vds/2_a.h5 index bba7854..5227e9e 100644 Binary files a/tools/testfiles/vds/2_a.h5 and b/tools/testfiles/vds/2_a.h5 differ diff --git a/tools/testfiles/vds/2_b.h5 b/tools/testfiles/vds/2_b.h5 index a30ff72..34723a3 100644 Binary files a/tools/testfiles/vds/2_b.h5 and b/tools/testfiles/vds/2_b.h5 differ diff --git a/tools/testfiles/vds/2_c.h5 b/tools/testfiles/vds/2_c.h5 index bec8e65..d2252fc 100644 Binary files a/tools/testfiles/vds/2_c.h5 and b/tools/testfiles/vds/2_c.h5 differ diff --git a/tools/testfiles/vds/2_d.h5 b/tools/testfiles/vds/2_d.h5 index 605ff85..6880c2e 100644 Binary files a/tools/testfiles/vds/2_d.h5 and b/tools/testfiles/vds/2_d.h5 differ diff --git a/tools/testfiles/vds/2_e.h5 b/tools/testfiles/vds/2_e.h5 index a033de1..81ffacc 100644 Binary files a/tools/testfiles/vds/2_e.h5 and b/tools/testfiles/vds/2_e.h5 differ diff --git a/tools/testfiles/vds/2_vds.h5 b/tools/testfiles/vds/2_vds.h5 index 85f075a..cbef59c 100644 Binary files a/tools/testfiles/vds/2_vds.h5 and b/tools/testfiles/vds/2_vds.h5 differ diff --git a/tools/testfiles/vds/3_1_vds.h5 b/tools/testfiles/vds/3_1_vds.h5 index 9661907..e66e4c7 100644 Binary files a/tools/testfiles/vds/3_1_vds.h5 and b/tools/testfiles/vds/3_1_vds.h5 differ diff --git a/tools/testfiles/vds/3_2_vds.h5 b/tools/testfiles/vds/3_2_vds.h5 index c39fee4..a19dab5 100644 Binary files a/tools/testfiles/vds/3_2_vds.h5 and b/tools/testfiles/vds/3_2_vds.h5 differ diff --git a/tools/testfiles/vds/4_0.h5 b/tools/testfiles/vds/4_0.h5 index 3f5b594..5e71d20 100644 Binary files a/tools/testfiles/vds/4_0.h5 and b/tools/testfiles/vds/4_0.h5 differ diff --git a/tools/testfiles/vds/4_1.h5 b/tools/testfiles/vds/4_1.h5 index 0b91398..edad46e 100644 Binary files a/tools/testfiles/vds/4_1.h5 and b/tools/testfiles/vds/4_1.h5 differ diff --git a/tools/testfiles/vds/4_2.h5 b/tools/testfiles/vds/4_2.h5 index 0ea8f8e..a82b012 100644 Binary files a/tools/testfiles/vds/4_2.h5 and b/tools/testfiles/vds/4_2.h5 differ diff --git a/tools/testfiles/vds/4_vds.h5 b/tools/testfiles/vds/4_vds.h5 index de3457a..64c2288 100644 Binary files a/tools/testfiles/vds/4_vds.h5 and b/tools/testfiles/vds/4_vds.h5 differ diff --git a/tools/testfiles/vds/5_a.h5 b/tools/testfiles/vds/5_a.h5 index 189e3b1..e8ea552 100644 Binary files a/tools/testfiles/vds/5_a.h5 and b/tools/testfiles/vds/5_a.h5 differ diff --git a/tools/testfiles/vds/5_b.h5 b/tools/testfiles/vds/5_b.h5 index 49b85ac..6da7cf5 100644 Binary files a/tools/testfiles/vds/5_b.h5 and b/tools/testfiles/vds/5_b.h5 differ diff --git a/tools/testfiles/vds/5_c.h5 b/tools/testfiles/vds/5_c.h5 index 5ea371e..3e3bc61 100644 Binary files a/tools/testfiles/vds/5_c.h5 and b/tools/testfiles/vds/5_c.h5 differ diff --git a/tools/testfiles/vds/5_vds.h5 b/tools/testfiles/vds/5_vds.h5 index bee4974..379485e 100644 Binary files a/tools/testfiles/vds/5_vds.h5 and b/tools/testfiles/vds/5_vds.h5 differ -- cgit v0.12 From dceb3f1818e6884f0af429aa44862c169933a8e9 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Thu, 3 Sep 2015 16:27:58 -0500 Subject: [svn-r27673] rm unnecessary/unreachable code from H5S_get_select_hyper_nblocks Tested: ummon --- src/H5Shyper.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 9fa053b..2215e7a 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -1882,13 +1882,6 @@ H5S_get_select_hyper_nblocks(H5S_t *space) HDassert(space); HDassert(space->select.sel_info.hslab->unlim_dim < 0); - /* Check for unlimited selection */ - if((space->select.sel_info.hslab->unlim_dim >= 0) - && space->select.sel_info.hslab->app_diminfo[space->select.sel_info.hslab->unlim_dim].count == H5S_UNLIMITED) { - HDassert(space->select.sel_info.hslab->diminfo_valid); - HGOTO_DONE(H5S_UNLIMITED) - } /* end if */ - /* Check for a "regular" hyperslab selection */ if(space->select.sel_info.hslab->diminfo_valid) { unsigned u; /* Local index variable */ -- cgit v0.12 From f3da95644105e1a70f7b5246128ff542585695e5 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 8 Sep 2015 15:41:38 -0500 Subject: [svn-r27701] RM offset initialization that is no longer necessary with the recent fix to H5Screate(). Tested: ummon --- src/H5Shyper.c | 4 ---- src/H5Sselect.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 2215e7a..70c9b67 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -10231,10 +10231,6 @@ H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index) if(H5S_extent_copy_real(&space_out->extent, &space->extent, TRUE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "unable to copy destination space extent") - /* Set offset to zeros */ - (void)HDmemset(space_out->select.offset, 0, (size_t)space_out->extent.rank * sizeof(space_out->select.offset[0])); - space_out->select.offset_changed = FALSE; - /* Select block as defined by start/stride/count/block computed above */ if(H5S_select_hyperslab(space_out, H5S_SELECT_SET, start, stride, count, block) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "can't select hyperslab") diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 3a1c6c9..6b0ca6e 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -2258,10 +2258,6 @@ H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, if(H5S_extent_copy_real(&new_space->extent, &dst_space->extent, TRUE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy destination space extent") - /* Set offset to zeros */ - (void)HDmemset(new_space->select.offset, 0, (size_t)new_space->extent.rank * sizeof(new_space->select.offset[0])); - new_space->select.offset_changed = FALSE; - /* If the intersecting space is "all", the intersection must be equal to the * source space and the projection must be equal to the destination space */ if(src_intersect_space->select.type->type == H5S_SEL_ALL) { -- cgit v0.12 From 68659dd411a8ca3b0b2ef86eaaa7d5ba5d5bc449 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Mon, 14 Sep 2015 10:03:58 -0500 Subject: [svn-r27769] Maintenance: Fixed example that failed daily tests. Tested on Mac Air, jam and ostrich. --- examples/h5_vds-exc.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/examples/h5_vds-exc.c b/examples/h5_vds-exc.c index 88d8f61..039cdb8 100644 --- a/examples/h5_vds-exc.c +++ b/examples/h5_vds-exc.c @@ -100,20 +100,25 @@ main (void) /* * Build the mappings for A, C and E source datasets. - * + * Unlimited hyperslab selection is the same in the source datasets. + * Unlimited hyperslab selections in the virtual dataset have different offsets. */ + status = H5Sselect_hyperslab (ksrc_space, H5S_SELECT_SET, start, NULL, count, block); for (i = 0; i < 3; i++) { start[1] = (hsize_t)((k+n)*i); status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block); status = H5Pset_virtual (dcpl, space, SRC_FILE[2*i], SRC_DATASET[2*i], ksrc_space); } - /* Reinitialize block[1] */ + /* Reinitialize start[1] and block[1] to build the second set of mappings. */ + start[1] = 0; block[1] = n; /* * Build the mappings for B, D and F source datasets. - * + * Unlimited hyperslab selection is the same in the source datasets. + * Unlimited hyperslab selections in the virtual dataset have different offsets. */ + status = H5Sselect_hyperslab (nsrc_space, H5S_SELECT_SET, start, NULL, count, block); for (i = 0; i < 3; i++) { start[1] = (hsize_t)(k+(k+n)*i); status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block); @@ -191,10 +196,16 @@ main (void) printf(" Source dataset name %s\n", dsetname); /* Get selection in the source dataset */ - printf(" Selection in the source dataset "); + printf(" Selection in the source dataset \n"); src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i); - if(H5Sget_select_type(src_space) == H5S_SEL_ALL) { - printf("H5S_ALL \n"); + if (H5Sget_select_type(src_space) == H5S_SEL_HYPERSLABS) { + if (H5Sis_regular_hyperslab(vspace)) { + status = H5Sget_regular_hyperslab (src_space, start_out, stride_out, count_out, block_out); + printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]); + printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]); + printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]); + printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]); + } } H5Sclose(vspace); H5Sclose(src_space); -- cgit v0.12 From 209df7c3b095da2b08eb77f5803a1e43207aa2db Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 21 Sep 2015 03:36:01 -0500 Subject: [svn-r27839] Removed generated autotools stragglers missed in trunk sync. --- MANIFEST | 1 - configure | 34504 ------------------------------------------- examples/Makefile.in | 1395 -- src/Makefile.in | 2014 --- test/Makefile.in | 2750 ---- tools/h5dump/Makefile.in | 1472 -- tools/h5ls/Makefile.in | 1414 -- tools/misc/Makefile.in | 1685 --- tools/misc/vds/Makefile.in | 1437 -- 9 files changed, 46672 deletions(-) delete mode 100755 configure delete mode 100644 examples/Makefile.in delete mode 100644 src/Makefile.in delete mode 100644 test/Makefile.in delete mode 100644 tools/h5dump/Makefile.in delete mode 100644 tools/h5ls/Makefile.in delete mode 100644 tools/misc/Makefile.in delete mode 100644 tools/misc/vds/Makefile.in diff --git a/MANIFEST b/MANIFEST index eef2b5a..030c3a6 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1277,7 +1277,6 @@ ./tools/misc/testfiles/h5mkgrp_version.txt.in ./tools/misc/h5perf_gentest.c ./tools/misc/vds/Makefile.am -./tools/misc/vds/Makefile.in ./tools/misc/vds/UC_1.h ./tools/misc/vds/UC_1_one_dim_gen.c ./tools/misc/vds/UC_2.h diff --git a/configure b/configure deleted file mode 100755 index f859269..0000000 --- a/configure +++ /dev/null @@ -1,34504 +0,0 @@ -#! /bin/sh -# From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.232. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and help@hdfgroup.org -$0: about your system, including any error possibly output -$0: before this message. Then install a modern shell, or -$0: manually run the script under such a shell if you do -$0: have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='HDF5' -PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.232' -PACKAGE_STRING='HDF5 1.9.232' -PACKAGE_BUGREPORT='help@hdfgroup.org' -PACKAGE_URL='' - -ac_unique_file="src/H5.c" -ac_default_prefix=`pwd`/hdf5 -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -HAVE_SHARED_CONDITIONAL_FALSE -HAVE_SHARED_CONDITIONAL_TRUE -SEARCH -BUILD_HDF5_HL_CONDITIONAL_FALSE -BUILD_HDF5_HL_CONDITIONAL_TRUE -BUILD_FORTRAN_CONDITIONAL_FALSE -BUILD_FORTRAN_CONDITIONAL_TRUE -BUILD_PARALLEL_CONDITIONAL_FALSE -BUILD_PARALLEL_CONDITIONAL_TRUE -BUILD_CXX_CONDITIONAL_FALSE -BUILD_CXX_CONDITIONAL_TRUE -STRICT_FORMAT_CHECKS -DEFAULT_API_VERSION -DEPRECATED_SYMBOLS -BUILD_ALL_CONDITIONAL_FALSE -BUILD_ALL_CONDITIONAL_TRUE -ROOT -CXX_VERSION -FC_VERSION -CC_VERSION -WORDS_BIGENDIAN -BYTESEX -CONFIG_MODE -CONFIG_USER -CONFIG_DATE -H5_VERSION -DIRECT_VFD_CONDITIONAL_FALSE -DIRECT_VFD_CONDITIONAL_TRUE -ADD_PARALLEL_FILES -USINGMEMCHECKER -CLEARFILEBUF -INSTRUMENT_LIBRARY -TRACE_API -DEBUG_PKG -HAVE_PTHREAD -BUILD_SHARED_SZIP_CONDITIONAL_FALSE -BUILD_SHARED_SZIP_CONDITIONAL_TRUE -LL_PATH -USE_FILTER_SZIP -USE_FILTER_DEFLATE -LT_STATIC_EXEC -USE_PLUGINS_CONDITIONAL_FALSE -USE_PLUGINS_CONDITIONAL_TRUE -LT_SYS_LIBRARY_PATH -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -ac_ct_AR -DLLTOOL -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -SED -LIBTOOL -FORTRAN_SHARED_CONDITIONAL_FALSE -FORTRAN_SHARED_CONDITIONAL_TRUE -H5_FORTRAN_SHARED -TESTPARALLEL -RUNPARALLEL -RUNSERIAL -PARALLEL -TIME -TR -AR -HL_FOR -HL -CXXCPP -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -ac_ct_CXX -CXXFLAGS -H5CONFIG_F_IKIND -H5CONFIG_F_NUM_IKIND -H5CONFIG_F_RKIND_SIZEOF -H5CONFIG_F_RKIND -H5CONFIG_F_NUM_RKIND -FORTRAN_SIZEOF_LONG_DOUBLE -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE -FORTRAN_HAVE_C_LONG_DOUBLE -HAVE_Fortran_INTEGER_SIZEOF_16 -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF -PAC_FORTRAN_NATIVE_DOUBLE_KIND -PAC_FORTRAN_NATIVE_REAL_SIZEOF -PAC_FORTRAN_NATIVE_REAL_KIND -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF -PAC_FORTRAN_NATIVE_INTEGER_KIND -PAC_FC_ALL_INTEGER_KINDS_SIZEOF -PAC_FC_ALL_REAL_KINDS_SIZEOF -PAC_FC_ALL_INTEGER_KINDS -PAC_FC_MAX_REAL_PRECISION -PAC_FC_ALL_REAL_KINDS -FCLIBS -F9XMODEXT -F9XMODFLAG -FSEARCH_DIRS -F9XSUFFIXFLAG -FCFLAGS_f90 -ac_ct_FC -FCFLAGS -OBJECT_NAMELEN_DEFAULT_F -SIZE_T -HID_T -HSSIZE_T -HSIZE_T -HADDR_T -R_INTEGER -R_LARGE -HDF5_INTERFACES -EGREP -GREP -CPP -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -LDFLAGS -CFLAGS -CC -Fortran_COMPILER_ID -PAC_C_MAX_REAL_PRECISION -UNAME_INFO -enable_static -enable_shared -STATIC_SHARED -THREADSAFE -DIRECT_VFD -HAVE_DMALLOC -CODESTACK -INSTRUMENT -HDF5_HL -CXX -HDF_CXX -FC -HDF_FORTRAN -STATIC_EXEC -MPE -EXTERNAL_FILTERS -AM_LDFLAGS -AM_CPPFLAGS -AM_CXXFLAGS -AM_FCFLAGS -AM_CFLAGS -H5_LDFLAGS -H5_CXXFLAGS -H5_FCFLAGS -H5_CPPFLAGS -H5_CFLAGS -CPPFLAGS -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_maintainer_mode -enable_dependency_tracking -enable_unsupported -enable_fortran -enable_cxx -enable_hl -enable_shared -enable_static -with_pic -enable_fast_install -with_aix_soname -with_gnu_ld -with_sysroot -enable_libtool_lock -enable_static_exec -enable_sharedlib_rpath -enable_production -with_fnord -with_dmalloc -with_zlib -with_szlib -enable_threadsafe -with_pthread -enable_debug -enable_codestack -enable_metadata_trace_file -enable_trace -enable_instrument -enable_clear_file_buffers -enable_using_memchecker -enable_parallel -with_mpe -enable_direct_vfd -with_default_plugindir -enable_dconv_exception -enable_dconv_accuracy -enable_build_all -enable_deprecated_symbols -with_default_api_version -enable_strict_format_checks -enable_embedded_libinfo -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -FC -FCFLAGS -CXX -CXXFLAGS -CCC -CXXCPP -LT_SYS_LIBRARY_PATH' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures HDF5 1.9.232 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/hdf5] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.232:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --disable-maintainer-mode - disable make rules and dependencies not useful (and - sometimes confusing) to the casual installer - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build - --enable-unsupported Allow unsupported combinations of configure options - --enable-fortran Compile the Fortran interface [default=no] - --enable-cxx Compile the C++ interface [default=no] - --enable-hl Enable the high level library [default=yes] - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-static-exec Install only statically linked executables - [default=no] - --disable-sharedlib-rpath - Disable use of the '=Wl,-rpath' linker option - --enable-production Determines how to run the compiler. - --enable-threadsafe Enable thread-safe capability. Not compatible with - the high-level library, Fortran, or C++ wrappers. - [default=no] - --enable-debug=all Turn on debugging in all packages. One may also - specify a comma-separated list of package names - without the leading H5 or the word no. The default - is most packages if production is disabled; no if it - is enabled. - --enable-codestack Enable the function stack tracing (for developer - debugging). - --enable-metadata-trace-file - Enable metadata trace file collection. - --enable-trace Enable API tracing capability. Default=no if debug - is disabled. - --enable-instrument Enable library instrumentation of optimization - tracing. Default=no if debug is disabled. - --enable-clear-file-buffers - Securely clear file buffers before writing to file. - Default=yes. - --enable-using-memchecker - Enable this option if a memory allocation and/or - bounds checking tool will be used on the HDF5 - library. Enabling this causes the library to be more - picky about it's memory operations and also disables - the library's free space manager code. Default=no. - --enable-parallel Search for MPI-IO and MPI support files - --enable-direct-vfd Build the direct I/O virtual file driver (VFD). This - is based on the POSIX (sec2) VFD and requires the - open() call to take the O_DIRECT flag. [default=no] - --enable-dconv-exception - if exception handling functions is checked during - data conversions [default=yes] - --enable-dconv-accuracy if data accuracy is guaranteed during data - conversions [default=yes] - --enable-build-all Build helper programs that only developers should - need [default=no] - --enable-deprecated-symbols - Enable deprecated public API symbols [default=yes] - --enable-strict-format-checks - Enable strict file format checks, default=yes if - debug flag is enabled, no otherwise - --enable-embedded-libinfo - Enable embedded library information [default=yes] - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] - --with-aix-soname=aix|svr4|both - shared library versioning (aka "SONAME") variant to - provide on AIX, [default=aix]. - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot[=DIR] Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). - - For the following --with-xxx options, you can specify where the header - files and libraries are in two different ways: - - --with-xxx=INC,LIB - Specify individually the include directory and - library directory separated by a comma - --with-xxx=DIR - Specify only the directory which contains the - include/ and lib/ subdirectories - - --with-dmalloc=DIR Use dmalloc memory debugging aid [default=no] - --with-zlib=DIR Use zlib library for external deflate I/O filter - [default=yes] - --with-szlib=DIR Use szlib library for external szlib I/O filter - [default=no] - --with-pthread=DIR Specify alternative path to Pthreads library when - thread-safe capability is built. - --with-mpe=DIR Use MPE instrumentation [default=no] - --with-default-plugindir=location - Specify default location for plugins - [default="/usr/local/hdf5/lib/plugin"] - --with-default-api-version=(v16|v18|v110) - Specify default release version of public symbols - [default=v110] - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - FC Fortran compiler command - FCFLAGS Fortran compiler flags - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - LT_SYS_LIBRARY_PATH - User-defined run-time library search path. - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -HDF5 configure 1.9.232 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## -------------------------------- ## -## Report this to help@hdfgroup.org ## -## -------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_fc_try_compile LINENO -# --------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_fc_try_compile - -# ac_fn_fc_try_link LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_fc_try_link - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_fc_try_run LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_fc_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_fc_try_run - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_cpp - -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_link - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_decl -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by HDF5 $as_me 1.9.232, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - -ac_config_headers="$ac_config_headers src/H5config.h" - - -ac_aux_dir= -for ac_dir in bin "$srcdir"/bin; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in bin \"$srcdir\"/bin" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - - -## AM_INIT_AUTOMAKE takes a list of options that should be applied to -## every Makefile.am when automake is run. -am__api_version='1.15' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='hdf5' - VERSION='1.9.232' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar pax cpio none' - -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - - - - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=0;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - - -## AM_MAINTAINER_MODE turns off "rebuild rules" that contain dependencies -## for Makefiles, configure, src/H5config.h, etc. If AM_MAINTAINER_MODE -## is enabled, these files will be rebuilt if out of date. This is a -## problem because if users try to build on a machine with -## the wrong versions of autoconf and automake, these files will be -## rebuilt with the wrong versions and bad things can happen. -## Also, CVS doesn't preserve dependencies between timestamps, so -## Makefiles will often think rebuilding needs to occur when it doesn't. -## -## By default, it is enabled. Users can configure with -## --disable-maintainer-mode to prevent running the autotools. - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=yes -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - -## ---------------------------------------------------------------------- -## Set prefix default (install directory) to a directory in the build area. -## This allows multiple src-dir builds within one host. - - -## Run post processing on files created by configure. -## src/H5pubconf.h: -## Generate src/H5pubconf.h from src/H5config.h by prepending H5_ to all -## macro names. This avoid name conflict between HDF5 macro names and those -## generated by another software package that uses the HDF5 library. -## src/libhdf5.settings: -## Remove all lines begun with "#" which are generated by CONDITIONAL's of -## configure. -ac_config_commands="$ac_config_commands pubconf" - - -## It's possible to configure for a host other than the one on which -## configure is currently running by using the --host=foo flag. -## For machines on which HDF5 is often configured, it can be convenient -## to specify the name of the machine rather than its canonical type. -## -## There are currently no hosts, but if there were they would be -## listed by hostname and the alias would point to a file in -## the config directory: -## -##case $host_alias in -## ) -## host_alias= -## ;; -##esac - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - - -## H5_CFLAGS (and company) are for CFLAGS that should be used on HDF5, but -## not exported to h5cc (or h5fc, etc.) - - - - - - -## AM_CFLAGS (and company) are for CFLAGS that should be used on HDF5, -## and WILL be exported to h5cc (or h5fc, etc) if set by configure. - - - - - - -## Make sure flags are initialized. -AM_CFLAGS="${AM_CFLAGS}" -AM_CXXFLAGS="${AM_CXXFLAGS}" -AM_FCFLAGS="${AM_FCFLAGS}" -AM_CPPFLAGS="${AM_CPPFLAGS}" -AM_LDFLAGS="${AM_LDFLAGS}" -CFLAGS="${CFLAGS}" -CXXFLAGS="${CXXFLAGS}" -FCFLAGS="${FCFLAGS}" -CPPFLAGS="${CPPFLAGS}" -LDFLAGS="${LDFLAGS}" - -## Configure may need to alter any of the *FLAGS variables in order for -## various checks to work correctly. Save the user's value here so it -## can be restored once all configure checks are complete. -saved_user_CFLAGS="$CFLAGS" -saved_user_CXXFLAGS="$CXXFLAGS" -saved_user_FCFLAGS="$FCFLAGS" -saved_user_LDFLAGS="$LDFLAGS" -saved_user_CPPFLAGS="$CPPFLAGS" - -## Support F9X variable to define Fortran compiler if FC variable is -## not used. This should be deprecated in the future. -if test "x" = "x$FC"; then - FC=${F9X} -fi - -## ---------------------------------------------------------------------- -## Dump all shell variables values. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking shell variables initial values" >&5 -$as_echo_n "checking shell variables initial values... " >&6; } -set >&5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - -## Define all symbol variables used for configure summary. -## EXTERNAL_FILTERS equals all external filters. Default none. -## MPE: whether MPE option is enabled. Default no. -## STATIC_EXEC: whether static-exec is enabled. Default no. -## HDF_FORTRAN: whether Fortran is enabled. Default no. -## FC: Fortran compiler. -## HDF_CXX: whether C++ is enabled. Default no. -## CXX: C++ compiler. -## HDF5_HL: whether high-level library is enabled. Default is yes. -## INSTRUMENT: whether INSTRUMENT is enabled. No default set here. -## CODESTACK: whether CODESTACK is enabled. Default no. -## HAVE_DMALLOC: whether system has dmalloc support. Default no. -## HAVE_FLOAT128: whether system has Quad-Precision Math Library. Default no. -## DIRECT_VFD: whether DIRECT_VFD is enabled. Default no. -## THREADSAFE: whether THREADSAFE is enabled. Default no. -## STATIC_SHARED: whether static and/or shared libraries are requested. -## enable_shared: whether shared lib is enabled. -## enable_static: whether static lib is enabled. -## UNAME_INFO: System information. - - - MPE=no - STATIC_EXEC=no - HDF_FORTRAN=no - HDF_FORTRAN=no - HDF_CXX=no - HDF_CXX=no - HDF5_HL=yes - - CODESTACK=no - HAVE_DMALLOC=no - DIRECT_VFD=no - THREADSAFE=no - - - - UNAME_INFO=`uname -a` - - -Fortran_COMPILER_ID=none - -## ---------------------------------------------------------------------- -## Some platforms have broken basename, and/or xargs programs. Check -## that it actually does what it's supposed to do. Catch this early -## since configure and scripts relies upon them heavily and there's -## no use continuing if it's broken. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if basename works" >&5 -$as_echo_n "checking if basename works... " >&6; } -BASENAME_TEST="`basename /foo/bar/baz/qux/basename_works`" -if test $BASENAME_TEST != "basename_works"; then - as_fn_error $? "basename program doesn't work" "$LINENO" 5 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi - -## xargs basename used in configure to get the CC_BASENAME value -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if xargs works" >&5 -$as_echo_n "checking if xargs works... " >&6; } -XARGS_TEST="`echo /foo/bar/baz/qux/xargs_works | xargs basename`" -if test $XARGS_TEST != "xargs_works"; then - as_fn_error $? "xargs program doesn't work" "$LINENO" 5 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi - -## ---------------------------------------------------------------------- -## Check that the cache file was build on the same host as what we're -## running on now. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cached host" >&5 -$as_echo_n "checking for cached host... " >&6; } -if ${hdf5_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - hdf5_cv_host="none" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hdf5_cv_host" >&5 -$as_echo "$hdf5_cv_host" >&6; }; -if test $hdf5_cv_host = "none"; then - hdf5_cv_host=$host -elif test $hdf5_cv_host != $host; then - echo "The config.cache file was generated on $hdf5_cv_host but" - echo "this is $host. Please remove that file and try again." - as_fn_error $? "config.cache file is invalid" "$LINENO" 5 -fi - -## ---------------------------------------------------------------------- -## Source any special files that we need. These files normally aren't -## present but can be used by the maintainers to fine tune things like -## turning on debug or profiling flags for the compiler. The search order -## is: -## -## CPU-VENDOR-OS -## VENDOR-OS -## CPU-OS -## CPU-VENDOR -## OS -## VENDOR -## CPU -## -## If the `OS' ends with a version number then remove it. For instance, -## `freebsd3.1' would become `freebsd' - -case $host_os in - aix*) - host_os_novers=aix - ;; - freebsd*) - host_os_novers=freebsd - ;; - solaris*) - host_os_novers=solaris - ;; - *) - host_os_novers=$host_os - ;; -esac - -host_config="none" -for f in $host_cpu-$host_vendor-$host_os \ - $host_cpu-$host_vendor-$host_os_novers \ - $host_vendor-$host_os \ - $host_vendor-$host_os_novers \ - $host_cpu-$host_os \ - $host_cpu-$host_os_novers \ - $host_cpu-$host_vendor \ - $host_os \ - $host_os_novers \ - $host_vendor \ - $host_cpu ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for config $f" >&5 -$as_echo_n "checking for config $f... " >&6; } - if test -f "$srcdir/config/$f"; then - host_config=$srcdir/config/$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - break - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -done -if test "X$host_config" != "Xnone"; then - CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" - . $host_config -fi - -## Source any special site-specific file -hname="`hostname`" -while test -n "$hname"; do - file=$srcdir/config/site-specific/host-$hname - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for config $file" >&5 -$as_echo_n "checking for config $file... " >&6; } - if test -f "$file"; then - . $file - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - break - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - hname_tmp=$hname - hname="`echo $hname | cut -d. -f2-99`" - test "$hname_tmp" = "$hname" && break -done - -## ---------------------------------------------------------------------- -## Some built-in configure checks can only see CFLAGS (not AM_CFLAGS), so -## we need to add this in so configure works as intended. We will need to -## reset this value at the end of configure, to preserve the user's settings. -CFLAGS="${AM_CFLAGS} ${CFLAGS}" -FCFLAGS="${AM_FCFLAGS} ${FCFLAGS}" -CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}" -CPPFLAGS="${AM_CPPFLAGS} ${CPPFLAGS}" -LDFLAGS="${AM_LDFLAGS} ${LDFLAGS}" - -## ---------------------------------------------------------------------- -## Enable dependency tracking unless the configure options or a -## site-specific file told us not to. This prevents configure from -## silently disabling dependencies for some compilers. -## -if test -z "${enable_dependency_tracking}"; then - enable_dependency_tracking="yes" -fi - -## ---------------------------------------------------------------------- -## Check for programs. -## -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" - -## ---------------------------------------------------------------------------- -## Configure disallows unsupported combinations of options. However, users -## may want to override and build with unsupported combinations for their -## own use. They can use the --enable-unsupported configure flag, which -## ignores any errors from configure due to incompatible flags. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if unsupported combinations of configure options are allowed" >&5 -$as_echo_n "checking if unsupported combinations of configure options are allowed... " >&6; } -# Check whether --enable-unsupported was given. -if test "${enable_unsupported+set}" = set; then : - enableval=$enable_unsupported; ALLOW_UNSUPPORTED=$enableval -fi - - -case "X-$ALLOW_UNSUPPORTED" in - X-|X-no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - X-yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - *) - ;; -esac - -## ---------------------------------------------------------------------- -## Data types and their sizes. -## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned long -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define ssize_t long -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define ptrdiff_t long -_ACEOF - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no -else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) - -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - ;; #( - *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 -$as_echo_n "checking size of char... " >&6; } -if ${ac_cv_sizeof_char+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_char" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (char) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_char=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 -$as_echo "$ac_cv_sizeof_char" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_CHAR $ac_cv_sizeof_char -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 -$as_echo_n "checking size of short... " >&6; } -if ${ac_cv_sizeof_short+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (short) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_short=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if ${ac_cv_sizeof_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned" >&5 -$as_echo_n "checking size of unsigned... " >&6; } -if ${ac_cv_sizeof_unsigned+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned))" "ac_cv_sizeof_unsigned" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_unsigned" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (unsigned) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_unsigned=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned" >&5 -$as_echo "$ac_cv_sizeof_unsigned" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UNSIGNED $ac_cv_sizeof_unsigned -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if ${ac_cv_sizeof_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 -$as_echo_n "checking size of long long... " >&6; } -if ${ac_cv_sizeof_long_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 -$as_echo "$ac_cv_sizeof_long_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5 -$as_echo_n "checking size of __int64... " >&6; } -if ${ac_cv_sizeof___int64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then : - -else - if test "$ac_cv_type___int64" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (__int64) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof___int64=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5 -$as_echo "$ac_cv_sizeof___int64" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF___INT64 $ac_cv_sizeof___int64 -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 -$as_echo_n "checking size of float... " >&6; } -if ${ac_cv_sizeof_float+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_float" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (float) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_float=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5 -$as_echo "$ac_cv_sizeof_float" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_FLOAT $ac_cv_sizeof_float -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 -$as_echo_n "checking size of double... " >&6; } -if ${ac_cv_sizeof_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_double" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (double) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_double=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 -$as_echo "$ac_cv_sizeof_double" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_DOUBLE $ac_cv_sizeof_double -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 -$as_echo_n "checking size of long double... " >&6; } -if ${ac_cv_sizeof_long_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long_double" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long double) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_double=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 -$as_echo "$ac_cv_sizeof_long_double" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double -_ACEOF - - - -## Check for non-standard extenstion __FLOAT128 -HAVE_FLOAT128=0 -HAVE_QUADMATH=0 -FLT128_DIG=0 -LDBL_DIG=0 - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __float128" >&5 -$as_echo_n "checking size of __float128... " >&6; } -if ${ac_cv_sizeof___float128+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__float128))" "ac_cv_sizeof___float128" "$ac_includes_default"; then : - -else - if test "$ac_cv_type___float128" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (__float128) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof___float128=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___float128" >&5 -$as_echo "$ac_cv_sizeof___float128" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF___FLOAT128 $ac_cv_sizeof___float128 -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Quad" >&5 -$as_echo_n "checking size of _Quad... " >&6; } -if ${ac_cv_sizeof__Quad+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Quad))" "ac_cv_sizeof__Quad" "$ac_includes_default"; then : - -else - if test "$ac_cv_type__Quad" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (_Quad) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof__Quad=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Quad" >&5 -$as_echo "$ac_cv_sizeof__Quad" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF__QUAD $ac_cv_sizeof__Quad -_ACEOF - - -for ac_header in quadmath.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "quadmath.h" "ac_cv_header_quadmath_h" "$ac_includes_default" -if test "x$ac_cv_header_quadmath_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_QUADMATH_H 1 -_ACEOF - HAVE_QUADMATH=1 -fi - -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking maximum decimal precision for C" >&5 -$as_echo_n "checking maximum decimal precision for C... " >&6; } -rm -f pac_Cconftest.out - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - #include - #include - #define CHECK_FLOAT128 $ac_cv_sizeof___float128 - #if CHECK_FLOAT128!=0 - # if $HAVE_QUADMATH!=0 - #include - # endif - # ifdef FLT128_DIG - #define C_FLT128_DIG FLT128_DIG - # else - #define C_FLT128_DIG 0 - # endif - #else - #define C_FLT128_DIG 0 - #endif - #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define C_LDBL_DIG DECIMAL_DIG - #else - #define C_LDBL_DIG LDBL_DIG - #endif - -int -main () -{ - - FILE * pFile; - pFile = fopen("pac_Cconftest.out","w"); - fprintf(pFile, "%d\n%d\n", C_LDBL_DIG, C_FLT128_DIG); - - ; - return 0; -} - -_ACEOF - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - if ac_fn_c_try_run "$LINENO"; then : - - if test -s pac_Cconftest.out ; then - LDBL_DIG="`sed -n '1p' pac_Cconftest.out`" - FLT128_DIG="`sed -n '2p' pac_Cconftest.out`" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 -$as_echo "$as_me: WARNING: No output from test program!" >&2;} - fi - rm -f pac_Cconftest.out - -else - - as_fn_error $? "C program fails to build or run!" "$LINENO" 5 - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam -fi - - - -if test "$ac_cv_sizeof___float128" != 0 && test "$FLT128_DIG" != 0 ; then - -$as_echo "#define HAVE_FLOAT128 1" >>confdefs.h - - PAC_C_MAX_REAL_PRECISION=$FLT128_DIG -else - PAC_C_MAX_REAL_PRECISION=$LDBL_DIG -fi - -cat >>confdefs.h <<_ACEOF -#define PAC_C_MAX_REAL_PRECISION $PAC_C_MAX_REAL_PRECISION -_ACEOF - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_C_MAX_REAL_PRECISION" >&5 -$as_echo "$PAC_C_MAX_REAL_PRECISION" >&6; } -## ---------------------------------------------------------------------- -## Check if they would like the Fortran interface compiled -## - HDF5_INTERFACES="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran interface enabled" >&5 -$as_echo_n "checking if Fortran interface enabled... " >&6; } -# Check whether --enable-fortran was given. -if test "${enable_fortran+set}" = set; then : - enableval=$enable_fortran; HDF_FORTRAN=$enableval -fi - - -if test "X$HDF_FORTRAN" = "Xyes"; then - echo "yes" -else - echo "no" -fi - -if test "X$HDF_FORTRAN" = "Xyes"; then - -## We will output an include file for Fortran, H5config_f.inc which -## contains various configure definitions used by the Fortran Library. -## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro -## names and those generated by another software package that uses the HDF5 library. - ac_config_headers="$ac_config_headers fortran/src/H5config_f.inc" - - - HDF_FORTRAN=yes - - HDF5_INTERFACES="$HDF5_INTERFACES fortran" - - ## -------------------------------------------------------------------- - ## HDF5 integer variables for the H5fortran_types.f90 file. - ## - - - - - - - - - - ## -------------------------------------------------------------------- - ## Fortran source extention - ## - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$FC"; then - ac_cv_prog_FC="$FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -FC=$ac_cv_prog_FC -if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$FC" && break - done -fi -if test -z "$FC"; then - ac_ct_FC=$FC - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_FC"; then - ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_FC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_FC=$ac_cv_prog_ac_ct_FC -if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_FC" && break -done - - if test "x$ac_ct_FC" = x; then - FC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - FC=$ac_ct_FC - fi -fi - - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if ${ac_cv_fc_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_fc_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if ${ac_cv_prog_fc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - FCFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_g=yes -else - ac_cv_prog_fc_g=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then - FCFLAGS=$ac_save_FCFLAGS -elif test $ac_cv_prog_fc_g = yes; then - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-g -O2" - else - FCFLAGS="-g" - fi -else - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-O2" - else - FCFLAGS= - fi -fi - -if test $ac_compiler_gnu = yes; then - GFC=yes -else - GFC= -fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } -if ${ac_cv_fc_srcext_f90+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=f90 -ac_fcflags_srcext_save=$ac_fcflags_srcext -ac_fcflags_srcext= -ac_cv_fc_srcext_f90=unknown -case $ac_ext in #( - [fF]77) ac_try=f77;; #( - *) ac_try=f95;; -esac -for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do - test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_fc_srcext_f90=$ac_flag; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest.$ac_objext conftest.f90 -ac_fcflags_srcext=$ac_fcflags_srcext_save - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -$as_echo "$ac_cv_fc_srcext_f90" >&6; } -if test "x$ac_cv_fc_srcext_f90" = xunknown; then - as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 -else - ac_fc_srcext=f90 - if test "x$ac_cv_fc_srcext_f90" = xnone; then - ac_fcflags_srcext="" - FCFLAGS_f90="" - else - ac_fcflags_srcext=$ac_cv_fc_srcext_f90 - FCFLAGS_f90=$ac_cv_fc_srcext_f90 - fi - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - ## -------------------------------------------------------------------- - ## Check for a Fortran compiler and how to include modules. - ## - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$FC"; then - ac_cv_prog_FC="$FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -FC=$ac_cv_prog_FC -if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$FC" && break - done -fi -if test -z "$FC"; then - ac_ct_FC=$FC - for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_FC"; then - ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_FC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_FC=$ac_cv_prog_ac_ct_FC -if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_FC" && break -done - - if test "x$ac_ct_FC" = x; then - FC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - FC=$ac_ct_FC - fi -fi - - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if ${ac_cv_fc_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_fc_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if ${ac_cv_prog_fc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - FCFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_g=yes -else - ac_cv_prog_fc_g=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then - FCFLAGS=$ac_save_FCFLAGS -elif test $ac_cv_prog_fc_g = yes; then - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-g -O2" - else - FCFLAGS="-g" - fi -else - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-O2" - else - FCFLAGS= - fi -fi - -if test $ac_compiler_gnu = yes; then - GFC=yes -else - GFC= -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking what $FC does with modules" >&5 -$as_echo_n "checking what $FC does with modules... " >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - -test -d conftestdir || mkdir conftestdir -cd conftestdir -rm -rf * - -cat >conftest.$ac_ext <&1 -if test "$modfiles" = file.o; then - echo $ac_n "checking whether $FC -em is saner""... $ac_c" 1>&6 - OLD_FCFLAGS=$FCFLAGS - FCFLAGS="$FCFLAGS -em" - eval $ac_compile - modfiles="" - for f in file.o module.mod MODULE.mod module.M MODULE.M; do - test -f $f && modfiles="$f" - done - if test "$modfiles" = "file.o"; then - FCFLAGS=$OLD_FCFLAGS - echo no 6>&1 - else - echo yes 6>&1 - fi -fi -cd .. - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how $FC finds modules" >&5 -$as_echo_n "checking how $FC finds modules... " >&6; } - -for flag in "-I" "-M" "-p"; do - cat >conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - F9XMODFLAG=$flag - break - fi -done - -if test -n "$F9XMODFLAG"; then - echo $F9XMODFLAG 1>&6 - FCFLAGS="$F9XMODFLAG. $FCFLAGS" -else - echo unknown 1>&6 -fi - - -rm -rf conftest* -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - ## Change to the Fortran 90 language - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - - ## Checking if the compiler supports the required Fortran 2003 features and - ## stopping if it does not. - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 -$as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } - HAVE_F2003_REQUIREMENTS="no" - cat > conftest.$ac_ext <<_ACEOF - program main - - - USE iso_c_binding - IMPLICIT NONE - TYPE(C_PTR) :: ptr - TYPE(C_FUNPTR) :: funptr - CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr - - ptr = C_LOC(ichr(1:1)) - - - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_F2003_REQUIREMENTS=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran" "$LINENO" 5 - fi - - ## -------------------------------------------------------------------- - ## Define wrappers for the C compiler to use Fortran function names - ## - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 -$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } -if ${ac_cv_prog_fc_v+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_v= -# Try some options frequently used verbose output -for ac_verb in -v -verbose --verbose -V -\#\#\#; do - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF - -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran compiler in order to get -# "verbose" output that we can then parse for the Fortran linker -# flags. -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS="$FCFLAGS $ac_verb" -eval "set x $ac_link" -shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 -# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, -# LIBRARY_PATH; skip all such settings. -ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | - sed '/^Driving:/d; /^Configured with:/d; - '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 -FCFLAGS=$ac_save_FCFLAGS - -rm -rf conftest* - -# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where -# /foo, /bar, and /baz are search directories for the Fortran linker. -# Here, we change these into -L/foo -L/bar -L/baz (and put it first): -ac_fc_v_output="`echo $ac_fc_v_output | - grep 'LPATH is:' | - sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" - -# FIXME: we keep getting bitten by quoted arguments; a more general fix -# that detects unbalanced quotes in FLIBS should be implemented -# and (ugh) tested at some point. -case $ac_fc_v_output in - # With xlf replace commas with spaces, - # and remove "-link" and closing parenthesis. - *xlfentry*) - ac_fc_v_output=`echo $ac_fc_v_output | - sed ' - s/,/ /g - s/ -link / /g - s/) *$// - ' - ` ;; - - # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted - # $LIBS confuse us, and the libraries appear later in the output anyway). - *mGLOB_options_string*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; - - # Portland Group compiler has singly- or doubly-quoted -cmdline argument - # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. - # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". - *-cmdline\ * | *-ignore\ * | *-def\ *) - ac_fc_v_output=`echo $ac_fc_v_output | sed "\ - s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g - s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g - s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; - - # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. - *fort77*f2c*gcc*) - ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' - /:[ ]\+Running[ ]\{1,\}"gcc"/{ - /"-c"/d - /[.]c"*/d - s/^.*"gcc"/"gcc"/ - s/"//gp - }'` ;; - - # If we are using Cray Fortran then delete quotes. - *cft90*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; -esac - - - # look for -l* and *.a constructs in the output - for ac_arg in $ac_fc_v_output; do - case $ac_arg in - [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) - ac_cv_prog_fc_v=$ac_verb - break 2 ;; - esac - done -done -if test -z "$ac_cv_prog_fc_v"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 -$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} -fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -$as_echo "$as_me: WARNING: compilation failed" >&2;} -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 -$as_echo "$ac_cv_prog_fc_v" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 -$as_echo_n "checking for Fortran libraries of $FC... " >&6; } -if ${ac_cv_fc_libs+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$FCLIBS" != "x"; then - ac_cv_fc_libs="$FCLIBS" # Let the user override the test. -else - -cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF - -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran compiler in order to get -# "verbose" output that we can then parse for the Fortran linker -# flags. -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" -eval "set x $ac_link" -shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 -# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, -# LIBRARY_PATH; skip all such settings. -ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | - sed '/^Driving:/d; /^Configured with:/d; - '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 -FCFLAGS=$ac_save_FCFLAGS - -rm -rf conftest* - -# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where -# /foo, /bar, and /baz are search directories for the Fortran linker. -# Here, we change these into -L/foo -L/bar -L/baz (and put it first): -ac_fc_v_output="`echo $ac_fc_v_output | - grep 'LPATH is:' | - sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" - -# FIXME: we keep getting bitten by quoted arguments; a more general fix -# that detects unbalanced quotes in FLIBS should be implemented -# and (ugh) tested at some point. -case $ac_fc_v_output in - # With xlf replace commas with spaces, - # and remove "-link" and closing parenthesis. - *xlfentry*) - ac_fc_v_output=`echo $ac_fc_v_output | - sed ' - s/,/ /g - s/ -link / /g - s/) *$// - ' - ` ;; - - # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted - # $LIBS confuse us, and the libraries appear later in the output anyway). - *mGLOB_options_string*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; - - # Portland Group compiler has singly- or doubly-quoted -cmdline argument - # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. - # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". - *-cmdline\ * | *-ignore\ * | *-def\ *) - ac_fc_v_output=`echo $ac_fc_v_output | sed "\ - s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g - s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g - s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; - - # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. - *fort77*f2c*gcc*) - ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' - /:[ ]\+Running[ ]\{1,\}"gcc"/{ - /"-c"/d - /[.]c"*/d - s/^.*"gcc"/"gcc"/ - s/"//gp - }'` ;; - - # If we are using Cray Fortran then delete quotes. - *cft90*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; -esac - - - -ac_cv_fc_libs= - -# Save positional arguments (if any) -ac_save_positional="$@" - -set X $ac_fc_v_output -while test $# != 1; do - shift - ac_arg=$1 - case $ac_arg in - [\\/]*.a | ?:[\\/]*.a) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then : - -else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" -fi - ;; - -bI:*) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then : - -else - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_arg; do - ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" - done -else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" -fi -fi - ;; - # Ignore these flags. - -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ - |-LANG:=* | -LIST:* | -LNO:* | -link) - ;; - -lkernel32) - case $host_os in - *cygwin*) ;; - *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" - ;; - esac - ;; - -[LRuYz]) - # These flags, when seen by themselves, take an argument. - # We remove the space between option and argument and re-iterate - # unless we find an empty arg or a new option (starting with -) - case $2 in - "" | -*);; - *) - ac_arg="$ac_arg$2" - shift; shift - set X $ac_arg "$@" - ;; - esac - ;; - -YP,*) - for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_j" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then : - -else - ac_arg="$ac_arg $ac_j" - ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" -fi - done - ;; - -[lLR]*) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then : - -else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" -fi - ;; - -zallextract*| -zdefaultextract) - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" - ;; - # Ignore everything else. - esac -done -# restore positional arguments -set X $ac_save_positional; shift - -# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, -# then we insist that the "run path" must be an absolute path (i.e. it -# must begin with a "/"). -case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) - ac_ld_run_path=`$as_echo "$ac_fc_v_output" | - sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` - test "x$ac_ld_run_path" != x && - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_ld_run_path; do - ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" - done -else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path" -fi - ;; -esac -fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 -$as_echo "$ac_cv_fc_libs" >&6; } -FCLIBS="$ac_cv_fc_libs" - - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 -$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } -if ${ac_cv_fc_dummy_main+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_fc_dm_save_LIBS=$LIBS - LIBS="$LIBS $FCLIBS" - ac_fortran_dm_var=FC_DUMMY_MAIN - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - # First, try linking without a dummy main: - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_fortran_dummy_main=none -else - ac_cv_fortran_dummy_main=unknown -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - if test $ac_cv_fortran_dummy_main = unknown; then - for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define $ac_fortran_dm_var $ac_func -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_fortran_dummy_main=$ac_func; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - fi - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main - rm -rf conftest* - LIBS=$ac_fc_dm_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 -$as_echo "$ac_cv_fc_dummy_main" >&6; } -FC_DUMMY_MAIN=$ac_cv_fc_dummy_main -if test "$FC_DUMMY_MAIN" != unknown; then : - if test $FC_DUMMY_MAIN != none; then - -cat >>confdefs.h <<_ACEOF -#define FC_DUMMY_MAIN $FC_DUMMY_MAIN -_ACEOF - - if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then - -$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h - - fi -fi -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "linking to Fortran libraries from C fails -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 -$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } -if ${ac_cv_fc_mangling+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - subroutine foobar() - return - end - subroutine foo_bar() - return - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - mv conftest.$ac_objext cfortran_test.$ac_objext - - ac_save_LIBS=$LIBS - LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS" - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_success=no - for ac_foobar in foobar FOOBAR; do - for ac_underscore in "" "_"; do - ac_func="$ac_foobar$ac_underscore" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_success=yes; break 2 -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - done - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - if test "$ac_success" = "yes"; then - case $ac_foobar in - foobar) - ac_case=lower - ac_foo_bar=foo_bar - ;; - FOOBAR) - ac_case=upper - ac_foo_bar=FOO_BAR - ;; - esac - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_success_extra=no - for ac_extra in "" "_"; do - ac_func="$ac_foo_bar$ac_underscore$ac_extra" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_success_extra=yes; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - if test "$ac_success_extra" = "yes"; then - ac_cv_fc_mangling="$ac_case case" - if test -z "$ac_underscore"; then - ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore" - else - ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore" - fi - if test -z "$ac_extra"; then - ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore" - else - ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore" - fi - else - ac_cv_fc_mangling="unknown" - fi - else - ac_cv_fc_mangling="unknown" - fi - - LIBS=$ac_save_LIBS - rm -rf conftest* - rm -f cfortran_test* -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compile a simple Fortran program -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 -$as_echo "$ac_cv_fc_mangling" >&6; } - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -case $ac_cv_fc_mangling in - "lower case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h - ;; - "lower case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h - ;; - "lower case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h - ;; - "lower case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h - ;; - "upper case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h - ;; - "upper case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h - ;; - "upper case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h - ;; - "upper case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} - ;; -esac - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - - ## -------------------------------------------------------------------- - ## See if the fortran compiler supports the intrinsic function "SIZEOF" - - HAVE_SIZEOF_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic SIZEOF" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - - PROGRAM main - i = sizeof(x) - END PROGRAM - -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_SIZEOF_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" - - HAVE_C_SIZEOF_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_SIZEOF" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - - PROGRAM main - USE ISO_C_BINDING - INTEGER(C_INT) :: a - INTEGER(C_SIZE_T) :: result - result = C_SIZEOF(a) - END PROGRAM - -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_C_SIZEOF_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" - - HAVE_STORAGE_SIZE_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic STORAGE_SIZE" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - - PROGRAM main - INTEGER :: a - INTEGER :: result - result = STORAGE_SIZE(a) - END PROGRAM - -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_STORAGE_SIZE_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - - ## Set the sizeof function for use later in the fortran tests - if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes";then - FC_SIZEOF_A="STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - FC_SIZEOF_B="STORAGE_SIZE(b, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - FC_SIZEOF_C="STORAGE_SIZE(c, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - else - if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes";then - FC_SIZEOF_A="SIZEOF(a)" - FC_SIZEOF_B="SIZEOF(b)" - FC_SIZEOF_C="SIZEOF(c)" - else - ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error - as_fn_error $? "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE" "$LINENO" 5 - fi - fi - - ## See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" - - HAVE_ISO_FORTRAN_ENV="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic module ISO_FORTRAN_ENV" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic module ISO_FORTRAN_ENV... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - - PROGRAM main - USE, INTRINSIC :: ISO_FORTRAN_ENV - END PROGRAM - -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_ISO_FORTRAN_ENV="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - ## Check KIND and size of native integer - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -rm -f pac_fconftest.out - -if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat > conftest.$ac_ext <<_ACEOF - - - PROGRAM main - IMPLICIT NONE - INTEGER :: ik, k, lastkind, max_decimal_prec - INTEGER :: num_rkinds, num_ikinds - num_ikinds = 0 - lastkind=SELECTED_INT_KIND(1) - OPEN(8, FILE='pac_fconftest.out', form='formatted') - ! Find integer KINDs - DO ik=2,36 - k = SELECTED_INT_KIND(ik) - IF (k .NE. lastkind) THEN - num_ikinds = num_ikinds + 1 - WRITE(8,'(I0)',ADVANCE='NO') lastkind - lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' - ENDIF - IF (k .LE. 0) EXIT - ENDDO - IF (lastkind.NE.-1) THEN - num_ikinds = num_ikinds + 1 - WRITE(8,'(I0)') lastkind - ELSE - WRITE(8,'()') - ENDIF - ! Find real KINDs - num_rkinds = 0 - lastkind=SELECTED_REAL_KIND(1) - max_decimal_prec = 1 - DO ik=2,36 - k = SELECTED_REAL_KIND(ik) - IF (k .NE. lastkind) THEN - num_rkinds = num_rkinds + 1 - WRITE(8,'(I0)',ADVANCE='NO') lastkind - lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' - max_decimal_prec = ik - ENDIF - IF (k .LE. 0) EXIT - ENDDO - IF (lastkind.NE.-1)THEN - num_rkinds = num_rkinds + 1 - WRITE(8,'(I0)') lastkind - ELSE - WRITE(8,'()') - ENDIF - WRITE(8,'(I0)') max_decimal_prec - WRITE(8,'(I0)') num_ikinds - WRITE(8,'(I0)') num_rkinds - END - - -_ACEOF -if ac_fn_fc_try_run "$LINENO"; then : - - if test -s pac_fconftest.out ; then - - - pac_validIntKinds="`sed -n '1p' pac_fconftest.out`" - pac_validRealKinds="`sed -n '2p' pac_fconftest.out`" - PAC_FC_MAX_REAL_PRECISION="`sed -n '3p' pac_fconftest.out`" - -cat >>confdefs.h <<_ACEOF -#define PAC_FC_MAX_REAL_PRECISION $PAC_FC_MAX_REAL_PRECISION -_ACEOF - - - PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" - PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" - - H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `sed -n '4p' pac_fconftest.out`" - H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" - H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `sed -n '5p' pac_fconftest.out`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" - - -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_NUM_RKIND $H5CONFIG_F_NUM_RKIND -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_NUM_IKIND $H5CONFIG_F_NUM_IKIND -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_RKIND $H5CONFIG_F_RKIND -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_IKIND $H5CONFIG_F_IKIND -_ACEOF - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5 -$as_echo_n "checking for Fortran INTEGER KINDs... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS" >&5 -$as_echo "$PAC_FC_ALL_INTEGER_KINDS" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REAL KINDs" >&5 -$as_echo_n "checking for Fortran REAL KINDs... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 -$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REALs maximum decimal precision" >&5 -$as_echo_n "checking for Fortran REALs maximum decimal precision... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_MAX_REAL_PRECISION" >&5 -$as_echo "$PAC_FC_MAX_REAL_PRECISION" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 -$as_echo "Error" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 -$as_echo "$as_me: WARNING: No output from test program!" >&2;} - fi - rm -f pac_fconftest.out - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 -$as_echo "Error" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to run program to determine available KINDs" >&5 -$as_echo "$as_me: WARNING: Failed to run program to determine available KINDs" >&2;} - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of native KINDS" >&5 -$as_echo_n "checking sizeof of native KINDS... " >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -pack_int_sizeof="" -rm -f pac_fconftest.out - cat > conftest.$ac_ext <<_ACEOF - - - PROGRAM main - USE ISO_C_BINDING - IMPLICIT NONE - INTEGER a - REAL b - DOUBLE PRECISION c - OPEN(8, FILE='pac_fconftest.out', FORM='formatted') - WRITE(8,*) $FC_SIZEOF_A - WRITE(8,*) kind(a) - WRITE(8,*) $FC_SIZEOF_B - WRITE(8,*) kind(b) - WRITE(8,*) $FC_SIZEOF_C - WRITE(8,*) kind(c) - CLOSE(8) - END - - -_ACEOF - if test "$cross_compiling" = yes; then : - - pack_int_sizeof="" - -else - if ac_fn_fc_try_run "$LINENO"; then : - - if test -s pac_fconftest.out ; then - PAC_FORTRAN_NATIVE_INTEGER_KIND="`sed -n '1p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`sed -n '2p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_REAL_KIND="`sed -n '3p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_REAL_SIZEOF="`sed -n '4p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_DOUBLE_KIND="`sed -n '5p' pac_fconftest.out`" - PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`sed -n '6p' pac_fconftest.out`" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 -$as_echo "$as_me: WARNING: No output from test program!" >&2;} - fi - rm -f pac_fconftest.out - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran program fails to build or run!" >&5 -$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pack_int_sizeof" >&5 -$as_echo "$pack_int_sizeof" >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - - - ## Find all available KINDs - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -rm -f pac_fconftest.out - -if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat > conftest.$ac_ext <<_ACEOF - - - PROGRAM main - IMPLICIT NONE - INTEGER :: ik, k, lastkind, max_decimal_prec - INTEGER :: num_rkinds, num_ikinds - num_ikinds = 0 - lastkind=SELECTED_INT_KIND(1) - OPEN(8, FILE='pac_fconftest.out', form='formatted') - ! Find integer KINDs - DO ik=2,36 - k = SELECTED_INT_KIND(ik) - IF (k .NE. lastkind) THEN - num_ikinds = num_ikinds + 1 - WRITE(8,'(I0)',ADVANCE='NO') lastkind - lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' - ENDIF - IF (k .LE. 0) EXIT - ENDDO - IF (lastkind.NE.-1) THEN - num_ikinds = num_ikinds + 1 - WRITE(8,'(I0)') lastkind - ELSE - WRITE(8,'()') - ENDIF - ! Find real KINDs - num_rkinds = 0 - lastkind=SELECTED_REAL_KIND(1) - max_decimal_prec = 1 - DO ik=2,36 - k = SELECTED_REAL_KIND(ik) - IF (k .NE. lastkind) THEN - num_rkinds = num_rkinds + 1 - WRITE(8,'(I0)',ADVANCE='NO') lastkind - lastkind = k - IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ',' - max_decimal_prec = ik - ENDIF - IF (k .LE. 0) EXIT - ENDDO - IF (lastkind.NE.-1)THEN - num_rkinds = num_rkinds + 1 - WRITE(8,'(I0)') lastkind - ELSE - WRITE(8,'()') - ENDIF - WRITE(8,'(I0)') max_decimal_prec - WRITE(8,'(I0)') num_ikinds - WRITE(8,'(I0)') num_rkinds - END - - -_ACEOF -if ac_fn_fc_try_run "$LINENO"; then : - - if test -s pac_fconftest.out ; then - - - pac_validIntKinds="`sed -n '1p' pac_fconftest.out`" - pac_validRealKinds="`sed -n '2p' pac_fconftest.out`" - PAC_FC_MAX_REAL_PRECISION="`sed -n '3p' pac_fconftest.out`" - -cat >>confdefs.h <<_ACEOF -#define PAC_FC_MAX_REAL_PRECISION $PAC_FC_MAX_REAL_PRECISION -_ACEOF - - - PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}" - PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}" - - H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `sed -n '4p' pac_fconftest.out`" - H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)" - H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `sed -n '5p' pac_fconftest.out`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)" - - -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_NUM_RKIND $H5CONFIG_F_NUM_RKIND -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_NUM_IKIND $H5CONFIG_F_NUM_IKIND -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_RKIND $H5CONFIG_F_RKIND -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_IKIND $H5CONFIG_F_IKIND -_ACEOF - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5 -$as_echo_n "checking for Fortran INTEGER KINDs... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS" >&5 -$as_echo "$PAC_FC_ALL_INTEGER_KINDS" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REAL KINDs" >&5 -$as_echo_n "checking for Fortran REAL KINDs... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 -$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REALs maximum decimal precision" >&5 -$as_echo_n "checking for Fortran REALs maximum decimal precision... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_MAX_REAL_PRECISION" >&5 -$as_echo "$PAC_FC_MAX_REAL_PRECISION" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 -$as_echo "Error" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 -$as_echo "$as_me: WARNING: No output from test program!" >&2;} - fi - rm -f pac_fconftest.out - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 -$as_echo "Error" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to run program to determine available KINDs" >&5 -$as_echo "$as_me: WARNING: Failed to run program to determine available KINDs" >&2;} - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - - ## Find all sizeofs for available KINDs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of available INTEGER KINDs" >&5 -$as_echo_n "checking sizeof of available INTEGER KINDs... " >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -pack_int_sizeof="" -rm -f pac_fconftest.out - -for kind in `echo $pac_validIntKinds | sed -e 's/,/ /g'`; do - cat > conftest.$ac_ext <<_ACEOF - - - PROGRAM main - USE ISO_C_BINDING - IMPLICIT NONE - INTEGER (KIND=$kind) a - OPEN(8, FILE='pac_fconftest.out', FORM='formatted') - WRITE(8,'(I0)') $FC_SIZEOF_A - CLOSE(8) - END - - -_ACEOF - if test "$cross_compiling" = yes; then : - - pack_int_sizeof="" - -else - if ac_fn_fc_try_run "$LINENO"; then : - - if test -s pac_fconftest.out ; then - sizes="`cat pac_fconftest.out`" - pack_int_sizeof="$pack_int_sizeof $sizes," - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 -$as_echo "$as_me: WARNING: No output from test program!" >&2;} - fi - rm -f pac_fconftest.out - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran program fails to build or run!" >&5 -$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam -fi - -done -PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS_SIZEOF" >&5 -$as_echo "$PAC_FC_ALL_INTEGER_KINDS_SIZEOF" >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of available REAL KINDs" >&5 -$as_echo_n "checking sizeof of available REAL KINDs... " >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -pack_real_sizeof="" -rm -f pac_fconftest.out -for kind in `echo $pac_validRealKinds | sed -e 's/,/ /g'`; do - cat > conftest.$ac_ext <<_ACEOF - - - PROGRAM main - USE ISO_C_BINDING - IMPLICIT NONE - REAL (KIND=$kind) :: a - OPEN(8, FILE='pac_fconftest.out', FORM='formatted') - WRITE(8,'(I0)') $FC_SIZEOF_A - CLOSE(8) - END - - -_ACEOF - if test "$cross_compiling" = yes; then : - - pack_real_sizeof="" - -else - if ac_fn_fc_try_run "$LINENO"; then : - - if test -s pac_fconftest.out ; then - sizes="`cat pac_fconftest.out`" - pack_real_sizeof="$pack_real_sizeof $sizes," - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 -$as_echo "$as_me: WARNING: No output from test program!" >&2;} - fi - rm -f pac_fconftest.out - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran program fails to build or run!" >&5 -$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam -fi - -done -PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS_SIZEOF" >&5 -$as_echo "$PAC_FC_ALL_REAL_KINDS_SIZEOF" >&6; } -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - - - - - - - - - - - - - - - - - - - - - - - -cat >>confdefs.h <<_ACEOF -#define Fortran_COMPILER_ID $Fortran_COMPILER_ID -_ACEOF - - - ## Setting definition if there is a 16 byte fortran integer - if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then - HAVE_Fortran_INTEGER_SIZEOF_16="1" - -$as_echo "#define HAVE_Fortran_INTEGER_SIZEOF_16 1" >>confdefs.h - - else - HAVE_Fortran_INTEGER_SIZEOF_16="0" - -$as_echo "#define HAVE_Fortran_INTEGER_SIZEOF_16 0" >>confdefs.h - - fi - - if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then - -$as_echo "#define FORTRAN_HAVE_STORAGE_SIZE 1" >>confdefs.h - - fi - - if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then - -$as_echo "#define FORTRAN_HAVE_C_SIZEOF 1" >>confdefs.h - - fi - - if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then - -$as_echo "#define FORTRAN_HAVE_SIZEOF 1" >>confdefs.h - - fi - - ## See if C_LONG_DOUBLE is available - - HAVE_C_LONG_DOUBLE_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_LONG_DOUBLE" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic C_LONG_DOUBLE... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - - PROGRAM main - USE ISO_C_BINDING - REAL(KIND=C_LONG_DOUBLE) :: d - END PROGRAM - -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_C_LONG_DOUBLE_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - FORTRAN_HAVE_C_LONG_DOUBLE="0" - if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then - FORTRAN_HAVE_C_LONG_DOUBLE="1" - -$as_echo "#define FORTRAN_HAVE_C_LONG_DOUBLE 1" >>confdefs.h - - fi - - ## Is C_LONG_DOUBLE different from C_DOUBLE - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" - if test "X$FORTRAN_HAVE_C_LONG_DOUBLE"; then - - C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran C_LONG_DOUBLE is different from C_DOUBLE" >&5 -$as_echo_n "checking if Fortran C_LONG_DOUBLE is different from C_DOUBLE... " >&6; } - - cat > conftest.$ac_ext <<_ACEOF - - MODULE type_mod - USE ISO_C_BINDING - INTERFACE h5t - MODULE PROCEDURE h5t_c_double - MODULE PROCEDURE h5t_c_long_double - END INTERFACE - CONTAINS - SUBROUTINE h5t_c_double(r) - REAL(KIND=C_DOUBLE) :: r - END SUBROUTINE h5t_c_double - SUBROUTINE h5t_c_long_double(d) - REAL(KIND=C_LONG_DOUBLE) :: d - END SUBROUTINE h5t_c_long_double - END MODULE type_mod - PROGRAM main - USE ISO_C_BINDING - USE type_mod - REAL(KIND=C_DOUBLE) :: r - REAL(KIND=C_LONG_DOUBLE) :: d - CALL h5t(r) - CALL h5t(d) - END PROGRAM main - -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test "X$C_LONG_DOUBLE_IS_UNIQUE_FORTRAN" = "Xyes"; then - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="1" - -$as_echo "#define FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1" >>confdefs.h - - else - FORTRAN_C_LONG_DOUBLE_IS_UNIQUE="0" - fi - fi - - FORTRAN_SIZEOF_LONG_DOUBLE=${ac_cv_sizeof_long_double} - -cat >>confdefs.h <<_ACEOF -#define FORTRAN_SIZEOF_LONG_DOUBLE "${ac_cv_sizeof_long_double}" -_ACEOF - - - - max_real_fortran_sizeof="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -ne 's/.*,\([0-9]*\)\}/\1/p'`" - max_real_fortran_kind="`echo \"$PAC_FC_ALL_REAL_KINDS\" | sed -ne 's/.*,\([0-9]*\)\}/\1/p'`" - - if test "$ac_cv_sizeof___float128" != 0;then - if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && - test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof" && - test "${ac_cv_sizeof_double}" != "$max_real_fortran_sizeof" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: - Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size - !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! - " >&5 -$as_echo "$as_me: WARNING: - Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size - !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!! - " >&2;} - PAC_FC_ALL_REAL_KINDS="`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/,[0-9]\+}/}/g'`" - PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/,[0-9]\+}/}/g'`" - fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran interoperable KINDS with C" >&5 -$as_echo_n "checking for Fortran interoperable KINDS with C... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 -$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } - - H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"$PAC_FC_ALL_REAL_KINDS\" | tr -d -c ',\n' | awk '{ print length + 1; }'`" - H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/{//g' | sed -e 's/}//g' | sed -e 's/ /,/g'`/)" - H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/{//g' | sed -e 's/}//g'| sed -e 's/ /,/g'`/)" - - -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_NUM_RKIND $H5CONFIG_F_NUM_RKIND -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_RKIND $H5CONFIG_F_RKIND -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define H5CONFIG_F_RKIND_SIZEOF $H5CONFIG_F_RKIND_SIZEOF -_ACEOF - - -## Change back to the C language - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - FC="no" -fi - -## ---------------------------------------------------------------------- -## Check if they would like the C++ interface compiled -## -## We need to check for a C++ compiler unconditionally, since -## AC_PROG_CXX defines some macros that Automake 1.9.x uses and will -## miss even if c++ is not enabled. - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CXX_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ## this is checked for when AC_HEADER_STDC is done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if c++ interface enabled" >&5 -$as_echo_n "checking if c++ interface enabled... " >&6; } - -# Check whether --enable-cxx was given. -if test "${enable_cxx+set}" = set; then : - enableval=$enable_cxx; HDF_CXX=$enableval -fi - - -if test "X$HDF_CXX" = "Xyes"; then - echo "yes" - HDF5_INTERFACES="$HDF5_INTERFACES c++" - - ## Change to the C++ language - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - # Checking if C++ needs old style header files in includes - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX needs old style header files in includes" >&5 -$as_echo_n "checking if $CXX needs old style header files in includes... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include - -int main(void) { return 0; } - -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME" - AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - # Checking if C++ can handle namespaces - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle namespaces" >&5 -$as_echo_n "checking if $CXX can handle namespaces... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -namespace H5 { -int fnord; -} - -int main(void) { - using namespace H5; - fnord = 37; - return 0; -} - -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE" - AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - # Checking if C++ has offsetof extension - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX has offsetof extension" >&5 -$as_echo_n "checking if $CXX has offsetof extension... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - struct index_st - { - unsigned char type; - unsigned char num; - unsigned int len; - }; - typedef struct index_st index_t; - int x,y; - x = offsetof(struct index_st, len); - y = offsetof(index_t, num) - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define CXX_HAVE_OFFSETOF 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - # if C++ can handle static cast - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle static cast" >&5 -$as_echo_n "checking if $CXX can handle static cast... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int main(void) { - float test_float; - int test_int; - test_float = 37.0; - test_int = static_cast (test_float); - return 0; -} - -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST" - AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CXX="no" -fi - -## Change back to the C language -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -## ---------------------------------------------------------------------- -## Check if they would like the High Level library compiled -## - - HL="" -## name of fortran folder inside "hl", if FORTRAN compile is requested - HL_FOR="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if high level library is enabled" >&5 -$as_echo_n "checking if high level library is enabled... " >&6; } -# Check whether --enable-hl was given. -if test "${enable_hl+set}" = set; then : - enableval=$enable_hl; HDF5_HL=$enableval -else - HDF5_HL=yes -fi - - -if test "X$HDF5_HL" = "Xyes"; then - echo "yes" - HL="hl" - -$as_echo "#define INCLUDE_HL 1" >>confdefs.h - -else - echo "no" -fi - - -## ---------------------------------------------------------------------- -## Check which archiving tool to use. This needs to be done before -## the AM_PROG_LIBTOOL macro. -## - -if test -z "$AR"; then - for ac_prog in ar xar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break -done -test -n "$AR" || AR=":" - -fi - - -## Export the AR macro so that it will be placed in the libtool file -## correctly. -export AR - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - - - - -## ---------------------------------------------------------------------- -## Set up ${TR} which is used to process DEBUG_PKG. - -# Extract the first word of "tr", so it can be a program name with args. -set dummy tr; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_TR+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $TR in - [\\/]* | ?:[\\/]*) - ac_cv_path_TR="$TR" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -TR=$ac_cv_path_TR -if test -n "$TR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5 -$as_echo "$TR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -## ---------------------------------------------------------------------- -## Check that time can be used with srcdir. This is okay on most systems, -## but seems to cause problems on Cygwin. -## The solution on Cygwin is not to record execution time for tests. -## -## Note: This is still true as of Cygwin 1.7.32 (Aug 2014) on both 32- -## and 64-bit platforms. Given how long this has been true, it seems -## unlikely to change, but we should probably re-test this periodically. - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if srcdir= and time commands work together" >&5 -$as_echo_n "checking if srcdir= and time commands work together... " >&6; } - - -TIME=time -TIME_TEST=`foo="bar" ${TIME} echo 'baz' 2> /dev/null | grep baz` - -if test "X${TIME_TEST}" = "Xbaz"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - TIME= -fi - - -## The following variables are used to distinguish between building a -## serial and parallel library. -## -## HAVE_PARALLEL -- defined in H5config.h if we are building -## a parallel library even if configure wasn't -## able to find some header file or library that -## might be required. This is defined if the -## user explicitly states -## that a parallel library is being built by supplying -## the `--enable-parallel' configure switch. -## -## PARALLEL -- This variable is set to a non-null value if -## we're building a parallel version of the library. -## -## RUNSERIAL -- This is a command which will be prepended to -## the executable name to run the executable using -## a single process. For serial versions of the -## library this will normally be empty. For parallel -## versions it might be something like `mpiexec -n 1'. -## The value of this variable is substituted in *.in -## files. -## -## RUNPARALLEL -- This is a command which will be prepended to -## the executable name to run the executable on -## multiple processors. For the serial library the -## value will normally be the empty string. For -## parallel library it should be something like -## "mpiexec -n \$\${NPROCS:=6}" where NPROCS will -## eventually contain the number of processors on which -## to run the executable (the double dollarsigns are to -## protect the expansion until make executes the -## command). The value of this variable is -## substituted in *.in files. -## - - - - - -## ---------------------------------------------------------------------- -## Disable shared libraries on CYGWIN. (LK - 04/16/15) -## A number of tests run by "make check" fail on CYGWIN, so for HDF5 v1.8.15 -## we will change the default for shared libraries to disabled. - - -case "`uname`" in - CYGWIN*) - enable_shared="no" - CHECK_WARN="Shared libraries are not currently supported on CYGWIN." - ;; -esac - -## ---------------------------------------------------------------------- -## Fortran libraries are not currently supported on Mac. Disable them. -## (this is overridable with --enable-unsupported). -## - -H5_FORTRAN_SHARED="no" -if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if shared Fortran libraries are supported" >&5 -$as_echo_n "checking if shared Fortran libraries are supported... " >&6; } - H5_FORTRAN_SHARED="yes" - - ## Disable fortran shared libraries on Mac. (MAM - 03/30/11) - - case "`uname`" in - Darwin*) - H5_FORTRAN_SHARED="no" - CHECK_WARN="Shared Fortran libraries not currently supported on Mac." - ;; - esac - - ## Report results of check(s) - - if test "X${H5_FORTRAN_SHARED}" = "Xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CHECK_WARN" >&5 -$as_echo "$as_me: WARNING: $CHECK_WARN" >&2;} - if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling shared Fortran libraries." >&5 -$as_echo "$as_me: WARNING: Disabling shared Fortran libraries." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: To override this behavior, please use --enable-unsupported configure option." >&5 -$as_echo "$as_me: WARNING: To override this behavior, please use --enable-unsupported configure option." >&2;} - if test "X${enable_static}" = "Xno"; then - as_fn_error $? "both static and shared Fortran libraries are disabled" "$LINENO" 5 - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag" >&5 -$as_echo "$as_me: WARNING: Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag" >&2;} - H5_FORTRAN_SHARED="yes" - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi -fi - - if test "X$H5_FORTRAN_SHARED" = "Xyes"; then - FORTRAN_SHARED_CONDITIONAL_TRUE= - FORTRAN_SHARED_CONDITIONAL_FALSE='#' -else - FORTRAN_SHARED_CONDITIONAL_TRUE='#' - FORTRAN_SHARED_CONDITIONAL_FALSE= -fi - - -## ---------------------------------------------------------------------- -## Create libtool. If shared/static libraries are going to be enabled -## or disabled, it should happen before these macros. - - -## ---------------------------------------------------------------------- -## dlopen - This will use an improved version of libtool -## win32-dll - This will build clean dlls on win32 platforms. -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.6' -macro_revision='2.4.6' - - - - - - - - - - - - - -ltmain=$ac_aux_dir/ltmain.sh - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -rf conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then - reload_cmds=false - fi - ;; - darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -rf conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -if test -z "$lt_DD"; then - ac_path_lt_DD_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_lt_DD" || continue -if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi - $ac_path_lt_DD_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_lt_DD"; then - : - fi -else - ac_cv_path_lt_DD=$lt_DD -fi - -rm -f conftest.i conftest2.i conftest.out -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } - - - - - - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -rf conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - -func_stripname_cnf () -{ - case $2 in - .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; - *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; - esac -} # func_stripname_cnf - - - - - -# Set options -enable_dlopen=yes - - - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - pic_mode=default -fi - - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } - -# Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : - withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_with_aix_soname=aix -fi - - with_aix_soname=$lt_cv_with_aix_soname -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/${ac_tool_prefix}file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC=$CC -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM -r conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM -r conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM -r conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works"; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM -r conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM -r conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM -r conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM -r conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM -r conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - export_dynamic_flag_spec='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='$wl--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - export_dynamic_flag_spec='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test no = "$ld_shlibs"; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct=no - hardcode_direct_absolute=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' $wl-bernotok' - allow_undefined_flag=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test yes = "$GCC"; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test yes = "$lt_cv_prog_compiler__b"; then - archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs=yes - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - else - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='$wl-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='$wl-z,text' - allow_undefined_flag='$wl-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='$wl-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test no = "$ld_shlibs" && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM -r conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM -r conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([A-Za-z]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test yes = "$hardcode_automatic"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && - test no != "$hardcode_minus_L"; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test relink = "$hardcode_action" || - test yes = "$inherit_rpath"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen=shl_load -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen=dlopen -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC - - if test -n "$CXX" && ( test no != "$CXX" && - ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || - (test g++ != "$CXX"))); then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -reload_flag_CXX=$reload_flag -reload_cmds_CXX=$reload_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_caught_CXX_error"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM -r conftest* - - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - compiler_CXX=$CC - func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test yes = "$GXX"; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi - - if test yes = "$GXX"; then - # Set up default GNU C++ configuration - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test yes = "$with_gnu_ld"; then - archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='$wl' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct_CXX=no - hardcode_direct_absolute_CXX=no - ;; - esac - - if test yes = "$GXX"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag=$shared_flag' $wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec_CXX='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - # The "-G" linker flag allows undefined symbols. - no_undefined_flag_CXX='-bernotok' - # Determine the default libpath from the value encoded in an empty - # executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__CXX -fi - - hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__CXX -fi - - hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' $wl-bernotok' - allow_undefined_flag_CXX=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - fi - archive_cmds_need_lc_CXX=yes - archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared - # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_CXX=' ' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=yes - file_list_spec_CXX='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' - enable_shared_with_static_runtimes_CXX=yes - # Don't use ranlib - old_postinstall_cmds_CXX='chmod 644 $oldlib' - postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - export_dynamic_flag_spec_CXX='$wl--export-all-symbols' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - - - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec_CXX='' - fi - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - if test yes != "$lt_cv_apple_cc_single_mod"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" - fi - - else - ld_shlibs_CXX=no - fi - - ;; - - os2*) - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_minus_L_CXX=yes - allow_undefined_flag_CXX=unsupported - shrext_cmds=.dll - archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes_CXX=yes - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - - haiku*) - archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs_CXX=yes - ;; - - hpux9*) - hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='$wl-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='$wl-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5].* | *pgcpp\ [1-5].*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object_CXX=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='$wl-E' - whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - ld_shlibs_CXX=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' - archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes,no = "$GXX,$with_gnu_ld"; then - allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test yes,no = "$GXX,$with_gnu_ld"; then - no_undefined_flag_CXX=' $wl-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require '-G' NOT '-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='$wl-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='$wl-z,text' - allow_undefined_flag_CXX='$wl-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ - '"$old_archive_cmds_CXX" - reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ - '"$reload_cmds_CXX" - ;; - *) - archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } - test no = "$ld_shlibs_CXX" && can_build_shared=no - - GCC_CXX=$GXX - LD_CXX=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF - - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test x-L = "$p" || - test x-R = "$p"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test no = "$pre_test_object_deps_done"; then - case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX=$prev$p - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX=$prev$p - else - postdeps_CXX="${postdeps_CXX} $prev$p" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test no = "$pre_test_object_deps_done"; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX=$p - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX=$p - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - - - # C++ specific cases for pic, static, wl, etc. - if test yes = "$GXX"; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - lt_prog_compiler_pic_CXX='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_CXX='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static_CXX='$wl-static' - ;; - esac - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='$wl-a ${wl}archive' - if test ia64 != "$host_cpu"; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='$wl-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64, which still supported -KPIC. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } -lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM -r conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then - : -else - lt_prog_compiler_static_CXX= -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM -r conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM -r conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM -r conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM -r conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM -r conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX=$ltdll_cmds - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - ;; - esac - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } -test no = "$ld_shlibs_CXX" && can_build_shared=no - -with_gnu_ld_CXX=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM -r conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc_CXX=no - else - lt_cv_archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM -r conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } - archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec_CXX='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test yes = "$hardcode_automatic_CXX"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct_CXX" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && - test no != "$hardcode_minus_L_CXX"; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } - -if test relink = "$hardcode_action_CXX" || - test yes = "$inherit_rpath_CXX"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test yes != "$_lt_caught_CXX_error" - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - -if test -z "$FC" || test no = "$FC"; then - _lt_disable_FC=yes -fi - -archive_cmds_need_lc_FC=no -allow_undefined_flag_FC= -always_export_symbols_FC=no -archive_expsym_cmds_FC= -export_dynamic_flag_spec_FC= -hardcode_direct_FC=no -hardcode_direct_absolute_FC=no -hardcode_libdir_flag_spec_FC= -hardcode_libdir_separator_FC= -hardcode_minus_L_FC=no -hardcode_automatic_FC=no -inherit_rpath_FC=no -module_cmds_FC= -module_expsym_cmds_FC= -link_all_deplibs_FC=unknown -old_archive_cmds_FC=$old_archive_cmds -reload_flag_FC=$reload_flag -reload_cmds_FC=$reload_cmds -no_undefined_flag_FC= -whole_archive_flag_spec_FC= -enable_shared_with_static_runtimes_FC=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -objext_FC=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_FC"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM -r conftest* - - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - compiler_FC=$CC - func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - - if test -n "$compiler"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - GCC_FC=$ac_cv_fc_compiler_gnu - LD_FC=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_FC= -postdep_objects_FC= -predeps_FC= -postdeps_FC= -compiler_lib_search_path_FC= - -cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF - - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test x-L = "$p" || - test x-R = "$p"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test no = "$pre_test_object_deps_done"; then - case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_FC"; then - compiler_lib_search_path_FC=$prev$p - else - compiler_lib_search_path_FC="${compiler_lib_search_path_FC} $prev$p" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_FC"; then - postdeps_FC=$prev$p - else - postdeps_FC="${postdeps_FC} $prev$p" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test no = "$pre_test_object_deps_done"; then - if test -z "$predep_objects_FC"; then - predep_objects_FC=$p - else - predep_objects_FC="$predep_objects_FC $p" - fi - else - if test -z "$postdep_objects_FC"; then - postdep_objects_FC=$p - else - postdep_objects_FC="$postdep_objects_FC $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling FC test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken - - -case " $postdeps_FC " in -*" -lc "*) archive_cmds_need_lc_FC=no ;; -esac - compiler_lib_search_dirs_FC= -if test -n "${compiler_lib_search_path_FC}"; then - compiler_lib_search_dirs_FC=`echo " ${compiler_lib_search_path_FC}" | $SED -e 's! -L! !g' -e 's!^ !!'` -fi - - - - - - - - - - - - - - lt_prog_compiler_wl_FC= -lt_prog_compiler_pic_FC= -lt_prog_compiler_static_FC= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_static_FC='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_FC='-Bstatic' - fi - lt_prog_compiler_pic_FC='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_FC='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic_FC='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_FC='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static_FC='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_FC='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static_FC= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_FC='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_FC=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_FC='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_FC=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic_FC='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl_FC='-Xlinker ' - if test -n "$lt_prog_compiler_pic_FC"; then - lt_prog_compiler_pic_FC="-Xcompiler $lt_prog_compiler_pic_FC" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_FC='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_FC='-Bstatic' - else - lt_prog_compiler_static_FC='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_FC='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl_FC='-Wl,-Wl,,' - lt_prog_compiler_pic_FC='-PIC' - lt_prog_compiler_static_FC='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_FC='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static_FC='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_FC='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_FC='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_FC='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_FC='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_FC='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='--shared' - lt_prog_compiler_static_FC='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl_FC='-Wl,-Wl,,' - lt_prog_compiler_pic_FC='-PIC' - lt_prog_compiler_static_FC='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fpic' - lt_prog_compiler_static_FC='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_FC='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_FC='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-qpic' - lt_prog_compiler_static_FC='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - lt_prog_compiler_wl_FC='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - lt_prog_compiler_wl_FC='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - lt_prog_compiler_wl_FC='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fPIC' - lt_prog_compiler_static_FC='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-fpic' - lt_prog_compiler_static_FC='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_FC='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_FC='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_FC='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static_FC='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl_FC='-Qoption ld ';; - *) - lt_prog_compiler_wl_FC='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_FC='-Qoption ld ' - lt_prog_compiler_pic_FC='-PIC' - lt_prog_compiler_static_FC='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_FC='-Kconform_pic' - lt_prog_compiler_static_FC='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_pic_FC='-KPIC' - lt_prog_compiler_static_FC='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_FC='-Wl,' - lt_prog_compiler_can_build_shared_FC=no - ;; - - uts4*) - lt_prog_compiler_pic_FC='-pic' - lt_prog_compiler_static_FC='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_FC=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_FC= - ;; - *) - lt_prog_compiler_pic_FC="$lt_prog_compiler_pic_FC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_FC=$lt_prog_compiler_pic_FC -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_FC" >&5 -$as_echo "$lt_cv_prog_compiler_pic_FC" >&6; } -lt_prog_compiler_pic_FC=$lt_cv_prog_compiler_pic_FC - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_FC works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_FC works... " >&6; } -if ${lt_cv_prog_compiler_pic_works_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_FC=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_FC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_FC=yes - fi - fi - $RM -r conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_FC" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_FC" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works_FC"; then - case $lt_prog_compiler_pic_FC in - "" | " "*) ;; - *) lt_prog_compiler_pic_FC=" $lt_prog_compiler_pic_FC" ;; - esac -else - lt_prog_compiler_pic_FC= - lt_prog_compiler_can_build_shared_FC=no -fi - -fi - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_FC eval lt_tmp_static_flag=\"$lt_prog_compiler_static_FC\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_FC=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_FC=yes - fi - else - lt_cv_prog_compiler_static_works_FC=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_FC" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_FC" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works_FC"; then - : -else - lt_prog_compiler_static_FC= -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_FC=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_FC=yes - fi - fi - chmod u+w . 2>&5 - $RM -r conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM -r conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_FC" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_FC" >&6; } - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_FC=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_FC=yes - fi - fi - chmod u+w . 2>&5 - $RM -r conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM -r conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_FC" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_FC" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o_FC" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM -r conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag_FC= - always_export_symbols_FC=no - archive_cmds_FC= - archive_expsym_cmds_FC= - compiler_needs_object_FC=no - enable_shared_with_static_runtimes_FC=no - export_dynamic_flag_spec_FC= - export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic_FC=no - hardcode_direct_FC=no - hardcode_direct_absolute_FC=no - hardcode_libdir_flag_spec_FC= - hardcode_libdir_separator_FC= - hardcode_minus_L_FC=no - hardcode_shlibpath_var_FC=unsupported - inherit_rpath_FC=no - link_all_deplibs_FC=unknown - module_cmds_FC= - module_expsym_cmds_FC= - old_archive_from_new_cmds_FC= - old_archive_from_expsyms_cmds_FC= - thread_safe_flag_spec_FC= - whole_archive_flag_spec_FC= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_FC= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms_FC='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_FC=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_FC='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_FC=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec_FC= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs_FC=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='' - ;; - m68k) - archive_cmds_FC='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_minus_L_FC=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_FC=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_FC='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs_FC=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, FC) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_FC='-L$libdir' - export_dynamic_flag_spec_FC='$wl--export-all-symbols' - allow_undefined_flag_FC=unsupported - always_export_symbols_FC=no - enable_shared_with_static_runtimes_FC=yes - export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_FC='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds_FC='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_FC=no - fi - ;; - - haiku*) - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs_FC=yes - ;; - - os2*) - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_minus_L_FC=yes - allow_undefined_flag_FC=unsupported - shrext_cmds=.dll - archive_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds_FC='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes_FC=yes - ;; - - interix[3-9]*) - hardcode_direct_FC=no - hardcode_shlibpath_var_FC=no - hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir' - export_dynamic_flag_spec_FC='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_FC='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec_FC= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object_FC=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_FC='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object_FC=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds_FC='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - export_dynamic_flag_spec_FC='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec_FC='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - archive_cmds_FC='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs_FC=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs_FC=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_FC=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_FC=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_FC=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_FC='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_FC=no - fi - ;; - esac - - if test no = "$ld_shlibs_FC"; then - runpath_var= - hardcode_libdir_flag_spec_FC= - export_dynamic_flag_spec_FC= - whole_archive_flag_spec_FC= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_FC=unsupported - always_export_symbols_FC=yes - archive_expsym_cmds_FC='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_FC=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_FC=unsupported - fi - ;; - - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_FC='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_FC='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_FC='' - hardcode_direct_FC=yes - hardcode_direct_absolute_FC=yes - hardcode_libdir_separator_FC=':' - link_all_deplibs_FC=yes - file_list_spec_FC='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct_FC=no - hardcode_direct_absolute_FC=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_FC=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_FC=yes - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_libdir_separator_FC= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec_FC='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_FC=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_FC='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__FC"; then - lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__FC"; then - lt_cv_aix_libpath__FC=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__FC -fi - - hardcode_libdir_flag_spec_FC='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec_FC='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag_FC="-z nodefs" - archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__FC"; then - lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__FC"; then - lt_cv_aix_libpath__FC=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__FC -fi - - hardcode_libdir_flag_spec_FC='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_FC=' $wl-bernotok' - allow_undefined_flag_FC=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_FC='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_FC='$convenience' - fi - archive_cmds_need_lc_FC=yes - archive_expsym_cmds_FC='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='' - ;; - m68k) - archive_cmds_FC='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_minus_L_FC=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec_FC=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec_FC=' ' - allow_undefined_flag_FC=unsupported - always_export_symbols_FC=yes - file_list_spec_FC='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds_FC='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds_FC='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, FC)='true' - enable_shared_with_static_runtimes_FC=yes - exclude_expsyms_FC='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds_FC='chmod 644 $oldlib' - postlink_cmds_FC='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec_FC=' ' - allow_undefined_flag_FC=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds_FC='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes_FC=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc_FC=no - hardcode_direct_FC=no - hardcode_automatic_FC=yes - hardcode_shlibpath_var_FC=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec_FC='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - compiler_needs_object_FC=yes - else - whole_archive_flag_spec_FC='' - fi - link_all_deplibs_FC=yes - allow_undefined_flag_FC=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds_FC="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds_FC="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - - else - ld_shlibs_FC=no - fi - - ;; - - dgux*) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_shlibpath_var_FC=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_FC='-R$libdir' - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_FC=yes - hardcode_minus_L_FC=yes - hardcode_shlibpath_var_FC=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_FC='-R$libdir' - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no - ;; - - hpux9*) - if test yes = "$GCC"; then - archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds_FC='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir' - hardcode_libdir_separator_FC=: - hardcode_direct_FC=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_FC=yes - export_dynamic_flag_spec_FC='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_FC='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir' - hardcode_libdir_separator_FC=: - hardcode_direct_FC=yes - hardcode_direct_absolute_FC=yes - export_dynamic_flag_spec_FC='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_FC=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds_FC='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_FC='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_FC='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_FC='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir' - hardcode_libdir_separator_FC=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_FC=no - hardcode_shlibpath_var_FC=no - ;; - *) - hardcode_direct_FC=yes - hardcode_direct_absolute_FC=yes - export_dynamic_flag_spec_FC='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_FC=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat > conftest.$ac_ext <<_ACEOF - - subroutine foo - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - else - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc_FC='no' - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - hardcode_libdir_separator_FC=: - inherit_rpath_FC=yes - link_all_deplibs_FC=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs_FC=yes - archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_FC='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_FC='-R$libdir' - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no - ;; - - newsos6) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_FC=yes - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - hardcode_libdir_separator_FC=: - hardcode_shlibpath_var_FC=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_FC=yes - hardcode_shlibpath_var_FC=no - hardcode_direct_absolute_FC=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir' - export_dynamic_flag_spec_FC='$wl-E' - else - archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir' - fi - else - ld_shlibs_FC=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_minus_L_FC=yes - allow_undefined_flag_FC=unsupported - shrext_cmds=.dll - archive_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds_FC='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes_FC=yes - ;; - - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag_FC=' $wl-expect_unresolved $wl\*' - archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag_FC=' -expect_unresolved \*' - archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc_FC='no' - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - hardcode_libdir_separator_FC=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag_FC=' $wl-expect_unresolved $wl\*' - archive_cmds_FC='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir' - else - allow_undefined_flag_FC=' -expect_unresolved \*' - archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds_FC='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_FC='-rpath $libdir' - fi - archive_cmds_need_lc_FC='no' - hardcode_libdir_separator_FC=: - ;; - - solaris*) - no_undefined_flag_FC=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds_FC='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds_FC='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds_FC='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec_FC='-R$libdir' - hardcode_shlibpath_var_FC=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec_FC='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec_FC='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_FC=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_FC='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_FC='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_direct_FC=yes - hardcode_minus_L_FC=yes - hardcode_shlibpath_var_FC=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_FC=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_FC='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_FC='$CC -r -o $output$reload_objs' - hardcode_direct_FC=no - ;; - motorola) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_FC=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_FC=no - ;; - - sysv4.3*) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_FC=no - export_dynamic_flag_spec_FC='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_FC=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_FC=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_FC='$wl-z,text' - archive_cmds_need_lc_FC=no - hardcode_shlibpath_var_FC=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds_FC='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_FC='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_FC='$wl-z,text' - allow_undefined_flag_FC='$wl-z,nodefs' - archive_cmds_need_lc_FC=no - hardcode_shlibpath_var_FC=no - hardcode_libdir_flag_spec_FC='$wl-R,$libdir' - hardcode_libdir_separator_FC=':' - link_all_deplibs_FC=yes - export_dynamic_flag_spec_FC='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds_FC='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_FC='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_FC='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_FC='-L$libdir' - hardcode_shlibpath_var_FC=no - ;; - - *) - ld_shlibs_FC=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec_FC='$wl-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_FC" >&5 -$as_echo "$ld_shlibs_FC" >&6; } -test no = "$ld_shlibs_FC" && can_build_shared=no - -with_gnu_ld_FC=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_FC" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_FC=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds_FC in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM -r conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_FC - pic_flag=$lt_prog_compiler_pic_FC - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_FC - allow_undefined_flag_FC= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc_FC=no - else - lt_cv_archive_cmds_need_lc_FC=yes - fi - allow_undefined_flag_FC=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM -r conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_FC" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc_FC" >&6; } - archive_cmds_need_lc_FC=$lt_cv_archive_cmds_need_lc_FC - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec_FC='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_FC\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_FC\"" - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_FC= -if test -n "$hardcode_libdir_flag_spec_FC" || - test -n "$runpath_var_FC" || - test yes = "$hardcode_automatic_FC"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct_FC" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, FC)" && - test no != "$hardcode_minus_L_FC"; then - # Linking always hardcodes the temporary library directory. - hardcode_action_FC=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_FC=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_FC=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_FC" >&5 -$as_echo "$hardcode_action_FC" >&6; } - -if test relink = "$hardcode_action_FC" || - test yes = "$inherit_rpath_FC"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_FC" - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - -## ---------------------------------------------------------------------- -## Check if we should install only statically linked executables. -## This check needs to occur after libtool is initialized because -## we check a libtool cache value and may issue a warning based -## on its result. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should install only statically linked executables" >&5 -$as_echo_n "checking if we should install only statically linked executables... " >&6; } -# Check whether --enable-static_exec was given. -if test "${enable_static_exec+set}" = set; then : - enableval=$enable_static_exec; STATIC_EXEC=$enableval -fi - - -if test "X$STATIC_EXEC" = "Xyes"; then - echo "yes" - ## Issue a warning if -static flag is not supported. - if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then - echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries." - LT_STATIC_EXEC="" - else - LT_STATIC_EXEC="-all-static" - fi -else - echo "no" - LT_STATIC_EXEC="" -fi - if test "X$LT_STATIC_EXEC" = X; then - USE_PLUGINS_CONDITIONAL_TRUE= - USE_PLUGINS_CONDITIONAL_FALSE='#' -else - USE_PLUGINS_CONDITIONAL_TRUE='#' - USE_PLUGINS_CONDITIONAL_FALSE= -fi - - - - -## Fix up the INSTALL macro if it's a relative path. We want the -## full-path to the binary instead. -case "$INSTALL" in - *install-sh*) - INSTALL='\${top_srcdir}/bin/install-sh -c' - ;; -esac - -## ---------------------------------------------------------------------- -## Some users have reported problems with libtool's use of '-Wl,-rpath' to -## link shared libraries in nondefault directories. Allow users to -## disable embedding the rpath information in the executables and to -## instead solely rely on the information in LD_LIBRARY_PATH. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -Wl,-rpath should be used to link shared libs in nondefault directories" >&5 -$as_echo_n "checking if -Wl,-rpath should be used to link shared libs in nondefault directories... " >&6; } -# Check whether --enable-sharedlib-rpath was given. -if test "${enable_sharedlib_rpath+set}" = set; then : - enableval=$enable_sharedlib_rpath; RPATH=$enableval -fi - - -case "X-$RPATH" in - X-no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - runpath_var= - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_into_libs=no - ;; - X-|X-yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 -$as_echo "error" >&6; } - as_fn_error $? "\'$enableval\' is not a valid rpath type" "$LINENO" 5 - ;; -esac - -## ---------------------------------------------------------------------- -## Production flags? Save the value in $CONFIG_MODE so we have it for -## the record. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for production mode" >&5 -$as_echo_n "checking for production mode... " >&6; } -# Check whether --enable-production was given. -if test "${enable_production+set}" = set; then : - enableval=$enable_production; -fi - - -case "X-$enable_production" in - X-yes) - enable_production="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: production" >&5 -$as_echo "production" >&6; } - CONFIG_MODE=production - H5_CFLAGS="$H5_CFLAGS $PROD_CFLAGS" - H5_CPPFLAGS="$H5_CPPFLAGS $PROD_CPPFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $PROD_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $PROD_FCFLAGS" - ;; - X-|X-no) - enable_production="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: development" >&5 -$as_echo "development" >&6; } - CONFIG_MODE=development - H5_CFLAGS="$H5_CFLAGS $DEBUG_CFLAGS" - H5_CPPFLAGS="$H5_CPPFLAGS $DEBUG_CPPFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $DEBUG_FCFLAGS" - ;; - X-pg|X-profile) - enable_production="profile" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: profile" >&5 -$as_echo "profile" >&6; } - CONFIG_MODE=profile - H5_CFLAGS="$H5_CFLAGS $PROFILE_CFLAGS" - H5_CPPFLAGS="$H5_CPPFLAGS $PROFILE_CPPFLAGS" - H5_CXXFLAGS="$H5_CXXFLAGS $PROFILE_CXXFLAGS" - H5_FCFLAGS="$H5_FCFLAGS $PROFILE_FCFLAGS" - ;; - *) - enable_production="user-defined" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: user-defined" >&5 -$as_echo "user-defined" >&6; } - CONFIG_MODE="$enableval" - ;; -esac - -## ---------------------------------------------------------------------- -## Check for system libraries. "dl" stands for dynamically loaded library -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceil in -lm" >&5 -$as_echo_n "checking for ceil in -lm... " >&6; } -if ${ac_cv_lib_m_ceil+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ceil (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return ceil (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_ceil=yes -else - ac_cv_lib_m_ceil=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_ceil" >&5 -$as_echo "$ac_cv_lib_m_ceil" >&6; } -if test "x$ac_cv_lib_m_ceil" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDL 1 -_ACEOF - - LIBS="-ldl $LIBS" - -fi - - -## ---------------------------------------------------------------------- -## Check for system header files. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - - -## Unix -for ac_header in sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -for ac_header in sys/socket.h sys/types.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -for ac_header in stddef.h setjmp.h features.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -for ac_header in dirent.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default" -if test "x$ac_cv_header_dirent_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DIRENT_H 1 -_ACEOF - -fi - -done - -for ac_header in stdint.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDINT_H 1 -_ACEOF - C9x=yes -fi - -done - - -## Darwin -for ac_header in mach/mach_time.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "mach/mach_time.h" "ac_cv_header_mach_mach_time_h" "$ac_includes_default" -if test "x$ac_cv_header_mach_mach_time_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MACH_MACH_TIME_H 1 -_ACEOF - -fi - -done - -## Also need to detect Darwin for pubconf -case $host_os in - darwin*) - -$as_echo "#define HAVE_DARWIN 1" >>confdefs.h - - ;; -esac - -## Windows -case "`uname`" in - CYGWIN*) - for ac_header in io.h sys/timeb.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - ;; - MINGW*) - for ac_header in io.h winsock2.h sys/timeb.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 -$as_echo_n "checking for main in -lws2_32... " >&6; } -if ${ac_cv_lib_ws2_32_main+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lws2_32 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ws2_32_main=yes -else - ac_cv_lib_ws2_32_main=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 -$as_echo "$ac_cv_lib_ws2_32_main" >&6; } -if test "x$ac_cv_lib_ws2_32_main" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBWS2_32 1 -_ACEOF - - LIBS="-lws2_32 $LIBS" - -fi -ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main - - ;; - *) - for ac_header in io.h winsock2.h sys/timeb.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - ;; -esac - -## ---------------------------------------------------------------------- -## Some platforms require that all symbols are resolved when a library -## is linked. We can use the -no-undefined flag to tell libtool that -## it will be able to build shared libraries on these architectures, -## as it will not do so by default. -## -if test "X${enable_shared}" = "Xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool needs -no-undefined flag to build shared libraries" >&5 -$as_echo_n "checking if libtool needs -no-undefined flag to build shared libraries... " >&6; } - case "`uname`" in - CYGWIN*|MINGW*|AIX*) - ## Add in the -no-undefined flag to LDFLAGS for libtool. - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - H5_LDFLAGS="$H5_LDFLAGS -no-undefined" - ;; - *) - ## Don't add in anything. - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - -## ---------------------------------------------------------------------- -## Use the macro _AC_SYS_LARGEFILE_MACRO_VALUE to test defines -## that might need to be set for largefile support to behave -## correctly. This macro is defined in acsite.m4 and overrides -## the version provided by Autoconf (as of v2.65). The custom -## macro additionally adds the appropriate defines to AM_CPPFLAGS -## so that later configure checks have them visible. - -## Check for _FILE_OFFSET_BITS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if ${ac_cv_sys_file_offset_bits+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=64; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF - - AM_CPPFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits $AM_CPPFLAGS";; -esac -rm -rf conftest* - -## Check for _LARGE_FILES -if test "$ac_cv_sys_file_offset_bits" = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if ${ac_cv_sys_large_files+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=1; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF - - AM_CPPFLAGS="-D_LARGE_FILES=$ac_cv_sys_large_files $AM_CPPFLAGS";; -esac -rm -rf conftest* -fi - -## ---------------------------------------------------------------------- -## Add necessary defines for Linux Systems. -## -case "$host_cpu-$host_vendor-$host_os" in - *linux*) - ## Make available various LFS-related routines using the following - ## _LARGEFILE*_SOURCE macros. - AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS" - - ## Add POSIX support on Linux systems, so defines - ## __USE_POSIX, which is required to get the prototype for fdopen - ## defined correctly in . - ## - ## This flag was removed from h5cc as of 2009-10-17 when it was found - ## that the flag broke compiling netCDF-4 code with h5cc, but kept in - ## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen - ## is used only by H5_debug_mask which is used only when debugging in - ## H5_init_library (all in H5.c). When the flag was removed this was - ## the only compile failure noted. - ## - ## This was originally defined as _POSIX_SOURCE which was updated to - ## _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX - ## functionality so clock_gettime and CLOCK_MONOTONIC are defined - ## correctly. This was later updated to 200112L so that - ## posix_memalign() is visible for the direct VFD code on Linux - ## systems. - ## - ## POSIX feature information can be found in the gcc manual at: - ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" - - ## Need to add this so that O_DIRECT is visible for the direct - ## VFD on Linux systems. - H5_CPPFLAGS="-D_GNU_SOURCE $H5_CPPFLAGS" - ;; -esac - -## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible -## for configure checks. -## Note: Both will be restored by the end of configure. -CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS" -CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS" - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -off64_t n = 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - for ac_func in lseek64 fseeko64 ftello64 ftruncate64 -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipping test for lseek64(), fseeko64 , ftello64, ftruncate64() because off64_t is not defined" >&5 -$as_echo "skipping test for lseek64(), fseeko64 , ftello64, ftruncate64() because off64_t is not defined" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -for ac_func in fseeko ftello -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -struct stat64 sb; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - for ac_func in stat64 fstat64 -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipping test for stat64() and fstat64()" >&5 -$as_echo "skipping test for stat64() and fstat64()" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -## Checkpoint the cache -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -## Posix.1g types (C9x) -cat >>confdefs.h <<\EOF -#include -EOF - -if test "X$C9x" = "Xyes"; then - cat >>confdefs.h <<\EOF -#include -EOF -fi - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int8_t" >&5 -$as_echo_n "checking size of int8_t... " >&6; } -if ${ac_cv_sizeof_int8_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int8_t))" "ac_cv_sizeof_int8_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int8_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int8_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int8_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int8_t" >&5 -$as_echo "$ac_cv_sizeof_int8_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT8_T $ac_cv_sizeof_int8_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint8_t" >&5 -$as_echo_n "checking size of uint8_t... " >&6; } -if ${ac_cv_sizeof_uint8_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint8_t))" "ac_cv_sizeof_uint8_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_uint8_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (uint8_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_uint8_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint8_t" >&5 -$as_echo "$ac_cv_sizeof_uint8_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINT8_T $ac_cv_sizeof_uint8_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int_least8_t" >&5 -$as_echo_n "checking size of int_least8_t... " >&6; } -if ${ac_cv_sizeof_int_least8_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int_least8_t))" "ac_cv_sizeof_int_least8_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int_least8_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int_least8_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int_least8_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_least8_t" >&5 -$as_echo "$ac_cv_sizeof_int_least8_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT_LEAST8_T $ac_cv_sizeof_int_least8_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint_least8_t" >&5 -$as_echo_n "checking size of uint_least8_t... " >&6; } -if ${ac_cv_sizeof_uint_least8_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint_least8_t))" "ac_cv_sizeof_uint_least8_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_uint_least8_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (uint_least8_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_uint_least8_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint_least8_t" >&5 -$as_echo "$ac_cv_sizeof_uint_least8_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINT_LEAST8_T $ac_cv_sizeof_uint_least8_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int_fast8_t" >&5 -$as_echo_n "checking size of int_fast8_t... " >&6; } -if ${ac_cv_sizeof_int_fast8_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int_fast8_t))" "ac_cv_sizeof_int_fast8_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int_fast8_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int_fast8_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int_fast8_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_fast8_t" >&5 -$as_echo "$ac_cv_sizeof_int_fast8_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT_FAST8_T $ac_cv_sizeof_int_fast8_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint_fast8_t" >&5 -$as_echo_n "checking size of uint_fast8_t... " >&6; } -if ${ac_cv_sizeof_uint_fast8_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint_fast8_t))" "ac_cv_sizeof_uint_fast8_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_uint_fast8_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (uint_fast8_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_uint_fast8_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint_fast8_t" >&5 -$as_echo "$ac_cv_sizeof_uint_fast8_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINT_FAST8_T $ac_cv_sizeof_uint_fast8_t -_ACEOF - - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int16_t" >&5 -$as_echo_n "checking size of int16_t... " >&6; } -if ${ac_cv_sizeof_int16_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int16_t))" "ac_cv_sizeof_int16_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int16_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int16_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int16_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int16_t" >&5 -$as_echo "$ac_cv_sizeof_int16_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT16_T $ac_cv_sizeof_int16_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint16_t" >&5 -$as_echo_n "checking size of uint16_t... " >&6; } -if ${ac_cv_sizeof_uint16_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint16_t))" "ac_cv_sizeof_uint16_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_uint16_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (uint16_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_uint16_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint16_t" >&5 -$as_echo "$ac_cv_sizeof_uint16_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINT16_T $ac_cv_sizeof_uint16_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int_least16_t" >&5 -$as_echo_n "checking size of int_least16_t... " >&6; } -if ${ac_cv_sizeof_int_least16_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int_least16_t))" "ac_cv_sizeof_int_least16_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int_least16_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int_least16_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int_least16_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_least16_t" >&5 -$as_echo "$ac_cv_sizeof_int_least16_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT_LEAST16_T $ac_cv_sizeof_int_least16_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint_least16_t" >&5 -$as_echo_n "checking size of uint_least16_t... " >&6; } -if ${ac_cv_sizeof_uint_least16_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint_least16_t))" "ac_cv_sizeof_uint_least16_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_uint_least16_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (uint_least16_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_uint_least16_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint_least16_t" >&5 -$as_echo "$ac_cv_sizeof_uint_least16_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINT_LEAST16_T $ac_cv_sizeof_uint_least16_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int_fast16_t" >&5 -$as_echo_n "checking size of int_fast16_t... " >&6; } -if ${ac_cv_sizeof_int_fast16_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int_fast16_t))" "ac_cv_sizeof_int_fast16_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int_fast16_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int_fast16_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int_fast16_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_fast16_t" >&5 -$as_echo "$ac_cv_sizeof_int_fast16_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT_FAST16_T $ac_cv_sizeof_int_fast16_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint_fast16_t" >&5 -$as_echo_n "checking size of uint_fast16_t... " >&6; } -if ${ac_cv_sizeof_uint_fast16_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint_fast16_t))" "ac_cv_sizeof_uint_fast16_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_uint_fast16_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (uint_fast16_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_uint_fast16_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint_fast16_t" >&5 -$as_echo "$ac_cv_sizeof_uint_fast16_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINT_FAST16_T $ac_cv_sizeof_uint_fast16_t -_ACEOF - - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int32_t" >&5 -$as_echo_n "checking size of int32_t... " >&6; } -if ${ac_cv_sizeof_int32_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int32_t))" "ac_cv_sizeof_int32_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int32_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int32_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int32_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int32_t" >&5 -$as_echo "$ac_cv_sizeof_int32_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT32_T $ac_cv_sizeof_int32_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint32_t" >&5 -$as_echo_n "checking size of uint32_t... " >&6; } -if ${ac_cv_sizeof_uint32_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint32_t))" "ac_cv_sizeof_uint32_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_uint32_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (uint32_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_uint32_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint32_t" >&5 -$as_echo "$ac_cv_sizeof_uint32_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINT32_T $ac_cv_sizeof_uint32_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int_least32_t" >&5 -$as_echo_n "checking size of int_least32_t... " >&6; } -if ${ac_cv_sizeof_int_least32_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int_least32_t))" "ac_cv_sizeof_int_least32_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int_least32_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int_least32_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int_least32_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_least32_t" >&5 -$as_echo "$ac_cv_sizeof_int_least32_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT_LEAST32_T $ac_cv_sizeof_int_least32_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint_least32_t" >&5 -$as_echo_n "checking size of uint_least32_t... " >&6; } -if ${ac_cv_sizeof_uint_least32_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint_least32_t))" "ac_cv_sizeof_uint_least32_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_uint_least32_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (uint_least32_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_uint_least32_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint_least32_t" >&5 -$as_echo "$ac_cv_sizeof_uint_least32_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINT_LEAST32_T $ac_cv_sizeof_uint_least32_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int_fast32_t" >&5 -$as_echo_n "checking size of int_fast32_t... " >&6; } -if ${ac_cv_sizeof_int_fast32_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int_fast32_t))" "ac_cv_sizeof_int_fast32_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int_fast32_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int_fast32_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int_fast32_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_fast32_t" >&5 -$as_echo "$ac_cv_sizeof_int_fast32_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT_FAST32_T $ac_cv_sizeof_int_fast32_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint_fast32_t" >&5 -$as_echo_n "checking size of uint_fast32_t... " >&6; } -if ${ac_cv_sizeof_uint_fast32_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint_fast32_t))" "ac_cv_sizeof_uint_fast32_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_uint_fast32_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (uint_fast32_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_uint_fast32_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint_fast32_t" >&5 -$as_echo "$ac_cv_sizeof_uint_fast32_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINT_FAST32_T $ac_cv_sizeof_uint_fast32_t -_ACEOF - - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int64_t" >&5 -$as_echo_n "checking size of int64_t... " >&6; } -if ${ac_cv_sizeof_int64_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int64_t))" "ac_cv_sizeof_int64_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int64_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int64_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int64_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int64_t" >&5 -$as_echo "$ac_cv_sizeof_int64_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT64_T $ac_cv_sizeof_int64_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint64_t" >&5 -$as_echo_n "checking size of uint64_t... " >&6; } -if ${ac_cv_sizeof_uint64_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint64_t))" "ac_cv_sizeof_uint64_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_uint64_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (uint64_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_uint64_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint64_t" >&5 -$as_echo "$ac_cv_sizeof_uint64_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINT64_T $ac_cv_sizeof_uint64_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int_least64_t" >&5 -$as_echo_n "checking size of int_least64_t... " >&6; } -if ${ac_cv_sizeof_int_least64_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int_least64_t))" "ac_cv_sizeof_int_least64_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int_least64_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int_least64_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int_least64_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_least64_t" >&5 -$as_echo "$ac_cv_sizeof_int_least64_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT_LEAST64_T $ac_cv_sizeof_int_least64_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint_least64_t" >&5 -$as_echo_n "checking size of uint_least64_t... " >&6; } -if ${ac_cv_sizeof_uint_least64_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint_least64_t))" "ac_cv_sizeof_uint_least64_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_uint_least64_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (uint_least64_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_uint_least64_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint_least64_t" >&5 -$as_echo "$ac_cv_sizeof_uint_least64_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINT_LEAST64_T $ac_cv_sizeof_uint_least64_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int_fast64_t" >&5 -$as_echo_n "checking size of int_fast64_t... " >&6; } -if ${ac_cv_sizeof_int_fast64_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int_fast64_t))" "ac_cv_sizeof_int_fast64_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int_fast64_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int_fast64_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int_fast64_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_fast64_t" >&5 -$as_echo "$ac_cv_sizeof_int_fast64_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT_FAST64_T $ac_cv_sizeof_int_fast64_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uint_fast64_t" >&5 -$as_echo_n "checking size of uint_fast64_t... " >&6; } -if ${ac_cv_sizeof_uint_fast64_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint_fast64_t))" "ac_cv_sizeof_uint_fast64_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_uint_fast64_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (uint_fast64_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_uint_fast64_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint_fast64_t" >&5 -$as_echo "$ac_cv_sizeof_uint_fast64_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINT_FAST64_T $ac_cv_sizeof_uint_fast64_t -_ACEOF - - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 -$as_echo_n "checking size of size_t... " >&6; } -if ${ac_cv_sizeof_size_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_size_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (size_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_size_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 -$as_echo "$ac_cv_sizeof_size_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of ssize_t" >&5 -$as_echo_n "checking size of ssize_t... " >&6; } -if ${ac_cv_sizeof_ssize_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (ssize_t))" "ac_cv_sizeof_ssize_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_ssize_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (ssize_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_ssize_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_ssize_t" >&5 -$as_echo "$ac_cv_sizeof_ssize_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of ptrdiff_t" >&5 -$as_echo_n "checking size of ptrdiff_t... " >&6; } -if ${ac_cv_sizeof_ptrdiff_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (ptrdiff_t))" "ac_cv_sizeof_ptrdiff_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_ptrdiff_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (ptrdiff_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_ptrdiff_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_ptrdiff_t" >&5 -$as_echo "$ac_cv_sizeof_ptrdiff_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_PTRDIFF_T $ac_cv_sizeof_ptrdiff_t -_ACEOF - - - -cat >>confdefs.h <<\EOF -#include /*for off_t definition*/ -EOF -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 -$as_echo_n "checking size of off_t... " >&6; } -if ${ac_cv_sizeof_off_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_off_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (off_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_off_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 -$as_echo "$ac_cv_sizeof_off_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_OFF_T $ac_cv_sizeof_off_t -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off64_t" >&5 -$as_echo_n "checking size of off64_t... " >&6; } -if ${ac_cv_sizeof_off64_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off64_t))" "ac_cv_sizeof_off64_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_off64_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (off64_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_off64_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off64_t" >&5 -$as_echo "$ac_cv_sizeof_off64_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_OFF64_T $ac_cv_sizeof_off64_t -_ACEOF - - - -## Checkpoint the cache -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -## ---------------------------------------------------------------------- -## Check if the dev_t type is a scalar type (must come after the check for -## sys/types.h) -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if dev_t is scalar" >&5 -$as_echo_n "checking if dev_t is scalar... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -dev_t d1, d2; if(d1==d2) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define DEV_T_IS_SCALAR 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -## ---------------------------------------------------------------------- -## Fake --with-xxx option to allow us to create a help message for the -## following --with-xxx options which can take either a =DIR or =INC,LIB -## specifier. -## - -# Check whether --with-fnord was given. -if test "${with_fnord+set}" = set; then : - withval=$with_fnord; -fi - - -## ---------------------------------------------------------------------- -## Is the dmalloc present? It has a header file `dmalloc.h' and a library -## `-ldmalloc' and their locations might be specified with the `--with-dmalloc' -## command-line switch. The value is an include path and/or a library path. -## If the library path is specified then it must be preceded by a comma. -## - -# Check whether --with-dmalloc was given. -if test "${with_dmalloc+set}" = set; then : - withval=$with_dmalloc; -else - withval=no -fi - - -case $withval in - yes) - HAVE_DMALLOC="yes" - for ac_header in dmalloc.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "dmalloc.h" "ac_cv_header_dmalloc_h" "$ac_includes_default" -if test "x$ac_cv_header_dmalloc_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DMALLOC_H 1 -_ACEOF - -else - unset HAVE_DMALLOC -fi - -done - - if test "x$HAVE_DMALLOC" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dmalloc_shutdown in -ldmalloc" >&5 -$as_echo_n "checking for dmalloc_shutdown in -ldmalloc... " >&6; } -if ${ac_cv_lib_dmalloc_dmalloc_shutdown+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldmalloc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dmalloc_shutdown (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return dmalloc_shutdown (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dmalloc_dmalloc_shutdown=yes -else - ac_cv_lib_dmalloc_dmalloc_shutdown=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dmalloc_dmalloc_shutdown" >&5 -$as_echo "$ac_cv_lib_dmalloc_dmalloc_shutdown" >&6; } -if test "x$ac_cv_lib_dmalloc_dmalloc_shutdown" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDMALLOC 1 -_ACEOF - - LIBS="-ldmalloc $LIBS" - -else - unset HAVE_DMALLOC -fi - - fi - if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then - as_fn_error $? "couldn't find dmalloc library" "$LINENO" 5 - fi - ;; - no) - HAVE_DMALLOC="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dmalloc library" >&5 -$as_echo_n "checking for dmalloc library... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 -$as_echo "suppressed" >&6; } - ;; - *) - HAVE_DMALLOC="yes" - case "$withval" in - *,*) - dmalloc_inc="`echo $withval |cut -f1 -d,`" - dmalloc_lib="`echo $withval |cut -f2 -d, -s`" - ;; - *) - if test -n "$withval"; then - dmalloc_inc="$withval/include" - dmalloc_lib="$withval/lib" - fi - ;; - esac - - saved_CPPFLAGS="$CPPFLAGS" - saved_AM_CPPFLAGS="$AM_CPPFLAGS" - saved_LDFLAGS="$LDFLAGS" - saved_AM_LDFLAGS="$AM_LDFLAGS" - - if test -n "$dmalloc_inc"; then - CPPFLAGS="$CPPFLAGS -I$dmalloc_inc" - AM_CPPFLAGS="$AM_CPPFLAGS -I$dmalloc_inc" - fi - - for ac_header in dmalloc.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "dmalloc.h" "ac_cv_header_dmalloc_h" "$ac_includes_default" -if test "x$ac_cv_header_dmalloc_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DMALLOC_H 1 -_ACEOF - -else - CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" unset HAVE_DMALLOC -fi - -done - - - if test "x$HAVE_DMALLOC" = "xyes"; then - if test -n "$dmalloc_lib"; then - LDFLAGS="$LDFLAGS -L$dmalloc_lib" - AM_LDFLAGS="$AM_LDFLAGS -L$dmalloc_lib" - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dmalloc_shutdown in -ldmalloc" >&5 -$as_echo_n "checking for dmalloc_shutdown in -ldmalloc... " >&6; } -if ${ac_cv_lib_dmalloc_dmalloc_shutdown+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldmalloc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dmalloc_shutdown (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return dmalloc_shutdown (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dmalloc_dmalloc_shutdown=yes -else - ac_cv_lib_dmalloc_dmalloc_shutdown=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dmalloc_dmalloc_shutdown" >&5 -$as_echo "$ac_cv_lib_dmalloc_dmalloc_shutdown" >&6; } -if test "x$ac_cv_lib_dmalloc_dmalloc_shutdown" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDMALLOC 1 -_ACEOF - - LIBS="-ldmalloc $LIBS" - -else - LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_DMALLOC -fi - - fi - - if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then - as_fn_error $? "couldn't find dmalloc library" "$LINENO" 5 - fi - ;; -esac - -## ---------------------------------------------------------------------- -## Is the GNU zlib present? It has a header file `zlib.h' and a library -## `-lz' and their locations might be specified with the `--with-zlib' -## command-line switch. The value is an include path and/or a library path. -## If the library path is specified then it must be preceded by a comma. -## - USE_FILTER_DEFLATE="no" - -# Check whether --with-zlib was given. -if test "${with_zlib+set}" = set; then : - withval=$with_zlib; -else - withval=yes -fi - - -case $withval in - yes) - HAVE_ZLIB="yes" - for ac_header in zlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ZLIB_H 1 -_ACEOF - HAVE_ZLIB_H="yes" -else - unset HAVE_ZLIB -fi - -done - - if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5 -$as_echo_n "checking for compress2 in -lz... " >&6; } -if ${ac_cv_lib_z_compress2+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char compress2 (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return compress2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_compress2=yes -else - ac_cv_lib_z_compress2=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress2" >&5 -$as_echo "$ac_cv_lib_z_compress2" >&6; } -if test "x$ac_cv_lib_z_compress2" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF - - LIBS="-lz $LIBS" - -else - unset HAVE_ZLIB -fi - - fi - if test -z "$HAVE_ZLIB"; then - if test -n "$HDF5_CONFIG_ABORT"; then - as_fn_error $? "couldn't find zlib library" "$LINENO" 5 - fi - else - ac_fn_c_check_func "$LINENO" "compress2" "ac_cv_func_compress2" -if test "x$ac_cv_func_compress2" = xyes; then : - HAVE_COMPRESS2="yes" -fi - - fi - ;; - no) - HAVE_ZLIB="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5 -$as_echo_n "checking for zlib... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 -$as_echo "suppressed" >&6; } - ;; - *) - HAVE_ZLIB="yes" - case "$withval" in - *,*) - zlib_inc="`echo $withval | cut -f1 -d,`" - zlib_lib="`echo $withval | cut -f2 -d, -s`" - ;; - *) - if test -n "$withval"; then - zlib_inc="$withval/include" - zlib_lib="$withval/lib" - fi - ;; - esac - - saved_CPPFLAGS="$CPPFLAGS" - saved_AM_CPPFLAGS="$AM_CPPFLAGS" - saved_LDFLAGS="$LDFLAGS" - saved_AM_LDFLAGS="$AM_LDFLAGS" - - if test -n "$zlib_inc"; then - CPPFLAGS="$CPPFLAGS -I$zlib_inc" - AM_CPPFLAGS="$AM_CPPFLAGS -I$zlib_inc" - fi - - for ac_header in zlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ZLIB_H 1 -_ACEOF - HAVE_ZLIB_H="yes" -else - CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" unset HAVE_ZLIB -fi - -done - - - if test -n "$zlib_lib"; then - LDFLAGS="$LDFLAGS -L$zlib_lib" - AM_LDFLAGS="$AM_LDFLAGS -L$zlib_lib" - fi - - if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5 -$as_echo_n "checking for compress2 in -lz... " >&6; } -if ${ac_cv_lib_z_compress2+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char compress2 (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return compress2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_compress2=yes -else - ac_cv_lib_z_compress2=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress2" >&5 -$as_echo "$ac_cv_lib_z_compress2" >&6; } -if test "x$ac_cv_lib_z_compress2" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF - - LIBS="-lz $LIBS" - -else - LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_ZLIB -fi - - fi - - if test -z "$HAVE_ZLIB"; then - if test -n "$HDF5_CONFIG_ABORT"; then - as_fn_error $? "couldn't find zlib library" "$LINENO" 5 - fi - else - ac_fn_c_check_func "$LINENO" "compress2" "ac_cv_func_compress2" -if test "x$ac_cv_func_compress2" = xyes; then : - HAVE_COMPRESS2="yes" -fi - - fi - ;; -esac - -if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2" = "xyes"; then - -$as_echo "#define HAVE_FILTER_DEFLATE 1" >>confdefs.h - - USE_FILTER_DEFLATE="yes" - - ## Add "deflate" to external filter list - if test "X$EXTERNAL_FILTERS" != "X"; then - EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," - fi - EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)" -fi - - -## ---------------------------------------------------------------------- -## Is the szlib present? It has a header file `szlib.h' and a library -## `-lsz' and their locations might be specified with the `--with-szlib' -## command-line switch. The value is an include path and/or a library path. -## If the library path is specified then it must be preceded by a comma. -## - USE_FILTER_SZIP="no" - -# Check whether --with-szlib was given. -if test "${with_szlib+set}" = set; then : - withval=$with_szlib; -else - withval=no -fi - - -case $withval in - yes) - HAVE_SZLIB="yes" - for ac_header in szlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "szlib.h" "ac_cv_header_szlib_h" "$ac_includes_default" -if test "x$ac_cv_header_szlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SZLIB_H 1 -_ACEOF - HAVE_SZLIB_H="yes" -else - unset HAVE_SZLIB -fi - -done - - if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SZ_BufftoBuffCompress in -lsz" >&5 -$as_echo_n "checking for SZ_BufftoBuffCompress in -lsz... " >&6; } -if ${ac_cv_lib_sz_SZ_BufftoBuffCompress+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char SZ_BufftoBuffCompress (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return SZ_BufftoBuffCompress (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_sz_SZ_BufftoBuffCompress=yes -else - ac_cv_lib_sz_SZ_BufftoBuffCompress=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_SZ_BufftoBuffCompress" >&5 -$as_echo "$ac_cv_lib_sz_SZ_BufftoBuffCompress" >&6; } -if test "x$ac_cv_lib_sz_SZ_BufftoBuffCompress" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSZ 1 -_ACEOF - - LIBS="-lsz $LIBS" - -else - unset HAVE_SZLIB -fi - - fi - if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then - as_fn_error $? "couldn't find szlib library" "$LINENO" 5 - fi - ;; - no) - HAVE_SZLIB="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for szlib" >&5 -$as_echo_n "checking for szlib... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 -$as_echo "suppressed" >&6; } - ;; - *) - HAVE_SZLIB="yes" - case "$withval" in - *,*) - szlib_inc="`echo $withval |cut -f1 -d,`" - szlib_lib="`echo $withval |cut -f2 -d, -s`" - ;; - *) - if test -n "$withval"; then - szlib_inc="$withval/include" - szlib_lib="$withval/lib" - fi - ;; - esac - - saved_CPPFLAGS="$CPPFLAGS" - saved_AM_CPPFLAGS="$AM_CPPFLAGS" - saved_LDFLAGS="$LDFLAGS" - saved_AM_LDFLAGS="$AM_LDFLAGS" - - if test -n "$szlib_inc"; then - CPPFLAGS="$CPPFLAGS -I$szlib_inc" - AM_CPPFLAGS="$AM_CPPFLAGS -I$szlib_inc" - fi - - for ac_header in szlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "szlib.h" "ac_cv_header_szlib_h" "$ac_includes_default" -if test "x$ac_cv_header_szlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SZLIB_H 1 -_ACEOF - HAVE_SZLIB_H="yes" -else - CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" unset HAVE_SZLIB -fi - -done - - - if test -n "$szlib_lib"; then - LDFLAGS="$LDFLAGS -L$szlib_lib" - AM_LDFLAGS="$AM_LDFLAGS -L$szlib_lib" - fi - - if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SZ_BufftoBuffCompress in -lsz" >&5 -$as_echo_n "checking for SZ_BufftoBuffCompress in -lsz... " >&6; } -if ${ac_cv_lib_sz_SZ_BufftoBuffCompress+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char SZ_BufftoBuffCompress (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return SZ_BufftoBuffCompress (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_sz_SZ_BufftoBuffCompress=yes -else - ac_cv_lib_sz_SZ_BufftoBuffCompress=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_SZ_BufftoBuffCompress" >&5 -$as_echo "$ac_cv_lib_sz_SZ_BufftoBuffCompress" >&6; } -if test "x$ac_cv_lib_sz_SZ_BufftoBuffCompress" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSZ 1 -_ACEOF - - LIBS="-lsz $LIBS" - -else - LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB -fi - - fi - - if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then - as_fn_error $? "couldn't find szlib library" "$LINENO" 5 - fi - ;; -esac - -if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then - ## SZLIB library is available. Check if it can encode - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for szlib encoder" >&5 -$as_echo_n "checking for szlib encoder... " >&6; } - - ## Set LD_LIBRARY_PATH so encoder test can find the library and run. - ## Also add LL_PATH substitution to Makefiles so they can use the - ## path as well, for testing examples. - if test -z "$LD_LIBRARY_PATH"; then - export LD_LIBRARY_PATH="$szlib_lib" - else - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$szlib_lib" - fi - - LL_PATH="$LD_LIBRARY_PATH" - - if ${hdf5_cv_szlib_can_encode+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include "szlib.h" - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - /* SZ_encoder_enabled returns 1 if encoder is present */ - if(SZ_encoder_enabled() == 1) - exit(0); - else - exit(1); - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - hdf5_cv_szlib_can_encode=yes -else - hdf5_cv_szlib_can_encode=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi - - - -$as_echo "#define HAVE_FILTER_SZIP 1" >>confdefs.h - - USE_FILTER_SZIP="yes" - - if test ${hdf5_cv_szlib_can_encode} = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi - if test ${hdf5_cv_szlib_can_encode} = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - - ## Add "szip" to external filter list - if test ${hdf5_cv_szlib_can_encode} = "yes"; then - if test "X$EXTERNAL_FILTERS" != "X"; then - EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," - fi - EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)" - fi - if test ${hdf5_cv_szlib_can_encode} = "no"; then - if test "X$EXTERNAL_FILTERS" != "X"; then - EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," - fi - EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)" - fi -fi - - if test "X$USE_FILTER_SZIP" = "Xyes" && test "X$LL_PATH" != "X"; then - BUILD_SHARED_SZIP_CONDITIONAL_TRUE= - BUILD_SHARED_SZIP_CONDITIONAL_FALSE='#' -else - BUILD_SHARED_SZIP_CONDITIONAL_TRUE='#' - BUILD_SHARED_SZIP_CONDITIONAL_FALSE= -fi - - -## Checkpoint the cache -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -## ---------------------------------------------------------------------- -## Enable thread-safe version of library. It requires Pthreads support -## on POSIX systems. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread safe support" >&5 -$as_echo_n "checking for thread safe support... " >&6; } -# Check whether --enable-threadsafe was given. -if test "${enable_threadsafe+set}" = set; then : - enableval=$enable_threadsafe; THREADSAFE=$enableval -fi - - -## NOTE: The high-level, C++, and Fortran interfaces are not compatible -## with the thread-safety option because the lock is not hoisted -## into the higher-level API calls. - -## --enable-threadsafe is incompatible with --enable-hl unless -## --enable-unsupported has been specified on the configure line. -## -## Note that the high-level library is enabled by default so most -## users will have to add --disable-hl to the configure options. -if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - if test "X${HDF5_HL}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then - as_fn_error $? "The thread-safe library is incompatible with the high-level library. --disable-hl can be used to prevent building the high-level library (recommended). Alternatively, --enable-unsupported will allow building the high-level library, though this configuration is not supported by The HDF Group." "$LINENO" 5 - fi -fi - -## The --enable-threadsafe flag is not compatible with --enable-cxx. -## If the user tried to specify both flags, throw an error, unless -## they also provided the --enable-unsupported flag. -if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - if test "X${HDF_CXX}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then - as_fn_error $? "--enable-cxx and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error." "$LINENO" 5 - fi -fi - -## --enable-threadsafe is also incompatible with --enable-fortran unless -## --enable-unsupported has been specified on the configure line. -if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - if test "X${HDF_FORTRAN}" = "Xyes" -a "X${enable_threadsafe}" = "Xyes"; then - as_fn_error $? "--enable-fortran and --enable-threadsafe flags are incompatible. Use --enable-unsupported to override this error." "$LINENO" 5 - fi -fi - - -case "X-$THREADSAFE" in - X-|X-no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - X-yes) - THREADSAFE=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 -$as_echo "error" >&6; } - as_fn_error $? "\'$enableval\' is not a valid threadsafe type" "$LINENO" 5 - ;; -esac - -if test "X$THREADSAFE" = "Xyes"; then - -$as_echo "#define HAVE_THREADSAFE 1" >>confdefs.h - - - ## ---------------------------------------------------------------------- - ## Is the Pthreads library present? It has a header file `pthread.h' and - ## a library `-lpthread' and their locations might be specified with the - ## `--with-pthread' command-line switch. The value is an include path - ## and/or a library path. If the library path is specified then it must - ## be preceded by a comma. - ## - ## Thread-safety in HDF5 only uses Pthreads via configure, so the - ## default is "check", though this only has an effect when - ## --enable-threadsafe is specified. - HAVE_PTHREAD=yes - -# Check whether --with-pthread was given. -if test "${with_pthread+set}" = set; then : - withval=$with_pthread; -else - withval=check -fi - - - case "$withval" in - check | yes) - for ac_header in pthread.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_H 1 -_ACEOF - -else - unset HAVE_PTHREAD -fi - -done - - if test "x$HAVE_PTHREAD" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 -$as_echo_n "checking for pthread_self in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_self (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return pthread_self (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_self=yes -else - ac_cv_lib_pthread_pthread_self=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } -if test "x$ac_cv_lib_pthread_pthread_self" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPTHREAD 1 -_ACEOF - - LIBS="-lpthread $LIBS" - -else - unset HAVE_PTHREAD -fi - - fi - ;; - no) - as_fn_error $? "Must use Pthreads with thread safety" "$LINENO" 5 - ;; - *) - case "$withval" in - *,*) - pthread_inc="`echo $withval | cut -f1 -d,`" - pthread_lib="`echo $withval | cut -f2 -d, -s`" - ;; - *) - if test -n "$withval"; then - pthread_inc="$withval/include" - pthread_lib="$withval/lib" - fi - ;; - esac - - if test -n "$pthread_inc"; then - saved_CPPFLAGS="$CPPFLAGS" - saved_AM_CPPFLAGS="$AM_CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$pthread_inc" - AM_CPPFLAGS="$AM_CPPFLAGS -I$pthread_inc" - for ac_header in pthread.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_H 1 -_ACEOF - -else - CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; unset HAVE_PTHREAD -fi - -done - - else - for ac_header in pthread.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_H 1 -_ACEOF - -else - unset HAVE_PTHREAD -fi - -done - - fi - - if test "x$HAVE_PTHREAD" = "xyes"; then - if test -n "$pthread_lib"; then - saved_LDFLAGS="$LDFLAGS" - saved_AM_LDFLAGS="$AM_LDFLAGS" - LDFLAGS="$LDFLAGS -L$pthread_lib" - AM_LDFLAGS="$AM_LDFLAGS -L$pthread_lib" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 -$as_echo_n "checking for pthread_self in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_self (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return pthread_self (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_self=yes -else - ac_cv_lib_pthread_pthread_self=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } -if test "x$ac_cv_lib_pthread_pthread_self" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPTHREAD 1 -_ACEOF - - LIBS="-lpthread $LIBS" - -else - LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_PTHREAD -fi - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 -$as_echo_n "checking for pthread_self in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_self (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return pthread_self (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_self=yes -else - ac_cv_lib_pthread_pthread_self=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } -if test "x$ac_cv_lib_pthread_pthread_self" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPTHREAD 1 -_ACEOF - - LIBS="-lpthread $LIBS" - -else - unset HAVE_PTHREAD -fi - - fi - fi - ;; - esac - - ## ---------------------------------------------------------------------- - ## Check if pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) - ## is supported on this system - ## - ## Unfortunately, this probably needs to be an AC_RUN_IFELSE since - ## it's impossible to determine if PTHREAD_SCOPE_SYSTEM is - ## supported a priori. POSIX.1-2001 requires that a conformant - ## system need only support one of SYSTEM or PROCESS scopes. - ## - ## For cross-compiling, we've added a pessimistic 'no'. You can - ## hand-hack the config file if you know otherwise. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Pthreads supports system scope" >&5 -$as_echo_n "checking Pthreads supports system scope... " >&6; } - if ${hdf5_cv_system_scope_threads+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - hdf5_cv_system_scope_threads=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #if STDC_HEADERS - #include - #include - #endif - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - pthread_attr_t attribute; - int ret; - - pthread_attr_init(&attribute); - ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); - exit(ret==0 ? 0 : 1); - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - hdf5_cv_system_scope_threads=yes -else - hdf5_cv_system_scope_threads=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi - - - if test ${hdf5_cv_system_scope_threads} = "yes"; then - -$as_echo "#define SYSTEM_SCOPE_THREADS 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: Always 'no' if cross-compiling. Edit the config file if your platform supports pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM)." >&5 -$as_echo "$as_me: Always 'no' if cross-compiling. Edit the config file if your platform supports pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM)." >&6;} - fi -fi - -## ---------------------------------------------------------------------- -## Check for MONOTONIC_TIMER support (used in clock_gettime). This has -## to be done after any POSIX defines to ensure that the test gets -## the correct POSIX level on linux. -ac_fn_c_check_decl "$LINENO" "CLOCK_MONOTONIC" "ac_cv_have_decl_CLOCK_MONOTONIC" "#include -" -if test "x$ac_cv_have_decl_CLOCK_MONOTONIC" = xyes; then : - have_clock_monotonic="yes" -else - have_clock_monotonic="no" -fi - - -## ---------------------------------------------------------------------- -## How does one figure out the local time zone? Anyone know of a -## Posix way to do this? -## - -## First check if `struct tm' has a `tm_gmtoff' member. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff in struct tm" >&5 -$as_echo_n "checking for tm_gmtoff in struct tm... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -struct tm tm; tm.tm_gmtoff=0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -## Check whether the global variable `timezone' is defined. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for global timezone variable" >&5 -$as_echo_n "checking for global timezone variable... " >&6; } - -case "`uname`" in - CYGWIN*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled in CYGWIN" >&5 -$as_echo "disabled in CYGWIN" >&6; } - ;; - *) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -timezone=0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -$as_echo "#define HAVE_TIMEZONE 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ;; -esac - - -## ---------------------------------------------------------------------- -## Does the struct stat have the st_blocks field? This field is not Posix. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blocks in struct stat" >&5 -$as_echo_n "checking for st_blocks in struct stat... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -struct stat sb; sb.st_blocks=0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_STAT_ST_BLOCKS 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -## ---------------------------------------------------------------------- -## How do we figure out the width of a tty in characters? -## -for ac_func in _getvideoconfig gettextinfo -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -case "`uname`" in - CYGWIN*) - ;; - *) - for ac_func in GetConsoleScreenBufferInfo -do : - ac_fn_c_check_func "$LINENO" "GetConsoleScreenBufferInfo" "ac_cv_func_GetConsoleScreenBufferInfo" -if test "x$ac_cv_func_GetConsoleScreenBufferInfo" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETCONSOLESCREENBUFFERINFO 1 -_ACEOF - -fi -done - - ;; -esac -for ac_func in _scrsize ioctl -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct videoconfig" >&5 -$as_echo_n "checking for struct videoconfig... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -struct videoconfig w; w.numtextcols=0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_STRUCT_VIDEOCONFIG 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct text_info" >&5 -$as_echo_n "checking for struct text_info... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -struct text_info w; w.screenwidth=0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_STRUCT_TEXT_INFO 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIOCGWINSZ" >&5 -$as_echo_n "checking for TIOCGWINSZ... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -int w=TIOCGWINSZ; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_TIOCGWINSZ 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIOCGETD" >&5 -$as_echo_n "checking for TIOCGETD... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -int w=TIOCGETD; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_TIOCGETD 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -## ---------------------------------------------------------------------- -## Check for functions. -## -## NOTE: clock_gettime may require linking to the rt or posix4 library -## so we'll search for it before calling AC_CHECK_FUNCS. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 -$as_echo_n "checking for library containing clock_gettime... " >&6; } -if ${ac_cv_search_clock_gettime+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char clock_gettime (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -for ac_lib in '' rt posix4; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_clock_gettime=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_clock_gettime+:} false; then : - break -fi -done -if ${ac_cv_search_clock_gettime+:} false; then : - -else - ac_cv_search_clock_gettime=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 -$as_echo "$ac_cv_search_clock_gettime" >&6; } -ac_res=$ac_cv_search_clock_gettime -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -for ac_func in alarm clock_gettime difftime fork frexpf frexpl -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -for ac_func in gethostname getpwuid getrusage gettimeofday -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -for ac_func in lstat rand_r random setsysinfo -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -for ac_func in signal longjmp setjmp siglongjmp sigsetjmp sigprocmask -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -for ac_func in snprintf srandom strdup symlink system -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -for ac_func in tmpfile asprintf vasprintf vsnprintf waitpid -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -## ---------------------------------------------------------------------- -## Check compiler characteristics -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands __inline__" >&5 -$as_echo_n "checking if the compiler understands __inline__... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -static __inline__ void f(void){return;}; -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE___INLINE__ 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands __inline" >&5 -$as_echo_n "checking if the compiler understands __inline... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -static __inline void f(void){return;}; -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE___INLINE 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands inline" >&5 -$as_echo_n "checking if the compiler understands inline... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -static inline void f(void){return;}; -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_INLINE 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ extension" >&5 -$as_echo_n "checking for __attribute__ extension... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -int __attribute__((unused)) x - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_ATTRIBUTE 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__ extension" >&5 -$as_echo_n "checking for __func__ extension... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - const char *fname = __func__; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_C99_FUNC 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__ extension" >&5 -$as_echo_n "checking for __FUNCTION__ extension... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - const char *fname = __FUNCTION__; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_FUNCTION 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initialization support" >&5 -$as_echo_n "checking for C99 designated initialization support... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - typedef struct { - int x; - union { - int i; - double d; - } u; - } di_struct_t; - di_struct_t x = {0, { .d = 0.0}}; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_C99_DESIGNATED_INITIALIZER 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -## ---------------------------------------------------------------------- -## Try to figure out how to print `long long'. Some machines use `%lld' -## and others use `%qd'. There may be more! The final `l' is a -## default in case none of the others work. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print long long" >&5 -$as_echo_n "checking how to print long long... " >&6; } -if ${hdf5_cv_printf_ll+:} false; then : - $as_echo_n "(cached) " >&6 -else - - -for hdf5_cv_printf_ll in l ll L q unknown; do - if test "$cross_compiling" = yes; then : - continue -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include - #include - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - char *s = malloc(128); - long long x = (long long)1048576 * (long long)1048576; - sprintf(s,"%${hdf5_cv_printf_ll}d",x); - exit(strcmp(s,"1099511627776")); - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - break -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -done -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: %${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u" >&5 -$as_echo "%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u" >&6; } - -cat >>confdefs.h <<_ACEOF -#define PRINTF_LL_WIDTH "$hdf5_cv_printf_ll" -_ACEOF - - - -## ---------------------------------------------------------------------- -## Turn on debugging by setting compiler flags -## This must come after the enable-production since it depends on production. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug flags" >&5 -$as_echo_n "checking for debug flags... " >&6; } -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : - enableval=$enable_debug; DEBUG_PKG=$enableval -fi - - -## Default to no if producton is enabled -if test "X-$DEBUG_PKG" = X- ; then - if test "$enable_production" = yes ; then - DEBUG_PKG=no - else - DEBUG_PKG=yes - fi -fi - - -all_packages="ac,b,b2,d,e,f,g,hg,hl,i,mf,mm,o,p,s,t,v,z" -case "X-$DEBUG_PKG" in - X-yes) - DEBUG_PKG="d,e,f,g,hg,i,mm,o,p,s,t,v,z" -## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: default ($DEBUG_PKG)" >&5 -$as_echo "default ($DEBUG_PKG)" >&6; } - ;; - X-all) - DEBUG_PKG=$all_packages -## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: all ($DEBUG_PKG)" >&5 -$as_echo "all ($DEBUG_PKG)" >&6; } - ;; - X-no|X-none) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } - DEBUG_PKG= -## H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG" - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_PKG" >&5 -$as_echo "$DEBUG_PKG" >&6; } - ;; -esac - -if test -n "$DEBUG_PKG"; then - for pkg in `echo $DEBUG_PKG | ${TR} ${as_cr_letters}"," ${as_cr_LETTERS}" "`; do - H5_CPPFLAGS="$H5_CPPFLAGS -DH5${pkg}_DEBUG" - done -fi - -## ---------------------------------------------------------------------- -## Check if they would like the function stack support compiled in -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether function stack tracking is enabled" >&5 -$as_echo_n "checking whether function stack tracking is enabled... " >&6; } -# Check whether --enable-codestack was given. -if test "${enable_codestack+set}" = set; then : - enableval=$enable_codestack; CODESTACK=$enableval -fi - - -case "X-$CODESTACK" in - X-yes) - CODESTACK=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_CODESTACK 1" >>confdefs.h - - ;; - *) - CODESTACK=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; -esac - -## ---------------------------------------------------------------------- -## Check if they would like the metadata trace file code compiled in -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether metadata trace file code is enabled" >&5 -$as_echo_n "checking whether metadata trace file code is enabled... " >&6; } -# Check whether --enable-metadata-trace-file was given. -if test "${enable_metadata_trace_file+set}" = set; then : - enableval=$enable_metadata_trace_file; METADATATRACEFILE=$enableval -fi - - -case "X-$METADATATRACEFILE" in - X-yes) - METADATATRACEFILE=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define METADATA_TRACE_FILE 1" >>confdefs.h - - ;; - *) - METADATATRACEFILE=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; -esac - -## ---------------------------------------------------------------------- -## Enable tracing of the API -## This must come after the enable-debug since it depends on debug. -## - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for API tracing" >&5 -$as_echo_n "checking for API tracing... " >&6; }; -# Check whether --enable-trace was given. -if test "${enable_trace+set}" = set; then : - enableval=$enable_trace; TRACE=$enableval -fi - - -## Default to no if debug is disabled -if test "X-$TRACE" = X- ; then - if test -z "$DEBUG_PKG" ; then - TRACE=no - else - TRACE=yes - fi -fi - -case "X-$TRACE" in - X-yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - TRACE_API=yes - H5_CPPFLAGS="$H5_CPPFLAGS -DH5_DEBUG_API" - ;; - X-no|*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - TRACE_API=no - H5_CPPFLAGS="$H5_CPPFLAGS -UH5_DEBUG_API" - ;; -esac - -## ---------------------------------------------------------------------- -## Enable instrumenting of the library's internal operations -## This must come after the enable-debug since it depends on debug. -## - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for instrumented library" >&5 -$as_echo_n "checking for instrumented library... " >&6; }; -# Check whether --enable-instrument was given. -if test "${enable_instrument+set}" = set; then : - enableval=$enable_instrument; INSTRUMENT=$enableval -fi - - -## Default to no if debug is disabled -if test "X-$INSTRUMENT" = X- ; then - if test -z "$DEBUG_PKG" ; then - INSTRUMENT=no - else - INSTRUMENT=yes - fi -fi - -case "X-$INSTRUMENT" in - X-yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - INSTRUMENT_LIBRARY=yes - -$as_echo "#define HAVE_INSTRUMENTED_LIBRARY 1" >>confdefs.h - - ;; - X-no|*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - INSTRUMENT_LIBRARY=no - ;; -esac - -## ---------------------------------------------------------------------- -## Check if they would like to securely clear file buffers before they are -## written. -## - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to clear file buffers" >&5 -$as_echo_n "checking whether to clear file buffers... " >&6; } -# Check whether --enable-clear-file-buffers was given. -if test "${enable_clear_file_buffers+set}" = set; then : - enableval=$enable_clear_file_buffers; CLEARFILEBUF=$enableval -fi - - -case "X-$CLEARFILEBUF" in - *) - CLEARFILEBUF=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define CLEAR_MEMORY 1" >>confdefs.h - - ;; - X-no) - CLEARFILEBUF=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; -esac - -## ---------------------------------------------------------------------- -## Check if they would like to use a memory checking tool (like valgrind's -## 'memcheck' tool, or Rational Purify, etc) and the library should be -## more scrupulous with it's memory operations. Enabling this also -## disables the library's free space manager code. -## - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a memory checking tool will be used" >&5 -$as_echo_n "checking whether a memory checking tool will be used... " >&6; } -# Check whether --enable-using-memchecker was given. -if test "${enable_using_memchecker+set}" = set; then : - enableval=$enable_using_memchecker; USINGMEMCHECKER=$enableval -fi - - -case "X-$USINGMEMCHECKER" in - X-yes) - USINGMEMCHECKER=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define USING_MEMCHECKER 1" >>confdefs.h - - ;; - *) - USINGMEMCHECKER=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; -esac - -## Checkpoint the cache -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -## What header files and libraries do we have to look for for parallel -## support? For the most part, search paths are already specified with -## CPPFLAGS and LDFLAGS or are known to the compiler. -## -# Check whether --enable-parallel was given. -if test "${enable_parallel+set}" = set; then : - enableval=$enable_parallel; -fi - - -## The --enable-parallel flag is not compatible with --enable-cxx. -## If the user tried to specify both flags, throw an error, unless -## they also provided the --enable-unsupported flag. -if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - if test "X${HDF_CXX}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then - as_fn_error $? "--enable-cxx and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error." "$LINENO" 5 - fi -fi - -## --enable-parallel is also incompatible with --enable-threadsafe, unless -## --enable-unsupported has been specified on the configure line. -if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - if test "X${THREADSAFE}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then - as_fn_error $? "--enable-threadsafe and --enable-parallel flags are incompatible. Use --enable-unsupported to override this error." "$LINENO" 5 - fi -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for parallel support files" >&5 -$as_echo_n "checking for parallel support files... " >&6; } -case "X-$enable_parallel" in - X-|X-no|X-none) - ## We are not compiling for parallel. - { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipped" >&5 -$as_echo "skipped" >&6; } - ;; - - X-yes) - ## We want to compile a parallel library with a compiler that - ## may already know how to link with MPI and MPI-IO. - { $as_echo "$as_me:${as_lineno-$LINENO}: result: provided by compiler" >&5 -$as_echo "provided by compiler" >&6; } - PARALLEL=yes - - ## Try link a simple MPI program. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a simple MPI-IO C program can be linked" >&5 -$as_echo_n "checking whether a simple MPI-IO C program can be linked... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - MPI_Init(0, (void *)0); - MPI_File_open(0, (void *)0, 0, 0, (void *)0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "unable to link a simple MPI-IO C program" "$LINENO" 5 -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - if test "X$HDF_FORTRAN" = "Xyes"; then - - - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a simple MPI-IO Fortran program can be linked" >&5 -$as_echo_n "checking whether a simple MPI-IO Fortran program can be linked... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - - PROGRAM main - INCLUDE 'mpif.h' - INTEGER :: comm, amode, info, fh, ierror - CHARACTER(LEN=1) :: filename - CALL MPI_File_open( comm, filename, amode, info, fh, ierror) - END -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "unable to link a simple MPI-IO Fortran program" "$LINENO" 5 -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - fi - - ## Set RUNPARALLEL to mpiexec if not set yet. - if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then - RUNPARALLEL="mpiexec -n \$\${NPROCS:=6}" - fi - ;; - - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 -$as_echo "error" >&6; } - as_fn_error $? "\'$enable_parallel\' is not a valid parallel search type" "$LINENO" 5 - ;; -esac - -## ---------------------------------------------------------------------- -## Print some other parallel information and do some sanity checks. -## - ADD_PARALLEL_FILES="no" - -if test -n "$PARALLEL"; then - ## The 'testpar' directory should participate in the build - TESTPARALLEL=testpar - - ## We are building a parallel library - -$as_echo "#define HAVE_PARALLEL 1" >>confdefs.h - - - ## Display what we found about running programs - { $as_echo "$as_me:${as_lineno-$LINENO}: checking prefix for running on one processor" >&5 -$as_echo_n "checking prefix for running on one processor... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUNSERIAL" >&5 -$as_echo "$RUNSERIAL" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking prefix for running in parallel" >&5 -$as_echo_n "checking prefix for running in parallel... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUNPARALLEL" >&5 -$as_echo "$RUNPARALLEL" >&6; } - - ## There *must* be some way to run in parallel even if it's just the - ## word `none'. - if test -z "$RUNPARALLEL"; then - as_fn_error $? "no way to run a parallel program" "$LINENO" 5 - fi - - ## If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with - ## the empty string. This means that no launch commands were requested, - ## so we will not use any launch commands. - if test "X$RUNSERIAL" = "Xnone"; then - RUNSERIAL="" - fi - if test "X$RUNPARALLEL" = "Xnone"; then - RUNPARALLEL="" - fi - - if test "X$HDF_FORTRAN" = "Xyes"; then - ADD_PARALLEL_FILES="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Comm_c2f and MPI_Comm_f2c functions" >&5 -$as_echo_n "checking for MPI_Comm_c2f and MPI_Comm_f2c functions... " >&6; } - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -MPI_Comm c_comm; MPI_Comm_c2f(c_comm) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -$as_echo "#define HAVE_MPI_MULTI_LANG_Comm 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Info_c2f and MPI_Info_f2c functions" >&5 -$as_echo_n "checking for MPI_Info_c2f and MPI_Info_f2c functions... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -MPI_Info c_info; MPI_Info_c2f(c_info) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -$as_echo "#define HAVE_MPI_MULTI_LANG_Info 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - - ## -------------------------------------------------------------------- - ## Do we want MPE instrumentation feature on? - ## - ## This must be done after enable-parallel is checked since it depends - ## on a mpich compiler. - ## - MPE=yes - -# Check whether --with-mpe was given. -if test "${with_mpe+set}" = set; then : - withval=$with_mpe; -else - withval=no -fi - - - case "X-$withval" in - X-|X-no|X-none) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPE" >&5 -$as_echo_n "checking for MPE... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 -$as_echo "suppressed" >&6; } - unset MPE - ;; - X-yes) - for ac_header in mpe.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "mpe.h" "ac_cv_header_mpe_h" "$ac_includes_default" -if test "x$ac_cv_header_mpe_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MPE_H 1 -_ACEOF - -else - unset MPE -fi - -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPE_Init_log in -lmpe" >&5 -$as_echo_n "checking for MPE_Init_log in -lmpe... " >&6; } -if ${ac_cv_lib_mpe_MPE_Init_log+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpe $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MPE_Init_log (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return MPE_Init_log (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mpe_MPE_Init_log=yes -else - ac_cv_lib_mpe_MPE_Init_log=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpe_MPE_Init_log" >&5 -$as_echo "$ac_cv_lib_mpe_MPE_Init_log" >&6; } -if test "x$ac_cv_lib_mpe_MPE_Init_log" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMPE 1 -_ACEOF - - LIBS="-lmpe $LIBS" - -else - unset MPE -fi - - ;; - *) - case "$withval" in - *,*) - mpe_inc="`echo $withval | cut -f1 -d,`" - mpe_lib="`echo $withval | cut -f2 -d, -s`" - ;; - *) - if test -n "$withval"; then - mpe_inc="$withval/include" - mpe_lib="$withval/lib" - fi - ;; - esac - - if test -n "$mpe_inc"; then - saved_CPPFLAGS="$CPPFLAGS" - saved_AM_CPPFLAGS="$AM_CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$mpe_inc" - AM_CPPFLAGS="$AM_CPPFLAGS -I$mpe_inc" - for ac_header in mpe.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "mpe.h" "ac_cv_header_mpe_h" "$ac_includes_default" -if test "x$ac_cv_header_mpe_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MPE_H 1 -_ACEOF - -else - CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; unset MPE -fi - -done - - else - for ac_header in mpe.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "mpe.h" "ac_cv_header_mpe_h" "$ac_includes_default" -if test "x$ac_cv_header_mpe_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MPE_H 1 -_ACEOF - -else - unset MPE -fi - -done - - fi - - if test -n "$mpe_lib"; then - saved_LDFLAGS="$LDFLAGS" - saved_AM_LDFLAGS="$AM_LDFLAGS" - LDFLAGS="$LDFLAGS -L$mpe_lib" - AM_LDFLAGS="$AM_LDFLAGS -L$mpe_lib" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPE_Init_log in -lmpe" >&5 -$as_echo_n "checking for MPE_Init_log in -lmpe... " >&6; } -if ${ac_cv_lib_mpe_MPE_Init_log+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpe $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MPE_Init_log (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return MPE_Init_log (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mpe_MPE_Init_log=yes -else - ac_cv_lib_mpe_MPE_Init_log=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpe_MPE_Init_log" >&5 -$as_echo "$ac_cv_lib_mpe_MPE_Init_log" >&6; } -if test "x$ac_cv_lib_mpe_MPE_Init_log" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMPE 1 -_ACEOF - - LIBS="-lmpe $LIBS" - -else - LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset MPE -fi - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPE_Init_log in -lmpe" >&5 -$as_echo_n "checking for MPE_Init_log in -lmpe... " >&6; } -if ${ac_cv_lib_mpe_MPE_Init_log+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpe $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MPE_Init_log (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return MPE_Init_log (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mpe_MPE_Init_log=yes -else - ac_cv_lib_mpe_MPE_Init_log=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpe_MPE_Init_log" >&5 -$as_echo "$ac_cv_lib_mpe_MPE_Init_log" >&6; } -if test "x$ac_cv_lib_mpe_MPE_Init_log" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMPE 1 -_ACEOF - - LIBS="-lmpe $LIBS" - -else - unset MPE -fi - - fi - ;; - esac - - if test "X-$MPE" = "X-yes"; then - -$as_echo "#define HAVE_MPE 1" >>confdefs.h - - fi -fi - -## ---------------------------------------------------------------------- -## Check if Direct I/O driver is enabled by --enable-direct-vfd -## -## ---------------------------------------------------------------------- -## Check if Direct I/O driver is enabled by --enable-direct-vfd -## -if ${hdf5_cv_direct_io+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_fn_c_check_decl "$LINENO" "O_DIRECT" "ac_cv_have_decl_O_DIRECT" "#include -" -if test "x$ac_cv_have_decl_O_DIRECT" = xyes; then : - hdf5_cv_direct_io=yes -else - hdf5_cv_direct_io=no -fi - -fi - -if ${hdf5_cv_posix_memalign+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign" -if test "x$ac_cv_func_posix_memalign" = xyes; then : - hdf5_cv_posix_memalign=yes -else - hdf5_cv_posix_memalign=no -fi - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the direct I/O virtual file driver (VFD) is enabled" >&5 -$as_echo_n "checking if the direct I/O virtual file driver (VFD) is enabled... " >&6; } - -# Check whether --enable-direct-vfd was given. -if test "${enable_direct_vfd+set}" = set; then : - enableval=$enable_direct_vfd; DIRECT_VFD=$enableval -else - DIRECT_VFD=no -fi - - -if test "X$DIRECT_VFD" = "Xyes"; then - if test ${hdf5_cv_direct_io} = "yes" && test ${hdf5_cv_posix_memalign} = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_DIRECT 1" >>confdefs.h - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - DIRECT_VFD=no - as_fn_error $? "The direct VFD was requested but cannot be built. This is either - due to O_DIRECT not being found in fcntl.h or a lack of - posix_memalign() on your system. Please re-configure without - specifying --enable-direct-vfd." "$LINENO" 5 - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "X$DIRECT_VFD" = "Xyes"; then - DIRECT_VFD_CONDITIONAL_TRUE= - DIRECT_VFD_CONDITIONAL_FALSE='#' -else - DIRECT_VFD_CONDITIONAL_TRUE='#' - DIRECT_VFD_CONDITIONAL_FALSE= -fi - - -## ---------------------------------------------------------------------- -## Enable custom plugin default path for library. It requires SHARED support. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for custom plugin default path definition" >&5 -$as_echo_n "checking for custom plugin default path definition... " >&6; } - -# Check whether --with-default-plugindir was given. -if test "${with_default_plugindir+set}" = set; then : - withval=$with_default_plugindir; -else - withval="/usr/local/hdf5/lib/plugin" -fi - - -if test "X$withval" = "X"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5 -$as_echo "default" >&6; } - default_plugindir="/usr/local/hdf5/lib/plugin" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 -$as_echo "$withval" >&6; } - default_plugindir=$withval -fi - - -cat >>confdefs.h <<_ACEOF -#define DEFAULT_PLUGINDIR "$default_plugindir" -_ACEOF - - -## ---------------------------------------------------------------------- -## Decide whether the presence of user's exception handling functions is -## checked and data conversion exceptions are returned. This is mainly -## for the speed optimization of hard conversions. Soft conversions can -## actually benefit little. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether exception handling functions is checked during data conversions" >&5 -$as_echo_n "checking whether exception handling functions is checked during data conversions... " >&6; } -# Check whether --enable-dconv-exception was given. -if test "${enable_dconv_exception+set}" = set; then : - enableval=$enable_dconv_exception; DCONV_EXCEPTION=$enableval -else - DCONV_EXCEPTION=yes -fi - - -if test "$DCONV_EXCEPTION" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define WANT_DCONV_EXCEPTION 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - -## ---------------------------------------------------------------------- -## Decide whether the data accuracy has higher priority during data -## conversions. If not, some hard conversions will still be prefered even -## though the data may be wrong (for example, some compilers don't -## support denormalized floating values) to maximize speed. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether data accuracy is guaranteed during data conversions" >&5 -$as_echo_n "checking whether data accuracy is guaranteed during data conversions... " >&6; } -# Check whether --enable-dconv-accuracy was given. -if test "${enable_dconv_accuracy+set}" = set; then : - enableval=$enable_dconv_accuracy; DATA_ACCURACY=$enableval -else - DATA_ACCURACY=yes -fi - - -if test "$DATA_ACCURACY" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define WANT_DATA_ACCURACY 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - -## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine has window style pathname, -## that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). -## (This flag should be _unset_ for all machines, except for Windows, where -## it's set in the custom Windows H5pubconf.h file) -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the machine has window style path name" >&5 -$as_echo_n "checking if the machine has window style path name... " >&6; } - -case "`uname`" in - MINGW*) - -$as_echo "#define HAVE_WINDOW_PATH 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; -esac - -## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine is using a special algorithm to convert -## 'long double' to '(unsigned) long' values. (This flag should only be set for -## the IBM Power6 Linux. When the bit sequence of long double is -## 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long -## is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282. -## The machine's conversion gets the correct value. We define the macro and disable -## this kind of test until we figure out what algorithm they use. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if using special algorithm to convert long double to (unsigned) long values" >&5 -$as_echo_n "checking if using special algorithm to convert long double to (unsigned) long values... " >&6; } - -if test ${ac_cv_sizeof_long_double} = 0; then - hdf5_cv_ldouble_to_long_special=${hdf5_cv_ldouble_to_long_special=no} -else - if ${hdf5_cv_ldouble_to_long_special+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - long double ld = 20041683600089727.779961L; - long ll; - unsigned long ull; - unsigned char s[16]; - unsigned char s2[8]; - int ret = 1; - - if(sizeof(long double) == 16 && sizeof(long) == 8) { - /*make sure the long double type has 16 bytes in size and - * 11 bits of exponent. If it is, - *the bit sequence should be like below. It's not - *a decent way to check but this info isn't available. */ - memcpy(s, &ld, 16); - if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 && - s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 && - s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) { - - /* Assign the hexadecimal value of long double type. */ - s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3; - s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0; - s[8]=0xbf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c; - s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20; - - memcpy(&ld, s, 16); - - ll = (long)ld; - memcpy(s2, &ll, 8); - - /* The library's algorithm converts it to 0x 00 47 33 ce 17 af 22 82 - * and gets wrong value 20041683600089730 on the IBM Power6 Linux. - * But the IBM Power6 Linux converts it to 0x00 47 33 ce 17 af 22 7f - * and gets the correct value 20041683600089727. It uses some special - * algorithm. We're going to define the macro and skip the test until - * we can figure out how they do it. */ - if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce && - s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f) - ret = 0; - - ull = (unsigned long)ld; - memcpy(s2, &ull, 8); - - /* The unsigned long is the same as signed long. */ - if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce && - s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f) - ret = 0; - } - } - exit(ret); - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - hdf5_cv_ldouble_to_long_special=yes -else - hdf5_cv_ldouble_to_long_special=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi - -fi - -if test ${hdf5_cv_ldouble_to_long_special} = "yes"; then - -$as_echo "#define LDOUBLE_TO_LONG_SPECIAL 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - -## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine is using a special algorithm -## to convert some values of '(unsigned) long' to 'long double' values. -## (This flag should be off for all machines, except for IBM Power6 Linux, -## when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., -## ..., 7fffff..., the compiler uses a unknown algorithm. We define a -## macro and skip the test for now until we know about the algorithm. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if using special algorithm to convert (unsigned) long to long double values" >&5 -$as_echo_n "checking if using special algorithm to convert (unsigned) long to long double values... " >&6; } - -if test ${ac_cv_sizeof_long_double} = 0; then - hdf5_cv_long_to_ldouble_special=${hdf5_cv_long_to_ldouble_special=no} -else - if ${hdf5_cv_long_to_ldouble_special+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - long double ld; - long ll; - unsigned long ull; - unsigned char s[16]; - int flag=0, ret=1; - - /*Determine if long double has 16 byte in size, 11 bit exponent, and - *the bias is 0x3ff */ - if(sizeof(long double) == 16) { - ld = 1.0L; - memcpy(s, &ld, 16); - if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && - s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) - flag = 1; - } - - if(flag==1 && sizeof(long)==8) { - ll = 0x003fffffffffffffL; - ld = (long double)ll; - memcpy(s, &ld, 16); - /* The library converts the value to 0x434fffffffffffff8000000000000000. - * In decimal it is 18014398509481982.000000, one value short of the original. - * The IBM Power6 Linux converts it to 0x4350000000000000bff0000000000000. - * The value is correct in decimal. It uses some special - * algorithm. We're going to define the macro and skip the test until - * we can figure out how they do it. */ - if(s[0]==0x43 && s[1]==0x50 && s[2]==0x00 && s[3]==0x00 && - s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 && - s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 && - s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00) - ret = 0; - } - if(flag==1 && sizeof(unsigned long)==8) { - ull = 0xffffffffffffffffUL; - ld = (long double)ull; - memcpy(s, &ld, 16); - /* Use a different value from signed long to test. The problem is the same - * for both long and unsigned long. The value is 18446744073709551615. - * The library converts the value to 0x43effffffffffffffe000000000000000. - * In decimal it's 18446744073709548544.000000, very different from the original. - * The IBM Power6 Linux converts it to 0x43f0000000000000bff0000000000000. - * The value is correct in decimal. It uses some special - * algorithm. We're going to define the macro and skip the test until - * we can figure out how they do it. */ - if(s[0]==0x43 && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && - s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 && - s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 && - s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00) - ret = 0; - } - exit(ret); - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - hdf5_cv_long_to_ldouble_special=yes -else - hdf5_cv_long_to_ldouble_special=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi - -fi - -if test ${hdf5_cv_long_to_ldouble_special} = "yes"; then - -$as_echo "#define LONG_TO_LDOUBLE_SPECIAL 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - -## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine can accurately convert -## 'long double' to '(unsigned) long long' values. (This flag should -## be set for all machines, except for Mac OS 10.4, SGI IRIX64 6.5 and -## Powerpc Linux using XL compilers. -## When the bit sequence of long double is 0x4351ccf385ebc8a0bfcc2a3c..., -## the values of (unsigned)long long start to go wrong on these -## two machines. Adjusting it higher to 0x4351ccf385ebc8a0dfcc... or -## 0x4351ccf385ebc8a0ffcc... will make the converted values wildly wrong. -## This test detects this wrong behavior and disable the test. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if correctly converting long double to (unsigned) long long values" >&5 -$as_echo_n "checking if correctly converting long double to (unsigned) long long values... " >&6; } - -if test ${ac_cv_sizeof_long_double} = 0; then - hdf5_cv_ldouble_to_llong_accurate=${hdf5_cv_ldouble_to_llong_accurate=no} -else - if ${hdf5_cv_ldouble_to_llong_accurate+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - int main(void) - { - long double ld = 20041683600089727.779961L; - long long ll; - unsigned long long ull; - unsigned char s[16]; - int ret = 0; - - if(sizeof(long double) == 16) { - /*make sure the long double type is the same as the failing type - *which has 16 bytes in size and 11 bits of exponent. If it is, - *the bit sequence should be like below. It's not - *a decent way to check but this info isn't available. */ - memcpy(s, &ld, 16); - if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 && - s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 && - s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) { - - /*slightly adjust the bit sequence (s[8]=0xdf). The converted - *values will go wild on Mac OS 10.4 and IRIX64 6.5.*/ - s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3; - s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0; - s[8]=0xdf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c; - s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20; - - memcpy(&ld, s, 16); - ll = (long long)ld; - ull = (unsigned long long)ld; - - if(ll != 20041683600089728 || ull != 20041683600089728) - ret = 1; - } - } - done: - exit(ret); - } - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - hdf5_cv_ldouble_to_llong_accurate=yes -else - hdf5_cv_ldouble_to_llong_accurate=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi - -fi - -if test ${hdf5_cv_ldouble_to_llong_accurate} = "yes"; then - -$as_echo "#define LDOUBLE_TO_LLONG_ACCURATE 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine can accurately convert -## '(unsigned) long long' to 'long double' values. (This flag should be -## set for all machines, except for Mac OS 10.4 and Powerpc Linux using -## XL compilers. -## When the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff..., -## ..., 7fffff..., the converted values are twice as big as they should be. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if correctly converting (unsigned) long long to long double values" >&5 -$as_echo_n "checking if correctly converting (unsigned) long long to long double values... " >&6; } - -if test ${ac_cv_sizeof_long_double} = 0; then - hdf5_cv_llong_to_ldouble_correct=${hdf5_cv_llong_to_ldouble_correct=no} -else - if ${hdf5_cv_llong_to_ldouble_correct+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - int main(void) - { - long double ld; - long long ll; - unsigned long long ull; - unsigned char s[16]; - int flag=0, ret=0; - - /*Determine if long double has 16 byte in size, 11 bit exponent, and - *the bias is 0x3ff */ - if(sizeof(long double) == 16) { - ld = 1.0L; - memcpy(s, &ld, 16); - if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && - s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) - flag = 1; - } - - if(flag==1 && sizeof(long long)==8) { - ll = 0x01ffffffffffffffLL; - ld = (long double)ll; - memcpy(s, &ld, 16); - /*Check if the bit sequence is as supposed to be*/ - if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || - s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || - s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) - ret = 1; - } - if(flag==1 && sizeof(unsigned long long)==8) { - ull = 0x01ffffffffffffffULL; - ld = (long double)ull; - memcpy(s, &ld, 16); - if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || - s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || - s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) - ret = 1; - } - done: - exit(ret); - } - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - hdf5_cv_llong_to_ldouble_correct=yes -else - hdf5_cv_llong_to_ldouble_correct=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi - -fi - -if test ${hdf5_cv_llong_to_ldouble_correct} = "yes"; then - -$as_echo "#define LLONG_TO_LDOUBLE_CORRECT 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - -## ---------------------------------------------------------------------- -## Set some variables for general configuration information to be saved -## and installed with the libraries (used to generate libhdf5.settings). -## - -## HDF5 version from the first line of the README.txt file. -H5_VERSION="`cut -d' ' -f3 $srcdir/README.txt | head -1`" - - -## Configuration date - CONFIG_DATE="`date`" - -## User doing the configuration - CONFIG_USER="`whoami`@`hostname`" -if test -n "$ORGANIZATION"; then - CONFIG_USER="$CONFIG_USER at $ORGANIZATION" -fi - -## Configuration mode (production, development, profile, etc) saved above. - - -## Byte sex from the AC_C_BIGENDIAN macro. - -if test "X$ac_cv_c_bigendian" = "Xyes"; then - BYTESEX="big-endian" -else - BYTESEX="little-endian" -fi - - -if test "X$ac_cv_c_bigendian" = "Xyes"; then - WORDS_BIGENDIAN="yes" -else - WORDS_BIGENDIAN="no" -fi - - -## Parallel support? (set above except empty if none) -PARALLEL=${PARALLEL:-no} - -## Compiler with version information. This consists of the full path -## name of the compiler and the reported version number. - -## Strip anything that looks like a flag off of $CC -CC_NOFLAGS=`echo $CC | sed 's/ -.*//'` - -if `echo $CC_NOFLAGS | grep ^/ >/dev/null 2>&1`; then - CC_VERSION="$CC" -else - CC_VERSION="$CC"; - for x in `echo $PATH | sed -e 's/:/ /g'`; do - if test -x $x/$CC_NOFLAGS; then - CC_VERSION="$x/$CC" - break - fi - done -fi -if test -n "$cc_version_info"; then - CC_VERSION="$CC_VERSION ( $cc_version_info)" -fi - - -## Strip anything that looks like a flag off of $FC -FC_NOFLAGS=`echo $FC | sed 's/ -.*//'` - -if `echo $FC_NOFLAGS | grep ^/ >/dev/null 2>&1`; then - FC_VERSION="$FC" -else - FC_VERSION="$FC"; - for x in `echo $PATH | sed -e 's/:/ /g'`; do - if test -x $x/$FC_NOFLAGS; then - FC_VERSION="$x/$FC" - break - fi - done -fi -if test -n "$fc_version_info"; then - FC_VERSION="$FC_VERSION ( $fc_version_info)" -fi - - -## Strip anything that looks like a flag off of $CXX -CXX_NOFLAGS=`echo $CXX | sed 's/ -.*//'` - -if `echo $CXX_NOFLAGS | grep ^/ >/dev/null 2>&1`; then - CXX_VERSION="$CXX" -else - CXX_VERSION="$FC"; - for x in `echo $PATH | sed -e 's/:/ /g'`; do - if test -x $x/$CXX_NOFLAGS; then - CXX_VERSION="$x/$CXX" - break - fi - done -fi -if test -n "$cxx_version_info"; then - CXX_VERSION="$CXX_VERSION ( $cxx_version_info)" -fi - -## ---------------------------------------------------------------------- -## Where is the root of the source tree. Give an absolute address so -## we can find it no matter which directory of the distribution is our -## current directory. The built-in pwd fails on some systems, but the -## /bin/pwd version works OK. -## -if test -x /bin/pwd; then - pwd=/bin/pwd -else - pwd=pwd -fi - ROOT="`$pwd`" - -## ---------------------------------------------------------------------- -## Some programs shouldn't be built by default (e.g., programs to generate -## data files used by tests, some optional tests). -## Check if they want such programs built anyway. -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking additional programs should be built" >&5 -$as_echo_n "checking additional programs should be built... " >&6; } -# Check whether --enable-build-all was given. -if test "${enable_build_all+set}" = set; then : - enableval=$enable_build_all; BUILD_ALL=$enableval -else - BUILD_ALL=no -fi - - -if test "X$BUILD_ALL" = "Xyes"; then - echo "yes" -else - echo "no" -fi - if test "X$BUILD_ALL" = "Xyes"; then - BUILD_ALL_CONDITIONAL_TRUE= - BUILD_ALL_CONDITIONAL_FALSE='#' -else - BUILD_ALL_CONDITIONAL_TRUE='#' - BUILD_ALL_CONDITIONAL_FALSE= -fi - - -## ---------------------------------------------------------------------- -## Enable deprecated public API symbols -## - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if deprecated public symbols are available" >&5 -$as_echo_n "checking if deprecated public symbols are available... " >&6; }; -# Check whether --enable-deprecated-symbols was given. -if test "${enable_deprecated_symbols+set}" = set; then : - enableval=$enable_deprecated_symbols; DEPREC_SYMBOLS=$enableval -else - DEPREC_SYMBOLS=yes -fi - - -case "X-$DEPREC_SYMBOLS" in - X-yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - DEPRECATED_SYMBOLS=yes - ;; - X-no|*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - DEPRECATED_SYMBOLS=no - -$as_echo "#define NO_DEPRECATED_SYMBOLS 1" >>confdefs.h - - ;; -esac - -## -------------------------------------------------------------------------- -## Which version of the public APIs should the 'base' versioned symbols use? -## - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which version of public symbols to use by default" >&5 -$as_echo_n "checking which version of public symbols to use by default... " >&6; } - -# Check whether --with-default-api-version was given. -if test "${with_default_api_version+set}" = set; then : - withval=$with_default_api_version; -else - withval=v110 -fi - - -if test "X$withval" = "Xv16"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: v16" >&5 -$as_echo "v16" >&6; } - DEFAULT_API_VERSION=v16 - -$as_echo "#define USE_16_API_DEFAULT 1" >>confdefs.h - -elif test "X$withval" = "Xv18"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: v18" >&5 -$as_echo "v18" >&6; } - DEFAULT_API_VERSION=v18 -elif test "X$withval" = "Xv110"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: v110" >&5 -$as_echo "v110" >&6; } - DEFAULT_API_VERSION=v110 -else - as_fn_error $? "invalid version of public symbols given" "$LINENO" 5 -fi - -## It's an error to try to disable deprecated public API symbols while -## choosing an older version of the public API as the default. However, -## if the user insists on doing this via the --enable-unsupported configure -## flag, we'll let them. -if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then - if test "X${DEFAULT_API_VERSION}" != "Xv110" -a "X${DEPRECATED_SYMBOLS}" = "Xno" ; then - as_fn_error $? "Removing old public API symbols not allowed when using them as default public API symbols. Use --enable-unsupported to override this error." "$LINENO" 5 - fi -fi - -## ---------------------------------------------------------------------- -## Enable strict file format checks -## - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to perform strict file format checks" >&5 -$as_echo_n "checking whether to perform strict file format checks... " >&6; }; -# Check whether --enable-strict-format-checks was given. -if test "${enable_strict_format_checks+set}" = set; then : - enableval=$enable_strict_format_checks; STRICT_CHECKS=$enableval -fi - - -## Default to yes if debug is enabled -if test "X-$STRICT_CHECKS" = X- ; then - if test -z "$DEBUG_PKG" ; then - STRICT_CHECKS=no - else - STRICT_CHECKS=yes - fi -fi - -case "X-$STRICT_CHECKS" in - X-yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - STRICT_FORMAT_CHECKS=yes - -$as_echo "#define STRICT_FORMAT_CHECKS 1" >>confdefs.h - - ;; - X-no|*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - STRICT_FORMAT_CHECKS=no - ;; -esac - - -## ---------------------------------------------------------------------- -## Enable embedded library information -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to have library information embedded in the executables" >&5 -$as_echo_n "checking whether to have library information embedded in the executables... " >&6; } -# Check whether --enable-embedded-libinfo was given. -if test "${enable_embedded_libinfo+set}" = set; then : - enableval=$enable_embedded_libinfo; enable_embedded_libinfo=$enableval -else - enable_embedded_libinfo=yes -fi - - - if test "${enable_embedded_libinfo}" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_EMBEDDED_LIBINFO 1" >>confdefs.h - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - - -## ---------------------------------------------------------------------- -## Check if pointer alignments are enforced -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if alignment restrictions are strictly enforced" >&5 -$as_echo_n "checking if alignment restrictions are strictly enforced... " >&6; } -if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown, assuming yes" >&5 -$as_echo "unknown, assuming yes" >&6; } - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - #include - #include - - typedef struct { - size_t len; - void *p; - } hvl_t; - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - char *chp = "beefs"; - char **chpp = malloc (2 * sizeof (char *)); - char **chpp2; - hvl_t vl = { 12345, (void *) chp }; - hvl_t *vlp; - hvl_t *vlp2; - - memcpy ((void *) ((char *) chpp + 1), &chp, sizeof (char *)); - chpp2 = (char **) ((char *) chpp + 1); - if (strcmp (*chpp2, chp)) { - free (chpp); - return 1; - } - free (chpp); - - vlp = malloc (2 * sizeof (hvl_t)); - memcpy ((void *) ((char *) vlp + 1), &vl, sizeof (hvl_t)); - vlp2 = (hvl_t *) ((char *) vlp + 1); - if (vlp2->len != vl.len || vlp2->p != vl.p) { - free (vlp); - return 1; - } - free (vlp); - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - - -$as_echo "#define NO_ALIGNMENT_RESTRICTIONS 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - -## ---------------------------------------------------------------------- -## Restore user's CFLAGS. -CFLAGS="$saved_user_CFLAGS" -FCFLAGS="$saved_user_FCFLAGS" -CXXFLAGS="$saved_user_CXXFLAGS" -CPPFLAGS="$saved_user_CPPFLAGS" -LDFLAGS="$saved_user_LDFLAGS" - - -## ---------------------------------------------------------------------- -## Create automake conditionals to tell automake makefiles which directories -## need to be compiled - - if test "X$HDF_CXX" = "Xyes"; then - BUILD_CXX_CONDITIONAL_TRUE= - BUILD_CXX_CONDITIONAL_FALSE='#' -else - BUILD_CXX_CONDITIONAL_TRUE='#' - BUILD_CXX_CONDITIONAL_FALSE= -fi - - if test -n "$TESTPARALLEL"; then - BUILD_PARALLEL_CONDITIONAL_TRUE= - BUILD_PARALLEL_CONDITIONAL_FALSE='#' -else - BUILD_PARALLEL_CONDITIONAL_TRUE='#' - BUILD_PARALLEL_CONDITIONAL_FALSE= -fi - - if test "X$HDF_FORTRAN" = "Xyes"; then - BUILD_FORTRAN_CONDITIONAL_TRUE= - BUILD_FORTRAN_CONDITIONAL_FALSE='#' -else - BUILD_FORTRAN_CONDITIONAL_TRUE='#' - BUILD_FORTRAN_CONDITIONAL_FALSE= -fi - - if test "X$HDF5_HL" = "Xyes"; then - BUILD_HDF5_HL_CONDITIONAL_TRUE= - BUILD_HDF5_HL_CONDITIONAL_FALSE='#' -else - BUILD_HDF5_HL_CONDITIONAL_TRUE='#' - BUILD_HDF5_HL_CONDITIONAL_FALSE= -fi - - - -## ---------------------------------------------------------------------- -## Build the Makefiles. -## - -## The directory search list - SEARCH='$(srcdir) $(top_builddir)/src $(top_srcdir)/src' -export SEARCH - -## Some cleanup stuff -rm -f conftest conftest.o conftest.c dummy.o *.mod - -## Build config.status, touch the stamp files, and build all the Makefiles. -## The order is such that the first `make' does not need to update any -## configuration information. See config/commence.in for the order in which -## things need to be done. - -## First the stamp1 file for H5config.h.in -mkdir ./config >/dev/null 2>&1 -touch ./config/stamp1 - -## Then the config.status file (but not makefiles) -saved_no_create=$no_create -no_create=yes - -PARALLEL_MAKE="" -FORTRAN_PARALLEL_MAKE="" - -if test -n "$TESTPARALLEL"; then - PARALLEL_MAKE="$TESTPARALLEL/Makefile" - - if test "X$HDF_FORTRAN" = "Xyes"; then - FORTRAN_PARALLEL_MAKE=fortran/$TESTPARALLEL/Makefile - fi -fi -: ${CONFIG_LT=./config.lt} -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_LT" >&5 -$as_echo "$as_me: creating $CONFIG_LT" >&6;} -as_write_fail=0 -cat >"$CONFIG_LT" <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>"$CONFIG_LT" <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## --------------------------------- ## -## Main body of "$CONFIG_LT" script. ## -## --------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x "$CONFIG_LT" - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 - -lt_cl_help="\ -'$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $0 [OPTIONS] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -HDF5 config.lt 1.9.232 -configured by $0, generated by GNU Autoconf 2.69. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test 0 != $# -do - case $1 in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) as_fn_error $? "unrecognized option: $1 -Try '$0 --help' for more information." "$LINENO" 5 ;; - - *) as_fn_error $? "unrecognized argument: $1 -Try '$0 --help' for more information." "$LINENO" 5 ;; - esac - shift -done - -if $lt_cl_silent; then - exec 6>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' -predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' -predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' -postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' -LD_FC='`$ECHO "$LD_FC" | $SED "$delay_single_quote_subst"`' -reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' -reload_flag_FC='`$ECHO "$reload_flag_FC" | $SED "$delay_single_quote_subst"`' -reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' -reload_cmds_FC='`$ECHO "$reload_cmds_FC" | $SED "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_cmds_FC='`$ECHO "$old_archive_cmds_FC" | $SED "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' -compiler_FC='`$ECHO "$compiler_FC" | $SED "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' -GCC_FC='`$ECHO "$GCC_FC" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_FC='`$ECHO "$lt_prog_compiler_no_builtin_flag_FC" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic_FC='`$ECHO "$lt_prog_compiler_pic_FC" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_FC='`$ECHO "$lt_prog_compiler_wl_FC" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static_FC='`$ECHO "$lt_prog_compiler_static_FC" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_FC='`$ECHO "$lt_cv_prog_compiler_c_o_FC" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc_FC='`$ECHO "$archive_cmds_need_lc_FC" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_FC='`$ECHO "$enable_shared_with_static_runtimes_FC" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec_FC='`$ECHO "$export_dynamic_flag_spec_FC" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec_FC='`$ECHO "$whole_archive_flag_spec_FC" | $SED "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' -compiler_needs_object_FC='`$ECHO "$compiler_needs_object_FC" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds_FC='`$ECHO "$old_archive_from_new_cmds_FC" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_FC='`$ECHO "$old_archive_from_expsyms_cmds_FC" | $SED "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_FC='`$ECHO "$archive_cmds_FC" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds_FC='`$ECHO "$archive_expsym_cmds_FC" | $SED "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_cmds_FC='`$ECHO "$module_cmds_FC" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds_FC='`$ECHO "$module_expsym_cmds_FC" | $SED "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' -with_gnu_ld_FC='`$ECHO "$with_gnu_ld_FC" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag_FC='`$ECHO "$allow_undefined_flag_FC" | $SED "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' -no_undefined_flag_FC='`$ECHO "$no_undefined_flag_FC" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_FC='`$ECHO "$hardcode_libdir_flag_spec_FC" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator_FC='`$ECHO "$hardcode_libdir_separator_FC" | $SED "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_direct_FC='`$ECHO "$hardcode_direct_FC" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute_FC='`$ECHO "$hardcode_direct_absolute_FC" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L_FC='`$ECHO "$hardcode_minus_L_FC" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var_FC='`$ECHO "$hardcode_shlibpath_var_FC" | $SED "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_automatic_FC='`$ECHO "$hardcode_automatic_FC" | $SED "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' -inherit_rpath_FC='`$ECHO "$inherit_rpath_FC" | $SED "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' -link_all_deplibs_FC='`$ECHO "$link_all_deplibs_FC" | $SED "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' -always_export_symbols_FC='`$ECHO "$always_export_symbols_FC" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds_FC='`$ECHO "$export_symbols_cmds_FC" | $SED "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -exclude_expsyms_FC='`$ECHO "$exclude_expsyms_FC" | $SED "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -include_expsyms_FC='`$ECHO "$include_expsyms_FC" | $SED "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -prelink_cmds_FC='`$ECHO "$prelink_cmds_FC" | $SED "$delay_single_quote_subst"`' -postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -postlink_cmds_FC='`$ECHO "$postlink_cmds_FC" | $SED "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' -file_list_spec_FC='`$ECHO "$file_list_spec_FC" | $SED "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_action_FC='`$ECHO "$hardcode_action_FC" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs_FC='`$ECHO "$compiler_lib_search_dirs_FC" | $SED "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' -predep_objects_FC='`$ECHO "$predep_objects_FC" | $SED "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' -postdep_objects_FC='`$ECHO "$postdep_objects_FC" | $SED "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' -predeps_FC='`$ECHO "$predeps_FC" | $SED "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' -postdeps_FC='`$ECHO "$postdeps_FC" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path_FC='`$ECHO "$compiler_lib_search_path_FC" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -DLLTOOL \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_import \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_cv_nm_interface \ -nm_file_list_spec \ -lt_cv_truncate_bin \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib \ -compiler_lib_search_dirs \ -predep_objects \ -postdep_objects \ -predeps \ -postdeps \ -compiler_lib_search_path \ -LD_CXX \ -LD_FC \ -reload_flag_CXX \ -reload_flag_FC \ -compiler_CXX \ -compiler_FC \ -lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_no_builtin_flag_FC \ -lt_prog_compiler_pic_CXX \ -lt_prog_compiler_pic_FC \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_wl_FC \ -lt_prog_compiler_static_CXX \ -lt_prog_compiler_static_FC \ -lt_cv_prog_compiler_c_o_CXX \ -lt_cv_prog_compiler_c_o_FC \ -export_dynamic_flag_spec_CXX \ -export_dynamic_flag_spec_FC \ -whole_archive_flag_spec_CXX \ -whole_archive_flag_spec_FC \ -compiler_needs_object_CXX \ -compiler_needs_object_FC \ -with_gnu_ld_CXX \ -with_gnu_ld_FC \ -allow_undefined_flag_CXX \ -allow_undefined_flag_FC \ -no_undefined_flag_CXX \ -no_undefined_flag_FC \ -hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_flag_spec_FC \ -hardcode_libdir_separator_CXX \ -hardcode_libdir_separator_FC \ -exclude_expsyms_CXX \ -exclude_expsyms_FC \ -include_expsyms_CXX \ -include_expsyms_FC \ -file_list_spec_CXX \ -file_list_spec_FC \ -compiler_lib_search_dirs_CXX \ -compiler_lib_search_dirs_FC \ -predep_objects_CXX \ -predep_objects_FC \ -postdep_objects_CXX \ -postdep_objects_FC \ -predeps_CXX \ -predeps_FC \ -postdeps_CXX \ -postdeps_FC \ -compiler_lib_search_path_CXX \ -compiler_lib_search_path_FC; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -configure_time_dlsearch_path \ -configure_time_lt_sys_library_path \ -reload_cmds_CXX \ -reload_cmds_FC \ -old_archive_cmds_CXX \ -old_archive_cmds_FC \ -old_archive_from_new_cmds_CXX \ -old_archive_from_new_cmds_FC \ -old_archive_from_expsyms_cmds_CXX \ -old_archive_from_expsyms_cmds_FC \ -archive_cmds_CXX \ -archive_cmds_FC \ -archive_expsym_cmds_CXX \ -archive_expsym_cmds_FC \ -module_cmds_CXX \ -module_cmds_FC \ -module_expsym_cmds_CXX \ -module_expsym_cmds_FC \ -export_symbols_cmds_CXX \ -export_symbols_cmds_FC \ -prelink_cmds_CXX \ -prelink_cmds_FC \ -postlink_cmds_CXX \ -postlink_cmds_FC; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' - -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile' - - - - - - - -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5 -$as_echo "$as_me: creating $ofile" >&6;} - - - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# The names of the tagged configurations supported by this script. -available_tags='CXX FC ' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot=$lt_sysroot - -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# How to create reloadable object files. -reload_flag=$lt_reload_flag_CXX -reload_cmds=$lt_reload_cmds_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: FC - -# The linker used to build libraries. -LD=$lt_LD_FC - -# How to create reloadable object files. -reload_flag=$lt_reload_flag_FC -reload_cmds=$lt_reload_cmds_FC - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_FC - -# A language specific compiler. -CC=$lt_compiler_FC - -# Is the compiler the GNU compiler? -with_gcc=$GCC_FC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_FC - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_FC - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_FC - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_FC - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_FC - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_FC - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_FC - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_FC - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_FC - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_FC - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_FC - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_FC - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_FC -archive_expsym_cmds=$lt_archive_expsym_cmds_FC - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_FC -module_expsym_cmds=$lt_module_expsym_cmds_FC - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_FC - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_FC - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_FC - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_FC - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_FC - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_FC - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_FC - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_FC - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_FC - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_FC - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_FC - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_FC - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_FC - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_FC - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_FC - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_FC - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_FC - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds_FC - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_FC - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_FC - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_FC - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_FC -postdep_objects=$lt_postdep_objects_FC -predeps=$lt_predeps_FC -postdeps=$lt_postdeps_FC - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_FC - -# ### END LIBTOOL TAG CONFIG: FC -_LT_EOF - - -as_fn_exit 0 -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test yes = "$silent" && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec 5>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec 5>>config.log -$lt_cl_success || as_fn_exit 1 - -no_create=$saved_no_create - -## Then the stamp2 file for H5config.h -touch ./config/stamp2 - -## Finally the makefiles -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - -## Are we compiling static libraries, shared libraries, or both? This -## is only used for the libhdf5.settings file. We can't just look at -## $enable_static and $enable_shared because if they're yes the ltconfig -## might have decided that one or the other is simply not possible. -## Therefore we have to ask the generated `libtool' shell script -## which 'features' it has enabled. -if (./libtool --features | grep '^enable shared libraries' > /dev/null); then - enable_shared=yes -else - enable_shared=no -fi - -if (./libtool --features | grep '^enable static libraries' > /dev/null); then - enable_static=yes -else - enable_static=no -fi - -if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then - STATIC_SHARED="static, shared" -elif test "X$enable_static" = "Xyes"; then - STATIC_SHARED="static" -elif test "X$enable_shared" = "Xyes"; then - STATIC_SHARED="shared" -else - STATIC_SHARED="none" -fi - -## ---------------------------------------------------------------------- -## Set a macro if shared library is enabled. -## - if test "X$enable_shared" = "Xyes"; then - HAVE_SHARED_CONDITIONAL_TRUE= - HAVE_SHARED_CONDITIONAL_FALSE='#' -else - HAVE_SHARED_CONDITIONAL_TRUE='#' - HAVE_SHARED_CONDITIONAL_FALSE= -fi - - -ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpvds.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5ls/testh5lsvds.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/misc/vds/Makefile tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/src/H5fort_type_defines.h fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${FORTRAN_SHARED_CONDITIONAL_TRUE}" && test -z "${FORTRAN_SHARED_CONDITIONAL_FALSE}"; then - as_fn_error $? "conditional \"FORTRAN_SHARED_CONDITIONAL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${USE_PLUGINS_CONDITIONAL_TRUE}" && test -z "${USE_PLUGINS_CONDITIONAL_FALSE}"; then - as_fn_error $? "conditional \"USE_PLUGINS_CONDITIONAL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_SHARED_SZIP_CONDITIONAL_TRUE}" && test -z "${BUILD_SHARED_SZIP_CONDITIONAL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SHARED_SZIP_CONDITIONAL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DIRECT_VFD_CONDITIONAL_TRUE}" && test -z "${DIRECT_VFD_CONDITIONAL_FALSE}"; then - as_fn_error $? "conditional \"DIRECT_VFD_CONDITIONAL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_ALL_CONDITIONAL_TRUE}" && test -z "${BUILD_ALL_CONDITIONAL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ALL_CONDITIONAL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_CXX_CONDITIONAL_TRUE}" && test -z "${BUILD_CXX_CONDITIONAL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_CXX_CONDITIONAL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_PARALLEL_CONDITIONAL_TRUE}" && test -z "${BUILD_PARALLEL_CONDITIONAL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_PARALLEL_CONDITIONAL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_FORTRAN_CONDITIONAL_TRUE}" && test -z "${BUILD_FORTRAN_CONDITIONAL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_FORTRAN_CONDITIONAL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_HDF5_HL_CONDITIONAL_TRUE}" && test -z "${BUILD_HDF5_HL_CONDITIONAL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_HDF5_HL_CONDITIONAL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_SHARED_CONDITIONAL_TRUE}" && test -z "${HAVE_SHARED_CONDITIONAL_FALSE}"; then - as_fn_error $? "conditional \"HAVE_SHARED_CONDITIONAL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by HDF5 $as_me 1.9.232, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -HDF5 config.status 1.9.232 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' -predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' -predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' -postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' -LD_FC='`$ECHO "$LD_FC" | $SED "$delay_single_quote_subst"`' -reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' -reload_flag_FC='`$ECHO "$reload_flag_FC" | $SED "$delay_single_quote_subst"`' -reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' -reload_cmds_FC='`$ECHO "$reload_cmds_FC" | $SED "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_cmds_FC='`$ECHO "$old_archive_cmds_FC" | $SED "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' -compiler_FC='`$ECHO "$compiler_FC" | $SED "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' -GCC_FC='`$ECHO "$GCC_FC" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_FC='`$ECHO "$lt_prog_compiler_no_builtin_flag_FC" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic_FC='`$ECHO "$lt_prog_compiler_pic_FC" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_FC='`$ECHO "$lt_prog_compiler_wl_FC" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static_FC='`$ECHO "$lt_prog_compiler_static_FC" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_FC='`$ECHO "$lt_cv_prog_compiler_c_o_FC" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc_FC='`$ECHO "$archive_cmds_need_lc_FC" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_FC='`$ECHO "$enable_shared_with_static_runtimes_FC" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec_FC='`$ECHO "$export_dynamic_flag_spec_FC" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec_FC='`$ECHO "$whole_archive_flag_spec_FC" | $SED "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' -compiler_needs_object_FC='`$ECHO "$compiler_needs_object_FC" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds_FC='`$ECHO "$old_archive_from_new_cmds_FC" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_FC='`$ECHO "$old_archive_from_expsyms_cmds_FC" | $SED "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_FC='`$ECHO "$archive_cmds_FC" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds_FC='`$ECHO "$archive_expsym_cmds_FC" | $SED "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_cmds_FC='`$ECHO "$module_cmds_FC" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds_FC='`$ECHO "$module_expsym_cmds_FC" | $SED "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' -with_gnu_ld_FC='`$ECHO "$with_gnu_ld_FC" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag_FC='`$ECHO "$allow_undefined_flag_FC" | $SED "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' -no_undefined_flag_FC='`$ECHO "$no_undefined_flag_FC" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_FC='`$ECHO "$hardcode_libdir_flag_spec_FC" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator_FC='`$ECHO "$hardcode_libdir_separator_FC" | $SED "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_direct_FC='`$ECHO "$hardcode_direct_FC" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute_FC='`$ECHO "$hardcode_direct_absolute_FC" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L_FC='`$ECHO "$hardcode_minus_L_FC" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var_FC='`$ECHO "$hardcode_shlibpath_var_FC" | $SED "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_automatic_FC='`$ECHO "$hardcode_automatic_FC" | $SED "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' -inherit_rpath_FC='`$ECHO "$inherit_rpath_FC" | $SED "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' -link_all_deplibs_FC='`$ECHO "$link_all_deplibs_FC" | $SED "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' -always_export_symbols_FC='`$ECHO "$always_export_symbols_FC" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds_FC='`$ECHO "$export_symbols_cmds_FC" | $SED "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -exclude_expsyms_FC='`$ECHO "$exclude_expsyms_FC" | $SED "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -include_expsyms_FC='`$ECHO "$include_expsyms_FC" | $SED "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -prelink_cmds_FC='`$ECHO "$prelink_cmds_FC" | $SED "$delay_single_quote_subst"`' -postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -postlink_cmds_FC='`$ECHO "$postlink_cmds_FC" | $SED "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' -file_list_spec_FC='`$ECHO "$file_list_spec_FC" | $SED "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_action_FC='`$ECHO "$hardcode_action_FC" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs_FC='`$ECHO "$compiler_lib_search_dirs_FC" | $SED "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' -predep_objects_FC='`$ECHO "$predep_objects_FC" | $SED "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' -postdep_objects_FC='`$ECHO "$postdep_objects_FC" | $SED "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' -predeps_FC='`$ECHO "$predeps_FC" | $SED "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' -postdeps_FC='`$ECHO "$postdeps_FC" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path_FC='`$ECHO "$compiler_lib_search_path_FC" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -DLLTOOL \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_import \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_cv_nm_interface \ -nm_file_list_spec \ -lt_cv_truncate_bin \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib \ -compiler_lib_search_dirs \ -predep_objects \ -postdep_objects \ -predeps \ -postdeps \ -compiler_lib_search_path \ -LD_CXX \ -LD_FC \ -reload_flag_CXX \ -reload_flag_FC \ -compiler_CXX \ -compiler_FC \ -lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_no_builtin_flag_FC \ -lt_prog_compiler_pic_CXX \ -lt_prog_compiler_pic_FC \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_wl_FC \ -lt_prog_compiler_static_CXX \ -lt_prog_compiler_static_FC \ -lt_cv_prog_compiler_c_o_CXX \ -lt_cv_prog_compiler_c_o_FC \ -export_dynamic_flag_spec_CXX \ -export_dynamic_flag_spec_FC \ -whole_archive_flag_spec_CXX \ -whole_archive_flag_spec_FC \ -compiler_needs_object_CXX \ -compiler_needs_object_FC \ -with_gnu_ld_CXX \ -with_gnu_ld_FC \ -allow_undefined_flag_CXX \ -allow_undefined_flag_FC \ -no_undefined_flag_CXX \ -no_undefined_flag_FC \ -hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_flag_spec_FC \ -hardcode_libdir_separator_CXX \ -hardcode_libdir_separator_FC \ -exclude_expsyms_CXX \ -exclude_expsyms_FC \ -include_expsyms_CXX \ -include_expsyms_FC \ -file_list_spec_CXX \ -file_list_spec_FC \ -compiler_lib_search_dirs_CXX \ -compiler_lib_search_dirs_FC \ -predep_objects_CXX \ -predep_objects_FC \ -postdep_objects_CXX \ -postdep_objects_FC \ -predeps_CXX \ -predeps_FC \ -postdeps_CXX \ -postdeps_FC \ -compiler_lib_search_path_CXX \ -compiler_lib_search_path_FC; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -configure_time_dlsearch_path \ -configure_time_lt_sys_library_path \ -reload_cmds_CXX \ -reload_cmds_FC \ -old_archive_cmds_CXX \ -old_archive_cmds_FC \ -old_archive_from_new_cmds_CXX \ -old_archive_from_new_cmds_FC \ -old_archive_from_expsyms_cmds_CXX \ -old_archive_from_expsyms_cmds_FC \ -archive_cmds_CXX \ -archive_cmds_FC \ -archive_expsym_cmds_CXX \ -archive_expsym_cmds_FC \ -module_cmds_CXX \ -module_cmds_FC \ -module_expsym_cmds_CXX \ -module_expsym_cmds_FC \ -export_symbols_cmds_CXX \ -export_symbols_cmds_FC \ -prelink_cmds_CXX \ -prelink_cmds_FC \ -postlink_cmds_CXX \ -postlink_cmds_FC; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' - -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile' - - - - - -ac_aux_dir='$ac_aux_dir' - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "src/H5config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/H5config.h" ;; - "pubconf") CONFIG_COMMANDS="$CONFIG_COMMANDS pubconf" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "fortran/src/H5config_f.inc") CONFIG_HEADERS="$CONFIG_HEADERS fortran/src/H5config_f.inc" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "src/libhdf5.settings") CONFIG_FILES="$CONFIG_FILES src/libhdf5.settings" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; - "test/testcheck_version.sh") CONFIG_FILES="$CONFIG_FILES test/testcheck_version.sh" ;; - "test/testerror.sh") CONFIG_FILES="$CONFIG_FILES test/testerror.sh" ;; - "test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES test/H5srcdir_str.h" ;; - "test/testlibinfo.sh") CONFIG_FILES="$CONFIG_FILES test/testlibinfo.sh" ;; - "test/testlinks_env.sh") CONFIG_FILES="$CONFIG_FILES test/testlinks_env.sh" ;; - "test/test_plugin.sh") CONFIG_FILES="$CONFIG_FILES test/test_plugin.sh" ;; - "testpar/Makefile") CONFIG_FILES="$CONFIG_FILES testpar/Makefile" ;; - "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; - "tools/h5dump/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5dump/Makefile" ;; - "tools/h5dump/testh5dump.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dump.sh" ;; - "tools/h5dump/testh5dumppbits.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumppbits.sh" ;; - "tools/h5dump/testh5dumpvds.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumpvds.sh" ;; - "tools/h5dump/testh5dumpxml.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumpxml.sh" ;; - "tools/h5ls/testh5ls.sh") CONFIG_FILES="$CONFIG_FILES tools/h5ls/testh5ls.sh" ;; - "tools/h5ls/testh5lsvds.sh") CONFIG_FILES="$CONFIG_FILES tools/h5ls/testh5lsvds.sh" ;; - "tools/h5import/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5import/Makefile" ;; - "tools/h5import/h5importtestutil.sh") CONFIG_FILES="$CONFIG_FILES tools/h5import/h5importtestutil.sh" ;; - "tools/h5diff/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5diff/Makefile" ;; - "tools/h5diff/testh5diff.sh") CONFIG_FILES="$CONFIG_FILES tools/h5diff/testh5diff.sh" ;; - "tools/h5diff/testph5diff.sh") CONFIG_FILES="$CONFIG_FILES tools/h5diff/testph5diff.sh" ;; - "tools/h5jam/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5jam/Makefile" ;; - "tools/h5jam/testh5jam.sh") CONFIG_FILES="$CONFIG_FILES tools/h5jam/testh5jam.sh" ;; - "tools/h5repack/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5repack/Makefile" ;; - "tools/h5repack/h5repack.sh") CONFIG_FILES="$CONFIG_FILES tools/h5repack/h5repack.sh" ;; - "tools/h5repack/h5repack_plugin.sh") CONFIG_FILES="$CONFIG_FILES tools/h5repack/h5repack_plugin.sh" ;; - "tools/h5ls/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5ls/Makefile" ;; - "tools/h5copy/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5copy/Makefile" ;; - "tools/h5copy/testh5copy.sh") CONFIG_FILES="$CONFIG_FILES tools/h5copy/testh5copy.sh" ;; - "tools/lib/Makefile") CONFIG_FILES="$CONFIG_FILES tools/lib/Makefile" ;; - "tools/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tools/misc/Makefile" ;; - "tools/misc/h5cc") CONFIG_FILES="$CONFIG_FILES tools/misc/h5cc" ;; - "tools/misc/testh5mkgrp.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5mkgrp.sh" ;; - "tools/misc/testh5repart.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5repart.sh" ;; - "tools/misc/vds/Makefile") CONFIG_FILES="$CONFIG_FILES tools/misc/vds/Makefile" ;; - "tools/h5stat/testh5stat.sh") CONFIG_FILES="$CONFIG_FILES tools/h5stat/testh5stat.sh" ;; - "tools/h5stat/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5stat/Makefile" ;; - "tools/perform/Makefile") CONFIG_FILES="$CONFIG_FILES tools/perform/Makefile" ;; - "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; - "examples/run-c-ex.sh") CONFIG_FILES="$CONFIG_FILES examples/run-c-ex.sh" ;; - "examples/testh5cc.sh") CONFIG_FILES="$CONFIG_FILES examples/testh5cc.sh" ;; - "c++/Makefile") CONFIG_FILES="$CONFIG_FILES c++/Makefile" ;; - "c++/src/Makefile") CONFIG_FILES="$CONFIG_FILES c++/src/Makefile" ;; - "c++/src/h5c++") CONFIG_FILES="$CONFIG_FILES c++/src/h5c++" ;; - "c++/test/Makefile") CONFIG_FILES="$CONFIG_FILES c++/test/Makefile" ;; - "c++/test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES c++/test/H5srcdir_str.h" ;; - "c++/examples/Makefile") CONFIG_FILES="$CONFIG_FILES c++/examples/Makefile" ;; - "c++/examples/run-c++-ex.sh") CONFIG_FILES="$CONFIG_FILES c++/examples/run-c++-ex.sh" ;; - "c++/examples/testh5c++.sh") CONFIG_FILES="$CONFIG_FILES c++/examples/testh5c++.sh" ;; - "fortran/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/Makefile" ;; - "fortran/src/h5fc") CONFIG_FILES="$CONFIG_FILES fortran/src/h5fc" ;; - "fortran/src/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/src/Makefile" ;; - "fortran/src/H5fort_type_defines.h") CONFIG_FILES="$CONFIG_FILES fortran/src/H5fort_type_defines.h" ;; - "fortran/test/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/test/Makefile" ;; - "fortran/testpar/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/testpar/Makefile" ;; - "fortran/examples/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/examples/Makefile" ;; - "fortran/examples/run-fortran-ex.sh") CONFIG_FILES="$CONFIG_FILES fortran/examples/run-fortran-ex.sh" ;; - "fortran/examples/testh5fc.sh") CONFIG_FILES="$CONFIG_FILES fortran/examples/testh5fc.sh" ;; - "hl/Makefile") CONFIG_FILES="$CONFIG_FILES hl/Makefile" ;; - "hl/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/src/Makefile" ;; - "hl/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/test/Makefile" ;; - "hl/test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES hl/test/H5srcdir_str.h" ;; - "hl/tools/Makefile") CONFIG_FILES="$CONFIG_FILES hl/tools/Makefile" ;; - "hl/tools/gif2h5/Makefile") CONFIG_FILES="$CONFIG_FILES hl/tools/gif2h5/Makefile" ;; - "hl/tools/gif2h5/h52giftest.sh") CONFIG_FILES="$CONFIG_FILES hl/tools/gif2h5/h52giftest.sh" ;; - "hl/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/examples/Makefile" ;; - "hl/examples/run-hlc-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/examples/run-hlc-ex.sh" ;; - "hl/c++/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/Makefile" ;; - "hl/c++/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/src/Makefile" ;; - "hl/c++/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/test/Makefile" ;; - "hl/c++/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/examples/Makefile" ;; - "hl/c++/examples/run-hlc++-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/c++/examples/run-hlc++-ex.sh" ;; - "hl/fortran/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/Makefile" ;; - "hl/fortran/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/src/Makefile" ;; - "hl/fortran/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/test/Makefile" ;; - "hl/fortran/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/examples/Makefile" ;; - "hl/fortran/examples/run-hlfortran-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/fortran/examples/run-hlfortran-ex.sh" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "pubconf":C) - echo "creating src/H5pubconf.h" - sed 's/#define /#define H5_/' pubconf - if test ! -f src/H5pubconf.h; then - /bin/mv -f pubconf src/H5pubconf.h - elif (diff pubconf src/H5pubconf.h >/dev/null); then - rm -f pubconf - echo "src/H5pubconf.h is unchanged" - else - /bin/mv -f pubconf src/H5pubconf.h - fi - echo "Post process src/libhdf5.settings" - sed '/^#/d' < src/libhdf5.settings > libhdf5.settings.TMP - cp libhdf5.settings.TMP src/libhdf5.settings - rm -f libhdf5.settings.TMP - ;; - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "fortran/src/H5config_f.inc":H) cat fortran/src/H5config_f.inc | sed '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' >fortran/src/H5config_f.inc.tmp; mv -f fortran/src/H5config_f.inc.tmp fortran/src/H5config_f.inc ;; - "libtool":C) - - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# The names of the tagged configurations supported by this script. -available_tags='CXX FC ' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot=$lt_sysroot - -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# How to create reloadable object files. -reload_flag=$lt_reload_flag_CXX -reload_cmds=$lt_reload_cmds_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: FC - -# The linker used to build libraries. -LD=$lt_LD_FC - -# How to create reloadable object files. -reload_flag=$lt_reload_flag_FC -reload_cmds=$lt_reload_cmds_FC - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_FC - -# A language specific compiler. -CC=$lt_compiler_FC - -# Is the compiler the GNU compiler? -with_gcc=$GCC_FC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_FC - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_FC - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_FC - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_FC - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_FC - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_FC - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_FC - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_FC - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_FC - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_FC - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_FC - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_FC - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_FC -archive_expsym_cmds=$lt_archive_expsym_cmds_FC - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_FC -module_expsym_cmds=$lt_module_expsym_cmds_FC - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_FC - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_FC - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_FC - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_FC - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_FC - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_FC - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_FC - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_FC - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_FC - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_FC - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_FC - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_FC - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_FC - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_FC - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_FC - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_FC - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_FC - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds_FC - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_FC - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_FC - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_FC - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_FC -postdep_objects=$lt_postdep_objects_FC -predeps=$lt_predeps_FC -postdeps=$lt_postdeps_FC - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_FC - -# ### END LIBTOOL TAG CONFIG: FC -_LT_EOF - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - -chmod 755 tools/misc/h5cc - -if test "X$HDF_FORTRAN" = "Xyes"; then - chmod 755 fortran/src/h5fc -fi - -if test "X$HDF_CXX" = "Xyes"; then - chmod 755 c++/src/h5c++ -fi - -## HDF5 configure code created by autotools with gcc 4.9.2 is adding problematic -## linker flags: -l with no library name; -l , specifically gfortran or m. -## This sed script corrects "-l " first and then "-l " with no library name. -## If the order is not preserved, all instances of "-l " will be removed. -sed -e '/^postdeps/ s/-l \(a-zA-Z\)/-l\1/g' -e '/^postdeps/ s/-l //g' -i libtool - -## show the configure settings -cat src/libhdf5.settings diff --git a/examples/Makefile.in b/examples/Makefile.in deleted file mode 100644 index 1b3520b..0000000 --- a/examples/Makefile.in +++ /dev/null @@ -1,1395 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. -# -# HDF5 Library Examples Makefile(.in) -# - -# We can't tell automake about example programs, because they need to be -# built using h5cc (or h5fc, etc.) instead of the standard compilers. -# This creates some extra work for us. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -TESTS = $(TEST_SCRIPT) -subdir = examples -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc -CONFIG_CLEAN_FILES = run-c-ex.sh testh5cc.sh -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.sh.log=.log) -SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver -SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/run-c-ex.sh.in \ - $(srcdir)/testh5cc.sh.in $(top_srcdir)/bin/test-driver \ - $(top_srcdir)/config/commence.am \ - $(top_srcdir)/config/conclude.am \ - $(top_srcdir)/config/examples.am README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@ -AMTAR = @AMTAR@ - -# H5_CFLAGS holds flags that should be used when building hdf5, -# but which should not be exported to h5cc for building other programs. -# AM_CFLAGS is an automake construct which should be used by Makefiles -# instead of CFLAGS, as CFLAGS is reserved solely for the user to define. -# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. -AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ -AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BYTESEX = @BYTESEX@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_VERSION = @CC_VERSION@ -CFLAGS = @CFLAGS@ -CLEARFILEBUF = @CLEARFILEBUF@ -CODESTACK = @CODESTACK@ -CONFIG_DATE = @CONFIG_DATE@ -CONFIG_MODE = @CONFIG_MODE@ -CONFIG_USER = @CONFIG_USER@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CXX_VERSION = @CXX_VERSION@ -CYGPATH_W = @CYGPATH_W@ -DEBUG_PKG = @DEBUG_PKG@ -DEFAULT_API_VERSION = @DEFAULT_API_VERSION@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ -DIRECT_VFD = @DIRECT_VFD@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTERNAL_FILTERS = @EXTERNAL_FILTERS@ - -# Make sure that these variables are exported to the Makefiles -F9XMODEXT = @F9XMODEXT@ -F9XMODFLAG = @F9XMODFLAG@ -F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ -FC = @FC@ -FCFLAGS = @FCFLAGS@ -FCFLAGS_f90 = @FCFLAGS_f90@ -FCLIBS = @FCLIBS@ -FC_VERSION = @FC_VERSION@ -FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ -FSEARCH_DIRS = @FSEARCH_DIRS@ -Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ -GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ -H5_CFLAGS = @H5_CFLAGS@ -H5_CPPFLAGS = @H5_CPPFLAGS@ -H5_CXXFLAGS = @H5_CXXFLAGS@ -H5_FCFLAGS = @H5_FCFLAGS@ -H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ -H5_LDFLAGS = @H5_LDFLAGS@ -H5_VERSION = @H5_VERSION@ -HADDR_T = @HADDR_T@ -HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ -HAVE_PTHREAD = @HAVE_PTHREAD@ -HDF5_HL = @HDF5_HL@ -HDF5_INTERFACES = @HDF5_INTERFACES@ -HDF_CXX = @HDF_CXX@ -HDF_FORTRAN = @HDF_FORTRAN@ -HID_T = @HID_T@ -HL = @HL@ -HL_FOR = @HL_FOR@ -HSIZE_T = @HSIZE_T@ -HSSIZE_T = @HSSIZE_T@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTRUMENT = @INSTRUMENT@ -INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LL_PATH = @LL_PATH@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_STATIC_EXEC = @LT_STATIC_EXEC@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPE = @MPE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ -PARALLEL = @PARALLEL@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -ROOT = @ROOT@ -RUNPARALLEL = @RUNPARALLEL@ -RUNSERIAL = @RUNSERIAL@ -R_INTEGER = @R_INTEGER@ -R_LARGE = @R_LARGE@ -SEARCH = @SEARCH@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIZE_T = @SIZE_T@ -STATIC_EXEC = @STATIC_EXEC@ -STATIC_SHARED = @STATIC_SHARED@ -STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@ -STRIP = @STRIP@ -TESTPARALLEL = @TESTPARALLEL@ -THREADSAFE = @THREADSAFE@ -TIME = @TIME@ -TR = @TR@ -TRACE_API = @TRACE_API@ -UNAME_INFO = @UNAME_INFO@ -USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_SZIP = @USE_FILTER_SZIP@ -USINGMEMCHECKER = @USINGMEMCHECKER@ -VERSION = @VERSION@ -WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_FC = @ac_ct_FC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ - -# Install directories that automake doesn't know about -docdir = $(exec_prefix)/doc -dvidir = @dvidir@ -enable_shared = @enable_shared@ -enable_static = @enable_static@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# Shell commands used in Makefiles -RM = rm -f -CP = cp - -# Some machines need a command to run executables; this is that command -# so that our tests will run. -# We use RUNEXEC instead of RUNSERIAL directly because it may be that -# some tests need to be run with a different command. Older versions -# of the makefiles used the command -# $(LIBTOOL) --mode=execute -# in some directories, for instance. -RUNEXEC = $(RUNSERIAL) - -# Libraries to link to while building -LIBHDF5 = $(top_builddir)/src/libhdf5.la -LIBH5TEST = $(top_builddir)/test/libh5test.la -LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la -LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la -LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la -LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la -LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la -LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la -LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la - -# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below -# has been removed. According to the official description of DESTDIR by Gnu at -# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is -# prepended to the normal and complete install path that it precedes for the -# purpose of installing in a temporary directory which is useful for building -# rpms and other packages. The '/' after ${DESTDIR} will be followed by another -# '/' at the beginning of the normal install path. When DESTDIR is empty the -# path then begins with '//', which is incorrect and causes problems at least for -# Cygwin. - -# Scripts used to build examples -# If only shared libraries have been installed, have h5cc build examples with -# shared libraries instead of static libraries -H5CC = ${DESTDIR}$(bindir)/h5cc -H5CC_PP = ${DESTDIR}$(bindir)/h5pcc -H5FC = ${DESTDIR}$(bindir)/h5fc -H5FC_PP = ${DESTDIR}$(bindir)/h5pfc -H5CPP = ${DESTDIR}$(bindir)/h5c++ -ACLOCAL_AMFLAGS = "-I m4" - -# The trace script; this is used on source files from the C library to -# insert tracing macros. -TRACE = perl $(top_srcdir)/bin/trace - -# .chkexe files are used to mark tests that have run successfully. -# .chklog files are output from those tests. -# *.clog and *.clog2 are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 $(EXTLINK_DIRS) \ - *.h5 -@BUILD_PARALLEL_CONDITIONAL_TRUE@EXAMPLE_PROG_PARA = ph5example -INSTALL_SCRIPT_FILES = run-c-ex.sh -INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh -INSTALL_TOP_FILES = README - -# Example programs. -# Don't tell automake about them, because if it knew they were programs, -# it would try to compile them instead of using the h5cc script. -# Use the boilerplate in config/examples.am instead. -EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ - h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \ - h5_crtatt h5_crtgrp h5_crtdat \ - h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \ - h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc \ - h5_vds-exclim h5_vds-eiger h5_vds-simpleIO h5_vds-percival \ - h5_vds-percival-unlim h5_vds-percival-unlim-maxmin - -TEST_SCRIPT = testh5cc.sh -TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES) - -# Install files -# List all file that should be installed in examples directory -INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ - h5_crtgrpd.c h5_subset.c h5_cmprss.c h5_rdwt.c h5_crtgrpar.c \ - h5_extend.c h5_crtatt.c h5_crtgrp.c h5_crtdat.c \ - h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ - h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \ - h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c \ - h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c h5_vds-percival.c \ - h5_vds-percival-unlim.c h5_vds-percival-unlim-maxmin.c - - -# The external link examples demonstrate how to use paths; they need -# directories to be created to do this. -EXTLINK_DIRS = red blue u2w - -# Example directory -# Note: no '/' after DESTDIR. Explanation in commence.am -EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/c -EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples -@BUILD_SHARED_SZIP_CONDITIONAL_TRUE@LD_LIBRARY_PATH = $(LL_PATH) - -# Assume that all tests in this directory are examples, and tell -# conclude.am when to build them. -EXTRA_PROG = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA) - -# We need to tell automake what to clean -MOSTLYCLEANFILES = *.raw *.meta *.o -CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA) - -# Automake needs to be taught how to build lib, progs, and tests targets. -# These will be filled in automatically for the most part (e.g., -# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and -# EXTRA_TEST variables are supplied to allow the user to force targets to -# be built at certain times. -LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ - $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) - -PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ - $(EXTRA_PROG) - -chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -TEST_EXTENSIONS = .sh -SH_LOG_COMPILER = $(SHELL) -AM_SH_LOG_FLAGS = -TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_) -TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_) -TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_) -TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) -all: all-am - -.SUFFIXES: -.SUFFIXES: .log .sh .sh$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/examples.am $(top_srcdir)/config/conclude.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(top_srcdir)/config/commence.am $(top_srcdir)/config/examples.am $(top_srcdir)/config/conclude.am $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -run-c-ex.sh: $(top_builddir)/config.status $(srcdir)/run-c-ex.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -testh5cc.sh: $(top_builddir)/config.status $(srcdir)/testh5cc.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 -recheck: all - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -.sh.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.sh$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile all-local -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-data-local - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: installcheck-local - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool \ - mostlyclean-local - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-local - -.MAKE: check-am install-am install-strip - -.PHONY: all all-am all-local check check-TESTS check-am clean \ - clean-generic clean-libtool cscopelist-am ctags-am distclean \ - distclean-generic distclean-libtool distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-local install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installcheck-local installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ - pdf-am ps ps-am recheck tags-am uninstall uninstall-am \ - uninstall-local - -.PRECIOUS: Makefile - - -# List all build rules defined by HDF5 Makefiles as "PHONY" targets here. -# This tells the Makefiles that these targets are not files to be built but -# commands that should be executed even if a file with the same name already -# exists. -.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \ - build-tests check-clean check-install check-p check-s check-vfd \ - install-doc lib progs tests uninstall-doc _exec_check-s _test help - -help: - @$(top_srcdir)/bin/makehelp - -# How to build examples, using installed version of h5cc -@BUILD_PARALLEL_CONDITIONAL_TRUE@$(EXTRA_PROG): $(H5CC_PP) -@BUILD_PARALLEL_CONDITIONAL_TRUE@ $(H5CC_PP) $(H5CCFLAGS) $(CFLAGS) -o $@ $(srcdir)/$@.c; -@BUILD_PARALLEL_CONDITIONAL_FALSE@$(EXTRA_PROG): $(H5CC) -@BUILD_PARALLEL_CONDITIONAL_FALSE@ $(H5CC) $(H5CCFLAGS) $(CFLAGS) -o $@ $(srcdir)/$@.c; - -# Some examples depend on files created by other examples. -h5_read.chkexe_: h5_write.chkexe_ -h5_chunk_read.chkexe_: h5_extend_write.chkexe_ -h5_crtgrpd.chkexe_: h5_crtgrpar.chkexe_ -# h5_rdwt and h5_crtatt both modify the same file created by -# h5_crtdat. Serialize them. -h5_rdwt.chkexe_: h5_crtdat.chkexe_ -h5_crtatt.chkexe_: h5_rdwt.chkexe_ - -$(EXTLINK_DIRS): - echo $(mkdir_p) $@ - $(mkdir_p) $@ - -# List dependencies for each program. Normally, automake would take -# care of this for us, but if we tell automake about the programs it -# will try to build them with the normal C compiler, not h5cc. This is -# an inelegant way of solving the problem. -# All programs share the same build rule and a dependency on the main hdf5 -# library above. -h5_chunk_read: $(srcdir)/h5_chunk_read.c -h5_compound: $(srcdir)/h5_compound.c -h5_crtgrpd: $(srcdir)/h5_crtgrpd.c -h5_subset: $(srcdir)/h5_subset.c -h5_cmprss: $(srcdir)/h5_cmprss.c -h5_rdwt: $(srcdir)/h5_rdwt.c -h5_crtgrpar: $(srcdir)/h5_crtgrpar.c -h5_extend: $(srcdir)/h5_extend.c -h5_crtatt: $(srcdir)/h5_crtatt.c -h5_crtgrp: $(srcdir)/h5_crtgrp.c -h5_crtdat: $(srcdir)/h5_crtdat.c -h5_extend_write: $(srcdir)/h5_extend_write.c -h5_group: $(srcdir)/h5_group.c -h5_write: $(srcdir)/h5_write.c -h5_read: $(srcdir)/h5_read.c -h5_select: $(srcdir)/h5_select.c -h5_attribute: $(srcdir)/h5_attribute.c -h5_mount: $(srcdir)/h5_mount.c -h5_reference: $(srcdir)/h5_reference.c -h5_ref2reg: $(srcdir)/h5_ref2reg.c -h5_drivers: $(srcdir)/h5_drivers.c -ph5example: $(srcdir)/ph5example.c -h5_dtransform: $(srcdir)/h5_dtransform.c -h5_extlink: $(srcdir)/h5_extlink.c $(EXTLINK_DIRS) -h5_elink_unix2win: $(srcdir)/h5_elink_unix2win.c $(EXTLINK_DIRS) -h5_shared_mesg: $(srcdir)/h5_shared_mesg.c -h5_vds: $(srcdir)/h5_vds.c -h5_vds-exc: $(srcdir)/h5_vds-exc.c -h5_vds-exclim: $(srcdir)/h5_vds-exclim.c -h5_vds-eiger: $(srcdir)/h5_vds-eiger.c -h5_vds-simpleIO: $(srcdir)/h5_vds-simpleIO.c -h5_vds-percival: $(srcdir)/h5_vds-percival.c -h5_vds-percival-unlim: $(srcdir)/h5_vds-percival-unlim.c -h5_vds-percival-unlim-maxmin: $(srcdir)/h5_vds-percival-unlim-maxmin.c - -# How to create EXAMPLEDIR if it doesn't already exist -$(EXAMPLEDIR): - -$(top_srcdir)/bin/mkdirs $@ -$(EXAMPLETOPDIR): - -$(top_srcdir)/bin/mkdirs $@ - -# Install and uninstall rules. We install the source files, not the -# example programs themselves. -install-data-local: - @$(MAKE) $(AM_MAKEFLAGS) install-examples -uninstall-local: - @$(MAKE) $(AM_MAKEFLAGS) uninstall-examples - -install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) - @for f in X $(INSTALL_FILES); do \ - if test $$f != X; then \ - (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \ - chmod a-x $(EXAMPLEDIR)/$$f; \ - fi; \ - done - @for f in X $(INSTALL_SCRIPT_FILES); do \ - if test $$f != X; then \ - (set -x; $(INSTALL) $$f $(EXAMPLEDIR)/. || exit 1);\ - fi; \ - done - @for f in X $(INSTALL_TOP_FILES); do \ - if test $$f != X; then \ - (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \ - chmod a-x $(EXAMPLETOPDIR)/$$f;\ - fi; \ - done - @for f in X $(INSTALL_TOP_SCRIPT_FILES); do \ - if test $$f != X; then \ - (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \ - fi; \ - done - -uninstall-examples: - @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ - set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \ - fi - @if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \ - set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \ - fi - @if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \ - set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \ - fi - @if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \ - set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \ - fi - -installcheck-local: - @if test "$(STATIC_SHARED)" = "static, shared"; then \ - H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ - $(MAKE) $(AM_MAKEFLAGS) clean; \ - H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \ - elif test "$(STATIC_SHARED)" = "shared"; then \ - H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) check; \ - fi - @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \ - echo "============================"; \ - echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \ - echo "============================"; \ - (cd $(EXAMPLEDIR); \ - /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \ - fi - -# lib/progs/tests targets recurse into subdirectories. build-* targets -# build files in this directory. -build-lib: $(LIB) -build-progs: $(LIB) $(PROGS) -build-tests: $(LIB) $(PROGS) $(chk_TESTS) - -# General rule for recursive building targets. -# BUILT_SOURCES contain targets that need to be built before anything else -# in the directory (e.g., for Fortran type detection) -lib progs tests check-s check-p :: $(BUILT_SOURCES) - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# General rule for recursive cleaning targets. Like the rule above, -# but doesn't require building BUILT_SOURCES. -check-clean :: - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# Tell Automake to build tests when the user types `make all' (this is -# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since -# Automake won't build them automatically, either. -all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS) - -# make install-doc doesn't do anything outside of doc directory, but -# Makefiles should recognize it. -# UPDATE: docs no longer reside in this build tree, so this target -# is depreciated. -install-doc uninstall-doc: - @echo "Nothing to be done." - -# clean up files generated by tests so they can be re-run. -build-check-clean: - $(RM) -rf $(CHECK_CLEANFILES) - -# run check-clean whenever mostlyclean is run -mostlyclean-local: build-check-clean - -# check-install is just a synonym for installcheck -check-install: installcheck - -# Run each test in order, passing $(TEST_FLAGS) to the program. -# Since tests are done in a shell loop, "make -i" does apply inside it. -# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop. -# The timestamps give a rough idea how much time the tests use. -# -# Note that targets in chk_TESTS (defined above) will be built when the user -# types 'make tests' or 'make check', but only programs in TEST_PROG, -# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed. -check-TESTS: test - -test _test: - @$(MAKE) build-check-s - @$(MAKE) build-check-p - -# Actual execution of check-s. -build-check-s: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH) - -# The dummy.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \ - tname=$(@:.chkexe_=)$(EXEEXT);\ - log=$(@:.chkexe_=.chklog); \ - echo "============================"; \ - if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\ - else \ - echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - srcdir="$(srcdir)" \ - $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $(@:.chkexe_=.chkexe) || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - fi - -# The dummysh.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \ - cmd=$(@:.chkexe_=);\ - tname=`basename $$cmd`;\ - chkname=`basename $(@:.chkexe_=.chkexe)`;\ - log=`basename $(@:.chkexe_=.chklog)`; \ - echo "============================"; \ - if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - else \ - echo "Testing $${tname} $(TEST_FLAGS)"; \ - echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \ - srcdir="$(srcdir)" \ - $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $${chkname} || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - echo "============================"; \ - fi - -# Actual execution of check-p. -build-check-p: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @if test -n "$(TEST_PROG_PARA)"; then \ - echo "**** Hint ****"; \ - echo "Parallel test files reside in the current directory" \ - "by default."; \ - echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \ - echo " HDF5_PARAPREFIX=/PFS/user/me"; \ - echo " export HDF5_PARAPREFIX"; \ - echo " make check"; \ - echo "**** end of Hint ****"; \ - fi - @for test in $(TEST_PROG_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \ - RUNEXEC="$(RUNPARALLEL)" || exit 1; \ - fi; \ - done - @for test in $(TEST_SCRIPT_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \ - fi; \ - done - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -# Run test with different Virtual File Driver -check-vfd: $(LIB) $(PROGS) $(chk_TESTS) - @for vfd in $(VFD_LIST) dummy; do \ - if test $$vfd != dummy; then \ - echo "============================"; \ - echo "Testing Virtual File Driver $$vfd"; \ - echo "============================"; \ - $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ - fi; \ - done - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/Makefile.in b/src/Makefile.in deleted file mode 100644 index 9c21e0e..0000000 --- a/src/Makefile.in +++ /dev/null @@ -1,2014 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. -# -# HDF5 Library Makefile(.in) -# - - - - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = H5detect$(EXEEXT) H5make_libsettings$(EXEEXT) - -# Only compile parallel sources if necessary -@BUILD_PARALLEL_CONDITIONAL_TRUE@am__append_1 = H5ACmpio.c H5Cmpio.c H5Dmpio.c H5Fmpi.c H5FDmpi.c H5FDmpio.c H5Smpio.c - -# Only compile the direct VFD if necessary -@DIRECT_VFD_CONDITIONAL_TRUE@am__append_2 = H5FDdirect.c -TESTS = -subdir = src -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \ - $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = H5config.h $(top_builddir)/fortran/src/H5config_f.inc -CONFIG_CLEAN_FILES = libhdf5.settings -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(settingsdir)" \ - "$(DESTDIR)$(includedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libhdf5_la_LIBADD = -am__libhdf5_la_SOURCES_DIST = H5.c H5checksum.c H5dbg.c H5system.c \ - H5timer.c H5trace.c H5A.c H5Abtree2.c H5Adense.c H5Adeprec.c \ - H5Aint.c H5Atest.c H5AC.c H5B.c H5Bcache.c H5Bdbg.c H5B2.c \ - H5B2cache.c H5B2dbg.c H5B2hdr.c H5B2int.c H5B2stat.c \ - H5B2test.c H5C.c H5CS.c H5D.c H5Dbtree.c H5Dchunk.c \ - H5Dcompact.c H5Dcontig.c H5Ddbg.c H5Ddeprec.c H5Defl.c \ - H5Dfill.c H5Dint.c H5Dio.c H5Dlayout.c H5Doh.c H5Dscatgath.c \ - H5Dselect.c H5Dtest.c H5Dvirtual.c H5E.c H5Edeprec.c H5Eint.c \ - H5EA.c H5EAcache.c H5EAdbg.c H5EAdblkpage.c H5EAdblock.c \ - H5EAhdr.c H5EAiblock.c H5EAint.c H5EAsblock.c H5EAstat.c \ - H5EAtest.c H5F.c H5Fint.c H5Faccum.c H5Fcwfs.c H5Fdbg.c \ - H5Fdeprec.c H5Fefc.c H5Ffake.c H5Fio.c H5Fmount.c H5Fquery.c \ - H5Fsfile.c H5Fsuper.c H5Fsuper_cache.c H5Ftest.c H5FA.c \ - H5FAcache.c H5FAdbg.c H5FAdblock.c H5FAdblkpage.c H5FAhdr.c \ - H5FAstat.c H5FAtest.c H5FD.c H5FDcore.c H5FDfamily.c H5FDint.c \ - H5FDlog.c H5FDmulti.c H5FDsec2.c H5FDspace.c H5FDstdio.c \ - H5FL.c H5FO.c H5FS.c H5FScache.c H5FSdbg.c H5FSsection.c \ - H5FSstat.c H5FStest.c H5G.c H5Gbtree2.c H5Gcache.c \ - H5Gcompact.c H5Gdense.c H5Gdeprec.c H5Gent.c H5Gint.c \ - H5Glink.c H5Gloc.c H5Gname.c H5Gnode.c H5Gobj.c H5Goh.c \ - H5Groot.c H5Gstab.c H5Gtest.c H5Gtraverse.c H5HF.c \ - H5HFbtree2.c H5HFcache.c H5HFdbg.c H5HFdblock.c H5HFdtable.c \ - H5HFhdr.c H5HFhuge.c H5HFiblock.c H5HFiter.c H5HFman.c \ - H5HFsection.c H5HFspace.c H5HFstat.c H5HFtest.c H5HFtiny.c \ - H5HG.c H5HGcache.c H5HGdbg.c H5HGquery.c H5HL.c H5HLcache.c \ - H5HLdbg.c H5HLint.c H5HP.c H5I.c H5Itest.c H5L.c H5Lexternal.c \ - H5lib_settings.c H5MF.c H5MFaggr.c H5MFdbg.c H5MFsection.c \ - H5MM.c H5MP.c H5MPtest.c H5O.c H5Oainfo.c H5Oalloc.c H5Oattr.c \ - H5Oattribute.c H5Obogus.c H5Obtreek.c H5Ocache.c H5Ochunk.c \ - H5Ocont.c H5Ocopy.c H5Odbg.c H5Odrvinfo.c H5Odtype.c H5Oefl.c \ - H5Ofill.c H5Ofsinfo.c H5Oginfo.c H5Olayout.c H5Olinfo.c \ - H5Olink.c H5Omessage.c H5Omtime.c H5Oname.c H5Onull.c \ - H5Opline.c H5Orefcount.c H5Osdspace.c H5Oshared.c H5Ostab.c \ - H5Oshmesg.c H5Otest.c H5Ounknown.c H5P.c H5Pacpl.c H5Pdapl.c \ - H5Pdcpl.c H5Pdeprec.c H5Pdxpl.c H5Pencdec.c H5Pfapl.c \ - H5Pfcpl.c H5Pfmpl.c H5Pgcpl.c H5Pint.c H5Plapl.c H5Plcpl.c \ - H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c H5PL.c H5R.c \ - H5Rdeprec.c H5UC.c H5RS.c H5S.c H5Sall.c H5Sdbg.c H5Shyper.c \ - H5Snone.c H5Spoint.c H5Sselect.c H5Stest.c H5SL.c H5SM.c \ - H5SMbtree2.c H5SMcache.c H5SMmessage.c H5SMtest.c H5ST.c H5T.c \ - H5Tarray.c H5Tbit.c H5Tcommit.c H5Tcompound.c H5Tconv.c \ - H5Tcset.c H5Tdbg.c H5Tdeprec.c H5Tenum.c H5Tfields.c \ - H5Tfixed.c H5Tfloat.c H5Tinit.c H5Tnative.c H5Toffset.c \ - H5Toh.c H5Topaque.c H5Torder.c H5Tpad.c H5Tprecis.c \ - H5Tstrpad.c H5Tvisit.c H5Tvlen.c H5TS.c H5VM.c H5WB.c H5Z.c \ - H5Zdeflate.c H5Zfletcher32.c H5Znbit.c H5Zshuffle.c \ - H5Zscaleoffset.c H5Zszip.c H5Ztrans.c H5ACmpio.c H5Cmpio.c \ - H5Dmpio.c H5Fmpi.c H5FDmpi.c H5FDmpio.c H5Smpio.c H5FDdirect.c -@BUILD_PARALLEL_CONDITIONAL_TRUE@am__objects_1 = H5ACmpio.lo \ -@BUILD_PARALLEL_CONDITIONAL_TRUE@ H5Cmpio.lo H5Dmpio.lo \ -@BUILD_PARALLEL_CONDITIONAL_TRUE@ H5Fmpi.lo H5FDmpi.lo \ -@BUILD_PARALLEL_CONDITIONAL_TRUE@ H5FDmpio.lo H5Smpio.lo -@DIRECT_VFD_CONDITIONAL_TRUE@am__objects_2 = H5FDdirect.lo -am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ - H5timer.lo H5trace.lo H5A.lo H5Abtree2.lo H5Adense.lo \ - H5Adeprec.lo H5Aint.lo H5Atest.lo H5AC.lo H5B.lo H5Bcache.lo \ - H5Bdbg.lo H5B2.lo H5B2cache.lo H5B2dbg.lo H5B2hdr.lo \ - H5B2int.lo H5B2stat.lo H5B2test.lo H5C.lo H5CS.lo H5D.lo \ - H5Dbtree.lo H5Dchunk.lo H5Dcompact.lo H5Dcontig.lo H5Ddbg.lo \ - H5Ddeprec.lo H5Defl.lo H5Dfill.lo H5Dint.lo H5Dio.lo \ - H5Dlayout.lo H5Doh.lo H5Dscatgath.lo H5Dselect.lo H5Dtest.lo \ - H5Dvirtual.lo H5E.lo H5Edeprec.lo H5Eint.lo H5EA.lo \ - H5EAcache.lo H5EAdbg.lo H5EAdblkpage.lo H5EAdblock.lo \ - H5EAhdr.lo H5EAiblock.lo H5EAint.lo H5EAsblock.lo H5EAstat.lo \ - H5EAtest.lo H5F.lo H5Fint.lo H5Faccum.lo H5Fcwfs.lo H5Fdbg.lo \ - H5Fdeprec.lo H5Fefc.lo H5Ffake.lo H5Fio.lo H5Fmount.lo \ - H5Fquery.lo H5Fsfile.lo H5Fsuper.lo H5Fsuper_cache.lo \ - H5Ftest.lo H5FA.lo H5FAcache.lo H5FAdbg.lo H5FAdblock.lo \ - H5FAdblkpage.lo H5FAhdr.lo H5FAstat.lo H5FAtest.lo H5FD.lo \ - H5FDcore.lo H5FDfamily.lo H5FDint.lo H5FDlog.lo H5FDmulti.lo \ - H5FDsec2.lo H5FDspace.lo H5FDstdio.lo H5FL.lo H5FO.lo H5FS.lo \ - H5FScache.lo H5FSdbg.lo H5FSsection.lo H5FSstat.lo H5FStest.lo \ - H5G.lo H5Gbtree2.lo H5Gcache.lo H5Gcompact.lo H5Gdense.lo \ - H5Gdeprec.lo H5Gent.lo H5Gint.lo H5Glink.lo H5Gloc.lo \ - H5Gname.lo H5Gnode.lo H5Gobj.lo H5Goh.lo H5Groot.lo H5Gstab.lo \ - H5Gtest.lo H5Gtraverse.lo H5HF.lo H5HFbtree2.lo H5HFcache.lo \ - H5HFdbg.lo H5HFdblock.lo H5HFdtable.lo H5HFhdr.lo H5HFhuge.lo \ - H5HFiblock.lo H5HFiter.lo H5HFman.lo H5HFsection.lo \ - H5HFspace.lo H5HFstat.lo H5HFtest.lo H5HFtiny.lo H5HG.lo \ - H5HGcache.lo H5HGdbg.lo H5HGquery.lo H5HL.lo H5HLcache.lo \ - H5HLdbg.lo H5HLint.lo H5HP.lo H5I.lo H5Itest.lo H5L.lo \ - H5Lexternal.lo H5lib_settings.lo H5MF.lo H5MFaggr.lo \ - H5MFdbg.lo H5MFsection.lo H5MM.lo H5MP.lo H5MPtest.lo H5O.lo \ - H5Oainfo.lo H5Oalloc.lo H5Oattr.lo H5Oattribute.lo H5Obogus.lo \ - H5Obtreek.lo H5Ocache.lo H5Ochunk.lo H5Ocont.lo H5Ocopy.lo \ - H5Odbg.lo H5Odrvinfo.lo H5Odtype.lo H5Oefl.lo H5Ofill.lo \ - H5Ofsinfo.lo H5Oginfo.lo H5Olayout.lo H5Olinfo.lo H5Olink.lo \ - H5Omessage.lo H5Omtime.lo H5Oname.lo H5Onull.lo H5Opline.lo \ - H5Orefcount.lo H5Osdspace.lo H5Oshared.lo H5Ostab.lo \ - H5Oshmesg.lo H5Otest.lo H5Ounknown.lo H5P.lo H5Pacpl.lo \ - H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo H5Pdxpl.lo H5Pencdec.lo \ - H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo H5Pgcpl.lo H5Pint.lo \ - H5Plapl.lo H5Plcpl.lo H5Pocpl.lo H5Pocpypl.lo H5Pstrcpl.lo \ - H5Ptest.lo H5PL.lo H5R.lo H5Rdeprec.lo H5UC.lo H5RS.lo H5S.lo \ - H5Sall.lo H5Sdbg.lo H5Shyper.lo H5Snone.lo H5Spoint.lo \ - H5Sselect.lo H5Stest.lo H5SL.lo H5SM.lo H5SMbtree2.lo \ - H5SMcache.lo H5SMmessage.lo H5SMtest.lo H5ST.lo H5T.lo \ - H5Tarray.lo H5Tbit.lo H5Tcommit.lo H5Tcompound.lo H5Tconv.lo \ - H5Tcset.lo H5Tdbg.lo H5Tdeprec.lo H5Tenum.lo H5Tfields.lo \ - H5Tfixed.lo H5Tfloat.lo H5Tinit.lo H5Tnative.lo H5Toffset.lo \ - H5Toh.lo H5Topaque.lo H5Torder.lo H5Tpad.lo H5Tprecis.lo \ - H5Tstrpad.lo H5Tvisit.lo H5Tvlen.lo H5TS.lo H5VM.lo H5WB.lo \ - H5Z.lo H5Zdeflate.lo H5Zfletcher32.lo H5Znbit.lo H5Zshuffle.lo \ - H5Zscaleoffset.lo H5Zszip.lo H5Ztrans.lo $(am__objects_1) \ - $(am__objects_2) -libhdf5_la_OBJECTS = $(am_libhdf5_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -libhdf5_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libhdf5_la_LDFLAGS) $(LDFLAGS) -o $@ -PROGRAMS = $(noinst_PROGRAMS) -H5detect_SOURCES = H5detect.c -H5detect_OBJECTS = H5detect.$(OBJEXT) -H5detect_LDADD = $(LDADD) -H5make_libsettings_SOURCES = H5make_libsettings.c -H5make_libsettings_OBJECTS = H5make_libsettings.$(OBJEXT) -H5make_libsettings_LDADD = $(LDADD) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/fortran/src -depcomp = $(SHELL) $(top_srcdir)/bin/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(libhdf5_la_SOURCES) H5detect.c H5make_libsettings.c -DIST_SOURCES = $(am__libhdf5_la_SOURCES_DIST) H5detect.c \ - H5make_libsettings.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -DATA = $(settings_DATA) -HEADERS = $(include_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)H5config.h.in -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.sh.log=.log) -SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver -SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__DIST_COMMON = $(srcdir)/H5config.h.in $(srcdir)/Makefile.in \ - $(srcdir)/libhdf5.settings.in $(top_srcdir)/bin/depcomp \ - $(top_srcdir)/bin/test-driver $(top_srcdir)/config/commence.am \ - $(top_srcdir)/config/conclude.am \ - $(top_srcdir)/config/lt_vers.am COPYING -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@ -AMTAR = @AMTAR@ - -# H5_CFLAGS holds flags that should be used when building hdf5, -# but which should not be exported to h5cc for building other programs. -# AM_CFLAGS is an automake construct which should be used by Makefiles -# instead of CFLAGS, as CFLAGS is reserved solely for the user to define. -# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. -AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ -AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BYTESEX = @BYTESEX@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_VERSION = @CC_VERSION@ -CFLAGS = @CFLAGS@ -CLEARFILEBUF = @CLEARFILEBUF@ -CODESTACK = @CODESTACK@ -CONFIG_DATE = @CONFIG_DATE@ -CONFIG_MODE = @CONFIG_MODE@ -CONFIG_USER = @CONFIG_USER@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CXX_VERSION = @CXX_VERSION@ -CYGPATH_W = @CYGPATH_W@ -DEBUG_PKG = @DEBUG_PKG@ -DEFAULT_API_VERSION = @DEFAULT_API_VERSION@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ -DIRECT_VFD = @DIRECT_VFD@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTERNAL_FILTERS = @EXTERNAL_FILTERS@ - -# Make sure that these variables are exported to the Makefiles -F9XMODEXT = @F9XMODEXT@ -F9XMODFLAG = @F9XMODFLAG@ -F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ -FC = @FC@ -FCFLAGS = @FCFLAGS@ -FCFLAGS_f90 = @FCFLAGS_f90@ -FCLIBS = @FCLIBS@ -FC_VERSION = @FC_VERSION@ -FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ -FSEARCH_DIRS = @FSEARCH_DIRS@ -Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ -GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ -H5_CFLAGS = @H5_CFLAGS@ -H5_CPPFLAGS = @H5_CPPFLAGS@ -H5_CXXFLAGS = @H5_CXXFLAGS@ -H5_FCFLAGS = @H5_FCFLAGS@ -H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ -H5_LDFLAGS = @H5_LDFLAGS@ -H5_VERSION = @H5_VERSION@ -HADDR_T = @HADDR_T@ -HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ -HAVE_PTHREAD = @HAVE_PTHREAD@ -HDF5_HL = @HDF5_HL@ -HDF5_INTERFACES = @HDF5_INTERFACES@ -HDF_CXX = @HDF_CXX@ -HDF_FORTRAN = @HDF_FORTRAN@ -HID_T = @HID_T@ -HL = @HL@ -HL_FOR = @HL_FOR@ -HSIZE_T = @HSIZE_T@ -HSSIZE_T = @HSSIZE_T@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTRUMENT = @INSTRUMENT@ -INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LL_PATH = @LL_PATH@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_STATIC_EXEC = @LT_STATIC_EXEC@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPE = @MPE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ -PARALLEL = @PARALLEL@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -ROOT = @ROOT@ -RUNPARALLEL = @RUNPARALLEL@ -RUNSERIAL = @RUNSERIAL@ -R_INTEGER = @R_INTEGER@ -R_LARGE = @R_LARGE@ -SEARCH = @SEARCH@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIZE_T = @SIZE_T@ -STATIC_EXEC = @STATIC_EXEC@ -STATIC_SHARED = @STATIC_SHARED@ -STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@ -STRIP = @STRIP@ -TESTPARALLEL = @TESTPARALLEL@ -THREADSAFE = @THREADSAFE@ -TIME = @TIME@ -TR = @TR@ -TRACE_API = @TRACE_API@ -UNAME_INFO = @UNAME_INFO@ -USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_SZIP = @USE_FILTER_SZIP@ -USINGMEMCHECKER = @USINGMEMCHECKER@ -VERSION = @VERSION@ -WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_FC = @ac_ct_FC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ - -# Install directories that automake doesn't know about -docdir = $(exec_prefix)/doc -dvidir = @dvidir@ -enable_shared = @enable_shared@ -enable_static = @enable_static@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# Shell commands used in Makefiles -RM = rm -f -CP = cp - -# Some machines need a command to run executables; this is that command -# so that our tests will run. -# We use RUNEXEC instead of RUNSERIAL directly because it may be that -# some tests need to be run with a different command. Older versions -# of the makefiles used the command -# $(LIBTOOL) --mode=execute -# in some directories, for instance. -RUNEXEC = $(RUNSERIAL) - -# Libraries to link to while building -LIBHDF5 = $(top_builddir)/src/libhdf5.la -LIBH5TEST = $(top_builddir)/test/libh5test.la -LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la -LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la -LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la -LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la -LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la -LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la -LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la - -# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below -# has been removed. According to the official description of DESTDIR by Gnu at -# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is -# prepended to the normal and complete install path that it precedes for the -# purpose of installing in a temporary directory which is useful for building -# rpms and other packages. The '/' after ${DESTDIR} will be followed by another -# '/' at the beginning of the normal install path. When DESTDIR is empty the -# path then begins with '//', which is incorrect and causes problems at least for -# Cygwin. - -# Scripts used to build examples -# If only shared libraries have been installed, have h5cc build examples with -# shared libraries instead of static libraries -H5CC = ${DESTDIR}$(bindir)/h5cc -H5CC_PP = ${DESTDIR}$(bindir)/h5pcc -H5FC = ${DESTDIR}$(bindir)/h5fc -H5FC_PP = ${DESTDIR}$(bindir)/h5pfc -H5CPP = ${DESTDIR}$(bindir)/h5c++ -ACLOCAL_AMFLAGS = "-I m4" - -# The trace script; this is used on source files from the C library to -# insert tracing macros. -TRACE = perl $(top_srcdir)/bin/trace - -# .chkexe files are used to mark tests that have run successfully. -# .chklog files are output from those tests. -# *.clog and *.clog2 are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 - -# Add libtool shared library version numbers to the HDF5 library -# See libtool versioning documentation online. -# After making changes, run bin/reconfigure to update other configure related -# files like Makefile.in. -LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 222 -LT_VERS_AGE = 0 - -# Our main target, the HDF5 library -lib_LTLIBRARIES = libhdf5.la - -# Add libtool numbers to the HDF5 library (from config/lt_vers.am) -libhdf5_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) - -# H5Tinit.c and H5lib_settings.c are generated files and should be cleaned. -MOSTLYCLEANFILES = H5Tinit.c H5lib_settings.c -# H5pubconf.h is generated by configure, and should be cleaned. -DISTCLEANFILES = H5pubconf.h - -# library sources -libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c \ - H5trace.c H5A.c H5Abtree2.c H5Adense.c H5Adeprec.c H5Aint.c \ - H5Atest.c H5AC.c H5B.c H5Bcache.c H5Bdbg.c H5B2.c H5B2cache.c \ - H5B2dbg.c H5B2hdr.c H5B2int.c H5B2stat.c H5B2test.c H5C.c \ - H5CS.c H5D.c H5Dbtree.c H5Dchunk.c H5Dcompact.c H5Dcontig.c \ - H5Ddbg.c H5Ddeprec.c H5Defl.c H5Dfill.c H5Dint.c H5Dio.c \ - H5Dlayout.c H5Doh.c H5Dscatgath.c H5Dselect.c H5Dtest.c \ - H5Dvirtual.c H5E.c H5Edeprec.c H5Eint.c H5EA.c H5EAcache.c \ - H5EAdbg.c H5EAdblkpage.c H5EAdblock.c H5EAhdr.c H5EAiblock.c \ - H5EAint.c H5EAsblock.c H5EAstat.c H5EAtest.c H5F.c H5Fint.c \ - H5Faccum.c H5Fcwfs.c H5Fdbg.c H5Fdeprec.c H5Fefc.c H5Ffake.c \ - H5Fio.c H5Fmount.c H5Fquery.c H5Fsfile.c H5Fsuper.c \ - H5Fsuper_cache.c H5Ftest.c H5FA.c H5FAcache.c H5FAdbg.c \ - H5FAdblock.c H5FAdblkpage.c H5FAhdr.c H5FAstat.c H5FAtest.c \ - H5FD.c H5FDcore.c H5FDfamily.c H5FDint.c H5FDlog.c H5FDmulti.c \ - H5FDsec2.c H5FDspace.c H5FDstdio.c H5FL.c H5FO.c H5FS.c \ - H5FScache.c H5FSdbg.c H5FSsection.c H5FSstat.c H5FStest.c \ - H5G.c H5Gbtree2.c H5Gcache.c H5Gcompact.c H5Gdense.c \ - H5Gdeprec.c H5Gent.c H5Gint.c H5Glink.c H5Gloc.c H5Gname.c \ - H5Gnode.c H5Gobj.c H5Goh.c H5Groot.c H5Gstab.c H5Gtest.c \ - H5Gtraverse.c H5HF.c H5HFbtree2.c H5HFcache.c H5HFdbg.c \ - H5HFdblock.c H5HFdtable.c H5HFhdr.c H5HFhuge.c H5HFiblock.c \ - H5HFiter.c H5HFman.c H5HFsection.c H5HFspace.c H5HFstat.c \ - H5HFtest.c H5HFtiny.c H5HG.c H5HGcache.c H5HGdbg.c H5HGquery.c \ - H5HL.c H5HLcache.c H5HLdbg.c H5HLint.c H5HP.c H5I.c H5Itest.c \ - H5L.c H5Lexternal.c H5lib_settings.c H5MF.c H5MFaggr.c \ - H5MFdbg.c H5MFsection.c H5MM.c H5MP.c H5MPtest.c H5O.c \ - H5Oainfo.c H5Oalloc.c H5Oattr.c H5Oattribute.c H5Obogus.c \ - H5Obtreek.c H5Ocache.c H5Ochunk.c H5Ocont.c H5Ocopy.c H5Odbg.c \ - H5Odrvinfo.c H5Odtype.c H5Oefl.c H5Ofill.c H5Ofsinfo.c \ - H5Oginfo.c H5Olayout.c H5Olinfo.c H5Olink.c H5Omessage.c \ - H5Omtime.c H5Oname.c H5Onull.c H5Opline.c H5Orefcount.c \ - H5Osdspace.c H5Oshared.c H5Ostab.c H5Oshmesg.c H5Otest.c \ - H5Ounknown.c H5P.c H5Pacpl.c H5Pdapl.c H5Pdcpl.c H5Pdeprec.c \ - H5Pdxpl.c H5Pencdec.c H5Pfapl.c H5Pfcpl.c H5Pfmpl.c H5Pgcpl.c \ - H5Pint.c H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c \ - H5Ptest.c H5PL.c H5R.c H5Rdeprec.c H5UC.c H5RS.c H5S.c \ - H5Sall.c H5Sdbg.c H5Shyper.c H5Snone.c H5Spoint.c H5Sselect.c \ - H5Stest.c H5SL.c H5SM.c H5SMbtree2.c H5SMcache.c H5SMmessage.c \ - H5SMtest.c H5ST.c H5T.c H5Tarray.c H5Tbit.c H5Tcommit.c \ - H5Tcompound.c H5Tconv.c H5Tcset.c H5Tdbg.c H5Tdeprec.c \ - H5Tenum.c H5Tfields.c H5Tfixed.c H5Tfloat.c H5Tinit.c \ - H5Tnative.c H5Toffset.c H5Toh.c H5Topaque.c H5Torder.c \ - H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvisit.c H5Tvlen.c H5TS.c \ - H5VM.c H5WB.c H5Z.c H5Zdeflate.c H5Zfletcher32.c H5Znbit.c \ - H5Zshuffle.c H5Zscaleoffset.c H5Zszip.c H5Ztrans.c \ - $(am__append_1) $(am__append_2) - -# Public headers -include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5version.h \ - H5Apublic.h H5ACpublic.h \ - H5Cpublic.h H5Dpublic.h \ - H5Epubgen.h H5Epublic.h H5Fpublic.h \ - H5FDpublic.h H5FDcore.h H5FDdirect.h \ - H5FDfamily.h H5FDlog.h H5FDmpi.h H5FDmpio.h \ - H5FDmulti.h H5FDsec2.h H5FDstdio.h \ - H5Gpublic.h H5Ipublic.h H5Lpublic.h \ - H5MMpublic.h H5Opublic.h H5Ppublic.h \ - H5PLextern.h H5PLpublic.h \ - H5Rpublic.h H5Spublic.h \ - H5Tpublic.h H5Zpublic.h - - -# install libhdf5.settings in lib directory -settingsdir = $(libdir) -settings_DATA = libhdf5.settings - -# Automake needs to be taught how to build lib, progs, and tests targets. -# These will be filled in automatically for the most part (e.g., -# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and -# EXTRA_TEST variables are supplied to allow the user to force targets to -# be built at certain times. -LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ - $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) - -PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ - $(EXTRA_PROG) - -chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -TEST_EXTENSIONS = .sh -SH_LOG_COMPILER = $(SHELL) -AM_SH_LOG_FLAGS = -TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_) -TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_) -TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_) -TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) -all: H5config.h - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/lt_vers.am $(top_srcdir)/config/conclude.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(top_srcdir)/config/commence.am $(top_srcdir)/config/lt_vers.am $(top_srcdir)/config/conclude.am $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -H5config.h: stamp-h1 - @test -f $@ || rm -f stamp-h1 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 - -stamp-h1: $(srcdir)/H5config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status src/H5config.h -$(srcdir)/H5config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f H5config.h stamp-h1 -libhdf5.settings: $(top_builddir)/config.status $(srcdir)/libhdf5.settings.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -libhdf5.la: $(libhdf5_la_OBJECTS) $(libhdf5_la_DEPENDENCIES) $(EXTRA_libhdf5_la_DEPENDENCIES) - $(AM_V_CCLD)$(libhdf5_la_LINK) -rpath $(libdir) $(libhdf5_la_OBJECTS) $(libhdf5_la_LIBADD) $(LIBS) - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -H5detect$(EXEEXT): $(H5detect_OBJECTS) $(H5detect_DEPENDENCIES) $(EXTRA_H5detect_DEPENDENCIES) - @rm -f H5detect$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(H5detect_OBJECTS) $(H5detect_LDADD) $(LIBS) - -H5make_libsettings$(EXEEXT): $(H5make_libsettings_OBJECTS) $(H5make_libsettings_DEPENDENCIES) $(EXTRA_H5make_libsettings_DEPENDENCIES) - @rm -f H5make_libsettings$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(H5make_libsettings_OBJECTS) $(H5make_libsettings_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5A.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5AC.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5ACmpio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Abtree2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Adense.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Adeprec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Aint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Atest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5B.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5B2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5B2cache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5B2dbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5B2hdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5B2int.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5B2stat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5B2test.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Bcache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Bdbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5C.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5CS.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Cmpio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5D.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dbtree.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dchunk.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dcompact.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dcontig.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ddbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ddeprec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Defl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dfill.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dlayout.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dmpio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Doh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dscatgath.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dselect.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dtest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Dvirtual.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5E.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5EA.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5EAcache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5EAdbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5EAdblkpage.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5EAdblock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5EAhdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5EAiblock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5EAint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5EAsblock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5EAstat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5EAtest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Edeprec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Eint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5F.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FA.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FAcache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FAdbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FAdblkpage.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FAdblock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FAhdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FAstat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FAtest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FD.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDcore.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDdirect.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDfamily.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDlog.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDmpi.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDmpio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDmulti.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDsec2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDspace.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDstdio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FL.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FO.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FS.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FScache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FSdbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FSsection.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FSstat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FStest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Faccum.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fcwfs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fdbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fdeprec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fefc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ffake.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fmount.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fmpi.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fquery.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fsfile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fsuper.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fsuper_cache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ftest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5G.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gbtree2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gcache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gcompact.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gdense.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gdeprec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gent.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Glink.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gloc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gname.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gnode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gobj.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Goh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Groot.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gstab.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gtest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Gtraverse.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HF.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFbtree2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFcache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFdbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFdblock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFdtable.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFhdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFhuge.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFiblock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFiter.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFman.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFsection.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFspace.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFstat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFtest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HFtiny.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HG.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HGcache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HGdbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HGquery.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HL.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HLcache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HLdbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HLint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HP.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5I.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Itest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5L.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Lexternal.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5MF.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5MFaggr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5MFdbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5MFsection.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5MM.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5MP.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5MPtest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5O.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Oainfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Oalloc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Oattr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Oattribute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Obogus.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Obtreek.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ocache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ochunk.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ocont.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ocopy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Odbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Odrvinfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Odtype.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Oefl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ofill.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ofsinfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Oginfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Olayout.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Olinfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Olink.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Omessage.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Omtime.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Oname.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Onull.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Opline.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Orefcount.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Osdspace.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Oshared.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Oshmesg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ostab.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Otest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ounknown.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5P.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5PL.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pacpl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pdapl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pdcpl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pdeprec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pdxpl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pencdec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pfapl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pfcpl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pfmpl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pgcpl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Plapl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Plcpl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pocpl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pocpypl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pstrcpl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ptest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5R.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5RS.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Rdeprec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5S.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5SL.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5SM.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5SMbtree2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5SMcache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5SMmessage.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5SMtest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5ST.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Sall.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Sdbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Shyper.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Smpio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Snone.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Spoint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Sselect.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Stest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5T.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5TS.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tarray.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tbit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tcommit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tcompound.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tconv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tcset.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tdbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tdeprec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tenum.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tfields.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tfixed.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tfloat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tinit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tnative.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Toffset.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Toh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Topaque.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Torder.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tpad.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tprecis.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tstrpad.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tvisit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tvlen.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5UC.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VM.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5WB.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Z.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Zdeflate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Zfletcher32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Znbit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Zscaleoffset.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Zshuffle.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Zszip.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ztrans.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5checksum.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5dbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5detect.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5lib_settings.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5make_libsettings.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5system.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5timer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5trace.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-settingsDATA: $(settings_DATA) - @$(NORMAL_INSTALL) - @list='$(settings_DATA)'; test -n "$(settingsdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(settingsdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(settingsdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(settingsdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(settingsdir)" || exit $$?; \ - done - -uninstall-settingsDATA: - @$(NORMAL_UNINSTALL) - @list='$(settings_DATA)'; test -n "$(settingsdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(settingsdir)'; $(am__uninstall_files_from_dir) -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 -recheck: all - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -.sh.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.sh$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) \ - H5config.h all-local -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(settingsdir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS install-settingsDATA - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-local - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-settingsDATA - -.MAKE: all check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ - check-am clean clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ - ctags-am distclean distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-includeHEADERS install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-settingsDATA install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ - pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am \ - uninstall-includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-settingsDATA - -.PRECIOUS: Makefile - - -# List all build rules defined by HDF5 Makefiles as "PHONY" targets here. -# This tells the Makefiles that these targets are not files to be built but -# commands that should be executed even if a file with the same name already -# exists. -.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \ - build-tests check-clean check-install check-p check-s check-vfd \ - install-doc lib progs tests uninstall-doc _exec_check-s _test help - -help: - @$(top_srcdir)/bin/makehelp - -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. - -# Number format detection -# The LD_LIBRARY_PATH setting is a kludge. -# Things should have been all set during H5detect making. -# Remove the generated .c file if errors occur unless HDF5_Make_Ignore -# is set to ignore the error. -H5Tinit.c: H5detect$(EXEEXT) - LD_LIBRARY_PATH="$$LD_LIBRARY_PATH`echo $(LDFLAGS) | \ - sed -e 's/-L/:/g' -e 's/ //g'`" \ - $(RUNSERIAL) ./H5detect$(EXEEXT) > $@ || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - ($(RM) $@ ; exit 1) - -# Build configuration header file generation -# The LD_LIBRARY_PATH setting is a kludge. -# Things should have been all set during H5make_libsettings making. -# Remove the generated .c file if errors occur unless HDF5_Make_Ignore -# is set to ignore the error. -H5lib_settings.c: H5make_libsettings$(EXEEXT) libhdf5.settings - LD_LIBRARY_PATH="$$LD_LIBRARY_PATH`echo $(LDFLAGS) | \ - sed -e 's/-L/:/g' -e 's/ //g'`" \ - $(RUNSERIAL) ./H5make_libsettings$(EXEEXT) > $@ || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - ($(RM) $@ ; exit 1) - -# Error header generation -# -# Actually, H5Einit.h, H5Eterm.h, H5Edefin.h and H5Epubgen.h all -# depend on H5err.txt, but the perl script generates them all, so just -# list one here. -$(top_srcdir)/src/H5Edefin.h: $(top_srcdir)/src/H5err.txt - perl $(top_srcdir)/bin/make_err $? - -# API version macro generation -$(top_srcdir)/src/H5version.h: $(top_srcdir)/src/H5vers.txt - perl $(top_srcdir)/bin/make_vers $? - -# Assignment overflow macro generation -$(top_srcdir)/src/H5overflow.h: $(top_srcdir)/src/H5overflow.txt - perl $(top_srcdir)/bin/make_overflow $? - -# Add TRACE macros to library source files. This is done via the trace script -# in the hdf5/bin directory. If the file contains HDF5 API macros, a "clean" -# version of the source file is saved with a tilde (~) after its name and -# tracing information is inserted. trace should have no effect on files -# without HDF5 macros. -.PHONY: trace - -trace: $(libhdf5_la_SOURCES) - @for dep in $? dummy; do \ - if test $$dep != "dummy" -a -n "$(PERL)"; then \ - case "$$dep" in \ - *.c) \ - $(TRACE) $$dep; \ - ;; \ - esac; \ - fi; \ - done - -# lib/progs/tests targets recurse into subdirectories. build-* targets -# build files in this directory. -build-lib: $(LIB) -build-progs: $(LIB) $(PROGS) -build-tests: $(LIB) $(PROGS) $(chk_TESTS) - -# General rule for recursive building targets. -# BUILT_SOURCES contain targets that need to be built before anything else -# in the directory (e.g., for Fortran type detection) -lib progs tests check-s check-p :: $(BUILT_SOURCES) - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# General rule for recursive cleaning targets. Like the rule above, -# but doesn't require building BUILT_SOURCES. -check-clean :: - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# Tell Automake to build tests when the user types `make all' (this is -# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since -# Automake won't build them automatically, either. -all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS) - -# make install-doc doesn't do anything outside of doc directory, but -# Makefiles should recognize it. -# UPDATE: docs no longer reside in this build tree, so this target -# is depreciated. -install-doc uninstall-doc: - @echo "Nothing to be done." - -# clean up files generated by tests so they can be re-run. -build-check-clean: - $(RM) -rf $(CHECK_CLEANFILES) - -# run check-clean whenever mostlyclean is run -mostlyclean-local: build-check-clean - -# check-install is just a synonym for installcheck -check-install: installcheck - -# Run each test in order, passing $(TEST_FLAGS) to the program. -# Since tests are done in a shell loop, "make -i" does apply inside it. -# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop. -# The timestamps give a rough idea how much time the tests use. -# -# Note that targets in chk_TESTS (defined above) will be built when the user -# types 'make tests' or 'make check', but only programs in TEST_PROG, -# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed. -check-TESTS: test - -test _test: - @$(MAKE) build-check-s - @$(MAKE) build-check-p - -# Actual execution of check-s. -build-check-s: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH) - -# The dummy.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \ - tname=$(@:.chkexe_=)$(EXEEXT);\ - log=$(@:.chkexe_=.chklog); \ - echo "============================"; \ - if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\ - else \ - echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - srcdir="$(srcdir)" \ - $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $(@:.chkexe_=.chkexe) || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - fi - -# The dummysh.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \ - cmd=$(@:.chkexe_=);\ - tname=`basename $$cmd`;\ - chkname=`basename $(@:.chkexe_=.chkexe)`;\ - log=`basename $(@:.chkexe_=.chklog)`; \ - echo "============================"; \ - if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - else \ - echo "Testing $${tname} $(TEST_FLAGS)"; \ - echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \ - srcdir="$(srcdir)" \ - $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $${chkname} || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - echo "============================"; \ - fi - -# Actual execution of check-p. -build-check-p: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @if test -n "$(TEST_PROG_PARA)"; then \ - echo "**** Hint ****"; \ - echo "Parallel test files reside in the current directory" \ - "by default."; \ - echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \ - echo " HDF5_PARAPREFIX=/PFS/user/me"; \ - echo " export HDF5_PARAPREFIX"; \ - echo " make check"; \ - echo "**** end of Hint ****"; \ - fi - @for test in $(TEST_PROG_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \ - RUNEXEC="$(RUNPARALLEL)" || exit 1; \ - fi; \ - done - @for test in $(TEST_SCRIPT_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \ - fi; \ - done - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -# Run test with different Virtual File Driver -check-vfd: $(LIB) $(PROGS) $(chk_TESTS) - @for vfd in $(VFD_LIST) dummy; do \ - if test $$vfd != dummy; then \ - echo "============================"; \ - echo "Testing Virtual File Driver $$vfd"; \ - echo "============================"; \ - $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ - fi; \ - done - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/test/Makefile.in b/test/Makefile.in deleted file mode 100644 index 0930e3e..0000000 --- a/test/Makefile.in +++ /dev/null @@ -1,2750 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. -# -# HDF5 Library Test Makefile(.in) -# - - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_SHARED_CONDITIONAL_TRUE@am__append_1 = test_plugin.sh -@HAVE_SHARED_CONDITIONAL_TRUE@am__append_2 = plugin$(EXEEXT) -check_PROGRAMS = $(am__EXEEXT_1) error_test$(EXEEXT) \ - err_compat$(EXEEXT) tcheck_version$(EXEEXT) testmeta$(EXEEXT) \ - links_env$(EXEEXT) $(am__EXEEXT_2) -@HAVE_SHARED_CONDITIONAL_TRUE@am__append_3 = plugin -@BUILD_ALL_CONDITIONAL_TRUE@noinst_PROGRAMS = $(am__EXEEXT_3) -@DIRECT_VFD_CONDITIONAL_TRUE@am__append_4 = direct -TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) -subdir = test -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc -CONFIG_CLEAN_FILES = testcheck_version.sh testerror.sh H5srcdir_str.h \ - testlibinfo.sh testlinks_env.sh test_plugin.sh -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libdir)" -LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) -libdynlib1_la_LIBADD = -am__libdynlib1_la_SOURCES_DIST = dynlib1.c -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib1_la_OBJECTS = dynlib1.lo -libdynlib1_la_OBJECTS = $(am_libdynlib1_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib1_la_rpath = -rpath \ -@HAVE_SHARED_CONDITIONAL_TRUE@ $(libdir) -libdynlib2_la_LIBADD = -am__libdynlib2_la_SOURCES_DIST = dynlib2.c -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib2_la_OBJECTS = dynlib2.lo -libdynlib2_la_OBJECTS = $(am_libdynlib2_la_OBJECTS) -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib2_la_rpath = -rpath \ -@HAVE_SHARED_CONDITIONAL_TRUE@ $(libdir) -libdynlib3_la_LIBADD = -am__libdynlib3_la_SOURCES_DIST = dynlib3.c -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib3_la_OBJECTS = dynlib3.lo -libdynlib3_la_OBJECTS = $(am_libdynlib3_la_OBJECTS) -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib3_la_rpath = -rpath \ -@HAVE_SHARED_CONDITIONAL_TRUE@ $(libdir) -libh5test_la_LIBADD = -am_libh5test_la_OBJECTS = h5test.lo testframe.lo cache_common.lo -libh5test_la_OBJECTS = $(am_libh5test_la_OBJECTS) -@HAVE_SHARED_CONDITIONAL_FALSE@am_libh5test_la_rpath = -@HAVE_SHARED_CONDITIONAL_TRUE@am_libh5test_la_rpath = -am__EXEEXT_1 = testhdf5$(EXEEXT) lheap$(EXEEXT) ohdr$(EXEEXT) \ - stab$(EXEEXT) gheap$(EXEEXT) cache$(EXEEXT) cache_api$(EXEEXT) \ - cache_tagging$(EXEEXT) pool$(EXEEXT) accum$(EXEEXT) \ - hyperslab$(EXEEXT) istore$(EXEEXT) bittests$(EXEEXT) \ - dt_arith$(EXEEXT) dtypes$(EXEEXT) dsets$(EXEEXT) \ - cmpd_dset$(EXEEXT) filter_fail$(EXEEXT) extend$(EXEEXT) \ - external$(EXEEXT) efc$(EXEEXT) objcopy$(EXEEXT) links$(EXEEXT) \ - unlink$(EXEEXT) big$(EXEEXT) mtime$(EXEEXT) fillval$(EXEEXT) \ - mount$(EXEEXT) flush1$(EXEEXT) flush2$(EXEEXT) \ - app_ref$(EXEEXT) enum$(EXEEXT) set_extent$(EXEEXT) \ - ttsafe$(EXEEXT) enc_dec_plist$(EXEEXT) \ - enc_dec_plist_cross_platform$(EXEEXT) getname$(EXEEXT) \ - vfd$(EXEEXT) ntypes$(EXEEXT) dangle$(EXEEXT) \ - dtransform$(EXEEXT) reserved$(EXEEXT) cross_read$(EXEEXT) \ - freespace$(EXEEXT) mf$(EXEEXT) vds$(EXEEXT) farray$(EXEEXT) \ - earray$(EXEEXT) btree2$(EXEEXT) fheap$(EXEEXT) \ - file_image$(EXEEXT) unregister$(EXEEXT) -@HAVE_SHARED_CONDITIONAL_TRUE@am__EXEEXT_2 = plugin$(EXEEXT) -am__EXEEXT_3 = gen_bad_ohdr$(EXEEXT) gen_bogus$(EXEEXT) \ - gen_cross$(EXEEXT) gen_deflate$(EXEEXT) gen_filters$(EXEEXT) \ - gen_new_array$(EXEEXT) gen_new_fill$(EXEEXT) \ - gen_new_group$(EXEEXT) gen_new_mtime$(EXEEXT) \ - gen_new_super$(EXEEXT) gen_noencoder$(EXEEXT) \ - gen_nullspace$(EXEEXT) gen_udlinks$(EXEEXT) \ - space_overflow$(EXEEXT) gen_filespace$(EXEEXT) \ - gen_specmetaread$(EXEEXT) gen_sizes_lheap$(EXEEXT) \ - gen_file_image$(EXEEXT) gen_plist$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -accum_SOURCES = accum.c -accum_OBJECTS = accum.$(OBJEXT) -accum_LDADD = $(LDADD) -accum_DEPENDENCIES = libh5test.la $(LIBHDF5) -app_ref_SOURCES = app_ref.c -app_ref_OBJECTS = app_ref.$(OBJEXT) -app_ref_LDADD = $(LDADD) -app_ref_DEPENDENCIES = libh5test.la $(LIBHDF5) -big_SOURCES = big.c -big_OBJECTS = big.$(OBJEXT) -big_LDADD = $(LDADD) -big_DEPENDENCIES = libh5test.la $(LIBHDF5) -bittests_SOURCES = bittests.c -bittests_OBJECTS = bittests.$(OBJEXT) -bittests_LDADD = $(LDADD) -bittests_DEPENDENCIES = libh5test.la $(LIBHDF5) -btree2_SOURCES = btree2.c -btree2_OBJECTS = btree2.$(OBJEXT) -btree2_LDADD = $(LDADD) -btree2_DEPENDENCIES = libh5test.la $(LIBHDF5) -cache_SOURCES = cache.c -cache_OBJECTS = cache.$(OBJEXT) -cache_LDADD = $(LDADD) -cache_DEPENDENCIES = libh5test.la $(LIBHDF5) -cache_api_SOURCES = cache_api.c -cache_api_OBJECTS = cache_api.$(OBJEXT) -cache_api_LDADD = $(LDADD) -cache_api_DEPENDENCIES = libh5test.la $(LIBHDF5) -cache_tagging_SOURCES = cache_tagging.c -cache_tagging_OBJECTS = cache_tagging.$(OBJEXT) -cache_tagging_LDADD = $(LDADD) -cache_tagging_DEPENDENCIES = libh5test.la $(LIBHDF5) -cmpd_dset_SOURCES = cmpd_dset.c -cmpd_dset_OBJECTS = cmpd_dset.$(OBJEXT) -cmpd_dset_LDADD = $(LDADD) -cmpd_dset_DEPENDENCIES = libh5test.la $(LIBHDF5) -cross_read_SOURCES = cross_read.c -cross_read_OBJECTS = cross_read.$(OBJEXT) -cross_read_LDADD = $(LDADD) -cross_read_DEPENDENCIES = libh5test.la $(LIBHDF5) -dangle_SOURCES = dangle.c -dangle_OBJECTS = dangle.$(OBJEXT) -dangle_LDADD = $(LDADD) -dangle_DEPENDENCIES = libh5test.la $(LIBHDF5) -dsets_SOURCES = dsets.c -dsets_OBJECTS = dsets.$(OBJEXT) -dsets_LDADD = $(LDADD) -dsets_DEPENDENCIES = libh5test.la $(LIBHDF5) -dt_arith_SOURCES = dt_arith.c -dt_arith_OBJECTS = dt_arith.$(OBJEXT) -dt_arith_LDADD = $(LDADD) -dt_arith_DEPENDENCIES = libh5test.la $(LIBHDF5) -dtransform_SOURCES = dtransform.c -dtransform_OBJECTS = dtransform.$(OBJEXT) -dtransform_LDADD = $(LDADD) -dtransform_DEPENDENCIES = libh5test.la $(LIBHDF5) -dtypes_SOURCES = dtypes.c -dtypes_OBJECTS = dtypes.$(OBJEXT) -dtypes_LDADD = $(LDADD) -dtypes_DEPENDENCIES = libh5test.la $(LIBHDF5) -earray_SOURCES = earray.c -earray_OBJECTS = earray.$(OBJEXT) -earray_LDADD = $(LDADD) -earray_DEPENDENCIES = libh5test.la $(LIBHDF5) -efc_SOURCES = efc.c -efc_OBJECTS = efc.$(OBJEXT) -efc_LDADD = $(LDADD) -efc_DEPENDENCIES = libh5test.la $(LIBHDF5) -enc_dec_plist_SOURCES = enc_dec_plist.c -enc_dec_plist_OBJECTS = enc_dec_plist.$(OBJEXT) -enc_dec_plist_LDADD = $(LDADD) -enc_dec_plist_DEPENDENCIES = libh5test.la $(LIBHDF5) -enc_dec_plist_cross_platform_SOURCES = enc_dec_plist_cross_platform.c -enc_dec_plist_cross_platform_OBJECTS = \ - enc_dec_plist_cross_platform.$(OBJEXT) -enc_dec_plist_cross_platform_LDADD = $(LDADD) -enc_dec_plist_cross_platform_DEPENDENCIES = libh5test.la $(LIBHDF5) -enum_SOURCES = enum.c -enum_OBJECTS = enum.$(OBJEXT) -enum_LDADD = $(LDADD) -enum_DEPENDENCIES = libh5test.la $(LIBHDF5) -err_compat_SOURCES = err_compat.c -err_compat_OBJECTS = err_compat.$(OBJEXT) -err_compat_LDADD = $(LDADD) -err_compat_DEPENDENCIES = libh5test.la $(LIBHDF5) -error_test_SOURCES = error_test.c -error_test_OBJECTS = error_test.$(OBJEXT) -error_test_LDADD = $(LDADD) -error_test_DEPENDENCIES = libh5test.la $(LIBHDF5) -extend_SOURCES = extend.c -extend_OBJECTS = extend.$(OBJEXT) -extend_LDADD = $(LDADD) -extend_DEPENDENCIES = libh5test.la $(LIBHDF5) -external_SOURCES = external.c -external_OBJECTS = external.$(OBJEXT) -external_LDADD = $(LDADD) -external_DEPENDENCIES = libh5test.la $(LIBHDF5) -farray_SOURCES = farray.c -farray_OBJECTS = farray.$(OBJEXT) -farray_LDADD = $(LDADD) -farray_DEPENDENCIES = libh5test.la $(LIBHDF5) -fheap_SOURCES = fheap.c -fheap_OBJECTS = fheap.$(OBJEXT) -fheap_LDADD = $(LDADD) -fheap_DEPENDENCIES = libh5test.la $(LIBHDF5) -file_image_SOURCES = file_image.c -file_image_OBJECTS = file_image.$(OBJEXT) -file_image_LDADD = $(LDADD) -file_image_DEPENDENCIES = libh5test.la $(LIBHDF5) -fillval_SOURCES = fillval.c -fillval_OBJECTS = fillval.$(OBJEXT) -fillval_LDADD = $(LDADD) -fillval_DEPENDENCIES = libh5test.la $(LIBHDF5) -filter_fail_SOURCES = filter_fail.c -filter_fail_OBJECTS = filter_fail.$(OBJEXT) -filter_fail_LDADD = $(LDADD) -filter_fail_DEPENDENCIES = libh5test.la $(LIBHDF5) -flush1_SOURCES = flush1.c -flush1_OBJECTS = flush1.$(OBJEXT) -flush1_LDADD = $(LDADD) -flush1_DEPENDENCIES = libh5test.la $(LIBHDF5) -flush2_SOURCES = flush2.c -flush2_OBJECTS = flush2.$(OBJEXT) -flush2_LDADD = $(LDADD) -flush2_DEPENDENCIES = libh5test.la $(LIBHDF5) -freespace_SOURCES = freespace.c -freespace_OBJECTS = freespace.$(OBJEXT) -freespace_LDADD = $(LDADD) -freespace_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_bad_ohdr_SOURCES = gen_bad_ohdr.c -gen_bad_ohdr_OBJECTS = gen_bad_ohdr.$(OBJEXT) -gen_bad_ohdr_LDADD = $(LDADD) -gen_bad_ohdr_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_bogus_SOURCES = gen_bogus.c -gen_bogus_OBJECTS = gen_bogus.$(OBJEXT) -gen_bogus_LDADD = $(LDADD) -gen_bogus_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_cross_SOURCES = gen_cross.c -gen_cross_OBJECTS = gen_cross.$(OBJEXT) -gen_cross_LDADD = $(LDADD) -gen_cross_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_deflate_SOURCES = gen_deflate.c -gen_deflate_OBJECTS = gen_deflate.$(OBJEXT) -gen_deflate_LDADD = $(LDADD) -gen_deflate_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_file_image_SOURCES = gen_file_image.c -gen_file_image_OBJECTS = gen_file_image.$(OBJEXT) -gen_file_image_LDADD = $(LDADD) -gen_file_image_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_filespace_SOURCES = gen_filespace.c -gen_filespace_OBJECTS = gen_filespace.$(OBJEXT) -gen_filespace_LDADD = $(LDADD) -gen_filespace_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_filters_SOURCES = gen_filters.c -gen_filters_OBJECTS = gen_filters.$(OBJEXT) -gen_filters_LDADD = $(LDADD) -gen_filters_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_new_array_SOURCES = gen_new_array.c -gen_new_array_OBJECTS = gen_new_array.$(OBJEXT) -gen_new_array_LDADD = $(LDADD) -gen_new_array_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_new_fill_SOURCES = gen_new_fill.c -gen_new_fill_OBJECTS = gen_new_fill.$(OBJEXT) -gen_new_fill_LDADD = $(LDADD) -gen_new_fill_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_new_group_SOURCES = gen_new_group.c -gen_new_group_OBJECTS = gen_new_group.$(OBJEXT) -gen_new_group_LDADD = $(LDADD) -gen_new_group_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_new_mtime_SOURCES = gen_new_mtime.c -gen_new_mtime_OBJECTS = gen_new_mtime.$(OBJEXT) -gen_new_mtime_LDADD = $(LDADD) -gen_new_mtime_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_new_super_SOURCES = gen_new_super.c -gen_new_super_OBJECTS = gen_new_super.$(OBJEXT) -gen_new_super_LDADD = $(LDADD) -gen_new_super_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_noencoder_SOURCES = gen_noencoder.c -gen_noencoder_OBJECTS = gen_noencoder.$(OBJEXT) -gen_noencoder_LDADD = $(LDADD) -gen_noencoder_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_nullspace_SOURCES = gen_nullspace.c -gen_nullspace_OBJECTS = gen_nullspace.$(OBJEXT) -gen_nullspace_LDADD = $(LDADD) -gen_nullspace_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_plist_SOURCES = gen_plist.c -gen_plist_OBJECTS = gen_plist.$(OBJEXT) -gen_plist_LDADD = $(LDADD) -gen_plist_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_sizes_lheap_SOURCES = gen_sizes_lheap.c -gen_sizes_lheap_OBJECTS = gen_sizes_lheap.$(OBJEXT) -gen_sizes_lheap_LDADD = $(LDADD) -gen_sizes_lheap_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_specmetaread_SOURCES = gen_specmetaread.c -gen_specmetaread_OBJECTS = gen_specmetaread.$(OBJEXT) -gen_specmetaread_LDADD = $(LDADD) -gen_specmetaread_DEPENDENCIES = libh5test.la $(LIBHDF5) -gen_udlinks_SOURCES = gen_udlinks.c -gen_udlinks_OBJECTS = gen_udlinks.$(OBJEXT) -gen_udlinks_LDADD = $(LDADD) -gen_udlinks_DEPENDENCIES = libh5test.la $(LIBHDF5) -getname_SOURCES = getname.c -getname_OBJECTS = getname.$(OBJEXT) -getname_LDADD = $(LDADD) -getname_DEPENDENCIES = libh5test.la $(LIBHDF5) -gheap_SOURCES = gheap.c -gheap_OBJECTS = gheap.$(OBJEXT) -gheap_LDADD = $(LDADD) -gheap_DEPENDENCIES = libh5test.la $(LIBHDF5) -hyperslab_SOURCES = hyperslab.c -hyperslab_OBJECTS = hyperslab.$(OBJEXT) -hyperslab_LDADD = $(LDADD) -hyperslab_DEPENDENCIES = libh5test.la $(LIBHDF5) -istore_SOURCES = istore.c -istore_OBJECTS = istore.$(OBJEXT) -istore_LDADD = $(LDADD) -istore_DEPENDENCIES = libh5test.la $(LIBHDF5) -lheap_SOURCES = lheap.c -lheap_OBJECTS = lheap.$(OBJEXT) -lheap_LDADD = $(LDADD) -lheap_DEPENDENCIES = libh5test.la $(LIBHDF5) -links_SOURCES = links.c -links_OBJECTS = links.$(OBJEXT) -links_LDADD = $(LDADD) -links_DEPENDENCIES = libh5test.la $(LIBHDF5) -links_env_SOURCES = links_env.c -links_env_OBJECTS = links_env.$(OBJEXT) -links_env_LDADD = $(LDADD) -links_env_DEPENDENCIES = libh5test.la $(LIBHDF5) -mf_SOURCES = mf.c -mf_OBJECTS = mf.$(OBJEXT) -mf_LDADD = $(LDADD) -mf_DEPENDENCIES = libh5test.la $(LIBHDF5) -mount_SOURCES = mount.c -mount_OBJECTS = mount.$(OBJEXT) -mount_LDADD = $(LDADD) -mount_DEPENDENCIES = libh5test.la $(LIBHDF5) -mtime_SOURCES = mtime.c -mtime_OBJECTS = mtime.$(OBJEXT) -mtime_LDADD = $(LDADD) -mtime_DEPENDENCIES = libh5test.la $(LIBHDF5) -ntypes_SOURCES = ntypes.c -ntypes_OBJECTS = ntypes.$(OBJEXT) -ntypes_LDADD = $(LDADD) -ntypes_DEPENDENCIES = libh5test.la $(LIBHDF5) -objcopy_SOURCES = objcopy.c -objcopy_OBJECTS = objcopy.$(OBJEXT) -objcopy_LDADD = $(LDADD) -objcopy_DEPENDENCIES = libh5test.la $(LIBHDF5) -ohdr_SOURCES = ohdr.c -ohdr_OBJECTS = ohdr.$(OBJEXT) -ohdr_LDADD = $(LDADD) -ohdr_DEPENDENCIES = libh5test.la $(LIBHDF5) -plugin_SOURCES = plugin.c -plugin_OBJECTS = plugin.$(OBJEXT) -plugin_LDADD = $(LDADD) -plugin_DEPENDENCIES = libh5test.la $(LIBHDF5) -pool_SOURCES = pool.c -pool_OBJECTS = pool.$(OBJEXT) -pool_LDADD = $(LDADD) -pool_DEPENDENCIES = libh5test.la $(LIBHDF5) -reserved_SOURCES = reserved.c -reserved_OBJECTS = reserved.$(OBJEXT) -reserved_LDADD = $(LDADD) -reserved_DEPENDENCIES = libh5test.la $(LIBHDF5) -set_extent_SOURCES = set_extent.c -set_extent_OBJECTS = set_extent.$(OBJEXT) -set_extent_LDADD = $(LDADD) -set_extent_DEPENDENCIES = libh5test.la $(LIBHDF5) -space_overflow_SOURCES = space_overflow.c -space_overflow_OBJECTS = space_overflow.$(OBJEXT) -space_overflow_LDADD = $(LDADD) -space_overflow_DEPENDENCIES = libh5test.la $(LIBHDF5) -stab_SOURCES = stab.c -stab_OBJECTS = stab.$(OBJEXT) -stab_LDADD = $(LDADD) -stab_DEPENDENCIES = libh5test.la $(LIBHDF5) -tcheck_version_SOURCES = tcheck_version.c -tcheck_version_OBJECTS = tcheck_version.$(OBJEXT) -tcheck_version_LDADD = $(LDADD) -tcheck_version_DEPENDENCIES = libh5test.la $(LIBHDF5) -am_testhdf5_OBJECTS = testhdf5.$(OBJEXT) tarray.$(OBJEXT) \ - tattr.$(OBJEXT) tchecksum.$(OBJEXT) tconfig.$(OBJEXT) \ - tfile.$(OBJEXT) tgenprop.$(OBJEXT) th5o.$(OBJEXT) \ - th5s.$(OBJEXT) tcoords.$(OBJEXT) theap.$(OBJEXT) tid.$(OBJEXT) \ - titerate.$(OBJEXT) tmeta.$(OBJEXT) tmisc.$(OBJEXT) \ - trefer.$(OBJEXT) trefstr.$(OBJEXT) tselect.$(OBJEXT) \ - tskiplist.$(OBJEXT) tsohm.$(OBJEXT) ttime.$(OBJEXT) \ - ttst.$(OBJEXT) tunicode.$(OBJEXT) tvlstr.$(OBJEXT) \ - tvltypes.$(OBJEXT) -testhdf5_OBJECTS = $(am_testhdf5_OBJECTS) -testhdf5_LDADD = $(LDADD) -testhdf5_DEPENDENCIES = libh5test.la $(LIBHDF5) -testmeta_SOURCES = testmeta.c -testmeta_OBJECTS = testmeta.$(OBJEXT) -testmeta_LDADD = $(LDADD) -testmeta_DEPENDENCIES = libh5test.la $(LIBHDF5) -am_ttsafe_OBJECTS = ttsafe.$(OBJEXT) ttsafe_dcreate.$(OBJEXT) \ - ttsafe_error.$(OBJEXT) ttsafe_cancel.$(OBJEXT) \ - ttsafe_acreate.$(OBJEXT) -ttsafe_OBJECTS = $(am_ttsafe_OBJECTS) -ttsafe_LDADD = $(LDADD) -ttsafe_DEPENDENCIES = libh5test.la $(LIBHDF5) -unlink_SOURCES = unlink.c -unlink_OBJECTS = unlink.$(OBJEXT) -unlink_LDADD = $(LDADD) -unlink_DEPENDENCIES = libh5test.la $(LIBHDF5) -unregister_SOURCES = unregister.c -unregister_OBJECTS = unregister.$(OBJEXT) -unregister_LDADD = $(LDADD) -unregister_DEPENDENCIES = libh5test.la $(LIBHDF5) -vds_SOURCES = vds.c -vds_OBJECTS = vds.$(OBJEXT) -vds_LDADD = $(LDADD) -vds_DEPENDENCIES = libh5test.la $(LIBHDF5) -vfd_SOURCES = vfd.c -vfd_OBJECTS = vfd.$(OBJEXT) -vfd_LDADD = $(LDADD) -vfd_DEPENDENCIES = libh5test.la $(LIBHDF5) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src -depcomp = $(SHELL) $(top_srcdir)/bin/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(libdynlib1_la_SOURCES) $(libdynlib2_la_SOURCES) \ - $(libdynlib3_la_SOURCES) $(libh5test_la_SOURCES) accum.c \ - app_ref.c big.c bittests.c btree2.c cache.c cache_api.c \ - cache_tagging.c cmpd_dset.c cross_read.c dangle.c dsets.c \ - dt_arith.c dtransform.c dtypes.c earray.c efc.c \ - enc_dec_plist.c enc_dec_plist_cross_platform.c enum.c \ - err_compat.c error_test.c extend.c external.c farray.c fheap.c \ - file_image.c fillval.c filter_fail.c flush1.c flush2.c \ - freespace.c gen_bad_ohdr.c gen_bogus.c gen_cross.c \ - gen_deflate.c gen_file_image.c gen_filespace.c gen_filters.c \ - gen_new_array.c gen_new_fill.c gen_new_group.c gen_new_mtime.c \ - gen_new_super.c gen_noencoder.c gen_nullspace.c gen_plist.c \ - gen_sizes_lheap.c gen_specmetaread.c gen_udlinks.c getname.c \ - gheap.c hyperslab.c istore.c lheap.c links.c links_env.c mf.c \ - mount.c mtime.c ntypes.c objcopy.c ohdr.c plugin.c pool.c \ - reserved.c set_extent.c space_overflow.c stab.c \ - tcheck_version.c $(testhdf5_SOURCES) testmeta.c \ - $(ttsafe_SOURCES) unlink.c unregister.c vds.c vfd.c -DIST_SOURCES = $(am__libdynlib1_la_SOURCES_DIST) \ - $(am__libdynlib2_la_SOURCES_DIST) \ - $(am__libdynlib3_la_SOURCES_DIST) $(libh5test_la_SOURCES) \ - accum.c app_ref.c big.c bittests.c btree2.c cache.c \ - cache_api.c cache_tagging.c cmpd_dset.c cross_read.c dangle.c \ - dsets.c dt_arith.c dtransform.c dtypes.c earray.c efc.c \ - enc_dec_plist.c enc_dec_plist_cross_platform.c enum.c \ - err_compat.c error_test.c extend.c external.c farray.c fheap.c \ - file_image.c fillval.c filter_fail.c flush1.c flush2.c \ - freespace.c gen_bad_ohdr.c gen_bogus.c gen_cross.c \ - gen_deflate.c gen_file_image.c gen_filespace.c gen_filters.c \ - gen_new_array.c gen_new_fill.c gen_new_group.c gen_new_mtime.c \ - gen_new_super.c gen_noencoder.c gen_nullspace.c gen_plist.c \ - gen_sizes_lheap.c gen_specmetaread.c gen_udlinks.c getname.c \ - gheap.c hyperslab.c istore.c lheap.c links.c links_env.c mf.c \ - mount.c mtime.c ntypes.c objcopy.c ohdr.c plugin.c pool.c \ - reserved.c set_extent.c space_overflow.c stab.c \ - tcheck_version.c $(testhdf5_SOURCES) testmeta.c \ - $(ttsafe_SOURCES) unlink.c unregister.c vds.c vfd.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.sh.log=.log) -SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver -SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS) -am__DIST_COMMON = $(srcdir)/H5srcdir_str.h.in $(srcdir)/Makefile.in \ - $(srcdir)/test_plugin.sh.in $(srcdir)/testcheck_version.sh.in \ - $(srcdir)/testerror.sh.in $(srcdir)/testlibinfo.sh.in \ - $(srcdir)/testlinks_env.sh.in $(top_srcdir)/bin/depcomp \ - $(top_srcdir)/bin/test-driver $(top_srcdir)/config/commence.am \ - $(top_srcdir)/config/conclude.am COPYING -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@ -AMTAR = @AMTAR@ - -# H5_CFLAGS holds flags that should be used when building hdf5, -# but which should not be exported to h5cc for building other programs. -# AM_CFLAGS is an automake construct which should be used by Makefiles -# instead of CFLAGS, as CFLAGS is reserved solely for the user to define. -# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. -AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ -AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \ - -I$(top_builddir)/src -AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BYTESEX = @BYTESEX@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_VERSION = @CC_VERSION@ -CFLAGS = @CFLAGS@ -CLEARFILEBUF = @CLEARFILEBUF@ -CODESTACK = @CODESTACK@ -CONFIG_DATE = @CONFIG_DATE@ -CONFIG_MODE = @CONFIG_MODE@ -CONFIG_USER = @CONFIG_USER@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CXX_VERSION = @CXX_VERSION@ -CYGPATH_W = @CYGPATH_W@ -DEBUG_PKG = @DEBUG_PKG@ -DEFAULT_API_VERSION = @DEFAULT_API_VERSION@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ -DIRECT_VFD = @DIRECT_VFD@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTERNAL_FILTERS = @EXTERNAL_FILTERS@ - -# Make sure that these variables are exported to the Makefiles -F9XMODEXT = @F9XMODEXT@ -F9XMODFLAG = @F9XMODFLAG@ -F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ -FC = @FC@ -FCFLAGS = @FCFLAGS@ -FCFLAGS_f90 = @FCFLAGS_f90@ -FCLIBS = @FCLIBS@ -FC_VERSION = @FC_VERSION@ -FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ -FSEARCH_DIRS = @FSEARCH_DIRS@ -Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ -GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ -H5_CFLAGS = @H5_CFLAGS@ -H5_CPPFLAGS = @H5_CPPFLAGS@ -H5_CXXFLAGS = @H5_CXXFLAGS@ -H5_FCFLAGS = @H5_FCFLAGS@ -H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ -H5_LDFLAGS = @H5_LDFLAGS@ -H5_VERSION = @H5_VERSION@ -HADDR_T = @HADDR_T@ -HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ -HAVE_PTHREAD = @HAVE_PTHREAD@ -HDF5_HL = @HDF5_HL@ -HDF5_INTERFACES = @HDF5_INTERFACES@ -HDF_CXX = @HDF_CXX@ -HDF_FORTRAN = @HDF_FORTRAN@ -HID_T = @HID_T@ -HL = @HL@ -HL_FOR = @HL_FOR@ -HSIZE_T = @HSIZE_T@ -HSSIZE_T = @HSSIZE_T@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTRUMENT = @INSTRUMENT@ -INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LL_PATH = @LL_PATH@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_STATIC_EXEC = @LT_STATIC_EXEC@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPE = @MPE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ -PARALLEL = @PARALLEL@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -ROOT = @ROOT@ -RUNPARALLEL = @RUNPARALLEL@ -RUNSERIAL = @RUNSERIAL@ -R_INTEGER = @R_INTEGER@ -R_LARGE = @R_LARGE@ -SEARCH = @SEARCH@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIZE_T = @SIZE_T@ -STATIC_EXEC = @STATIC_EXEC@ -STATIC_SHARED = @STATIC_SHARED@ -STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@ -STRIP = @STRIP@ -TESTPARALLEL = @TESTPARALLEL@ -THREADSAFE = @THREADSAFE@ -TIME = @TIME@ -TR = @TR@ -TRACE_API = @TRACE_API@ -UNAME_INFO = @UNAME_INFO@ -USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_SZIP = @USE_FILTER_SZIP@ -USINGMEMCHECKER = @USINGMEMCHECKER@ -VERSION = @VERSION@ -WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_FC = @ac_ct_FC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ - -# Install directories that automake doesn't know about -docdir = $(exec_prefix)/doc -dvidir = @dvidir@ -enable_shared = @enable_shared@ -enable_static = @enable_static@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# Shell commands used in Makefiles -RM = rm -f -CP = cp - -# Some machines need a command to run executables; this is that command -# so that our tests will run. -# We use RUNEXEC instead of RUNSERIAL directly because it may be that -# some tests need to be run with a different command. Older versions -# of the makefiles used the command -# $(LIBTOOL) --mode=execute -# in some directories, for instance. -RUNEXEC = $(RUNSERIAL) - -# Libraries to link to while building -LIBHDF5 = $(top_builddir)/src/libhdf5.la -LIBH5TEST = $(top_builddir)/test/libh5test.la -LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la -LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la -LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la -LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la -LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la -LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la -LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la - -# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below -# has been removed. According to the official description of DESTDIR by Gnu at -# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is -# prepended to the normal and complete install path that it precedes for the -# purpose of installing in a temporary directory which is useful for building -# rpms and other packages. The '/' after ${DESTDIR} will be followed by another -# '/' at the beginning of the normal install path. When DESTDIR is empty the -# path then begins with '//', which is incorrect and causes problems at least for -# Cygwin. - -# Scripts used to build examples -# If only shared libraries have been installed, have h5cc build examples with -# shared libraries instead of static libraries -H5CC = ${DESTDIR}$(bindir)/h5cc -H5CC_PP = ${DESTDIR}$(bindir)/h5pcc -H5FC = ${DESTDIR}$(bindir)/h5fc -H5FC_PP = ${DESTDIR}$(bindir)/h5pfc -H5CPP = ${DESTDIR}$(bindir)/h5c++ -ACLOCAL_AMFLAGS = "-I m4" - -# The trace script; this is used on source files from the C library to -# insert tracing macros. -TRACE = perl $(top_srcdir)/bin/trace - -# .chkexe files are used to mark tests that have run successfully. -# .chklog files are output from those tests. -# *.clog and *.clog2 are from the MPE option. - -# Temporary files. These files are the ones created by setting the -# HDF5_NOCLEANUP environment variable and running `make test' without -# specifying a file prefix or low-level driver. Changing the file -# prefix or low-level driver with environment variables will influence -# the temporary file name in ways that the makefile is not aware of. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 accum.h5 \ - cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offset.h5 \ - max_compact_dataset.h5 simple.h5 set_local.h5 random_chunks.h5 \ - huge_chunks.h5 chunk_cache.h5 big_chunk.h5 chunk_expand.h5 \ - copy_dcpl_newfile.h5 extend.h5 istore.h5 extlinks*.h5 \ - frspace.h5 links*.h5 sys_file1 tfile[1-7].h5 th5s[1-4].h5 \ - lheap.h5 fheap.h5 ohdr.h5 stab.h5 extern_[1-3].h5 \ - extern_[1-4][ab].raw gheap[0-4].h5 dt_arith[1-2] links.h5 \ - links[0-6]*.h5 extlinks[0-15].h5 tmp big.data \ - big[0-9][0-9][0-9][0-9][0-9].h5 stdio.h5 sec2.h5 \ - dtypes[0-9].h5 dtypes1[0].h5 dt_arith[1-2].h5 tattr.h5 \ - tselect.h5 mtime.h5 unlink.h5 unicode.h5 coord.h5 \ - fillval_[0-9].h5 fillval.raw mount_[0-9].h5 testmeta.h5 \ - ttime.h5 trefer[1-3].h5 tvltypes.h5 tvlstr.h5 tvlstr2.h5 \ - flush.h5 enum1.h5 titerate.h5 ttsafe.h5 tarray1.h5 tgenprop.h5 \ - tmisc[0-9]*.h5 set_extent[1-5].h5 ext[12].bin getname.h5 \ - getname[1-3].h5 sec2_file.h5 direct_file.h5 \ - family_file000[0-3][0-9].h5 new_family_v16_000[0-3][0-9].h5 \ - multi_file-[rs].h5 core_file plugin.h5 new_move_[ab].h5 \ - ntypes.h5 dangle.h5 error_test.h5 err_compat.h5 dtransform.h5 \ - test_filters.h5 get_file_name.h5 tstint[1-2].h5 \ - unlink_chunked.h5 btree2.h5 objcopy_src.h5 objcopy_dst.h5 \ - objcopy_ext.dat trefer1.h5 trefer2.h5 app_ref.h5 farray.h5 \ - earray.h5 efc[0-5].h5 log_vfd_out.log new_multi_file_v16-r.h5 \ - new_multi_file_v16-s.h5 split_get_file_image_test-m.h5 \ - split_get_file_image_test-r.h5 file_image_core_test.h5.copy \ - unregister_filter_1.h5 unregister_filter_2.h5 vds_virt.h5 \ - vds_src_[0-1].h5 - -# Test script for error_test and err_compat -TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh \ - testlinks_env.sh $(am__append_1) -SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) \ - links_env$(EXEEXT) $(am__append_2) -check_SCRIPTS = $(TEST_SCRIPT) - -# These are our main targets. They should be listed in the order to be -# executed, generally most specific tests to least specific tests. -# As an exception, long-running tests should occur earlier in the list. -# This gives them more time to run when tests are executing in parallel. -# These tests (fheap, btree2) are under development and are not used by -# the library yet. Move them to the end so that their failure do not block -# other current library code tests. -TEST_PROG = testhdf5 lheap ohdr stab gheap cache cache_api cache_tagging \ - pool accum hyperslab istore bittests dt_arith \ - dtypes dsets cmpd_dset filter_fail extend external efc objcopy links unlink \ - big mtime fillval mount flush1 flush2 app_ref enum \ - set_extent ttsafe enc_dec_plist enc_dec_plist_cross_platform\ - getname vfd ntypes dangle dtransform reserved cross_read \ - freespace mf vds farray earray btree2 fheap file_image unregister - - -# These programs generate test files for the tests. They don't need to be -# compiled every time we want to test the library. However, putting -# them in a conditional causes automake to generate rules so that they -# can be built by hand. They can also be built by specifying -# --enable-build-all at configure time. -# The gen_old_* files can only be compiled with older versions of the library -# so do not appear in this list. -BUILD_ALL_PROGS = gen_bad_ohdr gen_bogus gen_cross gen_deflate gen_filters gen_new_array \ - gen_new_fill gen_new_group gen_new_mtime gen_new_super gen_noencoder \ - gen_nullspace gen_udlinks space_overflow gen_filespace gen_specmetaread \ - gen_sizes_lheap gen_file_image gen_plist - -@HAVE_SHARED_CONDITIONAL_FALSE@noinst_LTLIBRARIES = libh5test.la -@HAVE_SHARED_CONDITIONAL_TRUE@noinst_LTLIBRARIES = libh5test.la -@HAVE_SHARED_CONDITIONAL_TRUE@lib_LTLIBRARIES = libdynlib1.la libdynlib2.la libdynlib3.la -@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib1_la_SOURCES = dynlib1.c -@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib2_la_SOURCES = dynlib2.c -@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib3_la_SOURCES = dynlib3.c -libh5test_la_SOURCES = h5test.c testframe.c cache_common.c - -# Use libhd5test.la to compile all of the tests -LDADD = libh5test.la $(LIBHDF5) - -# List the source files for tests that have more than one -ttsafe_SOURCES = ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \ - ttsafe_acreate.c - -VFD_LIST = sec2 stdio core core_paged split multi family \ - $(am__append_4) - -# Sources for testhdf5 executable -testhdf5_SOURCES = testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \ - tgenprop.c th5o.c th5s.c tcoords.c theap.c tid.c titerate.c tmeta.c tmisc.c \ - trefer.c trefstr.c tselect.c tskiplist.c tsohm.c ttime.c ttst.c tunicode.c \ - tvlstr.c tvltypes.c - - -# Temporary files. -DISTCLEANFILES = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_plugin.sh - -# Automake needs to be taught how to build lib, progs, and tests targets. -# These will be filled in automatically for the most part (e.g., -# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and -# EXTRA_TEST variables are supplied to allow the user to force targets to -# be built at certain times. -LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ - $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) - -PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ - $(EXTRA_PROG) - -chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -TEST_EXTENSIONS = .sh -SH_LOG_COMPILER = $(SHELL) -AM_SH_LOG_FLAGS = -TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_) -TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_) -TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_) -TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign test/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -testcheck_version.sh: $(top_builddir)/config.status $(srcdir)/testcheck_version.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -testerror.sh: $(top_builddir)/config.status $(srcdir)/testerror.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -H5srcdir_str.h: $(top_builddir)/config.status $(srcdir)/H5srcdir_str.h.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -testlibinfo.sh: $(top_builddir)/config.status $(srcdir)/testlibinfo.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -testlinks_env.sh: $(top_builddir)/config.status $(srcdir)/testlinks_env.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -test_plugin.sh: $(top_builddir)/config.status $(srcdir)/test_plugin.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -libdynlib1.la: $(libdynlib1_la_OBJECTS) $(libdynlib1_la_DEPENDENCIES) $(EXTRA_libdynlib1_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(am_libdynlib1_la_rpath) $(libdynlib1_la_OBJECTS) $(libdynlib1_la_LIBADD) $(LIBS) - -libdynlib2.la: $(libdynlib2_la_OBJECTS) $(libdynlib2_la_DEPENDENCIES) $(EXTRA_libdynlib2_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(am_libdynlib2_la_rpath) $(libdynlib2_la_OBJECTS) $(libdynlib2_la_LIBADD) $(LIBS) - -libdynlib3.la: $(libdynlib3_la_OBJECTS) $(libdynlib3_la_DEPENDENCIES) $(EXTRA_libdynlib3_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(am_libdynlib3_la_rpath) $(libdynlib3_la_OBJECTS) $(libdynlib3_la_LIBADD) $(LIBS) - -libh5test.la: $(libh5test_la_OBJECTS) $(libh5test_la_DEPENDENCIES) $(EXTRA_libh5test_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(am_libh5test_la_rpath) $(libh5test_la_OBJECTS) $(libh5test_la_LIBADD) $(LIBS) - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -accum$(EXEEXT): $(accum_OBJECTS) $(accum_DEPENDENCIES) $(EXTRA_accum_DEPENDENCIES) - @rm -f accum$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(accum_OBJECTS) $(accum_LDADD) $(LIBS) - -app_ref$(EXEEXT): $(app_ref_OBJECTS) $(app_ref_DEPENDENCIES) $(EXTRA_app_ref_DEPENDENCIES) - @rm -f app_ref$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(app_ref_OBJECTS) $(app_ref_LDADD) $(LIBS) - -big$(EXEEXT): $(big_OBJECTS) $(big_DEPENDENCIES) $(EXTRA_big_DEPENDENCIES) - @rm -f big$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(big_OBJECTS) $(big_LDADD) $(LIBS) - -bittests$(EXEEXT): $(bittests_OBJECTS) $(bittests_DEPENDENCIES) $(EXTRA_bittests_DEPENDENCIES) - @rm -f bittests$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(bittests_OBJECTS) $(bittests_LDADD) $(LIBS) - -btree2$(EXEEXT): $(btree2_OBJECTS) $(btree2_DEPENDENCIES) $(EXTRA_btree2_DEPENDENCIES) - @rm -f btree2$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(btree2_OBJECTS) $(btree2_LDADD) $(LIBS) - -cache$(EXEEXT): $(cache_OBJECTS) $(cache_DEPENDENCIES) $(EXTRA_cache_DEPENDENCIES) - @rm -f cache$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(cache_OBJECTS) $(cache_LDADD) $(LIBS) - -cache_api$(EXEEXT): $(cache_api_OBJECTS) $(cache_api_DEPENDENCIES) $(EXTRA_cache_api_DEPENDENCIES) - @rm -f cache_api$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(cache_api_OBJECTS) $(cache_api_LDADD) $(LIBS) - -cache_tagging$(EXEEXT): $(cache_tagging_OBJECTS) $(cache_tagging_DEPENDENCIES) $(EXTRA_cache_tagging_DEPENDENCIES) - @rm -f cache_tagging$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(cache_tagging_OBJECTS) $(cache_tagging_LDADD) $(LIBS) - -cmpd_dset$(EXEEXT): $(cmpd_dset_OBJECTS) $(cmpd_dset_DEPENDENCIES) $(EXTRA_cmpd_dset_DEPENDENCIES) - @rm -f cmpd_dset$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(cmpd_dset_OBJECTS) $(cmpd_dset_LDADD) $(LIBS) - -cross_read$(EXEEXT): $(cross_read_OBJECTS) $(cross_read_DEPENDENCIES) $(EXTRA_cross_read_DEPENDENCIES) - @rm -f cross_read$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(cross_read_OBJECTS) $(cross_read_LDADD) $(LIBS) - -dangle$(EXEEXT): $(dangle_OBJECTS) $(dangle_DEPENDENCIES) $(EXTRA_dangle_DEPENDENCIES) - @rm -f dangle$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(dangle_OBJECTS) $(dangle_LDADD) $(LIBS) - -dsets$(EXEEXT): $(dsets_OBJECTS) $(dsets_DEPENDENCIES) $(EXTRA_dsets_DEPENDENCIES) - @rm -f dsets$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(dsets_OBJECTS) $(dsets_LDADD) $(LIBS) - -dt_arith$(EXEEXT): $(dt_arith_OBJECTS) $(dt_arith_DEPENDENCIES) $(EXTRA_dt_arith_DEPENDENCIES) - @rm -f dt_arith$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(dt_arith_OBJECTS) $(dt_arith_LDADD) $(LIBS) - -dtransform$(EXEEXT): $(dtransform_OBJECTS) $(dtransform_DEPENDENCIES) $(EXTRA_dtransform_DEPENDENCIES) - @rm -f dtransform$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(dtransform_OBJECTS) $(dtransform_LDADD) $(LIBS) - -dtypes$(EXEEXT): $(dtypes_OBJECTS) $(dtypes_DEPENDENCIES) $(EXTRA_dtypes_DEPENDENCIES) - @rm -f dtypes$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(dtypes_OBJECTS) $(dtypes_LDADD) $(LIBS) - -earray$(EXEEXT): $(earray_OBJECTS) $(earray_DEPENDENCIES) $(EXTRA_earray_DEPENDENCIES) - @rm -f earray$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(earray_OBJECTS) $(earray_LDADD) $(LIBS) - -efc$(EXEEXT): $(efc_OBJECTS) $(efc_DEPENDENCIES) $(EXTRA_efc_DEPENDENCIES) - @rm -f efc$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(efc_OBJECTS) $(efc_LDADD) $(LIBS) - -enc_dec_plist$(EXEEXT): $(enc_dec_plist_OBJECTS) $(enc_dec_plist_DEPENDENCIES) $(EXTRA_enc_dec_plist_DEPENDENCIES) - @rm -f enc_dec_plist$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(enc_dec_plist_OBJECTS) $(enc_dec_plist_LDADD) $(LIBS) - -enc_dec_plist_cross_platform$(EXEEXT): $(enc_dec_plist_cross_platform_OBJECTS) $(enc_dec_plist_cross_platform_DEPENDENCIES) $(EXTRA_enc_dec_plist_cross_platform_DEPENDENCIES) - @rm -f enc_dec_plist_cross_platform$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(enc_dec_plist_cross_platform_OBJECTS) $(enc_dec_plist_cross_platform_LDADD) $(LIBS) - -enum$(EXEEXT): $(enum_OBJECTS) $(enum_DEPENDENCIES) $(EXTRA_enum_DEPENDENCIES) - @rm -f enum$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(enum_OBJECTS) $(enum_LDADD) $(LIBS) - -err_compat$(EXEEXT): $(err_compat_OBJECTS) $(err_compat_DEPENDENCIES) $(EXTRA_err_compat_DEPENDENCIES) - @rm -f err_compat$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(err_compat_OBJECTS) $(err_compat_LDADD) $(LIBS) - -error_test$(EXEEXT): $(error_test_OBJECTS) $(error_test_DEPENDENCIES) $(EXTRA_error_test_DEPENDENCIES) - @rm -f error_test$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(error_test_OBJECTS) $(error_test_LDADD) $(LIBS) - -extend$(EXEEXT): $(extend_OBJECTS) $(extend_DEPENDENCIES) $(EXTRA_extend_DEPENDENCIES) - @rm -f extend$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(extend_OBJECTS) $(extend_LDADD) $(LIBS) - -external$(EXEEXT): $(external_OBJECTS) $(external_DEPENDENCIES) $(EXTRA_external_DEPENDENCIES) - @rm -f external$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(external_OBJECTS) $(external_LDADD) $(LIBS) - -farray$(EXEEXT): $(farray_OBJECTS) $(farray_DEPENDENCIES) $(EXTRA_farray_DEPENDENCIES) - @rm -f farray$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(farray_OBJECTS) $(farray_LDADD) $(LIBS) - -fheap$(EXEEXT): $(fheap_OBJECTS) $(fheap_DEPENDENCIES) $(EXTRA_fheap_DEPENDENCIES) - @rm -f fheap$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(fheap_OBJECTS) $(fheap_LDADD) $(LIBS) - -file_image$(EXEEXT): $(file_image_OBJECTS) $(file_image_DEPENDENCIES) $(EXTRA_file_image_DEPENDENCIES) - @rm -f file_image$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(file_image_OBJECTS) $(file_image_LDADD) $(LIBS) - -fillval$(EXEEXT): $(fillval_OBJECTS) $(fillval_DEPENDENCIES) $(EXTRA_fillval_DEPENDENCIES) - @rm -f fillval$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(fillval_OBJECTS) $(fillval_LDADD) $(LIBS) - -filter_fail$(EXEEXT): $(filter_fail_OBJECTS) $(filter_fail_DEPENDENCIES) $(EXTRA_filter_fail_DEPENDENCIES) - @rm -f filter_fail$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(filter_fail_OBJECTS) $(filter_fail_LDADD) $(LIBS) - -flush1$(EXEEXT): $(flush1_OBJECTS) $(flush1_DEPENDENCIES) $(EXTRA_flush1_DEPENDENCIES) - @rm -f flush1$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(flush1_OBJECTS) $(flush1_LDADD) $(LIBS) - -flush2$(EXEEXT): $(flush2_OBJECTS) $(flush2_DEPENDENCIES) $(EXTRA_flush2_DEPENDENCIES) - @rm -f flush2$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(flush2_OBJECTS) $(flush2_LDADD) $(LIBS) - -freespace$(EXEEXT): $(freespace_OBJECTS) $(freespace_DEPENDENCIES) $(EXTRA_freespace_DEPENDENCIES) - @rm -f freespace$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(freespace_OBJECTS) $(freespace_LDADD) $(LIBS) - -gen_bad_ohdr$(EXEEXT): $(gen_bad_ohdr_OBJECTS) $(gen_bad_ohdr_DEPENDENCIES) $(EXTRA_gen_bad_ohdr_DEPENDENCIES) - @rm -f gen_bad_ohdr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_bad_ohdr_OBJECTS) $(gen_bad_ohdr_LDADD) $(LIBS) - -gen_bogus$(EXEEXT): $(gen_bogus_OBJECTS) $(gen_bogus_DEPENDENCIES) $(EXTRA_gen_bogus_DEPENDENCIES) - @rm -f gen_bogus$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_bogus_OBJECTS) $(gen_bogus_LDADD) $(LIBS) - -gen_cross$(EXEEXT): $(gen_cross_OBJECTS) $(gen_cross_DEPENDENCIES) $(EXTRA_gen_cross_DEPENDENCIES) - @rm -f gen_cross$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_cross_OBJECTS) $(gen_cross_LDADD) $(LIBS) - -gen_deflate$(EXEEXT): $(gen_deflate_OBJECTS) $(gen_deflate_DEPENDENCIES) $(EXTRA_gen_deflate_DEPENDENCIES) - @rm -f gen_deflate$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_deflate_OBJECTS) $(gen_deflate_LDADD) $(LIBS) - -gen_file_image$(EXEEXT): $(gen_file_image_OBJECTS) $(gen_file_image_DEPENDENCIES) $(EXTRA_gen_file_image_DEPENDENCIES) - @rm -f gen_file_image$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_file_image_OBJECTS) $(gen_file_image_LDADD) $(LIBS) - -gen_filespace$(EXEEXT): $(gen_filespace_OBJECTS) $(gen_filespace_DEPENDENCIES) $(EXTRA_gen_filespace_DEPENDENCIES) - @rm -f gen_filespace$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_filespace_OBJECTS) $(gen_filespace_LDADD) $(LIBS) - -gen_filters$(EXEEXT): $(gen_filters_OBJECTS) $(gen_filters_DEPENDENCIES) $(EXTRA_gen_filters_DEPENDENCIES) - @rm -f gen_filters$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_filters_OBJECTS) $(gen_filters_LDADD) $(LIBS) - -gen_new_array$(EXEEXT): $(gen_new_array_OBJECTS) $(gen_new_array_DEPENDENCIES) $(EXTRA_gen_new_array_DEPENDENCIES) - @rm -f gen_new_array$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_new_array_OBJECTS) $(gen_new_array_LDADD) $(LIBS) - -gen_new_fill$(EXEEXT): $(gen_new_fill_OBJECTS) $(gen_new_fill_DEPENDENCIES) $(EXTRA_gen_new_fill_DEPENDENCIES) - @rm -f gen_new_fill$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_new_fill_OBJECTS) $(gen_new_fill_LDADD) $(LIBS) - -gen_new_group$(EXEEXT): $(gen_new_group_OBJECTS) $(gen_new_group_DEPENDENCIES) $(EXTRA_gen_new_group_DEPENDENCIES) - @rm -f gen_new_group$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_new_group_OBJECTS) $(gen_new_group_LDADD) $(LIBS) - -gen_new_mtime$(EXEEXT): $(gen_new_mtime_OBJECTS) $(gen_new_mtime_DEPENDENCIES) $(EXTRA_gen_new_mtime_DEPENDENCIES) - @rm -f gen_new_mtime$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_new_mtime_OBJECTS) $(gen_new_mtime_LDADD) $(LIBS) - -gen_new_super$(EXEEXT): $(gen_new_super_OBJECTS) $(gen_new_super_DEPENDENCIES) $(EXTRA_gen_new_super_DEPENDENCIES) - @rm -f gen_new_super$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_new_super_OBJECTS) $(gen_new_super_LDADD) $(LIBS) - -gen_noencoder$(EXEEXT): $(gen_noencoder_OBJECTS) $(gen_noencoder_DEPENDENCIES) $(EXTRA_gen_noencoder_DEPENDENCIES) - @rm -f gen_noencoder$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_noencoder_OBJECTS) $(gen_noencoder_LDADD) $(LIBS) - -gen_nullspace$(EXEEXT): $(gen_nullspace_OBJECTS) $(gen_nullspace_DEPENDENCIES) $(EXTRA_gen_nullspace_DEPENDENCIES) - @rm -f gen_nullspace$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_nullspace_OBJECTS) $(gen_nullspace_LDADD) $(LIBS) - -gen_plist$(EXEEXT): $(gen_plist_OBJECTS) $(gen_plist_DEPENDENCIES) $(EXTRA_gen_plist_DEPENDENCIES) - @rm -f gen_plist$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_plist_OBJECTS) $(gen_plist_LDADD) $(LIBS) - -gen_sizes_lheap$(EXEEXT): $(gen_sizes_lheap_OBJECTS) $(gen_sizes_lheap_DEPENDENCIES) $(EXTRA_gen_sizes_lheap_DEPENDENCIES) - @rm -f gen_sizes_lheap$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_sizes_lheap_OBJECTS) $(gen_sizes_lheap_LDADD) $(LIBS) - -gen_specmetaread$(EXEEXT): $(gen_specmetaread_OBJECTS) $(gen_specmetaread_DEPENDENCIES) $(EXTRA_gen_specmetaread_DEPENDENCIES) - @rm -f gen_specmetaread$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_specmetaread_OBJECTS) $(gen_specmetaread_LDADD) $(LIBS) - -gen_udlinks$(EXEEXT): $(gen_udlinks_OBJECTS) $(gen_udlinks_DEPENDENCIES) $(EXTRA_gen_udlinks_DEPENDENCIES) - @rm -f gen_udlinks$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_udlinks_OBJECTS) $(gen_udlinks_LDADD) $(LIBS) - -getname$(EXEEXT): $(getname_OBJECTS) $(getname_DEPENDENCIES) $(EXTRA_getname_DEPENDENCIES) - @rm -f getname$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(getname_OBJECTS) $(getname_LDADD) $(LIBS) - -gheap$(EXEEXT): $(gheap_OBJECTS) $(gheap_DEPENDENCIES) $(EXTRA_gheap_DEPENDENCIES) - @rm -f gheap$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gheap_OBJECTS) $(gheap_LDADD) $(LIBS) - -hyperslab$(EXEEXT): $(hyperslab_OBJECTS) $(hyperslab_DEPENDENCIES) $(EXTRA_hyperslab_DEPENDENCIES) - @rm -f hyperslab$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(hyperslab_OBJECTS) $(hyperslab_LDADD) $(LIBS) - -istore$(EXEEXT): $(istore_OBJECTS) $(istore_DEPENDENCIES) $(EXTRA_istore_DEPENDENCIES) - @rm -f istore$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(istore_OBJECTS) $(istore_LDADD) $(LIBS) - -lheap$(EXEEXT): $(lheap_OBJECTS) $(lheap_DEPENDENCIES) $(EXTRA_lheap_DEPENDENCIES) - @rm -f lheap$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(lheap_OBJECTS) $(lheap_LDADD) $(LIBS) - -links$(EXEEXT): $(links_OBJECTS) $(links_DEPENDENCIES) $(EXTRA_links_DEPENDENCIES) - @rm -f links$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(links_OBJECTS) $(links_LDADD) $(LIBS) - -links_env$(EXEEXT): $(links_env_OBJECTS) $(links_env_DEPENDENCIES) $(EXTRA_links_env_DEPENDENCIES) - @rm -f links_env$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(links_env_OBJECTS) $(links_env_LDADD) $(LIBS) - -mf$(EXEEXT): $(mf_OBJECTS) $(mf_DEPENDENCIES) $(EXTRA_mf_DEPENDENCIES) - @rm -f mf$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(mf_OBJECTS) $(mf_LDADD) $(LIBS) - -mount$(EXEEXT): $(mount_OBJECTS) $(mount_DEPENDENCIES) $(EXTRA_mount_DEPENDENCIES) - @rm -f mount$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(mount_OBJECTS) $(mount_LDADD) $(LIBS) - -mtime$(EXEEXT): $(mtime_OBJECTS) $(mtime_DEPENDENCIES) $(EXTRA_mtime_DEPENDENCIES) - @rm -f mtime$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(mtime_OBJECTS) $(mtime_LDADD) $(LIBS) - -ntypes$(EXEEXT): $(ntypes_OBJECTS) $(ntypes_DEPENDENCIES) $(EXTRA_ntypes_DEPENDENCIES) - @rm -f ntypes$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(ntypes_OBJECTS) $(ntypes_LDADD) $(LIBS) - -objcopy$(EXEEXT): $(objcopy_OBJECTS) $(objcopy_DEPENDENCIES) $(EXTRA_objcopy_DEPENDENCIES) - @rm -f objcopy$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(objcopy_OBJECTS) $(objcopy_LDADD) $(LIBS) - -ohdr$(EXEEXT): $(ohdr_OBJECTS) $(ohdr_DEPENDENCIES) $(EXTRA_ohdr_DEPENDENCIES) - @rm -f ohdr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(ohdr_OBJECTS) $(ohdr_LDADD) $(LIBS) - -plugin$(EXEEXT): $(plugin_OBJECTS) $(plugin_DEPENDENCIES) $(EXTRA_plugin_DEPENDENCIES) - @rm -f plugin$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(plugin_OBJECTS) $(plugin_LDADD) $(LIBS) - -pool$(EXEEXT): $(pool_OBJECTS) $(pool_DEPENDENCIES) $(EXTRA_pool_DEPENDENCIES) - @rm -f pool$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pool_OBJECTS) $(pool_LDADD) $(LIBS) - -reserved$(EXEEXT): $(reserved_OBJECTS) $(reserved_DEPENDENCIES) $(EXTRA_reserved_DEPENDENCIES) - @rm -f reserved$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(reserved_OBJECTS) $(reserved_LDADD) $(LIBS) - -set_extent$(EXEEXT): $(set_extent_OBJECTS) $(set_extent_DEPENDENCIES) $(EXTRA_set_extent_DEPENDENCIES) - @rm -f set_extent$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(set_extent_OBJECTS) $(set_extent_LDADD) $(LIBS) - -space_overflow$(EXEEXT): $(space_overflow_OBJECTS) $(space_overflow_DEPENDENCIES) $(EXTRA_space_overflow_DEPENDENCIES) - @rm -f space_overflow$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(space_overflow_OBJECTS) $(space_overflow_LDADD) $(LIBS) - -stab$(EXEEXT): $(stab_OBJECTS) $(stab_DEPENDENCIES) $(EXTRA_stab_DEPENDENCIES) - @rm -f stab$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(stab_OBJECTS) $(stab_LDADD) $(LIBS) - -tcheck_version$(EXEEXT): $(tcheck_version_OBJECTS) $(tcheck_version_DEPENDENCIES) $(EXTRA_tcheck_version_DEPENDENCIES) - @rm -f tcheck_version$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tcheck_version_OBJECTS) $(tcheck_version_LDADD) $(LIBS) - -testhdf5$(EXEEXT): $(testhdf5_OBJECTS) $(testhdf5_DEPENDENCIES) $(EXTRA_testhdf5_DEPENDENCIES) - @rm -f testhdf5$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(testhdf5_OBJECTS) $(testhdf5_LDADD) $(LIBS) - -testmeta$(EXEEXT): $(testmeta_OBJECTS) $(testmeta_DEPENDENCIES) $(EXTRA_testmeta_DEPENDENCIES) - @rm -f testmeta$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(testmeta_OBJECTS) $(testmeta_LDADD) $(LIBS) - -ttsafe$(EXEEXT): $(ttsafe_OBJECTS) $(ttsafe_DEPENDENCIES) $(EXTRA_ttsafe_DEPENDENCIES) - @rm -f ttsafe$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(ttsafe_OBJECTS) $(ttsafe_LDADD) $(LIBS) - -unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES) $(EXTRA_unlink_DEPENDENCIES) - @rm -f unlink$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS) - -unregister$(EXEEXT): $(unregister_OBJECTS) $(unregister_DEPENDENCIES) $(EXTRA_unregister_DEPENDENCIES) - @rm -f unregister$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(unregister_OBJECTS) $(unregister_LDADD) $(LIBS) - -vds$(EXEEXT): $(vds_OBJECTS) $(vds_DEPENDENCIES) $(EXTRA_vds_DEPENDENCIES) - @rm -f vds$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(vds_OBJECTS) $(vds_LDADD) $(LIBS) - -vfd$(EXEEXT): $(vfd_OBJECTS) $(vfd_DEPENDENCIES) $(EXTRA_vfd_DEPENDENCIES) - @rm -f vfd$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(vfd_OBJECTS) $(vfd_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accum.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/app_ref.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/big.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bittests.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btree2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache_api.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache_common.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache_tagging.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmpd_dset.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cross_read.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dangle.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsets.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dt_arith.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtransform.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtypes.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynlib1.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynlib2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynlib3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earray.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enc_dec_plist.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enc_dec_plist_cross_platform.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enum.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/err_compat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extend.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/external.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/farray.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fheap.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_image.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fillval.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter_fail.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flush1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flush2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freespace.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_bad_ohdr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_bogus.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_cross.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_deflate.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_file_image.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_filespace.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_filters.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_new_array.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_new_fill.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_new_group.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_new_mtime.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_new_super.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_noencoder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_nullspace.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_plist.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_sizes_lheap.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_specmetaread.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_udlinks.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getname.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gheap.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5test.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hyperslab.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/istore.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lheap.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/links.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/links_env.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtime.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntypes.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objcopy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ohdr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pool.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reserved.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_extent.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/space_overflow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stab.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tarray.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tattr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcheck_version.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tchecksum.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tconfig.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcoords.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testframe.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhdf5.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testmeta.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfile.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tgenprop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/th5o.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/th5s.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theap.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tid.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/titerate.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmeta.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmisc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trefer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trefstr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tselect.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tskiplist.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsohm.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttime.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttsafe.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttsafe_acreate.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttsafe_cancel.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttsafe_dcreate.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttsafe_error.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttst.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tunicode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvlstr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvltypes.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unregister.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vds.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfd.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 -recheck: all $(check_PROGRAMS) $(check_SCRIPTS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -testhdf5.log: testhdf5$(EXEEXT) - @p='testhdf5$(EXEEXT)'; \ - b='testhdf5'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -lheap.log: lheap$(EXEEXT) - @p='lheap$(EXEEXT)'; \ - b='lheap'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -ohdr.log: ohdr$(EXEEXT) - @p='ohdr$(EXEEXT)'; \ - b='ohdr'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -stab.log: stab$(EXEEXT) - @p='stab$(EXEEXT)'; \ - b='stab'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -gheap.log: gheap$(EXEEXT) - @p='gheap$(EXEEXT)'; \ - b='gheap'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -cache.log: cache$(EXEEXT) - @p='cache$(EXEEXT)'; \ - b='cache'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -cache_api.log: cache_api$(EXEEXT) - @p='cache_api$(EXEEXT)'; \ - b='cache_api'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -cache_tagging.log: cache_tagging$(EXEEXT) - @p='cache_tagging$(EXEEXT)'; \ - b='cache_tagging'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -pool.log: pool$(EXEEXT) - @p='pool$(EXEEXT)'; \ - b='pool'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -accum.log: accum$(EXEEXT) - @p='accum$(EXEEXT)'; \ - b='accum'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -hyperslab.log: hyperslab$(EXEEXT) - @p='hyperslab$(EXEEXT)'; \ - b='hyperslab'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -istore.log: istore$(EXEEXT) - @p='istore$(EXEEXT)'; \ - b='istore'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -bittests.log: bittests$(EXEEXT) - @p='bittests$(EXEEXT)'; \ - b='bittests'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -dt_arith.log: dt_arith$(EXEEXT) - @p='dt_arith$(EXEEXT)'; \ - b='dt_arith'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -dtypes.log: dtypes$(EXEEXT) - @p='dtypes$(EXEEXT)'; \ - b='dtypes'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -dsets.log: dsets$(EXEEXT) - @p='dsets$(EXEEXT)'; \ - b='dsets'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -cmpd_dset.log: cmpd_dset$(EXEEXT) - @p='cmpd_dset$(EXEEXT)'; \ - b='cmpd_dset'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -filter_fail.log: filter_fail$(EXEEXT) - @p='filter_fail$(EXEEXT)'; \ - b='filter_fail'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -extend.log: extend$(EXEEXT) - @p='extend$(EXEEXT)'; \ - b='extend'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -external.log: external$(EXEEXT) - @p='external$(EXEEXT)'; \ - b='external'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -efc.log: efc$(EXEEXT) - @p='efc$(EXEEXT)'; \ - b='efc'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -objcopy.log: objcopy$(EXEEXT) - @p='objcopy$(EXEEXT)'; \ - b='objcopy'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -links.log: links$(EXEEXT) - @p='links$(EXEEXT)'; \ - b='links'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -unlink.log: unlink$(EXEEXT) - @p='unlink$(EXEEXT)'; \ - b='unlink'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -big.log: big$(EXEEXT) - @p='big$(EXEEXT)'; \ - b='big'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -mtime.log: mtime$(EXEEXT) - @p='mtime$(EXEEXT)'; \ - b='mtime'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -fillval.log: fillval$(EXEEXT) - @p='fillval$(EXEEXT)'; \ - b='fillval'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -mount.log: mount$(EXEEXT) - @p='mount$(EXEEXT)'; \ - b='mount'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -flush1.log: flush1$(EXEEXT) - @p='flush1$(EXEEXT)'; \ - b='flush1'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -flush2.log: flush2$(EXEEXT) - @p='flush2$(EXEEXT)'; \ - b='flush2'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -app_ref.log: app_ref$(EXEEXT) - @p='app_ref$(EXEEXT)'; \ - b='app_ref'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -enum.log: enum$(EXEEXT) - @p='enum$(EXEEXT)'; \ - b='enum'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -set_extent.log: set_extent$(EXEEXT) - @p='set_extent$(EXEEXT)'; \ - b='set_extent'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -ttsafe.log: ttsafe$(EXEEXT) - @p='ttsafe$(EXEEXT)'; \ - b='ttsafe'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -enc_dec_plist.log: enc_dec_plist$(EXEEXT) - @p='enc_dec_plist$(EXEEXT)'; \ - b='enc_dec_plist'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -enc_dec_plist_cross_platform.log: enc_dec_plist_cross_platform$(EXEEXT) - @p='enc_dec_plist_cross_platform$(EXEEXT)'; \ - b='enc_dec_plist_cross_platform'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -getname.log: getname$(EXEEXT) - @p='getname$(EXEEXT)'; \ - b='getname'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -vfd.log: vfd$(EXEEXT) - @p='vfd$(EXEEXT)'; \ - b='vfd'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -ntypes.log: ntypes$(EXEEXT) - @p='ntypes$(EXEEXT)'; \ - b='ntypes'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -dangle.log: dangle$(EXEEXT) - @p='dangle$(EXEEXT)'; \ - b='dangle'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -dtransform.log: dtransform$(EXEEXT) - @p='dtransform$(EXEEXT)'; \ - b='dtransform'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -reserved.log: reserved$(EXEEXT) - @p='reserved$(EXEEXT)'; \ - b='reserved'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -cross_read.log: cross_read$(EXEEXT) - @p='cross_read$(EXEEXT)'; \ - b='cross_read'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -freespace.log: freespace$(EXEEXT) - @p='freespace$(EXEEXT)'; \ - b='freespace'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -mf.log: mf$(EXEEXT) - @p='mf$(EXEEXT)'; \ - b='mf'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -vds.log: vds$(EXEEXT) - @p='vds$(EXEEXT)'; \ - b='vds'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -farray.log: farray$(EXEEXT) - @p='farray$(EXEEXT)'; \ - b='farray'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -earray.log: earray$(EXEEXT) - @p='earray$(EXEEXT)'; \ - b='earray'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -btree2.log: btree2$(EXEEXT) - @p='btree2$(EXEEXT)'; \ - b='btree2'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -fheap.log: fheap$(EXEEXT) - @p='fheap$(EXEEXT)'; \ - b='fheap'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -file_image.log: file_image$(EXEEXT) - @p='file_image$(EXEEXT)'; \ - b='file_image'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -unregister.log: unregister$(EXEEXT) - @p='unregister$(EXEEXT)'; \ - b='unregister'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.sh.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.sh$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local -installdirs: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -@HAVE_SHARED_CONDITIONAL_FALSE@install-exec-hook: -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-local - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES - -.MAKE: check-am install-am install-exec-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ - check-am clean clean-checkPROGRAMS clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ - clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ - pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am \ - uninstall-libLTLIBRARIES - -.PRECIOUS: Makefile - - -# List all build rules defined by HDF5 Makefiles as "PHONY" targets here. -# This tells the Makefiles that these targets are not files to be built but -# commands that should be executed even if a file with the same name already -# exists. -.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \ - build-tests check-clean check-install check-p check-s check-vfd \ - install-doc lib progs tests uninstall-doc _exec_check-s _test help - -help: - @$(top_srcdir)/bin/makehelp - -@HAVE_SHARED_CONDITIONAL_TRUE@ # The libh5test library provides common support code for the tests. - -@HAVE_SHARED_CONDITIONAL_TRUE@ # The libdynlib1 and libdynlib2 library for testing plugin module plugin.c. -@HAVE_SHARED_CONDITIONAL_TRUE@ # Build it as shared library if configure is enabled for shared library. - -@HAVE_SHARED_CONDITIONAL_TRUE@install-exec-hook: -@HAVE_SHARED_CONDITIONAL_TRUE@ $(RM) $(DESTDIR)$(libdir)/*dynlib* - -@HAVE_SHARED_CONDITIONAL_FALSE@ # The libh5test library provides common support code for the tests. - -# Additional target for running timing test -timings _timings: testmeta - @for timing in $(TIMINGS) dummy; do \ - if test $$timing != dummy; then \ - echo "Running $$timing $(TEST_FLAGS)"; \ - $(RUNEXEC) ./$$timing $(TEST_FLAGS) || exit 1; \ - fi; \ - done; - -# The flush1 test must run before the flush2 test -flush2.chkexe_: flush1.chkexe_ - -# lib/progs/tests targets recurse into subdirectories. build-* targets -# build files in this directory. -build-lib: $(LIB) -build-progs: $(LIB) $(PROGS) -build-tests: $(LIB) $(PROGS) $(chk_TESTS) - -# General rule for recursive building targets. -# BUILT_SOURCES contain targets that need to be built before anything else -# in the directory (e.g., for Fortran type detection) -lib progs tests check-s check-p :: $(BUILT_SOURCES) - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# General rule for recursive cleaning targets. Like the rule above, -# but doesn't require building BUILT_SOURCES. -check-clean :: - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# Tell Automake to build tests when the user types `make all' (this is -# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since -# Automake won't build them automatically, either. -all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS) - -# make install-doc doesn't do anything outside of doc directory, but -# Makefiles should recognize it. -# UPDATE: docs no longer reside in this build tree, so this target -# is depreciated. -install-doc uninstall-doc: - @echo "Nothing to be done." - -# clean up files generated by tests so they can be re-run. -build-check-clean: - $(RM) -rf $(CHECK_CLEANFILES) - -# run check-clean whenever mostlyclean is run -mostlyclean-local: build-check-clean - -# check-install is just a synonym for installcheck -check-install: installcheck - -# Run each test in order, passing $(TEST_FLAGS) to the program. -# Since tests are done in a shell loop, "make -i" does apply inside it. -# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop. -# The timestamps give a rough idea how much time the tests use. -# -# Note that targets in chk_TESTS (defined above) will be built when the user -# types 'make tests' or 'make check', but only programs in TEST_PROG, -# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed. -check-TESTS: test - -test _test: - @$(MAKE) build-check-s - @$(MAKE) build-check-p - -# Actual execution of check-s. -build-check-s: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH) - -# The dummy.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \ - tname=$(@:.chkexe_=)$(EXEEXT);\ - log=$(@:.chkexe_=.chklog); \ - echo "============================"; \ - if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\ - else \ - echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - srcdir="$(srcdir)" \ - $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $(@:.chkexe_=.chkexe) || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - fi - -# The dummysh.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \ - cmd=$(@:.chkexe_=);\ - tname=`basename $$cmd`;\ - chkname=`basename $(@:.chkexe_=.chkexe)`;\ - log=`basename $(@:.chkexe_=.chklog)`; \ - echo "============================"; \ - if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - else \ - echo "Testing $${tname} $(TEST_FLAGS)"; \ - echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \ - srcdir="$(srcdir)" \ - $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $${chkname} || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - echo "============================"; \ - fi - -# Actual execution of check-p. -build-check-p: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @if test -n "$(TEST_PROG_PARA)"; then \ - echo "**** Hint ****"; \ - echo "Parallel test files reside in the current directory" \ - "by default."; \ - echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \ - echo " HDF5_PARAPREFIX=/PFS/user/me"; \ - echo " export HDF5_PARAPREFIX"; \ - echo " make check"; \ - echo "**** end of Hint ****"; \ - fi - @for test in $(TEST_PROG_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \ - RUNEXEC="$(RUNPARALLEL)" || exit 1; \ - fi; \ - done - @for test in $(TEST_SCRIPT_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \ - fi; \ - done - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -# Run test with different Virtual File Driver -check-vfd: $(LIB) $(PROGS) $(chk_TESTS) - @for vfd in $(VFD_LIST) dummy; do \ - if test $$vfd != dummy; then \ - echo "============================"; \ - echo "Testing Virtual File Driver $$vfd"; \ - echo "============================"; \ - $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ - fi; \ - done - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in deleted file mode 100644 index 540af74..0000000 --- a/tools/h5dump/Makefile.in +++ /dev/null @@ -1,1472 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. -# -# HDF5 Library Makefile(.in) -# - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -check_PROGRAMS = $(am__EXEEXT_1) binread$(EXEEXT) -bin_PROGRAMS = h5dump$(EXEEXT) -TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) -subdir = tools/h5dump -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc -CONFIG_CLEAN_FILES = testh5dump.sh testh5dumppbits.sh testh5dumpvds.sh \ - testh5dumpxml.sh -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -am__EXEEXT_1 = h5dumpgentest$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) -binread_SOURCES = binread.c -binread_OBJECTS = binread.$(OBJEXT) -binread_LDADD = $(LDADD) -binread_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -am_h5dump_OBJECTS = h5dump.$(OBJEXT) h5dump_ddl.$(OBJEXT) \ - h5dump_xml.$(OBJEXT) -h5dump_OBJECTS = $(am_h5dump_OBJECTS) -h5dump_LDADD = $(LDADD) -h5dump_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -h5dump_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(h5dump_LDFLAGS) $(LDFLAGS) -o $@ -h5dumpgentest_SOURCES = h5dumpgentest.c -h5dumpgentest_OBJECTS = h5dumpgentest.$(OBJEXT) -h5dumpgentest_LDADD = $(LDADD) -h5dumpgentest_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src -depcomp = $(SHELL) $(top_srcdir)/bin/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = binread.c $(h5dump_SOURCES) h5dumpgentest.c -DIST_SOURCES = binread.c $(h5dump_SOURCES) h5dumpgentest.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.sh.log=.log) -SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver -SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/testh5dump.sh.in \ - $(srcdir)/testh5dumppbits.sh.in $(srcdir)/testh5dumpvds.sh.in \ - $(srcdir)/testh5dumpxml.sh.in $(top_srcdir)/bin/depcomp \ - $(top_srcdir)/bin/test-driver $(top_srcdir)/config/commence.am \ - $(top_srcdir)/config/conclude.am -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@ -AMTAR = @AMTAR@ - -# H5_CFLAGS holds flags that should be used when building hdf5, -# but which should not be exported to h5cc for building other programs. -# AM_CFLAGS is an automake construct which should be used by Makefiles -# instead of CFLAGS, as CFLAGS is reserved solely for the user to define. -# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. -AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ - -# Include files in /src directory and /tools/lib directory -AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \ - -I$(top_srcdir)/tools/lib -AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BYTESEX = @BYTESEX@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_VERSION = @CC_VERSION@ -CFLAGS = @CFLAGS@ -CLEARFILEBUF = @CLEARFILEBUF@ -CODESTACK = @CODESTACK@ -CONFIG_DATE = @CONFIG_DATE@ -CONFIG_MODE = @CONFIG_MODE@ -CONFIG_USER = @CONFIG_USER@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CXX_VERSION = @CXX_VERSION@ -CYGPATH_W = @CYGPATH_W@ -DEBUG_PKG = @DEBUG_PKG@ -DEFAULT_API_VERSION = @DEFAULT_API_VERSION@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ -DIRECT_VFD = @DIRECT_VFD@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTERNAL_FILTERS = @EXTERNAL_FILTERS@ - -# Make sure that these variables are exported to the Makefiles -F9XMODEXT = @F9XMODEXT@ -F9XMODFLAG = @F9XMODFLAG@ -F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ -FC = @FC@ -FCFLAGS = @FCFLAGS@ -FCFLAGS_f90 = @FCFLAGS_f90@ -FCLIBS = @FCLIBS@ -FC_VERSION = @FC_VERSION@ -FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ -FSEARCH_DIRS = @FSEARCH_DIRS@ -Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ -GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ -H5_CFLAGS = @H5_CFLAGS@ -H5_CPPFLAGS = @H5_CPPFLAGS@ -H5_CXXFLAGS = @H5_CXXFLAGS@ -H5_FCFLAGS = @H5_FCFLAGS@ -H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ -H5_LDFLAGS = @H5_LDFLAGS@ -H5_VERSION = @H5_VERSION@ -HADDR_T = @HADDR_T@ -HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ -HAVE_PTHREAD = @HAVE_PTHREAD@ -HDF5_HL = @HDF5_HL@ -HDF5_INTERFACES = @HDF5_INTERFACES@ -HDF_CXX = @HDF_CXX@ -HDF_FORTRAN = @HDF_FORTRAN@ -HID_T = @HID_T@ -HL = @HL@ -HL_FOR = @HL_FOR@ -HSIZE_T = @HSIZE_T@ -HSSIZE_T = @HSSIZE_T@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTRUMENT = @INSTRUMENT@ -INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LL_PATH = @LL_PATH@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_STATIC_EXEC = @LT_STATIC_EXEC@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPE = @MPE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ -PARALLEL = @PARALLEL@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -ROOT = @ROOT@ -RUNPARALLEL = @RUNPARALLEL@ -RUNSERIAL = @RUNSERIAL@ -R_INTEGER = @R_INTEGER@ -R_LARGE = @R_LARGE@ -SEARCH = @SEARCH@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIZE_T = @SIZE_T@ -STATIC_EXEC = @STATIC_EXEC@ -STATIC_SHARED = @STATIC_SHARED@ -STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@ -STRIP = @STRIP@ -TESTPARALLEL = @TESTPARALLEL@ -THREADSAFE = @THREADSAFE@ -TIME = @TIME@ -TR = @TR@ -TRACE_API = @TRACE_API@ -UNAME_INFO = @UNAME_INFO@ -USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_SZIP = @USE_FILTER_SZIP@ -USINGMEMCHECKER = @USINGMEMCHECKER@ -VERSION = @VERSION@ -WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_FC = @ac_ct_FC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ - -# Install directories that automake doesn't know about -docdir = $(exec_prefix)/doc -dvidir = @dvidir@ -enable_shared = @enable_shared@ -enable_static = @enable_static@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# Shell commands used in Makefiles -RM = rm -f -CP = cp - -# Some machines need a command to run executables; this is that command -# so that our tests will run. -# We use RUNEXEC instead of RUNSERIAL directly because it may be that -# some tests need to be run with a different command. Older versions -# of the makefiles used the command -# $(LIBTOOL) --mode=execute -# in some directories, for instance. -RUNEXEC = $(RUNSERIAL) - -# Libraries to link to while building -LIBHDF5 = $(top_builddir)/src/libhdf5.la -LIBH5TEST = $(top_builddir)/test/libh5test.la -LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la -LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la -LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la -LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la -LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la -LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la -LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la - -# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below -# has been removed. According to the official description of DESTDIR by Gnu at -# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is -# prepended to the normal and complete install path that it precedes for the -# purpose of installing in a temporary directory which is useful for building -# rpms and other packages. The '/' after ${DESTDIR} will be followed by another -# '/' at the beginning of the normal install path. When DESTDIR is empty the -# path then begins with '//', which is incorrect and causes problems at least for -# Cygwin. - -# Scripts used to build examples -# If only shared libraries have been installed, have h5cc build examples with -# shared libraries instead of static libraries -H5CC = ${DESTDIR}$(bindir)/h5cc -H5CC_PP = ${DESTDIR}$(bindir)/h5pcc -H5FC = ${DESTDIR}$(bindir)/h5fc -H5FC_PP = ${DESTDIR}$(bindir)/h5pfc -H5CPP = ${DESTDIR}$(bindir)/h5c++ -ACLOCAL_AMFLAGS = "-I m4" - -# The trace script; this is used on source files from the C library to -# insert tracing macros. -TRACE = perl $(top_srcdir)/bin/trace - -# .chkexe files are used to mark tests that have run successfully. -# .chklog files are output from those tests. -# *.clog and *.clog2 are from the MPE option. - -# Temporary files. *.h5 are generated by h5dumpgentest. They should -# copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.bin - -# Test programs and scripts -TEST_PROG = h5dumpgentest -TEST_SCRIPT = testh5dump.sh testh5dumppbits.sh testh5dumpvds.sh testh5dumpxml.sh -check_SCRIPTS = $(TEST_SCRIPT) -SCRIPT_DEPEND = h5dump$(EXEEXT) - -# Add h5dump specific linker flags here -h5dump_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# All the programs depend on the hdf5 and h5tools libraries -LDADD = $(LIBH5TOOLS) $(LIBHDF5) - -# Source files for the program -h5dump_SOURCES = h5dump.c h5dump_ddl.c h5dump_xml.c -DISTCLEANFILES = testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh - -# Automake needs to be taught how to build lib, progs, and tests targets. -# These will be filled in automatically for the most part (e.g., -# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and -# EXTRA_TEST variables are supplied to allow the user to force targets to -# be built at certain times. -LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ - $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) - -PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ - $(EXTRA_PROG) - -chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -TEST_EXTENSIONS = .sh -SH_LOG_COMPILER = $(SHELL) -AM_SH_LOG_FLAGS = -TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_) -TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_) -TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_) -TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/h5dump/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/h5dump/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -testh5dump.sh: $(top_builddir)/config.status $(srcdir)/testh5dump.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -testh5dumppbits.sh: $(top_builddir)/config.status $(srcdir)/testh5dumppbits.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -testh5dumpvds.sh: $(top_builddir)/config.status $(srcdir)/testh5dumpvds.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -testh5dumpxml.sh: $(top_builddir)/config.status $(srcdir)/testh5dumpxml.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -binread$(EXEEXT): $(binread_OBJECTS) $(binread_DEPENDENCIES) $(EXTRA_binread_DEPENDENCIES) - @rm -f binread$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(binread_OBJECTS) $(binread_LDADD) $(LIBS) - -h5dump$(EXEEXT): $(h5dump_OBJECTS) $(h5dump_DEPENDENCIES) $(EXTRA_h5dump_DEPENDENCIES) - @rm -f h5dump$(EXEEXT) - $(AM_V_CCLD)$(h5dump_LINK) $(h5dump_OBJECTS) $(h5dump_LDADD) $(LIBS) - -h5dumpgentest$(EXEEXT): $(h5dumpgentest_OBJECTS) $(h5dumpgentest_DEPENDENCIES) $(EXTRA_h5dumpgentest_DEPENDENCIES) - @rm -f h5dumpgentest$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(h5dumpgentest_OBJECTS) $(h5dumpgentest_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binread.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5dump.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5dump_ddl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5dump_xml.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5dumpgentest.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 -recheck: all $(check_PROGRAMS) $(check_SCRIPTS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -h5dumpgentest.log: h5dumpgentest$(EXEEXT) - @p='h5dumpgentest$(EXEEXT)'; \ - b='h5dumpgentest'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.sh.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.sh$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile $(PROGRAMS) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-local - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ - check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ - clean-generic clean-libtool cscopelist-am ctags ctags-am \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ - pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am \ - uninstall-binPROGRAMS - -.PRECIOUS: Makefile - - -# List all build rules defined by HDF5 Makefiles as "PHONY" targets here. -# This tells the Makefiles that these targets are not files to be built but -# commands that should be executed even if a file with the same name already -# exists. -.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \ - build-tests check-clean check-install check-p check-s check-vfd \ - install-doc lib progs tests uninstall-doc _exec_check-s _test help - -help: - @$(top_srcdir)/bin/makehelp - -# lib/progs/tests targets recurse into subdirectories. build-* targets -# build files in this directory. -build-lib: $(LIB) -build-progs: $(LIB) $(PROGS) -build-tests: $(LIB) $(PROGS) $(chk_TESTS) - -# General rule for recursive building targets. -# BUILT_SOURCES contain targets that need to be built before anything else -# in the directory (e.g., for Fortran type detection) -lib progs tests check-s check-p :: $(BUILT_SOURCES) - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# General rule for recursive cleaning targets. Like the rule above, -# but doesn't require building BUILT_SOURCES. -check-clean :: - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# Tell Automake to build tests when the user types `make all' (this is -# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since -# Automake won't build them automatically, either. -all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS) - -# make install-doc doesn't do anything outside of doc directory, but -# Makefiles should recognize it. -# UPDATE: docs no longer reside in this build tree, so this target -# is depreciated. -install-doc uninstall-doc: - @echo "Nothing to be done." - -# clean up files generated by tests so they can be re-run. -build-check-clean: - $(RM) -rf $(CHECK_CLEANFILES) - -# run check-clean whenever mostlyclean is run -mostlyclean-local: build-check-clean - -# check-install is just a synonym for installcheck -check-install: installcheck - -# Run each test in order, passing $(TEST_FLAGS) to the program. -# Since tests are done in a shell loop, "make -i" does apply inside it. -# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop. -# The timestamps give a rough idea how much time the tests use. -# -# Note that targets in chk_TESTS (defined above) will be built when the user -# types 'make tests' or 'make check', but only programs in TEST_PROG, -# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed. -check-TESTS: test - -test _test: - @$(MAKE) build-check-s - @$(MAKE) build-check-p - -# Actual execution of check-s. -build-check-s: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH) - -# The dummy.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \ - tname=$(@:.chkexe_=)$(EXEEXT);\ - log=$(@:.chkexe_=.chklog); \ - echo "============================"; \ - if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\ - else \ - echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - srcdir="$(srcdir)" \ - $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $(@:.chkexe_=.chkexe) || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - fi - -# The dummysh.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \ - cmd=$(@:.chkexe_=);\ - tname=`basename $$cmd`;\ - chkname=`basename $(@:.chkexe_=.chkexe)`;\ - log=`basename $(@:.chkexe_=.chklog)`; \ - echo "============================"; \ - if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - else \ - echo "Testing $${tname} $(TEST_FLAGS)"; \ - echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \ - srcdir="$(srcdir)" \ - $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $${chkname} || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - echo "============================"; \ - fi - -# Actual execution of check-p. -build-check-p: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @if test -n "$(TEST_PROG_PARA)"; then \ - echo "**** Hint ****"; \ - echo "Parallel test files reside in the current directory" \ - "by default."; \ - echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \ - echo " HDF5_PARAPREFIX=/PFS/user/me"; \ - echo " export HDF5_PARAPREFIX"; \ - echo " make check"; \ - echo "**** end of Hint ****"; \ - fi - @for test in $(TEST_PROG_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \ - RUNEXEC="$(RUNPARALLEL)" || exit 1; \ - fi; \ - done - @for test in $(TEST_SCRIPT_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \ - fi; \ - done - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -# Run test with different Virtual File Driver -check-vfd: $(LIB) $(PROGS) $(chk_TESTS) - @for vfd in $(VFD_LIST) dummy; do \ - if test $$vfd != dummy; then \ - echo "============================"; \ - echo "Testing Virtual File Driver $$vfd"; \ - echo "============================"; \ - $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ - fi; \ - done - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in deleted file mode 100644 index cfb169c..0000000 --- a/tools/h5ls/Makefile.in +++ /dev/null @@ -1,1414 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. -# -# HDF5 Library Makefile(.in) -# - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = h5ls$(EXEEXT) -TESTS = $(TEST_SCRIPT) -subdir = tools/h5ls -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc -CONFIG_CLEAN_FILES = testh5ls.sh testh5lsvds.sh -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -h5ls_SOURCES = h5ls.c -h5ls_OBJECTS = h5ls.$(OBJEXT) -h5ls_LDADD = $(LDADD) -h5ls_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -h5ls_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(h5ls_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src -depcomp = $(SHELL) $(top_srcdir)/bin/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = h5ls.c -DIST_SOURCES = h5ls.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.sh.log=.log) -SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver -SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/testh5ls.sh.in \ - $(srcdir)/testh5lsvds.sh.in $(top_srcdir)/bin/depcomp \ - $(top_srcdir)/bin/test-driver $(top_srcdir)/config/commence.am \ - $(top_srcdir)/config/conclude.am -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@ -AMTAR = @AMTAR@ - -# H5_CFLAGS holds flags that should be used when building hdf5, -# but which should not be exported to h5cc for building other programs. -# AM_CFLAGS is an automake construct which should be used by Makefiles -# instead of CFLAGS, as CFLAGS is reserved solely for the user to define. -# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. -AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ - -# Include src and tools/lib directories -AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \ - -I$(top_srcdir)/tools/lib -AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BYTESEX = @BYTESEX@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_VERSION = @CC_VERSION@ -CFLAGS = @CFLAGS@ -CLEARFILEBUF = @CLEARFILEBUF@ -CODESTACK = @CODESTACK@ -CONFIG_DATE = @CONFIG_DATE@ -CONFIG_MODE = @CONFIG_MODE@ -CONFIG_USER = @CONFIG_USER@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CXX_VERSION = @CXX_VERSION@ -CYGPATH_W = @CYGPATH_W@ -DEBUG_PKG = @DEBUG_PKG@ -DEFAULT_API_VERSION = @DEFAULT_API_VERSION@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ -DIRECT_VFD = @DIRECT_VFD@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTERNAL_FILTERS = @EXTERNAL_FILTERS@ - -# Make sure that these variables are exported to the Makefiles -F9XMODEXT = @F9XMODEXT@ -F9XMODFLAG = @F9XMODFLAG@ -F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ -FC = @FC@ -FCFLAGS = @FCFLAGS@ -FCFLAGS_f90 = @FCFLAGS_f90@ -FCLIBS = @FCLIBS@ -FC_VERSION = @FC_VERSION@ -FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ -FSEARCH_DIRS = @FSEARCH_DIRS@ -Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ -GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ -H5_CFLAGS = @H5_CFLAGS@ -H5_CPPFLAGS = @H5_CPPFLAGS@ -H5_CXXFLAGS = @H5_CXXFLAGS@ -H5_FCFLAGS = @H5_FCFLAGS@ -H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ -H5_LDFLAGS = @H5_LDFLAGS@ -H5_VERSION = @H5_VERSION@ -HADDR_T = @HADDR_T@ -HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ -HAVE_PTHREAD = @HAVE_PTHREAD@ -HDF5_HL = @HDF5_HL@ -HDF5_INTERFACES = @HDF5_INTERFACES@ -HDF_CXX = @HDF_CXX@ -HDF_FORTRAN = @HDF_FORTRAN@ -HID_T = @HID_T@ -HL = @HL@ -HL_FOR = @HL_FOR@ -HSIZE_T = @HSIZE_T@ -HSSIZE_T = @HSSIZE_T@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTRUMENT = @INSTRUMENT@ -INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LL_PATH = @LL_PATH@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_STATIC_EXEC = @LT_STATIC_EXEC@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPE = @MPE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ -PARALLEL = @PARALLEL@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -ROOT = @ROOT@ -RUNPARALLEL = @RUNPARALLEL@ -RUNSERIAL = @RUNSERIAL@ -R_INTEGER = @R_INTEGER@ -R_LARGE = @R_LARGE@ -SEARCH = @SEARCH@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIZE_T = @SIZE_T@ -STATIC_EXEC = @STATIC_EXEC@ -STATIC_SHARED = @STATIC_SHARED@ -STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@ -STRIP = @STRIP@ -TESTPARALLEL = @TESTPARALLEL@ -THREADSAFE = @THREADSAFE@ -TIME = @TIME@ -TR = @TR@ -TRACE_API = @TRACE_API@ -UNAME_INFO = @UNAME_INFO@ -USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_SZIP = @USE_FILTER_SZIP@ -USINGMEMCHECKER = @USINGMEMCHECKER@ -VERSION = @VERSION@ -WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_FC = @ac_ct_FC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ - -# Install directories that automake doesn't know about -docdir = $(exec_prefix)/doc -dvidir = @dvidir@ -enable_shared = @enable_shared@ -enable_static = @enable_static@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# Shell commands used in Makefiles -RM = rm -f -CP = cp - -# Some machines need a command to run executables; this is that command -# so that our tests will run. -# We use RUNEXEC instead of RUNSERIAL directly because it may be that -# some tests need to be run with a different command. Older versions -# of the makefiles used the command -# $(LIBTOOL) --mode=execute -# in some directories, for instance. -RUNEXEC = $(RUNSERIAL) - -# Libraries to link to while building -LIBHDF5 = $(top_builddir)/src/libhdf5.la -LIBH5TEST = $(top_builddir)/test/libh5test.la -LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la -LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la -LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la -LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la -LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la -LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la -LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la - -# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below -# has been removed. According to the official description of DESTDIR by Gnu at -# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is -# prepended to the normal and complete install path that it precedes for the -# purpose of installing in a temporary directory which is useful for building -# rpms and other packages. The '/' after ${DESTDIR} will be followed by another -# '/' at the beginning of the normal install path. When DESTDIR is empty the -# path then begins with '//', which is incorrect and causes problems at least for -# Cygwin. - -# Scripts used to build examples -# If only shared libraries have been installed, have h5cc build examples with -# shared libraries instead of static libraries -H5CC = ${DESTDIR}$(bindir)/h5cc -H5CC_PP = ${DESTDIR}$(bindir)/h5pcc -H5FC = ${DESTDIR}$(bindir)/h5fc -H5FC_PP = ${DESTDIR}$(bindir)/h5pfc -H5CPP = ${DESTDIR}$(bindir)/h5c++ -ACLOCAL_AMFLAGS = "-I m4" - -# The trace script; this is used on source files from the C library to -# insert tracing macros. -TRACE = perl $(top_srcdir)/bin/trace - -# .chkexe files are used to mark tests that have run successfully. -# .chklog files are output from those tests. -# *.clog and *.clog2 are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 - -# Test programs and scripts -TEST_SCRIPT = testh5ls.sh testh5lsvds.sh -check_SCRIPTS = $(TEST_SCRIPT) -SCRIPT_DEPEND = h5ls$(EXEEXT) - -# Add h5ls specific linker flags here -h5ls_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# All programs depend on the hdf5 and h5tools libraries -LDADD = $(LIBH5TOOLS) $(LIBHDF5) - -# Automake needs to be taught how to build lib, progs, and tests targets. -# These will be filled in automatically for the most part (e.g., -# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and -# EXTRA_TEST variables are supplied to allow the user to force targets to -# be built at certain times. -LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ - $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) - -PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ - $(EXTRA_PROG) - -chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -TEST_EXTENSIONS = .sh -SH_LOG_COMPILER = $(SHELL) -AM_SH_LOG_FLAGS = -TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_) -TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_) -TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_) -TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/h5ls/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/h5ls/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -testh5ls.sh: $(top_builddir)/config.status $(srcdir)/testh5ls.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -testh5lsvds.sh: $(top_builddir)/config.status $(srcdir)/testh5lsvds.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -h5ls$(EXEEXT): $(h5ls_OBJECTS) $(h5ls_DEPENDENCIES) $(EXTRA_h5ls_DEPENDENCIES) - @rm -f h5ls$(EXEEXT) - $(AM_V_CCLD)$(h5ls_LINK) $(h5ls_OBJECTS) $(h5ls_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ls.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 -recheck: all $(check_SCRIPTS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -.sh.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.sh$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile $(PROGRAMS) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-local - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ - check-am clean clean-binPROGRAMS clean-generic clean-libtool \ - cscopelist-am ctags ctags-am distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - mostlyclean-local pdf pdf-am ps ps-am recheck tags tags-am \ - uninstall uninstall-am uninstall-binPROGRAMS - -.PRECIOUS: Makefile - - -# List all build rules defined by HDF5 Makefiles as "PHONY" targets here. -# This tells the Makefiles that these targets are not files to be built but -# commands that should be executed even if a file with the same name already -# exists. -.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \ - build-tests check-clean check-install check-p check-s check-vfd \ - install-doc lib progs tests uninstall-doc _exec_check-s _test help - -help: - @$(top_srcdir)/bin/makehelp - -# lib/progs/tests targets recurse into subdirectories. build-* targets -# build files in this directory. -build-lib: $(LIB) -build-progs: $(LIB) $(PROGS) -build-tests: $(LIB) $(PROGS) $(chk_TESTS) - -# General rule for recursive building targets. -# BUILT_SOURCES contain targets that need to be built before anything else -# in the directory (e.g., for Fortran type detection) -lib progs tests check-s check-p :: $(BUILT_SOURCES) - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# General rule for recursive cleaning targets. Like the rule above, -# but doesn't require building BUILT_SOURCES. -check-clean :: - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# Tell Automake to build tests when the user types `make all' (this is -# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since -# Automake won't build them automatically, either. -all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS) - -# make install-doc doesn't do anything outside of doc directory, but -# Makefiles should recognize it. -# UPDATE: docs no longer reside in this build tree, so this target -# is depreciated. -install-doc uninstall-doc: - @echo "Nothing to be done." - -# clean up files generated by tests so they can be re-run. -build-check-clean: - $(RM) -rf $(CHECK_CLEANFILES) - -# run check-clean whenever mostlyclean is run -mostlyclean-local: build-check-clean - -# check-install is just a synonym for installcheck -check-install: installcheck - -# Run each test in order, passing $(TEST_FLAGS) to the program. -# Since tests are done in a shell loop, "make -i" does apply inside it. -# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop. -# The timestamps give a rough idea how much time the tests use. -# -# Note that targets in chk_TESTS (defined above) will be built when the user -# types 'make tests' or 'make check', but only programs in TEST_PROG, -# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed. -check-TESTS: test - -test _test: - @$(MAKE) build-check-s - @$(MAKE) build-check-p - -# Actual execution of check-s. -build-check-s: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH) - -# The dummy.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \ - tname=$(@:.chkexe_=)$(EXEEXT);\ - log=$(@:.chkexe_=.chklog); \ - echo "============================"; \ - if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\ - else \ - echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - srcdir="$(srcdir)" \ - $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $(@:.chkexe_=.chkexe) || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - fi - -# The dummysh.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \ - cmd=$(@:.chkexe_=);\ - tname=`basename $$cmd`;\ - chkname=`basename $(@:.chkexe_=.chkexe)`;\ - log=`basename $(@:.chkexe_=.chklog)`; \ - echo "============================"; \ - if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - else \ - echo "Testing $${tname} $(TEST_FLAGS)"; \ - echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \ - srcdir="$(srcdir)" \ - $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $${chkname} || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - echo "============================"; \ - fi - -# Actual execution of check-p. -build-check-p: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @if test -n "$(TEST_PROG_PARA)"; then \ - echo "**** Hint ****"; \ - echo "Parallel test files reside in the current directory" \ - "by default."; \ - echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \ - echo " HDF5_PARAPREFIX=/PFS/user/me"; \ - echo " export HDF5_PARAPREFIX"; \ - echo " make check"; \ - echo "**** end of Hint ****"; \ - fi - @for test in $(TEST_PROG_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \ - RUNEXEC="$(RUNPARALLEL)" || exit 1; \ - fi; \ - done - @for test in $(TEST_SCRIPT_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \ - fi; \ - done - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -# Run test with different Virtual File Driver -check-vfd: $(LIB) $(PROGS) $(chk_TESTS) - @for vfd in $(VFD_LIST) dummy; do \ - if test $$vfd != dummy; then \ - echo "============================"; \ - echo "Testing Virtual File Driver $$vfd"; \ - echo "============================"; \ - $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ - fi; \ - done - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in deleted file mode 100644 index 4db831a..0000000 --- a/tools/misc/Makefile.in +++ /dev/null @@ -1,1685 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. -# -# HDF5 Library Makefile(.in) -# - - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -check_PROGRAMS = $(am__EXEEXT_1) repart_test$(EXEEXT) -bin_PROGRAMS = h5debug$(EXEEXT) h5repart$(EXEEXT) h5mkgrp$(EXEEXT) -TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT) -subdir = tools/misc -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc -CONFIG_CLEAN_FILES = h5cc testh5mkgrp.sh testh5repart.sh -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" -am__EXEEXT_1 = h5repart_gentest$(EXEEXT) talign$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) -h5debug_SOURCES = h5debug.c -h5debug_OBJECTS = h5debug.$(OBJEXT) -h5debug_LDADD = $(LDADD) -h5debug_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -h5debug_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(h5debug_LDFLAGS) $(LDFLAGS) -o $@ -h5mkgrp_SOURCES = h5mkgrp.c -h5mkgrp_OBJECTS = h5mkgrp.$(OBJEXT) -h5mkgrp_LDADD = $(LDADD) -h5mkgrp_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -h5mkgrp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(h5mkgrp_LDFLAGS) $(LDFLAGS) -o $@ -h5repart_SOURCES = h5repart.c -h5repart_OBJECTS = h5repart.$(OBJEXT) -h5repart_LDADD = $(LDADD) -h5repart_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -h5repart_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(h5repart_LDFLAGS) $(LDFLAGS) -o $@ -h5repart_gentest_SOURCES = h5repart_gentest.c -h5repart_gentest_OBJECTS = h5repart_gentest.$(OBJEXT) -h5repart_gentest_LDADD = $(LDADD) -h5repart_gentest_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -repart_test_SOURCES = repart_test.c -repart_test_OBJECTS = repart_test.$(OBJEXT) -repart_test_LDADD = $(LDADD) -repart_test_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -talign_SOURCES = talign.c -talign_OBJECTS = talign.$(OBJEXT) -talign_LDADD = $(LDADD) -talign_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -SCRIPTS = $(bin_SCRIPTS) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src -depcomp = $(SHELL) $(top_srcdir)/bin/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = h5debug.c h5mkgrp.c h5repart.c h5repart_gentest.c \ - repart_test.c talign.c -DIST_SOURCES = h5debug.c h5mkgrp.c h5repart.c h5repart_gentest.c \ - repart_test.c talign.c -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-recursive dvi-recursive html-recursive info-recursive \ - install-data-recursive install-dvi-recursive \ - install-exec-recursive install-html-recursive \ - install-info-recursive install-pdf-recursive \ - install-ps-recursive install-recursive installcheck-recursive \ - installdirs-recursive pdf-recursive ps-recursive \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - check recheck distdir -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -TEST_SUITE_LOG = test-suite.log -LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.sh.log=.log) -SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver -SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS) -DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/h5cc.in \ - $(srcdir)/testh5mkgrp.sh.in $(srcdir)/testh5repart.sh.in \ - $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/test-driver \ - $(top_srcdir)/config/commence.am \ - $(top_srcdir)/config/conclude.am -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@ -AMTAR = @AMTAR@ - -# H5_CFLAGS holds flags that should be used when building hdf5, -# but which should not be exported to h5cc for building other programs. -# AM_CFLAGS is an automake construct which should be used by Makefiles -# instead of CFLAGS, as CFLAGS is reserved solely for the user to define. -# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. -AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ - -# Include src directory -AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \ - -I$(top_srcdir)/tools/lib -AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BYTESEX = @BYTESEX@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_VERSION = @CC_VERSION@ -CFLAGS = @CFLAGS@ -CLEARFILEBUF = @CLEARFILEBUF@ -CODESTACK = @CODESTACK@ -CONFIG_DATE = @CONFIG_DATE@ -CONFIG_MODE = @CONFIG_MODE@ -CONFIG_USER = @CONFIG_USER@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CXX_VERSION = @CXX_VERSION@ -CYGPATH_W = @CYGPATH_W@ -DEBUG_PKG = @DEBUG_PKG@ -DEFAULT_API_VERSION = @DEFAULT_API_VERSION@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ -DIRECT_VFD = @DIRECT_VFD@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTERNAL_FILTERS = @EXTERNAL_FILTERS@ - -# Make sure that these variables are exported to the Makefiles -F9XMODEXT = @F9XMODEXT@ -F9XMODFLAG = @F9XMODFLAG@ -F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ -FC = @FC@ -FCFLAGS = @FCFLAGS@ -FCFLAGS_f90 = @FCFLAGS_f90@ -FCLIBS = @FCLIBS@ -FC_VERSION = @FC_VERSION@ -FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ -FSEARCH_DIRS = @FSEARCH_DIRS@ -Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ -GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ -H5_CFLAGS = @H5_CFLAGS@ -H5_CPPFLAGS = @H5_CPPFLAGS@ -H5_CXXFLAGS = @H5_CXXFLAGS@ -H5_FCFLAGS = @H5_FCFLAGS@ -H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ -H5_LDFLAGS = @H5_LDFLAGS@ -H5_VERSION = @H5_VERSION@ -HADDR_T = @HADDR_T@ -HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ -HAVE_PTHREAD = @HAVE_PTHREAD@ -HDF5_HL = @HDF5_HL@ -HDF5_INTERFACES = @HDF5_INTERFACES@ -HDF_CXX = @HDF_CXX@ -HDF_FORTRAN = @HDF_FORTRAN@ -HID_T = @HID_T@ -HL = @HL@ -HL_FOR = @HL_FOR@ -HSIZE_T = @HSIZE_T@ -HSSIZE_T = @HSSIZE_T@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTRUMENT = @INSTRUMENT@ -INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LL_PATH = @LL_PATH@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_STATIC_EXEC = @LT_STATIC_EXEC@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPE = @MPE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ -PARALLEL = @PARALLEL@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -ROOT = @ROOT@ -RUNPARALLEL = @RUNPARALLEL@ -RUNSERIAL = @RUNSERIAL@ -R_INTEGER = @R_INTEGER@ -R_LARGE = @R_LARGE@ -SEARCH = @SEARCH@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIZE_T = @SIZE_T@ -STATIC_EXEC = @STATIC_EXEC@ -STATIC_SHARED = @STATIC_SHARED@ -STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@ -STRIP = @STRIP@ -TESTPARALLEL = @TESTPARALLEL@ -THREADSAFE = @THREADSAFE@ -TIME = @TIME@ -TR = @TR@ -TRACE_API = @TRACE_API@ -UNAME_INFO = @UNAME_INFO@ -USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_SZIP = @USE_FILTER_SZIP@ -USINGMEMCHECKER = @USINGMEMCHECKER@ -VERSION = @VERSION@ -WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_FC = @ac_ct_FC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ - -# Install directories that automake doesn't know about -docdir = $(exec_prefix)/doc -dvidir = @dvidir@ -enable_shared = @enable_shared@ -enable_static = @enable_static@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# Shell commands used in Makefiles -RM = rm -f -CP = cp - -# Some machines need a command to run executables; this is that command -# so that our tests will run. -# We use RUNEXEC instead of RUNSERIAL directly because it may be that -# some tests need to be run with a different command. Older versions -# of the makefiles used the command -# $(LIBTOOL) --mode=execute -# in some directories, for instance. -RUNEXEC = $(RUNSERIAL) - -# Libraries to link to while building -LIBHDF5 = $(top_builddir)/src/libhdf5.la -LIBH5TEST = $(top_builddir)/test/libh5test.la -LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la -LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la -LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la -LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la -LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la -LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la -LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la - -# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below -# has been removed. According to the official description of DESTDIR by Gnu at -# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is -# prepended to the normal and complete install path that it precedes for the -# purpose of installing in a temporary directory which is useful for building -# rpms and other packages. The '/' after ${DESTDIR} will be followed by another -# '/' at the beginning of the normal install path. When DESTDIR is empty the -# path then begins with '//', which is incorrect and causes problems at least for -# Cygwin. - -# Scripts used to build examples -# If only shared libraries have been installed, have h5cc build examples with -# shared libraries instead of static libraries -H5CC = ${DESTDIR}$(bindir)/h5cc -H5CC_PP = ${DESTDIR}$(bindir)/h5pcc -H5FC = ${DESTDIR}$(bindir)/h5fc -H5FC_PP = ${DESTDIR}$(bindir)/h5pfc -H5CPP = ${DESTDIR}$(bindir)/h5c++ -ACLOCAL_AMFLAGS = "-I m4" - -# The trace script; this is used on source files from the C library to -# insert tracing macros. -TRACE = perl $(top_srcdir)/bin/trace - -# .chkexe files are used to mark tests that have run successfully. -# .chklog files are output from those tests. -# *.clog and *.clog2 are from the MPE option. - -# Temporary files. *.h5 are generated by h5repart_gentest. They should -# copied to the testfiles/ directory if update is required. fst_family*.h5 -# and scd_family*.h5 were created by setting the HDF5_NOCLEANUP variable. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 \ - ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5 -SUBDIRS = vds - -#test scripts and programs -TEST_PROG = h5repart_gentest talign -TEST_SCRIPT = testh5repart.sh testh5mkgrp.sh -check_SCRIPTS = $(TEST_SCRIPT) -SCRIPT_DEPEND = h5repart$(EXEEXT) h5mkgrp$(EXEEXT) -bin_SCRIPTS = h5redeploy - -# Add h5debug, h5repart, and h5mkgrp specific linker flags here -h5debug_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) -h5repart_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) -h5mkgrp_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) - -# Tell automake to clean h5redeploy script -CLEANFILES = h5redeploy - -# These were generated by configure. Remove them only when distclean. -DISTCLEANFILES = h5cc testh5repart.sh - -# All programs rely on hdf5 library and h5tools library -LDADD = $(LIBH5TOOLS) $(LIBHDF5) -@BUILD_PARALLEL_CONDITIONAL_FALSE@H5CC_NAME = h5cc - -# h5cc needs custom install and uninstall rules, since it may be -# named h5pcc if hdf5 is being built in parallel mode. -@BUILD_PARALLEL_CONDITIONAL_TRUE@H5CC_NAME = h5pcc - -# Automake needs to be taught how to build lib, progs, and tests targets. -# These will be filled in automatically for the most part (e.g., -# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and -# EXTRA_TEST variables are supplied to allow the user to force targets to -# be built at certain times. -LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ - $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) - -PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ - $(EXTRA_PROG) - -chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -TEST_EXTENSIONS = .sh -SH_LOG_COMPILER = $(SHELL) -AM_SH_LOG_FLAGS = -TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_) -TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_) -TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_) -TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/misc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/misc/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -h5cc: $(top_builddir)/config.status $(srcdir)/h5cc.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -testh5mkgrp.sh: $(top_builddir)/config.status $(srcdir)/testh5mkgrp.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -testh5repart.sh: $(top_builddir)/config.status $(srcdir)/testh5repart.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -h5debug$(EXEEXT): $(h5debug_OBJECTS) $(h5debug_DEPENDENCIES) $(EXTRA_h5debug_DEPENDENCIES) - @rm -f h5debug$(EXEEXT) - $(AM_V_CCLD)$(h5debug_LINK) $(h5debug_OBJECTS) $(h5debug_LDADD) $(LIBS) - -h5mkgrp$(EXEEXT): $(h5mkgrp_OBJECTS) $(h5mkgrp_DEPENDENCIES) $(EXTRA_h5mkgrp_DEPENDENCIES) - @rm -f h5mkgrp$(EXEEXT) - $(AM_V_CCLD)$(h5mkgrp_LINK) $(h5mkgrp_OBJECTS) $(h5mkgrp_LDADD) $(LIBS) - -h5repart$(EXEEXT): $(h5repart_OBJECTS) $(h5repart_DEPENDENCIES) $(EXTRA_h5repart_DEPENDENCIES) - @rm -f h5repart$(EXEEXT) - $(AM_V_CCLD)$(h5repart_LINK) $(h5repart_OBJECTS) $(h5repart_LDADD) $(LIBS) - -h5repart_gentest$(EXEEXT): $(h5repart_gentest_OBJECTS) $(h5repart_gentest_DEPENDENCIES) $(EXTRA_h5repart_gentest_DEPENDENCIES) - @rm -f h5repart_gentest$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(h5repart_gentest_OBJECTS) $(h5repart_gentest_LDADD) $(LIBS) - -repart_test$(EXEEXT): $(repart_test_OBJECTS) $(repart_test_DEPENDENCIES) $(EXTRA_repart_test_DEPENDENCIES) - @rm -f repart_test$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(repart_test_OBJECTS) $(repart_test_LDADD) $(LIBS) - -talign$(EXEEXT): $(talign_OBJECTS) $(talign_DEPENDENCIES) $(EXTRA_talign_DEPENDENCIES) - @rm -f talign$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(talign_OBJECTS) $(talign_LDADD) $(LIBS) -install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n' \ - -e 'h;s|.*|.|' \ - -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) { files[d] = files[d] " " $$1; \ - if (++n[d] == $(am__install_max)) { \ - print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ - else { print "f", d "/" $$4, $$1 } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 's,.*/,,;$(transform)'`; \ - dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5debug.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5mkgrp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repart.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repart_gentest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/repart_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/talign.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 -recheck: all $(check_PROGRAMS) $(check_SCRIPTS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -h5repart_gentest.log: h5repart_gentest$(EXEEXT) - @p='h5repart_gentest$(EXEEXT)'; \ - b='h5repart_gentest'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -talign.log: talign$(EXEEXT) - @p='talign$(EXEEXT)'; \ - b='talign'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.sh.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.sh$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-recursive -all-am: Makefile $(PROGRAMS) $(SCRIPTS) all-local -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-binSCRIPTS \ - install-exec-local - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-local - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ - uninstall-local - -.MAKE: $(am__recursive_targets) check-am install-am install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ - check check-TESTS check-am clean clean-binPROGRAMS \ - clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-binSCRIPTS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-local \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ - pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-local - -.PRECIOUS: Makefile - - -# List all build rules defined by HDF5 Makefiles as "PHONY" targets here. -# This tells the Makefiles that these targets are not files to be built but -# commands that should be executed even if a file with the same name already -# exists. -.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \ - build-tests check-clean check-install check-p check-s check-vfd \ - install-doc lib progs tests uninstall-doc _exec_check-s _test help - -help: - @$(top_srcdir)/bin/makehelp - -install-exec-local: - @$(INSTALL) h5cc $(DESTDIR)$(bindir)/$(H5CC_NAME) -uninstall-local: - @$(RM) $(DESTDIR)$(bindir)/$(H5CC_NAME) - -# How to build h5redeploy script -h5redeploy: h5redeploy.in - @cp $(srcdir)/$@.in $@ - -# lib/progs/tests targets recurse into subdirectories. build-* targets -# build files in this directory. -build-lib: $(LIB) -build-progs: $(LIB) $(PROGS) -build-tests: $(LIB) $(PROGS) $(chk_TESTS) - -# General rule for recursive building targets. -# BUILT_SOURCES contain targets that need to be built before anything else -# in the directory (e.g., for Fortran type detection) -lib progs tests check-s check-p :: $(BUILT_SOURCES) - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# General rule for recursive cleaning targets. Like the rule above, -# but doesn't require building BUILT_SOURCES. -check-clean :: - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# Tell Automake to build tests when the user types `make all' (this is -# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since -# Automake won't build them automatically, either. -all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS) - -# make install-doc doesn't do anything outside of doc directory, but -# Makefiles should recognize it. -# UPDATE: docs no longer reside in this build tree, so this target -# is depreciated. -install-doc uninstall-doc: - @echo "Nothing to be done." - -# clean up files generated by tests so they can be re-run. -build-check-clean: - $(RM) -rf $(CHECK_CLEANFILES) - -# run check-clean whenever mostlyclean is run -mostlyclean-local: build-check-clean - -# check-install is just a synonym for installcheck -check-install: installcheck - -# Run each test in order, passing $(TEST_FLAGS) to the program. -# Since tests are done in a shell loop, "make -i" does apply inside it. -# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop. -# The timestamps give a rough idea how much time the tests use. -# -# Note that targets in chk_TESTS (defined above) will be built when the user -# types 'make tests' or 'make check', but only programs in TEST_PROG, -# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed. -check-TESTS: test - -test _test: - @$(MAKE) build-check-s - @$(MAKE) build-check-p - -# Actual execution of check-s. -build-check-s: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH) - -# The dummy.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \ - tname=$(@:.chkexe_=)$(EXEEXT);\ - log=$(@:.chkexe_=.chklog); \ - echo "============================"; \ - if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\ - else \ - echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - srcdir="$(srcdir)" \ - $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $(@:.chkexe_=.chkexe) || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - fi - -# The dummysh.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \ - cmd=$(@:.chkexe_=);\ - tname=`basename $$cmd`;\ - chkname=`basename $(@:.chkexe_=.chkexe)`;\ - log=`basename $(@:.chkexe_=.chklog)`; \ - echo "============================"; \ - if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - else \ - echo "Testing $${tname} $(TEST_FLAGS)"; \ - echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \ - srcdir="$(srcdir)" \ - $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $${chkname} || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - echo "============================"; \ - fi - -# Actual execution of check-p. -build-check-p: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @if test -n "$(TEST_PROG_PARA)"; then \ - echo "**** Hint ****"; \ - echo "Parallel test files reside in the current directory" \ - "by default."; \ - echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \ - echo " HDF5_PARAPREFIX=/PFS/user/me"; \ - echo " export HDF5_PARAPREFIX"; \ - echo " make check"; \ - echo "**** end of Hint ****"; \ - fi - @for test in $(TEST_PROG_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \ - RUNEXEC="$(RUNPARALLEL)" || exit 1; \ - fi; \ - done - @for test in $(TEST_SCRIPT_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \ - fi; \ - done - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -# Run test with different Virtual File Driver -check-vfd: $(LIB) $(PROGS) $(chk_TESTS) - @for vfd in $(VFD_LIST) dummy; do \ - if test $$vfd != dummy; then \ - echo "============================"; \ - echo "Testing Virtual File Driver $$vfd"; \ - echo "============================"; \ - $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ - fi; \ - done - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/tools/misc/vds/Makefile.in b/tools/misc/vds/Makefile.in deleted file mode 100644 index e44f611..0000000 --- a/tools/misc/vds/Makefile.in +++ /dev/null @@ -1,1437 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. -# -# HDF5 Library Makefile(.in) -# -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -check_PROGRAMS = $(am__EXEEXT_1) -TESTS = $(am__EXEEXT_1) -subdir = tools/misc/vds -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ - $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/H5config.h \ - $(top_builddir)/fortran/src/H5config_f.inc -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__EXEEXT_1 = UC_1_one_dim_gen$(EXEEXT) UC_2_two_dims_gen$(EXEEXT) \ - UC_3_gaps_gen$(EXEEXT) UC_4_printf_gen$(EXEEXT) \ - UC_5_stride_gen$(EXEEXT) -UC_1_one_dim_gen_SOURCES = UC_1_one_dim_gen.c -UC_1_one_dim_gen_OBJECTS = UC_1_one_dim_gen.$(OBJEXT) -UC_1_one_dim_gen_LDADD = $(LDADD) -UC_1_one_dim_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -UC_2_two_dims_gen_SOURCES = UC_2_two_dims_gen.c -UC_2_two_dims_gen_OBJECTS = UC_2_two_dims_gen.$(OBJEXT) -UC_2_two_dims_gen_LDADD = $(LDADD) -UC_2_two_dims_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -UC_3_gaps_gen_SOURCES = UC_3_gaps_gen.c -UC_3_gaps_gen_OBJECTS = UC_3_gaps_gen.$(OBJEXT) -UC_3_gaps_gen_LDADD = $(LDADD) -UC_3_gaps_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -UC_4_printf_gen_SOURCES = UC_4_printf_gen.c -UC_4_printf_gen_OBJECTS = UC_4_printf_gen.$(OBJEXT) -UC_4_printf_gen_LDADD = $(LDADD) -UC_4_printf_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -UC_5_stride_gen_SOURCES = UC_5_stride_gen.c -UC_5_stride_gen_OBJECTS = UC_5_stride_gen.$(OBJEXT) -UC_5_stride_gen_LDADD = $(LDADD) -UC_5_stride_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src -depcomp = $(SHELL) $(top_srcdir)/bin/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = UC_1_one_dim_gen.c UC_2_two_dims_gen.c UC_3_gaps_gen.c \ - UC_4_printf_gen.c UC_5_stride_gen.c -DIST_SOURCES = UC_1_one_dim_gen.c UC_2_two_dims_gen.c UC_3_gaps_gen.c \ - UC_4_printf_gen.c UC_5_stride_gen.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.sh.log=.log) -SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver -SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/bin/depcomp \ - $(top_srcdir)/bin/test-driver $(top_srcdir)/config/commence.am \ - $(top_srcdir)/config/conclude.am -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@ -AMTAR = @AMTAR@ - -# H5_CFLAGS holds flags that should be used when building hdf5, -# but which should not be exported to h5cc for building other programs. -# AM_CFLAGS is an automake construct which should be used by Makefiles -# instead of CFLAGS, as CFLAGS is reserved solely for the user to define. -# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. -AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ - -# Include src directory -AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \ - -I$(top_srcdir)/tools/lib -AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BYTESEX = @BYTESEX@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_VERSION = @CC_VERSION@ -CFLAGS = @CFLAGS@ -CLEARFILEBUF = @CLEARFILEBUF@ -CODESTACK = @CODESTACK@ -CONFIG_DATE = @CONFIG_DATE@ -CONFIG_MODE = @CONFIG_MODE@ -CONFIG_USER = @CONFIG_USER@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CXX_VERSION = @CXX_VERSION@ -CYGPATH_W = @CYGPATH_W@ -DEBUG_PKG = @DEBUG_PKG@ -DEFAULT_API_VERSION = @DEFAULT_API_VERSION@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ -DIRECT_VFD = @DIRECT_VFD@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTERNAL_FILTERS = @EXTERNAL_FILTERS@ - -# Make sure that these variables are exported to the Makefiles -F9XMODEXT = @F9XMODEXT@ -F9XMODFLAG = @F9XMODFLAG@ -F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ -FC = @FC@ -FCFLAGS = @FCFLAGS@ -FCFLAGS_f90 = @FCFLAGS_f90@ -FCLIBS = @FCLIBS@ -FC_VERSION = @FC_VERSION@ -FGREP = @FGREP@ -FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ -FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ -FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ -FSEARCH_DIRS = @FSEARCH_DIRS@ -Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ -GREP = @GREP@ -H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ -H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ -H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@ -H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@ -H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@ -H5_CFLAGS = @H5_CFLAGS@ -H5_CPPFLAGS = @H5_CPPFLAGS@ -H5_CXXFLAGS = @H5_CXXFLAGS@ -H5_FCFLAGS = @H5_FCFLAGS@ -H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ -H5_LDFLAGS = @H5_LDFLAGS@ -H5_VERSION = @H5_VERSION@ -HADDR_T = @HADDR_T@ -HAVE_DMALLOC = @HAVE_DMALLOC@ -HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ -HAVE_PTHREAD = @HAVE_PTHREAD@ -HDF5_HL = @HDF5_HL@ -HDF5_INTERFACES = @HDF5_INTERFACES@ -HDF_CXX = @HDF_CXX@ -HDF_FORTRAN = @HDF_FORTRAN@ -HID_T = @HID_T@ -HL = @HL@ -HL_FOR = @HL_FOR@ -HSIZE_T = @HSIZE_T@ -HSSIZE_T = @HSSIZE_T@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTRUMENT = @INSTRUMENT@ -INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LL_PATH = @LL_PATH@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_STATIC_EXEC = @LT_STATIC_EXEC@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPE = @MPE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@ -PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ -PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ -PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ -PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ -PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@ -PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ -PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ -PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ -PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ -PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ -PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ -PARALLEL = @PARALLEL@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -ROOT = @ROOT@ -RUNPARALLEL = @RUNPARALLEL@ -RUNSERIAL = @RUNSERIAL@ -R_INTEGER = @R_INTEGER@ -R_LARGE = @R_LARGE@ -SEARCH = @SEARCH@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIZE_T = @SIZE_T@ -STATIC_EXEC = @STATIC_EXEC@ -STATIC_SHARED = @STATIC_SHARED@ -STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@ -STRIP = @STRIP@ -TESTPARALLEL = @TESTPARALLEL@ -THREADSAFE = @THREADSAFE@ -TIME = @TIME@ -TR = @TR@ -TRACE_API = @TRACE_API@ -UNAME_INFO = @UNAME_INFO@ -USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ -USE_FILTER_SZIP = @USE_FILTER_SZIP@ -USINGMEMCHECKER = @USINGMEMCHECKER@ -VERSION = @VERSION@ -WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_FC = @ac_ct_FC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ - -# Install directories that automake doesn't know about -docdir = $(exec_prefix)/doc -dvidir = @dvidir@ -enable_shared = @enable_shared@ -enable_static = @enable_static@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# Shell commands used in Makefiles -RM = rm -f -CP = cp - -# Some machines need a command to run executables; this is that command -# so that our tests will run. -# We use RUNEXEC instead of RUNSERIAL directly because it may be that -# some tests need to be run with a different command. Older versions -# of the makefiles used the command -# $(LIBTOOL) --mode=execute -# in some directories, for instance. -RUNEXEC = $(RUNSERIAL) - -# Libraries to link to while building -LIBHDF5 = $(top_builddir)/src/libhdf5.la -LIBH5TEST = $(top_builddir)/test/libh5test.la -LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la -LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la -LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la -LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la -LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la -LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la -LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la - -# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below -# has been removed. According to the official description of DESTDIR by Gnu at -# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is -# prepended to the normal and complete install path that it precedes for the -# purpose of installing in a temporary directory which is useful for building -# rpms and other packages. The '/' after ${DESTDIR} will be followed by another -# '/' at the beginning of the normal install path. When DESTDIR is empty the -# path then begins with '//', which is incorrect and causes problems at least for -# Cygwin. - -# Scripts used to build examples -# If only shared libraries have been installed, have h5cc build examples with -# shared libraries instead of static libraries -H5CC = ${DESTDIR}$(bindir)/h5cc -H5CC_PP = ${DESTDIR}$(bindir)/h5pcc -H5FC = ${DESTDIR}$(bindir)/h5fc -H5FC_PP = ${DESTDIR}$(bindir)/h5pfc -H5CPP = ${DESTDIR}$(bindir)/h5c++ -ACLOCAL_AMFLAGS = "-I m4" - -# The trace script; this is used on source files from the C library to -# insert tracing macros. -TRACE = perl $(top_srcdir)/bin/trace - -# .chkexe files are used to mark tests that have run successfully. -# .chklog files are output from those tests. -# *.clog and *.clog2 are from the MPE option. - -# Temporary files. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 - -#test scripts and programs -TEST_PROG = UC_1_one_dim_gen UC_2_two_dims_gen UC_3_gaps_gen UC_4_printf_gen \ - UC_5_stride_gen - - -# All programs rely on hdf5 library and h5tools library -LDADD = $(LIBH5TOOLS) $(LIBHDF5) - -# Automake needs to be taught how to build lib, progs, and tests targets. -# These will be filled in automatically for the most part (e.g., -# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and -# EXTRA_TEST variables are supplied to allow the user to force targets to -# be built at certain times. -LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ - $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) - -PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ - $(EXTRA_PROG) - -chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -TEST_EXTENSIONS = .sh -SH_LOG_COMPILER = $(SHELL) -AM_SH_LOG_FLAGS = -TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_) -TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_) -TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_) -TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/misc/vds/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/misc/vds/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -UC_1_one_dim_gen$(EXEEXT): $(UC_1_one_dim_gen_OBJECTS) $(UC_1_one_dim_gen_DEPENDENCIES) $(EXTRA_UC_1_one_dim_gen_DEPENDENCIES) - @rm -f UC_1_one_dim_gen$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(UC_1_one_dim_gen_OBJECTS) $(UC_1_one_dim_gen_LDADD) $(LIBS) - -UC_2_two_dims_gen$(EXEEXT): $(UC_2_two_dims_gen_OBJECTS) $(UC_2_two_dims_gen_DEPENDENCIES) $(EXTRA_UC_2_two_dims_gen_DEPENDENCIES) - @rm -f UC_2_two_dims_gen$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(UC_2_two_dims_gen_OBJECTS) $(UC_2_two_dims_gen_LDADD) $(LIBS) - -UC_3_gaps_gen$(EXEEXT): $(UC_3_gaps_gen_OBJECTS) $(UC_3_gaps_gen_DEPENDENCIES) $(EXTRA_UC_3_gaps_gen_DEPENDENCIES) - @rm -f UC_3_gaps_gen$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(UC_3_gaps_gen_OBJECTS) $(UC_3_gaps_gen_LDADD) $(LIBS) - -UC_4_printf_gen$(EXEEXT): $(UC_4_printf_gen_OBJECTS) $(UC_4_printf_gen_DEPENDENCIES) $(EXTRA_UC_4_printf_gen_DEPENDENCIES) - @rm -f UC_4_printf_gen$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(UC_4_printf_gen_OBJECTS) $(UC_4_printf_gen_LDADD) $(LIBS) - -UC_5_stride_gen$(EXEEXT): $(UC_5_stride_gen_OBJECTS) $(UC_5_stride_gen_DEPENDENCIES) $(EXTRA_UC_5_stride_gen_DEPENDENCIES) - @rm -f UC_5_stride_gen$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(UC_5_stride_gen_OBJECTS) $(UC_5_stride_gen_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_1_one_dim_gen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_2_two_dims_gen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_3_gaps_gen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_4_printf_gen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_5_stride_gen.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 -recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -UC_1_one_dim_gen.log: UC_1_one_dim_gen$(EXEEXT) - @p='UC_1_one_dim_gen$(EXEEXT)'; \ - b='UC_1_one_dim_gen'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -UC_2_two_dims_gen.log: UC_2_two_dims_gen$(EXEEXT) - @p='UC_2_two_dims_gen$(EXEEXT)'; \ - b='UC_2_two_dims_gen'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -UC_3_gaps_gen.log: UC_3_gaps_gen$(EXEEXT) - @p='UC_3_gaps_gen$(EXEEXT)'; \ - b='UC_3_gaps_gen'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -UC_4_printf_gen.log: UC_4_printf_gen$(EXEEXT) - @p='UC_4_printf_gen$(EXEEXT)'; \ - b='UC_4_printf_gen'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -UC_5_stride_gen.log: UC_5_stride_gen$(EXEEXT) - @p='UC_5_stride_gen$(EXEEXT)'; \ - b='UC_5_stride_gen'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.sh.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.sh$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile all-local -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-local - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ - check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ - cscopelist-am ctags ctags-am distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ - pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# List all build rules defined by HDF5 Makefiles as "PHONY" targets here. -# This tells the Makefiles that these targets are not files to be built but -# commands that should be executed even if a file with the same name already -# exists. -.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \ - build-tests check-clean check-install check-p check-s check-vfd \ - install-doc lib progs tests uninstall-doc _exec_check-s _test help - -help: - @$(top_srcdir)/bin/makehelp - -# lib/progs/tests targets recurse into subdirectories. build-* targets -# build files in this directory. -build-lib: $(LIB) -build-progs: $(LIB) $(PROGS) -build-tests: $(LIB) $(PROGS) $(chk_TESTS) - -# General rule for recursive building targets. -# BUILT_SOURCES contain targets that need to be built before anything else -# in the directory (e.g., for Fortran type detection) -lib progs tests check-s check-p :: $(BUILT_SOURCES) - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# General rule for recursive cleaning targets. Like the rule above, -# but doesn't require building BUILT_SOURCES. -check-clean :: - @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; - @for d in X $(SUBDIRS); do \ - if test $$d != X && test $$d != .; then \ - (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ - fi; \ - done - -# Tell Automake to build tests when the user types `make all' (this is -# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since -# Automake won't build them automatically, either. -all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS) - -# make install-doc doesn't do anything outside of doc directory, but -# Makefiles should recognize it. -# UPDATE: docs no longer reside in this build tree, so this target -# is depreciated. -install-doc uninstall-doc: - @echo "Nothing to be done." - -# clean up files generated by tests so they can be re-run. -build-check-clean: - $(RM) -rf $(CHECK_CLEANFILES) - -# run check-clean whenever mostlyclean is run -mostlyclean-local: build-check-clean - -# check-install is just a synonym for installcheck -check-install: installcheck - -# Run each test in order, passing $(TEST_FLAGS) to the program. -# Since tests are done in a shell loop, "make -i" does apply inside it. -# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop. -# The timestamps give a rough idea how much time the tests use. -# -# Note that targets in chk_TESTS (defined above) will be built when the user -# types 'make tests' or 'make check', but only programs in TEST_PROG, -# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed. -check-TESTS: test - -test _test: - @$(MAKE) build-check-s - @$(MAKE) build-check-p - -# Actual execution of check-s. -build-check-s: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s - @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ - echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH) - -# The dummy.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \ - tname=$(@:.chkexe_=)$(EXEEXT);\ - log=$(@:.chkexe_=.chklog); \ - echo "============================"; \ - if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\ - else \ - echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ - echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - srcdir="$(srcdir)" \ - $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $(@:.chkexe_=.chkexe) || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - fi - -# The dummysh.chkexe here prevents the target from being -# empty if there are no tests in the current directory. -# $${log} is the log file. -# $${tname} is the name of test. -$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_: - @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \ - cmd=$(@:.chkexe_=);\ - tname=`basename $$cmd`;\ - chkname=`basename $(@:.chkexe_=.chkexe)`;\ - log=`basename $(@:.chkexe_=.chklog)`; \ - echo "============================"; \ - if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \ - echo "No need to test $${tname} again."; \ - else \ - echo "============================" > $${log}; \ - if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \ - echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - else \ - echo "Testing $${tname} $(TEST_FLAGS)"; \ - echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ - fi; \ - echo "============================" >> $${log}; \ - RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \ - srcdir="$(srcdir)" \ - $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \ - && touch $${chkname} || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - (cat $${log} && false) || exit 1; \ - echo "" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ - echo "============================" >> $${log}; \ - echo "Finished testing $${tname} $(TEST_FLAGS)"; \ - cat $${log}; \ - fi; \ - echo "============================"; \ - fi - -# Actual execution of check-p. -build-check-p: $(LIB) $(PROGS) $(chk_TESTS) - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ - fi - @if test -n "$(TEST_PROG_PARA)"; then \ - echo "**** Hint ****"; \ - echo "Parallel test files reside in the current directory" \ - "by default."; \ - echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \ - echo " HDF5_PARAPREFIX=/PFS/user/me"; \ - echo " export HDF5_PARAPREFIX"; \ - echo " make check"; \ - echo "**** end of Hint ****"; \ - fi - @for test in $(TEST_PROG_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \ - RUNEXEC="$(RUNPARALLEL)" || exit 1; \ - fi; \ - done - @for test in $(TEST_SCRIPT_PARA) dummy; do \ - if test $$test != dummy; then \ - $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \ - fi; \ - done - @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ - echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ - fi - -# Run test with different Virtual File Driver -check-vfd: $(LIB) $(PROGS) $(chk_TESTS) - @for vfd in $(VFD_LIST) dummy; do \ - if test $$vfd != dummy; then \ - echo "============================"; \ - echo "Testing Virtual File Driver $$vfd"; \ - echo "============================"; \ - $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ - HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ - fi; \ - done - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: -- cgit v0.12 From d3c6b4ad7244f46c863d47f630e1c9b0427abed5 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 21 Sep 2015 19:21:18 -0500 Subject: [svn-r27848] Description: Clean up warnings and some normalization against trunk. Tested: McaOSX/64 10.10.5 (amazon) w/serial & parallel (h5committest not required on this branch) --- src/H5Shyper.c | 1 - src/H5Sselect.c | 2 +- test/h5test.c | 4 +-- tools/h5diff/testh5diff.sh.in | 72 +++++++++++++++++++++---------------------- tools/h5ls/h5ls.c | 2 +- tools/h5repack/h5repack.sh.in | 26 ++++++++-------- tools/lib/h5tools_dump.c | 45 +++++++++++++-------------- tools/lib/h5tools_error.h | 2 +- tools/lib/h5tools_str.c | 29 +++++++++-------- 9 files changed, 89 insertions(+), 94 deletions(-) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index f0ec40d..1a4e4f5 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -1893,7 +1893,6 @@ H5S_get_select_hyper_nblocks(H5S_t *space) else ret_value = H5S_hyper_span_nblocks(space->select.sel_info.hslab->span_lst); -done: FUNC_LEAVE_NOAPI(ret_value) } /* H5S_get_select_hyper_nblocks() */ diff --git a/src/H5Sselect.c b/src/H5Sselect.c index cf82af1..11267b6 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -457,7 +457,7 @@ H5S_select_deserialize(H5S_t **space, const uint8_t **p) uint32_t sel_type; /* Pointer to the selection type */ uint32_t version; /* Version number */ uint8_t flags = 0; /* Flags */ - herr_t ret_value = FAIL; /* return value */ + herr_t ret_value = FAIL; /* Return value */ FUNC_ENTER_NOAPI(FAIL) diff --git a/test/h5test.c b/test/h5test.c index f16b98f..843ec35 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -123,7 +123,7 @@ h5_errors(hid_t estack, void H5_ATTR_UNUSED *client_data) return 0; } - + /*------------------------------------------------------------------------- * Function: h5_clean_files * @@ -191,7 +191,7 @@ h5_clean_files(const char *base_name[], hid_t fapl) return; } /* end h5_clean_files() */ - + /*------------------------------------------------------------------------- * Function: h5_cleanup * diff --git a/tools/h5diff/testh5diff.sh.in b/tools/h5diff/testh5diff.sh.in index 07fa7ba..fec6035 100644 --- a/tools/h5diff/testh5diff.sh.in +++ b/tools/h5diff/testh5diff.sh.in @@ -385,23 +385,23 @@ CLEAN_TESTFILES_AND_TESTDIR() while [ $# -gt 0 ]; do case "$1" in -p) # reset the tool name and bin to run ph5diff tests - TESTNAME=ph5diff - H5DIFF=ph5diff # The tool name - H5DIFF_BIN=`pwd`/$H5DIFF - pmode=yes - shift - ;; + TESTNAME=ph5diff + H5DIFF=ph5diff # The tool name + H5DIFF_BIN=`pwd`/$H5DIFF + pmode=yes + shift + ;; -h) # print help page - echo "$0 [-p] [-h]" - echo " -p run ph5diff tests" - echo " -h print help page" - shift - exit 0 - ;; + echo "$0 [-p] [-h]" + echo " -p run ph5diff tests" + echo " -h print help page" + shift + exit 0 + ;; *) # unknown option echo "$0: Unknown option ($1)" - exit 1 - ;; + exit 1 + ;; esac done @@ -452,11 +452,11 @@ TOOLTEST() { # Run test. TESTING $H5DIFF $@ ( - #echo "#############################" - #echo "Expected output for '$H5DIFF $@'" - #echo "#############################" - cd $TESTDIR - eval $RUNCMD $H5DIFF_BIN "$@" + #echo "#############################" + #echo "Expected output for '$H5DIFF $@'" + #echo "#############################" + cd $TESTDIR + eval $RUNCMD $H5DIFF_BIN "$@" ) >$actual 2>$actual_err EXIT_CODE=$? # save actual and actual_err in case they are needed later. @@ -485,7 +485,7 @@ TOOLTEST() { nerrors="`expr $nerrors + 1`" test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' else - # parallel mode output are often of different ordering from serial + # parallel mode output are often of different ordering from serial # output. If the sorted expected and actual files compare the same, # it is safe to assume the actual output match the expected file. expect_sorted=expect_sorted @@ -496,22 +496,22 @@ TOOLTEST() { # is done by serial mode. grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit mv $expect_sorted.noexit $expect_sorted - if $CMP $expect_sorted $actual_sorted; then - echo " PASSED" - else - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - if test yes = "$verbose"; then - echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)" - $DIFF $expect_sorted $actual_sorted |sed 's/^/ /' - echo "====The actual output ($actual_sav)" - sed 's/^/ /' < $actual_sav - echo "====The actual stderr ($actual_err_sav)" - sed 's/^/ /' < $actual_err_sav - echo "====End of actual stderr ($actual_err_sav)" - echo "" - fi - fi + if $CMP $expect_sorted $actual_sorted; then + echo " PASSED" + else + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + if test yes = "$verbose"; then + echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)" + $DIFF $expect_sorted $actual_sorted |sed 's/^/ /' + echo "====The actual output ($actual_sav)" + sed 's/^/ /' < $actual_sav + echo "====The actual stderr ($actual_err_sav)" + sed 's/^/ /' < $actual_err_sav + echo "====End of actual stderr ($actual_err_sav)" + echo "" + fi + fi fi # Clean up output file diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index f291958..cce5f3d 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1759,7 +1759,6 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name) size_t cd_nelmts; /* filter client number of values */ size_t cd_num; /* filter client data counter */ char f_name[256]; /* filter/file name */ - char dset_name[256]; /* filter/file name */ char s[64]; /* temporary string buffer */ off_t f_offset; /* offset in external file */ hsize_t f_size; /* bytes used in external file */ @@ -1850,6 +1849,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name) case H5D_VIRTUAL: { + char dset_name[256]; /* Dataset name */ size_t vmaps; H5Pget_virtual_count(dcpl, &vmaps); diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index 478ca36..24298d0 100644 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -171,7 +171,7 @@ COPY_TESTFILES_TO_TESTDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR + $CP -f $tstfile $TESTDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." @@ -469,11 +469,11 @@ TOOLTEST1() ) RET=$? if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" else - echo " PASSED" - DIFFTEST $infile $outfile + echo " PASSED" + DIFFTEST $infile $outfile fi rm -f $outfile } @@ -500,11 +500,11 @@ TOOLTESTV() ) >$actual 2>$actual_err RET=$? if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" else - echo " PASSED" - DIFFTEST $infile $outfile + echo " PASSED" + DIFFTEST $infile $outfile fi # display output compare @@ -634,11 +634,11 @@ TOOLTEST_META() # verify sizes. MESSAGE "Verify the sizes of both output files ($size1 vs $size2)" if [ $size1 -lt $size2 ]; then - # pass - echo " PASSED" + # pass + echo " PASSED" else - #fail - echo "*FAILED*" + #fail + echo "*FAILED*" nerrors="`expr $nerrors + 1`" fi diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 7928dfb..0d39981 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -225,13 +225,12 @@ void h5tools_print_dims(h5tools_str_t *buffer, hsize_t *s, int dims); void h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, struct subset_t *sset, int dims); -void h5tools_print_virtual_selection(hid_t vspace, hid_t dcpl_id, size_t index, +static void h5tools_print_virtual_selection(hid_t vspace, FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx/*in,out*/, h5tools_str_t *buffer/*string into which to render */, hsize_t *curr_pos/*total data element position*/, - size_t ncols, hsize_t region_elmt_counter/*element counter*/, - hsize_t elmt_counter); + size_t ncols); void h5tools_dump_init(void) @@ -820,10 +819,11 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, HDassert(cur_ctx); HDassert(buffer); HDassert(ptdata); + HDassert(ndims > 0); HDmemset(&ctx, 0, sizeof(ctx)); /* Allocate space for the dimension array */ - if((dims1 = (hsize_t *) HDmalloc(sizeof(hsize_t) * ndims)) == NULL) + if((dims1 = (hsize_t *) HDmalloc(sizeof(hsize_t) * (size_t)ndims)) == NULL) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for dims"); dims1[0] = npoints; @@ -2871,19 +2871,18 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, * Return: void *------------------------------------------------------------------------- */ -void -h5tools_print_virtual_selection(hid_t vspace, hid_t dcpl_id, size_t index, +static void +h5tools_print_virtual_selection(hid_t vspace, FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx/*in,out*/, h5tools_str_t *buffer/*string into which to render */, hsize_t *curr_pos/*total data element position*/, - size_t ncols, hsize_t region_elmt_counter/*element counter*/, - hsize_t elmt_counter) + size_t ncols) { switch(H5Sget_select_type(vspace)) { case H5S_SEL_NONE: /* Nothing selected */ ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0); h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s", VDS_NONE); @@ -2896,7 +2895,7 @@ h5tools_print_virtual_selection(hid_t vspace, hid_t dcpl_id, size_t index, break; case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */ ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0); h5tools_str_reset(buffer); if (H5Sis_regular_hyperslab(vspace)) { @@ -2911,7 +2910,7 @@ h5tools_print_virtual_selection(hid_t vspace, hid_t dcpl_id, size_t index, h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->indent_level++; ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0); h5tools_str_reset(buffer); h5tools_str_dump_space_blocks(buffer, vspace, info); @@ -2919,14 +2918,14 @@ h5tools_print_virtual_selection(hid_t vspace, hid_t dcpl_id, size_t index, } h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0); h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_ALL: /* Entire extent selected */ ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0); h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s", VDS_ALL); @@ -2997,7 +2996,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, off_t offset; /* offset of external file */ char f_name[256]; /* filter name */ char name[256]; /* external or virtual file name */ - char dsetname[256]; /* virtual datset name */ hsize_t chsize[64]; /* chunk size in elements */ hsize_t size; /* size of external file */ hsize_t storage_size; @@ -3190,6 +3188,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, case H5D_VIRTUAL: { + char dsetname[256]; /* virtual datset name */ size_t vmaps; H5Pget_virtual_count(dcpl_id, &vmaps); @@ -3221,7 +3220,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; - h5tools_print_virtual_selection(virtual_vspace, dcpl_id, next, stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + h5tools_print_virtual_selection(virtual_vspace, stream, info, ctx, &buffer, &curr_pos, (size_t) ncols); ctx->indent_level--; @@ -3242,8 +3241,12 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; ssize_out = H5Pget_virtual_filename(dcpl_id, next, NULL, 0); + HDassert(ssize_out > 0); + HDassert((size_t)ssize_out < sizeof(name)); H5Pget_virtual_filename(dcpl_id, next, name, sizeof(name)); ssize_out = H5Pget_virtual_dsetname(dcpl_id, next, NULL, 0); + HDassert(ssize_out > 0); + HDassert((size_t)ssize_out < sizeof(name)); H5Pget_virtual_dsetname(dcpl_id, next, dsetname, sizeof(dsetname)); ctx->need_prefix = TRUE; @@ -3264,7 +3267,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnameend); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - h5tools_print_virtual_selection(virtual_srcspace, dcpl_id, next, stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + h5tools_print_virtual_selection(virtual_srcspace, stream, info, ctx, &buffer, &curr_pos, (size_t) ncols); ctx->indent_level--; @@ -3324,8 +3327,8 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts, cd_values, sizeof(f_name), f_name, NULL); - if (filtn < 0) - continue; /* nothing to print for invalid filter */ + if(filtn < 0) + continue; /* nothing to print for invalid filter */ ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); @@ -3417,12 +3420,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); break; default: - /* filters do not have to be available for showing registered filter info. - see HDFFV-8346 for details. --xcao@hdfgroup.org - if(H5Zfilter_avail(filtn)) - h5tools_str_append(&buffer, "%s %s", "USER_REGISTERED_FILTER", BEGIN); - else - */ h5tools_str_append(&buffer, "%s %s", "USER_DEFINED_FILTER", BEGIN); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h index ae549fd..749157e 100644 --- a/tools/lib/h5tools_error.h +++ b/tools/lib/h5tools_error.h @@ -98,7 +98,7 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g; * to the `catch_except' label, if we're not already past it. */ #define H5E_THROW(fail_value, min_id, str) { \ - HERROR(H5E_tools_g, min_id, str); \ + H5Epush2(H5tools_ERR_STACK_g, __FILE__, FUNC, __LINE__, H5tools_ERR_CLS_g, H5E_tools_g, min_id, str); \ H5_LEAVE(fail_value) \ } diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index c10f33b..bdb82a4 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -1456,23 +1456,22 @@ h5tools_str_is_zero(const void *_mem, size_t size) char * h5tools_str_replace ( const char *string, const char *substr, const char *replacement ) { - char *tok = NULL; - char *newstr = NULL; - char *oldstr = NULL; - char *head = NULL; - - if ( substr == NULL || replacement == NULL ) - return HDstrdup (string); - - newstr = HDstrdup (string); - head = newstr; - while ( (tok = HDstrstr ( head, substr ))){ - oldstr = newstr; - newstr = (char *)HDmalloc( HDstrlen( oldstr ) - HDstrlen( substr ) + HDstrlen( replacement ) + 1 ); + char *tok = NULL; + char *newstr = NULL; + char *oldstr = NULL; + char *head = NULL; + + if ( substr == NULL || replacement == NULL ) + return HDstrdup (string); + newstr = HDstrdup (string); + head = newstr; + while ( (tok = HDstrstr ( head, substr ))){ + oldstr = newstr; + newstr = (char *)HDmalloc( HDstrlen( oldstr ) - HDstrlen( substr ) + HDstrlen( replacement ) + 1 ); if ( newstr == NULL ){ - HDfree (oldstr); - return NULL; + HDfree (oldstr); + return NULL; } HDmemcpy ( newstr, oldstr, tok - oldstr ); HDmemcpy ( newstr + (tok - oldstr), replacement, HDstrlen ( replacement ) ); -- cgit v0.12 From 10837a2a28d0fd2a1ece51f89af286bafd20204a Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 25 Sep 2015 11:29:02 -0500 Subject: [svn-r27876] Description: Make virtual layout return to the property list occur in all cases, even on failure. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel (h5committest not needed on this branch) --- src/H5Pdcpl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 5a0e32f..b1ddff0 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -2251,14 +2251,15 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, /* Finish adding entry */ virtual_layout.storage.u.virt.list_nused++; +done: /* Set VDS layout information in property list */ + /* (Even on faliure, so there's not a mangled layout struct in the list) */ if(H5P_poke(plist, H5D_CRT_LAYOUT_NAME, &virtual_layout) < 0) { HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout") if(old_list != virtual_layout.storage.u.virt.list) free_list = TRUE; } /* end if */ -done: /* Check if the entry has been partly allocated but not added to the * property list or not included in list_nused */ if(ret_value < 0) { -- cgit v0.12 From dbdc9c1e2bd319e67659303c4d2b3e4c8eff5b07 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 25 Sep 2015 16:48:11 -0500 Subject: [svn-r27879] Move property list shutdown earlier in H5_term_library, since with VDS layout it needs to call into the H5D package. Tested: ummon --- src/H5.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/H5.c b/src/H5.c index 1bb75ad..33ac340 100644 --- a/src/H5.c +++ b/src/H5.c @@ -284,12 +284,12 @@ H5_term_library(void) n) : n)) do { - pending = 0; + pending = 0; /* Try to organize these so the "higher" level components get shut * down before "lower" level components that they might rely on. -QAK */ - pending += DOWN(L); + pending += DOWN(L); /* Close the "top" of various interfaces (IDs, etc) but don't shut * down the whole interface yet, so that the object header messages @@ -300,7 +300,7 @@ H5_term_library(void) pending += DOWN(A_top); pending += DOWN(D_top); pending += DOWN(G_top); - pending += DOWN(R_top); + pending += DOWN(R_top); pending += DOWN(S_top); pending += DOWN(T_top); @@ -308,6 +308,11 @@ H5_term_library(void) if(pending == 0) pending += DOWN(F); + /* Don't shut down the property list code until all objects that might + * use property lists are shut down */ + if(pending == 0) + pending += DOWN(P); + /* Wait to shut down the "bottom" of various interfaces until the * files are closed, so pieces of the file can be serialized * correctly. @@ -333,7 +338,6 @@ H5_term_library(void) if(pending == 0) { pending += DOWN(AC); pending += DOWN(Z); - pending += DOWN(P); pending += DOWN(FD); pending += DOWN(PL); /* Don't shut down the error code until other APIs which use it are shut down */ -- cgit v0.12 From 574ff3980afe62f83660cb2c617154e85ab128fd Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 26 Sep 2015 20:28:39 -0500 Subject: [svn-r27885] Description: Check if the layout has been retrieved before setting it again. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel (h5committest not required on this branch) --- src/H5Pdcpl.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index b1ddff0..f3acfe2 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -2133,6 +2133,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, H5S_t *src_space; /* Source dataset space selection */ H5O_storage_virtual_ent_t *old_list = NULL; /* List pointer previously on property list */ H5O_storage_virtual_ent_t *ent = NULL; /* Convenience pointer to new VDS entry */ + hbool_t retrieved_layout = FALSE; /* Whether the layout has been retrieved */ hbool_t adding_entry = FALSE; /* Whether we are in the middle of adding an entry */ hbool_t free_list = FALSE; /* Whether to free the list of virtual entries */ herr_t ret_value = SUCCEED; /* Return value */ @@ -2171,6 +2172,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, /* Get the current layout */ if(H5P_peek(plist, H5D_CRT_LAYOUT_NAME, &virtual_layout) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get layout") + retrieved_layout = TRUE; /* If the layout was not already virtual, Start with default virtual layout. * Otherwise, add the mapping to the current list. */ @@ -2254,10 +2256,12 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, done: /* Set VDS layout information in property list */ /* (Even on faliure, so there's not a mangled layout struct in the list) */ - if(H5P_poke(plist, H5D_CRT_LAYOUT_NAME, &virtual_layout) < 0) { - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout") - if(old_list != virtual_layout.storage.u.virt.list) - free_list = TRUE; + if(retrieved_layout) { + if(H5P_poke(plist, H5D_CRT_LAYOUT_NAME, &virtual_layout) < 0) { + HDONE_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout") + if(old_list != virtual_layout.storage.u.virt.list) + free_list = TRUE; + } /* end if */ } /* end if */ /* Check if the entry has been partly allocated but not added to the -- cgit v0.12 From 5c0a8cc86ebe85e1b46e20f253f09c86bdc83169 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Tue, 29 Sep 2015 13:56:27 -0500 Subject: [svn-r27912] Revert of r27887, which caused failures in the vds test. These changes will be merged more carefully so we can more easily identify any errors that arise. Tested on: Ubuntu 15.04 (Linux 3.19 x86_64) w/ gcc 4.9.2 serial and parallel (w/ MPICH 3.1.4) --- CMakeLists.txt | 4 -- autogen.sh | 58 ++++++++++----------- config/cmake/HDF5_Examples.cmake.in | 70 ++++++++------------------ config/cmake/README.txt.cmake.in | 33 ++++-------- release_docs/USING_CMake_Examples.txt | 57 +++++++++++---------- src/CMakeLists.txt | 12 ++--- src/H5S.c | 40 +++++++-------- src/H5Sall.c | 18 +++---- src/H5Shyper.c | 94 +++++++++++++++-------------------- src/H5Snone.c | 16 ++---- src/H5Spoint.c | 51 ++++++++----------- 11 files changed, 176 insertions(+), 277 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1035142..96d5772 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -212,10 +212,6 @@ if (NOT HDF5_INSTALL_DATA_DIR) endif (NOT WIN32) endif (NOT HDF5_INSTALL_DATA_DIR) -if(DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}") - set (CMAKE_PREFIX_PATH ${ADDITIONAL_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH}) -endif(DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}") - #----------------------------------------------------------------------------- # parse the full version number from H5public.h and include in H5_VERS_INFO #----------------------------------------------------------------------------- diff --git a/autogen.sh b/autogen.sh index d76c016..237e1b1 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /bin/sh # # Copyright by The HDF Group. # All rights reserved. @@ -60,7 +60,7 @@ # # This script takes two potential options: # -# -p +# -p, --production # # When this is selected, the autotools versions are set to the paths # and versions used by The HDF Group to produce the released versions @@ -70,7 +70,7 @@ # to have recent versions of the autotools this option will probably # be removed. # -# -v +# -v, --verbose # # This emits some extra information, mainly tool versions. @@ -89,19 +89,33 @@ verbose=false optspec=":hpv-" while getopts "$optspec" optchar; do case "${optchar}" in + -) + case "${OPTARG}" in + production) + echo "Setting production mode..." + echo + production=true + ;; + verbose) + echo "Setting verbosity: high" + echo + verbose=true + ;; + *) + if [ "$OPTERR" = 1 ] && [ "${optspec:0:1}" != ":" ]; then + echo "Unknown option --${OPTARG}" >&2 + fi + ;; + esac;; h) - echo "usage: $0 [OPTIONS]" - echo - echo " -h Print this help message." + echo "usage: $0 [-p|--production]" echo echo " -p Used by THG to ensure that particular versions" echo " of the autotools are used and hard-codes" echo " autotools paths to THG machines. Not for" echo " non-HDF-Group users!" echo - echo " -v Show more verbose output." - echo - echo " NOTE: Each tool can be set via an environment variable." + echo " NOTE: Each autotool can be set via an environment variable." echo " These are documented inside this autogen.sh script." echo exit 0 @@ -382,37 +396,15 @@ bin/make_overflow src/H5overflow.txt || exit 1 # to install a later version of bison. See the OS X note at the top # of this script. echo -echo "Generating H5LT parser code (requires yacc/bison):" -echo "Generate hl/src/H5LTparse.c from hl/src/H5LTparse.y" -# HDF5_BISON is set via the environment or 'which bison', above -if test -z ${HDF5_BISON}; then - echo - echo "*************************" - echo " ERROR - bison not found" - echo "*************************" - echo "bison is required to generate parser code in H5LT" - echo - exit 127 -fi +echo "Running flex/bison:" cd hl/src +echo "Generate hl/src/H5LTparse.c from hl/src/H5LTparse.y" if [ "$verbose" = true ] ; then ${HDF5_BISON} --version fi ${HDF5_BISON} -pH5LTyy -o H5LTparse.c -d H5LTparse.y -echo -echo "Generating H5LT lexer code (requires lex/flex):" echo "Generate hl/src/H5LTanalyze.c from hl/src/H5LTanalyze.l" -# HDF5_FLEX is set via the environment or 'which flex', above -if test -z ${HDF5_FLEX}; then - echo - echo "************************" - echo " ERROR - flex not found" - echo "************************" - echo "flex is required to generate lexer code in H5LT" - echo - exit 127 -fi if [ "$verbose" = true ] ; then ${HDF5_FLEX} --version fi diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index 65e2e9e..d0c0509 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -1,48 +1,20 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) ############################################################################################################### -# This script will build and run the examples from a folder +# This script will build and run the examples from a compressed file # Execute from a command line: -# ctest -S HDF5_Examples.cmake,OPTION=VALUE -C Release -V -O test.log +# ctest -S HDF5_Examples.cmake,HDF5Examples -C Release -V -O test.log ############################################################################################################### +set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(STATICLIBRARIES "@H5_ENABLE_STATIC_LIB@") +set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG}) set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) +set(CTEST_BUILD_CONFIGURATION "Release") +#set(NO_MAC_FORTRAN "true") #set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") - -# handle input parameters to script. -#INSTALLDIR - HDF5 root folder -#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo -#CTEST_SOURCE_NAME - name of source folder; HDF4Examples -#STATICLIBRARIES - Default is YES -#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac) -if(DEFINED CTEST_SCRIPT_ARG) - # transform ctest script arguments of the form - # script.ctest,var1=value1,var2=value2 - # to variables with the respective names set to the respective values - string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}") - foreach(current_var ${script_args}) - if ("${current_var}" MATCHES "^([^=]+)=(.+)$") - set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") - endif() - endforeach() -endif() -if(NOT DEFINED INSTALLDIR) - set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") -endif() -if(NOT DEFINED CTEST_BUILD_CONFIGURATION) - set(CTEST_BUILD_CONFIGURATION "Release") -endif() -if(NOT DEFINED CTEST_SOURCE_NAME) - set(CTEST_SOURCE_NAME "HDF5Examples") -endif() -if(NOT DEFINED STATICLIBRARIES) - set(STATICLIBRARIES "YES") -endif() - -#TAR_SOURCE - name of tarfile -#if(NOT DEFINED TAR_SOURCE) -# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.1-Source") -#endif() +set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON") +#set(CTEST_USE_TAR_SOURCE "${CTEST_SCRIPT_ARG}") ############################################################################################################### # Adjust the following SET Commands as needed @@ -70,7 +42,7 @@ endif(WIN32) # For any comments please contact cdashhelp@hdfgroup.org # ############################################################################################################### - + #----------------------------------------------------------------------------- # MAC machines need special option #----------------------------------------------------------------------------- @@ -81,14 +53,14 @@ if(APPLE) set(ENV{CC} "${XCODE_CC}") set(ENV{CXX} "${XCODE_CXX}") if(NOT NO_MAC_FORTRAN) - # Shared fortran is not supported, build static + # Shared fortran is not supported, build static set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") else(NOT NO_MAC_FORTRAN) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") endif(NOT NO_MAC_FORTRAN) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") endif(APPLE) - + #----------------------------------------------------------------------------- set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") ## -------------------------- @@ -97,19 +69,19 @@ if(CTEST_USE_TAR_SOURCE) ## -------------------------- if(WIN32) message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]") - execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv) - else() + execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv) + else(WIN32) message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]") - execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv) - endif() - + execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv) + endif(WIN32) + if(NOT rv EQUAL 0) message(STATUS "extracting... [error-(${rv}) clean up]") file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}") message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed") endif(NOT rv EQUAL 0) endif(CTEST_USE_TAR_SOURCE) - + #----------------------------------------------------------------------------- ## Clear the build directory ## -------------------------- @@ -132,11 +104,11 @@ endif() set (CTEST_CONFIGURE_COMMAND "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"" ) - + #----------------------------------------------------------------------------- ## -- set output to english set($ENV{LC_MESSAGES} "en_EN") - + #----------------------------------------------------------------------------- configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake) ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}") @@ -150,5 +122,5 @@ if(res GREATER 0) message (FATAL_ERROR "tests FAILED") endif(res GREATER 0) #----------------------------------------------------------------------------- -############################################################################################################## +############################################################################################################## message(STATUS "DONE") \ No newline at end of file diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in index ec40abe..a12c5aa 100644 --- a/config/cmake/README.txt.cmake.in +++ b/config/cmake/README.txt.cmake.in @@ -1,11 +1,11 @@ @HDF5_PACKAGE_NAME@ version @HDF5_PACKAGE_VERSION_STRING@ ------------------------------------------------------------------------------ -This directory contains the binary (release) distribution of +This directory contains the binary (release) distribution of @HDF5_PACKAGE_NAME@ @HDF5_PACKAGE_VERSION_MAJOR@ that was compiled on; - @BINARY_PLATFORM@. + @BINARY_PLATFORM@. -It was built with the following options: +It was built with the following options: -- @LIB_TYPE@ C/C++/Fortran libraries -- SZIP (encoder enabled) and ZLIB -- @LIB_TYPE@ HDF5 tools @@ -24,38 +24,27 @@ Installation After Installation =========================================================================== -The examples folder, HDF5Examples, located in the +The examples folder, HDF5Examples, located in the HDF5 install folder, can be built and tested with CMake and the supplied HDF5_Examples.cmake file. The HDF5_Examples.cmake expects HDF5 to have -been installed in the default location with above compilers. Also, the CMake +been installed in the default location with above compilers. Also, the CMake utility should be installed. To test the installation with the examples; Create a directory to run the examples. Copy HDF5Examples folder to this directory. Copy HDF5_Examples.cmake to this directory. - The default source folder is defined as "HDF5Examples". It can be changed - with the CTEST_SOURCE_NAME script option. - The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@". - It can be changed with the INSTALLDIR script option. - The default ctest configuration is defined as "Release". It can be changed - with the CTEST_BUILD_CONFIGURATION script option. Note that this must - be the same as the value used with the -C command line option. - The default build configuration is defined to build and use static libraries. - Shared libraries can be used with the STATICLIBRARIES script option set to "NO". - Other options can be changed by editing the HDF5_Examples.cmake file. - - If the defaults are okay, execute from this directory: - ctest -S HDF5_Examples.cmake -C Release -V -O test.log - If the defaults need change, execute from this directory: - ctest -S HDF5_Examples.cmake,CTEST_SOURCE_NAME=MyExamples,INSTALLDIR=MyLocation -C Release -V -O test.log + Edit HDF5_Examples.cmake line 8 to set INSTALLDIR to where HDF5 is installed. + (The default should be correct unless you installed into a different folder.) + Execute from this directory: + ctest -S HDF5_Examples.cmake,HDF5Examples -C Release -V -O test.log When executed, the ctest script will save the results to the log file, test.log, as -indicated by the ctest command. If you wish the to see more build and test information, +indicated by the ctest command. If you wish the to see more build and test information, add "-VV" to the ctest command. The output should show; 100% tests passed, 0 tests failed out of 156. -For more information see USING_CMake_Examples.txt in the install folder. +For more information see USING_CMake_Examples.txt in the install folder. =========================================================================== Documentation for this release can be found at the following URL: diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt index a6854ae..d52a719 100644 --- a/release_docs/USING_CMake_Examples.txt +++ b/release_docs/USING_CMake_Examples.txt @@ -28,8 +28,8 @@ I. Preconditions the HDF Install Utility (the *.msi file in the binary package for Windows or the *.sh on Linux). If you are using a Windows platform, you can obtain a pre-built Windows binary from The HDF Group's website - at www.hdfgroup.org. - + at www.hdfgroup.org. See Section "III. Common changes to the + HDF518_Examples.cmake file", for the line to change the location. ======================================================================== @@ -37,41 +37,40 @@ II. Building HDF5 Examples with CMake ======================================================================== Files in the HDF5 install directory: - HDF5Examples folder + HDF5Examples-0.1.1-Source folder HDF518_Examples.cmake Default installation process: Create a directory to run the examples, i.e. \test_hdf5. - Copy HDF5Examples folder to this directory. - Copy HDF5_Examples.cmake to this directory. - The default source folder is defined as "HDF5Examples". It can be changed - with the CTEST_SOURCE_NAME script option. - The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@". - It can be changed with the INSTALLDIR script option. - The default ctest configuration is defined as "Release". It can be changed - with the CTEST_BUILD_CONFIGURATION script option. Note that this must - be the same as the value used with the -C command line option. - The default build configuration is defined to build and use static libraries. - Shared libraries can be used with the STATICLIBRARIES script option set to "NO". - Other options can be changed by editing the HDF5_Examples.cmake file. - - If the defaults are okay, execute from this directory: - ctest -S HDF5_Examples.cmake -C Release -V -O test.log - If the defaults need change, execute from this directory: - ctest -S HDF5_Examples.cmake,CTEST_SOURCE_NAME=MyExamples,INSTALLDIR=MyLocation -C Release -V -O test.log - - When executed, the ctest script will save the results to the log file, test.log, as - indicated by the ctest command. If you wish the to see more build and test information, - add "-VV" to the ctest command. The output should show; - 100% tests passed, 0 tests failed out of 156. + Copy HDF5Examples-0.1.1-Source folder to this directory. + Copy HDF518_Examples.cmake to this directory. + Edit line 8 of the HDF518_Examples.cmake file and change the INSTALLDIR + to the HDF5 install location. + + Execute from this directory: + ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log + +The script will use the examples folder HDF5Examples-0.1.1-Source, + and create a build directory inside the HDF5Examples-0.1.1-Source directory. + It will then configure, build, and execute the examples. All the log files + will be found under the build\Testing\Temporary directory, check these for + errors. + +The amount of script information can be increased by adding -V to the ctest + command. Even more information can be shown by adding -VV instead of -V. ======================================================================== -III. Other changes to the HDF518_Examples.cmake file +III. Common changes to the HDF518_Examples.cmake file ======================================================================== -Line 10: uncomment to build and test Fortran examples. +Line 8: change the INSTALLDIR to a different HDF5 install location. + +Line 14: uncomment to allow Mac machines to build shared examples. + +Line 15: uncomment to build and test Fortran examples. + +Line 16: comment to NOT build and test Fortran examples with F2003 option. -Line 43-45: uncomment to use a source tarball or zipfile; - Add script option "TAR_SOURCE=MySource.tar". +Line 17: uncomment to use a compressed source file. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6253f51..ff69d5e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -820,11 +820,6 @@ if (HDF5_GENERATE_HEADERS) endif (PERL_FOUND) endif (HDF5_GENERATE_HEADERS) -set (H5_PUBLIC_GENERATED_HEADERS - ${HDF5_SRC_DIR}/H5version.h - ${HDF5_SRC_DIR}/H5overflow.h -) - #----------------------------------------------------------------------------- # Setup the H5Detect utility which generates H5Tinit with platform # specific type checks inside @@ -837,7 +832,7 @@ endif (MSVC OR MINGW) if (HDF5_GENERATE_HEADERS) add_dependencies(H5detect generate_precompiled) else (HDF5_GENERATE_HEADERS) - add_dependencies(H5detect "${H5_PUBLIC_GENERATED_HEADERS}") + add_dependencies(H5detect "${HDF5_SRC_DIR}/H5version.h;${HDF5_SRC_DIR}/H5overflow.h") endif (HDF5_GENERATE_HEADERS) set (CMD $) @@ -856,7 +851,7 @@ endif (MSVC OR MINGW) if (HDF5_GENERATE_HEADERS) add_dependencies(H5detect generate_precompiled) else (HDF5_GENERATE_HEADERS) - add_dependencies(H5make_libsettings "${H5_PUBLIC_GENERATED_HEADERS}") + add_dependencies(H5make_libsettings "${HDF5_SRC_DIR}/H5version.h;${HDF5_SRC_DIR}/H5overflow.h") endif (HDF5_GENERATE_HEADERS) set (CMD $) @@ -905,7 +900,7 @@ endif (HDF5_ENABLE_DEBUG_APIS) set (install_targets ${HDF5_LIB_TARGET}) if (BUILD_SHARED_LIBS) - add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) + add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS}) TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS}) if (NOT WIN32) @@ -950,7 +945,6 @@ if (NOT HDF5_INSTALL_NO_DEVELOPMENT) install ( FILES ${H5_PUBLIC_HEADERS} - ${H5_PUBLIC_GENERATED_HEADERS} DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} COMPONENT diff --git a/src/H5S.c b/src/H5S.c index af7d395..1d07f14 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -1576,12 +1576,11 @@ done: herr_t H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) { - H5F_t *f = NULL; /* Fake file structure*/ - unsigned char *pp = (*p); /* Local pointer for decoding */ size_t extent_size; /* Size of serialized dataspace extent */ hssize_t sselect_size; /* Signed size of serialized dataspace selection */ size_t select_size; /* Size of serialized dataspace selection */ - herr_t ret_value = SUCCEED; /* Return value */ + H5F_t *f = NULL; /* Fake file structure*/ + herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -1600,28 +1599,27 @@ H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) /* Verify the size of buffer. If it's not big enough, simply return the * right size without filling the buffer. */ - if(!pp || *nalloc < (extent_size + select_size + 1 + 1 + 1 + 4)) + if(!*p || *nalloc < (extent_size + select_size + 1 + 1 + 1 + 4)) *nalloc = extent_size + select_size + 1 + 1 + 1 + 4; else { /* Encode the type of the information */ - *pp++ = H5O_SDSPACE_ID; + *(*p)++ = H5O_SDSPACE_ID; /* Encode the version of the dataspace information */ - *pp++ = H5S_ENCODE_VERSION; + *(*p)++ = H5S_ENCODE_VERSION; /* Encode the "size of size" information */ - *pp++ = (unsigned char)H5F_SIZEOF_SIZE(f); + *(*p)++ = (unsigned char)H5F_SIZEOF_SIZE(f); /* Encode size of extent information. Pointer is actually moved in this macro. */ - UINT32ENCODE(pp, extent_size); + UINT32ENCODE(*p, extent_size); /* Encode the extent part of dataspace */ - if(H5O_msg_encode(f, H5O_SDSPACE_ID, TRUE, pp, obj) < 0) + if(H5O_msg_encode(f, H5O_SDSPACE_ID, TRUE, *p, obj) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode extent space") - pp += extent_size; + *p += extent_size; /* Encode the selection part of dataspace. */ - *p = pp; if(H5S_SELECT_SERIALIZE(obj, p) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode select space") } /* end else */ @@ -1694,39 +1692,38 @@ done: H5S_t* H5S_decode(const unsigned char **p) { - H5F_t *f = NULL; /* Fake file structure*/ - H5S_t *ds; /* Decoded dataspace */ - H5S_extent_t *extent; /* Entent of decoded dataspace */ - const unsigned char *pp = (*p); /* Local pointer for decoding */ + H5S_t *ds; + H5S_extent_t *extent; size_t extent_size; /* size of the extent message*/ + H5F_t *f = NULL; /* Fake file structure*/ uint8_t sizeof_size; /* 'Size of sizes' for file */ H5S_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT /* Decode the type of the information */ - if(*pp++ != H5O_SDSPACE_ID) + if(*(*p)++ != H5O_SDSPACE_ID) HGOTO_ERROR(H5E_DATASPACE, H5E_BADMESG, NULL, "not an encoded dataspace") /* Decode the version of the dataspace information */ - if(*pp++ != H5S_ENCODE_VERSION) + if(*(*p)++ != H5S_ENCODE_VERSION) HGOTO_ERROR(H5E_DATASPACE, H5E_VERSION, NULL, "unknown version of encoded dataspace") /* Decode the "size of size" information */ - sizeof_size = *pp++; + sizeof_size = *(*p)++; /* Allocate "fake" file structure */ if(NULL == (f = H5F_fake_alloc(sizeof_size))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate fake file struct") /* Decode size of extent information */ - UINT32DECODE(pp, extent_size); + UINT32DECODE(*p, extent_size); /* Decode the extent part of dataspace */ /* (pass mostly bogus file pointer and bogus DXPL) */ - if((extent = (H5S_extent_t *)H5O_msg_decode(f, H5P_DEFAULT, NULL, H5O_SDSPACE_ID, pp))==NULL) + if((extent = (H5S_extent_t *)H5O_msg_decode(f, H5P_DEFAULT, NULL, H5O_SDSPACE_ID, *p))==NULL) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode object") - pp += extent_size; + *p += extent_size; /* Copy the extent into dataspace structure */ if((ds = H5FL_CALLOC(H5S_t))==NULL) @@ -1742,7 +1739,6 @@ H5S_decode(const unsigned char **p) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection") /* Decode the select part of dataspace. I believe this part always exists. */ - *p = pp; if(H5S_SELECT_DESERIALIZE(&ds, p) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode space selection") diff --git a/src/H5Sall.c b/src/H5Sall.c index fb6b45f..79796c3 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -516,25 +516,19 @@ H5S_all_serial_size (const H5S_t H5_ATTR_UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_all_serialize(const H5S_t *space, uint8_t **p) +H5S_all_serialize (const H5S_t *space, uint8_t **p) { - uint8_t *pp = (*p); /* Local pointer for decoding */ - FUNC_ENTER_NOAPI_NOINIT_NOERR - /* Check args */ HDassert(space); HDassert(p); - HDassert(pp); + HDassert(*p); /* Store the preamble information */ - UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ - UINT32ENCODE(pp, (uint32_t)1); /* Store the version number */ - UINT32ENCODE(pp, (uint32_t)0); /* Store the un-used padding */ - UINT32ENCODE(pp, (uint32_t)0); /* Store the additional information length */ - - /* Update encoding pointer */ - *p = pp; + UINT32ENCODE(*p, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ + UINT32ENCODE(*p, (uint32_t)1); /* Store the version number */ + UINT32ENCODE(*p, (uint32_t)0); /* Store the un-used padding */ + UINT32ENCODE(*p, (uint32_t)0); /* Store the additional information length */ FUNC_LEAVE_NOAPI(SUCCEED) } /* H5S_all_serialize() */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 11e5369..1a4e4f5 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -2014,14 +2014,14 @@ H5S_hyper_serial_size(const H5S_t *space) PURPOSE Serialize the current selection into a user-provided buffer. USAGE - void H5S_hyper_serialize_helper(spans, start, end, rank, buf) + herr_t H5S_hyper_serialize_helper(spans, start, end, rank, buf) H5S_hyper_span_info_t *spans; IN: Hyperslab span tree to serialize hssize_t start[]; IN/OUT: Accumulated start points hssize_t end[]; IN/OUT: Accumulated end points hsize_t rank; IN: Current rank looking at uint8 *buf; OUT: Buffer to put serialized selection into RETURNS - + Non-negative on success/Negative on failure DESCRIPTION Serializes the current element selection into a buffer. (Primarily for storing on disk). @@ -2030,13 +2030,13 @@ H5S_hyper_serial_size(const H5S_t *space) EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -static void -H5S_hyper_serialize_helper(const H5S_hyper_span_info_t *spans, +static herr_t +H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start, hsize_t *end, hsize_t rank, uint8_t **p) { H5S_hyper_span_t *curr; /* Pointer to current hyperslab span */ - uint8_t *pp = (*p); /* Local pointer for decoding */ hsize_t u; /* Index variable */ + herr_t ret_value=SUCCEED; /* return value */ FUNC_ENTER_NOAPI_NOINIT @@ -2045,7 +2045,7 @@ H5S_hyper_serialize_helper(const H5S_hyper_span_info_t *spans, HDassert(start); HDassert(end); HDassert(rank < H5O_LAYOUT_NDIMS); - HDassert(p && pp); + HDassert(p && *p); /* Walk through the list of spans, recursing or outputing them */ curr=spans->head; @@ -2057,35 +2057,33 @@ H5S_hyper_serialize_helper(const H5S_hyper_span_info_t *spans, end[rank]=curr->high; /* Recurse down to the next dimension */ - *p = pp; - H5S_hyper_serialize_helper(curr->down, start, end, rank = 1, p); + if(H5S_hyper_serialize_helper(curr->down,start,end,rank+1,p)<0) + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans") } /* end if */ else { /* Encode all the previous dimensions starting & ending points */ /* Encode previous starting points */ for(u=0; ulow); + UINT32ENCODE(*p, (uint32_t)curr->low); /* Encode previous ending points */ for(u=0; uhigh); + UINT32ENCODE(*p, (uint32_t)curr->high); } /* end else */ /* Advance to next node */ curr=curr->next; } /* end while */ - /* Update encoding pointer */ - *p = pp; - - FUNC_LEAVE_NOAPI_VOID +done: + FUNC_LEAVE_NOAPI(ret_value) } /* H5S_hyper_serialize_helper() */ @@ -2111,15 +2109,14 @@ H5S_hyper_serialize_helper(const H5S_hyper_span_info_t *spans, REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_hyper_serialize(const H5S_t *space, uint8_t **p) +H5S_hyper_serialize (const H5S_t *space, uint8_t **p) { const H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */ - uint8_t *pp = (*p); /* Local pointer for decoding */ hsize_t tmp_count[H5O_LAYOUT_NDIMS]; /* Temporary hyperslab counts */ - hsize_t offset[H5O_LAYOUT_NDIMS]; /* Offset of element in dataspace */ + hsize_t offset[H5O_LAYOUT_NDIMS]; /* Offset of element in dataspace */ hsize_t start[H5O_LAYOUT_NDIMS]; /* Location of start of hyperslab */ hsize_t end[H5O_LAYOUT_NDIMS]; /* Location of end of hyperslab */ - hsize_t temp_off; /* Offset in a given dimension */ + hsize_t temp_off; /* Offset in a given dimension */ uint8_t *lenp; /* pointer to length location for later storage */ uint32_t len = 0; /* number of bytes used */ uint32_t version; /* Version number */ @@ -2131,10 +2128,7 @@ H5S_hyper_serialize(const H5S_t *space, uint8_t **p) FUNC_ENTER_NOAPI_NOINIT_NOERR - /* Check args */ HDassert(space); - HDassert(p); - HDassert(pp); /* Calculate version */ if(space->select.sel_info.hslab->unlim_dim >= 0) { @@ -2145,17 +2139,17 @@ H5S_hyper_serialize(const H5S_t *space, uint8_t **p) version = 1; /* Store the preamble information */ - UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ - UINT32ENCODE(pp, version); /* Store the version number */ + UINT32ENCODE(*p, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ + UINT32ENCODE(*p, version); /* Store the version number */ if(version >= 2) - *pp++ = flags; /* Store the flags */ + *(*p)++ = flags; /* Store the flags */ else - UINT32ENCODE(pp, (uint32_t)0); /* Store the un-used padding */ - lenp = pp; /* Keep the pointer to the length location for later */ - pp += 4; /* Skip over space for length */ + UINT32ENCODE(*p, (uint32_t)0); /* Store the un-used padding */ + lenp = *p; /* keep the pointer to the length location for later */ + *p += 4; /* skip over space for length */ /* Encode number of dimensions */ - UINT32ENCODE(pp, (uint32_t)space->extent.rank); + UINT32ENCODE(*p, (uint32_t)space->extent.rank); len += 4; /* If there is an unlimited dimension, only encode opt_unlim_diminfo */ @@ -2167,10 +2161,10 @@ H5S_hyper_serialize(const H5S_t *space, uint8_t **p) /* Iterate over dimensions */ for(i = 0; i < space->extent.rank; i++) { /* Encode start/stride/block/count */ - UINT64ENCODE(pp, space->select.sel_info.hslab->opt_diminfo[i].start); - UINT64ENCODE(pp, space->select.sel_info.hslab->opt_diminfo[i].stride); - UINT64ENCODE(pp, space->select.sel_info.hslab->opt_diminfo[i].count); - UINT64ENCODE(pp, space->select.sel_info.hslab->opt_diminfo[i].block); + UINT64ENCODE(*p, space->select.sel_info.hslab->opt_diminfo[i].start); + UINT64ENCODE(*p, space->select.sel_info.hslab->opt_diminfo[i].stride); + UINT64ENCODE(*p, space->select.sel_info.hslab->opt_diminfo[i].count); + UINT64ENCODE(*p, space->select.sel_info.hslab->opt_diminfo[i].block); } /* end for */ } /* end if */ /* Check for a "regular" hyperslab selection */ @@ -2188,7 +2182,7 @@ H5S_hyper_serialize(const H5S_t *space, uint8_t **p) /* Encode number of hyperslabs */ H5_CHECK_OVERFLOW(block_count, hsize_t, uint32_t); - UINT32ENCODE(pp, (uint32_t)block_count); + UINT32ENCODE(*p, (uint32_t)block_count); len+=4; /* Now serialize the information for the regular hyperslab */ @@ -2211,11 +2205,11 @@ H5S_hyper_serialize(const H5S_t *space, uint8_t **p) /* Encode hyperslab starting location */ for(u = 0; u < ndims; u++) - UINT32ENCODE(pp, (uint32_t)offset[u]); + UINT32ENCODE(*p, (uint32_t)offset[u]); /* Encode hyperslab ending location */ for(u = 0; u < ndims; u++) - UINT32ENCODE(pp, (uint32_t)(offset[u] + (diminfo[u].block - 1))); + UINT32ENCODE(*p, (uint32_t)(offset[u] + (diminfo[u].block - 1))); /* Move the offset to the next sequence to start */ offset[fast_dim]+=diminfo[fast_dim].stride; @@ -2266,7 +2260,7 @@ H5S_hyper_serialize(const H5S_t *space, uint8_t **p) /* Encode number of hyperslabs */ block_count = H5S_hyper_span_nblocks(space->select.sel_info.hslab->span_lst); H5_CHECK_OVERFLOW(block_count, hsize_t, uint32_t); - UINT32ENCODE(pp, (uint32_t)block_count); + UINT32ENCODE(*p, (uint32_t)block_count); len+=4; /* Add 8 bytes times the rank for each hyperslab selected */ @@ -2274,16 +2268,12 @@ H5S_hyper_serialize(const H5S_t *space, uint8_t **p) len += (uint32_t)(8 * space->extent.rank * block_count); /* Encode each hyperslab in selection */ - *p = pp; H5S_hyper_serialize_helper(space->select.sel_info.hslab->span_lst, start, end, (hsize_t)0, p); } /* end else */ /* Encode length */ UINT32ENCODE(lenp, (uint32_t)len); /* Store the length of the extra information */ - /* Update encoding pointer */ - *p = pp; - FUNC_LEAVE_NOAPI(SUCCEED) } /* H5S_hyper_serialize() */ @@ -2316,7 +2306,6 @@ static herr_t H5S_hyper_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t flags, const uint8_t **p) { - const uint8_t *pp = (*p); /* Local pointer for decoding */ unsigned rank; /* rank of points */ size_t num_elem=0; /* number of elements in selection */ hsize_t start[H5O_LAYOUT_NDIMS]; /* hyperslab start information */ @@ -2337,7 +2326,7 @@ H5S_hyper_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t fla /* Check args */ HDassert(space); HDassert(p); - HDassert(pp); + HDassert(*p); /* Deserialize slabs to select */ /* (The header and rank have already beed decoded) */ @@ -2351,10 +2340,10 @@ H5S_hyper_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t fla /* Iterate over dimensions */ for(i = 0; i < space->extent.rank; i++) { /* Decode start/stride/block/count */ - UINT64DECODE(pp, start[i]); - UINT64DECODE(pp, stride[i]); - UINT64DECODE(pp, count[i]); - UINT64DECODE(pp, block[i]); + UINT64DECODE(*p, start[i]); + UINT64DECODE(*p, stride[i]); + UINT64DECODE(*p, count[i]); + UINT64DECODE(*p, block[i]); } /* end for */ /* Select the hyperslab to the current selection */ @@ -2363,7 +2352,7 @@ H5S_hyper_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t fla } /* end if */ else { /* decode the number of points */ - UINT32DECODE(pp,num_elem); + UINT32DECODE(*p,num_elem); /* Set the count & stride for all blocks */ for(tcount=count,tstride=stride,j=0; jextent.rank); + UINT32ENCODE(*p, (uint32_t)space->extent.rank); len+=4; /* Encode number of elements */ - UINT32ENCODE(pp, (uint32_t)space->select.num_elem); + UINT32ENCODE(*p, (uint32_t)space->select.num_elem); len+=4; /* Encode each point in selection */ @@ -862,7 +858,7 @@ H5S_point_serialize (const H5S_t *space, uint8_t **p) /* Encode each point */ for(u=0; uextent.rank; u++) - UINT32ENCODE(pp, (uint32_t)curr->pnt[u]); + UINT32ENCODE(*p, (uint32_t)curr->pnt[u]); curr=curr->next; } /* end while */ @@ -870,9 +866,6 @@ H5S_point_serialize (const H5S_t *space, uint8_t **p) /* Encode length */ UINT32ENCODE(lenp, (uint32_t)len); /* Store the length of the extra information */ - /* Update encoding pointer */ - *p = pp; - FUNC_LEAVE_NOAPI(SUCCEED) } /* H5S_point_serialize() */ @@ -905,25 +898,24 @@ static herr_t H5S_point_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t H5_ATTR_UNUSED flags, const uint8_t **p) { - H5S_seloper_t op = H5S_SELECT_SET; /* Selection operation */ - hsize_t *coord = NULL, *tcoord; /* Pointer to array of elements */ - const uint8_t *pp = (*p); /* Local pointer for decoding */ - size_t num_elem = 0; /* Number of elements in selection */ - unsigned rank; /* Rank of points */ + H5S_seloper_t op=H5S_SELECT_SET; /* Selection operation */ + unsigned rank; /* Rank of points */ + size_t num_elem=0; /* Number of elements in selection */ + hsize_t *coord=NULL, *tcoord; /* Pointer to array of elements */ unsigned i, j; /* local counting variables */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_NOAPI_NOINIT /* Check args */ HDassert(space); HDassert(p); - HDassert(pp); + HDassert(*p); /* Deserialize points to select */ /* (The header and rank have already beed decoded) */ rank = space->extent.rank; /* Retrieve rank from space */ - UINT32DECODE(pp, num_elem); /* decode the number of points */ + UINT32DECODE(*p, num_elem); /* decode the number of points */ /* Allocate space for the coordinates */ if(NULL == (coord = (hsize_t *)H5MM_malloc(num_elem * rank * sizeof(hsize_t)))) @@ -932,15 +924,12 @@ H5S_point_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t H5_ /* Retrieve the coordinates from the buffer */ for(tcoord = coord, i = 0; i < num_elem; i++) for(j = 0; j < (unsigned)rank; j++, tcoord++) - UINT32DECODE(pp, *tcoord); + UINT32DECODE(*p, *tcoord); /* Select points */ if(H5S_select_elements(space, op, num_elem, (const hsize_t *)coord) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") - /* Update decoding pointer */ - *p = pp; - done: /* Free the coordinate array if necessary */ if(coord != NULL) -- cgit v0.12 From 47c5bc7d61f11e2f6635a1c6a52d8ae56081758d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 2 Oct 2015 14:19:09 -0500 Subject: [svn-r27935] Cmake 3.3 allowed execute_process to merge output and error files if the filename or the variable were the same. Changed instances to make the outpu_variable different. --- config/cmake/userblockTest.cmake | 8 ++++---- config/cmake/vfdTest.cmake | 4 ++-- config/cmake_ext_mod/grepTest.cmake | 10 +++++----- config/cmake_ext_mod/prunTest.cmake | 30 +++++++++++++++--------------- config/cmake_ext_mod/runTest.cmake | 32 ++++++++++++++++---------------- 5 files changed, 42 insertions(+), 42 deletions(-) diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake index fab470c..0775cbe 100644 --- a/config/cmake/userblockTest.cmake +++ b/config/cmake/userblockTest.cmake @@ -48,7 +48,7 @@ if (TEST_CHECKUB STREQUAL "YES") WORKING_DIRECTORY ${TEST_FOLDER} RESULT_VARIABLE TEST_RESULT OUTPUT_FILE ${TEST_HFILE}.len.txt - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) if (NOT ${TEST_RESULT} STREQUAL "0") @@ -66,7 +66,7 @@ if (TEST_CHECKUB STREQUAL "YES") WORKING_DIRECTORY ${TEST_FOLDER} RESULT_VARIABLE TEST_RESULT OUTPUT_FILE ${TEST_HFILE}-ub.cmp - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR OUTPUT_STRIP_TRAILING_WHITESPACE ) @@ -84,7 +84,7 @@ if (TEST_CHECKUB STREQUAL "YES") WORKING_DIRECTORY ${TEST_FOLDER} RESULT_VARIABLE TEST_RESULT OUTPUT_FILE ${TEST_HFILE}.cmp - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR OUTPUT_STRIP_TRAILING_WHITESPACE ) @@ -107,7 +107,7 @@ else (TEST_CHECKUB STREQUAL "YES") COMMAND ${TEST_PROGRAM} ${TEST_HFILE} WORKING_DIRECTORY ${TEST_FOLDER} RESULT_VARIABLE TEST_H_STRING_LEN - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) if (NOT TEST_H_STRING_LEN STREQUAL "0") diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake index d3cb87e..4685d88 100644 --- a/config/cmake/vfdTest.cmake +++ b/config/cmake/vfdTest.cmake @@ -29,7 +29,7 @@ EXECUTE_PROCESS ( WORKING_DIRECTORY ${TEST_FOLDER} OUTPUT_FILE ${TEST_OUTPUT}_${TEST_VFD}.out ERROR_FILE ${TEST_OUTPUT}_${TEST_VFD}.err - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) @@ -37,7 +37,7 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}") if (ERROR_APPEND) file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err TEST_STREAM) - file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out "${TEST_STREAM}") + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out "${TEST_STREAM}") endif (ERROR_APPEND) # if the return value is !=${TEST_EXPECT} bail out diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake index 5f07134..a090057 100644 --- a/config/cmake_ext_mod/grepTest.cmake +++ b/config/cmake_ext_mod/grepTest.cmake @@ -33,7 +33,7 @@ execute_process ( RESULT_VARIABLE TEST_RESULT OUTPUT_FILE ${TEST_OUTPUT} ERROR_FILE ${TEST_OUTPUT}.err - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) @@ -44,16 +44,16 @@ message (STATUS "COMMAND Error: ${TEST_ERROR}") file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) # TEST_REFERENCE should always be matched -string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM}) -string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT) +string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM}) +string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT) if (${TEST_RESULT} STREQUAL "0") message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}") endif (${TEST_RESULT} STREQUAL "0") -string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM}) +string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM}) if (${TEST_EXPECT} STREQUAL "1") # TEST_EXPECT (1) interperts TEST_FILTER as NOT to match - string (LENGTH "${TEST_MATCH}" TEST_RESULT) + string (LENGTH "${TEST_MATCH}" TEST_RESULT) if (NOT ${TEST_RESULT} STREQUAL "0") message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}") endif (NOT ${TEST_RESULT} STREQUAL "0") diff --git a/config/cmake_ext_mod/prunTest.cmake b/config/cmake_ext_mod/prunTest.cmake index 3d5ec31..089c203 100644 --- a/config/cmake_ext_mod/prunTest.cmake +++ b/config/cmake_ext_mod/prunTest.cmake @@ -30,7 +30,7 @@ set (ERROR_APPEND 1) message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}") if (TEST_ENV_VAR) - set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") + set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") endif (TEST_ENV_VAR) # run the test program, capture the stdout/stderr and the result var @@ -40,7 +40,7 @@ EXECUTE_PROCESS ( RESULT_VARIABLE TEST_RESULT OUTPUT_FILE ${TEST_OUTPUT} ERROR_FILE ${TEST_OUTPUT}.err - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) @@ -51,49 +51,49 @@ file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") if (ERROR_APPEND) file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) - file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (ERROR_APPEND) if (TEST_APPEND) - file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n") + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n") endif (TEST_APPEND) message (STATUS "COMMAND Error: ${TEST_ERROR}") if (TEST_MASK) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage:
\n" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage:
\n" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK) if (TEST_MASK_MOD) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK_MOD) if (TEST_MASK_ERROR) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK_ERROR) if (TEST_FILTER) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_FILTER) #if (TEST_REF_FILTER) # message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}") # file (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM) -# STRING(REGEX REPLACE "${TEST_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") +# STRING(REGEX REPLACE "${TEST_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") # file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") #endif (TEST_REF_FILTER) diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index bfaae2b..6506183 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -32,7 +32,7 @@ endif (NOT TEST_ERRREF) message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}") if (TEST_ENV_VAR) - set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") + set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") endif (TEST_ENV_VAR) if (NOT TEST_INPUT) @@ -43,7 +43,7 @@ if (NOT TEST_INPUT) RESULT_VARIABLE TEST_RESULT OUTPUT_FILE ${TEST_OUTPUT} ERROR_FILE ${TEST_OUTPUT}.err - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) else (NOT TEST_INPUT) @@ -55,7 +55,7 @@ else (NOT TEST_INPUT) INPUT_FILE ${TEST_INPUT} OUTPUT_FILE ${TEST_OUTPUT} ERROR_FILE ${TEST_OUTPUT}.err - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) endif (NOT TEST_INPUT) @@ -64,11 +64,11 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}") if (ERROR_APPEND) file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) - file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (ERROR_APPEND) if (TEST_APPEND) - file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n") + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n") endif (TEST_APPEND) # if the return value is !=${TEST_EXPECT} bail out @@ -80,13 +80,13 @@ message (STATUS "COMMAND Error: ${TEST_ERROR}") if (TEST_MASK) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage:
\n" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage:
\n" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK) if (TEST_MASK_MOD) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK_MOD) @@ -96,13 +96,13 @@ if (TEST_MASK_ERROR) else (NOT TEST_ERRREF) file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) endif (NOT TEST_ERRREF) - STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") if (NOT TEST_ERRREF) file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") else (NOT TEST_ERRREF) @@ -112,7 +112,7 @@ endif (TEST_MASK_ERROR) if (TEST_FILTER) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_FILTER) @@ -157,7 +157,7 @@ if (NOT TEST_SKIP_COMPARE) if (NOT ${TEST_RESULT} STREQUAL 0) message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}") endif (NOT ${TEST_RESULT} STREQUAL 0) - + if (TEST_ERRREF) if (WIN32 AND NOT MINGW) file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) -- cgit v0.12 From 0ee053bb95a620b6f8109d22a372f6acc1cee300 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 3 Oct 2015 22:58:55 -0500 Subject: [svn-r27944] Description: Avoid duplicating source FAPL & DAPL if they are already available. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel (h5committest not required on this branch) --- src/H5Dvirtual.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index af9963d..cbd9e35 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -615,12 +615,16 @@ H5D__virtual_reset_layout(H5O_layout_t *layout) (void)HDmemset(layout->storage.u.virt.min_dims, 0, sizeof(layout->storage.u.virt.min_dims)); /* Close access property lists */ - if(layout->storage.u.virt.source_fapl >= 0) + if(layout->storage.u.virt.source_fapl >= 0) { if(H5I_dec_ref(layout->storage.u.virt.source_fapl) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't close source fapl") - if(layout->storage.u.virt.source_dapl >= 0) + layout->storage.u.virt.source_fapl = -1; + } /* end if */ + if(layout->storage.u.virt.source_dapl >= 0) { if(H5I_dec_ref(layout->storage.u.virt.source_dapl) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't close source dapl") + layout->storage.u.virt.source_dapl = -1; + } /* end if */ /* The list is no longer initialized */ layout->storage.u.virt.init = FALSE; @@ -2013,12 +2017,14 @@ H5D__virtual_init(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, const H5D_t *dset, storage->printf_gap = (hsize_t)0; /* Retrieve VDS file FAPL to layout */ - if((storage->source_fapl = H5F_get_access_plist(f, FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get fapl") + if(storage->source_fapl <= 0) + if((storage->source_fapl = H5F_get_access_plist(f, FALSE)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get fapl") /* Copy DAPL to layout */ - if((storage->source_dapl = H5P_copy_plist(dapl, FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dapl") + if(storage->source_dapl <= 0) + if((storage->source_dapl = H5P_copy_plist(dapl, FALSE)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dapl") /* Mark layout as not fully initialized (must be done prior to I/O for * unlimited/printf selections) */ -- cgit v0.12 From c7c6623f284545f6605120c171e0c13da9d43b3e Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 5 Oct 2015 08:46:42 -0500 Subject: [svn-r27956] Description: Minor code cleanups, preparing to merge to trunk. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel (h5committest not required on this branch) --- src/H5Pdcpl.c | 5 ++--- src/H5S.c | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index f3acfe2..0677517 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -455,9 +455,6 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size) /* number of entries */ *size += (size_t)8; - /* NULL pointer to pass to H5S_encode */ - tmp_p = NULL; - /* Iterate over entries */ for(u = 0; u < layout->storage.u.virt.list_nused; u++) { /* Source file name */ @@ -470,12 +467,14 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size) /* Source selection */ tmp_size = (size_t)0; + tmp_p = NULL; if(H5S_encode(layout->storage.u.virt.list[u].source_select, &tmp_p, &tmp_size) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize source selection") *size += tmp_size; /* Virtual dataset selection */ tmp_size = (size_t)0; + tmp_p = NULL; if(H5S_encode(layout->storage.u.virt.list[u].source_dset.virtual_select, &tmp_p, &tmp_size) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize virtual selection") *size += tmp_size; diff --git a/src/H5S.c b/src/H5S.c index af7d395..738a7da 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -1577,7 +1577,6 @@ herr_t H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) { H5F_t *f = NULL; /* Fake file structure*/ - unsigned char *pp = (*p); /* Local pointer for decoding */ size_t extent_size; /* Size of serialized dataspace extent */ hssize_t sselect_size; /* Signed size of serialized dataspace selection */ size_t select_size; /* Size of serialized dataspace selection */ @@ -1600,9 +1599,11 @@ H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) /* Verify the size of buffer. If it's not big enough, simply return the * right size without filling the buffer. */ - if(!pp || *nalloc < (extent_size + select_size + 1 + 1 + 1 + 4)) + if(!*p || *nalloc < (extent_size + select_size + 1 + 1 + 1 + 4)) *nalloc = extent_size + select_size + 1 + 1 + 1 + 4; else { + unsigned char *pp = (*p); /* Local pointer for decoding */ + /* Encode the type of the information */ *pp++ = H5O_SDSPACE_ID; -- cgit v0.12 From 81c4e2133afafac614e21675c927ea5cca109083 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 5 Oct 2015 08:59:16 -0500 Subject: [svn-r27957] Description: Minor whitespace cleanups. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel (h5committest not required on this branch) --- src/H5Dvirtual.c | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index cbd9e35..316fcf7 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -1028,8 +1028,7 @@ H5D_virtual_parse_source_name(const char *source_name, /* Check for blank string before specifier */ if(pct != p) /* Append string to name segment */ - if(H5D__virtual_str_append(p, (size_t)(pct - p), &name_seg_p, &(*tmp_parsed_name_p)->name_segment, - &name_seg_size) < 0) + if(H5D__virtual_str_append(p, (size_t)(pct - p), &name_seg_p, &(*tmp_parsed_name_p)->name_segment, &name_seg_size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to append name segment") /* Update other variables */ @@ -1041,8 +1040,7 @@ H5D_virtual_parse_source_name(const char *source_name, } /* end if */ else if(pct[1] == '%') { /* Append string to name segment (include first '%') */ - if(H5D__virtual_str_append(p, (size_t)(pct - p) + (size_t)1, &name_seg_p, &(*tmp_parsed_name_p)->name_segment, -&name_seg_size) < 0) + if(H5D__virtual_str_append(p, (size_t)(pct - p) + (size_t)1, &name_seg_p, &(*tmp_parsed_name_p)->name_segment, &name_seg_size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to append name segment") /* Update other variables */ @@ -1069,8 +1067,7 @@ H5D_virtual_parse_source_name(const char *source_name, HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name segment struct") /* Append string to name segment */ - if(H5D__virtual_str_append(p, tmp_strlen - (size_t)(p - source_name), &name_seg_p, &(*tmp_parsed_name_p)->name_segment, - &name_seg_size) < 0) + if(H5D__virtual_str_append(p, tmp_strlen - (size_t)(p - source_name), &name_seg_p, &(*tmp_parsed_name_p)->name_segment, &name_seg_size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to append name segment") } /* end else */ } /* end if */ @@ -1507,12 +1504,11 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if(storage->view == H5D_VDS_LAST_AVAILABLE) { /* Get bounds from last valid virtual selection */ if(H5S_SELECT_BOUNDS(storage->list[i].sub_dset[first_missing - (hsize_t)1].virtual_select, bounds_start, bounds_end) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") /* Set clip_size to bounds_end in unlimited * dimension */ - clip_size = bounds_end[storage->list[i].unlim_dim_virtual] - + (hsize_t)1; + clip_size = bounds_end[storage->list[i].unlim_dim_virtual] + (hsize_t)1; } /* end if */ else { /* Get bounds from first missing virtual selection @@ -1534,10 +1530,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) /* Update new_dims */ if((new_dims[storage->list[i].unlim_dim_virtual] == HSIZE_UNDEF) - || (storage->view == H5D_VDS_FIRST_MISSING ? (clip_size - < (hsize_t)new_dims[storage->list[i].unlim_dim_virtual]) - : (clip_size - > (hsize_t)new_dims[storage->list[i].unlim_dim_virtual]))) + || (storage->view == H5D_VDS_FIRST_MISSING ? (clip_size < (hsize_t)new_dims[storage->list[i].unlim_dim_virtual]) + : (clip_size > (hsize_t)new_dims[storage->list[i].unlim_dim_virtual]))) new_dims[storage->list[i].unlim_dim_virtual] = clip_size; } /* end if */ @@ -1885,8 +1879,7 @@ H5D__virtual_init_all(const H5D_t *dset, hid_t dxpl_id) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get block in unlimited selection") /* Close previous clipped source selection, if any */ - if(storage->list[i].sub_dset[j].clipped_source_select - != storage->list[i].source_select) { + if(storage->list[i].sub_dset[j].clipped_source_select != storage->list[i].source_select) { if(storage->list[i].sub_dset[j].clipped_source_select) if(H5S_close(storage->list[i].sub_dset[j].clipped_source_select) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped source dataspace") @@ -1897,8 +1890,7 @@ H5D__virtual_init_all(const H5D_t *dset, hid_t dxpl_id) } /* end if */ /* Close previous clipped virtual selection, if any */ - if(storage->list[i].sub_dset[j].clipped_virtual_select - != storage->list[i].sub_dset[j].virtual_select) { + if(storage->list[i].sub_dset[j].clipped_virtual_select != storage->list[i].sub_dset[j].virtual_select) { if(storage->list[i].sub_dset[j].clipped_virtual_select) if(H5S_close(storage->list[i].sub_dset[j].clipped_virtual_select) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped virtual dataspace") @@ -2152,14 +2144,12 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, storage->list[i].sub_dset_io_end = storage->list[i].sub_dset_nused; /* Iterate over sub-source dsets */ - for(j = storage->list[i].sub_dset_io_start; - j < storage->list[i].sub_dset_io_end; j++) { + for(j = storage->list[i].sub_dset_io_start; j < storage->list[i].sub_dset_io_end; j++) { /* Check for clipped virtual selection */ if(!storage->list[i].sub_dset[j].clipped_virtual_select) { hsize_t start[H5S_MAX_RANK]; /* This should only be NULL if this is a partial block */ - HDassert((j == (storage->list[i].sub_dset_io_end - 1)) - && partial_block); + HDassert((j == (storage->list[i].sub_dset_io_end - 1)) && partial_block); /* If the source space status is not correct, we must try to * open the source dataset to patch it */ @@ -2338,8 +2328,7 @@ H5D__virtual_post_io(H5O_storage_virtual_t *storage) /* Check for "printf" source dataset resolution */ if(storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) { /* Iterate over sub-source dsets */ - for(j = storage->list[i].sub_dset_io_start; - j < storage->list[i].sub_dset_io_end; j++) + for(j = storage->list[i].sub_dset_io_start; j < storage->list[i].sub_dset_io_end; j++) /* Close projected memory space */ if(storage->list[i].sub_dset[j].projected_mem_space) { if(H5S_close(storage->list[i].sub_dset[j].projected_mem_space) < 0) -- cgit v0.12