Commit Graph

6681 Commits

Author SHA1 Message Date
Quincey Koziol
904ade0c86 [svn-r2716] Purpose:
Increase constant for H5S_MAX_RANK from 31 -> 32
Description:
    To better align the HDF5 library's maximum dimenions with HDF4 and netCDF,
    the maximum number of dimensions has been increased to 32.
Platforms Tested:
    FreeBSD 4.1.1 (hawkwind)
    Solaris 2.5 (baldric)
2000-10-20 15:55:12 -05:00
Quincey Koziol
79d1d8258f [svn-r2711] Purpose:
Bug fix.
Description:
    When the maximum number of elements in a fixed size, free-list managed array
    was allocated, the free-list code was writing off the end of the array.
Solution:
    Changed definition of free-list managed arrays to allocate correct space for
    the array.
Platforms tested:
    Solaris 2.5 (baldric) w/Purify
2000-10-20 15:34:16 -05:00
Quincey Koziol
25f38a9bd4 [svn-r2707] Purpose:
Optimization for parallel I/O
Description:
    When contiugous hyperslabs are defined (i.e. with the block=stride), the
    library was only aggregating the hyperslabs together for the fastest
    changing dimension.
Solution:
    Add some extra code to detect when contiguous hyperslabs span more than one
    row and output the entire contiguous section at once.
Platforms tested:
    FreeBSD 4.1.1 (hawkwind)
2000-10-19 15:52:29 -05:00
Quincey Koziol
4ba8f63b57 [svn-r2702] Purpose:
Code cleanup
Description:
    There's been a compiler warning about modifying a 'const' object in the
    H5T_copy routine for several years now, which a few users have reported.
Solution:
    Removed call to sort the old datatype (the const object) and changed the
    code to work with unsorted datatypes.
Platforms tested:
    FreeBSD 4.1.1 (hawkwind)
2000-10-19 12:41:30 -05:00
Quincey Koziol
95445613ca [svn-r2699] Purpose:
Bug fix
Description:
    "Time" datatypes (H5T_UNIX_D*) were not being stored and retrieved in
    the datatype object header message correctly.
Solution:
    Store endian-ness and precision in the datatype object header message and
    added test to continue to track them working correctly.

    This fixes bug #512.

Platforms tested:
    FreeBSD 4.1.1 (hawkwind)
2000-10-19 11:42:33 -05:00
Quincey Koziol
29c5ab73e4 [svn-r2694] Purpose:
Bug fix
Description:
    H5Sget_simple_extent_npoints return type is hsize_t and the error value is
    0, but it is possible to have 0 points in a dataset with an unlimited
    dimension, but no data written yet.
Solution:
    Changed H5Sget_simple_extent_npoints return type to hssize_t and the error
    value to -1
Platforms tested:
    FreeBSD 4.1.1 (hawkwind)
