Skip to content

Commit

Permalink
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5
Browse files Browse the repository at this point in the history
… into stackable_vol
  • Loading branch information
qkoziol committed Nov 7, 2018
2 parents ef9ffc6 + 40338b9 commit 140f72b
Show file tree
Hide file tree
Showing 31 changed files with 669 additions and 666 deletions.
2 changes: 1 addition & 1 deletion config/cmake/ConversionTests.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+

#if defined(__has_attribute)
#if __has_attribute(no_sanitize)
#define HDF_NO_UBSAN __attribute__((no_sanitize("undefined")))
Expand Down
12 changes: 6 additions & 6 deletions config/cmake_ext_mod/HDFLibMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
# Create imported target jpeg-static
add_library(jpeg-static STATIC IMPORTED)
HDF_IMPORT_SET_LIB_OPTIONS (jpeg-static "jpeg" STATIC "")
add_dependencies (JPEG jpeg-static)
add_dependencies (jpeg-static JPEG)
set (JPEG_STATIC_LIBRARY "jpeg-static")
set (JPEG_LIBRARIES ${JPEG_STATIC_LIBRARY})
if (BUILD_SHARED_LIBS)
# Create imported target jpeg-shared
add_library(jpeg-shared SHARED IMPORTED)
HDF_IMPORT_SET_LIB_OPTIONS (jpeg-shared "jpeg" SHARED "")
add_dependencies (JPEG jpeg-shared)
add_dependencies (jpeg-shared JPEG)
set (JPEG_SHARED_LIBRARY "jpeg-shared")
set (JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_SHARED_LIBRARY})
endif ()
Expand Down Expand Up @@ -171,14 +171,14 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
# Create imported target szip-static
add_library(szip-static STATIC IMPORTED)
HDF_IMPORT_SET_LIB_OPTIONS (szip-static "szip" STATIC "")
add_dependencies (SZIP szip-static)
add_dependencies (szip-static SZIP)
set (SZIP_STATIC_LIBRARY "szip-static")
set (SZIP_LIBRARIES ${SZIP_STATIC_LIBRARY})
if (BUILD_SHARED_LIBS)
# Create imported target szip-shared
add_library(szip-shared SHARED IMPORTED)
HDF_IMPORT_SET_LIB_OPTIONS (szip-shared "szip" SHARED "")
add_dependencies (SZIP szip-shared)
add_dependencies (szip-shared SZIP)
set (SZIP_SHARED_LIBRARY "szip-shared")
set (SZIP_LIBRARIES ${SZIP_LIBRARIES} ${SZIP_SHARED_LIBRARY})
endif ()
Expand Down Expand Up @@ -269,14 +269,14 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
# Create imported target zlib-static
add_library(zlib-static STATIC IMPORTED)
HDF_IMPORT_SET_LIB_OPTIONS (zlib-static ${ZLIB_LIB_NAME} STATIC "")
add_dependencies (ZLIB zlib-static)
add_dependencies (zlib-static ZLIB)
set (ZLIB_STATIC_LIBRARY "zlib-static")
set (ZLIB_LIBRARIES ${ZLIB_STATIC_LIBRARY})
if (BUILD_SHARED_LIBS)
# Create imported target zlib-shared
add_library(zlib-shared SHARED IMPORTED)
HDF_IMPORT_SET_LIB_OPTIONS (zlib-shared ${ZLIB_LIB_NAME} SHARED "")
add_dependencies (ZLIB zlib-shared)
add_dependencies (zlib-shared ZLIB)
set (ZLIB_SHARED_LIBRARY "zlib-shared")
set (ZLIB_LIBRARIES ${ZLIB_LIBRARIES} ${ZLIB_SHARED_LIBRARY})
endif ()
Expand Down
2 changes: 1 addition & 1 deletion hl/tools/gif2h5/decompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ Decompress(GIFIMAGEDESC *GifImageDesc, GIFHEAD *GifHead)
* chain puts its associated output code on the output queue.
*/
while (CurCode > DataMask) {
if (OutCount > 1024) {
if (OutCount >= 1024) {
/*return error message*/
}

Expand Down
4 changes: 2 additions & 2 deletions java/src/hdf/hdf5lib/H5.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
* exception handlers to print out the HDF-5 error stack.
* <hr>
*
* @version HDF5 1.11.3 <BR>
* @version HDF5 1.11.4 <BR>
* <b>See also: <a href ="./hdf.hdf5lib.HDFArray.html"> hdf.hdf5lib.HDFArray</a> </b><BR>
* <a href ="./hdf.hdf5lib.HDF5Constants.html"> hdf.hdf5lib.HDF5Constants</a><BR>
* <a href ="./hdf.hdf5lib.HDF5CDataTypes.html"> hdf.hdf5lib.HDF5CDataTypes</a><BR>
Expand All @@ -237,7 +237,7 @@ public class H5 implements java.io.Serializable {
*
* Make sure to update the versions number when a different library is used.
*/
public final static int LIB_VERSION[] = { 1, 11, 3 };
public final static int LIB_VERSION[] = { 1, 11, 4 };

public final static String H5PATH_PROPERTY_KEY = "hdf.hdf5lib.H5.hdf5lib";

Expand Down
4 changes: 2 additions & 2 deletions java/test/TestH5.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public void testH5set_free_list_limits() {
*/
@Test
public void testH5get_libversion() {
int libversion[] = { 1, 11, 3 };
int libversion[] = { 1, 11, 4 };

try {
H5.H5get_libversion(libversion);
Expand All @@ -184,7 +184,7 @@ public void testH5get_libversion() {
*/
@Test
public void testH5check_version() {
int majnum = 1, minnum = 11, relnum = 3;
int majnum = 1, minnum = 11, relnum = 4;

try {
H5.H5check_version(majnum, minnum, relnum);
Expand Down
5 changes: 2 additions & 3 deletions release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,9 @@ Supported Platforms

Windows 7 Visual Studio 2015 w/ Intel Fortran 16 (cmake)

Windows 7 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake)
Visual Studio 2013 w/ Intel Fortran 15 (cmake)
Windows 7 x64 Visual Studio 2013
Visual Studio 2015 w/ Intel Fortran 16 (cmake)
Visual Studio 2015 w/ Intel C, Fortran 2017 (cmake)
Visual Studio 2015 w/ Intel C, Fortran 2018 (cmake)
Visual Studio 2015 w/ MSMPI 8 (cmake)

Windows 10 Visual Studio 2015 w/ Intel Fortran 18 (cmake)
Expand Down
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,7 @@ option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
#-----------------------------------------------------------------------------
set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c)

add_custom_target (gen_${HDF5_LIB_TARGET} ALL DEPENDS ${gen_SRCS})
add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
target_include_directories(${HDF5_LIB_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
Expand All @@ -1057,12 +1058,14 @@ target_link_libraries (${HDF5_LIB_TARGET}
set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC 0)
set_target_properties (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries)
add_dependencies (${HDF5_LIB_TARGET} gen_${HDF5_LIB_TARGET})

set (install_targets ${HDF5_LIB_TARGET})

if (BUILD_SHARED_LIBS)
set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c)

add_custom_target (gen_${HDF5_LIBSH_TARGET} ALL DEPENDS ${shared_gen_SRCS})
add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
target_include_directories(${HDF5_LIBSH_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
Expand All @@ -1087,6 +1090,7 @@ if (BUILD_SHARED_LIBS)
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED "LIB")
set_target_properties (${HDF5_LIBSH_TARGET} PROPERTIES FOLDER libraries)
add_dependencies (${HDF5_LIBSH_TARGET} gen_${HDF5_LIBSH_TARGET})

set (install_targets ${install_targets} ${HDF5_LIBSH_TARGET})
endif ()
Expand Down
2 changes: 2 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ endif ()
#################################################################################
# If filter plugin tests can be tested
#################################################################################
if (BUILD_SHARED_LIBS)
# make plugins dir
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/filter_plugin_dir1")
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/filter_plugin_dir2")
Expand Down Expand Up @@ -159,6 +160,7 @@ endif ()
"${CMAKE_BINARY_DIR}/vol/$<TARGET_FILE_NAME:${HDF5_VOL_PLUGIN_LIB_TARGET}>"
)
endforeach ()
endif ()

#################################################################################
# Test program sources
Expand Down
36 changes: 19 additions & 17 deletions test/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1030,29 +1030,31 @@ endif ()
##############################################################################
### F I L T E R P L U G I N T E S T S
##############################################################################
if (WIN32)
set (CMAKE_SEP "\;")
set (BIN_REL_PATH "../../")
else ()
set (CMAKE_SEP ":")
set (BIN_REL_PATH "../")
endif ()
if (BUILD_SHARED_LIBS)
if (WIN32)
set (CMAKE_SEP "\;")
set (BIN_REL_PATH "../../")
else ()
set (CMAKE_SEP ":")
set (BIN_REL_PATH "../")
endif ()

add_test (NAME H5PLUGIN-filter_plugin COMMAND $<TARGET_FILE:filter_plugin>)
set_tests_properties (H5PLUGIN-filter_plugin PROPERTIES
ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/filter_plugin_dir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/filter_plugin_dir2;srcdir=${HDF5_TEST_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
)
add_test (NAME H5PLUGIN-filter_plugin COMMAND $<TARGET_FILE:filter_plugin>)
set_tests_properties (H5PLUGIN-filter_plugin PROPERTIES
ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/filter_plugin_dir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/filter_plugin_dir2;srcdir=${HDF5_TEST_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
)

##############################################################################
# HDFFV-9655 relative plugin test disabled
#
#add_test (NAME H5PLUGIN-pluginRelative COMMAND $<TARGET_FILE:plugin>)
#set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES
# ENVIRONMENT "HDF5_PLUGIN_PATH=@/${BIN_REL_PATH}testdir1${CMAKE_SEP}@/${BIN_REL_PATH}testdir2;srcdir=${HDF5_TEST_BINARY_DIR}"
# WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
#)
# add_test (NAME H5PLUGIN-pluginRelative COMMAND $<TARGET_FILE:plugin>)
# set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES
# ENVIRONMENT "HDF5_PLUGIN_PATH=@/${BIN_REL_PATH}testdir1${CMAKE_SEP}@/${BIN_REL_PATH}testdir2;srcdir=${HDF5_TEST_BINARY_DIR}"
# WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
# )
##############################################################################
endif ()

if (TEST_SHELL_SCRIPTS)
include (ShellTests.cmake)
Expand Down
8 changes: 6 additions & 2 deletions tools/lib/h5diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,15 @@ build_match_list (const char *objname1, trav_info_t *info1, const char *objname2
int cmp;
trav_table_t *table = NULL;
size_t idx;
int ret_value = 0;

h5difftrace("build_match_list start\n");
/* init */
trav_table_init(&table);
if (table == NULL)
H5TOOLS_INFO(H5E_tools_min_id_g, "Cannot create tarverse table");
if (table == NULL) {
H5TOOLS_INFO(H5E_tools_min_id_g, "Cannot create traverse table");
HGOTO_DONE(-1);
}
/*
* This is necessary for the case that given objects are group and
* have different names (ex: obj1 is /grp1 and obj2 is /grp5).
Expand Down Expand Up @@ -367,6 +370,7 @@ build_match_list (const char *objname1, trav_info_t *info1, const char *objname2

free_exclude_path_list (opts);

done:
*table_out = table;
h5difftrace("build_match_list finish\n");
}
Expand Down
32 changes: 16 additions & 16 deletions tools/lib/h5tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -1241,10 +1241,10 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
H5T_class_t type_class;

if((size = H5Tget_size(tid)) == 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_size failed")

if((type_class = H5Tget_class(tid)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_class failed");
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_class failed")

switch (type_class) {
case H5T_INTEGER:
Expand All @@ -1264,7 +1264,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
bytes_wrote = HDfwrite(mem, 1, bytes_in, stream);

if(bytes_wrote != bytes_in || (0 == bytes_wrote && HDferror(stream)))
H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed");
H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed")

block_index -= (hsize_t)bytes_wrote;
mem = mem + bytes_wrote;
Expand All @@ -1287,15 +1287,15 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
if (s != NULL)
size = HDstrlen(s);
else
H5E_THROW(FAIL, H5E_tools_min_id_g, "NULL string");
H5E_THROW(FAIL, H5E_tools_min_id_g, "NULL string")
}
else {
s = (char *) mem;
}
for (i = 0; i < size && (s[i] || pad != H5T_STR_NULLTERM); i++) {
HDmemcpy(&tempuchar, &s[i], sizeof(unsigned char));
if (1 != HDfwrite(&tempuchar, sizeof(unsigned char), 1, stream))
H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed");
H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed")
} /* i */
} /* for (block_index = 0; block_index < block_nelmts; block_index++) */
}
Expand All @@ -1306,7 +1306,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
unsigned nmembs;

if((snmembs = H5Tget_nmembers(tid)) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers of compound failed");
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Tget_nmembers of compound failed")
nmembs = (unsigned)snmembs;

for (block_index = 0; block_index < block_nelmts; block_index++) {
Expand All @@ -1322,7 +1322,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t

if (render_bin_output(stream, container, memb, mem + offset, 1) < 0) {
H5Tclose(memb);
H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output of compound member failed");
H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output of compound member failed")
}

H5Tclose(memb);
Expand Down Expand Up @@ -1350,15 +1350,15 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
}
else {
H5Tclose(memb);
H5E_THROW(FAIL, H5E_tools_min_id_g, "calculate the number of array elements failed");
H5E_THROW(FAIL, H5E_tools_min_id_g, "calculate the number of array elements failed")
}

for (block_index = 0; block_index < block_nelmts; block_index++) {
mem = ((unsigned char*)_mem) + block_index * size;
/* dump the array element */
if (render_bin_output(stream, container, memb, mem, nelmts) < 0) {
H5Tclose(memb);
H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output failed");
H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output failed")
}
}
H5Tclose(memb);
Expand All @@ -1380,7 +1380,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
/* dump the array element */
if (render_bin_output(stream, container, memb, ((char *) (((hvl_t *) mem)->p)), nelmts) < 0) {
H5Tclose(memb);
H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output failed");
H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output failed")
}
}
H5Tclose(memb);
Expand Down Expand Up @@ -1426,15 +1426,15 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
for (block_index = 0; block_index < block_nelmts; block_index++) {
mem = ((unsigned char*)_mem) + block_index * size;
if (size != HDfwrite(mem, sizeof(char), size, stream))
H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed");
H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed")
} /* end for */
break;

case H5T_NO_CLASS:
case H5T_NCLASSES:
default:
/* Badness */
H5E_THROW(FAIL, H5E_tools_min_id_g, "bad type class");
H5E_THROW(FAIL, H5E_tools_min_id_g, "bad type class")
break;
} /* end switch */

Expand Down Expand Up @@ -1562,12 +1562,12 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id,
hid_t type_id = -1;

if((snblocks = H5Sget_select_hyper_nblocks(region_space)) <= 0)
H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_select_hyper_nblocks failed");
H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_select_hyper_nblocks failed")
nblocks = (hsize_t)snblocks;

/* Print block information */
if((sndims = H5Sget_simple_extent_ndims(region_space)) < 0)
H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed")
ndims = (unsigned)sndims;

alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]);
Expand Down Expand Up @@ -1683,12 +1683,12 @@ render_bin_output_region_points(hid_t region_space, hid_t region_id,
hid_t type_id = -1;

if((snpoints = H5Sget_select_elem_npoints(region_space)) <= 0)
H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_select_elem_npoints failed");
H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_select_elem_npoints failed")
npoints = (hsize_t)snpoints;

/* Allocate space for the dimension array */
if((sndims = H5Sget_simple_extent_ndims(region_space)) < 0)
H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed")
ndims = (unsigned)sndims;

if((dtype = H5Dget_type(region_id)) < 0)
Expand Down
Loading

0 comments on commit 140f72b

Please sign in to comment.