Code cleanup
Description:
Fix a bunch of warnings flagged by Windows compilers.
Platforms tested:
FreeBSD 4.11 (sleipnir)
Too minor to require h5committest
New feature
Description:
Check in baseline for compact group revisions, which radically revises the
source code for managing groups and object headers.
WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!!
WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!!
This initiates the "unstable" phase of the 1.7.x branch, leading up
to the 1.8.0 release. Please test this code, but do _NOT_ keep files created
with it - the format will change again before the release and you will not
be able to read your old files!!!
WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!!
WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!!
Solution:
There's too many changes to really describe them all, but some of them
include:
- Stop abusing the H5G_entry_t structure and split it into two separate
structures for non-symbol table node use within the library: H5O_loc_t
for object locations in a file and H5G_name_t to store the path to
an opened object. H5G_entry_t is now only used for storing symbol
table entries on disk.
- Retire H5G_namei() in favor of a more general mechanism for traversing
group paths and issuing callbacks on objects located. This gets us out
of the business of hacking H5G_namei() for new features, generally.
- Revised H5O* routines to take a H5O_loc_t instead of H5G_entry_t
- Lots more...
Platforms tested:
h5committested and maybe another dozen configurations.... :-)
Bug fix & code cleanup
Description:
Address most of datatype conversion exception handling bug that Ed
Hartnett reported. (He's reported a different problem now, but we're closer
at least).
Also, condense exception handling #ifdef's into one location instead of
spread out in so many places.
Platforms tested:
FreeBSD 4.11 (sleipnir)
Too minor to require h5committest
Code cleanup
Description:
Trim trailing whitespace, which is making 'diff'ing the two branches
difficult.
Solution:
Ran this script in each directory:
foreach f (*.[ch] *.cpp)
sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f
end
Platforms tested:
FreeBSD 4.11 (sleipnir)
Too minor to require h5committest
Bug fix
Description:
If a named datatype is copied and the copy is used to create a dataset,
the dataset would inadvertantly refer to the original named datatype instead
of a local (possibly modified) copy of the named datatype.
Solution:
Fixed datatype copying routine.
Platforms tested:
FreeBSD 4.11 (sleipnir)
Too minor to require h5committest
Bug fix
Description:
Add check for opaque tags that are too long for file format to handle
currently.
Platforms tested:
FreeBSD 4.11 (sleipnir)
Too minor to require h5commmitest
Description: Yesterday, dtypes.c was split into two programs, dtypes.c and dt_atomic.c.
After dt_atomic.c was added, dtypes.c remained the same as before waiting for the
daily test to pass. While dt_atomic.c turned out fine today, the test in dt_atomic.c
was taken out from dtypes.c. There's also some minor change in dt_atomic.c.
Platforms tested: h5committest
Description: In the last checkin, the fix wasn't quite correct. This round simply corrects the mistake
from last round, especially the endianess was left out.
Platforms tested: shanti, modi4, fuss - these machines cover both little and big endians.
Description: In test_conv_int_float(), when testing special floating-point value NaN, the test program
couldn't detect it for Linux Intel compiler when it's optimized. The reason is in my_isnan(), a printf
command used "%LLg" to print "long double".
Solution: Changed it to "%Lg". Also differentiate cases for NaN, using exception handler if present,
decide if software conversion set converted integer to 0, or simply skip for hardware conversion.
Platforms tested: heping - simple change.
Description: In test_conv_flt_1() in dtypes.c, the case of Intel-Linux or
AMD-Linux "long double" wasn't considered. The precision is smaller than
the size. There may be some garbage left in the unused bytes during hardware
conversion.
Solution: Clear those bytes before comparison.
Platforms tested: h5committest and mir, modi4.
Description: The 5th step of changing conversion test. This checkin is only for conversion
of special values between floating-point types.
Solution: This test is seperated from regular value conversion. It reuse the same function
test_conv_flt_1() in test/dtypes.c. The source buffer of floating-point type is filled up
with 8 special values, +/-0, +/-infinity, +/-QNaN, +/-SNaN.
Platforms tested: h5committest, fuss, and modi4.
Description: The 4th step of change conversion test. This checkin is only for
conversion between floating-point numbers.
Solution: The source buffer of floating-point number is filled up in the same
way described in the 3rd step(revision 1.155).
Platforms tested: h5committest and fuss.
Description: This commit is actually revision 1.155, which is the 3rd step of
changing conversion test. It's for conversion from floating-point to integer.
In this step, the source buffer is filled in with normalized and denormalized
floating-point values. For the normalized values, it starts from FLT(DBL, or
LDBL)_MIN, multiplied by 10(10000 for double, 100000000 for long double) for
the next value, until reaches to FLT_MAX. For denormalized values, the
exponent part is always 0. Mantissa part starts with 000...001, 000...011,
000...111, until reaches to 111...111. The same is with negative values.
There're also fixes in config/hpux11.00 for kelgia where default macro table
size wasn't big enough to handle the big macro in dtypes.c.
Platforms tested: h5committest and kelgia.
Description: Reverse the 3rd step of change just checked in yesterday(revision 1.155) because of some errors
in daily test. Use the revision 1.154 for now until the problem is fixed.
Platforms tested: fuss - simple rolled back to previous revision.
Description: This is the 3rd step of change conversion test. This checkin is
only for conversion from floating-point to integer.
Solution: The source buffer is filled in with normalized and denormalized
floating-point values. For the normalized values, it starts from FLT(DBL, or
LDBL)_MIN, multiplied by 10(10000 for double, 100000000 for long double) for
the next value, until reaches to FLT_MAX. For denormalized values, the
exponent part is always 0. Mantissa part starts with 000...001, 000...011,
000...111, until reaches to 111...111. The same is with negative values.
Platforms tested: h5committest and fuss.
Description: This is the 2nd step of changing conversion test. This checkin is
only for conversion from integer to floating number. The source buffer of
integer is filled up in the same way described in the last checkin(revision
1.153).
Platforms tested: fuss, sol, and heping - copper was down. Couldn't do
h5committest.
Description: This is the first step of changing conversion test. This checkin is only for conversion
between integers. Instead of filling source buffer with randomly generated bit pattern, this new way
uses more sensible bit patterns. It's easier to see using "char" as source for example. The bit patterns
will be
00000001, 00000010, 00000100, 00001000, 00010000, 00100000, 01000000, 10000000
00000000, 00000011, 00000111, 00001111, 00011111, 00111111, 01111111, 11111111
11111111, 11111110, 11111100, 11111000, 11110000, 11100000, 11000000, 10000000
The main point of this way is to avoid casting and comparison between source and destination types by
compiler. The bit patterns will cover positive maximum and minimum, negative maximum and minimum if
the source is signed integer.
Platforms tested: h5committest and fuss.
Description: Somehow, the hardware conversions between "long double" and other native floating-point
types were left out.
Solution: Added the hardware conversion functions in H5Tconv.c and test cases in dtypes.c.
Platforms tested: h5committest and fuss.
Misc. update: updated MANIFEST to replace bin/reconfigure.sh with bin/reconfigure
Description: The library didn't handle incorrect hardware conversion for datatype. It simply did
convert to incorrect data if any hardware didn't handle correctly.
Solution: During configuration, incorrect hardware conversion is detected and some macros are
defined. Use these macros to decide whether to register hardware conversion in H5T.c. If no hardware
conversion function is registered for certain pair of datatypes, software conversion function will
be used as the conversion path. Although slower than hardware conversion, we're more confident
software conversion is accurate.
So in one sentence to describe library's behavior, if some hardware conversion doesn't work well,
software conversion will be used instead.
Platforms tested: h5committest and fuss.
Misc. update: some changes to configure's comments.
Description: For hardware conversion from integers to "long double" on AMD machine, the test
failed because the size of "long double"(can be 16 bytes) is bigger than the precision(80 bits).
There can be some garbage in the unused bytes in "long double". That caused failure during
byte comparison.
Solution: Clean these unused bytes before comparison.
Platforms tested: mir and fuss; simple change
Description: Added support of hardware conversion between "long double" and integers(mainly
in H5Tconv.c) and some test cases(mainly in test/dtypes.c).
Platforms tested: h5committest and fuss.
Misc. update: RELEASE.txt
Description: H5Tget_member_value didn't return correct value if called after
H5Tenum_valueof. It's because there's a sorting on the members of enum type in
H5Tenum_valueof which changed the order of members.
Solution: Made a copy of original type and do sorting on it to protect the
original order.
Platforms tested: fuss; tested v1.6 with h5committest
Misc. update: RELEASE.txt
Description: For variable-length string, H5Tget_class returned H5T_STRING as
its class. But H5Tdetect_class and H5Tget_member_class considered it as
H5T_VLEN. This is fixed to let all these 3 functions treat it as H5T_STRING.
Some test cases have been added to dtypes.c
Platforms tested: heping - already tested for v1.6 with h5committest
Misc. update: RELEASE.txt
Description: To avoid randomly generating NaN for "long double" during
conversion test, decrease the exponent by 1 if all exponent bits are set
1s.
Platforms tested: eirene(production) and fuss.
Description:
For Intel machines, the size of "long double" is 12 byte, precision
is 80 bits, mantissa size is 64 bits, and no normalization. So the
most significant bit of mantissa is always 1 unless the floating number
has special value. This step tries to compensate this case by turning
on the most significant bit of mantissa if the mantissa bits aren't
all 0s.
Solution:
Tries to compensate this case by turning on the most significant bit of
mantissa if the mantissa bits aren't all 0s.
Platforms tested: eirene and fuss(production enabled). Small change for
production only.
Description: Test conversion from native integer to derived floating-point type and convert back;
test conversion from derived floating-point to derived floating-point types and convert back. Fixed
a few minor bugs related to type conversion in the library.
Platforms tested: h5committest and fuss
Description: The functions for user-define floating-point type, like
H5Tset_fields, H5Tset_offset, H5Tset_precision, H5Tset_size, have some
minor bugs. For error checking, the library didn't include offset value
somehow.
Solution: Corrected those bugs.
Platforms tested: h5committest and fuss
Misc. update:
Description: There was a #ifdef statement with logical AND in it.
Solution: Change it to #if statement.
Platforms tested: sleipnir and eirene. Simple change
Description: Intel compiler on Linux has some problem to convert long double to
unsigned int correctly.
Solution: Detect the problem in configure and define a macro to skip this test
if it happens.
Platforms tested: eirene and fuss. Simple change.
Description: The fix of the loss problem of the last 2 bytes of mantissa on sleipnir has
not been successful. It happens when converting from unsigned long long to long double.
The failure has been on and off.
Solution: Hard set a macro to disable unsigned long long->long double for FreeBSD until
a good solution is found to solve this elusive problem.
Platforms tested: sleipnir and fuss. Only sleipnir is concerned.
Misc. update:
Description: the last 2 bytes of mantissa can be lost when converting from unsigned long long
to long double. In last check-in, a fix was made to ignore that precision loss. But sometimes,
the last 2 bytes are rounded up to the 3rd last byte.
Solution: Ignore the 3rd last byte, too, when comparing values.
Platforms tested: sleipnir - only this system is concerned.
Description: For FreeBSD (sleipnir), when GNU compilers do conversion from
unsigned long long to long double, the last 2 bytes of mantissa are lost.
The impact of precision loss isn't significant.
Solution: Detect this case on FreeBSD in configure, ignore it in dtypes.c
test instead of return failure.
Platforms tested: sleipnir, fuss, modi4. These systems are mainly concerned.
Description: For HP-UX 11.00, the compiler generates 'floating exception'
when converting 'long double' to most of integer types.
Solution: Define a macro for all other systems except HP-UX 11.00. Hard set
this macro to 'no' in config/hpux11.00 to skip this test for HP-UX 11.00.
Platforms tested: modi4, kelgia, fuss
Description: Windows .NET 2003 can't handle float(double)->long_long hardware conversion.
While the problem hasn't been determined, we temporarily disable that test by using a
condition macro. Let Windows define that macro. Other systems don't have it defined.
Platforms tested: mir and eirene.
Description: integer->long double conversion test failed on some of Linux
systems(mir and eirene) when Intel compiler is used. I'm not able to repeat
the problem. So I just made a best guess and fix it. The problem is minor.
The long double on Linux is 12 bytes long but precision is 10 bytes. The
unused 2 bytes may have garbage in them causing value comparison wrong.
Platforms tested: mir and eirene with Intel compiler.
Description: 2 small things to correct:
1. the change in H5config.h.in was wept out by a later change.
2. long long isn't supported on Windows. It's long_long instead.
Platforms tested: fuss(linux 2.4)
Description: Start to support software conversion between long double and
all integers.
Solution: No major changes to the algorithm. Changes to configure is to
exclude SGI for long double to integers test because there're too many problems
in their compiler.
Platforms tested: h5committest, modi4, fuss, Teragrid, arabica
Misc. update: RELEASE.txt
Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-)
Description:
Generally speaking, this is the "signed->unsigned" change to selections.
However, in the process of merging code back, things got stickier and stickier
until I ended up doing a big "sync the two branches up" operation. So... I
brought back all the "infrastructure" fixes from the development branch to the
release branch (which I think were actually making some improvement in
performance) as well as fixed several bugs which had been fixed in one branch,
but not the other.
I've also tagged the repository before making this checkin with the label
"before_signed_unsigned_changes".
Platforms tested:
FreeBSD 4.10 (sleipnir) w/parallel & fphdf5
FreeBSD 4.10 (sleipnir) w/threadsafe
FreeBSD 4.10 (sleipnir) w/backward compatibility
Solaris 2.7 (arabica) w/"purify options"
Solaris 2.8 (sol) w/FORTRAN & C++
AIX 5.x (copper) w/parallel & FORTRAN
IRIX64 6.5 (modi4) w/FORTRAN
Linux 2.4 (heping) w/FORTRAN & C++
Misc. update:
Description: "char" was considered as always "signed char" in data type conversion. However, ISO C leaves
the definition of "char" to individual implementation. i.e. for IBM AIX C compiler, it's treated as "unsigned
char".
Solution: Changed all "char" to "signed char". Don't even do "char" anymore because its definition is up
to each vendor.
Platforms tested: h5committest
Bug fix
Description:
Correct a couple of array bounds issues exposed by the PGI compiler
Platforms tested:
Linux 2.4 (verbena) w/PGI compilers
Too minor too requie h5committest
Code cleanup
Description:
Clean up formatting and some mis-casts, etc.
Platforms tested:
FreeBSD 4.10 (sleipnir)
Linux 2.4 (verbena)
Solaris 2.7 (arabica)
Bug fix
Description:
Correct possible core dump when a datatype conversion function is
registered with the library after a compound datatype has been converted
(having it's type conversion information cached by the library). The compound
datatype must have been created by inserting the fields in non-increasing
offset order to see the bug.
Solution:
Re-sort the fields in the compound datatypes before recalculating the
cached information when performing the conversion on them.
Platforms tested:
FreeBSD 4.10 (sleipnir)
h5committested