Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VFD SWMR: sync with develop (#830) #29

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# .gitignore file for HDF5

# ctags
**/tags

# vim swap files
**/.*.swp

# Makefile.in files
**/Makefile.in

Expand Down
3 changes: 0 additions & 3 deletions config/cmake/H5pubconf.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,6 @@
/* Define if your system has window style path name. */
#cmakedefine H5_HAVE_WINDOW_PATH @H5_HAVE_WINDOW_PATH@

/* Define to 1 if you have the <winsock2.h> header file. */
#cmakedefine H5_HAVE_WINSOCK2_H @H5_HAVE_WINSOCK2_H@

/* Define to 1 if you have the <zlib.h> header file. */
#cmakedefine H5_HAVE_ZLIB_H @H5_HAVE_ZLIB_H@

Expand Down
6 changes: 0 additions & 6 deletions config/cmake_ext_mod/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ if (MINGW)
set (${HDF_PREFIX}_HAVE_MINGW 1)
set (WINDOWS 1) # MinGW tries to imitate Windows
set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
set (${HDF_PREFIX}_HAVE_WINSOCK2_H 1)
set (__USE_MINGW_ANSI_STDIO 1)
endif ()

Expand Down Expand Up @@ -117,11 +116,6 @@ CHECK_INCLUDE_FILE_CONCAT ("features.h" ${HDF_PREFIX}_HAVE_FEATURES_H)
CHECK_INCLUDE_FILE_CONCAT ("dirent.h" ${HDF_PREFIX}_HAVE_DIRENT_H)
CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H)

# Windows
if (NOT CYGWIN)
CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" ${HDF_PREFIX}_HAVE_WINSOCK2_H)
endif ()

CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" ${HDF_PREFIX}_HAVE_GLOBUS_COMMON_H)
CHECK_INCLUDE_FILE_CONCAT ("pdb.h" ${HDF_PREFIX}_HAVE_PDB_H)
CHECK_INCLUDE_FILE_CONCAT ("pthread.h" ${HDF_PREFIX}_HAVE_PTHREAD_H)
Expand Down
67 changes: 33 additions & 34 deletions src/H5Dchunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,6 @@ H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage
HDassert(offset);
HDassert(storage_size);

*storage_size = 0;

/* Allocate dataspace and initialize it if it hasn't been. */
if (!(*layout->ops->is_space_alloc)(&layout->storage))
HGOTO_DONE(SUCCEED)
Expand Down Expand Up @@ -5031,7 +5029,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_info_t *chunk_info,
* order of offset in the file.
*/
if (need_addr_sort)
HDqsort(chunk_disp_array, blocks, sizeof(MPI_Aint), H5D__chunk_cmp_addr);
HDqsort(chunk_disp_array, (size_t)blocks, sizeof(MPI_Aint), H5D__chunk_cmp_addr);

/* MSC - should use this if MPI_type_create_hindexed block is working:
* mpi_code = MPI_Type_create_hindexed_block(blocks, block_len, chunk_disp_array, MPI_BYTE,
Expand Down Expand Up @@ -6066,6 +6064,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)

if (udata->chunk_in_cache) {
HDassert(H5F_addr_defined(chunk_rec->chunk_addr));
HDassert(ent);
HDassert(H5F_addr_defined(ent->chunk_block.offset));

H5_CHECKED_ASSIGN(nbytes, size_t, shared_fo->layout.u.chunk.size, uint32_t);
Expand Down Expand Up @@ -7498,6 +7497,36 @@ H5D__get_chunk_info_by_coord(const H5D_t *dset, const hsize_t *offset, unsigned
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__get_chunk_info_by_coord() */