2000-10-18 11:43:40 -05:00
Quincey Koziol
07d218b717 [svn-r2693] Purpose:
Bug fix (bug #446)
Description:
    H5Tget_offset return type was size_t and the error return value was 0, but
    0 is also a valid successful return value.
Solution:
    Changed the return type to int and the error return value to -1
Platforms tested:
    FreeBSD 4.1.1 (hawkwind)
2000-10-18 11:22:45 -05:00
Quincey Koziol
2011215517 [svn-r2689] Purpose:
Bug fix.
Description:
    Previously, it has been possible to dereference deleted objects in a file.
    Obviously, this is incorrect and could cause all sorts of problems if the
    object being dereferenced had been partially over-written with other
    information.  - This is documented in Bug #493.
Solution:
    Check the link count for objects being dereferenced and don't allow any
    objects with link counts of zero to be dereferenced.

    This fixes bug #493.

Platforms tested:
    FreeBSD 4.1.1 (hawkwind)
2000-10-17 15:46:57 -05:00
MuQun Yang
f53e72cc9f [svn-r2679]
Purpose:
    Just add a few lines so that it will not break windows platform.
Description:
     netdb.h cannot be recognized by windows, use winsock.h in windows instead.
Solution:
        adding  the following lines at the beginning of H5FDstream.c.
         If you don't like, you may do it in another way, just keep it work for windows.
       #ifdef WIN32
> #include <winsock.h>
> #else
> #endif

Platforms tested:
    I am only testing whether it will bother building objects on windows. I haven't tested whether it
will affect the testing results. Hopefully not.
    windows 2000, eirene,arabica,gondolin,paz,opus.
2000-10-12 18:38:33 -05:00
Quincey Koziol
64b8f7fd73 [svn-r2657]
Purpose:
    Parallel Bug Fixes
Description:
    Was out of sync with header file re-arrangements I checked in last night.

Solution:
    Fixed to use new header files, etc.
Platforms tested:
	O2K (modi4)
2000-10-10 15:55:54 -05:00
Quincey Koziol
4643449966 [svn-r2656] Purpose:
Bug Fix
Description:
    When parallel I/O is turned on, there were some macros used in the H5D
    routines which poked around in the H5F_t structure.  This breaks the
    privacy of that structure and ties the H5D code too tightly to the H5F_t
    struct.
Solution:
    Added a small function to retrieve the the value (driver_id) needed from
    the H5F_t function.
Platforms tested:
    Eyeballed only, Albert needs this right away...
2000-10-10 14:55:09 -05:00
Quincey Koziol
ba28c64ba7 [svn-r2652] Purpose:
Maintainance & performance enhancements
Description:
    Re-arranged header files to protect private symbols better.

    Changed optimized regular hyperslab I/O to compute the offsets more
    efficiently from previous method of using matrix operations.

    Added sequential I/O operations at a more abstract level (at the same level
    as H5F_arr_read/write), to support the optimized hyperslab I/O.

Platforms tested:
    Solaris 2.6 (baldric) & FreeBSD 4.1.1 (hawkwind)
2000-10-10 02:43:38 -05:00
Albert Cheng
a1e44979ed [svn-r2647] Purpose:
Bug fiX
Description:
    H5S_hyper_select_valid would report hyperslab invalid if the one of
    the count values is zero.  The verifying algorithm did not take into
    consideration that block or count can contain zeros to indicate no
    element is wanted.
Solution:
    Added code to test if block or count is zero.  If so, skip the rest
    of the validity check.
Platforms tested:
    IRIX64 -64.
2000-10-09 21:45:05 -05:00
Albert Cheng
884b83d606 [svn-r2646] Purpose:
Bug fix (done by Kim Yates)
Description:
    The optimized mpio code was broken and when read was done, it hanged.
Solution:
H5FDmpio.c:
    In H5FD_mpio_write, moved the 16-line block of code in which
    all procs other than p0 skip the actual write
    to be just before the call to MPI_File_write_at.
    Previously, the values of the local vars that controlled
    "allsame" were not always set correctly when the moved block
    was reached.
H5S.c:
    Changed default value of H5_mpi_opt_types_g to TRUE, so that
    the MPI-IO hyperslab code is executed by default in parallel HDF5,
    rather than executing the serial hyperslab code.
H5Smpio.c:
    In function H5S_mpio_hyper_type, added a call to free
    an intermediate type. Cures a small memory leak.
    Added code for cases of empty hyperslab
    Changed displacements to be MPI_Aint
Platforms tested:
    modi4 -64: worked fine with mpich 1.2.0 but failed with the messages
    saying it ran out of entries for MPI_Types during the collective_read
    test.  After tracing the code all the way to the collective read, all
    MPI Types have been freed properly.  It aborted with the above message
    when it executed the line
if (MPI_SUCCESS!= MPI_File_read_at_all(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat ))
    Could not see any problem with this line.  It could be a bug in the
    SGI version of MPI.
2000-10-09 21:32:45 -05:00
Albert Cheng
d68bdee92f [svn-r2645]
Purpose:
    [is this a bug fix? feature? ...]
Description:
    [describe the bug, or describe the new feature, etc]
Solution:
    [details about the changes, algorithm, etc...]
    [Please as detail as you can since your own explanation is
    better than others guessing it from the code.]
Platforms tested:
    [machines you have tested the changed version.  This is absolute
    important.  Test it out on at least two or three different platforms
    such as Big-endian-32bit (SUN/IRIX), little-endian-32(LINUX) and
    64-bit (IRIX64/UNICOS/DEC-ALPHA) would be good.]
2000-10-09 21:21:38 -05:00
HDF Admin
4cbf6b8b9e [svn-r2638] Snapshot version 1.3 release 31 2000-10-07 02:10:04 -05:00
Quincey Koziol
3c2e39acd1 [svn-r2633] Purpose:
Bug Fix
Description:
    Use H5FD_get_eoa instead of H5FD_get_eof to check for reading off the end
    of the allocated file space.  Using H5FD_get_eof was causing the Stream
    VFD to fail.
Solution:
    Switched from using H5FD_get_eof to H5FD_get_eoa
Platforms tested:
    FreeBSD 4.1.1 (hawkwind)
2000-10-04 17:43:11 -05:00
Thomas Radke
58a9ecf653 [svn-r2631]
Purpose:
    Bugfix
Description:
    The Stream VFD was leaking memory on every opened file.
Solution:
    In H5FD_stream_close(), finally free the file structure used to describe
    the closed file.
Platforms tested:
    Linux, SGI
2000-10-04 11:20:20 -05:00
Quincey Koziol
b53bfca418 [svn-r2611] Purpose:
Rearrange code
Description:
    The data sieve buffering code for contiguously stored datasets was
    wedged in the H5F_arr_read/H5F_arr_write routines.
Solution:
    Created a new H5Fcontig.c to hold I/O routines for contiguously stored
    datasets (like H5Fistore.c for chunked dataset I/O routines) and moved
    data sieving code into those routines.
Platforms tested:
    Solaris 2.6 (i.e. baldric)
2000-09-28 14:12:43 -05:00
Quincey Koziol
a9afb07bd8 [svn-r2610] Purpose:
Code Optimization.
Description:
    The optimized routines for copying regular hyperslabs in memory have been
    using the same matrix routines to copy their hyperslab pieces as the
    routines for irregularly shaped hyperslabs.  This ends up imposing lots of
    extra overhead on the optimized routine, since it basically "knows" all the
    matrix information it needs.
Solution:
    Keep track of the [small] amount of matrix information necessary to perform
    the regular hyperslab copies in the optimized routines themselves instead of
    using the matrix routines.  This improves the performance for the benchmark
    I'm running from ~18 seconds to ~12 seconds and should apply to parallel
    I/O situations also.
Platforms tested:
    Solaris 2.6 (i.e. baldric)
2000-09-28 12:03:32 -05:00
Quincey Koziol
9e4665ba8c [svn-r2606] Purpose:
Code Optimization
Description:
    The matrix operations are currently the hot-spot in the library code
    for regular hyperslab operations.
Solution:
    Unrolled loops for 3 of the more heavily used functions
    (H5V_stride_optimize2, H5V_hyper_stride & H5V_hyper_copy) for the common
    cases (i.e. up to 3-D datasets).  This squeezes some more blood out of
    the stone (turnip? :-) and improves the h5hypers.c benchmark on baldric
    by another 20-25%.
Platforms tested:
    Solaris 2.6 (i.e. baldric)
2000-09-27 13:23:40 -05:00
Quincey Koziol
1d02d3268e [svn-r2601] Purpose:
Bug Fix
Description:
    The core and log VFL drivers were leaking small amounts of memory when they
    were used.
Solution:
    Free the appropriate memory block (for the core driver) and don't allocate
    a block (for the log driver).
Platforms tested:
    Solaris 2.6 (i.e. baldric)
2000-09-26 22:46:39 -05:00
Quincey Koziol
183c8245af [svn-r2600] Purpose:
Implemented new feature
Description:
    Added data sieve buffering code to raw I/O data path.  This is enabled for
    all the VFL drivers except the mpio & core drivers.  Also added two new
    API functions to control the sieve buffer size: H5Pset_sieve_buf_size() and
    H5Pget_sieve_buf_size().
Platforms tested:
    Solaris 2.6 (i.e. baldric)
2000-09-26 17:50:18 -05:00
Quincey Koziol
a61b205aff [svn-r2597] Purpose:
Fix compiler warning
Description:
    "HUGE_VAL" (a double value) was being put into a float type and generating
    a warning during compile time.
Solution:
    Replaced "HUGE_VAL" with "FLT_MAX"
Platforms tested:
    FreeBSD 4.1
2000-09-26 15:29:40 -05:00
Quincey Koziol
406b5334a3 [svn-r2594] Purpose:
Small Code Cleanup
Description:
    Code to optimize adjacent (i.e. contiguous) hyperslab was ugly and used too
    many temporary variables.
Solution:
    Computed the optimized hyperslabs slightly differently and got rid of
    unnecessary temporary variables.
Platforms tested:
    FreeBSD 4.1
2000-09-26 00:03:24 -05:00
HDF Admin
c2e1541f99 [svn-r2588] Snapshot version 1.3 release 30 2000-09-23 02:08:22 -05:00
Quincey Koziol
7bd50661fe [svn-r2587] Purpose:
Bug fix (sorta)
Description:
    When the stride and block size of a hyperslab selection are equal, the
    blocks that are selected are contiguous in the dataset.  Prior to my
    hyperslab optimizations, this situation used to be detected and somewhat
    optimized to improve performance.  I've added more code to optimize for
    this situation and integrated it with the new hyperslab optimization that
    weren't very efficient for that case as they should have been.
Solution:
    Detect contiguous hyperslab selections (i.e. block size in a dimension is
    the same as the stride in that dimension) and store the optimized,
    contiguous version of that hyperslab.  We also store the original, un-
    optimized version of the hyperslab to give back to the user if they query
    the hyperslab selection they just made.
Platforms tested:
    FreeBSD 4.1
2000-09-22 14:28:05 -05:00
Bill Wendling
57ed75800a [svn-r2586] Purpose:
Bug Fix
Description:
	The prototype for the H5Pregister function has a variable named
	`class'. This is a reserved word in C++ and causes the C++
	compiler to freak.
Solution:
	This variable's name was changed to cls_id in the .c file, so I
	changed it in the header file to cls_id to match.
Platforms tested:
	Linux
2000-09-22 10:29:47 -05:00
Quincey Koziol
88f539bf15 [svn-r2583] Purpose:
Bug Fix.
Description:
    An assertion in the local heap code was mistakenly checking against too
    large of a value for the size of new local heap created.  When used with
    larger-sized (>10KB) variable-length objects, it was failing the check.
Solution:
    Corrected to check against the actual size of the heap allocated, without
    the heap header.
Platforms tested:
    FreeBSD 4.1
2000-09-20 14:26:18 -05:00
Quincey Koziol
e9653cbbf3 [svn-r2581] Purpose:
Clean up compiler warnings.
Platforms tested:
    FreeBSD 4.1
2000-09-19 17:11:52 -05:00
Quincey Koziol
8f171ba985 [svn-r2580] Purpose:
Restore file
Description:
    It appears that Robb's checkin earlier today erroneously overwrote this
    file with an older version... *grumble*
Solution:
    Found another copy of newest version, verified that it is operating
    correctly and re-checked it in.
Platforms tested:
    FreeBSD 4.1
2000-09-19 16:46:28 -05:00
Quincey Koziol
22867dca0e [svn-r2579] Purpose:
Clean up small compiler warnings and add missing function prototypes.
Platforms tested:
    FreeBSD 4.1
2000-09-19 16:08:15 -05:00
Bill Wendling
8272da0b67 [svn-r2574] Purpose:
H5FDstream.h needs to be installed.
Description:
	H5FDstream.h is included in the hdf5.h file and needs to be
	installed with the other public headers.
Solution:
	Added it to the rest of the install headers.
2000-09-19 12:42:50 -05:00
Robb Matzke
f2caef690b [svn-r2573] Purpose:
Fix Irix pmake bugs
Description:
	Build fails on Irix when builddir != srcdir
Solution:
	* acconfig.h
	* src/H5config.h.in			[REGENERATED]
		Added definition for HAVE_STREAM

	* config/conclude.in
	* config/depend1.in
	* config/depend2.in
	* config/depend3.in
	* config/depend4.in
		The `Dependencies' file is located in the source
		tree. This fixes bugs for Irix pmake when compiling
		outside the source tree.  Hopefully it still preserves
		Albert's changes which allow concurrent compilations
		to not stomp on each other's Dependencies files.


	* examples/Dependencies			[REGENERATED]
	* src/Dependencies			[REGENERATED]
	* test/Dependencies			[REGENERATED]
	* tools/Dependencies			[REGENERATED]
		Regenerated for testing purposes.
Platforms:
	i686-pc-linux
	mips-sgi-irix6.5
	sparc-sun-solaris2.6
2000-09-19 12:04:46 -05:00
Thomas Radke
bc5f379e7d [svn-r2560] Purpose:
Include the Stream VFD's header file H5FDstream.h.

Description:
     All the VFD's header files are included by hdf5.h itself for convenience.
2000-09-15 06:51:28 -05:00
Thomas Radke
c275f5e9c7 [svn-r2559] Purpose:
Add the Stream VFD sources to the appropriate makefile variables.

Description:
     Added H5FDstream.c to the LIB_SRC variable and H5FDstream.h
     to the PUB_HDR variable for building the Stream VFD.
2000-09-15 06:49:28 -05:00
Thomas Radke
e8e9d7b5ac [svn-r2558] Purpose:
Define HAVE_STREAM.

Description:
     If the Stream VFD was configured the configured script
     will expand this into
       '#define HAVE_STREAM 1' in H5config.h and
       '#define H5_STREAM 1'   in H5pubconf.h.
2000-09-15 06:47:08 -05:00
Thomas Radke
b4844aabb3 [svn-r2557] Purpose:
Added registration of the Stream Virtual File Driver.

Description:
     The Stream VFD is registered here if it was configured.
2000-09-15 06:42:53 -05:00
Thomas Radke
5a4c55b42c [svn-r2555] Purpose:
Added source files for the Stream Virtual File Driver.

Description:
     The Stream VFD allows users to stream complete HDF5 files
     via socket connections between different applications.

     Files which were created anew are flushed to any connected client
     on each H5Fflush() or H5Fclose() operation.
     Files which are opened as read-only will be read from a socket
     on a H5Fopen() call.

     The driver's H5FDset_fapl_stream() routine allows to pass in
     several parameters such as an external socket descriptor,
     some socket options, and flags for broadcasting a received file.
     If an external socket is provided the Stream VFD would use that
     for the socket calls. Otherwise it parses the filename argument
     in H5Fcreate()/H5Fopen() for a 'hostname::port' parameter.

     All files processed by the Stream VFD are kept in memory
     (same way as the core VFD does).

Platforms:
     Tested so far under Linux, Irix 32/64bit, OSF1, Solaris, Cray Unicos,
     Hitachi SR8000, IBM AIX.
     Not tested under Windows yet.
2000-09-15 06:35:39 -05:00
Quincey Koziol
a4d73cc16b [svn-r2551] Purpose:
Fix last couple of errors from introducing "regular" hyperslab feature
into the library.

Description:
    Code was blindly dereferencing data structures which aren't defined when
operating on regular hyperslabs.

Solution:
    Check for regular hyperslab defined and retrieve information from regular
hyperslab info instead of mucking about in other hyperslab information.

Platforms:
    Solaris 2.6
2000-09-14 17:54:21 -05:00
Bill Wendling
29a7f62218 [svn-r2548] Added #include <sys/resource.h> for the struct getrusage declaration.
Przemek Klosowski, Ph.D. <przemek@nist.gov> reported this problem on
Linux RH 6.1 systems.
2000-09-14 12:15:12 -05:00
Quincey Koziol
85a08f5bc9 [svn-r2546] Further patches to accomodate regular hyperslabs. More of the tests are
passing, but not all of them yet...
2000-09-13 18:49:54 -05:00
Quincey Koziol
1f109221df [svn-r2544] Optimized regular hyperslab I/O routines and data structures. On my benchmarks,
they are about 4-5 times faster than before.  We no longer generate "general"
hyperslab data structures for regular hyperslabs, the general data structures
are only generated when needed for irregular hyperslabs.

Still fixing a couple of nook-and-cranny functions to understand the new
information for the regular hyperslabs, so the tests aren't completely passing,
but I wanted to get this checked in for Elena's benchmarks.  I should have
more/all tests passing later today.
2000-09-13 16:58:18 -05:00
Albert Cheng
61e517a4b0 [svn-r2519] Snapshot version 1.3 release 29 2000-09-06 16:15:35 -05:00
Quincey Koziol
c0ec9f92a6 [svn-r2518] Backed out patch from user after further testing... 2000-09-06 15:30:00 -05:00
Bill Wendling
681b630ea5 [svn-r2517] Removed the incorrect #ifdef's. Since this file is generated from
autoheader, it was useless to add them in here...
2000-09-06 13:32:45 -05:00
Bill Wendling
a56d88a99a [svn-r2515] Added macros around the inline #define since this is a keyword in C++
and, when adding the header to a C++ program, breaks it.
2000-09-06 11:15:18 -05:00
Quincey Koziol
e5deb6dbba [svn-r2511] Fix point selections so they work properly with both staticly and dynamicly
allocated memory.
2000-09-06 10:44:07 -05:00
Quincey Koziol
24b64938a1 [svn-r2510] Took memory allocation out of loop and used some temporary variable instead of
multi-dereferenced pointer chains.  This buys us another ~20% improvement in
the hyperslab I/O speed. (From ~30 seconds to ~25 seconds on the h5hypers
benchmark)
2000-09-06 10:36:37 -05:00
Quincey Koziol
25ee8b4e8f [svn-r2509] Change code so that heap_size wasn't zero. 2000-09-06 10:34:30 -05:00