Commit Graph

170 Commits

Author SHA1 Message Date
Quincey Koziol
88c15b1617 [svn-r11771] Purpose:
Code cleanup

Description:
    Fix a bunch of warnings flagged by Windows compilers.


Platforms tested:
    FreeBSD 4.11 (sleipnir)
    Too minor to require h5committest
2005-12-08 13:34:51 -05:00
Quincey Koziol
a1708eb023 [svn-r11712] Purpose:
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.... :-)
2005-11-14 21:55:39 -05:00
Quincey Koziol
01a3d9d780 [svn-r11345] Purpose:
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
2005-09-03 12:11:00 -05:00
Quincey Koziol
6b45f5172c [svn-r11245] Purpose:
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
2005-08-13 15:53:35 -05:00
Quincey Koziol
c92ac94107 [svn-r11145] Purpose:
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
2005-07-23 14:58:13 -05:00
Quincey Koziol
34bd25f361 [svn-r11144] Purpose:
New port

Description:
    Elena asked me to check in her NEC SX-6 work, so here it is! :-)

Platforms tested:
    FreeBSD 4.11 (sleipnir)
    NEC SX-6 (by Elena)
2005-07-22 20:55:12 -05:00
Quincey Koziol
7e7dd03a32 [svn-r10920] Purpose:
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
2005-06-14 16:18:32 -05:00
Raymond Lu
138abc3279 [svn-r10550] Purpose: Splitting dtypes.c
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
2005-04-05 15:25:21 -05:00
Raymond Lu
3cf7dbbf1d [svn-r10531] Purpose: Bug fix
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.
2005-04-01 09:08:24 -05:00
Raymond Lu
54f0b6c66d [svn-r10512] Purpose: Bug fix
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.
2005-03-30 17:22:42 -05:00
Raymond Lu
293f9f9afb [svn-r10457] *** empty log message *** 2005-03-26 11:16:42 -05:00
Raymond Lu
705b9ec0c9 [svn-r10445] Purpose: Bug fix
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.
2005-03-25 12:53:19 -05:00
Raymond Lu
87252df68c [svn-r10402] Purpose: New way to do conversion test between floating-point types.
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.
2005-03-24 11:27:54 -05:00
Raymond Lu
9525ac98d3 [svn-r10228] Purpose: New way to do conversion test between floating-point numbers.
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.
2005-03-16 11:11:14 -05:00
Raymond Lu
04b7826ed1 [svn-r10218] Purpose: Bug fix
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.
2005-03-15 11:31:48 -05:00
Raymond Lu
d903bca3cf [svn-r10194] Purpose: Roll back change made last time
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.
2005-03-11 08:21:48 -05:00
Raymond Lu
4f3d64fd3d [svn-r10180] Purpose: New way to do conversion test from floating-point to integer.
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.
2005-03-10 16:49:28 -05:00
Raymond Lu
eca2e81266 [svn-r10163] Purpose: New way to do conversion test from integers to floating numbers.
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.
2005-03-08 12:10:02 -05:00
Raymond Lu
7e0e9edc44 [svn-r10150] Purpose: A new way to do conversion test
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.
2005-03-04 18:10:49 -05:00
Raymond Lu
82ae8ac4e0 [svn-r10087] Purpose: New feature and test
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
2005-02-25 15:26:32 -05:00
Raymond Lu
b0c346caa2 [svn-r10081] Purpose: Some Kind of Verification
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.
2005-02-24 17:54:05 -05:00
Raymond Lu
54f376edbb [svn-r9987] Purpose: bug fix
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
2005-02-11 11:59:50 -05:00
Raymond Lu
479bdb0bbd [svn-r9984] Purpose: New feature and test
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
2005-02-10 17:19:39 -05:00
Raymond Lu
86c18b7e4f [svn-r9966] Purpose: Bug fix
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
2005-02-09 10:54:44 -05:00
Raymond Lu
70c0ba03ce [svn-r9959] Purpose: Bug fix
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
2005-02-08 13:30:29 -05:00
Raymond Lu
ae02f3f80a [svn-r9909] Purpose: Bug fix for test
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.
2005-02-01 13:48:27 -05:00
Raymond Lu
593d0c490a [svn-r9898] Purpose: Bug fix for test program
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.
2005-01-31 17:08:09 -05:00
Raymond Lu
c078598b6e [svn-r9886] Purpose: New test
Description:  Added a test of data type conversion between user-defined integer
types.