/*-------------------------------------------------------------------------
* Function: H5D__chunk_iter_cb
*
* Purpose: Call the user-defined function with the chunk data. The iterator continues if
* the user-defined function returns H5_ITER_CONT, and stops if H5_ITER_STOP is
* returned.
*
* Return: Success: H5_ITER_CONT or H5_ITER_STOP
* Failure: Negative (H5_ITER_ERROR)
*
* Programmer: Gaute Hope
* August 2020
*
*-------------------------------------------------------------------------
*/
static int
H5D__chunk_iter_cb(const H5D_chunk_rec_t *chunk_rec, void *udata)
{
int ret_value = 0;

FUNC_ENTER_STATIC_NOERR

const H5D_chunk_iter_cb_data_t *data = (H5D_chunk_iter_cb_data_t *)udata;

ret_value = (data->cb)(chunk_rec->scaled, chunk_rec->filter_mask, chunk_rec->chunk_addr,
chunk_rec->nbytes, data->op_data);

FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_iter_cb */

/*-------------------------------------------------------------------------
* Function: H5D__chunk_iter
*
Expand Down Expand Up @@ -7537,7 +7566,7 @@ H5D__chunk_iter(const H5D_t *dset, H5D_chunk_iter_op_t cb, void *op_data)
for (ent = rdcc->head; ent; ent = ent->next)
/* Flush the chunk out to disk, to make certain the size is correct later */
if (H5D__chunk_flush_entry(dset, ent, FALSE) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer")
HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "cannot flush indexed storage buffer")

/* Compose chunked index info struct */
idx_info.f = dset->oloc.file;
Expand All @@ -7559,33 +7588,3 @@ H5D__chunk_iter(const H5D_t *dset, H5D_chunk_iter_op_t cb, void *op_data)
done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__chunk_iter() */

/*-------------------------------------------------------------------------
* Function: H5D__chunk_iter_cb
*
* Purpose: Call the user-defined function with the chunk data. The iterator continues if
* the user-defined function returns H5_ITER_CONT, and stops if H5_ITER_STOP is
* returned.
*
* Return: Success: H5_ITER_CONT or H5_ITER_STOP
* Failure: Negative (H5_ITER_ERROR)
*
* Programmer: Gaute Hope
* August 2020
*
*-------------------------------------------------------------------------
*/
static int
H5D__chunk_iter_cb(const H5D_chunk_rec_t *chunk_rec, void *udata)
{
int ret_value = 0;

FUNC_ENTER_STATIC_NOERR

const H5D_chunk_iter_cb_data_t *data = (H5D_chunk_iter_cb_data_t *)udata;

ret_value = (data->cb)(chunk_rec->scaled, chunk_rec->filter_mask, chunk_rec->chunk_addr,
chunk_rec->nbytes, data->op_data);

FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_iter_cb */
11 changes: 6 additions & 5 deletions src/H5Dprivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@
#define H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME \
"local_no_collective_cause" /* cause of broken collective I/O in each process */
#define H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME \
"global_no_collective_cause" /* cause of broken collective I/O in all processes */
#define H5D_XFER_EDC_NAME "err_detect" /* EDC */
#define H5D_XFER_FILTER_CB_NAME "filter_cb" /* Filter callback function */
#define H5D_XFER_CONV_CB_NAME "type_conv_cb" /* Type conversion callback function */
#define H5D_XFER_XFORM_NAME "data_transform" /* Data transform */
"global_no_collective_cause" /* cause of broken collective I/O in all processes */
#define H5D_XFER_EDC_NAME "err_detect" /* EDC */
#define H5D_XFER_FILTER_CB_NAME "filter_cb" /* Filter callback function */
#define H5D_XFER_CONV_CB_NAME "type_conv_cb" /* Type conversion callback function */
#define H5D_XFER_XFORM_NAME "data_transform" /* Data transform */
#define H5D_XFER_DSET_IO_SEL_NAME "dset_io_selection" /* Dataset I/O selection */
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
/* Collective chunk instrumentation properties */
#define H5D_XFER_COLL_CHUNK_LINK_HARD_NAME "coll_chunk_link_hard"
Expand Down
45 changes: 0 additions & 45 deletions src/H5Oattribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -1901,48 +1901,3 @@ H5O__attr_bh_info(H5F_t *f, H5O_t *oh, H5_ih_info_t *bh_info)

FUNC_LEAVE_NOAPI(ret_value)
} /* H5O__attr_bh_info() */

#ifndef H5_NO_DEPRECATED_SYMBOLS

/*-------------------------------------------------------------------------
* Function: H5O__attr_count
*
* Purpose: Determine the # of attributes on an object
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Monday, December 11, 2006
*
*-------------------------------------------------------------------------
*/
int
H5O__attr_count(const H5O_loc_t *loc)
{
H5O_t * oh = NULL; /* Pointer to actual object header */
hsize_t nattrs; /* Number of attributes */
int ret_value = -1; /* Return value */

FUNC_ENTER_PACKAGE

/* Check arguments */
HDassert(loc);

/* Protect the object header to iterate over */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header")

/* Retrieve # of attributes on object */
if (H5O__attr_count_real(loc->file, oh, &nattrs) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve attribute count")

/* Set return value */
ret_value = (int)nattrs;

done:
if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")

FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__attr_count */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
Loading