diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2014-06-23 20:24:08 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2014-06-23 20:24:08 (GMT) |
commit | 9158e8aa03227a294739aed5549ab14c1d04fb5c (patch) | |
tree | b201f1d5616b04576de70d5043d196fbe199b06d /src | |
parent | 67ba5eb6e8a71a110d47fd3079edcc1fe09fb95f (diff) | |
download | hdf5-9158e8aa03227a294739aed5549ab14c1d04fb5c.zip hdf5-9158e8aa03227a294739aed5549ab14c1d04fb5c.tar.gz hdf5-9158e8aa03227a294739aed5549ab14c1d04fb5c.tar.bz2 |
[svn-r25342] Bring revisions #25120 - #25266 from trunk to revise_chunks.
Tested on jam, koala, ostrich, platypus.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 71 | ||||
-rw-r--r-- | src/H5Dchunk.c | 5 | ||||
-rw-r--r-- | src/H5FDcore.c | 8 | ||||
-rw-r--r-- | src/H5config.h.in | 3 | ||||
-rw-r--r-- | src/H5private.h | 3 | ||||
-rw-r--r-- | src/H5public.h | 4 | ||||
-rw-r--r-- | src/Makefile.in | 2 |
7 files changed, 59 insertions, 37 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2de23d8..a29cfbb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,7 +4,7 @@ PROJECT (HDF5_SRC C CXX) #----------------------------------------------------------------------------- # Apply Definitions to compiler in this directory and below #----------------------------------------------------------------------------- -add_definitions (${HDF5_EXTRA_C_FLAGS}) +add_definitions (${HDF_EXTRA_C_FLAGS}) #----------------------------------------------------------------------------- # List Source Files @@ -781,8 +781,16 @@ set (H5_PRIVATE_HEADERS # Setup the H5Detect utility which generates H5Tinit with platform # specific type checks inside #----------------------------------------------------------------------------- -add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) -TARGET_C_PROPERTIES (H5detect " " " ") +#add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) +#TARGET_C_PROPERTIES (H5detect " " " ") +IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + SET (LOCAL_OPT_FLAG "-O0") +ELSE (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + SET (LOCAL_OPT_FLAG " ") +ENDIF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) +ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c) +TARGET_C_PROPERTIES (H5detect ${LOCAL_OPT_FLAG} " ") + if (MSVC OR MINGW) target_link_libraries (H5detect "ws2_32.lib") endif (MSVC OR MINGW) @@ -810,26 +818,43 @@ add_custom_command ( WORKING_DIRECTORY ${HDF5_BINARY_DIR} ) -add_custom_command ( - TARGET ${HDF5_BINARY_DIR}/H5Edefin.h - PRE_BUILD - COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SOURCE_DIR}/src/H5err.txt - COMMENT " Creating err headers" -) - -add_custom_command ( - TARGET ${HDF5_BINARY_DIR}/H5version.h - PRE_BUILD - COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_vers ${HDF5_SOURCE_DIR}/src/H5vers.txt - COMMENT " Creating API version macro" -) - -add_custom_command ( - TARGET ${HDF5_BINARY_DIR}/H5overflow.h - PRE_BUILD - COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SOURCE_DIR}/src/H5overflow.txt - COMMENT " Creating Assignment overflow macro" -) +if (GENERATE_ERROR_HEADERS) + find_pacakge (Perl) + if (PERL_FOUND) + add_custom_command ( + OUTPUT ${HDF5_BINARY_DIR}/H5Edefin.h + PRE_BUILD + COMMAND ${PERL_EXECUTABLE} + ARGS ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SOURCE_DIR}/src/H5err.txt + DEPENDS ${HDF5_SOURCE_DIR}/src/H5err.txt + COMMENT " Creating err header" + ) + + add_custom_command ( + OUTPUT ${HDF5_BINARY_DIR}/H5version.h + PRE_BUILD + COMMAND ${PERL_EXECUTABLE} + ARGS ${HDF5_SOURCE_DIR}/bin/make_vers ${HDF5_SOURCE_DIR}/src/H5vers.txt + DEPENDS ${HDF5_SOURCE_DIR}/src/H5vers.txt + COMMENT " Creating API version macro" + ) + + add_custom_command ( + OUTPUT ${HDF5_BINARY_DIR}/H5overflow.h + PRE_BUILD + COMMAND ${PERL_EXECUTABLE} + ARGS ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SOURCE_DIR}/src/H5overflow.txt + DEPENDS ${HDF5_SOURCE_DIR}/src/H5overflow.txt + COMMENT " Creating Assignment overflow macro" + ) + + add_custom_target(run_perl_scripts ALL + DEPENDS ${HDF5_BINARY_DIR}/H5Edefin.h ${HDF5_BINARY_DIR}/H5version.h ${HDF5_BINARY_DIR}/H5overflow.h + ) + else (PERL_FOUND) + message (STATUS "Cannot generate headers - perl not found") + endif (PERL_FOUND) +endif (GENERATE_ERROR_HEADERS) #----------------------------------------------------------------------------- # Add H5Tinit source to build - generated by H5Detect/CMake at configure time diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index b9cc307..dc1df79 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -391,10 +391,9 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, hsiz if(H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, data_size, dxpl_id, buf) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data to file") - done: FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) -} +} /* end H5D__chunk_direct_write() */ /*------------------------------------------------------------------------- @@ -2945,7 +2944,7 @@ void * H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t relax, hbool_t prev_unfilt_chunk) { - const H5D_t *dset = io_info->dset; /* Local pointer to the dataset info */ + const H5D_t *dset = io_info->dset; /* Local pointer to the dataset info */ const H5O_pline_t *pline = &(dset->shared->dcpl_cache.pline); /* I/O pipeline info - always equal to the pline passed to H5D__chunk_alloc */ const H5O_pline_t *old_pline = pline; /* Old pipeline, i.e. pipeline used to read the chunk */ const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */ diff --git a/src/H5FDcore.c b/src/H5FDcore.c index d3be663..2f44d8c 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -108,9 +108,6 @@ typedef struct H5FD_core_fapl_t { /* Allocate memory in multiples of this size by default */ #define H5FD_CORE_INCREMENT 8192 -/* Define the block size for aggregation */ -//#define H5FD_CORE_BLOCK_SIZE 524288 /* 512 K */ - /* These macros check for overflow of various quantities. These macros * assume that file_offset_t is signed and haddr_t and size_t are unsigned. * @@ -226,9 +223,6 @@ H5FD_core_add_dirty_region(H5FD_core_t *file, haddr_t start, haddr_t end) fprintf(stderr, "Add region: (%llu, %llu)\n", start, end); #endif -// /* Adjust the dirty region to the nearest block boundaries */ -// if(start % H5FD_CORE_BLOCK_SIZE != 0) { -// start = (start / H5FD_CORE_BLOCK_SIZE) * H5FD_CORE_BLOCK_SIZE; /* Adjust the dirty region to the nearest block boundaries */ if(start % file->bstore_page_size != 0) { start = (start / file->bstore_page_size) * file->bstore_page_size; @@ -236,8 +230,6 @@ fprintf(stderr, "Add region: (%llu, %llu)\n", start, end); was_adjusted = TRUE; #endif } -// if(end % H5FD_CORE_BLOCK_SIZE != (H5FD_CORE_BLOCK_SIZE - 1)) { -// end = (((end / H5FD_CORE_BLOCK_SIZE) + 1) * H5FD_CORE_BLOCK_SIZE) - 1; if(end % file->bstore_page_size != (file->bstore_page_size - 1)) { end = (((end / file->bstore_page_size) + 1) * file->bstore_page_size) - 1; if(end > file->eof){ diff --git a/src/H5config.h.in b/src/H5config.h.in index 76de6c6..82925bf 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -58,6 +58,9 @@ /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM +/* Define to 1 if you have the `asprintf' function. */ +#undef HAVE_ASPRINTF + /* Define if the __attribute__(()) extension is present */ #undef HAVE_ATTRIBUTE diff --git a/src/H5private.h b/src/H5private.h index 7ed354a..af2b29a 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -542,6 +542,9 @@ typedef struct { #ifndef HDasin #define HDasin(X) asin(X) #endif /* HDasin */ +#ifndef HDasprintf + #define HDasprintf asprintf /*varargs*/ +#endif /* HDasprintf */ #ifndef HDassert #define HDassert(X) assert(X) #endif /* HDassert */ diff --git a/src/H5public.h b/src/H5public.h index 694687e..750e7ee 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -94,10 +94,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 178 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 184 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "swmr0" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.178-swmr0" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.184-swmr0" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index 355c7a2..217d417 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -735,7 +735,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 168 +LT_VERS_REVISION = 174 LT_VERS_AGE = 0 # Our main target, the HDF5 library |