Platforms tested: h5committest and fuss
2005-01-29 16:08:01 -05:00
Raymond Lu
e5a161ffda [svn-r9853] Purpose: Minor Bug fix
Description:  A very minor bug fix and some minor changes to reduce the warning messages during
compiling.


Platforms tested: sleipnir and fuss
2005-01-21 10:01:32 -05:00
Raymond Lu
3d83546b36 [svn-r9849] Purpose: New test and a few bug fix
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
2005-01-20 17:19:13 -05:00
Raymond Lu
72df6506b4 [svn-r9841] Purpose: Minor correction in comments
Platforms tested:  No test needed.
2005-01-20 14:53:56 -05:00
Raymond Lu
dad89387a3 [svn-r9840] Purpose: Bug fix and new test
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:
2005-01-20 12:32:06 -05:00
Raymond Lu
35985b6dba [svn-r9827] Purpose: Minor correction
Description:  There was a #ifdef statement with logical AND in it.

Solution:  Change it to #if statement.

Platforms tested: sleipnir and eirene.  Simple change
2005-01-14 15:36:32 -05:00
Raymond Lu
105bee4ead [svn-r9826] Purpose: Bug fix
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.
2005-01-14 15:15:34 -05:00
Raymond Lu
96cc43235e [svn-r9819] Purpose: Bug fix
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:
2005-01-13 17:01:52 -05:00
Raymond Lu
524830d67e [svn-r9814] Purpose: Bug fix
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.
2005-01-12 15:40:36 -05:00
Raymond Lu
a985c4c525 [svn-r9807] Purpose: bug fix
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.
2005-01-11 13:17:01 -05:00
Quincey Koziol
76ba1a99d3 [svn-r9805] Purpose:
Code cleanup

Description:
    Remove obsolete support for Watcom C compiler.

Platforms tested:
    None - too minor to require any.
2005-01-11 10:43:13 -05:00
Raymond Lu
7faa297ea6 [svn-r9783] Purpose: Bug fix
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
2005-01-08 15:56:12 -05:00
Raymond Lu
9dbf9e9e76 [svn-r9777] Purpose: Bug fix
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.
2005-01-07 15:30:23 -05:00
Raymond Lu
9aa2ed3a52 [svn-r9774] Purpose: Bug fix
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.
2005-01-07 13:40:33 -05:00
Raymond Lu
78293f94d7 [svn-r9767] Purpose: Bug fix
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)
2005-01-06 18:06:34 -05:00
Raymond Lu
82f6a72ec9 [svn-r9755] Purpose: New feature
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
2005-01-06 13:17:59 -05:00
Quincey Koziol
427ff7da28 [svn-r9727] Purpose:
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:
2004-12-29 09:26:20 -05:00
Raymond Lu
cacc8fa4c6 [svn-r9445] Purpose: Bug fix
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
2004-10-21 11:04:08 -05:00
Quincey Koziol
e1c1f5cc15 [svn-r9395] Purpose:
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
2004-10-10 14:22:03 -05:00
Quincey Koziol
166580844b [svn-r9393] Purpose:
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)
2004-10-08 23:28:33 -05:00
Raymond Lu
d595bab80e [svn-r9366]
Purpose:  feature change

Description:  Prevent creating datatype of size 0.


Platforms tested:  fuss(simple change)
2004-10-05 13:36:03 -05:00
Raymond Lu
753190f8c1 [svn-r9350] *** empty log message *** 2004-10-01 13:28:18 -05:00
Quincey Koziol
6ae26dba82 [svn-r9053] Purpose:
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
2004-08-08 17:12:18 -05:00