Compare commits

...

741 Commits

Author SHA1 Message Date
Albert Cheng
db447ec89a [svn-r26713] Merge r26712 from trunk to v18.
Bug fix: cmakehdf5 broken because zlib is no longer configure in by default.
That broke the testings as some testfiles have zlib compressed datasets.

Added options control to enable the linking of zlib external libarary by
default and turn off the szip library linking as szip library may not be
avaiable. This matches the established settings.

Tested: run cmakehdf5 by hand in jam and platypus.
Also tested in wren but it failed in the testing stage.
Also tried "cmakehdf5 --script" in jam. It failed.
2015-04-02 19:16:30 -05:00
Allen Byrne
f39f412563 [svn-r26710] Update fortran cmake commands 2015-04-02 14:55:54 -05:00
Neil Fortner
3e0eae188b [svn-r26709] Port r26690 from trunk to 1.8 branch.
Tested: jam, koala, ostrich (h5committest)

Log from r26690:
Fix error in H5Sextent_copy

When the selection is set to all, H5Sextent_copy did not update the number of
elements in the selection in the destination space.  Fixed H5Sextent_copy to do
this.  Added tests for this functionality.

Tested: jam, koala, ostrich (h5committest)
2015-04-02 14:17:42 -05:00
Neil Fortner
be81aef60f [svn-r26708] Port r26301 from trunk to 1.8 branch.
Tested: jam, koala, ostrich (h5committest)

Log from r26633:
Description:
    Bring Neil's fix for error in H5S_extent_copy() back to the trunk.

Tested on:
    Mac OSX/64 10.10.2 (amazon) w/serial
    (h5committest forthcoming)
2015-04-02 14:01:03 -05:00
Neil Fortner
27d820b8ce [svn-r26707] Port r26633 from trunk to 1.8 branch.
Tested: jam, koala, ostrich (h5committest)

Log from r26633:
Add -D_DEFAULT_SOURCE to CPPFLAGS on Linux systems.  -D_BSD_SOURCE is deprecated
in recent versions of glibc, and -D_DEFAULT_SOURCE is the replacement.  Keep
-D_BSD_SOURCE for now to support older systems.  gcc will not issue a warning
about -D_BSD_SOURCE being deprecated when -D_DEFAULT_SOURCE is supplied as well.

Tested: jam, koala, ostrich (h5committest)
2015-04-02 11:18:47 -05:00
Albert Cheng
0f173c15bb [svn-r26706] Merge r26702 of trunk to v18 branch.
HDFFV-8667: h5repack crashes on enumerated 8-bit type nested in compound type.

Description:
The test added failed in some machines because the data file contains infinity values that different machines print them differently as "inf", "INF", "Inf", ...

Solution:
Added a "ignorecase" option to TOOLTEST() to do caseless matching between generated output vs expected output. This solved most machines problem for now.

Tested: h5committest, emu by hand for both development and production modes.
But cmake built h5dump failed to read the data file. Using the same source to build h5dump by autotools produced a h5dump that can read the test data file. Don't know why cmake could not produce a correct binary.
2015-04-02 11:13:28 -05:00
Dana Robinson
6986211d65 [svn-r26703] Merge of r26392 from trunk.
Adds new memory allocation functions that use the library's
memory allocator. Intended for use with third-party filter
code.

Tested on: h5committest, Solaris (emu), OS X (quail)

Note: emu fails with the existing Inf/inf case problem in
      h5dump but no other tests fail.
2015-04-01 18:29:24 -05:00
Allen Byrne
ad4154cdc8 [svn-r26700] Generators are only built static
Plugin test for disable state does not print error stack and does not print FAILED
2015-04-01 16:04:06 -05:00
Allen Byrne
025d90f573 [svn-r26697] HDFFV-9131: Remove obsolete/unneeded sections. 2015-04-01 15:27:26 -05:00
Allen Byrne
4f87ef5e0e [svn-r26696] Merge from trunk
Tested local linux cmake
2015-04-01 14:27:37 -05:00
Albert Cheng
ee7e18f310 [svn-r26688] HDFFV-8667: h5repack crashes on enumerated 8-bit type nested in compound type
Fixed and added user provided test file to verify the fix. (Test added to h5dump/testh5dump.sh.in).

Tested: h5committest
2015-03-31 19:39:21 -05:00
Allen Byrne
e5be794ae2 [svn-r26686] Add new test from test script 2015-03-31 16:44:28 -05:00
Albert Cheng
fa62ddeba5 [svn-r26681] Merge r26677 from trunk.
HDFFV-8957: h52gif crashes when run against one of our own examples 
The tool claimed it could handle 24bit images but there was no code to handle it.
(or might be there were but was removed by previous revisions.)
Also discovered that it does not accept multiple images nor -p for palette
as its user document and online help message indicated.

Solution: 
Added code to verify dimension sizes are within 8 bit raster images limit and
added tests to verify the tools correctness.
Need to update user document tool.

Tested: h5committested.
2015-03-31 15:44:43 -05:00
Albert Cheng
756e961181 [svn-r26676] HDFFV-9201: Create md5s for bzip, gzip and zip files
An md5 checksum is produced for each archive created and stored in the md5 file

Tested: jam by hand.
2015-03-31 12:41:08 -05:00
Scot Breitenfeld
c300ff7327 [svn-r26674] merged r26657 and r26642 from the trunk into the branch.
tested: h5committest
2015-03-31 09:05:57 -05:00
Albert Cheng
b50270fc8b [svn-r26672] Since cmake always redoes everything from start, I change the logfiles to
start fresh everytime.

Tested: platypus
2015-03-30 23:31:18 -05:00
Frank Baker
32093b6df0 [svn-r26666] Description:
Update HDF Group copyright dates to include 2015.
2015-03-30 16:31:02 -05:00
Albert Cheng
c8e19aa479 [svn-r26663] added option to configure support for fortran2003 API.
--enable-fortran2003 | --disable-fortran2003:
  enable or disable fortran2003 API. Default is off.

Tested: by hand in platypus.
2015-03-30 14:33:28 -05:00
Allen Byrne
1cd07720f6 [svn-r26658] Correct windows define for exports/imports 2015-03-30 13:23:13 -05:00
Allen Byrne
5c89605ff9 [svn-r26656] Correct windows define for exports/imports 2015-03-30 13:15:11 -05:00
Allen Byrne
c923afdf50 [svn-r26654] Bring trunk CMake changes to branch.
Tested: local linux
2015-03-30 12:32:55 -05:00
Quincey Koziol
6a664ffa5a [svn-r26648] Description:
Bring r26635 from trunk to 1.8 branch:

    Bring r26651 from autotools_rework branch to trunk:

    Remove the VSNPRINTF_WORKS macro, it's working around bugs in old SGI
& HP compilers.

Tested on:
    Linux/32 2.6.18 (jam) w/serial & parallel
    (Daily tested on trunk for 2+ days)
2015-03-30 09:47:36 -05:00
HDF Tester
2b3e867b84 [svn-r26644] Snapshot version 1.8 release 15 (snap13) 2015-03-29 18:17:21 -05:00
Quincey Koziol
c183d0d6f3 [svn-r26638] Description:
Bring r26598 from trunk to 1.8 branch:

    Bring r26501 from the autotools_rework branch to the trunk:

    Remove ULLONG_TO_LDOUBLE_PRECISION macro/define, as it's targeting bugs
in the FreeBSD and Cygwin compilers.

Tested on:
    Linux/32 2.6.18 (jam) w/serial & parallel
    (Daily tested on trunk for 2+ days)
2015-03-27 21:19:21 -05:00
Quincey Koziol
87db75e2e6 [svn-r26637] Description:
Bring r26597 from trunk to 1.8 branch:

    Bring r26500 from autotools_rework branch to trunk:

    Remove the LLONG_TO_FP_CAST_WORKS macro/define, as it targets problems with
the Visual Studio 6 compilers.

Tested on:
    Linux/32 2.6.18 (jam) w/serial & parallel
    (Daily tested on trunk for 2+ days)
2015-03-27 20:14:40 -05:00
Quincey Koziol
03f3e620bb [svn-r26636] Description:
Bring r26596 from trunk to 1.8 branch:

    Bring r26499 from autotools_rework branch to trunk:

    Remove ULLONG_TO_FP_CAST_WORKS macro/define, as it only applies to older
platforms we aren't supporting any longer.

Tested on:
    Linux/32 2.6.18 (jam) w/serial & parallel
    (Daily tested on trunk for 2+ days)
2015-03-27 19:42:13 -05:00
Quincey Koziol
46f59e4fd4 [svn-r26630] Description:
Bring r26595 from trunk to 1.8 branch:

    Bring r26494 from autotools_rework branch back to trunk:

    Remove the LDOUBLE_TO_UINT_ACCURATE macro/define, it was addressing
problems with older Intel compilers on Linux that are no longer supported.

Tested on:
    Linux/32 2.6.18 (jam) w/serial & parallel
    (Daily tested on trunk for 2+ days)
2015-03-27 17:12:22 -05:00
Quincey Koziol
fe01716dbc [svn-r26628] Description:
Bring r26591 from trunk to 1.8 branch:

    Bring r26492 from autotools_rework branch back to trunk:

    Remove the FP_TO_ULLONG_ACCURATE and FP_TO_ULLONG_RIGHT_MAXIMUM
macros/defines, which were added to address problems with older PGI
compilers and HP-UX systems and are no longer supported.

Tested on:
    Linux/32 2.6.18 (jam) w/serial & parallel)
    (Daily tested for 2+ days on trunk)
2015-03-27 16:37:15 -05:00
Quincey Koziol
d4e0d3020e [svn-r26626] Description:
Bring r26587 from trunk to 1.8 branch:

    Bring r26489 from autotools_rework branch to trunk:

    Remove the ULONG_TO_FP_BOTTOM_BIT_ACCURATE macro/define, as it was added
for SGI systems and old Solaris systems, which are no longer supported.

Tested on:
    Linux/32 2.6.18 (jam) w/serial & parallel
    (Daily tested on trunk for 2+ days)
2015-03-27 16:03:13 -05:00
Quincey Koziol
0ea42d6667 [svn-r26624] Description:
Bring r26584 from trunk to 1.8 branch:

    Bring r26485 from the autotools_rework branch to the trunk:

    Remove the ULONG_TO_FLOAT_ACCURATE macro/define, we no longer support the
Sandia system where it was necessary.

Tested on:
    Linux/32 2.6.18 (jam) w/serial & parallel
    (Daily tested on trunk for 2+ days)
2015-03-27 15:28:03 -05:00
Scot Breitenfeld
fa367e4f58 [svn-r26617] Merged r26616 from the trunk into the branch.
Tested: Text changes only.
2015-03-27 10:42:31 -05:00
Scot Breitenfeld
de11710fda [svn-r26615] merged r26575 from the trunk into the branch.
Tested: h5committest
2015-03-27 10:16:25 -05:00
Scot Breitenfeld
6abce0d374 [svn-r26614] fixed typo. 2015-03-27 10:09:40 -05:00
Scot Breitenfeld
4f39b033fa [svn-r26613] Added changes to Fortran APIs. 2015-03-27 09:59:37 -05:00
Scot Breitenfeld
2a26f3b58a [svn-r26610] Added changes to HL and Fortran. 2015-03-27 08:53:11 -05:00
Allen Byrne
7ebd4c8311 [svn-r26600] Fix CMake target calls to add new parameter 2015-03-26 08:51:01 -05:00
Quincey Koziol
a877ab37b6 [svn-r26588] Description:
Bring r26560 from trunk 1.8 branch:

    Bring r26483 from autotools_rework branch back to trunk:

   Remove INTEGER_TO_LDOUBLE_ACCURATE macro/define - we no longer support
   SGI systems.

Tested on:
    Linux/32 2.6.18 (jam) w/serial & parallel
    (daily tested for 2+ days)
2015-03-25 14:56:23 -05:00
Quincey Koziol
5966f8ce26 [svn-r26585] Description:
Bring r26495 from trunk to 1.8 branch:

    Bring r26258 from the autotools_rework branch to the trunk - remove
the LDOUBLE_TO_INTEGER_WORKS macro/define, which was addressing issues with
SGI systems that are no longer supported.

Tested on:
    Linux/32 2.6.18 (jam) w/serial & parallel
    (daily tested on trunk for >1 week)
2015-03-25 14:30:27 -05:00
Jerome Soumagne
2bb934857b [svn-r26582] Merge r26509 from trunk
Run reconfigure after merges from autotools_rework branch
2015-03-25 13:07:02 -05:00
Jerome Soumagne
b3cf42b887 [svn-r26581] Merge r26526 from trunk
Remove SETX variable from Makefile.am/Makefile.in

Part of: HDFFV-9164
2015-03-25 13:01:52 -05:00
Jerome Soumagne
72c3c71be9 [svn-r26580] Merge r26507 from trunk
Remove DYNAMIC_DIRS variable from configure.ac

Does not seem to be used anymore
2015-03-25 12:59:40 -05:00
Jerome Soumagne
2d1522fece [svn-r26579] Merge r26506 from trunk
Remove GNU make check from configure.ac
2015-03-25 12:57:36 -05:00
Jerome Soumagne
15efd662a3 [svn-r26578] Merge r26505 from trunk
Remove DEFAULT_LIBS from configure.ac and irix6.x config file which
was using it.

Remove references to IRIX/irix* platform.
2015-03-25 12:56:55 -05:00
Jerome Soumagne
98a65dc3a4 [svn-r26577] Merge r26504 from trunk
Fix heading info in configure.ac
2015-03-25 12:55:28 -05:00
Scot Breitenfeld
1361515c51 [svn-r26576] Merged r26321,r26405,r26417 from the trunk into the branch.
Tested: h5committest
2015-03-25 11:21:30 -05:00
Scot Breitenfeld
3898ea081a [svn-r26574] Added new C lib. changes -- MSB 2015-03-25 09:42:24 -05:00
Mohamad Chaarawi
ae82c43610 [svn-r26573] merge 24270 from trunk, introducing NORETURN.
tested with h5committest.
2015-03-25 09:40:34 -05:00
Quincey Koziol
5d9c34406a [svn-r26561] Description:
Bring r26491 from trunk to 1.8 branch:

    Bring r26257 from autotools_rework branch back to the trunk - removes
the LDOUBLE_TO_INTEGER_ACCURATE macro/define, which was addressing problems
with SGI systems and is no longer supported.

Tested on:
    Linux/32 2.6.18 (jam) w/serial & parallel
    Daily tested on branch for >2 weeks.
2015-03-24 17:10:02 -05:00
Vailin Choi
08d0edb920 [svn-r26556] Merge the fix for HDFFV-9173 from trunk to 1_8:
H5Pset_istore_k() will validate the "ik" value to not exceed the max v1 btree entries (2 bytes)
The same check for H5Pset_sym_k()  "ik" value.
h5committested.
2015-03-24 12:13:26 -05:00
Scot Breitenfeld
37a019593a [svn-r26548] Added Fortran Changes. 2015-03-23 16:55:00 -05:00
Scot Breitenfeld
ce632854c3 [svn-r26547] Merged changes from the trunk into the branch:
svn merge -r26029:26536 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran

Tested: h5committest
2015-03-23 16:23:39 -05:00
Allen Byrne
9630bfd974 [svn-r26544] Package vars should use uppercase prefix 2015-03-23 14:57:31 -05:00
Allen Byrne
d7ac42a4e6 [svn-r26540] Update minimum cmake version 2015-03-23 12:58:10 -05:00
Allen Byrne
691d599499 [svn-r26538] Add INSTALL_TYPES to packaging for defaults 2015-03-23 12:44:30 -05:00
Allen Byrne
0a7f07ac10 [svn-r26533] Merge CMake packaging from trunk to 1.8
Add PL header to public list

Tested: windows
2015-03-23 12:10:16 -05:00
Allen Byrne
f656fb8d8c [svn-r26532] Merge CMake packaging from trunk to 1.8
Tested: windows
2015-03-23 12:07:26 -05:00
Allen Byrne
551f4ed8de [svn-r26531] Merge CMake packaging from trunk to 1.8
Tested: windows
2015-03-23 12:06:37 -05:00
HDF Tester
5bfbb1eba8 [svn-r26520] Snapshot version 1.8 release 15 (snap12) 2015-03-22 18:32:41 -05:00
Allen Byrne
b1cd5f4f8a [svn-r26460] HDFFV-8520: Add api to control plugins
h5committest
2015-03-16 12:57:46 -05:00
Mike McGreevy
25281fc525 [svn-r26444] Merge r26382 from trunk to hdf5_1_8:
Purpose:

    Fix HDFFV-9124 - Remove old libtool post-processing

Description:

    This revision removes some post-processing of the generated libtool
    script, which was added back in 2003 (see svn revisions 6285 and 6293)
    to address a deficiency in which the script failed to set the '$wl'
    variable for icc and pgcc compilers. Libtool has since fixed the issue,
    and the post-processing we've been running has essentially been a no-op
    for years, so it's safe for us to remove the post-processing snippet.

Tested:

    Jam using pgcc and icc compilers.
2015-03-13 09:33:31 -05:00
Scot Breitenfeld
690b40f17a [svn-r26432] merged r26389 from the trunk to fix 1.6 API issue. 2015-03-11 10:00:28 -05:00
Dana Robinson
0c8512b7ab [svn-r26425] Merge of r26424 from the autotools_rework branch.
Made the chkmanifest script a little more sh-friendly.

Tested: Manually on jam by modifying svn-controlled files
2015-03-11 01:34:19 -05:00
Scot Breitenfeld
878149c4a2 [svn-r26419] merged r26373 and r26380 from the trunk into the branch.
tested: h5committest
2015-03-10 17:03:53 -05:00
Allen Byrne
d928aca8e6 [svn-r26416] Fix script mode 2015-03-10 11:44:31 -05:00
Dana Robinson
4a2a4bd95b [svn-r26413] Merge of r26276 from trunk.
Cleans up time functions in the autotools input files.

- Lumps all the time functionality together in configure.ac.
  This was previously more spread out due to Solaris issues
  with the ordering of certain checks.

- Removes processing that handles __tm_gmtoff members of struct
  tm. (libc-4)

- Removes BSDgettimeofday(). (IRIX 5.3)

- Removes timezone struct processing in gettimeofday(). (considered
  harmful)

Fixes: HDFFV-9083 and HDFFV-9085

Tested on: h5committest
           OS X (quail)
           Solaris (emu)
2015-03-10 02:41:24 -05:00
Dana Robinson
6b1176f34e [svn-r26407] Missed an H5_HAVE_FILTER_SHUFFLE line.
Part of: HDFFV-9086

Tested on: jam (minor change)
2015-03-09 14:53:48 -05:00
Dana Robinson
ab19d0636a [svn-r26398] Merges r26333 from trunk
Eliminates gcc warnings due to -Wunsuffixed-float-constants.

- Adds 'F' suffixes for most float constants.

- A few constants MUST be of type double. These now receive the long
  double L suffix and are then cast to double. I do this via a new
  H5_DOUBLE() macro which was added to H5private.h.

- Additionally, some 1.8-specific float suffixes were added.

Fixes: HDFFV-9148

Tested on: h5committest
2015-03-09 06:27:46 -05:00
Dana Robinson
85beb272c5 [svn-r26395] Merges r26329 from trunk
Removed the configure option that allows selective disabling of individual
internal filters (fletcher32, shuffle, etc.).

This feature mucked up the code with a lot of #ifdefs, saved very little
space and was not scalable to a general scheme for library size reduction.
We've decided to remove the feature while we investigate a more general
scheme for decreasing the library size.

Fixes: HDFFV-9086

Tested on: h5committest
2015-03-08 23:24:02 -05:00
Dana Robinson
786b3868de [svn-r26394] Merges r26351 from trunk
Adds warning prevention pragmas, etc. to flex- and bison-generated code.

Fixes: HDFFV-9149

Tested on: h5committest
2015-03-08 22:30:09 -05:00
Dana Robinson
aae529f027 [svn-r26393] Merges r26347 and r26363 from trunk
Moves the _POSIX_C_SOURCE, _GNU_SOURCE, and _BSD_SOURCE from AM_CPPFLAGS
to H5_CPPFLAGS in the Autotools configure scripts. This prevents them
from being exported to h5cc, etc. which is inappropriate since they
may interfere with other code.

Fixes: HDFFV-9152

Tested on: h5committest
2015-03-08 21:11:17 -05:00
HDF Tester
6cddc62b70 [svn-r26391] Snapshot version 1.8 release 15 (snap11) 2015-03-08 18:36:10 -05:00
Jerome Soumagne
80d7a07519 [svn-r26386] Merge r26375 from trunk
Print number of times sigill_handler is called in H5detect.

Part of: HDFFV-8857
2015-03-06 14:51:26 -05:00
Jerome Soumagne
2b2320d96c [svn-r26385] Merge r26374 from trunk
Add CMake conversion test for H5_LONG_TO_LDOUBLE_SPECIAL and
H5_LDOUBLE_TO_LONG_SPECIAL (imported from configure.ac).

Fixes: HDFFV-8936

Tested on: ostrich
2015-03-06 14:49:18 -05:00
Allen Byrne
f9a760f5b9 [svn-r26381] Correct extra folder in path 2015-03-06 09:35:20 -05:00
Allen Byrne
ece0ba0336 [svn-r26371] Update cmake mininum version
Update windows wix cpack process.
2015-03-05 11:48:32 -05:00
Albert Cheng
5a7ad19248 [svn-r26370] Added support for Mac OS X 10.10 Yosemeti.
Also updated entries for Max OS X 10.9 Mavericks.
2015-03-05 11:44:48 -05:00
Larry Knox
1e486e1684 [svn-r26358] Revert change r25705: Add LD path to HDF5 install directory to address HDFFV-8944.
The change broke DESTDIR builds where an older HDF5 is installed in the --prefix directory.
The original problem remains.

Tested with h5committest
2015-03-04 12:15:04 -05:00
Dana Robinson
fed1242d98 [svn-r26349] Merges r26348 from trunk
Updates bin/chkmanifest to correctly handle the seven Subversion status
columns that are output by svn stat.

Previously, the script assumed that they would all be blank for newly-
added files. This is not always true when merging.

Part of: HDFFV-8895

Tested on: jam (bin/chkmanifest only)
2015-03-03 18:36:10 -05:00
Larry Knox
491d6c3566 [svn-r26341] Remove references to vms and vms files to be updated by this script. VMS has been remove
d from HDF5 code.

Tested on jam.
2015-03-02 14:15:39 -05:00
Dana Robinson
9fbf809fae [svn-r26326] Merge of r26275 from the trunk
- Updated configure.ac so that the direct VFD can now be built
  without specifying _GNU_SOURCE, etc. on the command line.

- The direct VFD is now disabled by default. It was previously
  enabled, but the configuration script couldn't configure it
  properly, making it a moot point.

Fixes: HDFFV-9057, HDFFV-7567, HDFFV-9088, HDFFV-7566

Tested on jam (configure/make in various configurations only)
2015-02-26 22:01:50 -05:00
Dana Robinson
5ea3517cba [svn-r26325] Merge of r26324 from the trunk
Fixes another bug in bin/trace that prevents adding TRACE macros to API
calls that use a FUNC_ENTER macro that does not include parentheses.

This does not affect any source code at this time.

Part of: HDFFV-9141

Tested on: jam (bin/trace behavior only)
2015-02-26 19:53:18 -05:00
Dana Robinson
4b0293ce89 [svn-r26322] Merge of r26246 and r26249 from the trunk
Fixes a bug in the bin/trace script that prevented API calls which
return a pointer from receiving TRACE macros.

Also removes the NO TRACE warnings, which we decided were distracting
and unnecessary.

Tested on: jam (minor change)
2015-02-26 17:36:44 -05:00
Allen Byrne
036ecfa32b [svn-r26316] Add IS_F2003 option to def file macro 2015-02-26 09:44:46 -05:00
Scot Breitenfeld
add51325ef [svn-r26314] Brought autotools related changes from the trunk to the branch, r26188 r26280 2015-02-26 09:21:33 -05:00
Dana Robinson
d361bdca64 [svn-r26313] Merge of r26311 from the trunk
Updates the bin/chkmanifest script so that it parses the output
of svn commands instead of hacking at the .svn/entries file. This
will make the script more future-proof and allows it to work with
current Subversion repositories.

Tested on: jam (bin/chkmanifest only)
2015-02-26 09:05:37 -05:00
Scot Breitenfeld
670e5d7aab [svn-r26312] Merged r26294 from the trunk into the branch. 2015-02-26 09:03:11 -05:00
Dana Robinson
e0fa2a2e0e [svn-r26310] Merge of r26071 from features/autotools_rework
Removes the --with-default-vfd option from configure. This was basically
useless and only allowed selecting the stdio VFD. Since this is a demo
VFD and not really a production VFD, we decided to retire this option.

Fixes: HDFFV-9081

Tested on: jam (minor change)
2015-02-26 08:42:05 -05:00
Dana Robinson
bb1960af1c [svn-r26309] Updated RELEASE.txt to indicate that VMS files have been removed. 2015-02-26 06:43:39 -05:00
Scot Breitenfeld
fc44136ee7 [svn-r26308] Merged r26214, 26217, 26233, 26241 from the trunk. 2015-02-25 17:26:08 -05:00
Scot Breitenfeld
4e1ebd70f5 [svn-r26307] merged r26172 from the trunk. 2015-02-25 17:10:38 -05:00
Mohamad Chaarawi
90067b76ce [svn-r26304] bring 26303 from trunk:
remove files with .clog2 extension generated by MPE when doing make clean
2015-02-25 13:52:27 -05:00
Mohamad Chaarawi
864a9d5552 [svn-r26298] merge 26279 from trunk.
HDFFV-883: attach callback to terminate HDF5 library when MPI_COMM_SELF is destroyed on MPI_Finalize.

tested h5committest.
2015-02-25 09:12:05 -05:00
Dana Robinson
85a6442218 [svn-r26273] Fixes compile failures when building on Windows when UNICODE is defined.
This was due to wrapping a variable with the TEXT() macro and not
forcing the <function>A form of certain Win32 API calls are always used.

Although we do not defined UNICODE in our builds, others have encountered
problems when building HDF5 as a part of a larger project where UNICODE
is defined.

Fix for: HDFFV-8927

Tested on: 64-bit Windows 7, Visual Studio 2012, CMake 3.2
           All combinations of static/shared and UNICODE defined/undefined
           NOTE: plugin tests are skipped with static builds
2015-02-22 06:39:08 -05:00
Dana Robinson
0ecf471414 [svn-r26264] Merge of r26225 from trunk.
Removed a a work-around for a broken CodeWarrior open() call from
configure that causes a test in test/tfile.c to be skipped.

This change removes the H5_NO_SHARED_WRITING symbol.

Tested on: jam (no code changes w/ non-CodeWarrior compilers)
2015-02-21 08:52:48 -05:00
Dana Robinson
2b195049ef [svn-r26263] Merge of r26219 from trunk.
Adds a comment to configure.ac noting that time and srcdir have
issues when used together on Cygwin. No code changes.

Tested on: jam bin/reconfigure (no code changes)
2015-02-21 08:18:09 -05:00
Mohamad Chaarawi
06586be5bc [svn-r26240] add release.txt entries for changes made to configure.ac 2015-02-19 11:03:09 -05:00
Dana Robinson
8ea26f0e6a [svn-r26237] Updated the MANIFEST file after deleting VMS support files.
Tested on: bin/chkmanifest
2015-02-19 09:44:55 -05:00
Dana Robinson
0852c9663a [svn-r26235] Removed VMS support from the library. A tag (vms_last_support_1_8) was created just before the VMS files were deleted. 2015-02-19 09:04:08 -05:00
Mohamad Chaarawi
62ec301df9 [svn-r26224] merge 26180 from trunk:
configure fixes for HDFFV-9068,9069,9096,9097,9135 from autotools_rework branch:

- Remove Infering parallel compilers (C and Fortran) from configure.ac
- Remove restriction to build shared with parallel
- Cleanup parallel sections in configure.ac
- remove large file support checks
- MPE fixes.
2015-02-18 17:01:17 -05:00
Scot Breitenfeld
8eb6ce7fc6 [svn-r26201] Merged r26170 from the trunk. 2015-02-18 09:05:53 -05:00
Neil Fortner
79760c3447 [svn-r26189] Merge revision 26149 to 1.8 branch
Fix potential memory error reported by valgrind in
H5D__link_chunk_collective_io.  This would occur when performing collective I/O
on a dataset with only 1 chunk, and a participating process had nothing to read
or write.

Tested: jam, koala, ostrich (h5committest); in trunk and 1.8
2015-02-16 12:44:01 -05:00
HDF Tester
ef7e675690 [svn-r26178] Snapshot version 1.8 release 15 (snap10) 2015-02-15 18:17:46 -05:00
Albert Cheng
e0d71da136 [svn-r26174] HDF5-9117: if testing for proper working 'tr' command is needed.
Long time ago, the tr command in some platform does not work properly and this test was added
to detect broken tr and abort the configure process.
We are not aware of such broken tr command in current systems and decided to retire this test.

The setup of ${TR} is still needed as it is used to process DEBUG_PKG.

Tested: h5committested plus using "./configure --enable-debug=all" in jam.
2015-02-13 19:25:22 -05:00
Allen Byrne
7db91c7214 [svn-r26163] Update versions 2015-02-12 16:59:37 -05:00
HDF Tester
eb871677ba [svn-r26147] Snapshot version 1.8 release 15 (snap9) 2015-02-08 18:30:46 -05:00
Allen Byrne
cc37c97f8c [svn-r26112] Add quotes around name 2015-02-02 13:02:57 -05:00
Allen Byrne
1fad654108 [svn-r26108] Correct name of source file 2015-02-02 13:00:07 -05:00
Allen Byrne
df7a817322 [svn-r26105] Disable flush1/flush2 test under debug VFD on Windows. 2015-02-02 11:58:00 -05:00
HDF Tester
cf1ccbdb78 [svn-r26094] Snapshot version 1.8 release 15 (snap8) 2015-02-01 18:28:14 -05:00
Mohamad Chaarawi
a61f4be13e [svn-r26088] update build procedure for Hopper (Cray).. only static now.
Will add shared when we introduce support later.
2015-01-30 15:50:53 -05:00
Allen Byrne
75085cc45e [svn-r26064] HDFFV-9018: Install PDB files to bin folder with dlls.
Tested: windows
2015-01-28 14:16:32 -05:00
Allen Byrne
75da78bc75 [svn-r26048] HDFFV-8736: Patch H5PL.c and test for cygwin plugin support. Merged from trunk. 2015-01-27 11:01:48 -05:00
Allen Byrne
ba9a30fd8e [svn-r26035] Add big test back for cygwin 2015-01-26 12:15:30 -05:00
Scot Breitenfeld
8f9f48c8a2 [svn-r26030] Merged changes from the trunk into the branch:
svn merge -r25629:26029 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran

Tested: jam (--enable-fortran2003)
2015-01-26 10:01:56 -05:00
Mohamad Chaarawi
2b43f9d3af [svn-r26013] merge 26012 from trunk:
make the print format for address overflow error windows friendly.
2015-01-23 09:59:04 -05:00
Mohamad Chaarawi
feb7135d5d [svn-r26006] fix error return value in H5FD_read/write. minor change. 2015-01-22 14:27:37 -05:00
Mohamad Chaarawi
643b662d87 [svn-r26003] merge 26002 from trunk:
move checks on reading/writing beyond file eoa outside of the file drivers and into a centralized place in H5FD_read/write.

tested with h5commitest
2015-01-22 13:14:05 -05:00
Allen Byrne
65bc4bb980 [svn-r25997] HDFFV-9060: merge test properties and VFD separation from trunk 2015-01-22 08:57:22 -05:00
Mohamad Chaarawi
4b9ee6b88b [svn-r25996] - merge changes from trunk to eliminate usage of IS_H5FD_MPI Macro.
- add 2 missing feature flags for VFDs: H5FD_FEAT_HAS_MPI & H5FD_FEAT_ALLOCATE_EARLY and use them as appropriate.

tested with h5commitest
2015-01-21 16:00:22 -05:00
Mohamad Chaarawi
e8e06cbca0 [svn-r25985] merge 25984 from trunk:
change the message flag H5O_MSG_FLAG_FAIL_IF_UNKNOWN to
H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE. New changes for
backward compatibility with avoid_truncate feature in 1.10 will come
later to utilize the flag.

tested h5committest
2015-01-20 14:35:34 -05:00
HDF Tester
2f81d73829 [svn-r25982] Snapshot version 1.8 release 15 (snap7) 2015-01-18 18:20:37 -05:00
HDF Tester
3bfbe3ffd0 [svn-r25976] Snapshot version 1.8 release 15 (snap6) 2015-01-11 18:11:53 -05:00
Albert Cheng
e118a985d1 [svn-r25970] Update with retirement of AIX 5.3 and addition of AIX 6.1 support. 2015-01-09 10:32:11 -05:00
Mohamad Chaarawi
d48b803747 [svn-r25965] - build out unbuffered stdout/err for windows 2015-01-08 14:00:15 -05:00
Mohamad Chaarawi
5f292cf4f4 [svn-r25964] - merge 25963 from trunk:
- Do not remove the prefix in the chunk alloc file, otherwise it makes the H5Fcreate fail when prefix is specified.
- fix tabbing in that file too.

tested: jam w/ parallel
2015-01-08 12:49:03 -05:00
Allen Byrne
7745151c3d [svn-r25959] Comment out printf statement as it caused system resource issues on Windows. Test now executes in 1/10 of time.
Tested: local linux and Windows
2015-01-06 09:54:03 -05:00
Allen Byrne
1fd9429572 [svn-r25957] Added Perform and io_timer back into build.
Tested: local linux cmake
2015-01-05 17:10:09 -05:00
Albert Cheng
3305b13297 [svn-r25956] [Merge r25954 from trunk]
HDFFV-9046: reorganize hdf5/perform, step 2

Last changes had caused problems with Windows platform:
1. H5private.h in io_timer.h is not accessible in the distributed shared library of tools.
   Need to move it to io_timer.c.
2. debug_start_stop_time() would not be available outside of h5perf. Some favor of compiler
   does not like it.  Screened it out for now.
3. mere "extern" is not good enough for Windows shared library. Must mark them as DLL. Need to mark them as 
   "H5TOOLS_DLL".
4. STANDALONE mode is broken. Screened out the code for now.

Tested: h5committest.
2015-01-05 17:05:43 -05:00
Allen Byrne
3525935821 [svn-r25952] HDFFV-9054: disable io_timer in tools lib and perform sub-folder due to SHARED compile issues and other issues. 2015-01-05 11:22:02 -05:00
HDF Tester
276805c3fb [svn-r25950] Snapshot version 1.8 release 15 (snap5) 2015-01-04 18:01:54 -05:00
Albert Cheng
cac2c7324f [svn-r25948] [Merged r25946 from trunk]
Removed debug statments that use //.

Tested: env CFLAGS=-ansi buildhdf5 in jam and parallel platypus.
2015-01-04 00:33:26 -05:00
Albert Cheng
c57665bb4f [svn-r25947] [merged changes from trunk r25940]
HDFFV-9046: reorganize hdf5/perform, step 2
Move timing measurement routines used by h5perf and h5perf_serial to tools/lib
so that they can be used by other tools too.

tools/lib/io_timer.c
tools/lib/io_timer.h
tools/perform/io_timer.c
tools/perform/io_timer.h
    renamed perform/io_timer.[ch] to lib/io_timer.[ch]

tools/lib/Makefile.am
tools/lib/Makefile.in
tools/lib/CMakeLists.txt
tools/perform/Makefile.in
tools/perform/Makefile.am
tools/perform/CMakeLists.txt
MANIFEST
    updated due to the move.

Tested; h5committest and jam (serial)
2015-01-04 00:04:10 -05:00
Albert Cheng
24c5c0bf1b [svn-r25945] [merge changes r25932 and r25933 from Trunk]
HDFFV-8902: merge the source code of h5perf and h5perf_serial, stage 1.

tools/perform/sio_timer.h:
tools/perform/pio_timer.c:
tools/perform/io_timer.h:
tools/perform/io_timer.c:
    Renamed pio_timer.[ch] as io_timer.[ch];
    merged content of sio_timer.[ch] into io_timer.[ch] so that both h5perf and h5perf_serial
    call the combined io_timer.[ch].
    Moved the debug printing code segment in set_time() in [sp]io_timer.c to as debug_start_stop_time() in [sp]io_perf.c where it belongs.
    Screened out set_timer_type() and get_timer_type() which were not used by any code.

tools/perform/Makefile.am:
tools/perform/Makefile.in:
tools/perform/CMakeLists.txt
    Adjusted to use io_timer.c for both h5perf and h5perf_serial.

tools/perform/pio_perf.c:
tools/perform/sio_perf.c:
tools/perform/pio_perf.h:
tools/perform/sio_perf.h:
    Renamed [sp]io_time_destory() to same io_time_destroy();
    Moved the debug printing code segment in set_time() in [sp]io_timer.c to as debug_start_stop_time() in [sp]io_perf.c where it belongs.

tools/perform/pio_engine.c:
tools/perform/sio_engine.c:
    Removed #include io_timer.h since it was already #include by [sp]io_perf.h.

MANIFEST:
    Updated the merge of [sp]io_timer.[ch] into io_timer.[ch].

Tested: h5committest and jam in extra.
2015-01-03 12:01:03 -05:00
Albert Cheng
9e0a0975b6 [svn-r25944] updated AIX compilers information. 2015-01-02 18:11:02 -05:00
Allen Byrne
95b2650d86 [svn-r25937] Remove build and test commands for deleted benchpar.c 2014-12-31 13:04:48 -05:00
Allen Byrne
70626f2d40 [svn-r25935] Fix incorrectly combined check. 2014-12-31 12:51:24 -05:00
HDF Tester
66d0a163da [svn-r25925] Snapshot version 1.8 release 15 (snap4) 2014-12-28 18:20:15 -05:00
Allen Byrne
df01ec0273 [svn-r25919] If not testing skip building test only programs. 2014-12-22 09:46:42 -05:00
HDF Tester
877223f927 [svn-r25916] Snapshot version 1.8 release 15 (snap3) 2014-12-21 18:19:41 -05:00
Albert Cheng
8dd1373cc6 [svn-r25914] HDFFV-8156: retired benchpar.c. 2014-12-19 15:10:37 -05:00
Albert Cheng
daf1267e7a [svn-r25911] Updated. 2014-12-19 12:09:14 -05:00
Albert Cheng
1fe32500dd [svn-r25910] HDFFV-8156: perform/benchpar failed to run
Benchpar.c is retired/deleted. If it is ever needed, it can be retrieved from the SVN repository
or even previous version of HDF5 source code.

Tested: jam parallel make passed.
2014-12-19 12:02:45 -05:00
Allen Byrne
59ad4f6d00 [svn-r25907] Fix CMP0054 warning 2014-12-19 11:00:50 -05:00
Allen Byrne
36cefe942d [svn-r25903] Fix CMP0053 warning 2014-12-19 09:21:45 -05:00
Albert Cheng
d6b44d14dc [svn-r25901] HDFFV-9046: reorganize hdf5/perform/ directory
Moved perform/ to tools/perform. Updated all the configure related files for the new location.

Tested: h5committested plus tested in jam and kite.
2014-12-18 19:52:34 -05:00
Allen Byrne
e810de441e [svn-r25897] Replace 7zip required command with cmake command 2014-12-17 16:24:32 -05:00
Albert Cheng
b1f643b82e [svn-r25892] Updated online help page to match what the command does now.
Tested: "bin/release -h" and visual inspect the output to be correct.
2014-12-17 05:52:32 -05:00
HDF Tester
f86441d0f3 [svn-r25887] Snapshot version 1.8 release 15 (snap2) 2014-12-14 18:08:51 -05:00
Allen Byrne
44620319b7 [svn-r25879] Test if binary folder exists 2014-12-10 15:19:13 -05:00
Albert Cheng
0083485ab7 [svn-r25875] DAILYTEST-31: Fix cmakehdf5 for Daily Test use
Fix cmakehdf5 so that it can figure out where the source directory is.
It expects cmakehdf5 itself resides at $srcdir/bin/cmamkehdf5.

Tested: Jam by invoking cmakehdf4 with different paths.
2014-12-09 19:50:10 -05:00
Albert Cheng
4f96f71ab3 [svn-r25873] Updated with new options of cmakehdf5. 2014-12-09 18:29:34 -05:00
Albert Cheng
158666710d [svn-r25872] HDFFV-8932: configure options added to enable or disable the building of
different language API's and testings. See "cmakehdf5 --help" for details.

Tested: jam using different combinations of option and verified correctness
by inspeacting libhdf5.settings output.
2014-12-09 18:26:44 -05:00
Allen Byrne
ff31c2bc0f [svn-r25869] HDFFV-9041: Definitions needed to be a semi-colon separated list. 2014-12-09 14:55:25 -05:00
HDF Tester
66c863dbd3 [svn-r25866] Snapshot version 1.8 release 15 (snap1) 2014-12-07 18:18:54 -05:00
Elena Pourmal
a87384a2a6 [svn-r25865] Maintenance after the release: Added 1.8.14 RELEASE.txt to the HISTORY.txt file. 2014-12-07 17:58:21 -05:00
HDF Tester
486f5e7241 [svn-r25856] Snapshot version 1.8 release 15 (snap0) 2014-11-30 18:11:15 -05:00
Albert Cheng
ec672d4908 [svn-r25850] INSTALL_parallel already has a known issues section for Hopper.
I moved all hopper known problems from RELEASE.txt to INSTALL_parallel
so that they are all in one place.
2014-11-25 18:20:16 -05:00
Albert Cheng
13feb98bb1 [svn-r25849] INSTALL_parallel already has a known issues section for Hopper.
I moved all hopper known problems from RELEASE.txt to INSTALL_parallel
so that they are all in one place.
2014-11-25 18:17:54 -05:00
Allen Byrne
e77fd4ebe1 [svn-r25846] Correct typos in linux export of mod 2014-11-25 16:32:09 -05:00
Allen Byrne
be054d6f6b [svn-r25842] Change WiX program check to use the ENV variable for path.
Tested: Windows
2014-11-25 09:18:06 -05:00
Allen Byrne
a1a1aba130 [svn-r25839] Remove hard coded urls.
Add WiX support.
Add file test depends.
2014-11-24 12:24:04 -05:00
Dana Robinson
b78904d8ff [svn-r25837] Updated RELEASE.txt message for HDFFV-9016 to be in line with the current RELEASE.txt guidelines. 2014-11-23 18:03:52 -05:00
Dana Robinson
9b71c4f059 [svn-r25832] Fixed typo in HDFFV-9016 comment in release_docs/RELEASE.txt. 2014-11-21 11:47:25 -05:00
Dana Robinson
7971ccd56b [svn-r25831] Updated release_docs/RELEASE.txt with HDFFV-9016 information. This was a check-in to the CMake externals but it affects HDF5. 2014-11-21 11:44:51 -05:00
Dana Robinson
edc91e4e9d [svn-r25830] Merge of r25605 from the win32_dialog_fix feature branch.
Minor changes to CMake files that allow setting library Subversion externals paths via the CMake GUI. By default, these paths are set to our library trunks. We might want to change this on release.

Tested on: 64-bit Windows 7 with Visual Studio 2012 and CMake 3.0.2
2014-11-20 23:51:01 -05:00
Albert Cheng
91561b4999 [svn-r25806] Update support platforms information according to release v1.8.14. 2014-11-10 18:24:21 -05:00
Allen Byrne
bbecb0c9e6 [svn-r25801] Add utilities and expected output 2014-11-06 16:20:44 -05:00
Allen Byrne
405178a1dc [svn-r25799] correct example cmake info 2014-11-06 15:30:20 -05:00
Mohamad Chaarawi
0502eb185f [svn-r25796] merge 25750 from trunk.
use MPI_File_get_size() instead of stat when retrieving the file size for the MPIO driver.
2014-11-06 14:19:02 -05:00
Mohamad Chaarawi
c63341344e [svn-r25791] merge 25790 from trunk.
fix bug in shapesame test where test fails with more than 10
procs. This is a fix in the test itself and does not have to do with
the library code.

tested cloud machine with parallel.
2014-11-05 11:18:20 -05:00
Elena Pourmal
b53ba13958 [svn-r25789] Maintenance: removed VMS notes from the file. 2014-11-05 07:58:27 -05:00
Allen Byrne
76c0250b6a [svn-r25785] Add STATUS to message in script 2014-11-04 17:08:29 -05:00
Mohamad Chaarawi
fd722a3ef7 [svn-r25780] merge 25779 from trunk.
fix bug	in parallel tests where	a compact dset is being	created
proportional to the process count without regard to the 64KB limit for
compact datasets.
2014-11-04 12:57:37 -05:00
Larry Knox
d11e246045 [svn-r25774] Add new files to MANIFEST. 2014-11-03 23:02:12 -05:00
Albert Cheng
ef23d83129 [svn-r25772] Bug fix: HDFFV-8954
Previously, ph5diff may hang in a test in Linux 32 platform(HDFFV-587).
No solution was available and a patch to bypass the test is implemented.

Since the company is changing domain name soon, the patch would not be valid any more.
Tests were done (repeat 100 mpiexec -np 6 ./ph5diff -v h5diff_hyper1.h5 h5diff_hyper2.h5)
and the previous hanging problem did not occur. It is likely the newer versions of
mpich no longer have this problem.  Therefore, it is decide to remove this patch
to make the test script cleaner, if nothing else. 

Tested: ran build and test in Jam (linux 32) and the repeat 100 command mentioned above.
All passed.
2014-11-03 19:38:24 -05:00
Larry Knox
bb8a12533c [svn-r25770] Check in initial versions of scripts to build, package and test release binaries.
Further work is needed to make them version independent.
2014-11-03 16:54:04 -05:00
Allen Byrne
0659d17e05 [svn-r25739] HDFFV-8953: remove svn url references 2014-10-27 13:27:23 -05:00
Albert Cheng
f45faa4612 [svn-r25722] The return type of H5A_create was changed from hid_t to H5A_t *
but the test was not changed (still doing H5A_create(...) < 0).
Fixed the error by changing to compare against NULL.

Tested: ADA AIX machine where the old code was flagged as an error by the AIX compiler.
2014-10-19 21:42:36 -05:00
Larry Knox
da8344c064 [svn-r25705] Add LD path to HDF5 install directory to address HDFFV-8944.
Tested with h5committest and failed external daily tests.
2014-10-14 16:32:56 -05:00
Allen Byrne
0a0ff45dee [svn-r25703] Correct VS2008 info 2014-10-14 15:46:59 -05:00
Albert Cheng
1c80492654 [svn-r25700] HDFFV-8932:
added Fortran interface to the default build.

Tested: jam, koala, platypus
2014-10-13 12:28:13 -05:00
Quincey Koziol
dbeb66767a [svn-r25699] Description:
Rejiggered the ID wrapping test to avoid allocating all the IDs at once
(at the expense of not being able to check for failure when all IDs are used
up), but still retaining checks for ID wrapping.  This was done to avoid
an large memory footprint for the test.

Tested on:
    Mac OSX/64 10.9.5 (amazon) w/serial & parallel
    (Too minor to require full h5committest)
2014-10-13 11:54:59 -05:00
Albert Cheng
87465ab2b3 [svn-r25698] (port fix done by Allen)
File is not generated by non-2003 compliant fortran compilers.

Tested: jam, koala and platypus
2014-10-13 11:50:58 -05:00
Elena Pourmal
f17f326c97 [svn-r25696] Maintenance: Addressing bug HDFFV-8836 - information in section 3.2 about the SZIP binaries distribution was wrong. Fixed. 2014-10-13 07:19:51 -05:00
Larry Knox
4fbdd725d8 [svn-r25688] Update RELEASE.txt for 1.8.14 release:
Reviewed and revised version information for unix daily tested machines in supported
and tested platforms sections.
2014-10-09 16:57:21 -05:00
Albert Cheng
06e4ac895f [svn-r25684] HDFFV-8932:
added C++ and High level interface to the default build.

Tested: jam, koala, platypus
2014-10-08 18:52:19 -05:00
Mohamad Chaarawi
5449df4880 [svn-r25682] bring 25651 and 25659 from trunk.
Fix for: HDFFV-8715
HDF5_PARAPREFIX is ignored in parallel dense attribute and performance tests.
2014-10-07 15:40:06 -05:00
Quincey Koziol
27a7a56496 [svn-r25681] Description:
Correct errors in ID wrapping code, add some small optimizations, and make
certain that all IDs of a given class can be used, especially when wrapping
around.  Also, enable ID reuse for error classes/values, property lists and
datatypes.  Includes regression testing for ID wrapping.
    Note that this change does not apply to the trunk, since that ID manager
code is using 64-bit IDs and doesn't worry about wrapping around.

Tested on:
    MacOSX/64 10.9.5 (amazon) w/debug, C++, FORTRAN & parallel
2014-10-07 15:31:39 -05:00
Albert Cheng
0e7c658d5d [svn-r25678] Added instruction to run bin/reconfigure after changes. 2014-10-07 11:54:48 -05:00
Albert Cheng
6654f44e43 [svn-r25674] Reset for v1.8.15. 2014-10-06 14:29:29 -05:00
Albert Cheng
f34c7e4993 [svn-r25673] Change version to 1.8.15-snap0. 2014-10-06 14:19:35 -05:00
HDF Tester
6b2f27965b [svn-r25669] Snapshot version 1.8 release 14 (snap18) 2014-10-05 18:06:15 -05:00
Albert Cheng
6f2b6f8d07 [svn-r25667] HDFFV-8933:
Did not provide default values for clang++ options.
Also, applied wrong values for the *_CPPFLAGS.

Solution:
Added default values for *_CXXFLAGS.
Fixed the *_CPPFLAGS values.

Tested: duck, swallow, quail with --eanble-production.
2014-10-03 17:16:24 -05:00
Albert Cheng
8a11303560 [svn-r25666] HDFFV-8937:
There is an interface incompatibility in the C library due to the renamed symbols in H5Ppublic.h.

Solution:
Bump the library interface version on the shared libraries (soname).

Tested: h5committested.
2014-10-03 17:09:54 -05:00
Mohamad Chaarawi
595b2e59fa [svn-r25664] merge 25661 from trunk.
Update the default setting for the memb_addr array when use passes
NULL to equally divide all the address space between all the members.
Before there was one chunk of the address space not being used.
2014-10-03 14:29:17 -05:00
Binh-Minh Ribler
b1d6057bb1 [svn-r25660] Description
Added notes about HDFFV-4259, HDFFV-8852, and HDFFV-8928.
2014-10-02 14:08:39 -05:00
Binh-Minh Ribler
de56222826 [svn-r25656] Purpose: Fixed HDFFV-8922
Description:
    Added notes regarding UTF-8 and extended ASCII, provided in HDFFV-8899,
    to C++ API.
Platforms tested:
    Linux/32 2.6 (jam) - only in comments
2014-10-01 23:56:42 -05:00
Binh-Minh Ribler
eb20ea5379 [svn-r25655] Purpose: Fixed HDFFV-8928
Description:
    Followed hints from user's report on JIRA to remove several potential
    memory leaks.
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-10-01 23:32:16 -05:00
Binh-Minh Ribler
9c9326c7de [svn-r25653] Purpose: Fixed HDFFV-4259
Description:
    - Used H5I_INVALID_HID instead of 0 to initialized member "id" in classes
      that represent HDF5 objects.  For PropList, H5P_DEFAULT has to be used
      instead of H5I_INVALID_HID.
    - Added try/catch block to some dynamically allocating memory code and
      re-throw the bad_alloc exception with a message informing the location of
      the failure.
    (merged from trunk-r25640)

Purpose: Fixed HDFFV-8852
Description:
    H5F_ACC_CREAT was included in the C++ API while the C library doesn't
    allow it yet.  Possibly, in the future, but not now.  In addition, the
    two flags H5F_ACC_RDONLY and H5F_ACC_RDWR were missing from the
    documentation, causing confusion that appending is not supported.
Solution:
    - Removed H5F_ACC_CREAT from the function until the C library support it
    - Added H5F_ACC_RDONLY and H5F_ACC_RDWR to the comments to update the
      documentation
    (merged from trunk-r25632)

Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-10-01 23:05:38 -05:00
Albert Cheng
40c1751340 [svn-r25652] Bug fix: HDFFV-8933
Description:
Mac has changed to use the clang/clang++ compilers but compiler settings for production, debug and profile
were not setup.

Solution:
Setup default values for PROD_CFLAGS, PROD_CPPFLAGS, DEBUG_CFLAGS, DEBUG_CPPFLAGS.
PROFILE_CFLAGS and PROFILE_CPPFLAGS were set too but clang does not -pg or such for
profiling. Need to fix it later.

Tested: duck, swallow, and quail using --enable-production.
2014-10-01 17:26:02 -05:00
Allen Byrne
4c5cbf9719 [svn-r25648] Update cygwin install doc with better information contained in the trunk version.
Added debug VFD tests to known problems.
Checked versions of windows and extra linux VMs.
2014-10-01 11:02:19 -05:00
Scot Breitenfeld
4254a2b195 [svn-r25647] Updated the LT_VERS_* to match the branch. 2014-10-01 10:17:30 -05:00
Scot Breitenfeld
f1e70ac474 [svn-r25643] merged change 23241 into the branch. 2014-09-30 20:58:09 -05:00
Scot Breitenfeld
f253503195 [svn-r25642] merged changes 25614,25629,25631 into branch. 2014-09-30 17:16:33 -05:00
Scot Breitenfeld
a9ac64296a [svn-r25630] Brought changes from the trunk to the branch:
svn merge -r25432:25629 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran
2014-09-29 10:57:15 -05:00
HDF Tester
767e3e2f6d [svn-r25628] Snapshot version 1.8 release 14 (snap17) 2014-09-28 18:05:00 -05:00
Allen Byrne
7d8632d7f9 [svn-r25625] Define symbol for other compilers as nothing. 2014-09-26 09:13:51 -05:00
Mohamad Chaarawi
ef316daec8 [svn-r25621] merge 25620 from trunk.
Fix a bug in multi VFD when the memb_addr in H5Pset_fapl_multi is
passed as NULL. The library is supposed in that case to equally divide
the address space among all members, but there was a bug causing an
overflow in the assignment.
2014-09-25 14:32:18 -05:00
Allen Byrne
0773ea2f19 [svn-r25619] Include plugin header change. H5PLextern.h and H5PLprivate.h have two opposing use cases, only the enum is common.
Tested: local linux and windows
2014-09-25 12:31:54 -05:00
Allen Byrne
39f52896ff [svn-r25616] Update Windows Daily Test machines 2014-09-25 09:05:48 -05:00
Allen Byrne
a56ea789f7 [svn-r25609] Windows needs extra slashes 2014-09-23 15:21:38 -05:00
HDF Tester
9882ce014a [svn-r25606] Snapshot version 1.8 release 14 (snap16) 2014-09-21 17:52:50 -05:00
HDF Tester
ed9d380720 [svn-r25592] Snapshot version 1.8 release 14 (snap15) 2014-09-14 17:54:22 -05:00
Frank Baker
a401577753 [svn-r25590] Description:
Remove extraneous C++ notes from RELEASE.txt; these were early notes 
    for 1.8.13 entries and do not apply to 1.8.14.
2014-09-12 13:22:54 -05:00
Frank Baker
4f76189f69 [svn-r25589] Description:
Insert 1.8.13 RELEASE.txt text into HISTORY file.
2014-09-12 13:18:03 -05:00
HDF Tester
d6ddaac37b [svn-r25577] Snapshot version 1.8 release 14 (snap14) 2014-09-07 17:55:32 -05:00
Mohamad Chaarawi
aed8c36059 [svn-r25574] Merge 25573 from trunk:
- fix error output when dataset verify detects wrong data.
2014-09-05 14:32:10 -05:00
Albert Cheng
c8c53935a9 [svn-r25568] Removed the previous intentional failure.
Tested: ttsafe passed again.
2014-09-02 17:28:39 -05:00
HDF Tester
cb0f502fa4 [svn-r25564] Snapshot version 1.8 release 14 (snap13) 2014-08-31 17:52:53 -05:00
Allen Byrne
a9c4db3af8 [svn-r25551] JAVA-1880: hdfview failure to load plugins identified default value was incorrectly formed.
Tested: windows
2014-08-25 16:11:06 -05:00
HDF Tester
584c42ad94 [svn-r25547] Snapshot version 1.8 release 14 (snap12) 2014-08-24 17:56:55 -05:00
Mohamad Chaarawi
91aab97346 [svn-r25543] merge 25509 & 25524 from trunk.
Optimize chunked dataset fill operation by making it collective.
 + add a workaround for new algorithm to work with ompi.

Update RELEASE.txt with this new optimization.
2014-08-22 10:39:14 -05:00
Albert Cheng
2ef52022e0 [svn-r25539] Introduced an intentional failure in order to verify if cloud test machine and
in house machines will fail the same.

The change should be reversed after the verification.
2014-08-19 16:49:41 -05:00
HDF Tester
43e2783d40 [svn-r25535] Snapshot version 1.8 release 14 (snap11) 2014-08-17 17:52:05 -05:00
Dana Robinson
89ff12bfb2 [svn-r25529] Purpose:
Merged r25508 from the trunk.
    Adds a check that ensure the page_size parameter in
    H5Pset_core_write_tracking is not zero. This ensures that the behavior
    matches the text in the reference manual.

Tested on:
    32-bit LE linux (jam), tested with make check-vfd.

    This is a very minor change and does not require full testing.
2014-08-11 09:39:49 -05:00
Mohamad Chaarawi
c1735ecdb7 [svn-r25528] bring 25514 and 25516 from trunk:
Replace MPI deprecated routines with undeprecated ones.
2014-08-11 09:27:56 -05:00
Scot Breitenfeld
05df796d6a [svn-r25526] Merged 25480 from the trunk into the branch 2014-08-11 09:17:09 -05:00
Scot Breitenfeld
8fc11e6bc8 [svn-r25525] brought revision 25477 from the trunk. 2014-08-11 09:13:42 -05:00
HDF Tester
53e7d88a5f [svn-r25523] Snapshot version 1.8 release 14 (snap10) 2014-08-10 17:57:40 -05:00
Allen Byrne
5860bde232 [svn-r25519] HDFFV-8880: Remove t_posix_compliant test references 2014-08-06 16:49:50 -05:00
Allen Byrne
8c95a5f25a [svn-r25512] set svn property to executable 2014-08-05 09:14:19 -05:00
Mohamad Chaarawi
1b45e8a31a [svn-r25501] bring 25500 from trunk to fix HDFFV-8888 - H5Ldelete_by_idx fails on non-existent group name. 2014-07-31 14:33:18 -05:00
Quincey Koziol
e8c162613b [svn-r25497] Description:
Merge changes that correspond to the 64-bit ID changes (without the actual
switch to 64-bit IDs) to the 1.8 release branch.  (Plus a few minor cleanups
and alignments with the trunk that aren't on the branch)

Tested on:
    Mac OSX/64 10.9.4 (amazon) w/C++ & FORTRAN
    (h5committested on branch already for a week)
2014-07-30 15:56:40 -05:00
Allen Byrne
ff1a9ae0e7 [svn-r25494] Add the genltanalyse script to bin and the reconfigure. hl/src files previously committed. 2014-07-30 14:52:44 -05:00
Mohamad Chaarawi
22b4ee2d17 [svn-r25490] bring 25468 from trunk.
Aligning code with changes made in VOL branch. This will make porting
non VOL related changes from trunkto the 1.8 branch much easier.

tested h5commitest.
2014-07-29 13:56:43 -05:00
Albert Cheng
ba6a00e92f [svn-r25467] Updated with bug fix for HDFFV-8881. 2014-07-22 14:47:22 -05:00
Albert Cheng
fe090c1a5c [svn-r25466] Bug fix: HDFFV-8881
testfrome.c has incorrectly exit code (using -1). Fixed by replacing them
with C defined EXIT_FAILURE. Verified by temporary decreaing MAXNUMTESTS
to introduce failure in testhdf to see the changed code did work.
Also replaced all other correctly coded exit codes with the C defined
EXIT_SUCCESS and EXIT_FAILURE. This would help portability for non-Unix
systems.

Tested: h5committest.
2014-07-22 14:40:41 -05:00
Mark Evans
8ee0ef54a4 [svn-r25461] The contents of this directory is the C++ Reference Manual and
is generated by Doxygen.
2014-07-22 08:16:55 -05:00
Mark Evans
1e371dd9fc [svn-r25458] Merged revision(s) 25457 from branches/hdf5_1_8_13/c++/src/H5CppDoc.h:
Added a sentence suggested by Barbara to the Installation section. Part of HDFFV-8868 work. 

Tested: Doxygen and Firefox
2014-07-21 13:46:51 -05:00
Quincey Koziol
65aed6681b [svn-r25454] Description:
Bring change from trunk to 1.8 branch:

r25450:
    Initial tweaks to align with VOL branch.

Tested on:
    Mac OSX/64 10.9.3 (amazon) w/gcc 4.9
    (h5committest not required, too small)
2014-07-21 12:50:47 -05:00
Mark Evans
d4b53e37e1 [svn-r25445] Changed file in Installation section where users should look for instructions from release_docs\INSTALL_Windows.txt to release_docs\INSTALL. Fixes HDFFV-8868.
Tested: Doxygen
2014-07-21 10:53:38 -05:00
Mark Evans
a9d9fd5b01 [svn-r25442] Changed file in Installation section where users should look for instructions from release_docs\INSTALL_Windows.txt to release_docs\INSTALL. Fixes HDFFV-8868.
Tested: Doxygen
2014-07-21 10:31:26 -05:00
HDF Tester
b2f29298b2 [svn-r25436] Snapshot version 1.8 release 14 (snap9) 2014-07-20 18:00:51 -05:00
Scot Breitenfeld
442f985464 [svn-r25433] Brought changes from the trunk into the branch.
For the top level, brings in changes for configure.ac, configure and the MANIFEST:

   svn merge -c25286 https://svn.hdfgroup.uiuc.edu/hdf5/trunk .
   svn merge -c25287 https://svn.hdfgroup.uiuc.edu/hdf5/trunk .
   svn merge -c25290 https://svn.hdfgroup.uiuc.edu/hdf5/trunk .

For the fortran level:

   384	17:00	svn merge -r25235:25272 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran
   389	17:01	svn merge -r25284:25432 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran

For the fortran merges, I skipped changes relating to hyperslab selection since the C source has not been merged from the trunk yet. These changes should be in place in the fortran source when the C source is merged to the 1.8 branch.
2014-07-18 17:17:58 -05:00
Allen Byrne
b79ca69a25 [svn-r25409] Add ASPRINTF define - check already in configure 2014-07-14 11:19:04 -05:00
Allen Byrne
28726a7951 [svn-r25408] Merge cmake configure checks from trunk 2014-07-14 11:12:15 -05:00
Mohamad Chaarawi
515aa0b930 [svn-r25404] add serial and parallel regression tests for zero dset read/write bug.
(merged from trunk)
2014-07-10 16:32:20 -05:00
Mohamad Chaarawi
2700d20859 [svn-r25402] Bring 25397/8 from trunk:
- remove configure checks for MPI_File_get_size and Big MPI_File_set_size as they are supported by MPIO implementations today.
- fix bug in t_mpi.c (HDFFV-8856)

tested with h5committest.
2014-07-10 09:36:34 -05:00
Mohamad Chaarawi
0cb7846c40 [svn-r25400] bug fixes where a wrong type was used instead of hid_t. 2014-07-09 12:27:31 -05:00
HDF Tester
43051ab6cf [svn-r25396] Snapshot version 1.8 release 14 (snap8) 2014-07-06 19:22:09 -05:00
Mohamad Chaarawi
19707bc2b8 [svn-r25393] fix HDFFV-8761:
allocating space for zero-length chunked dataset and asserting.
2014-07-03 10:59:49 -05:00
HDF Tester
51ea45ed2e [svn-r25379] Snapshot version 1.8 release 14 (snap7) 2014-06-29 18:07:05 -05:00
Allen Byrne
34e371a4c2 [svn-r25351] Add more vfd tests to smaller timeout limits 2014-06-24 10:14:50 -05:00
Allen Byrne
f578873b26 [svn-r25344] Add more vfd tests to smaller timeout limits 2014-06-23 16:57:29 -05:00
HDF Tester
3a71c775af [svn-r25340] Snapshot version 1.8 release 14 (snap6) 2014-06-22 18:18:18 -05:00
Mark Evans
84f9060a9a [svn-r25318] Edited the Introduction section.
Tested: Doxygen and Firefox
2014-06-18 11:11:07 -05:00
Allen Byrne
2925189046 [svn-r25311] Add max time for VFD objcopy test 2014-06-18 09:02:28 -05:00
Dana Robinson
1ef0d8e245 [svn-r25276] Merge of r25274 from trunk.
Eliminates DllMain from static builds (an oversight in the implementation). Fixes HDFFV-8837.

Tested on 64-bit Windows 7 with Visual Studio 2012.
2014-06-13 11:10:25 -05:00
Allen Byrne
79c3535fe3 [svn-r25268] update to 1.4.17 m4 caused no code or file changes 2014-06-12 15:12:36 -05:00
Allen Byrne
443a09f60d [svn-r25267] update external lib option property 2014-06-12 15:07:08 -05:00
Allen Byrne
ef36fba67b [svn-r25263] limit vfd flush1 test time 2014-06-11 14:44:52 -05:00
Allen Byrne
19800d2497 [svn-r25251] change test to ignore h5diff warnings (endianess issue) 2014-06-10 11:39:00 -05:00
Allen Byrne
4840a43e26 [svn-r25247] Correct property 2014-06-10 10:00:41 -05:00
Scot Breitenfeld
cb461d0ece [svn-r25237] Merged changes from the trunk to the branch,
svn merge -r25009:25235 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran

Tested: jam (gnu, intel, pgi)
2014-06-03 08:52:32 -05:00
HDF Tester
c8243334b0 [svn-r25233] Snapshot version 1.8 release 14 (snap5) 2014-06-01 23:37:57 -05:00
Quincey Koziol
b0fe30721b [svn-r25225] Description:
Bring r25215 from trunk to 1.8 branch:

    Bring changes from Coverity branch back to trunk:

    r20914:
        Use HDstrncpy and HDstrncat! --gh

    r20915:
        Use HDstrncpy and HDstrncat! --gh

Tested on:
    MacOSX/64 10.9.3 (amazon) w/gcc 4.9, FORTRAN, C++, multi-threads & parallel
    (h5committested on the trunk)
2014-05-29 16:26:28 -05:00
Allen Byrne
5278b9737d [svn-r25222] Merge cmake_ext_mod into 1.8 2014-05-27 12:46:30 -05:00
HDF Tester
fea439b440 [svn-r25217] Snapshot version 1.8 release 14 (snap4) 2014-05-25 18:50:34 -05:00
Quincey Koziol
6bca0b8429 [svn-r25209] Description:
Bring r25206 & r25207 from trunk to 1.8 branch:

r25206:
    Add new warning flags for gcc 4.9.x

r25207:
    Merge changes from Coverity branch to trunk:

    r20907:
        Original issue was #338.

        Refactored code to clean up allocations consistantly, completely, check all returns, assign initialization values and handle errors.

Tested on:
    MacOSX/64 10.9.3 (amazon) w/C++, FORTRAN & parallel
    (h5committested on trunk)
2014-05-21 13:58:19 -05:00
Binh-Minh Ribler
e5844f4f01 [svn-r25204] Description:
Set OUTPUT_DIRECTORY to cpplus_RM and HTML_OUTPUT to '.' because
    they were reset by accident causing "bin/release doc" to fail.

    Ran bin/release to verify the failure was gone.
    Merged from trunk: r25202

    Also, removed from functions' comments some arguments that are only
    applicable to the trunk.  Doxygen gave warnings.

Platforms tested:
    Linux/32 2.6 (jam) - very minor, only comments
2014-05-19 14:49:38 -05:00
Binh-Minh Ribler
beccc53e95 [svn-r25203] Description:
Made printError() virtual as the original; missed it from the previous fix.
    Merged from trunk: r25123
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-05-19 12:52:56 -05:00
HDF Tester
37a1339c04 [svn-r25200] Snapshot version 1.8 release 14 (snap3) 2014-05-18 10:37:16 -05:00
Quincey Koziol
a9d99b0539 [svn-r25198] Description:
Bring r25197 from trunk to 1.8 branch:

    Bring changes from hdf5_1_8_coverity branch back to trunk:

r20878:
    Issue 76: Check if H5Tget_nmembers(type) fails and simply return(FALSE). Also move printf to after check.

r20880:
    Issue 192: Create ret_val var set to -1. Add out label for failures to jump to, return ret_val at bottom.

r20882:
    Fixes for coverity:
    1) bug #1679: remove dead code in test/mf.c
    2) bug #1680: remove dead code in tools/lib/h5diff_dset.c

r20883:
    Fix coverity issue 585

    Description:
    Changed variable "c" in processStrData in h5import.c to an int, to match fgetc
    return value, and removed call to feof, instead checking if c == EOF.

Tested on:
    MacOSX/64 10.9.3 (amazon) w/C++, FORTRAN & parallel
    (too minor to require h5committest)
2014-05-17 22:29:30 -05:00
Allen Byrne
d55f3671dc [svn-r25190] Fix CMP0053 cmake usage and add VS2013 2014-05-14 14:53:47 -05:00
Allen Byrne
6bbe9775c7 [svn-r25186] update cmake command name case 2014-05-12 13:15:10 -05:00
Allen Byrne
b75a1cae07 [svn-r25184] correct path statement 2014-05-12 12:38:38 -05:00
Allen Byrne
82a8520120 [svn-r25180] Correct list indentation 2014-05-09 14:07:03 -05:00
Allen Byrne
2a33fe0d59 [svn-r25163] Update file to match release changes 2014-05-05 14:40:19 -05:00
HDF Tester
e2971312a1 [svn-r25159] Snapshot version 1.8 release 14 (snap2) 2014-05-04 11:59:16 -05:00
Allen Byrne
573d2b895e [svn-r25146] Updated sections.
Changed APPENDIX to Platform configuration file example with extra comments.
Updated files for web.
2014-05-02 13:04:16 -05:00
Albert Cheng
1852861737 [svn-r25140] Commit Joel's fix to this branch.
Bug Fix: HDFFV-8247

Description:
  Failure to write fill values to the user's buffer when reading unallocated
  chunks from datasets that have a fill value set to H5D_FILL_VALUE_DEFAULT.
  A consequence of this was the reporting of spurious data values in h5dump
  and h5diff output.

Solution:
  Added check for fill value of H5D_FILL_VALUE_DEFAULT whenever fill value 
  setting was checked to decide whether or not to fill. This effectively
  treats H5D_FILL_VALUE_DEFAULT the same as H5D_FILL_VALUE_USER rather than
  H5D_FILL_VALUE_UNDEFINED.

Tested:
   h5committest (platypus, ostrich, jam-pp, koala) ran successfully
   (fillval test was modified to reveal and check for this error)

H5Dchunk.c:
    fix in library code.

fillval.c:
Added test_partalloc to expose potential fill value issues.
2014-04-30 19:47:57 -05:00
Albert Cheng
0ce16924cd [svn-r25137] Bug: HDFFV-8433
The temporary directory used by zip is the same as the rest but it has to be different.
Changed tar2zip to use a different (ztmpdir) name.

Tested: by hand running "bin/release ... gzip zip md5".
2014-04-29 20:25:20 -05:00
Allen Byrne
75963cf5ed [svn-r25132] Add clarification to download location and extlibs. 2014-04-28 16:41:36 -05:00
HDF Tester
994a841402 [svn-r25127] Snapshot version 1.8 release 14 (snap1) 2014-04-27 11:50:01 -05:00
Albert Cheng
612588af17 [svn-r25121] HDFFV-8755: Remove compress option from bin/release
Tested: by hand. "bin/release ... compress" to see it failed and to see it succeeded when compress is not used.
2014-04-25 18:24:34 -05:00
Quincey Koziol
7a66843810 [svn-r25119] Description:
Make the exit status from ph5diff always be 0, as it is on the trunk.  Also
a few coding standard cleanups to the test generation code.

Tested on:
    MacOSX/64 10.9.2 (amazon) w/FORTRAN & parallel
    (h5committest not necessary)
2014-04-25 18:16:15 -05:00
Binh-Minh Ribler
1a5d6e47d2 [svn-r25116] Description:
- Put back Exception::printError for backward compatibility
    - Added static member function Exception::printErrorStack to print
      error stack without an instance of Exception.
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-04-25 16:54:22 -05:00
Binh-Minh Ribler
67641211a8 [svn-r25115] Description:
- Put back Exception::printError for backward compatibility
    - Added static member function Exception::printErrorStack to print
      error stack without an instance of Exception.
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-04-25 16:54:00 -05:00
Dana Robinson
c5815755cc [svn-r25111] Changed Subeversion EOL and executable properties. No code changes. 2014-04-25 15:58:01 -05:00
Quincey Koziol
4257a32de1 [svn-r25109] Description:
Bring r25084, 25088, 25092, 25097 from trunk to 1.8 branch:

r25084:
    Begin process of migrating from using property list IDs internally to the
library to using the internal generic property list data structure.

r25088:
    Introduce "file I/O info" struct, to hold file & dxpl pointers, and start
propagating up through library.

r25092:
    More migration to using H5F_io_info_t pointers and away from using
property list IDs internally.  Also, clean up some compiler warnings in the
cache code.

r25097:
    Make progress toward moving from DXPL IDs to property list structures
within the library.  Also move the signature location code from the H5F
package to the H5FD package, where it's a better fit.  Also, clean up some
more compiler warnings along the way.

Tested:
    Mac OSX/64 10.9.2 (amazon) w/C++, FORTRAN & parallel
    (h5committested on trunk)
2014-04-25 14:54:57 -05:00
Larry Knox
b018ba48ce [svn-r25106] Removed LT_ADD_LIBHDF5_DEPENDENCY configure conditional to roll back fix for removing rpaths from lib files. The fix also removed dependencies on libhdf5, etc. when the --disable-sharedlib-rpath configure option was invoked.
Added instead configure variable hardcode_into_lib=no.  This removes rpath from lib files on Linux and solaris machines.

Tested with h5committest on jam, koala, ostrich and platypus (cmake), and on emu and kite.
2014-04-25 14:34:54 -05:00
Allen Byrne
bbaec6dfe4 [svn-r25104] Correct installed menu name 2014-04-25 11:50:23 -05:00
Allen Byrne
27acfa6f32 [svn-r25100] Added -V to example command line.
Added note about INSTALLDIR.
2014-04-25 10:27:05 -05:00
Allen Byrne
213b3851be [svn-r25099] Disable fortran by default 2014-04-25 09:35:59 -05:00
Albert Cheng
ed5f0fbd4f [svn-r25094] Bug: HDFFV-8433
Need to unify Windows release process (zip file) and Unix release process (bin/release-> tarfile)

Solution:
Added a new option (zip) to generate Windows zip file from the release tarball.

Tested: by hand running "bin/release ... gzip zip" to verify zip file looks right.
Allen and Dana then confirmed the zip file can be used to build and test HDF5
library without error.
2014-04-24 16:37:20 -05:00
Albert Cheng
7031b03ac8 [svn-r25082] Bug HDFFV-8625, HDFFV-8639, HDFFV-8745:
h5diff issues "unable to read attribute" error message when comparing
    two files

Description:
    h5diff did not handle attributes of variable length strings
    correctly. It created the wrong memory type if one but not both
    compared attributes are of the variable strings type. It ended in
    H5Aread() failure.

Solution:
    We decided to treat the case when one type is variable length string
    and the other is not as incomparable. That bypassed the above error.
    We still need to figure out the proper way, if possible, to compare
    variable string with non-variable string types.

Tested: h5committested plus tested in Swallow (OS X 10.8).
2014-04-22 17:30:38 -05:00
Allen Byrne
2fc0c50a9d [svn-r25076] Correct the install folder logic.
Tested: local linux
2014-04-22 14:02:40 -05:00
Allen Byrne
3bd99b85ba [svn-r25074] HDFFV-8709: Add changes for HDFFV-8676, -8677, -8678
Tested: local linux
2014-04-22 08:56:58 -05:00
HDF Tester
b59f172c53 [svn-r25071] Snapshot version 1.8 release 14 (snap0) 2014-04-20 12:17:26 -05:00
Larry Knox
10c13288b4 [svn-r25068] Fix for HDFFV-8276, the --disable-sharedlib-rpath configure optino doesn't remove rpaths from th
e library files, was checked into trunk in September 2013, but not into the 1.8 branch.  part of
 the code was merged to v1.8 in the interim for fortran, but not for hl or c++.  The rest is mer
 ged in this revision.
 The --disable-sharedlib-rpath option seems to have no effect on non-Linux platforms.

 Tested with h5committest on jam, koala, ostrich and platypus.
 Tested with --disble-sharedlib-rpath option on jam, platypus, emu and quail.
 Absence of rpaths verified on jam and platypus.
2014-04-18 16:52:44 -05:00
Binh-Minh Ribler
19125219cd [svn-r25062] Description:
Put back overloaded functions for backward compatibility:
    - were replaced by better prototyped versions, such as Attribute::getNam.
    - were modified to add const to constant arguments.
    Added notes for future removal in documentation.
    (Elena approved.) Merged from trunk r25061.
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-04-17 21:39:50 -05:00
Frank Baker
33fd0f8ce2 [svn-r25056] Description:
Update copyright notice to include 2014.
2014-04-16 13:13:48 -05:00
Larry Knox
74435047bb [svn-r25053] Merge changes to RELEASE.txt for 1.8.13 release:
Reviewed and revised version information for unix daily tested machines in supported a
d tested platforms sections.
Added description of LD_LIBRARY_PATH change to configure and using scripts to compile
nd run installed example files to Bug Fixes/Configuration section.

Text change only.
2014-04-16 11:45:25 -05:00
Quincey Koziol
66fb0ea64e [svn-r25050] Description:
Bring r24995 and r24998 from the trunk to the 1.8 branch:

r24995:
Improve checks for NULL buffer from user during H5Dread/H5Dwrite calls.

r24998:
Check in Neil's changes for correctly handling case where library is
reinitialized through a deprecated routine.

Tested on:
    Mac OSX/64 10.9.2 (amazon) w/serial & paralle
    (change has baked on trunk for >7 days)
2014-04-16 10:33:08 -05:00
Allen Byrne
c45423a13d [svn-r25044] Correct test DEPENDS format. 2014-04-14 10:51:01 -05:00
Binh-Minh Ribler
1b1d5bb45a [svn-r25042] Description:
Updated for C++ API new features and bug fixes.
2014-04-14 10:44:04 -05:00
Elena Pourmal
5cf6bbcd8c [svn-r25041] Maintenance: More version cleanup in the file 2014-04-14 07:44:23 -05:00
Elena Pourmal
09e02189b6 [svn-r25039] Maintenance: Cleaned the RELEASE.txt file for the next maintenance cycle. 2014-04-14 07:30:23 -05:00
Elena Pourmal
2530ede1c6 [svn-r25036] Maintenance before creating 1_8_13 branch: changed version number to 1.8.14-snap0 2014-04-14 07:20:06 -05:00
HDF Tester
3b00476853 [svn-r25035] Snapshot version 1.8 release 13 (snap8) 2014-04-13 17:51:07 -05:00
Dana Robinson
785da34bce [svn-r25033] Purpose:
Merged r24993 from the trunk.
    Adds core VFD write tracking functionality. When enabled, the core VFD
    will track dirty regions of the file and only write out the changed
    regions. The new H5Pget/set_core_write_tracking() API call controls this
    feature. A new "core_paged" VFD target was added to the check-vfd target
    in test/Makefile.am that runs all tests with the new write tracking
    functionality.

Tested on:
    32-bit LE linux (jam)
    64-bit LE linux (koala)
    64-bit BE linux (ostrich)

    Each platform was tested with HDF5_DRIVER set to "core" and "core_paged".
    Jam was also tested with the standard sec2 driver.
2014-04-12 05:30:16 -05:00
Binh-Minh Ribler
9b77c50706 [svn-r25032] Description:
Fixed typos in comments.
Platforms tested:
    Linux/32 2.6 (jam) - very minor
2014-04-11 23:45:20 -05:00
Binh-Minh Ribler
6b8d6e870f [svn-r25031] Purpose: Fix HDFFV-8737
Description:
    - Fixed a few comments that Doxygen gave warnings on.
    - Updated configuration file for Doxygen.
    - Removed stylesheet from configuration so Doxygen will use the default
        stylesheet and removed the CLANG-related lines to eliminate another
        error since we're not using that feature, so the lines should not
        present. (from cpp_doc_config)
    - Added missing images
    (merged from trunk-r24996 and r25019)
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-04-11 23:33:50 -05:00
Binh-Minh Ribler
a791213860 [svn-r25030] Purpose: Fix HDFFV-8658
Description:
    Turned on warnings and removed some of those.
    (merged from trunk-r24994)
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-04-11 23:02:26 -05:00
Binh-Minh Ribler
170b9d0eed [svn-r25029] Purpose: Fixed HDFFV-3384
Description:
    - Added const to const arguments
    - Fixed miscellaneous comments
    (merged from trunk-24991)
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-04-11 22:54:25 -05:00
Binh-Minh Ribler
53a50fa7c8 [svn-r25028] Purpose: Fix HDFFV-8367
Description:
    - Added wrappers to CommomFG for H5Oget_info_by_name() to get a child
      object's type (requested by user)
        H5O_type_t childObjType(const H5std_string& objname) const;
        H5O_type_t childObjType(const char* objname) const;
        H5O_type_t childObjType(hsize_t index, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_INC, const char* objname=".") const;
    - Added tests to tobject.cpp
    (merged from trunk-r24983)
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-04-11 22:34:19 -05:00
Scot Breitenfeld
19c485a128 [svn-r25027] Merged changes from the trunk to the branch,
svn merge -r24929:25009 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran

tested: jam (gnu)
2014-04-11 22:26:21 -05:00
Binh-Minh Ribler
33956e594a [svn-r25026] Description:
Added tobject.cpp.
2014-04-11 22:17:11 -05:00
Binh-Minh Ribler
e92a2e7689 [svn-r25024] Description:
Added c++/test/tobject.cpp
2014-04-11 22:01:38 -05:00
Binh-Minh Ribler
f61bc97180 [svn-r25023] Description:
- Added wrappers to H5Object for H5Iget_name() to get object's name
        ssize_t getObjName(char *obj_name, size_t buf_size = 0) const;
        ssize_t getObjName(H5std_string& obj_name, size_t len = 0) const;
        H5std_string getObjName() const;
    - Added tests tobject.cpp
    - Added to various cleanup_* functions in tests to remove generated files
    - Added an overload H5I_type_t getHDFObjType() to get object's type
    (merge from trunk-24969)
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu) with gmake
2014-04-11 21:47:07 -05:00
Binh-Minh Ribler
adff7e81bd [svn-r25022] Purpose: Code improvement
Description:
    - Overloaded Atribute::getName to take a char* for the attribute name:
        ssize_t Attribute::getName(char* attr_name, size_t buf_size)
    - Switched the arguments in this function:
        ssize_t getName(size_t buf_size, H5std_string& attr_name)
        so it became:
        ssize_t getName(H5std_string& attr_name, size_t buf_size)
        The second argument is default to 0, and can be skipped.
    - Removed this function:
        H5std_string getName(size_t buf_size); it'll collide with the
        first function when that function takes a NULL for the first
        argument, and uses default value for the second argument.
    - Added more tests
    (merged from trunk-r24938)
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu) with gmake
2014-04-11 21:10:49 -05:00
Binh-Minh Ribler
d9703d66de [svn-r25021] Description:
Added proper deallocation/allocation to test.
    Revised incorrect comments.
    (merged from trunk-r24929)
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-04-11 21:00:45 -05:00
Dana Robinson
f466a5d298 [svn-r25018] Purpose:
Merged r24893, r24961, r24965 from trunk.
    Fix for thread-local storage resource leaks on Windows with Win32 threads.
    Prohibits thread-safe + C++/Fortran/static library in CMake.

Tested on:
    64-bit Windows 7 w/ Visual Studio 2012
2014-04-11 14:04:54 -05:00
Larry Knox
17a1f1a597 [svn-r25017] Merge r24997 changes from trunk.
Added compiler versions for mpich to settings file and configure summary.
For make installcheck, compile and run installed examples using the installed scripts.  They
  were being compiled but not run.
Add Fortran2003 examples to the run-ex-fortran script when fortran2003 is enabled.
  Set flag to -O3 in production mode for Intel compilers other than those with specified other settings.
  Gentoo patches:
    Remove unnecessary setting of LD_LIBRARY_PATH from configure.
    Prevent potential array subscript out of bounds error in perform/pio_engine.c and sio_engine.c.

Tested with h5committest on jam, koala, ostrich and platypus.
2014-04-11 13:50:55 -05:00
Dana Robinson
29791cf160 [svn-r25016] Purpose:
Merged r24857 from the trunk.
    Changes to configure.ac so that --with-pthreads is not required
    when the --enable-threadsafe configure option is set as long as
    the Pthreads library is in a standard location.

Tested on:
    32-bit LE linux (jam) with --enable-threadsafe
    64-bit LE linux (koala) with --enable-threadsafe
    64-bit BE linux (ostrich) with --enable-threadsafe
2014-04-11 10:32:58 -05:00
Dana Robinson
14c09fc400 [svn-r25015] Purpose:
Updated RELEASE.txt with more information about the big.c
    test changes.

Tested on:
    N/A - no code changes
2014-04-11 10:00:10 -05:00
Dana Robinson
8a52475245 [svn-r25014] Purpose:
Merge of r24937 from the trunk
    Adds H5free_memory to the API. This function should be used to free
    memory allocated by the library (e.g., returned values from
    H5Tget_tag, H5Pget_class_name, etc.).

    This is mainly to help Windows applications deal with multiple CRT 
    instances, but can also be helpful when a debug memory manager is
    being used or when the HDF5 API is being wrapped for managed languages
    like Python and Java.

Tested on:
    32-bit LE linux (jam) with fortran and C++
    64-bit BE linux (ostrich)
    64-bit LE linux (koala)
2014-04-11 09:48:31 -05:00
Dana Robinson
6240fb24e6 [svn-r25013] Purpose:
Merge of r24416 from the trunk
    Fixes a number of compiler warnings in the dsets test.

Tested on:
    32-bit LE linux (jam) - very minor changes, mostly casts
2014-04-11 08:50:26 -05:00
Allen Byrne
051c3b5e68 [svn-r25010] Add missing mod file to install 2014-04-10 08:28:32 -05:00
Allen Byrne
b70a2a6519 [svn-r25006] Update release docs 2014-04-09 14:05:37 -05:00
Allen Byrne
2a89a9571d [svn-r25003] Add missing mod file to install 2014-04-09 10:11:35 -05:00
Albert Cheng
a9110fa0d1 [svn-r25000] Bugfix: HDFFV-8639
h5diff segfaults with user's files

Solution:
Added a variable to indicate if real data are in the buffer and will call H5Dvlen_reclaim()
only when real data are in the buffer.

Tested: with the user provided data files and no more segmentaion fault.
Also h5committ tested.
2014-04-09 06:41:28 -05:00
Quincey Koziol
7401da00f6 [svn-r24992] Update release notes with information about the collective point selection
support and removal of the MPI-POSIX VFD.
2014-04-08 22:11:24 -05:00
Albert Cheng
b95d364d84 [svn-r24990] Problem:
AIX compiler complains that:
ex_ds1.f90, line 89.16: 1512-050 (W) Field separator is missing, in literal FMT specifier, after edit descriptor X.  A comma is assumed.
Line 89:
  WRITE(*,'(/,5X 3(A,1X),I0,A,L1)') 'Is',TRIM(DS_1_NAME),&

Solution:
Added the missing comma after "5X".

Tested:
AIX system.
2014-04-08 20:08:31 -05:00
Allen Byrne
5b87658bd0 [svn-r24981] Add missing file 2014-04-07 12:30:31 -05:00
Allen Byrne
ab2d9f1e9c [svn-r24980] HDFFV-8290: Merge automake 1.14.1 changes from trunk
Tested: h5committest
2014-04-07 12:26:44 -05:00
Elena Pourmal
fadc2d8c61 [svn-r24971] Maintenance: Fixed two typos in the comments; see HDFFV-8714 2014-04-06 17:56:08 -05:00
HDF Tester
4770fc0aad [svn-r24968] Snapshot version 1.8 release 13 (snap7) 2014-04-06 17:10:58 -05:00
Scot Breitenfeld
3936548bc5 [svn-r24930] Merged changes in the trunk to the branch,
svn merge -r24650:24929 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran .

tested: jam (intel, pgi, gnu)
2014-03-31 09:25:44 -05:00
Binh-Minh Ribler
963bace0d1 [svn-r24928] Purpose: Fix HDFFV-7907
Description:
    Added transform property list functions
        // Constructor creates a dataset transform property list.
        DSetMemXferPropList(const char* expression);

        // Sets data transform expression.
        void setDataTransform(const char* expression) const;
        void setDataTransform(const H5std_string& expression) const;

        // Gets data transform expression.
        ssize_t getDataTransform(char* exp, size_t buf_size=0) const;
        H5std_string getDataTransform() const;

    Added test file tdspl.cpp.

Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-03-30 19:48:46 -05:00
HDF Tester
63c5964bb4 [svn-r24927] Snapshot version 1.8 release 13 (snap6) 2014-03-30 17:07:13 -05:00
Allen Byrne
9358ecc1a3 [svn-r24921] Add MINGW check 2014-03-27 15:36:03 -05:00
Allen Byrne
441eee4ab1 [svn-r24915] Correct merge mistake 2014-03-27 11:42:10 -05:00
Binh-Minh Ribler
764128aaf2 [svn-r24913] Purpose: Fix HDFFV-8642
Description:
    Added CompType::setSize(size_t size) to set size for compound data type
    as H5Tset_size had been changed.
    Merged from trunk-24912
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-03-27 00:09:59 -05:00
Allen Byrne
d9020f2e35 [svn-r24906] Merge latest CMake changes from trunk.
Tested: local linux
2014-03-26 10:00:35 -05:00
Binh-Minh Ribler
3944dcb308 [svn-r24902] Description:
Fixed mismatched function prototype/definition that caused daily
    test failure on emu/production/HDF5TestExpress=1.
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-03-25 22:30:07 -05:00
Quincey Koziol
a7d3f5b5b1 [svn-r24894] Description:
Bring r24869 & r24875 from trunk to 1.8 branch:

    Clean up more compiler warnings, plus merge a few Coverity bug fixes from
the hdf5_1_8_coverity branch back to the trunk:

r20877:
Purpose: Fix coverity issue 1723

Description:
Modified test_generate in hl/test_image to close file "f" before exit, even if
an error occurs.

r20879:
Issue 63: change check of return of H5Tget_nmembers to <=0. No need to go
futher if call fails as well as empty.

r20881:
Coverity #659 in Run 46: I changed the Line 442 where it tries to check whether
FLAG_PRINTED is TRUE.  But it had just been set to FALSE.  I took out the
condition check in the print statement.

Tested on:
    Mac OSX/64 10.9.2 (amazon) w/C++, FORTRAN & Parallel
    (daily tested on trunk)
2014-03-25 10:58:48 -05:00
Quincey Koziol
708e8077c2 [svn-r24879] Description:
Missed a file in the last checkin.
2014-03-24 13:12:43 -05:00
Quincey Koziol
25147d5567 [svn-r24878] Description:
Bring r24864 from trunk to 1.8 branch:

    Remove all traces of MPI-POSIX VFD and GPFS detection/code.

    Remove remaining traces of stream VFD.

    Remove testpar/t_posix_compliant test (it's not actually verifying anything).

    Clean up H5D__mpio_opt_possible() further.

    Moved environment variable that disables MPI collective operations into
    MPI-IO VFD (instead of it being in src/H5S.c).

    A few other small code cleanups.

Tested on:
    Mac OSX/64 10.9.2 (amazon) w/parallel & serial
    (daily tested on trunk)
2014-03-24 12:41:18 -05:00
HDF Tester
f5a2f3d611 [svn-r24871] Snapshot version 1.8 release 13 (snap5) 2014-03-23 17:09:33 -05:00
Binh-Minh Ribler
74079aa0de [svn-r24870] Description:
- Added another overload for char* argument:
        ssize_t getComment(const char* name, const size_t buf_size, char* comment)
    - Changed default value to 0 for the other two getComment methods
    - Added HDmemset to after every char string allocation to clear the buffer
    - Added a null terminator to the comment returned from the C call, in
        getComment methods
    - Some minor cleanup
    Merged from trunk: -r24865 -r24867
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2014-03-23 16:30:43 -05:00
Binh-Minh Ribler
e18ee63c5a [svn-r24868] Purpose: Applied user patch, HDFFV-8623
Description:
    Applied patch from user Jason Newton.  JIRA issue HDFFV-8623, patch
    0009, improve c++ compatibility with exceptions.  All additions of "throw()"
    are included.  Exception::what() is not added because it is not necessary.
    It was suggested for the name, which follows stdlib.
    Merged from trunk -r24830
Platforms tested:
    SunOS 5.11 (emu)
    Linux/32 2.6 (jam)
    Linux/64 2.6 (koala)/PGI compilers
2014-03-23 01:12:05 -05:00
Quincey Koziol
f2aa62ec76 [svn-r24810] Description:
Bring r24803 & r24804 from trunk to 1.8 branch:

r24804:
   Brought changes from Coverity branch back to trunk, and cleaned up misc.
   other warnings & formatting issues:

   r20833:
   Fixed Coverity 667 and 668 with real integer overflow tests this time.

   r20834:
   Use HDstrncpy and HDstrncat. --gh 

   r20835:
   Change to use strncpy - use base_len + 1 for line 156, use HDstrlen(path) + 1 for line 159

   r20836:
   Fixed coverity 585 by casting output of fgetc() to a char.

   r20837:
   Changed sprintf calls to snprintf with size 1 less than the allocated buffer to address coverity issue #967.

r24803:
  Rename GCC_DIAG_OFF/ON macros to H5_GCC_DIAG_OFF/ON and move from
  src/H5private.h to src/H5public.h.  Wrap typedef of hsize_t and hssize_t
  in DIAG_OFF(long-long) macros.

  Clean up a bunch of "macro '-' is unused" warnings.

Tested on:
    Mac OSX/64 10.9.2 (amazon) w/C++, FORTRAN & parallel
    (too minor to require h5committest)
2014-03-17 09:28:40 -05:00
Albert Cheng
4ffe2f78c5 [svn-r24800] HDFFV-8704: Mac OS X 10.6 (Snow Leopard) is retired from supported platforms. 2014-03-14 13:14:37 -05:00
Neil Fortner
a14244c6a6 [svn-r24794] Port r24757 from trunk to 1.8 branch.
Tested: ostrich, platypus (h5committest, apparent system issue on jam and koala)

Log from r24635:
Change assertion to condition check/error return.  Should fix periodic
assertion failure in fheap test (in test that is expected to fail cleanly).

Fix typo in H5detect.c

Tested: ostrich, platypus (h5committest - jam and koala having issues)
2014-03-13 17:20:47 -05:00
Albert Cheng
41f660dd17 [svn-r24787] Updated information for platform Mac 10.8 and 10.9. Moved Mac OSX 10.6 (fred)
to also tested platforms.
2014-03-12 16:08:21 -05:00
Quincey Koziol
e2c3ecd825 [svn-r24785] Description:
Bring r24769 & r24772 from trunk to 1.8 branch:

   Check in Mohamad's changes to support collective I/O on point selections,
along with some other minor cleanups.

    Correct some dynamically sized arrays that fail on Windows.

Tested on:
     Mac OSX/64 10.9.2 (amazon) w/parallel
     (And has been through the daily test regime on the trunk)
2014-03-12 12:22:29 -05:00
HDF Tester
a8a8652ebd [svn-r24771] Snapshot version 1.8 release 13 (snap4) 2014-03-09 17:09:06 -05:00
Albert Cheng
7f5c65bdc8 [svn-r24760] Mac OS X 10.9 Mavericks is added to the support feature list. 2014-03-04 18:34:00 -05:00
Albert Cheng
a0b291db5b [svn-r24759] Added test support for Mac OS X Mavericks. 2014-03-04 14:44:05 -05:00
HDF Tester
bcc9e4a976 [svn-r24754] Snapshot version 1.8 release 13 (snap3) 2014-03-02 17:08:04 -05:00
Allen Byrne
e5759186e8 [svn-r24746] Merge trunk revision 24744 from cmake branch includes;
HDFFV-8505: UD filter changes to remove filters in h5repack.

Tested: local linux
2014-02-27 14:16:04 -05:00
Albert Cheng
e674aaf859 [svn-r24740] Bug fix: HDFFV-8684
h5committest failed in platypus because cmakehdf5 failed in installation because cmake generates
a install-tarball based on incomplete version number (subrelease string is missing).

Solution:
Fixed $HDF5_PACKAGE_VERSION to contain the subrelease string.
Fixed $HDF5_PACKAGE_VERSION_STRING to be the same as $HDF5_PACKAGE_VERSION.

Tested: jam and platypus in both trunk and v18 branches because the current 
version number is trunk has a null sub-release and v18 has a non-null sub-release.
That covers both grounds.
2014-02-26 16:30:20 -05:00
Albert Cheng
c240dd4687 [svn-r24738] Updated with changes made back on Jan 27. 2014-02-26 15:21:05 -05:00
Neil Fortner
0baea76953 [svn-r24735] Port r24635 from trunk to 1.8 branch.
Note: despite the log from r24635, it was decided that this is the actual fix
for the error described in HDFFV-8647 that is not specific to BSD.  This does
not address the BSD issue, which is apparently unrelated.

Tested: jam, ostrich, platypus (h5committest, apparent system issue on koala)

Log from r24635:
Change some range check assertions to errors in H5HF_man_remove in  an attempt
to aid in diagnosing issue HDFFV-8647.

Tested: ummon
2014-02-24 16:21:00 -05:00
Larry Knox
f4781c29da [svn-r24732] Fix for reconfigure, which fails because LT_ADD_LIBHDF5_DEPENDENCY is used in Makefiles but the declaration in configure.ac is missing.
Copied declaration from trunk.  Tested with h5committest on jam ostrich koala and platypus(cmake).
2014-02-22 13:22:26 -05:00
Quincey Koziol
86d6651b44 [svn-r24728] Description:
Bring r24726 & r24727 from trunk to 1.8 branch:

Description:
   Revert some earlier usage of strncpy, which was incorrect.

   Bring Coverity changes from branch back to trunk:

r20821:
   Use HDstrncpy. --gh
   (Fixed already, with strdup)

r20822:
   (Not merged, incorrect use of HDstrncpy())

r20823:
   (Not merged, incorrect use of HDstrncpy())

r20824:
   Maintenance: Bug fix: addressed CID 666.
   Value stored at *expression_len should be used in the call to
       HD5packFstring to avoid overflow (and unnecessary arithmetic
       calculation and casting) 

r20825:
   Issue 642: Added check for error and handler with print to stderr and exit.

r20826:
   Undo revision 20818, as that issue has already been fixed in the 1.8 branch
       and trunk (but not coverity branch)

r20827:
   (Not merged, incorrect use of HDstrncpy())

r20828:
   Use HDstrncpy. --gh
   (Corrected use of strncpy())

r20829:
   Check return of H5Lget_val(print_udata->fid, path, targbuf,
       linfo->u.val_size + 1, H5P_DEFAULT) and if error set trgbuf[0] to 0.
       Check if  H5Lunpack_elink_val(targbuf, linfo->u.val_size, NULL,
       &filename, &objname) was successful and allow print. Otherwise filename
       and objname are not created. (init those to NULL)

r20830:
   resolved coverity issues 939, 940, 941, 944, and 947.

   all were complaints about use of sprintf, and in all cases, the
   buffers used were large enough for all eventualities.

   Resolved issue by replacing calls to sprintf with calls
   to snprintf.

r20831:
   Maintenance: Addressed CID 852
   Replaced sprintf with snprintf

r20832:
   Purpose: Fix valgrind issues with hl/examples/ex_image2

   Description:
   Modified hl/examples/ex_image2 to free global "gbuf" before exit.

Tested on:
   Mac OSX/64 10.9.1 (amaon) w/C++, FORTRAN & Threadsafety
   (too minor to require h5committest)
2014-02-21 11:59:33 -05:00
Allen Byrne
456507476f [svn-r24721] Set NSIS display name 2014-02-18 10:07:39 -05:00
Mohamad Chaarawi
32baeca60f [svn-r24720] bring r24709 from trunk:
rename H5V to H5VM since H5V is needed in the fastforward project for
view objects.  The addition of view objects in the fastforward project
is expected to be brough into the trunk sometimes in the future, which
is why we need to make this change.
2014-02-17 19:19:34 -05:00
Neil Fortner
1cc2bf00e1 [svn-r24699] Port r24463 from trunk to 1.8 branch.
Tested: jam, ostrich, platypus (h5committest, apparent system issue on koala)

Log from r24463:
Issue 8484 - Segfault during H5Fopen of corrupt file.  I put a condition check to make sure a pointer isn't NULL.

Tested on jam - very simple change.
2014-02-10 12:24:52 -05:00
Allen Byrne
551c147aa9 [svn-r24684] Add IF SHARED block around Windows PDB file generation command. 2014-02-04 10:29:04 -05:00
Allen Byrne
ea30f2156b [svn-r24680] Remove acknowledgment file from install.
Remove obsolete CPack.cmake file.
Merge h5repack and h5mkgrp test folder changes from trunk.

Tested: local linux
2014-02-03 16:59:26 -05:00
Allen Byrne
960dbc9169 [svn-r24672] Update document with ctest script changes. 2014-01-31 13:15:02 -05:00
Allen Byrne
d7e8a93078 [svn-r24654] HDFFV-8640: Remove XLATE_UTILITY
Update tools testfiles
2014-01-28 11:11:22 -05:00
Albert Cheng
554d0eaccd [svn-r24653] HDFFV-8572: test/testhdf5.c main() should not return number of errors
Solution: testhdf5 now exits EXIT_SUCCESS(0) if no errors, else 
EXIT_FAILURE(1).

Tested: Jam only since it is a trivial fix.
2014-01-27 17:34:17 -05:00
Scot Breitenfeld
dcde3e4cdf [svn-r24651] Merged changes in the fortran directory from the trunk into the branch,
svn merge -r23351:24650 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran .

Tested: jam (gcc, intel), koala (gcc)
2014-01-27 17:13:23 -05:00
Allen Byrne
3ffdf81de4 [svn-r24640] Add SUN specific block skipping.
Tested: emu
2014-01-22 10:09:20 -05:00
Allen Byrne
d042dac6ae [svn-r24637] Add SUN if blocks 2014-01-21 14:36:32 -05:00
Allen Byrne
00b3a3332c [svn-r24626] Correct numbering 2014-01-14 13:48:04 -05:00
Mark Evans
56b52ad9b9 [svn-r24625] Edited the Preconditions section. There were two Notes sections at the end of the section. 2014-01-14 13:36:03 -05:00
Albert Cheng
3b2ba22320 [svn-r24618] Changed --old to --script as directed by Allen.
Tested: jam (only verify help message is correct and --script is invoked
correctly.)
2014-01-07 14:31:50 -05:00
Albert Cheng
3eaf85e45a [svn-r24615] Feature: HDFFV-8336
Changed to use the quick steps described in INSTALL_CMake.txt.
Previous version is available by --old.
Added a help page to explain how to use.
Added a fix to figure out the current HDF5 version and use that to find the
correct file for install. (Still need to figure out the platform name.)

Tested: Jam and Platypus. Both failed in the installed steps because
the Cmake produced HDF5-1.8.13-Linux.sh even though the version number is
1.8.13-snap3.  Committed it so that Allen can fix the version number error.
2014-01-06 17:02:40 -05:00
Mohamad Chaarawi
8266f69f5e [svn-r24614] Bring 24612 from trunk:
fix bugs in parallel tests exposed in corner cases when running with 1 or 2 processes.
First bug is in testpar/t_mdset.c, where the test reports an error in addition to skipping the test if there are less than three procs. Fix to just skip the test.
Second bug is in testpar/t_dset.c in actual_io_mode tests, where incorrect expected value for IO mode was set if the number of procs running the test is 1.

tested with h5committest.
2014-01-06 13:31:40 -05:00
Mohamad Chaarawi
b3a2bd81a1 [svn-r24599] Merged /trunk:r24598
allocate and use the H5AC_aux_t struct even if num_procs == 1.  This
was a bug exposed by running a single process with a program that
generates lots of dirty metadata that needs to be flushed.

  --This line, and those below, will be ignored--

_M   .
M    src/H5AC.c
2013-12-30 15:52:17 -05:00
Raymond Lu
582b9a6d3c [svn-r24512] I updated the path of ZLIB.
Tested on VMS.
2013-12-09 15:09:28 -05:00
Raymond Lu
f1b8facee4 [svn-r24511] I updated the path of ZLIB.
Tested on VMS.
2013-12-09 15:08:56 -05:00
Dana Robinson
5aabcd1ae8 [svn-r24507] Updated RELEASE.txt with big test changes. 2013-12-06 14:12:30 -05:00
Dana Robinson
090bae7ded [svn-r24506] Merge of r24358 from trunk. Makes the big test aware of the HDF5_DRIVER
environment variable.  Fixes HDFFV-8554.

Tested on:
    32-bit LE linux (jam)
    64-bit LE linux (koala)
    64-bit BE linux (ostrich)
    64-bit Windows 7 with VS 2010 

    On all platforms, the big test was run with the environment
    variable set to all supported VFDs.
2013-12-06 14:05:40 -05:00
Quincey Koziol
acf41d8300 [svn-r24479] Description:
Fix ph5diff worker command handling so it can correctly respond to
situations where there's no work to perform.  Also, a few minor code cleanups.

Tested on:
    Mac OSX/64 10.9.0 (amazon) w/parallel
2013-11-30 13:05:10 -05:00
Quincey Koziol
92d40e82f1 [svn-r24477] Description:
Bring r24476 from trunk to 1.8 branch:

    Remove duplicate "intent" flags from top & shared file structures, leaving
    them only in the shared file structure.

Tested on:
    Mac OSX/64 10.9.0 (amazon) w/gcc 4.8, both parallel & serial
    (too minor to require h5committest)
2013-11-30 01:37:44 -05:00
Allen Byrne
c80d8cbe61 [svn-r24468] tfilters.h5 was created and checked in on 21 Feb 05, rev 10060, and never regenerated. The code for scaleoffset continued to change and the number of params for scaleoffset changed from 7 to 20 on the checkin of 23 Mar 05, rev 10384.
The h5dump tests only looked at headers and never the data. Data reads would fail with invalid number of params (7 expected 20).
Regenerated file and replacement ddls updated.
New h5dump test will be added to read the data.
2013-11-26 17:08:33 -05:00
HDF Tester
8d0f72d482 [svn-r24466] Snapshot version 1.8 release 13 (snap2) 2013-11-24 22:53:59 -05:00
Dana Robinson
960faed5e3 [svn-r24464] Changed an H5FL_MALLOC call to H5MM_calloc to fix a very small memory leak
when the thread-safe version of the library is built.

Part of HDFFV-8518.

Tested on:
   32-bit LE linux (jam) with threadsafe and callstack enabled.
   (very minor change)
2013-11-23 06:09:41 -05:00
Allen Byrne
d1e5490fcc [svn-r24456] Correct typo 2013-11-15 13:14:28 -05:00
Allen Byrne
d1009fa230 [svn-r24455] Add IF block to not override user set path 2013-11-15 13:10:26 -05:00
Allen Byrne
ac88574936 [svn-r24453] Add IF block around apple CPack Bundle commands 2013-11-15 12:10:33 -05:00
Raymond Lu
5a1f6f3c92 [svn-r24438] Issue 8147 - clang's -fcatch-undefined-behavior exposed undefined behavior in the alignment detection algorithm for integers in H5detect.c. Quincey decided to solve it in two steps. First, catch illegal instruction signal in the original algorithm. Second, use POSIX __alignof function to detect alignment if it's available. This checkin is the first step. I merged the change from the trunk.
Tested on wren, jam, ostrich, platypas, and koala.
2013-11-13 13:59:47 -05:00
Allen Byrne
86cf7671be [svn-r24433] Update examples package install location and text files 2013-11-12 16:31:48 -05:00
Elena Pourmal
ff6ed05935 [svn-r24420] Maintenance after the release: Updated 1.8 history file with the 1.8.12 release information. 2013-11-10 16:50:59 -05:00
Allen Byrne
38ad910b4d [svn-r24413] Updated information on how to build examples with cmake installed binary. 2013-11-07 13:39:36 -05:00
Raymond Lu
23fb9b7233 [svn-r24402] Issue 8528 - H5F_get_objects overfilled the list for object IDs. I fixed a typo. It caused the PGI compiler on jam to fail tfile.c test.
Tested with h5committest.
2013-11-04 11:29:32 -05:00
Allen Byrne
ad1a5b1e98 [svn-r24395] Missed script file for cleanup 2013-11-01 16:38:21 -05:00
Allen Byrne
08901f283e [svn-r24393] Cleanup testfiles from scripts. Update lists of files to be cleaned. CMake update to clean testfiles.
Tested: local cmake, autotools
2013-11-01 16:26:11 -05:00
Raymond Lu
d242fd85c4 [svn-r24391] Issue 8528 - H5F_get_objects overfilled the list for object IDs. I merged the fix the trunk. I put the safeguard in both H5F_get_objects and H5F_get_objects_cb to prevent overfill the list. I also added test cases in tfile.c.
Tested with h5committest on jam, koala, ostrich, and platypus.
2013-11-01 14:52:54 -05:00
Allen Byrne
3640c67582 [svn-r24384] Add missing H5_ prefix
Tested: local linux
2013-10-31 09:39:18 -05:00
Dana Robinson
821090788e [svn-r24379] Merged r24333 from trunk.
Added volatile keyword to find_bias() function in H5detect.  Fixes HDFFV-8547.
Change to H5win32defs.h fixes a minor typo.

Tested on 64-bit Visual Studio 2010 / 64-bit Windows 7 (Visual Studio warning)
2013-10-31 01:28:12 -05:00
Dana Robinson
d6b116be67 [svn-r24377] - Added uint32_t to the list of traceable types.
- Fixed a couple of commenting typos in configure.ac.

Tested on: 32-bit LE linux (jam) w/ parallel and Fortran

These are minor changes, hence the limited testing.
2013-10-31 00:18:51 -05:00
HDF Tester
403d36479a [svn-r24335] Snapshot version 1.8 release 13 (snap1) 2013-10-20 19:42:45 -05:00
Allen Byrne
63fa6e97e6 [svn-r24329] Remove quotes in list add 2013-10-18 09:30:37 -05:00
Raymond Lu
3267bb6ad0 [svn-r24318] Fixed a typo. 2013-10-17 14:56:12 -05:00
Allen Byrne
f51f1994cf [svn-r24315] Do not run big test on cygwin 2013-10-17 10:34:22 -05:00
Raymond Lu
cedf2cae16 [svn-r24308] Issue 8147: CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv
catches some defined behavior in the alignment algorithm of the macro DETECT_I      
 in H5detect.c. I documented it as a known problem.

No test is needed.
2013-10-16 16:56:47 -05:00
Binh-Minh Ribler
26713999ba [svn-r24290] Description:
- Added a lot of documentation to classes for Reference Manual.
    - Fixed some format inconsistencies
Platforms tested:
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    Linux/64 2.6 (koala)/PGI compilers
2013-10-14 17:05:22 -05:00
Allen Byrne
3cb8591786 [svn-r24289] Correct linux shared version numbering 2013-10-14 11:43:16 -05:00
HDF Tester
851cd479b0 [svn-r24288] Snapshot version 1.8 release 13 (snap0) 2013-10-13 19:37:42 -05:00
Allen Byrne
17296948e5 [svn-r24282] Add log file aliases and install step 2013-10-10 10:59:37 -05:00
Albert Cheng
08cf10f201 [svn-r24280] Bug: HDFFV-8534
Added a known problem of Solaris make install failure.
Updated INSTALL to state Gnu make is the preferred version of make.

Tested: eyeballed.
2013-10-10 10:38:48 -05:00
Allen Byrne
4a8ab0fe35 [svn-r24272] Update URL 2013-10-09 12:05:24 -05:00
Raymond Lu
8f57d8fb93 [svn-r24268] I added two new files H5Location.cpp and H5Location.h to the make file.
Not tested yet.
2013-10-09 11:27:10 -05:00
Quincey Koziol
3a96de8b17 [svn-r24262] Description:
Bring r24256 & r24261 from trunk to 1.8 branch:

Switch H5I internal data structure from using hash table to skip lists.

	Also, a few misc. cleanups.

Tested on:
       FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode
       FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode
       Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
               w/C++ & FORTRAN, w/threadsafe, in debug mode
       Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x,
               w/C++ & FORTRAN, in production mode
       Solaris/32 2.11 (emu) w/deprecated symbols disabled, w/C++ & FORTRAN,
               w/szip filter, w/threadsafe, in production mode
       Linux/PPC 2.6 (ostrich) w/C++ & FORTRAN, w/threadsafe, in debug mode
2013-10-07 17:04:27 -05:00
Elena Pourmal
307f88870c [svn-r24259] Maintenance: Updated version number to 1.8.13-snap0; cleaned up RELEASE.txt for new info.
The 1.8 branch is open now for code changes.
2013-10-06 20:31:39 -05:00
HDF Tester
f8e5138264 [svn-r24257] Snapshot version 1.8 release 12 (snap19) 2013-10-06 16:57:26 -05:00
Allen Byrne
6b805d37d9 [svn-r24248] Updated version numbers and notes about CTest Scripting 2013-10-02 14:43:27 -05:00
Larry Knox
102aca1a1c [svn-r24245] Update Unix compiler versions. 2013-10-01 16:59:55 -05:00
Raymond Lu
7cf0ec2de8 [svn-r24244] Issue 1264: CYGWIN had long double rounding problem from unsigned long long. I took out the issue from the Known Problems section.
No test is needed.
2013-10-01 14:23:39 -05:00
Allen Byrne
7399587148 [svn-r24243] Update list of generated files for clear-objects 2013-10-01 13:25:13 -05:00
Allen Byrne
854ad7ad02 [svn-r24242] Update WDTP test machines 2013-10-01 09:56:36 -05:00
Binh-Minh Ribler
2b78b7bfd2 [svn-r24237] Description:
Added more info to new C++ feature section.
2013-10-01 00:17:33 -05:00
Binh-Minh Ribler
d5e8cfbe74 [svn-r24236] Description:
- Appended h5tutr_ to names of data files to avoid name clashing with
      existing examples.
    - Added example dependencies to Makefile.*
    (pointed out by Allen)
Platforms tested:
    SunOS 5.11 (emu) with gmake
    Linux/ppc64 (ostrich)
    Linux/32 2.6 (jam)
    Linux/64 2.6 (koala)/PGI compilers
2013-09-30 21:58:27 -05:00
Binh-Minh Ribler
cf8469d949 [svn-r24233] Description:
Replaced an uint with unsigned to please Windows.
Platforms tested:
    Linux/32 2.6 (jam) - very minor
2013-09-30 17:15:38 -05:00
Binh-Minh Ribler
bb084334b8 [svn-r24232] Description:
- Merged Allen's CMake updates for the C++ tutorial examples from the trunk
    - Updated RELEASE.txt
2013-09-30 17:00:59 -05:00
Raymond Lu
497507f5a9 [svn-r24231] Issue 1264: CYGWIN had long double rounding problem from unsigned long long. Allen confirmed the problem is gone. So I took
out the macro CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM.  It skipped the test related to this issue.

Tested with h5committest.
2013-09-30 16:51:26 -05:00
Raymond Lu
03c29f0ffd [svn-r24230] I updated the path for ZLIB library.
Not tested yet.
2013-09-30 16:05:38 -05:00
Binh-Minh Ribler
467050b23d [svn-r24229] Purpose: Fix bug HDFFV-7520
Description:
    Added wrappers for H5Aexists.
    (merged from trunk)
Platforms Tested:
    Linux/32 2.6 (jam)
    Linux/64 2.6 (koala)
    Linux/ppc64 (ostrich)
2013-09-30 14:44:52 -05:00
Allen Byrne
eccd41643b [svn-r24228] HDFFV-8529: Space separate define strings
Tested: local linux
2013-09-30 13:56:09 -05:00
Binh-Minh Ribler
a94097d5dc [svn-r24223] Description:
Added
	${HDF5_CPP_SRC_SOURCE_DIR}/H5Location.cpp
	${HDF5_CPP_SRC_SOURCE_DIR}/H5Location.h
2013-09-30 09:46:57 -05:00
Albert Cheng
9d1730c534 [svn-r24222] Updated with HDFFV-8271 fix. 2013-09-30 06:54:33 -05:00
Albert Cheng
c52f4442b7 [svn-r24220] Bug ID: HDFFV-8512
Mailing lists instructions are incorrect.

Fix by removing hdf5dev which has long retired (2009). Subscription requests
should be sent to new address due to server change.

Tested: tried to subscribe myself and it worked.
2013-09-30 06:51:38 -05:00
HDF Tester
3c4145a82c [svn-r24219] Snapshot version 1.8 release 12 (snap18) 2013-09-29 17:03:42 -05:00
Binh-Minh Ribler
558c30c879 [svn-r24217] Description:
Added
	./c++/src/H5Location.cpp
	./c++/src/H5Location.h
    Verified with bin/chkmanifest.
2013-09-29 01:13:58 -05:00
Binh-Minh Ribler
5478de7645 [svn-r24216] Purpose: Merged changes from trunk
Description from trunk, r22836
    In this bug, H5File doesn't have the ability to create attribute.  The
    following changes will provide that functionality and several others that
    were also missing:
    - Added an abstract class H5Location in between IdComponent and H5Object.
    - New class structure of IdComponent, H5Location, H5Object, H5File
                                IdComponent
                                     |
                                H5Location
                                /        \
                        H5Object        H5File
    - Wrappers in H5Object were moved to H5Location because the related C
      functions take either file, group, dataset, or named datatype ID.
    - Added wrapper for H5Rget_obj_type2
    - Added tests for file attributes and H5Rget_obj_type2 wrapper

Description from trunk, r22845
    Fixed miscellaneous inconsistencies and typos, which also took
    care of the failure in Packet Table test on daily test today.

Description from trunk, r24143
    Fixed comments, documentation, and mis-matched DOXYGEN_SHOULD_SKIP_THIS pairs.

Description from trunk, r24188
    - The failure in daily test was caused by missing initialization of member
    "id" in a few constructors.  This is now fixed.
    - Added two overloaded H5Location::setComment
    - Improved some error reporting in H5Location
    - Improved error reporting in tests

Description from trunk, r24189
    Changed header guards from single underscore to double underscore.

Platforms tested:
    SunOS 5.11 (emu)
    Linux/32 2.6 (jam)
    Linux/64 2.6 (koala)/PGI compilers
2013-09-28 23:34:31 -05:00
Albert Cheng
252ed47f9b [svn-r24215] Bug fix: HDFFV-8271 Big.c error in address generated by random number.
Description:
There is a bug in the current big.c tests. In a nut-shell,
the writing part randomly picks 50 locations and write 4KB
from that location. Random location range is from byte 0
to end of dataset. There is the problem--if the random location
is greater than (end of dataset - 4KB), then error.

Solution:
Adjust the random number to be at least 4KB less than the end of the
dataset. That allows it write 4KB more from the generated starting
position.

Also put in a proper error message if unexpected switch values happened.

Tested: h5comittest plus jam serial build and test.
2013-09-28 15:41:41 -05:00
Binh-Minh Ribler
985d16da9f [svn-r24213] Description:
Added
	./c++/examples/h5tutr_cmprss.cpp
	./c++/examples/h5tutr_crtatt.cpp
	./c++/examples/h5tutr_crtdat.cpp
	./c++/examples/h5tutr_crtgrpar.cpp
	./c++/examples/h5tutr_crtgrp.cpp
	./c++/examples/h5tutr_crtgrpd.cpp
	./c++/examples/h5tutr_extend.cpp
	./c++/examples/h5tutr_rdwt.cpp
	./c++/examples/h5tutr_subset.cpp
    Verified with bin/chkmanifest
2013-09-28 09:36:23 -05:00
Binh-Minh Ribler
72fcefd24f [svn-r24212] Purpose: Added tutorial examples
Description:
    Merged changes from the trunk.
    + Revisions 24174:
        - Added tutorial examples that Barbara made following the C tutorial examples.
          They will be configured for daily test.
    + Revision 24195
        - Improved format/comments in tutorial examples
        - Added them to Makefile.* and run-c++-ex.sh.in
Platforms tested:
    SunOS 5.11 (emu)
    Linux/32 2.6 (jam)
    Linux/64 2.6 (koala)/PGI compilers
    Tested the examples by running the script run-c++-ex.sh
2013-09-27 21:36:32 -05:00
Neil Fortner
cd90900d88 [svn-r24209] Port r24171 from trunk to 1.8 branch.
Tested: jam, koala, ostrich, platypus (h5committest)

Log from r24171:
Purpose: Fix problem with gcc 4.8

Description:
With optimization enabled, gcc 4.8 inserts garbage into the padding bytes of
floating point types when assigning from a literal constant.  This caused
problems when H5detect.c scanned the bits in floating point types to determine
their properties.

Modified H5detect.c to scan for padding before further analyzing the type, and
to ignore all information in the padding areas.  Also removed code that
temporarily disabled optimization.

Tested: jam, koala, ostrich, platypus (h5committest)
2013-09-27 10:35:44 -05:00
Allen Byrne
b3b29e4485 [svn-r24206] Fix warning message from missing if in configure 2013-09-27 09:01:48 -05:00
Allen Byrne
deddc7f955 [svn-r24205] Merge HDFFV-8513/8522 from trunk (via cmake branch), h5repack UD plugins.
Also warning session fixes.

Tested: CMake local linux
2013-09-26 17:10:54 -05:00
Neil Fortner
e2dfb53df7 [svn-r24204] Port r24140 from trunk to 1.8 branch.
Tested: jam, koala, ostrich, platypus (h5committest)

Log from r24140:
Purpose: Remove problematic abandonment of error stack

Description:
H5Fis_hdf5 uses H5F_locate_signature to check if the file is hdf5.  If it does
not locate the signature, H5F_locate_signature would issue an error and return
HADDR_UNDEF.  H5Fis_hdf5 does not consider it an error if the signature is not
found, so it does not issue an error or clear the stack.  The filled stack could
then cause issues later on.

Changed H5F_locate_signature to return herr_t, not issue an error if the
signature is not found, and added a parameter for a pointer to the signature
address that the function fills in.

Tested: jam, koala, ostrich (h5committest)
2013-09-26 16:51:35 -05:00
Neil Fortner
dd1f4e14c9 [svn-r24203] Port r24139 from trunk to 1.8 branch.
Tested: jam, koala, ostrich, platypus (h5committest)

Log from r24139:
Remove "will never be exectued" warnings in H5detect.c

Tested: jam, koala, ostrich (h5committest)
2013-09-26 16:14:14 -05:00
Larry Knox
497234f8e3 [svn-r24201] Merged changes from trunk revisions 23431, 23527 and 24077.
Switched default to link to shared lib files when HDF5 is configure with --disable-static.
This addressed HDFFV-8141, h5cc failed because it defaulted to link to lib*.a files which
aren't built with --disable-static.
-help message also updated.

Tested in trunk.
Merged code tested with h5committest.
2013-09-25 17:04:18 -05:00
Allen Byrne
26039efe65 [svn-r24198] Change Internal CDash site. 2013-09-25 15:03:59 -05:00
HDF Tester
67a867235c [svn-r24187] Snapshot version 1.8 release 12 (snap17) 2013-09-22 17:25:30 -05:00
Allen Byrne
c06b0170f7 [svn-r24180] HDFFV-8321:Add note about changing FFLAGS to FCFLAGS in configure.
Merged INSTALL and h5fc.in from trunk.
2013-09-20 15:36:57 -05:00
Raymond Lu
da55074394 [svn-r24169] I updated these files for the support information of OpenVMS.
No test is needed.
2013-09-19 11:58:06 -05:00
Allen Byrne
378f40be26 [svn-r24165] Correct Info.plist settings 2013-09-19 08:32:06 -05:00
Allen Byrne
ba21e5b5e3 [svn-r24164] Add documentation on usage. 2013-09-19 08:22:59 -05:00
Allen Byrne
cbe069269b [svn-r24158] Add back STGZ packaging - .sh compressed package
Correct MAC Info.plist vars
2013-09-18 16:59:34 -05:00
Neil Fortner
b809481c42 [svn-r24156] Port r23987 from trunk to 1.8 branch.
Tested: jam, koala, ostrich, platypus (h5committest)

Log from r23987:
Merge r23939 from reduce_warning branch to trunk

Tested: jam, koala, ostrich (h5committest)

Log from r23939:
Fix unused variables warnings in trunk
Rename static functions in H5Adense.c, H5B2cache.c, H5Bcache.c
Switch these functions to use FUNC_ENTER_STATIC* macros

Tested: koala
2013-09-18 16:53:21 -05:00
Raymond Lu
dd955dcfe2 [svn-r24155] There are 4 cases need new function to handle them. I change the script to run them temporarily
with TOOLTEST to check the metadata part and left out the data part.

Tested on VMS.
2013-09-18 16:06:54 -05:00
Raymond Lu
020340b041 [svn-r24150] Somehow, the C++ compiler doesn't like the list of source files. I seperated them.
Tested on OpenVMS.
2013-09-17 16:58:28 -05:00
Raymond Lu
5338b7e2dc [svn-r24149] I updated these files and tested them on OpenVMS. 2013-09-17 16:33:47 -05:00
Allen Byrne
8db0b1ddd0 [svn-r24130] Change option name for WDTP 2013-09-12 14:14:49 -05:00
Raymond Lu
2c513511b3 [svn-r24121] OpenVMS converted the value of zero in char or short to negative zero in long double. I made it warning instead of
failure.  

Tested on jam and Boeing OpenVMS - simple change.
2013-09-10 14:12:40 -05:00
Quincey Koziol
afd08f7523 [svn-r24117] Description:
Revert accidental checkin of a patch that disables file truncation for
parallel I/O.

Tested on:
    MacOSX/64 10.8.4 (amazon)
2013-09-09 15:03:36 -05:00
Quincey Koziol
38e0563a6e [svn-r24112] Description:
Bring r24101 & 24111 from trunk to 1.8 branch:

r24101:
=======
Description:
    Clean up warnings, enable new compiler warning flag(s) and bring back
changes from Coverity branch:

    r20813:
        Remove the dead code as listed for coverity bug #1722. h5committested.

    r20814:
        Issue 69: Check return value and throw error if negative return. Also free datatype id on error

    r20815:
        Use HDstrncpy. --gh

    r20816:
        Replaced one last HDstrcat call with HDstrncat to resolve coverity issue 832.

    r20817:
        Use HDstrncpy and HDstrncat. --gh

    r20818:
        Purpose: Fix valgrind issues with h5jam

        Description:
        Modified h5jam to free strings strdup'd in parse_command_line before exit. Note
        that they may still not be freed in case of error, due to the widespread use of
        exit().

    r20819:
        Issue 80: change loop to use int as loop index.

    r20820:
        Maintenance: Fixed the bug found by coverity CID 788
        There were two problems with this function:
            1) it tried to unnecessary free NULL pointer
        2) it tried to allocate c_name buffer that is done by H5Pget_class_name

r24111:
=======
Description:
   Restrict GCC diagnostic pragmas to only gcc 4.6+


Tested on:
    Mac OSX 10.8.4 (amazon) w/gcc 4.8.1, C++ & FORTRAN
    (too minor to require h5committest)
2013-09-06 14:09:07 -05:00
Allen Byrne
ad7d03103d [svn-r24108] Remove file from the future. 2013-09-06 12:57:57 -05:00
Allen Byrne
35b22a13a8 [svn-r24106] Add help text tests for h5dump and h5repack to the linux scripts. HDFFV-8498 merge from trunk.
Tested: local linux - cmake and autotools
2013-09-06 12:28:26 -05:00
HDF Tester
3d7776ffee [svn-r24093] Snapshot version 1.8 release 12 (snap16) 2013-09-01 16:48:36 -05:00
Allen Byrne
4667b6ee4f [svn-r24084] Correct merge mistake 2013-08-29 08:48:24 -05:00
Raymond Lu
e97a9fcd8e [svn-r24082] I added a new file hdf5/vms/tools/h5diff/remove_exit.sh but forgot to update MANIFEST. 2013-08-28 16:04:14 -05:00
Raymond Lu
b49b9e0273 [svn-r24081] This script removes the "EXIT CODE" line in the end of all standard output files. OpenVMS doesn't output the
same value as Unix.  So we remove the line first on Unix before running the tests.  See Jira issue VMS-4.

Tested on jam.
2013-08-28 15:07:50 -05:00
Raymond Lu
9e0fcdc397 [svn-r24080] Since dtransform.c uses H5T_conv_i_f and H5T_conv_f_i, I added them back for OpenVMS. But I took out the test case in dtransform.c which has problem. See Jira issue VMS-8.
Tested on jam.
2013-08-28 14:35:34 -05:00
Raymond Lu
55c2af580c [svn-r24079] I skipped the links_env.c test in C test suite due to the time concern. Please see Jira issue VMS-2.
Not tested yet.
2013-08-27 14:03:20 -05:00
Allen Byrne
d1a5033dd4 [svn-r24078] Correct name of windows shared libraries 2013-08-27 09:19:11 -05:00
Raymond Lu
0e548fb251 [svn-r24074] I took out the soft conversion functions H5T__conv_i_f and H5T__conv_f_i for OpenVMS because
they have problem to convert between integers and floating numbers.  I also commented out the test
case in dt_arith.c for OpenVMS.  

Tested on jam - simple change.
2013-08-26 12:11:26 -05:00
Allen Byrne
8194f34ef7 [svn-r24072] Merge trunk cmake changes to 1.8 branch.
Also add default switch blocks to h5import.
Merge h5dump any_path option from trunk.

Tested: local linux
2013-08-26 10:35:15 -05:00
HDF Tester
a17e786cd7 [svn-r24069] Snapshot version 1.8 release 12 (snap15) 2013-08-25 16:48:11 -05:00
Mohamad Chaarawi
b8745fce87 [svn-r24054] merge r 24027 from trunk.
This is the fix for "switch missing default case" warnings in src.
Mohamad & Vailin worked on this patch.
2013-08-22 08:50:21 -05:00
Jonathan Kim
d283a83a49 [svn-r24039] Purpose:
Warning fixes (Jonathan and Peter) from coverity fix.
  merge from r23986 trunk.

Tested: 
    jam-pp (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE)
2013-08-20 16:52:41 -05:00
Quincey Koziol
a33303139e [svn-r24032] Description:
Bring r24030 from trunk to 1.8 branch:

    Clean up more compiler warnings.

Tested on:
    Mac OSX/64 10.8.4 (amazon) w/gcc, C++ & FORTRAN
    (too minor to require h5committest)
2013-08-19 19:55:47 -05:00
Allen Byrne
5c84b51030 [svn-r24024] JAVA-1714: CMake packaging for macs improved
HDFFV-7989: h5dump any_path and help text grouping
Added cygwin-64 support

Merged from trunk, tested local linux
2013-08-19 11:51:32 -05:00
Quincey Koziol
6e58f671ec [svn-r24021] Description:
Bring r24020 from trunk to 1.8 branch:

    Clean up compiler warnings

Tested on:
    Mac OSX/64 10.8.4 (amazon) w/C++ & FORTRAN
    (too minor to require h5committest)
2013-08-17 19:31:01 -05:00
Quincey Koziol
b5a5441e7c [svn-r24019] Description:
Bring r23988 from trunk to 1.8 branch:

    Make compiler happier and issue less warnings.

Tested on:
    Mac OSX/64 10.8.4 (amazon) w/gcc 4.8
    (daily tested on trunk)
2013-08-17 15:03:41 -05:00
Albert Cheng
a39c7228fb [svn-r24018] Bug fix: HDFFV-8500
The new gcc v4.8.* compilers does not work well with dt_arith which failed
in production mode.

Solution:
A temporary patch by removing any optimization (-O*) from the PROD_CFLAGS
so that dt_arith will pass for now.  A more through investigation is needed.

Tested: Jam, platypus and Koala where it failed and now passes.
2013-08-17 10:58:20 -05:00
Vailin Choi
dd327986b9 [svn-r24014] This checkin is a merge of the checkin for h5stat to the trunk (rev #23975-23977) + an additional bug fix--
A) Fix for HDFFV-1238:
   --Add 3 new options to allow users in setting threshold for small groups/datasets/attributes (tools/h5stat/h5stat.c)
   --Generate new test file for testing the new options (tools/h5stat/h5stat_gentest.c)
   --Add tests for the new options (tools/h5stat/testh5stat.sh.in)
   --Update expected output files (tools/h5stat/testfiles/*.ddl)
B) Fix a bug in determining maximum dimension size for 1-D dataset in dataset_stats() (tools/h5stat/h5stat.c)
C) Fix a bug when using opt_arg that is NULL for the new options.
2013-08-16 14:20:34 -05:00
Quincey Koziol
efb39881a0 [svn-r24012] Description:
Bring r24011 from trunk to 1.8 branch:

    Clean up a few warnings

Tested on:
    Mac OSX 10.8.4 (amazon) w/C++ & FORTRAN
    (too minor to require h5committest)
2013-08-15 08:27:24 -05:00
Allen Byrne
4a51e83e60 [svn-r24010] Remove check for GetConsoleScreenBuffer in CYGWIN (false positive). 2013-08-14 13:09:08 -05:00
Allen Byrne
6155473c38 [svn-r24009] Remove check for GetConsoleScreenBuffer in CYGWIN (false positive). 2013-08-14 12:23:17 -05:00
Allen Byrne
82642132ba [svn-r23995] Correct printf % handling 2013-08-12 15:54:14 -05:00
Raymond Lu
aa8d6d403c [svn-r23993] I used the macro H5_HAVE_FILE_VERSIONS to skip three test cases for file creation on OpenVMS.
OpenVMS creates another version of the file when a file is created for the second time, making
the test cases invalide.

Tested on OpenVMS and jam - simple change.
2013-08-12 15:11:51 -05:00
Allen Byrne
a003143ded [svn-r23992] HDFFV-8490 and H5UNJAM file handling. Merge from trunk.
Tested: local linux
2013-08-12 14:54:49 -05:00
HDF Tester
ca0bd915db [svn-r23990] Snapshot version 1.8 release 12 (snap14) 2013-08-11 16:48:09 -05:00
Allen Byrne
51651038cf [svn-r23982] Add "_" to VS define. 2013-08-09 14:00:49 -05:00
Allen Byrne
1aa65f1f02 [svn-r23970] malloc of char array needs array deallocation.
Merged from trunk.
2013-08-05 09:27:01 -05:00
HDF Tester
12f927462f [svn-r23969] Snapshot version 1.8 release 12 (snap13) 2013-08-04 16:43:00 -05:00
Larry Knox
cdef147e6e [svn-r23965] Corrected "continuous" layout to "contiguous" in h5repack -h output and comment.
Jira issue HDFFV-8493.

No test - text only change.
2013-08-02 16:31:01 -05:00
Binh-Minh Ribler
548f859749 [svn-r23956] Description:
Took out a work-around line left by accident.
Platform tested:
    Linux/32 2.6 (jam) with GNU compilers
2013-07-31 15:46:26 -05:00
Binh-Minh Ribler
3e071dc051 [svn-r23955] Description:
Close a group in test_dset, before the file can be properly closed.
    This should fix the problem on OpenVMS.

Platforms tested:
    Linux/32 2.6 (jam) with GNU compilers
    SunOS 5.11 (emu)
2013-07-31 14:49:32 -05:00
Binh-Minh Ribler
769649c100 [svn-r23950] Description:
There seem to be some objects still left open, so the file was not closed
    properly and caused failure on OpenVMS, because on that platform, more than
    one file cannot be opened at the same time (according to Ray.)

    Added setFcloseDegree(H5F_CLOSE_STRONG) to test_dset() to eliminate the
    failure temporarily, until the opened objects can be located and closed properly.

Platforms tested:
    Linux/32 2.6 (jam) with GNU compilers
    SunOS 5.11 (emu)
2013-07-31 01:59:39 -05:00
Binh-Minh Ribler
21130b20b8 [svn-r23943] Description:
Fixed an allocation/deallocation mistake that caused test to fail on
    Windows.
Platforms tested:
    Linux/32 2.6 (jam) with GNU compilers
    SunOS 5.11 (emu)
2013-07-29 23:31:05 -05:00
HDF Tester
0b82ac9dfe [svn-r23941] Snapshot version 1.8 release 12 (snap12) 2013-07-28 16:42:46 -05:00
Binh-Minh Ribler
268f4fd05c [svn-r23940] Purpose: Fix bug in tests
Description:
    - Passing the c_str() of an std string into a C function caused failure
      on OpenVMS.  Added a work around using temporary string.
    - Passing incorrect file access property list caused test_datasize() to
      fail.  Fixed.
Platforms tested:
    Linux/32 2.6 (jam) with PGI compilers
    Linux/32 2.6 (jam) with GNU compilers
    SunOS 5.11 (emu)
2013-07-27 02:07:38 -05:00
Allen Byrne
e8d9f3d197 [svn-r23931] Update changes section. 2013-07-24 11:34:12 -05:00
HDF Tester
2487910391 [svn-r23927] Snapshot version 1.8 release 12 (snap11) 2013-07-21 16:43:55 -05:00
Albert Cheng
92a27e0f83 [svn-r23924] Updated with fix for HDFFV-8392. 2013-07-19 17:07:44 -05:00
Albert Cheng
d34ec5c94c [svn-r23921] Bug fix: HDFFV-8392
[folded fix to v18 branch.]
tools/h5diff/testh5diff.sh is run in every "make check", even after it
has passed in the previous run.
The error was in the previous change made to Makefile.am
when testh5diff.sh.in was created.  The mistake was in the
SCRIPT_DEPEND=h5diff$(EXEEXT) $(H5PDIFF) $(srcdir)/testh5diff.sh
$(srcdir)/testh5diff.sh no longer existed. It is now generated in the
current built directory from $(srcdir)/testh5diff.sh.in (which configure
takes care of).

I updated the dependance to
SCRIPT_DEPEND=h5diff$(EXEEXT) $(H5PDIFF) testh5diff.sh
and that fixes the error.

Reviewed: HDF5-149

Tested: h5committested.
2013-07-19 16:39:21 -05:00
Allen Byrne
13b2793c4b [svn-r23905] Alter option name to avoid conflict with WDTP 2013-07-16 08:48:45 -05:00
Allen Byrne
08ffc95159 [svn-r23900] Change name to avoid conflicts in WDTP 2013-07-15 13:30:01 -05:00
Allen Byrne
f6ffaf1f69 [svn-r23898] HDFFV-8476: Add optional arg to -A for excluding attributes.
Merged from trunk.

Tested: local linux
2013-07-15 10:53:17 -05:00
HDF Tester
a3a410b643 [svn-r23896] Snapshot version 1.8 release 12 (snap10) 2013-07-14 16:34:29 -05:00
Quincey Koziol
3bcdb7675a [svn-r23891] Description:
Merge r23889 from trunk to 1.8 branch:

    Merge changes from Coverity branch to trunk:

r20768:
Switch to snprintf, HDstrncat, HDstrncpy to address coverity issue 832.

r20812:
Use HDstrncpy. --gh

Tested on:
    Mac OSX/64 10.8.4 (amazon) w/debug
    Linux/32 2.4 (jam) w/debug
2013-07-11 21:54:50 -05:00
Raymond Lu
93f1809d97 [svn-r23888] I corrected a typo.
Not tested yet.
2013-07-11 15:45:16 -05:00
Raymond Lu
dbee66c457 [svn-r23885] Issue VMS-3: OpenVMS needs special printing format "%hd" for 1-byte integer. I used the macro H5_VMS
to choose the correct format in the initialization of ls_dataformat.

Tested with h5committest.
2013-07-10 16:01:24 -05:00
Allen Byrne
cc1c8a52be [svn-r23881] Update Windows and VMs for next release 2013-07-09 15:44:47 -05:00
Neil Fortner
646341fe4a [svn-r23878] Port r23859 from trunk to 1.8 branch.
Add const tag to source buffers for H5Dscatter and H5Dgather.

Tested: ummon
2013-07-09 14:55:48 -05:00
Raymond Lu
21865ffa5f [svn-r23872] Jira Issue VMS-1. I commented out some test cases. Some of them have different printing format (new line); some need
a new script function to run the test; one of them is because I don't know how to give the name "Dataset1" in command line.

Tested on OpenVMS.
2013-07-08 11:53:38 -05:00
Allen Byrne
528e0d1cac [svn-r23869] HDFFV-8302: replace (v)snprintf with _(v)snprintf for windows. Merge from trunk along with other windows functions and HD prefix corrections.
HDFFV-8394: Add cmake code to package examples

Tested: local linux
2013-07-08 10:52:49 -05:00
Mohamad Chaarawi
38bdc241ed [svn-r23868] bring r 23862 from trunk:
Change printfs in perform output and h5dump to prevent overflow.
This fixes: https://jira.hdfgroup.uiuc.edu/browse/HDFFV-8450
2013-07-08 09:04:23 -05:00
HDF Tester
55de59d034 [svn-r23866] Snapshot version 1.8 release 12 (snap9) 2013-07-07 16:40:14 -05:00
Raymond Lu
562892e538 [svn-r23855] I added macro condition for OpenVMS in the hard-coded initialization of h5tools_dataformat.
Tested on jam and OpenVMS - simple change.
2013-07-01 18:17:24 -05:00
HDF Tester
69324d9e7c [svn-r23850] Snapshot version 1.8 release 12 (snap8) 2013-06-30 16:39:23 -05:00
Raymond Lu
049692ee41 [svn-r23846] I added h5dump_ddl.c and h5dump_xml.c. 2013-06-28 10:48:42 -05:00
Albert Cheng
1bd478b1dc [svn-r23826] Bug HDFFV-8469: C++ comments in C code.
Found and removed two more "//" comments.

Tested: in Koala by
$ env CFLAGS="-ansi" ../hdf5/bin/buildhdf5 -fortran -cxx -config # enable fortran and cxx, configure only
$ make AM_CFLAGS=-ansi # compile all source file by setting HDF5 build CFLAGS as "-ansi" only
2013-06-26 01:26:13 -05:00
Allen Byrne
339d98115e [svn-r23822] HDFFV-8428: Corrected FAQ reference 2013-06-25 11:11:27 -05:00
Allen Byrne
d5ce236cc7 [svn-r23820] Change name of generated file in test to use the macro based removal line.
Tested: local linux
2013-06-25 09:06:44 -05:00
Allen Byrne
c103e99ca8 [svn-r23818] The forgotten testfile changes 2013-06-25 08:22:24 -05:00
Raymond Lu
1f670acd6e [svn-r23817] I updated the make files and test script files for OpenVMS.
Not tested yet.
2013-06-24 17:21:07 -05:00
Allen Byrne
b65c8842fd [svn-r23816] HDFFV-8455: moved h5dump before h5import
HDFFV-8465: corrected DTD reference path

Merged from trunk
Tested: local linux with cmake
2013-06-24 16:58:17 -05:00
Mohamad Chaarawi
5ee14b07b9 [svn-r23809] revert printf format changes to do a better solution. 2013-06-24 13:16:27 -05:00
Mohamad Chaarawi
afea64705b [svn-r23808] merge 23801 from trunk.
Change printfs in perform output for long long to use %lld instead of %Hd. The later is for shorts.
This fixes: https://jira.hdfgroup.uiuc.edu/browse/HDFFV-8450

Tested on Jam.
2013-06-24 08:51:40 -05:00
HDF Tester
9e6bb09a9f [svn-r23807] Snapshot version 1.8 release 12 (snap7) 2013-06-23 16:38:09 -05:00
Allen Byrne
858668f900 [svn-r23797] remove commented line with c++ style 2013-06-20 10:06:30 -05:00
Allen Byrne
4aa5747062 [svn-r23794] Correct logic for packaging cygwin release docs 2013-06-19 12:49:57 -05:00
Allen Byrne
2d604aabdd [svn-r23787] Remove COMPILE_FLAGS value - already set in X_FLAGS
Add /MT support
2013-06-17 11:42:06 -05:00
Allen Byrne
c124635d18 [svn-r23785] Remove ignored FLAGS options for VS platforms. 2013-06-17 09:29:29 -05:00
HDF Tester
3e917f1d38 [svn-r23782] Snapshot version 1.8 release 12 (snap6) 2013-06-16 16:38:30 -05:00
Allen Byrne
b936d10f30 [svn-r23772] Remove development only files 2013-06-14 12:03:13 -05:00
Allen Byrne
e41f1a44b8 [svn-r23771] HDFFV-8434,-8437,-8445,-8447,-8461: Merge changes from Trunk.
Tested: local linux
2013-06-14 09:24:27 -05:00
HDF Tester
109aa3016b [svn-r23742] Snapshot version 1.8 release 12 (snap5) 2013-06-09 16:40:23 -05:00
Elena Pourmal
e52e709dc4 [svn-r23739] Maintenance: Removed extra " 2013-06-06 11:46:59 -05:00
Elena Pourmal
c0320a07a6 [svn-r23738] Maintenance: Added missing file H5Fff_F90.f90 to the file list. 2013-06-06 08:33:28 -05:00
Raymond Lu
283f8ef26d [svn-r23734] I added the macro definition H5_HAVE_LIBZ.
Not tested yet.
2013-06-05 11:59:56 -05:00
Raymond Lu
467a9e7201 [svn-r23732] Some updates.
Not tested yet.
2013-06-03 16:02:15 -05:00
HDF Tester
614b9164a9 [svn-r23731] Snapshot version 1.8 release 12 (snap4) 2013-06-02 17:10:18 -05:00
Raymond Lu
1187820c3b [svn-r23721] I used H5_VMS macro to comment out the code for dynamic filter since we don't plan to support it on OpenVMS. I updated vms/src/h5pubconf.h, too.
Tested on jam but not on OpenVMS yet.
2013-05-31 10:37:17 -05:00
Quincey Koziol
cf0c06c962 [svn-r23719] Description:
Bring r23713 and r23717 from trunk to 1.8 branch:

    Clean up warnings, switch library code to use Standard C/POSIX wrapper
    macros, remove internal calls to API routines, update checkapi and checkposix
    scripts.

Tested on:
    Mac OSX/64 10.8.3 (amazon) w/C++ & FORTRAN
    Big-Endian Linux/64 (ostrich)
2013-05-28 19:16:59 -05:00
HDF Tester
530208b86c [svn-r23709] Snapshot version 1.8 release 12 (snap3) 2013-05-19 17:01:25 -05:00
Allen Byrne
87e61c16b7 [svn-r23706] Merge Valgrind fix from trunk. 2013-05-15 08:36:02 -05:00
Albert Cheng
82fe631cf2 [svn-r23704] Post v1.8.11 release, updated with final information of "Supported Platforms",
"Supported Configuration Features Summary" , "More Tested Platforms" and
"Known Problems" of v1.8.11
2013-05-14 20:02:43 -05:00
Raymond Lu
b8772cf604 [svn-r23703] Issue 8380 - followup for previous checkin. I forgot to add test/unregister.c as a new test.
No test is needed.
2013-05-14 15:20:51 -05:00
Raymond Lu
71af5b7480 [svn-r23702] Issue 8380 - H5Zunregister caused seg fault. This is a porting of code from the trunk. It fixes the problem by first iterating
through all opened datasets and groups to see if any of them uses the filter.  If it finds one, the function fails with a message.  
Then the function flushes all opened files.

Tested with h5committest.
2013-05-14 14:56:51 -05:00
Quincey Koziol
811ac68ac2 [svn-r23699] Description:
Revert r23696, which breaks big-endian tests on ostrich, etc.  Will
investigate and submit correction later.

Tested on:
    BE & LE Linux systems (ostrich, koala, jam, emu)
2013-05-13 13:20:38 -05:00
Quincey Koziol
afc68537cd [svn-r23696] Description:
Bring r23695 from trunk to 1.8 branch:

Clean up warnings in H5Tconv.c (down to _only_ 9000 lines of output now!)

Merge changes from Coverity branch back to trunk:

r20684:
Fix for coverity bug #1721 which was due to the fix for coverity bug #943.

r20685:
Use HDstrncpy. --gh

r20761:
Purpose: Fix valgrind issues

Description:
Free image_data and data as appropriate in test_image.

r20762:
Purpose: Fix coverity issue 600

Description:
Add check for return value of H5O_close in H5Ocopy.  Also cleaned up various
warnings.

r20763:
Purpose: Fix valgrind issues with h5stat

Description:
Modified h5stat to free "iter" before exit, and free "hand" before exit if
parse_command_line exits directly.

r20764:
fixed coverity issues:
69, 327, 614, 684, 685, 696, 697, 1681, 967, 826, 660, 80

r20765:
Fixed coverity bug 668

Pulled x * y * z multiply out of malloc operand into a separate n_elements variable to quiet integer overflow warning.

No actual integer overflow tests are performed since it's just a test program but I did add a check that n_elements is >= 1.

I also changed an error condition from doing its own close and returning -1 to "goto out;" like the rest of the program.

r20766:
Fixed coverity bug 667

Pulled x * y * z multiply out of malloc operand into a separate n_elements variable to quiet integer overflow warning.

No actual integer overflow tests are performed since it's just a test program.


Tested on:
    Mac OSX/64 10.8.3 (amazon) w/C++ & FORTRAN
    (h5committest upcoming)
2013-05-11 11:42:54 -05:00
Allen Byrne
260ed1d2bc [svn-r23692] Remove INSTALL_VMS file.
Added if block around INSTALL files
2013-05-09 13:07:36 -05:00
Albert Cheng
d13f1d066d [svn-r23690] Archive the 1.8.11 RELEASE.txt into 1.8's HISTORY-1_8.txt file. 2013-05-09 00:45:24 -05:00
Albert Cheng
6fcc3c59d4 [svn-r23689] Archive the 1.8.10-patch1 RELEASE.txt into 1.8's HISTORY-1_8.txt file. 2013-05-09 00:37:29 -05:00
Albert Cheng
59318f2041 [svn-r23687] Bug fix: HDFFV-8435
Need to update libtool version number for v1.8.11 since two functions,
H5Pget_dxpl_multi and H5Pset_dxpl_multi were removed. Then v1.8 is now
v1.8.12-xxx and needed an update to.


config/lt_vers.am:
    libtool information is changed to 8.0.1 because it is a revision
    different from v1.8.10.

configure:
src/Makefile.in:
hl/src/Makefile.in:
hl/c++/src/Makefile.in:
hl/fortran/src/Makefile.in:
c++/src/Makefile.in:
fortran/src/Makefile.in:
README.txt:
    autogenerated by bin/reconfiure.

Tested: h5committest, then visual inspect that the libhdf5.so.x.y.z is
changed accordingly.
Built in duck by hand and see it changes to libhdf5.8.dylib too.
2013-05-09 00:12:31 -05:00
HDF Tester
b0bab950af [svn-r23670] Snapshot version 1.8 release 12 (snap2) 2013-05-05 19:31:40 -05:00
Albert Cheng
82590ce873 [svn-r23663] Bug fix: HDFFV-8236
Some files are not distributed when release tarball is created by bin/release
according to MANIFEST.  But --enable-build-all compiles them in test/.

Solution:
Distributed those missing files for now.  Need to resolve if these files
should be distributed or not.  And if not, fix --enable-build-all NOT to
compile them.

Tested: use bin/release to generate the tarball and run --enable-build-all with
it. Error is gone and all passed.
2013-05-02 07:50:26 -05:00
Allen Byrne
fdd81f6b89 [svn-r23654] Add parallel references to cmake config files 2013-04-29 11:10:24 -05:00
Allen Byrne
3166303487 [svn-r23653] Update new windows compilers 2013-04-29 11:09:41 -05:00
Allen Byrne
ba5cbe0dc0 [svn-r23650] Correct text of VS doc 2013-04-29 09:19:00 -05:00
Allen Byrne
a2eae39b6e [svn-r23648] Remove MinGW reference 2013-04-29 09:02:04 -05:00
Allen Byrne
14f67d3fc2 [svn-r23647] Correct file reference in pack list 2013-04-29 09:00:16 -05:00
Albert Cheng
8abe3be585 [svn-r23639] Removed INSTALL_MinGW because,
1. The file states that:
NOTE:
We are no longer actively supporting MinGW as of 1.8.5.
2. It is not tested for v1.8.11.
3. If we ever supports it again, it can be "restored" from previous
release (e.g. v1.8.10).)
2013-04-26 18:03:19 -05:00
Allen Byrne
5d02aac97d [svn-r23633] Added Windows 8 to configuration 2013-04-26 14:34:50 -05:00
Allen Byrne
926942e881 [svn-r23629] HDFFV-8368: Merge removal of include sub-folders from trunk 2013-04-25 15:54:56 -05:00
Allen Byrne
ba0275e3d7 [svn-r23628] HDFFV-8364: merge from trunk 2013-04-25 13:09:07 -05:00
Allen Byrne
ce593b0f56 [svn-r23625] Updated and renamed documents 2013-04-25 12:41:38 -05:00
Mark Evans
720afbd673 [svn-r23624] _ Edited to help readability.
No testing needed.
2013-04-25 11:32:05 -05:00
Mark Evans
b22f207249 [svn-r23623] _ A few more editing changes. 2013-04-25 11:31:47 -05:00
Mark Evans
2ffb7fb2df [svn-r23622] _ Added a number to the Appendix heading. 2013-04-25 10:58:16 -05:00
Mark Evans
2efb347753 [svn-r23621] _ Edited to help readability.
No testing needed.
2013-04-25 10:42:02 -05:00
Allen Byrne
8c3e00f79b [svn-r23620] Add windows quick build section 2013-04-24 14:36:47 -05:00
Albert Cheng
72801adb88 [svn-r23619] Bug fix: HDFFV-8390
Threadsafe works in v1.8.10 release. But it fails v1.8.11-pre1 tarball in
configure stage now. There was a typo in the configure around the checking
of pthread library.  Fixed it.

Tested: AIX and also h5committested.
2013-04-24 13:27:27 -05:00
Allen Byrne
32a116458a [svn-r23617] Add missing test include 2013-04-24 11:18:46 -05:00
Allen Byrne
b29c2db9a9 [svn-r23616] added ctest option commands 2013-04-24 11:01:36 -05:00
Allen Byrne
bd8bf33abb [svn-r23615] Corrected and updated instructions 2013-04-24 10:51:28 -05:00
Allen Byrne
d896ff95b1 [svn-r23612] Update cmake and windows usage instructions 2013-04-23 12:32:13 -05:00
Albert Cheng
82869120a9 [svn-r23610] Improvement: DFFV-8245
Use Clang as the compiler for the Mac platform.

Changed all Mac to use clang/clang++ as the default C and CXX compilers if
not provided by the user. Still use gfortran as the default fortran
compiler since Apple does not provide any fortran compiler.

HDFFV-8245: bug fix. Snow Leopard (darwin 10.X) does not have clang++.
Reversed it to use gcc/g++ as the default C and CXX compilers for Darwin 10.X
systems.

Tested: h5committest plus duck (darwin 11), wren (darwin 12) and fred
(darwin 10).
2013-04-22 17:24:37 -05:00
Allen Byrne
0421089a13 [svn-r23609] Update with corrections 2013-04-22 16:27:27 -05:00
HDF Tester
eed5e05239 [svn-r23605] Snapshot version 1.8 release 12 (snap1) 2013-04-21 19:48:22 -05:00
Quincey Koziol
f4d23a1400 [svn-r23598] Description:
Bring r23597 from trunk back to 1.8 branch:

Bring r20683 from Coverity branch back to trunk:

Isues 1309-1333: Changed strcpy/strcat to strncpy/strncat with maximum size expe

Tested on:
    Max OSX/64 10.8.3 (amazon) w/C++ & FORTRAN
2013-04-17 09:04:38 -05:00
Allen Byrne
d459286d41 [svn-r23593] Remove old references 2013-04-16 09:19:38 -05:00
Quincey Koziol
db1abfa91a [svn-r23592] Description:
Bring r23584 from trunk to 1.8 branch:

    Update with new compiler warnings for gcc 4.8.x

Tested on:
    Mac OSX/64 10.8.3 (amazon) w/gcc 4.8.0
2013-04-15 13:24:39 -05:00
Raymond Lu
ba61466cc6 [svn-r23589] I added SunOS 5.11 (emu) as a newly supported system. 2013-04-15 11:05:39 -05:00
Allen Byrne
b2ae366389 [svn-r23587] Added Windows 8 to supported platforms 2013-04-15 10:09:53 -05:00
HDF Tester
fe383e73f1 [svn-r23586] Snapshot version 1.8 release 12 (snap0) 2013-04-14 19:51:56 -05:00
Raymond Lu
e1bcfd2331 [svn-r23579] I updated the compiler info, system info, and HDF5 support table of fred, emu, and ostrich.
No test is needed.
2013-04-12 14:41:28 -05:00
Dana Robinson
692af1936f [svn-r23573] Removed inappropriate executable properties from a few files. These are
often added by Windows text editors.

Tested on: jam (just tested to make sure it builds - no code changes)
2013-04-10 11:54:39 -05:00
Dana Robinson
17c32a8ca1 [svn-r23570] Merged r23508 from the trunk.
This removes some dead code that belonged to the multi dxpl functions
that were removed in HDF5 1.8.11.

Tested on: jam w/ C++ (minor change)
2013-04-10 09:38:55 -05:00
Albert Cheng
e8a57439fa [svn-r23567] Post v1.8.11 branch-off, changed version to 1.8.12-snap0.
Reset RELEASE.txt for next release (1.8.12).

Tested: h5committest.
2013-04-09 12:48:11 -05:00
Raymond Lu
67b3800ccb [svn-r23562] I added the info about dynamically loaded filters. 2013-04-08 11:23:26 -05:00
Allen Byrne
b445540e3d [svn-r23559] Fix valgrind configure error
Tested: local linux - with and without valgrind
2013-04-08 10:46:14 -05:00
HDF Tester
8eb7294332 [svn-r23557] Snapshot version 1.8 release 11 (snap16) 2013-04-07 16:39:11 -05:00
Albert Cheng
07d8b80b4a [svn-r23556] Bug fix: HDFFV-8358
The previous change set exec_prefix, libdir and includedir to actual values.
That removed the option for user to hand edit just the first prefix=...
to make "everything" to work.
Changed h5redeploy to do this by default:
## Installation directories:						  ##
## prefix	architecture-independent files.				  ##
## exec_prefix	architecture-dependent files, default is <prefix>.	  ##
## libdir	libraries, default is <exec_prefix>/lib.		  ##
## includedir	header files, default is <prefix/include>.		  ##
############################################################################
This allows users to just change the first line of prefix=<...> and the
effect will change libdir and includedir too.

This was also try to accommodate the -prefix option of h5XX. Unfortunately,
after changing h5redeploy, I found out the h5XX code to support -prefix
actually does not provide the stated efffect. This will be fixed in the
release.

Tested: h5committested plus hand test.
2013-04-05 13:32:49 -05:00
Joel Plutchak
25ff6f0269 [svn-r23553] Added HDFFV-8247 to thye known bugs section. 2013-04-05 12:34:04 -05:00
Raymond Lu
bf04b345d3 [svn-r23552] I merged the changes for DESY project from desy_1_8 branch back to this branch.
Tested with Albert's desycommittest script on emu, jam, koala, ostrich, and ostrich-no-shared-lib (duck takes too long.  I can't wait for it).
2013-04-05 10:55:33 -05:00
Raymond Lu
68a7d5b30e [svn-r23551] I updated this branch from the 1.8 branch (not related to DESY project) and a few changes for CMake and Windows from the trunk (related to DESY).
Tested with desycommittest (emu, koala, jam, ostrich, and ostrich-no-shared-lib), but can't wait for duck to finish.  It takes too long.
2013-04-04 17:11:05 -05:00
Quincey Koziol
55345aaf4d [svn-r23550] Description:
Bring r23549 from trunk to desy_1_8 branch:

    More misc. cleanups, but main change is to make an "extern" header file
for the plugin interface.

Tested on:
    Mac OSX/64 10.8.3 (amazon)
2013-04-04 16:05:34 -05:00
Quincey Koziol
60895bd615 [svn-r23545] Description:
Bring r23544 from trunk to 1.8 branch:

    Correct API version mistake w/H5Acreate -> H5Acreate2

Tested on:
    Mac OSX/64 10.8.3 (amazon) w/parallel
2013-04-04 08:33:56 -05:00
Quincey Koziol
5f43e5f837 [svn-r23542] Description:
Further revisions to dynamic library loading code, to clean it up.

Tested on:
    Mac OSX/64 10.8.3 (amazon)
    (h5committest not required on this branch)
2013-04-03 21:25:47 -05:00
Larry Knox
06a302be30 [svn-r23541] Reverted changes merged unintentionally with revision 23488 from trunk that will not go into the 1.8.11 release.
Tested with h5committest.
2013-04-03 17:11:13 -05:00
Raymond Lu
949835b61f [svn-r23539] I took out the "const" symbol from H5PL_get_plugin_type and H5PL_get_plugin_info functions.
Tested on koala - simple change.
2013-04-03 15:51:52 -05:00
Raymond Lu
cae6fcf563 [svn-r23537] I corrected the copyright information and added some comment in H5Pocpl.c.
Tested on koala - no code change.
2013-04-03 14:26:26 -05:00
Quincey Koziol
00a5fe5cf4 [svn-r23535] Description:
Bring r23529 from trunk to 1.8 branch:

    Stop aliasing property to indicate internal collective metadata operations
with property to perform collective raw data operations from the application.

Tested on:
    Mac OSX/64 10.8.3 (amazon) w/parallel
    (daily tests on trunk)
2013-04-03 13:11:58 -05:00
Raymond Lu
8d885f6388 [svn-r23534] I changed the operation in dynlib2.c from math operations pow and sqrt to simpler multiplication and division
to avoid potential rounding problem in math operations.

Tested on koala - simple change.
2013-04-03 11:34:40 -05:00
Albert Cheng
98db39f847 [svn-r23528] Bug fix: Mac system has dynamic library name in the form of libxyz.dylib.
Solution: Changed test_plugin.in to copy library file names in the form of libdynlib{123].*.

Another problem:
Even when copy failed in copying the libray files (was in the form of *.so*),
the test still passed.  That was because .libs was included in $HDF5_PLUGIN_PATH and the needed
plug in libraries were generated there.
Solution:
Fixed by copying the plug in library files to separate directories and seetup HDF5_PLUGIN_PATH
to include them but NOT .libs.

Tested: used desycommittest (duck, emu, jam, koala, ostrich) plus cmakehdf5 in jam.
2013-04-02 20:03:15 -05:00
Raymond Lu
cb27338522 [svn-r23525] I merged the changes r23524 from the trunk.
Not tested yet.
2013-04-02 14:33:15 -05:00
Raymond Lu
550bd7c0f4 [svn-r23522] I merged the changes that Allen added for supporting dynlib2.c and dynlib3.c from the trunk.
Not tested.  Allen will do it.
2013-04-02 12:11:37 -05:00
Raymond Lu
4da796299b [svn-r23521] I merged the changes for testing groups with filter into this branch.
Tested on jam and koala.
2013-04-02 11:44:31 -05:00
Larry Knox
8b04aa4c87 [svn-r23512] Replace install-data-local with install-exec-hook in test/Makefile.am.
Change fixes order of chmod and rm for *dynlib* with parallel make.

Tested in trunk.
2013-04-01 17:52:23 -05:00
Raymond Lu
95332ad177 [svn-r23510] I merged the changes for DESY project from the trunk (r23496) into this 1.8 DESY branch.
Tested with h5committest (duck failed with CMake because I don't know how to change test/CMakeLists.txt.  I'll wait for Allen to do it).
2013-04-01 15:42:58 -05:00
Scot Breitenfeld
91bcf7432e [svn-r23506] reverted changes in FFLAGS setting.
Tested: jam (gnu)
2013-03-31 21:16:00 -05:00
HDF Tester
a46ee1a136 [svn-r23504] Snapshot version 1.8 release 11 (snap15) 2013-03-31 16:36:11 -05:00
Binh-Minh Ribler
1a367cc384 [svn-r23503] Description:
Removed DSetMemXferPropList::setMulti/getMulti from header file (Dana removed
	them from cpp file.
    Added note about removing DSetMemXferPropList::setMulti/getMulti in C++ section.
Platforms tested: very minor
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2013-03-31 05:42:34 -05:00
Binh-Minh Ribler
1e64926e74 [svn-r23502] Description:
Added note for bug fix in the C++ API.
2013-03-31 01:58:31 -05:00
Dana Robinson
1e5f8cd370 [svn-r23501] Forgot to update RELEASE.txt from the last check-in. 2013-03-30 19:33:53 -05:00
Dana Robinson
fe6b68e6b8 [svn-r23500] Merge r23366 from trunk. Fixes HDFFV-8296.
Removed the H5Pset_dxpl_multi and H5Pget_dxpl_multi functions from
the library.  The intended functionality for them was never fully
implemented and they are fundamentally broken.

The functions were removed from the C and C++ interfaces.  They were
not exported in the Fortran interface.

Tested on jam
2013-03-30 18:27:18 -05:00
Dana Robinson
66814c5cf7 [svn-r23499] Merge from trunk
Fixes an issue (HDFFV-8159) where uninitialized memory was being read
during variable-length type conversion.  All variable-length type conversion
buffers are now initialized to contain 0s on allocation.

Tested on: jam w/ fortran and c++

This is a very small change (basially changing malloc to calloc) and
is unlikely to cause issues on other platforms.
2013-03-30 17:58:58 -05:00
Albert Cheng
b967faed84 [svn-r23498] Bug fix: HDFFV-8358
Change h5redeploy to change all 4 lines, prefix=..., exec_prefix=...,
libdir=..., and includedir=...  This way, it reset all 4 lines. Should work
for both version of h5cc created by configure or by rpm.

Tested: hand tested in jam.
2013-03-30 11:58:18 -05:00
Scot Breitenfeld
2571bbbc7b [svn-r23488] merged windows dll changes from the trunk to the branch.
svn merge -r23351:23487 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran .

Tested: windows.
2013-03-29 08:34:25 -05:00
Binh-Minh Ribler
8461df0911 [svn-r23485] Purpose: Fix bug HDFFV-8067
Description:
    Applied the fix for HDFFV-8067 and the minor cleanups from the trunk.
Platforms tested:
    Linux/32 2.6 (jam) with PGI compilers
    Linux/32 2.6 (jam) with GNU compilers
    Linux/64 2.6 (koala) with ICC compilers
    SunOS 5.10 (emu)
2013-03-28 23:03:20 -05:00
Allen Byrne
54319cf88d [svn-r23481] Added JIRA issues resolved. 2013-03-28 12:56:57 -05:00
Allen Byrne
f893d7bf96 [svn-r23479] Remove Windows XP info 2013-03-28 11:47:16 -05:00
Allen Byrne
0256a08b66 [svn-r23478] Update openSUSE info 2013-03-28 11:45:32 -05:00
Allen Byrne
4800a8d7a9 [svn-r23477] HDFFV-8359: correct script function calls.
Tested: local linux
2013-03-28 11:44:42 -05:00
Mohamad Chaarawi
984998fa95 [svn-r23471] bring 23470 from trunk
update INSTALL_parallel with build instructions for Hopper.
2013-03-27 17:12:08 -05:00
Jonathan Kim
91c30cdc2f [svn-r23464] Purpose:
HDFFV-8214 - h5repack failed converting small chunked dataset (size < 1K) to contiguous layout.

Description:
  h5repack failed converting small chunked dataset (size < 1K) to contiguous layout.
  The first case was when chunk dim is bigger than the dataset dim (at leat one), h5repack failed with displaying error stacks.
  The other case is when chunk dim is smaller than the dataset dim, h5repack failed to change layout.
  Merged from HDF5 trunk 23407
    
Tested: 
    jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), emu (solaris-BE), fred (mac64-LE), Windows (32-LE cmake), cmake (jam)
2013-03-27 10:10:25 -05:00
Allen Byrne
a605e303e9 [svn-r23460] Add missing infile assignment and error counts 2013-03-26 14:26:10 -05:00
Peter Cao
722ac5f543 [svn-r23459] HDFFV-8355 h5repack.sh was wrong for the two test cases. 2013-03-26 14:18:11 -05:00
Scot Breitenfeld
f12a59f4d6 [svn-r23455] Updated Fortran and HL entries. 2013-03-25 20:17:32 -05:00
Allen Byrne
d3c5fd31a0 [svn-r23449] Update script for reporting errors from configure, build, test.
Tested: jam
2013-03-25 14:22:10 -05:00
Allen Byrne
b93cec6dc4 [svn-r23448] HDFFV-8322: valgrind leaks 2013-03-25 12:49:42 -05:00
Allen Byrne
e9fdcdf5b6 [svn-r23445] Update linux VM information and noted that Ubuntu 12.10 with gcc 4.7.2 no longer has issues with dt_arith. 2013-03-25 11:27:21 -05:00
HDF Tester
90e802ab13 [svn-r23440] Snapshot version 1.8 release 11 (snap14) 2013-03-24 16:34:35 -05:00
Quincey Koziol
1218a11370 [svn-r23416] Description:
Bring r23415 from trunk to 1.8 branch:

Avoid using fpclassify() for detecting zero/non-zero values.

Tested on:
    Mac OSX/64 10.8.3 (amazon) w/debug
2013-03-21 13:21:19 -05:00
Allen Byrne
fa964fa019 [svn-r23413] Add test depends on clear test. Occasional failures. 2013-03-21 09:25:18 -05:00
Quincey Koziol
1d95950134 [svn-r23396] Description:
Bring r23395 from trunk to 1.8 branch:

    Bring Coverity changes from branch to trunk:

r20682:
fixed coverity:
76, 77, 635, 636, 1164, 1165, 1166, 1121, 1122, 1117, 1343

Tested on:
    Mac OSX/64 10.8.3 (amazon) w/C++ & FORTRAN
    (too minor to require h5committest)
2013-03-19 23:41:16 -05:00
Peter Cao
1e56e8ce4f [svn-r23391] Adding notes for fixing HDFFV-8346 and HDFFV-8344 2013-03-19 16:36:53 -05:00
Peter Cao
a8b0ddf52b [svn-r23383] fixed HDFFV-8344 and HDFFV-8346: add info for user registered filter in h5dump 2013-03-19 13:48:23 -05:00
HDF Tester
e96b3e8cb2 [svn-r23364] Snapshot version 1.8 release 11 (snap13) 2013-03-17 16:42:11 -05:00
Scot Breitenfeld
c296178bb8 [svn-r23362] -r23091 and 23093 from trunk.
Tested: jam (intel)
2013-03-17 09:58:48 -05:00
Allen Byrne
fc41dda51f [svn-r23355] Correct target name 2013-03-15 10:28:01 -05:00
Scot Breitenfeld
c129390dfe [svn-r23352] merged -r22826:23050 and -r23060:23351 from trunk into branch.
Tested: jam (gnu, intel)
2013-03-15 00:08:29 -05:00
Scot Breitenfeld
f0769763b5 [svn-r23351] brought r23066 from trunk into branch:
r23066 | byrn | 2012-11-29 09:50:21 -0600 (Thu, 29 Nov 2012) | 2 lines

HDFFV-8265: create .def file during configure, added F2003 optional functions and refactor ISO_C_BINDING usage in cmake files
Tested: local cmake
2013-03-14 19:58:05 -05:00
Frank Baker
985087a259 [svn-r23349] Description:
Move introduction of new function, H5DOwrite_chunk, from "Bug fixes" 
        to "New Features" section.
    Consistency cleanup.
Tested:  Firefox
2013-03-14 13:41:37 -05:00
Allen Byrne
9978c91712 [svn-r23343] HDFFV-8322: for valgrind testing, split-up testhdf5 tests by excluding and running long running tests separately.
Merged from trunk.

Tested: local linux
2013-03-12 13:53:15 -05:00
HDF Tester
6fb96043f3 [svn-r23342] Snapshot version 1.8 release 11 (snap12) 2013-03-10 16:50:07 -05:00
Albert Cheng
355a469192 [svn-r23339] Updated with HDFFV-8305 fix. 2013-03-07 15:58:54 -05:00
Albert Cheng
ebc8fa918d [svn-r23337] Bug fix: HDFFV-8305
Some systems, like Mac, strings inspect library files and older versions
of strings maybe know newer library format, resulting in errors.
Make it read the file as stdin, avoiding this problem. 

Tested: h5committest. all passed.
2013-03-07 15:54:22 -05:00
Allen Byrne
e4f8f911f6 [svn-r23334] Update CMake documentation, remove obsolete info for windows. 2013-03-06 14:31:52 -05:00
Scot Breitenfeld
5b25a40fa4 [svn-r23330] Merged r23325 from the trunk into the branch.
Tested: jam (intel)
2013-03-06 09:24:44 -05:00
Albert Cheng
4b086bdcaa [svn-r23328] Added the reference of the requirement of POSIX Compliance. 2013-03-05 17:35:53 -05:00
HDF Tester
ab5a49b8bd [svn-r23324] Snapshot version 1.8 release 11 (snap11) 2013-03-03 21:47:16 -05:00
Quincey Koziol
b2f2370b1f [svn-r23321] Description:
Merge r23313 from trunk to 1.8 branch:

    Bring changes from Coverity branch to the trunk:

    r20612:
    Changed string functions to versions with string length to fix coverity issues
    922, 942 and 943.

    r20614:
    Use HDsnprintf. --gh

    r20675:
    Fix for coverity #1714 due to the fix for #810.
    Use HDfree() instead of H5MM_xfree().

    r20678:
    Repaired coverity issue #598 -- failure to check return value from a
    call to fstat(), or to tidy up in the event of failure.

    r20679:
    Use HDstrncpy. --gh

    r20681:
    Use HDstrncat and HDstrncpy. --gh

Tested on:
    Mac OSX/64 10.8.2 (amazon) w/debug, C++ & FORTRAN
    (too minor to require h5committest)
2013-02-27 14:22:27 -05:00
Allen Byrne
e8fa6193f5 [svn-r23319] HDFFV-8257: szip still used even if headers are not found. Change configure to test the result of the CHECK HEADERS call before checking for the library.
Tested: local linux, h5committest
2013-02-25 13:29:52 -05:00
Allen Byrne
62ed247721 [svn-r23318] HDFFV-8311: Improve tools testing and eliminate dependency problems
Tested: local linux
2013-02-25 12:26:14 -05:00
Allen Byrne
0272351e49 [svn-r23315] Correct typo in DEPENDS 2013-02-25 11:41:24 -05:00
HDF Tester
cb50a4e8d8 [svn-r23312] Snapshot version 1.8 release 11 (snap10) 2013-02-24 21:55:48 -05:00
Jonathan Kim
6bf2f2482e [svn-r23309] Purpose:
HDFFV-7643 - h5diff - incorrect exit-code returns for extra attribute exist

Description:
   h5diff: Fixed to return correct exit code 1 when detect unique
   attribute. Prior to this fix, h5diff returned exit code 0 indicating 
   two files are identical.
   Merged from HDF5 trunk r23304.

Tested: 
    jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), fred (mac64-LE), emu (solaris-BE),  Windows (32-LE cmake), cmake (jam)
2013-02-21 14:23:53 -05:00
Allen Byrne
53bec20a49 [svn-r23303] incorrectly added 2013-02-18 14:13:07 -05:00
Allen Byrne
bc617d2b63 [svn-r23302] Remove old file names 2013-02-18 14:10:11 -05:00
Allen Byrne
1629fd1ee7 [svn-r23301] 2013-02-18 14:03:53 -05:00
Albert Cheng
79bc86c220 [svn-r23299] Updated with bug fix entry of HDFFV-8267.
Since this is a testing code error that does not affect the function of the
library or tools, I started a new "Testing" section for this sort of changes.
2013-02-18 11:28:57 -05:00
Albert Cheng
52281ac2cb [svn-r23298] Bug fix: HDFFV-8267
The ERROR macro had a typo of missing a separator comma. When used, it seg.
fault. Added the comma back in.
Fix is reviewed in Crucible HDF5-107.

Tested: h5committest passed. Also tested using the ERROR macro in the
Mac (Owl) platform. Before fix, it seg. fault. After fix, it prints the
message as intended.
2013-02-18 11:11:35 -05:00
Scot Breitenfeld
a66624ed68 [svn-r23292] H5DSget_scale_name changed behavior and fix noted. 2013-02-17 19:55:01 -05:00
Scot Breitenfeld
c3fe966251 [svn-r23291] brought r23241 into the branch.
Fix for: HDFFV-7596
H5DSget_scale returns size that includes NULL termination and H5DSget_label returns size NOT including NULL termination
2013-02-17 19:46:21 -05:00
Frank Baker
dd422291e0 [svn-r23268] Description:
Update copyright to 2013.
Tested:  Firefox
2013-02-13 17:13:30 -05:00
Neil Fortner
749522bbd6 [svn-r23265] Merge revisions 23230, 23234, and 23237 to 1.8 branch
Purpose: Implement H5Dscatter and H5Dgather

Description:
Adds 2 new API functions, H5Dscatter and H5Dgather.  H5Dscatter retrieves data
from a specified callback function and scatters it into a selection, defined by
a supplied dataspace, within a supplied memory buffer.  H5Dgather gathers data
from a selection within a supplied memory buffer and passes it in a contiguous
form to a supplied callback function.  Added tests for these functions

Tested: jam, ostrich, koala (h5committest); ummon; ummon (1.8)
2013-02-13 16:55:48 -05:00
Scot Breitenfeld
8dcb0ee3d0 [svn-r23261] Brought r23235 from trunk into branch. 2013-02-12 19:04:15 -05:00
Raymond Lu
dc1c567135 [svn-r23246] I added the information about the new function H5DOwrite_chunk.
No test is needed.
2013-02-11 16:21:10 -05:00
HDF Tester
5a4e808656 [svn-r23243] Snapshot version 1.8 release 11 (snap9) 2013-02-10 21:49:05 -05:00
Quincey Koziol
99c03f4fb6 [svn-r23239] Description:
Bring r23238 from trunk to 1.8 branch:

    Bring changes from Coverity branch to trunk:

r20528:
Purpose: Fix coverity issue 1372

Description: Rewrite file open secition of H5FD_stdio_open to avoid TOCTUO
condition.  No longer calls access, and uses a tentative open in "rb" or "rb+"
mode to check for existence of the file.

r20609:
Use HDstrncpy and HDstrncat. --gh

r20611:
Use HDstrncpy. --gh


Tested on:
    Mac OSX/64 10.8.2 (amazon) w/debug, C++ & FORTRAN
    (h5committest not required, already tested on branch)
2013-02-09 12:21:24 -05:00
Jonathan Kim
bf59bd4d09 [svn-r23229]
Purpose: 
    Revert back one of the coverity updates from previous (r23220) checkin. "r20457: Coverity issue 691" in previous svn log.  Only revert the change about using "STDOUT_FILENO".

Description:
    Using "STDOUT_FILENO" caused error on Windows. On unix it's defined in <unistd.h>, but not in Windows.  After a little discussion with Allen, he remembered how the similar case were handled for h5dump redirecting those streams. (in h5dump.c) However it would requires more attention to apply, so this issue is entered as a separate task in jira HDDFV-8306.

    
Tested: 
    jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), fred (mac64-LE)
2013-02-05 11:13:49 -05:00
Quincey Koziol
ccdd2b66f1 [svn-r23224] Description:
Bring r23223 from trunk to 1.8 branch:

    Revert use of snprintf() for sprintf(), as it is not supported on Windows.
(And file a bug, http://jira.hdfgroup.uiuc.edu/browse/HDFFV-8302, for the
general problem)

Tested:
    Mac OSX/64 10.8.2 (amazon)
2013-02-04 09:46:14 -05:00
HDF Tester
87cd27e6d8 [svn-r23222] Snapshot version 1.8 release 11 (snap8) 2013-02-03 21:38:36 -05:00
Quincey Koziol
9474760400 [svn-r23220] Description:
Bring r23219 from trunk to 1.8 branch:

   Bring reviewed changes from Coverity branch back to trunk (QK & JK):

r20457:
Coverity issue 691: return of H5duo could be negative. Fixed by using
STDOUT_FILENO and redesign parse_command_line and main to cleanup file
allocations. The output_file var is null when using stdout. In cleanup do not
close output_file if NULL.

r20510:
Initialize ufid = -1 and predicate HDclose call on ufid != -1

r20511:
Purpose: Fix coverity issue 1715

Description: Free "file" and nested data on failure in H5FD_core_open.

r20512:
Initialize ifid = -1 and predicate HDclose call on ifid != -1

r20514:
Initialize h5fid = -1 and predicate HDclose call on h5fid != -1

r20516:
Added else branch to the if (ret_value < 0) check.

r20522:
Addressed coverity issues 930-933, 850, 836, 835, 1307.  All minor 
potential buffer overwrite bugs, or coverity errors.  Fixed by replacing
strcpy and sprintf with strncpy and snprintf.

r20523:
fixed coverity issues 68, 1120, 1116i

r20524:
Check  H5Z_SZIP->encoder_present < 1 assuming 0 represents absence.

r20601:
Purpose: Fix coverity issues 1703-1705

Description: Modified the cleanup code in test_free in accum.c to reset
allocated buffers to NULL after they are freed, and modified the error cleanup
code to check if these buffers are NULL before freeing them.  Also fixed some
unrelated warnings in accum.c.

r20602:
Use HDsnprintf and HDstrncat

r20603:
Purpose: Fix coverity issues 808-809

Description: Modified test_core in vfd.c to check the returns from malloc, and
keep track of whether points and check are allocated by setting them to NULL
when they are not.  Added code to free points and check on error if they are
not NULL.  Also fixed unrelated warnings in vfd.c.

r20604:
Use HDstrncpy.

r20605:
Use HDstrncpy and HDstrncat.

r20606:
Purpose: Fix coverity issue 807

Description: Modified long_compact in stab.c to keep track of whether objname is
allocated by setting it to NULL when it is not.  Added code to free objname on
error if it is not NULL.

r20607:
Changed string function calls to use versions that specify the string length
to fix coverity issues 832 and 839.


Tested on:
    Mac OSX/64 10.8.2 (amazon)
    (Too minor to require h5committest)
2013-02-01 21:42:36 -05:00
Allen Byrne
6774149c17 [svn-r23218] Comment out new fortran functions not yet merged from trunk
Tested: windows
2013-02-01 09:32:16 -05:00
Allen Byrne
d4f752c335 [svn-r23214] Remove obsolete file 2013-01-31 13:41:54 -05:00
Allen Byrne
af73176e79 [svn-r23213] HDDFV-8292 added not about change in HDF_LEGACY_NAMING option default. 2013-01-31 12:57:16 -05:00
Allen Byrne
ac80893727 [svn-r23212] HDFFV-8292: Disable HDF_LEGACY_NAMING by default 2013-01-31 12:43:39 -05:00
Allen Byrne
13693b307c [svn-r23211] Merge trunk CMake changes for minimum cmake version of 2.8.10. This was prompted by HDFFV-8227, OS X requires latest version of cmake for proper support.
Tested: local linux
2013-01-31 12:30:34 -05:00
Mohamad Chaarawi
bf473b40f5 [svn-r23199] merge 23165 from trunk
HDFF-8203 Break H5FDmpi.h header into public and private components
https://jira.hdfgroup.uiuc.edu/browse/HDFFV-8203
2013-01-24 15:07:24 -05:00
Raymond Lu
a1bd48eb2b [svn-r23194] I changed the call to H5P_object_verify to H5I_object as the header file H5Iprivate.h is included but not H5Pprivate.h.
Tested on koala, jam, ostrich.
2013-01-23 10:10:46 -05:00
Albert Cheng
090ec43d23 [svn-r23188] Addition of cmakehdf5. 2013-01-22 10:51:32 -05:00
Allen Byrne
6a98cfb434 [svn-r23187] HDFFV-8169: Binary output of String types are wrong
Merge from trunk
Add testfiles.
Tested: local linux
2013-01-22 10:38:36 -05:00
Allen Byrne
ff3020dabf [svn-r23186] HDFFV-8169: Binary output of String types are wrong
Merge from trunk
2013-01-22 09:49:47 -05:00
Raymond Lu
badedee44d [svn-r23182] I'm merging the changes for DECTRIS project from the trunk (r23162).
Tested on koala, jam, ostrich.
2013-01-21 17:47:00 -05:00
HDF Tester
17f2fde031 [svn-r23181] Snapshot version 1.8 release 11 (snap7) 2013-01-20 21:29:26 -05:00
Albert Cheng
f7f0217d95 [svn-r23172] Updated with added cmakehdf5. 2013-01-16 16:25:09 -05:00
Albert Cheng
50ddf1c761 [svn-r23171] cmakehdf5 is a build command script similar to buildhdf5.
This has been developed and tested in the trunk branch and is
now made available in the v1.8 branch.

Tested: Linux (Jam), linux 64 (koala), ppc64 (ostrich), Mac (fred, duck and Owl) passed.
Failed in SunOS (linew). Will fix when the new Sun is available.
2013-01-16 15:33:13 -05:00
Allen Byrne
fa9373afeb [svn-r23159] HDFFV-498: Eliminate a.exe file on cygwin configurations, pushed to branch from chunk so its tested on cygwin 2013-01-14 13:01:57 -05:00
Allen Byrne
1924dae977 [svn-r23155] HDFFV-8286: changed comments from // to /* */ 2013-01-14 10:43:13 -05:00
Dana Robinson
724a0a93b4 [svn-r23142] Purpose:
Merged 23111 from the trunk.
    (Core VFD and Mac OS X I/O changes)

Tested on:
    64-bit Windows 7, Visual Studio 2010, CMake
    64-bit Mac OS X Snow Leopard (Fred), Fortran, C++
    64-bit BE Linux (Ostrich), Fortran, C++
    32-bit LE LInux (jam), Fortran, C++ (also parallel w/ Fortran)
2013-01-07 20:19:17 -05:00
Allen Byrne
38517de982 [svn-r23141] Only do line by line compare if compare files fail. 2013-01-07 15:41:41 -05:00
Allen Byrne
520403e8e3 [svn-r23129] Update CPack to 2.8.10 2013-01-02 12:21:42 -05:00
Allen Byrne
8a7e609ba4 [svn-r23125] HDFFV-8202: merge cmake compare changes from trunk 2013-01-02 09:47:03 -05:00
HDF Tester
40a0c31d37 [svn-r23123] Snapshot version 1.8 release 11 (snap6) 2012-12-30 22:17:59 -05:00
Scot Breitenfeld
c194d4738a [svn-r23122] Brought revisions from the trunk into the branch:
r23116-23118 : HDFFV-2686: Remove the ptExampleVL.c example from the source code
               HDFFV-422: Change extention of the binary files from hdf5 to h5

Tested: jam (gnu)
2012-12-30 21:09:50 -05:00
Scot Breitenfeld
bac0fbe4d6 [svn-r23112] Brought revision 22610 from the trunk to the branch:
svn merge -r 22609:22610 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/hl .

Fixes bug HDFFV-8055 (and HDFFV-8278)
2012-12-20 00:44:13 -05:00
HDF Tester
a2432bcb45 [svn-r23086] Snapshot version 1.8 release 11 (snap5) 2012-12-09 21:36:10 -05:00
Allen Byrne
1cf765d973 [svn-r23084] Correct cmake statement to use SET instead of ADD_DEFINITIONS 2012-12-07 12:19:56 -05:00
HDF Tester
eacbf1a279 [svn-r23072] Snapshot version 1.8 release 11 (snap4) 2012-12-02 20:32:53 -05:00
Albert Cheng
11a31f840c [svn-r23070] Updated with HDFFV-8233 fix. 2012-11-30 01:03:52 -05:00
Albert Cheng
853b1cf7d7 [svn-r23069] Bug fix: HDFFV-8233
testh5stat.sh fails in LLNL uDawn. The test actually ran as expected
but it did not prepare for the extra error messages from the MPI
process.

Solution:
This sort of problem has been fixed by using the output filters in
output_filter.sh. testh5stat.sh is updated to use the output filters.

Tested:
uDawn.
2012-11-30 00:50:17 -05:00
Allen Byrne
dac22b3f03 [svn-r23065] HDFFV-8202: Add diff display to cmake output on error. Merged changes from trunk runTest.cmake. 2012-11-28 16:49:03 -05:00
HDF Tester
fe27a83823 [svn-r23051] Snapshot version 1.8 release 11 (snap3) 2012-11-25 19:40:18 -05:00
Quincey Koziol
e1dc3c9d4a [svn-r23049] Description:
Bring r23048 from trunk to 1.8 branch:

fixed coverity 678, 679

Tested on:
    Mac OSX/64 10.8.2 (amazon) w/debug
    (too minor to require h5committest)
2012-11-21 21:23:26 -05:00
Allen Byrne
765fb28a22 [svn-r23044] Restore build configuration defines for cmake 2012-11-21 10:05:49 -05:00
HDF Tester
0fed9b12ad [svn-r23040] Snapshot version 1.8 release 11 (snap2) 2012-11-18 20:30:44 -05:00
Albert Cheng
5bbf0a493a [svn-r23031] Updated with v1.8.10 release information. 2012-11-14 12:48:56 -05:00
Albert Cheng
5bac9f700f [svn-r23029] Copy finished RELEASE.txt from the 1.8.10 branch
to 1.8's HISTORY-1_8.txt file.
2012-11-13 19:20:25 -05:00
Allen Byrne
1b12b8ecc2 [svn-r23022] HDFFV-498: lone colon test fails on cygwin and leaves a.exe file on system. Added test for CYGWIN and use a,exe instead of a.out.
Review: HHDF5-1-8-31

Tested: cygwin
2012-11-12 14:14:09 -05:00
Raymond Lu
d2e56d2486 [svn-r23013] I added Sun's 5.9 C++ compiler problem as a known problem. It doesn't know a C99 predefined identifier __func__. 2012-11-05 15:30:26 -05:00
Jonathan Kim
51cf093853 [svn-r23011] Purpose:
HDFFV-8146 - Remove "multi-chunk IO without optimization" sub-feature from MPI I/O optimization for chunked dataset feature

Description:
  The “multi-chunk IO without optimization” feature is removed and made the related xfer property (H5FD_MPIO_CHUNK_MULTI_IO) go directly to “multi-chunk-io” feature.
  Also update/fix/cleanup testings (chunk collective IO and actual chunk opt mode) accordingly.
  Merged from HDF5 trunk r22992.
    
Tested: 
    jam-pp (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), fred (mac64-LE), linew (solaris-BE), koala-pp, wallby-pp, cmake (jam-pp), Windows (32-LE cmake)
2012-11-05 15:09:19 -05:00
HDF Tester
6bbeb4a437 [svn-r23009] Snapshot version 1.8 release 11 (snap1) 2012-11-04 20:58:15 -05:00
Quincey Koziol
a46c177ddf [svn-r23000] Description:
Bring r22998 from trunk to 1.8 branch:

    Clean up warnings and bring changes from Coverity branch back to trunk:

r20451:
Fixed coverity 810

r20454:
Purpose: Fix coverity issue 816

Description: Modified various file drivers to always check the return value from
H5P_get_driver_info.

r20455:
Purpose: Cleanup fix for coverity issue 816

Description: Removed redundant check for "fa" in H5FD_core_open.


Tested on:
    Mac OSX/64 10.8.2 (amazon) w/debug
    (Too minor to require h5committest)
2012-11-01 15:12:01 -05:00
HDF Tester
65597415a3 [svn-r22986] Snapshot version 1.8 release 11 (snap0) 2012-10-28 22:20:22 -05:00
Larry Knox
ecddebbe5c [svn-r22985] Removed references to files for windows legacy builds with Visual Studio which have been removed.
Tested on jam.
2012-10-27 22:42:45 -05:00
Jonathan Kim
18e9f05850 [svn-r22975] Update jam and koala sections for release 1.8.10. Update mpich version. Remove invalid extra info from configure tables and clean ups. 2012-10-26 13:22:27 -05:00
Jonathan Kim
f6995450f1 [svn-r22958] Update according to the 1.8.10 changes for jam and koala compilers and config features sections. Merged from HDF5 1.8.10 r22957. 2012-10-23 16:22:57 -05:00
Raymond Lu
f202def38c [svn-r22956] I merged from the trunk the conversion function H5T__conv_enum_numeric (numeric type means integer or floating number) and the C test for it. This is the work for Chicago. The change in fortran/ directory is only some property change.
Tested on jam, koala, and ostrich.
2012-10-23 13:41:50 -05:00
Dana Robinson
95a13a5fc9 [svn-r22952] Purpose:
Removed legacy Visual Studio solutions and projects, which will
	no longer be supported after HDF5 1.8.10.
2012-10-23 13:25:27 -05:00
Raymond Lu
0d177e3c1e [svn-r22948] I took out the redundant item of known problem about the dt_arith test reporting several errors involving "long double" on
Mac OS X 10.7 Lion when any level of optimization is enabled.
2012-10-22 17:19:34 -05:00
Mark Evans
82a5c48a45 [svn-r22944] Changed the spelling of accessability to accessibility. 2012-10-22 11:43:22 -05:00
Allen Byrne
bcf7479296 [svn-r22941] Updated linux VM build system used 2012-10-22 10:24:27 -05:00
Dana Robinson
0ff4e689dc [svn-r22937] Purpose:
Reorganize obsolete Windows docs.

Tested:
	N/A (docs only), ran bin/chkmanifest
2012-10-21 22:02:39 -05:00
Jonathan Kim
c61b885e86 [svn-r22934] Purpose:
HDFFV-8145 h5diff slowness with version >= 1.8.7

Description:
    Improved speed when comparing HDF5 files with lots of attributes. Much slower performance was identified with release version from 1.8.7 to 1.8.10 compared to 1.8.6.
    Merged from HDF5 trunk r22933.
    
Tested: 
    jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), cmake (jam)
2012-10-19 16:40:32 -05:00
Quincey Koziol
caf88044e7 [svn-r22931] Description:
Update FreeBSD info.
2012-10-19 14:50:56 -05:00
Quincey Koziol
74d0aa11ad [svn-r22929] Description:
Bring r22921 from trunk to 1.8 branch:

    Review Coverity changes and bring them back to trunk. (QK & JK)

r20402:
Added #includes for h5tools.y or h5tools_utils.h as required to remedy implicit
function declarations which caused compiler warnings and coverity issues 703-4
and 708-11.

r20414:
This is related to the previous checkin r20399.  There were incorrect updates
which caused incorrect behavior when no file was given. Also possible segfault
when handling hyperslab options. Simplify the code changes.

r20449:
Description: Modified H5E_walk2_cb to check return value of H5I_object_verify.

r20450:
fixed coverity 813


Tested on:
    Mac OSX/64 10.8.2 (amazon) w/C++, FORTRAN, debug & threadsafe
    (too minor to require h5committest)
2012-10-19 12:54:22 -05:00
Larry Knox
82dd00095e [svn-r22926] Revert change to h5fc.in (3 line comment + 1 line ineffective code) that was inadvertently me
rged from trunk before it was reverted there.

Tested change on trunk and 1.8.10 branch with h5committest, make install and make installcheck on jam koala and ostrich.
2012-10-18 16:58:26 -05:00
Albert Cheng
1e41d9586b [svn-r22924] Updated LLNL aztec information.
Tested: just eyeballed.
2012-10-18 16:38:49 -05:00
Quincey Koziol
14d87e20ff [svn-r22916] Description:
Bring r22915 from trunk to 1.8 branch:


    Bring Coverity changes back to trunk:

r20399:
Change parse_command_line to free hand structure on error and only "leave()" at end of main.

r20400:
Purpose: Fix coverity issue 592

Description: Added void cast to call to H5F_sfile_assert_num() in
H5F_term)interface().  There is no need to check the return value of this
function in general, and there would be nothing to do even if it did fail.

r20401:
Added free(src_sizes) and free(src_offset). --gh


Tested on:
    Mac OSX/64 10.8.2 (amazon) w/C++, FORTRAN, threadsafe
    (too minor for h5committest)
2012-10-17 14:31:44 -05:00
Raymond Lu
e1fb770277 [svn-r22910] Update compiler information for ostrich.
No test is needed.
2012-10-16 16:48:56 -05:00
Raymond Lu
3b469b534a [svn-r22906] Update GNU Fortran compiler version for fred.
No test is needed.
2012-10-16 16:28:42 -05:00
Allen Byrne
4eb2b06a80 [svn-r22905] Fixed typo in name of cmake config file. Needed for installing multiple versions on windows. 2012-10-16 12:45:48 -05:00
Albert Cheng
b650bd0bbd [svn-r22892] Increment release branch for future release (v1.8.11).
Set version number to 1.8.11-snap0.
Clear out RELEASE.txt to hold 1.8.11 changes
Update version references in RELEASE.txt
2012-10-12 13:26:55 -05:00
Albert Cheng
1ce6022a14 [svn-r22891] Added v1.8.10 RELEASE.txt place holder. 2012-10-12 12:27:23 -05:00
Albert Cheng
e1fa5a23db [svn-r22889] Copy finished RELEASE.txt from the 1.8.9 branch
to 1.8's HISTORY-1_8.txt file.
2012-10-12 03:42:10 -05:00
Scot Breitenfeld
c15fb68505 [svn-r22886] Added bug fixes and enhancements since the last release. 2012-10-11 19:30:25 -05:00
1555 changed files with 141204 additions and 200151 deletions

125
CMakeFilters.cmake Normal file
View File

@@ -0,0 +1,125 @@
#-----------------------------------------------------------------------------
# Options for HDF5 Filters
#-----------------------------------------------------------------------------
MACRO (HDF5_SETUP_FILTERS FILTER)
option (HDF5_USE_FILTER_${FILTER} "Use the ${FILTER} Filter" ON)
if (HDF5_USE_FILTER_${FILTER})
set (H5_HAVE_FILTER_${FILTER} 1)
set (FILTERS "${FILTERS} ${FILTER}")
endif (HDF5_USE_FILTER_${FILTER})
# message (STATUS "Filter ${FILTER} is ${HDF5_USE_FILTER_${FILTER}}")
ENDMACRO (HDF5_SETUP_FILTERS)
include (ExternalProject)
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)")
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
set (ZLIB_URL ${ZLIB_SVN_URL} CACHE STRING "Path to zlib Subversion repository")
set (SZIP_URL ${SZIP_SVN_URL} CACHE STRING "Path to szip Subversion repository")
elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
if (NOT TGZPATH)
set (TGZPATH ${HDF5_SOURCE_DIR})
endif (NOT TGZPATH)
set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
set (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME})
else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
set (ZLIB_USE_EXTERNAL 0)
set (SZIP_USE_EXTERNAL 0)
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
#-----------------------------------------------------------------------------
# Option for ZLib support
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF)
if (HDF5_ENABLE_Z_LIB_SUPPORT)
if (NOT H5_ZLIB_HEADER)
if (NOT ZLIB_USE_EXTERNAL)
find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
if (NOT ZLIB_FOUND)
find_package (ZLIB) # Legacy find
if (ZLIB_FOUND)
set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES})
endif (ZLIB_FOUND)
endif (NOT ZLIB_FOUND)
endif (NOT ZLIB_USE_EXTERNAL)
if (ZLIB_FOUND)
set (H5_HAVE_FILTER_DEFLATE 1)
set (H5_HAVE_ZLIB_H 1)
set (H5_HAVE_LIBZ 1)
set (H5_ZLIB_HEADER "zlib.h")
set (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
else (ZLIB_FOUND)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE})
set (H5_HAVE_FILTER_DEFLATE 1)
set (H5_HAVE_ZLIB_H 1)
set (H5_HAVE_LIBZ 1)
message (STATUS "Filter ZLIB is built")
else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
message (FATAL_ERROR " ZLib is Required for ZLib support in HDF5")
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
endif (ZLIB_FOUND)
else (NOT H5_ZLIB_HEADER)
# This project is being called from within another and ZLib is already configured
set (H5_HAVE_FILTER_DEFLATE 1)
set (H5_HAVE_ZLIB_H 1)
set (H5_HAVE_LIBZ 1)
endif (NOT H5_ZLIB_HEADER)
if (H5_HAVE_FILTER_DEFLATE)
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
endif (H5_HAVE_FILTER_DEFLATE)
set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES})
INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
message (STATUS "Filter ZLIB is ON")
endif (HDF5_ENABLE_Z_LIB_SUPPORT)
#-----------------------------------------------------------------------------
# Option for SzLib support
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
if (HDF5_ENABLE_SZIP_SUPPORT)
option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
if (NOT SZIP_USE_EXTERNAL)
find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT})
if (NOT SZIP_FOUND)
find_package (SZIP) # Legacy find
if (SZIP_FOUND)
set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
endif (SZIP_FOUND)
endif (NOT SZIP_FOUND)
endif (NOT SZIP_USE_EXTERNAL)
if (SZIP_FOUND)
set (H5_HAVE_FILTER_SZIP 1)
set (H5_HAVE_SZLIB_H 1)
set (H5_HAVE_LIBSZ 1)
set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
else (SZIP_FOUND)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE} ${HDF5_ENABLE_SZIP_ENCODING})
set (H5_HAVE_FILTER_SZIP 1)
set (H5_HAVE_SZLIB_H 1)
set (H5_HAVE_LIBSZ 1)
message (STATUS "Filter SZIP is built")
else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
endif (SZIP_FOUND)
set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
message (STATUS "Filter SZIP is ON")
if (H5_HAVE_FILTER_SZIP)
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
endif (H5_HAVE_FILTER_SZIP)
if (HDF5_ENABLE_SZIP_ENCODING)
set (H5_HAVE_SZIP_ENCODER 1)
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE")
endif (HDF5_ENABLE_SZIP_ENCODING)
endif (HDF5_ENABLE_SZIP_SUPPORT)

597
CMakeInstallation.cmake Normal file
View File

@@ -0,0 +1,597 @@
include (CMakePackageConfigHelpers)
#-----------------------------------------------------------------------------
# Check for Installation Utilities
#-----------------------------------------------------------------------------
if (WIN32)
set (PF_ENV_EXT "(x86)")
find_program (NSIS_EXECUTABLE NSIS.exe PATHS "$ENV{ProgramFiles}\\NSIS" "$ENV{ProgramFiles${PF_ENV_EXT}}\\NSIS")
if(NOT CPACK_WIX_ROOT)
file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT)
endif()
find_program (WIX_EXECUTABLE candle PATHS "${CPACK_WIX_ROOT}/bin")
endif (WIN32)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
if (NOT HDF5_INSTALL_NO_DEVELOPMENT)
install (
FILES ${PROJECT_BINARY_DIR}/H5pubconf.h
DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT headers
)
endif (NOT HDF5_INSTALL_NO_DEVELOPMENT)
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
install (
EXPORT ${HDF5_EXPORTED_TARGETS}
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
COMPONENT configinstall
)
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Export all exported targets to the build tree for use by parent project
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
export (
TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES}
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
)
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Set includes needed for build
#-----------------------------------------------------------------------------
set (HDF5_INCLUDES_BUILD_TIME
${HDF5_SRC_DIR} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR}
${HDF5_TOOLS_SRC_DIR} ${HDF5_BINARY_DIR}
)
#-----------------------------------------------------------------------------
# Set variables needed for installation
#-----------------------------------------------------------------------------
set (HDF5_VERSION_STRING ${HDF5_PACKAGE_VERSION})
set (HDF5_VERSION_MAJOR ${HDF5_PACKAGE_VERSION_MAJOR})
set (HDF5_VERSION_MINOR ${HDF5_PACKAGE_VERSION_MINOR})
#-----------------------------------------------------------------------------
# Configure the hdf5-config.cmake file for the build directory
#-----------------------------------------------------------------------------
set (INCLUDE_INSTALL_DIR ${HDF5_INSTALL_INCLUDE_DIR})
set (SHARE_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_INSTALL_CMAKE_DIR}" )
set (CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" )
configure_package_config_file (
${HDF_RESOURCES_DIR}/hdf5-config.cmake.in
"${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake"
INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}"
PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
)
#-----------------------------------------------------------------------------
# Configure the FindHDF5.cmake file for the install directory
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
configure_file (
${HDF_RESOURCES_DIR}/FindHDF5.cmake.in
${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindHDF5${HDF_PACKAGE_EXT}.cmake @ONLY
)
install (
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindHDF5${HDF_PACKAGE_EXT}.cmake
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
COMPONENT configinstall
)
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Configure the hdf5-config.cmake file for the install directory
#-----------------------------------------------------------------------------
set (INCLUDE_INSTALL_DIR ${HDF5_INSTALL_INCLUDE_DIR})
set (SHARE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${HDF5_INSTALL_CMAKE_DIR}" )
set (CURRENT_BUILD_DIR "${CMAKE_INSTALL_PREFIX}" )
configure_package_config_file (
${HDF_RESOURCES_DIR}/hdf5-config.cmake.in
"${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake"
INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}"
PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
)
if (NOT HDF5_EXTERNALLY_CONFIGURED)
install (
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
COMPONENT configinstall
)
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Configure the hdf5-config-version .cmake file for the install directory
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
configure_file (
${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in
${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
)
install (
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
COMPONENT configinstall
)
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Configure the libhdf5.settings file for the lib info
#-----------------------------------------------------------------------------
if (H5_WORDS_BIGENDIAN)
set (BYTESEX big-endian)
else (H5_WORDS_BIGENDIAN)
set (BYTESEX little-endian)
endif (H5_WORDS_BIGENDIAN)
configure_file (
${HDF_RESOURCES_DIR}/libhdf5.settings.cmake.in
${HDF5_BINARY_DIR}/libhdf5.settings @ONLY
)
install (
FILES ${HDF5_BINARY_DIR}/libhdf5.settings
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
COMPONENT libraries
)
#-----------------------------------------------------------------------------
# Configure the HDF518_Examples.cmake file and the examples
#-----------------------------------------------------------------------------
option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF)
if (HDF5_PACK_EXAMPLES)
configure_file (
${HDF_RESOURCES_DIR}/HDF518_Examples.cmake.in
${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY
)
install (
FILES ${HDF5_BINARY_DIR}/HDF518_Examples.cmake
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT hdfdocuments
)
if (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar xzf ${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}
)
install (
DIRECTORY ${HDF5_BINARY_DIR}/HDF5Examples-0.1.1-Source
DESTINATION ${HDF5_INSTALL_DATA_DIR}
USE_SOURCE_PERMISSIONS
COMPONENT hdfdocuments
)
install (
FILES
${HDF5_SOURCE_DIR}/release_docs/USING_CMake_Examples.txt
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT hdfdocuments
)
endif (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}")
endif (HDF5_PACK_EXAMPLES)
#-----------------------------------------------------------------------------
# Configure the README.txt file for the binary package
#-----------------------------------------------------------------------------
HDF_README_PROPERTIES(HDF5_BUILD_FORTRAN)
#-----------------------------------------------------------------------------
# Configure the COPYING.txt file for the windows binary package
#-----------------------------------------------------------------------------
if (WIN32)
configure_file (${HDF5_SOURCE_DIR}/COPYING ${HDF5_BINARY_DIR}/COPYING.txt @ONLY)
endif (WIN32)
#-----------------------------------------------------------------------------
# Add Document File(s) to CMake Install
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
install (
FILES
${HDF5_SOURCE_DIR}/COPYING
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT hdfdocuments
)
if (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
set (release_files
${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_CMake.txt
${HDF5_SOURCE_DIR}/release_docs/COPYING
${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt
)
if (WIN32)
set (release_files
${release_files}
${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_VS.txt
)
endif (WIN32)
if (HDF5_PACK_INSTALL_DOCS)
set (release_files
${release_files}
${HDF5_SOURCE_DIR}/release_docs/INSTALL_CMake.txt
${HDF5_SOURCE_DIR}/release_docs/HISTORY-1_8.txt
${HDF5_SOURCE_DIR}/release_docs/INSTALL
)
if (WIN32)
set (release_files
${release_files}
${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt
)
endif (WIN32)
if (CYGWIN)
set (release_files
${release_files}
${HDF5_SOURCE_DIR}/release_docs/INSTALL_Cygwin.txt
)
endif (CYGWIN)
if (HDF5_ENABLE_PARALLEL)
set (release_files
${release_files}
${HDF5_SOURCE_DIR}/release_docs/INSTALL_parallel
)
endif (HDF5_ENABLE_PARALLEL)
endif (HDF5_PACK_INSTALL_DOCS)
install (
FILES ${release_files}
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT hdfdocuments
)
endif (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
if (CMAKE_HOST_UNIX)
set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
else (CMAKE_HOST_UNIX)
GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
set (CMAKE_INSTALL_PREFIX
"${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
set (CMAKE_GENERIC_PROGRAM_FILES)
endif (CMAKE_HOST_UNIX)
endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
#-----------------------------------------------------------------------------
# Set the cpack variables
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set (CPACK_PACKAGE_VENDOR "HDF_Group")
set (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}")
if (CDASH_LOCAL)
set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}")
else (CDASH_LOCAL)
set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION_STRING}")
endif (CDASH_LOCAL)
set (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}")
set (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}")
set (CPACK_PACKAGE_VERSION_PATCH "")
if (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/COPYING")
set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
endif (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
set (CPACK_PACKAGE_RELOCATABLE TRUE)
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.bmp")
set (CPACK_GENERATOR "TGZ")
if (WIN32)
set (CPACK_GENERATOR "ZIP")
if (NSIS_EXECUTABLE)
list (APPEND CPACK_GENERATOR "NSIS")
endif (NSIS_EXECUTABLE)
# Installers for 32- vs. 64-bit CMake:
# - Root install directory (displayed to end user at installer-run time)
# - "NSIS package/display name" (text used in the installer GUI)
# - Registry key used to store info about the installation
set (CPACK_NSIS_PACKAGE_NAME "${HDF5_PACKAGE_STRING}")
if (CMAKE_CL_64)
set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION} (Win64)")
else (CMAKE_CL_64)
set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
endif (CMAKE_CL_64)
# set the install/unistall icon used for the installer itself
# There is a bug in NSI that does not handle full unix paths properly.
set (CPACK_NSIS_MUI_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico")
set (CPACK_NSIS_MUI_UNIICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico")
# set the package header icon for MUI
set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.bmp")
set (CPACK_NSIS_DISPLAY_NAME "${CPACK_NSIS_PACKAGE_NAME}")
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}")
set (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}")
set (CPACK_NSIS_MODIFY_PATH ON)
if (WIX_EXECUTABLE)
list (APPEND CPACK_GENERATOR "WIX")
endif (WIX_EXECUTABLE)
#WiX variables
set (CPACK_WIX_UNINSTALL "1")
# .. variable:: CPACK_WIX_LICENSE_RTF
# RTF License File
#
# If CPACK_RESOURCE_FILE_LICENSE has an .rtf extension it is used as-is.
#
# If CPACK_RESOURCE_FILE_LICENSE has an .txt extension it is implicitly
# converted to RTF by the WiX Generator.
# The expected encoding of the .txt file is UTF-8.
#
# With CPACK_WIX_LICENSE_RTF you can override the license file used by the
# WiX Generator in case CPACK_RESOURCE_FILE_LICENSE is in an unsupported
# format or the .txt -> .rtf conversion does not work as expected.
set (CPACK_RESOURCE_FILE_LICENSE "${HDF5_BINARY_DIR}/COPYING.txt")
# .. variable:: CPACK_WIX_PRODUCT_ICON
# The Icon shown next to the program name in Add/Remove programs.
set(CPACK_WIX_PRODUCT_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico")
#
# .. variable:: CPACK_WIX_UI_BANNER
#
# The bitmap will appear at the top of all installer pages other than the
# welcome and completion dialogs.
#
# If set, this image will replace the default banner image.
#
# This image must be 493 by 58 pixels.
#
# .. variable:: CPACK_WIX_UI_DIALOG
#
# Background bitmap used on the welcome and completion dialogs.
#
# If this variable is set, the installer will replace the default dialog
# image.
#
# This image must be 493 by 312 pixels.
#
set(CPACK_WIX_PROPERTY_ARPCOMMENTS "HDF5 (Hierarchical Data Format 5) Software Library and Utilities")
set(CPACK_WIX_PROPERTY_ARPURLINFOABOUT "${HDF5_PACKAGE_URL}")
set(CPACK_WIX_PROPERTY_ARPHELPLINK "${HDF5_PACKAGE_BUGREPORT}")
if (BUILD_SHARED_LIBS)
set(CPACK_WIX_PATCH_FILE "${HDF_RESOURCES_DIR}/patch.xml")
endif (BUILD_SHARED_LIBS)
elseif (APPLE)
list (APPEND CPACK_GENERATOR "DragNDrop")
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns")
option (HDF5_PACK_MACOSX_BUNDLE "Package the HDF5 Library in a Bundle" OFF)
if (HDF5_PACK_MACOSX_BUNDLE)
list (APPEND CPACK_GENERATOR "Bundle")
set (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in /
set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/")
set (CPACK_BUNDLE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns")
set (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist")
set (CPACK_APPLE_GUI_INFO_STRING "HDF5 (Hierarchical Data Format 5) Software Library and Utilities")
set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © 2006-2015 by The HDF Group. All rights reserved.")
set (CPACK_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}")
set (CPACK_APPLE_GUI_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
set (CPACK_APPLE_GUI_VERSION_STRING "${CPACK_PACKAGE_VERSION_STRING}")
set (CPACK_APPLE_GUI_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}")
#-----------------------------------------------------------------------------
# Configure the Info.plist file for the install bundle
#-----------------------------------------------------------------------------
configure_file (
${HDF_RESOURCES_EXT_DIR}/CPack.Info.plist.in
${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY
)
configure_file (
${HDF_RESOURCES_DIR}/PkgInfo.in
${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo @ONLY
)
configure_file (
${HDF_RESOURCES_EXT_DIR}/version.plist.in
${HDF5_BINARY_DIR}/CMakeFiles/version.plist @ONLY
)
install (
FILES ${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo
${HDF5_BINARY_DIR}/CMakeFiles/version.plist
DESTINATION ..
)
endif (HDF5_PACK_MACOSX_BUNDLE)
else (WIN32)
list (APPEND CPACK_GENERATOR "STGZ")
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}")
# list (APPEND CPACK_GENERATOR "RPM")
set (CPACK_RPM_PACKAGE_RELEASE "1")
set (CPACK_RPM_COMPONENT_INSTALL ON)
set (CPACK_RPM_PACKAGE_RELOCATABLE ON)
set (CPACK_RPM_PACKAGE_LICENSE "BSD-style")
set (CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
set (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}")
set (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.")
set (CPACK_RPM_PACKAGE_DESCRIPTION
"The HDF5 technology suite includes:
* A versatile data model that can represent very complex data objects and a wide variety of metadata.
* A completely portable file format with no limit on the number or size of data objects in the collection.
* A software library that runs on a range of computational platforms, from laptops to massively parallel systems, and implements a high-level API with C, C++, Fortran 90, and Java interfaces.
* A rich set of integrated performance features that allow for access time and storage space optimizations.
* Tools and applications for managing, manipulating, viewing, and analyzing the data in the collection.
The HDF5 data model, file format, API, library, and tools are open and distributed without charge.
"
)
#-----------------------------------------------------------------------------
# Configure the spec file for the install RPM
#-----------------------------------------------------------------------------
# configure_file ("${HDF5_RESOURCES_DIR}/hdf5.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec" @ONLY IMMEDIATE)
# set (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec")
endif (WIN32)
# By default, do not warn when built on machines using only VS Express:
if (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
endif (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
include (InstallRequiredSystemLibraries)
set (CPACK_INSTALL_CMAKE_PROJECTS "${HDF5_BINARY_DIR};HDF5;ALL;/")
if (HDF5_PACKAGE_EXTLIBS)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;ALL;/")
endif (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/")
endif (SZIP_FOUND AND SZIP_USE_EXTERNAL)
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
endif (HDF5_PACKAGE_EXTLIBS)
include (CPack)
cpack_add_install_type(Full DISPLAY_NAME "Everything")
cpack_add_install_type(Developer)
cpack_add_component_group(Runtime)
cpack_add_component_group(Documents
EXPANDED
DESCRIPTION "Release notes for developing HDF5 applications"
)
cpack_add_component_group(Development
EXPANDED
DESCRIPTION "All of the tools you'll need to develop HDF5 applications"
)
cpack_add_component_group(Applications
EXPANDED
DESCRIPTION "Tools for HDF5 files"
)
#---------------------------------------------------------------------------
# Now list the cpack commands
#---------------------------------------------------------------------------
CPACK_ADD_COMPONENT (libraries
DISPLAY_NAME "HDF5 Libraries"
GROUP Runtime
INSTALL_TYPES Full Developer User
)
CPACK_ADD_COMPONENT (headers
DISPLAY_NAME "HDF5 Headers"
DEPENDS libraries
GROUP Development
INSTALL_TYPES Full Developer
)
CPACK_ADD_COMPONENT (hdfdocuments
DISPLAY_NAME "HDF5 Documents"
GROUP Documents
INSTALL_TYPES Full Developer
)
CPACK_ADD_COMPONENT (configinstall
DISPLAY_NAME "HDF5 CMake files"
DEPENDS libraries
GROUP Development
INSTALL_TYPES Full Developer User
)
if (HDF5_BUILD_FORTRAN)
CPACK_ADD_COMPONENT (fortlibraries
DISPLAY_NAME "HDF5 Fortran Libraries"
DEPENDS libraries
GROUP Runtime
INSTALL_TYPES Full Developer User
)
CPACK_ADD_COMPONENT (fortheaders
DISPLAY_NAME "HDF5 Fortran Headers"
DEPENDS fortlibraries
GROUP Development
INSTALL_TYPES Full Developer
)
endif (HDF5_BUILD_FORTRAN)
if (HDF5_BUILD_CPP_LIB)
CPACK_ADD_COMPONENT (cpplibraries
DISPLAY_NAME "HDF5 C++ Libraries"
DEPENDS libraries
GROUP Runtime
INSTALL_TYPES Full Developer User
)
CPACK_ADD_COMPONENT (cppheaders
DISPLAY_NAME "HDF5 C++ Headers"
DEPENDS cpplibraries
GROUP Development
INSTALL_TYPES Full Developer
)
endif (HDF5_BUILD_CPP_LIB)
if (HDF5_BUILD_TOOLS)
CPACK_ADD_COMPONENT (toolsapplications
DISPLAY_NAME "HDF5 Tools Applications"
DEPENDS toolslibraries
GROUP Applications
INSTALL_TYPES Full Developer User
)
CPACK_ADD_COMPONENT (toolslibraries
DISPLAY_NAME "HDF5 Tools Libraries"
DEPENDS libraries
GROUP Runtime
INSTALL_TYPES Full Developer User
)
CPACK_ADD_COMPONENT (toolsheaders
DISPLAY_NAME "HDF5 Tools Headers"
DEPENDS toolslibraries
GROUP Development
INSTALL_TYPES Full Developer
)
endif (HDF5_BUILD_TOOLS)
if (HDF5_BUILD_HL_LIB)
CPACK_ADD_COMPONENT (hllibraries
DISPLAY_NAME "HDF5 HL Libraries"
DEPENDS libraries
GROUP Runtime
INSTALL_TYPES Full Developer User
)
CPACK_ADD_COMPONENT (hlheaders
DISPLAY_NAME "HDF5 HL Headers"
DEPENDS hllibraries
GROUP Development
INSTALL_TYPES Full Developer
)
CPACK_ADD_COMPONENT (hltoolsapplications
DISPLAY_NAME "HDF5 HL Tools Applications"
DEPENDS hllibraries
GROUP Applications
INSTALL_TYPES Full Developer User
)
CPACK_ADD_COMPONENT (hlcpplibraries
DISPLAY_NAME "HDF5 HL C++ Libraries"
DEPENDS hllibraries
GROUP Runtime
INSTALL_TYPES Full Developer User
)
CPACK_ADD_COMPONENT (hlcppheaders
DISPLAY_NAME "HDF5 HL C++ Headers"
DEPENDS hlcpplibraries
GROUP Development
INSTALL_TYPES Full Developer
)
CPACK_ADD_COMPONENT (hlfortlibraries
DISPLAY_NAME "HDF5 HL Fortran Libraries"
DEPENDS fortlibraries
GROUP Runtime
INSTALL_TYPES Full Developer User
)
endif (HDF5_BUILD_HL_LIB)
endif (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@ HDF5 (Hierarchical Data Format 5) Software Library and Utilities
-----------------------------------------------------------------------------
HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 2006-2012 by The HDF Group.
Copyright 2006-2015 by The HDF Group.
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 1998-2006 by the Board of Trustees of the University of Illinois.

View File

@@ -4,26 +4,28 @@
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(CTest)
SET (CTEST_PROJECT_NAME "HDF5")
SET (CTEST_NIGHTLY_START_TIME "18:00:00 CST")
set (CTEST_PROJECT_NAME "HDF5")
set (CTEST_NIGHTLY_START_TIME "18:00:00 CST")
SET (CTEST_DROP_METHOD "http")
IF (CDASH_LOCAL)
SET (CTEST_DROP_SITE "nei.hdfgroup.uiuc.edu")
SET (CTEST_DROP_LOCATION "/cdash/submit.php?project=HDF5.1.8")
ELSE (CDASH_LOCAL)
SET (CTEST_DROP_SITE "cdash.hdfgroup.uiuc.edu")
SET (CTEST_DROP_LOCATION "/submit.php?project=HDF518")
ENDIF (CDASH_LOCAL)
SET (CTEST_DROP_SITE_CDASH TRUE)
set (CTEST_DROP_METHOD "http")
if (CDASH_LOCAL)
set (CTEST_DROP_SITE "72.36.68.252")
set (CTEST_DROP_LOCATION "/submit.php?project=HDF5.1.8")
else (CDASH_LOCAL)
set (CTEST_DROP_SITE "cdash.hdfgroup.uiuc.edu")
set (CTEST_DROP_LOCATION "/submit.php?project=HDF518")
endif (CDASH_LOCAL)
set (CTEST_DROP_SITE_CDASH TRUE)
SET (UPDATE_TYPE svn)
SET (VALGRIND_COMMAND "/usr/bin/valgrind")
SET (VALGRIND_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
set (UPDATE_TYPE svn)
set (VALGRIND_COMMAND "/usr/bin/valgrind")
set (VALGRIND_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
set (CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
set (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
SET (CTEST_TEST_TIMEOUT 3600 CACHE STRING
set (CTEST_TEST_TIMEOUT 1200 CACHE STRING
"Maximum time allowed before CTest will kill the test.")
SET (DART_TESTING_TIMEOUT 3600 CACHE STRING
set (DART_TESTING_TIMEOUT 1200 CACHE STRING
"Maximum time allowed before CTest will kill the test." FORCE)
SET(CTEST_SUBMIT_RETRY_DELAY 20 CACHE STRING

1035
MANIFEST

File diff suppressed because it is too large Load Diff

View File

@@ -73,8 +73,8 @@ else
endif
SUBDIRS = src test $(TESTPARALLEL_DIR) tools . $(CXX_DIR) $(FORTRAN_DIR) \
$(HDF5_HL_DIR) perform
DIST_SUBDIRS = src test testpar tools . c++ fortran hl perform examples
$(HDF5_HL_DIR)
DIST_SUBDIRS = src test testpar tools . c++ fortran hl examples
# Some files generated during configure that should be cleaned
DISTCLEANFILES=config/stamp1 config/stamp2
@@ -87,31 +87,23 @@ CHECK_CLEANFILES+=*-tmp
test _test: check
lib progs check-p check-s:
@@SETX@; for d in $(SUBDIRS); do \
for d in $(SUBDIRS); do \
if test $$d != .; then \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
# Make all, tests, and (un)install also recurse into perform directory
all-local:
@cd perform && $(MAKE) $(AM_MAKEFLAGS) all
# Make all, tests, and (un)install
tests:
@@SETX@; for d in $(SUBDIRS) perform; do \
for d in $(SUBDIRS); do \
if test $$d != .; then \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
install-exec-local:
@cd perform && $(MAKE) $(AM_MAKEFLAGS) install
uninstall-local:
@cd perform && $(MAKE) $(AM_MAKEFLAGS) uninstall
# Check-clean also recurses into examples directory
check-clean:
@@SETX@; for d in $(SUBDIRS) examples perform; do \
for d in $(SUBDIRS) examples; do \
if test $$d != .; then \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
@@ -138,7 +130,7 @@ uninstall-all:
# Install examples in this directory and recursively
install-examples uninstall-examples:
@@SETX@; for d in examples $(HDF5_INTERFACES) $(HL); do \
for d in examples $(HDF5_INTERFACES) $(HL); do \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
done
@@ -185,7 +177,7 @@ trace:
# Run tests with different Virtual File Drivers.
# Currently, only invoke check-vfd in the test directory.
check-vfd:
@@SETX@; for d in src test; do \
for d in src test; do \
if test $$d != .; then \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
@@ -201,4 +193,4 @@ check-vfd:
$(top_builddir)/config.status:
# Don't include conclude.am in root Makefile; tests target needs to
# recurse into perform directory as well as reguar subdirs.
# recurse into reguar subdirs.

View File

@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.12.3 from Makefile.am.
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -47,23 +47,51 @@
$(MAKE) all
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
test $$am__dry = yes; \
}
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -82,18 +110,19 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/bin/config.guess \
$(top_srcdir)/bin/config.sub $(top_srcdir)/bin/install-sh \
$(top_srcdir)/bin/ltmain.sh $(top_srcdir)/bin/missing \
$(top_srcdir)/bin/mkinstalldirs \
$(top_srcdir)/config/commence.am $(top_srcdir)/configure \
COPYING bin/COPYING bin/compile bin/config.guess \
bin/config.sub bin/depcomp bin/install-sh bin/ltmain.sh \
bin/missing bin/mkinstalldirs
DIST_COMMON = $(top_srcdir)/config/commence.am $(srcdir)/Makefile.in \
$(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(top_srcdir)/bin/mkinstalldirs COPYING \
bin/COPYING bin/compile bin/config.guess bin/config.sub \
bin/depcomp bin/install-sh bin/missing bin/mkinstalldirs \
bin/ltmain.sh $(top_srcdir)/bin/compile \
$(top_srcdir)/bin/config.guess $(top_srcdir)/bin/config.sub \
$(top_srcdir)/bin/install-sh $(top_srcdir)/bin/ltmain.sh \
$(top_srcdir)/bin/missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
$(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -116,13 +145,14 @@ am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -130,9 +160,29 @@ am__can_run_installinfo = \
esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
@@ -195,7 +245,6 @@ AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -227,7 +276,6 @@ DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
DYNAMIC_DIRS = @DYNAMIC_DIRS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -246,14 +294,11 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GPFS = @GPFS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
H5_CXX_SHARED = @H5_CXX_SHARED@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -262,6 +307,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -279,7 +325,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
LARGEFILE = @LARGEFILE@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -295,7 +340,6 @@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
MPI_GET_SIZE = @MPI_GET_SIZE@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@@ -313,7 +357,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -322,7 +365,6 @@ R_INTEGER = @R_INTEGER@
R_LARGE = @R_LARGE@
SEARCH = @SEARCH@
SED = @SED@
SETX = @SETX@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIZE_T = @SIZE_T@
@@ -337,10 +379,6 @@ TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@
USE_FILTER_NBIT = @USE_FILTER_NBIT@
USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@
USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
VERSION = @VERSION@
@@ -454,10 +492,10 @@ TRACE = perl $(top_srcdir)/bin/trace
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
# *.clog are from the MPE option.
# *.clog and *.clog2 are from the MPE option.
# Some files/directories generated during check that should be cleaned
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *-tmp
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *-tmp
@BUILD_PARALLEL_CONDITIONAL_FALSE@TESTPARALLEL_DIR =
# Define subdirectories to build.
@@ -478,9 +516,9 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *-tmp
@BUILD_HDF5_HL_CONDITIONAL_FALSE@HDF5_HL_DIR =
@BUILD_HDF5_HL_CONDITIONAL_TRUE@HDF5_HL_DIR = hl
SUBDIRS = src test $(TESTPARALLEL_DIR) tools . $(CXX_DIR) $(FORTRAN_DIR) \
$(HDF5_HL_DIR) perform
$(HDF5_HL_DIR)
DIST_SUBDIRS = src test testpar tools . c++ fortran hl perform examples
DIST_SUBDIRS = src test testpar tools . c++ fortran hl examples
# Some files generated during configure that should be cleaned
DISTCLEANFILES = config/stamp1 config/stamp2
@@ -535,14 +573,13 @@ distclean-libtool:
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
@@ -563,31 +600,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
cscopelist-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -603,12 +622,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -620,15 +634,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -637,18 +647,16 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
clean-cscope:
-rm -f cscope.files
cscope.files: clean-cscope cscopelist
cscopelist: cscopelist-recursive
cscope.files: clean-cscope cscopelist-recursive cscopelist
cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP)'; \
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
@@ -746,10 +754,16 @@ dist-xz: distdir
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
@@ -791,9 +805,10 @@ distcheck: dist
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
&& ../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@@ -848,7 +863,7 @@ distcleancheck: distclean
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile all-local
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install-exec: install-exec-recursive
@@ -908,7 +923,7 @@ install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am: install-exec-local
install-exec-am:
install-html: install-html-recursive
@@ -949,29 +964,26 @@ ps: ps-recursive
ps-am:
uninstall-am: uninstall-local
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
cscopelist-recursive ctags-recursive install-am install-strip \
tags-recursive
.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am all-local am--refresh check check-am clean \
clean-cscope clean-generic clean-libtool cscope cscopelist \
cscopelist-recursive ctags ctags-recursive dist dist-all \
dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz \
dist-zip distcheck distclean distclean-generic \
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
dist-xz dist-zip distcheck distclean distclean-generic \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-exec-local \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installcheck-local installdirs installdirs-am maintainer-clean \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installcheck-local \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am tags \
tags-recursive uninstall uninstall-am uninstall-local
tags-am uninstall uninstall-am
# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
@@ -990,31 +1002,23 @@ help:
test _test: check
lib progs check-p check-s:
@@SETX@; for d in $(SUBDIRS); do \
for d in $(SUBDIRS); do \
if test $$d != .; then \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
# Make all, tests, and (un)install also recurse into perform directory
all-local:
@cd perform && $(MAKE) $(AM_MAKEFLAGS) all
# Make all, tests, and (un)install
tests:
@@SETX@; for d in $(SUBDIRS) perform; do \
for d in $(SUBDIRS); do \
if test $$d != .; then \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
install-exec-local:
@cd perform && $(MAKE) $(AM_MAKEFLAGS) install
uninstall-local:
@cd perform && $(MAKE) $(AM_MAKEFLAGS) uninstall
# Check-clean also recurses into examples directory
check-clean:
@@SETX@; for d in $(SUBDIRS) examples perform; do \
for d in $(SUBDIRS) examples; do \
if test $$d != .; then \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
@@ -1041,7 +1045,7 @@ uninstall-all:
# Install examples in this directory and recursively
install-examples uninstall-examples:
@@SETX@; for d in examples $(HDF5_INTERFACES) $(HL); do \
for d in examples $(HDF5_INTERFACES) $(HL); do \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
done
@@ -1088,7 +1092,7 @@ trace:
# Run tests with different Virtual File Drivers.
# Currently, only invoke check-vfd in the test directory.
check-vfd:
@@SETX@; for d in src test; do \
for d in src test; do \
if test $$d != .; then \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
@@ -1104,7 +1108,7 @@ check-vfd:
$(top_builddir)/config.status:
# Don't include conclude.am in root Makefile; tests target needs to
# recurse into perform directory as well as reguar subdirs.
# recurse into reguar subdirs.
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@@ -1,4 +1,4 @@
HDF5 version 1.8.10-snap14 currently under development
HDF5 version 1.8.15-snap14 currently under development
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------
@@ -21,15 +21,12 @@ The following mailing lists are currently set up for HDF5 Library users:
hdf-forum - For general discussion of the HDF5 library with
other users.
hdf5dev - For discussion of the HDF5 library development
with developers and other interested parties.
To subscribe to a list, send mail to "<list>-subscribe@hdfgroup.org".
To subscribe to a list, send mail to "<list>-subscribe@lists.hdfgroup.org".
where <list> is the name of the list. For example, send a request
to subscribe to the 'news' mail list to the following address:
news-subscribe@hdfgroup.org
news-subscribe@lists.hdfgroup.org
Messages sent to the list should be addressed to "<list>@hdfgroup.org".
Messages sent to the list should be addressed to "<list>@lists.hdfgroup.org".
Periodic code snapshots are provided at the following URL:
ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/hdf5/snapshots

22
UserMacros.cmake Normal file
View File

@@ -0,0 +1,22 @@
########################################################
# Include file for user options
########################################################
#-----------------------------------------------------------------------------
#------------------- E X A M P L E B E G I N--------------------------------
#-----------------------------------------------------------------------------
# Option to Build with User Defined Values
#-----------------------------------------------------------------------------
MACRO (MACRO_USER_DEFINED_LIBS)
set (USER_DEFINED_VALUE "FALSE")
ENDMACRO (MACRO_USER_DEFINED_LIBS)
#-------------------------------------------------------------------------------
option (BUILD_USER_DEFINED_LIBS "Build With User Defined Values" OFF)
if (BUILD_USER_DEFINED_LIBS)
MACRO_USER_DEFINED_LIBS ()
endif (BUILD_USER_DEFINED_LIBS)
#-----------------------------------------------------------------------------
#------------------- E X A M P L E E N D -----------------------------------
#-----------------------------------------------------------------------------

355
aclocal.m4 vendored
View File

@@ -1,6 +1,6 @@
# generated automatically by aclocal 1.12.3 -*- Autoconf -*-
# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,7 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
@@ -19,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -31,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.12'
[am__api_version='1.14'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.12.3], [],
m4_if([$1], [1.14.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -50,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.12.3])dnl
[AM_AUTOMAKE_VERSION([1.14.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -110,7 +111,7 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2012 Free Software Foundation, Inc.
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -141,7 +142,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -332,7 +333,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -343,7 +344,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
# Autoconf 2.62 quotes --file arguments for eval, but not when files
# Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
@@ -372,7 +373,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
@@ -408,7 +409,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -417,6 +418,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
m4_define([AC_PROG_CC],
m4_defn([AC_PROG_CC])
[_AM_PROG_CC_C_O
])
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
@@ -429,7 +436,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.62])dnl
[AC_PREREQ([2.65])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -459,8 +466,7 @@ AC_SUBST([CYGPATH_W])
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[AC_DIAGNOSE([obsolete],
[$0: two- and three-arguments forms are deprecated. For more info, see:
http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
[$0: two- and three-arguments forms are deprecated.])
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
@@ -514,22 +520,60 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
[_AM_DEPENDENCIES([OBJC])],
[m4_define([AC_PROG_OBJC],
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
dnl Support for Objective C++ was only introduced in Autoconf 2.65,
dnl but we still cater to Autoconf 2.62.
m4_ifdef([AC_PROG_OBJCXX],
[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[_AM_DEPENDENCIES([OBJCXX])],
[m4_define([AC_PROG_OBJCXX],
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_REQUIRE([AM_SILENT_RULES])dnl
dnl The testsuite driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
# recipes. So use an aggressive probe to check that the usage we want is
# actually supported "in the wild" to an acceptable degree.
# See automake bug#10828.
# To make any issue more visible, cause the running configure to be aborted
# by default if the 'rm' program in use doesn't match our expectations; the
# user can still override this though.
if rm -f && rm -fr && rm -rf; then : OK; else
cat >&2 <<'END'
Oops!
Your 'rm' program seems unable to run without file operands specified
on the command line, even when the '-f' option is present. This is contrary
to the behaviour of most rm programs out there, and not conforming with
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
Please tell bug-automake@gnu.org about your system, including the value
of your $PATH and any error possibly output before this message. This
can help us improve future automake versions.
END
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
echo 'Configuration will proceed anyway, since you have set the' >&2
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
echo >&2
else
cat >&2 <<'END'
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: <http://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.
END
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
fi
fi])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
@@ -537,7 +581,6 @@ dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
@@ -559,7 +602,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -580,7 +623,7 @@ if test x"${install_sh}" != xset; then
fi
AC_SUBST([install_sh])])
# Copyright (C) 2003-2012 Free Software Foundation, Inc.
# Copyright (C) 2003-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -602,7 +645,7 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -635,11 +678,9 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
]
)
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -689,7 +730,7 @@ rm -f confinc confmf
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2012 Free Software Foundation, Inc.
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -704,8 +745,8 @@ AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
# Define MISSING if not defined so far and test if it is modern enough.
# If it is, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
@@ -718,8 +759,8 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
if eval "$MISSING --is-lightweight"; then
am_missing_run="$MISSING "
else
am_missing_run=
AC_MSG_WARN(['missing' script is too old or missing])
@@ -728,7 +769,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -757,9 +798,73 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_PROG_CC_C_O
# ---------------
# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
# to automatically call this.
AC_DEFUN([_AM_PROG_CC_C_O],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([compile])dnl
AC_LANG_PUSH([C])dnl
AC_CACHE_CHECK(
[whether $CC understands -c and -o together],
[am_cv_prog_cc_c_o],
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
# Make sure it works both with $CC and with simple cc.
# Following AC_PROG_CC_C_O, we do the test twice because some
# compilers refuse to overwrite an existing .o file with -o,
# though they will create one.
am_cv_prog_cc_c_o=yes
for am_i in 1 2; do
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
&& test -f conftest2.$ac_objext; then
: OK
else
am_cv_prog_cc_c_o=no
break
fi
done
rm -f core conftest*
unset am_i])
if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
# A longer-term fix would be to have automake use am__CC in this case,
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC="$am_aux_dir/compile $CC"
fi
AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_RUN_LOG(COMMAND)
# -------------------
# Run COMMAND, save the exit status in ac_status, and log it.
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
AC_DEFUN([AM_RUN_LOG],
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
(exit $ac_status); }])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -840,7 +945,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -900,7 +1005,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -928,7 +1033,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2012 Free Software Foundation, Inc.
# Copyright (C) 2006-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -947,7 +1052,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2012 Free Software Foundation, Inc.
# Copyright (C) 2004-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -966,80 +1071,120 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
#
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7],
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Loop over all known methods to create a tar archive until one works.
# We'll loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
# Solaris sh will not grok spaces in the rhs of '-'.
for _am_tool in $_am_tools
do
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar;
do
AM_RUN_LOG([$_am_tar --version]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
(tar --version) >/dev/null 2>&1 && continue
am__tar='tar chf - "$$tardir"'
am__tar_='tar chf - "$tardir"'
am__untar='tar xf -'
;;
pax)
am__tar='pax -L -x $1 -w "$$tardir"'
am__tar_='pax -L -x $1 -w "$tardir"'
am__untar='pax -r'
;;
cpio)
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
am__untar='cpio -i -H $1 -d'
;;
none)
am__tar=false
am__tar_=false
am__untar=false
;;
esac
# If the value was cached, stop now. We just wanted to have am__tar
# and am__untar set.
test -n "${am_cv_prog_tar_$1}" && break
m4_if([$1], [v7],
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
# tar/untar a dummy directory, and stop if the command works
[m4_case([$1],
[ustar],
[# The POSIX 1988 'ustar' format is defined with fixed-size fields.
# There is notably a 21 bits limit for the UID and the GID. In fact,
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
# and bug#13588).
am_max_uid=2097151 # 2^21 - 1
am_max_gid=$am_max_uid
# The $UID and $GID variables are not portable, so we need to resort
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls
# below are definitely unexpected, so allow the users to see them
# (that is, avoid stderr redirection).
am_uid=`id -u || echo unknown`
am_gid=`id -g || echo unknown`
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
if test $am_uid -le $am_max_uid; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
_am_tools=none
fi
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
if test $am_gid -le $am_max_gid; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
_am_tools=none
fi],
[pax],
[],
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Go ahead even if we have the value already cached. We do so because we
# need to set the values for the 'am__tar' and 'am__untar' variables.
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
for _am_tool in $_am_tools; do
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar; do
AM_RUN_LOG([$_am_tar --version]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
(tar --version) >/dev/null 2>&1 && continue
am__tar='tar chf - "$$tardir"'
am__tar_='tar chf - "$tardir"'
am__untar='tar xf -'
;;
pax)
am__tar='pax -L -x $1 -w "$$tardir"'
am__tar_='pax -L -x $1 -w "$tardir"'
am__untar='pax -r'
;;
cpio)
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
am__untar='cpio -i -H $1 -d'
;;
none)
am__tar=false
am__tar_=false
am__untar=false
;;
esac
# If the value was cached, stop now. We just wanted to have am__tar
# and am__untar set.
test -n "${am_cv_prog_tar_$1}" && break
# tar/untar a dummy directory, and stop if the command works.
rm -rf conftest.dir
mkdir conftest.dir
echo GrepMe > conftest.dir/file
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
rm -rf conftest.dir
if test -s conftest.tar; then
AM_RUN_LOG([$am__untar <conftest.tar])
AM_RUN_LOG([cat conftest.dir/file])
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
fi
done
rm -rf conftest.dir
mkdir conftest.dir
echo GrepMe > conftest.dir/file
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
rm -rf conftest.dir
if test -s conftest.tar; then
AM_RUN_LOG([$am__untar <conftest.tar])
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
fi
done
rm -rf conftest.dir
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/aclocal_cxx.m4])
m4_include([m4/aclocal_fc.m4])
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,

View File

@@ -0,0 +1,180 @@
#! /bin/sh
# (Use -e to abort at any unexpected error.)
# Submit daily tests of HDF5 base software
# Usauge: DailyHDFTests [-r<version>]
# Example: DailyHDFTests # test the CVS current version
# DailyHDFTests -r1.2 # test version 1.2
# DailyHDFTests -r1.4 # test version 1.4
# This script assumes we are building binaries for a release in
# a directory named $HOME/snapshots-bin-${sw}${SWVERSTR}, i.e.
# /home/hdftest/snapshots-bin-hdf5_1_8_14 for the HDF5 v1.8.14 release.
# This script should be run from the $HOME/snapshots-bin-${sw}${SWVERSTR}
# directory with the command
# "sh current/bin/build_and_package_hdf5_binaries.sh -r<version> -b<path to package dir>"
# general setup
PROGRAMNAME=`basename $0`
DEBUGMODE="" # change to -debug for debug mode
# Setup
HOSTNAME=`hostname | cut -f1 -d.` # no domain part
TODAY=`date +%m%d%a`
SW=HDF5 # Name of Software.
sw=hdf5 # Name of Software in lower cases.
SWVER= # Software version, default to current CVS version.
SWVERSTR= # Software version string.
TITLE="${SW} Tests on $TODAY"
errcode=0 # error code so far
# Parse command options
while [ $# -gt 0 ]; do
case "$1" in
-r*)
SWVER="$1"
SWVERSTR=_`echo $SWVER | sed -e s/-r// -e s/\\\./_/g`
;;
-debug*)
DEBUGMODE="$1"
;;
-b*)
BINARYDIR=`echo $1 | sed -e s/-b//`
;;
*)
echo "Unknown option ($1)"
exit 1
;;
esac
shift
done
# Mail addresses for reports
# TOWHOM_PASSED--normal report
# TOWHOM_FAILED--Failure Report
# If in debug mode, email output to myself; else to the "group".
if [ -n "$DEBUGMODE" ]; then
echo "******** DEBUGMODE is $DEBUGMODE ************"
# TOWHOM_PASSED=hdftest
# TOWHOM_FAILED=hdftest
TOWHOM_PASSED=lrknox
TOWHOM_FAILED=lrknox
else
# TOWHOM_PASSED="hdf5repo@lists.hdfgroup.org repo-all@lists.hdfgroup.org"
# TOWHOM_FAILED=hdf5lib@lists.hdfgroup.org
# TOWHOM_PASSED=hdftest
# TOWHOM_FAILED=hdftest
TOWHOM_PASSED=lrknox
TOWHOM_FAILED=lrknox
fi
# Setup test directories
LOGDIR=$HOME/snapshots-bin-${sw}${SWVERSTR}/log
LOGDIRLOCK=${LOGDIR}/.lock-${HOSTNAME}
LOGFILE=${LOGDIR}/${PROGRAMNAME}-${HOSTNAME}_${TODAY}
FAILEDLOG=${LOGDIR}/FAILED_LOG_${TODAY}
FAILEDDETAIL=${LOGDIR}/FAILED_DETAIL_${TODAY}
INCOMPLETELOG=${LOGDIR}/INCOMPLETE_LOG_${TODAY}
PASSEDLOG=${LOGDIR}/PASSED_LOG_${TODAY}
SKIPPEDLOG=${LOGDIR}/SKIPPED_LOG_${TODAY}
TIMELOG=${LOGDIR}/TIME_LOG_${TODAY}
TIMEKEEPERLOG=${LOGDIR}/TIMEKEEPER_LOG_${TODAY}
REPORTED=${LOGDIR}/REPORTED_${TODAY}
REPOLOG=${LOGDIR}/REPO_LOG_${TODAY}
REPOLOG_LOCK=${LOGDIR}/REPO_LOG_LOCK_${TODAY}
SNAPSHOTLOG=${LOGDIR}/SNAPSHOT_LOG_${TODAY}
RELEASE_ASAP=${LOGDIR}/../release_asap # make a special release asap
RELEASE_ALWAYS=${LOGDIR}/../release_always # always release
RELEASE_NOT=${LOGDIR}/../release_not # Do not release
RELEASED=${LOGDIR}/RELEASED_${TODAY}
WATCHERFILE=${LOGDIR}/../watchers # List of platform watchers
CMD="bin/runtest $DEBUGMODE ${SWVER}"
# Setup Mailing command and Report title
MAIL=mail
TEST_TITLE="$HOSTNAME ${SW}${SWVERSTR}_Daily_Tests_${TODAY}"
# set up auto-cleanup
trap "rm -f $LOGDIRLOCK" 0
trap "rm -f $LOGDIRLOCK" 1 2 3 4 5 6 7 8 9 10 12 13 14 15
# Clean up LOGDIR by moving all files that are not "of today" to OLD.
# Then go into OLD and move all files older than 7 days to OLDER.
# Then go into OLDer and remove all files older than 30 days.
# This procedure keeps old logfiles in two tiers. The first tier is OLD
# which should be in AFS space so that the files are available to most hosts.
# The second tier is OLDER which could be in HDF's own NFS space which has
# much bigger capacity but not as widely available.
# Do all these in a sub-shell with -e to abort the cleaning if any error is
# encountered.
(set -e
nold=6
nolder=31
echo cleaning $LOGDIR by moving all old logfiles to OLD
cd $LOGDIR
test -d OLD/. || mkdir OLD
#find . \( -name OLD -prune \) \
# -o -type f ! -name '*'$TODAY'*' -exec mv '{}' OLD/. \;
echo cleaning $LOGDIR/OLD by moving all files older than $nold days to OLDER
cd OLD
test -d OLDER/. || mkdir OLDER
find . \( -name OLDER -prune \) \
-o -type f -mtime +$nold -exec mv '{}' OLDER/. \;
echo cleaning $LOGDIR/OLDER by removing all files older than $nolder days.
cd OLDER
find . -type f -mtime +$nolder -exec rm -f '{}' \;
if [ -f $LOGFILE ]; then
if [ -n "$DEBUGMODE" ]; then
echo "$LOGFILE exists. No more daily tests today"
fi
exit 1
fi
)
#(cd $HOME/snapshots-bin-${sw}${SWVERSTR}; touch $REPOLOG; $CMD -nodiff -norepo -all) > $LOGFILE 2>&1
# Verify test script did complete by checking the last lines
#(tail -4 $LOGFILE | grep -s "^*** finished .* in $HOSTNAME ***" > /dev/null 2>&1) ||
# (echo "****snaptest launcher FAILED to complete in $HOSTNAME****" >> $FAILEDLOG)
#CURRENT_DIR=`pwd`
#cd $HOME/snapshots-bin-${sw}${SWVERSTR}/current
#pwd
#SVN_URL=`svn info | grep URL`
#BRANCHNAME=`echo $SVN_URL | sed -e 's/URL:.*\///' | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
#REVISION=`svn info | grep Revision`
#LAST_INFO=`svn info | grep "Last Changed"`
#TEST_TITLE="$HOSTNAME ${BRANCHNAME}${SWVERSTR}_Daily_Tests_${TODAY}"
#TITLE="${BRANCHNAME} Tests on $TODAY"
#cd $CURRENT_DIR
# Check result
if [ -f $FAILEDLOG ]; then
errcode=1
elif [ -f $INCOMPLETELOG ]; then
errcode=1
echo "Not all builds were completed!"
fi
if [ $errcode -eq 0 ]; then
DEPLOYDIR=`grep "deploydir \/mnt" ./snaptest.cfg | sed "s/^.*deploydir //"`
echo "Make binary tar files from deployed files in $DEPLOYDIR in $BINARYDIR"
CURRENT_DIR=`pwd`
cd current/bin;perl ./make1814TarFiles.pl $DEPLOYDIR $BINARYDIR
cd $CURRENT_DIR
else
echo "errcode was $errcode; no tar files were created."
fi
# remove lock
rm -f $LOGDIRLOCK
# test binaries on 3 linux binary test machines.
# final exit
exit $errcode

View File

@@ -159,19 +159,6 @@ LOCATE_SZLIB()
HP-UX)
szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/HPUX-11.00"
;;
IRIX)
szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/IRIX64-6.5-32bit"
;;
IRIX64)
case "$CC" in
*-n32)
szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/IRIX64-6.5-32bit"
;;
*)
szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/IRIX64-6.5"
;;
esac
;;
Linux)
case `uname -m` in
i686)

View File

@@ -17,33 +17,51 @@ require 5.003;
# Purpose: insures that API functions aren't called internally.
# Usage: checkapi H5*.c
my $comment = 0;
while (<>) {
my $filename = "";
my $lastname = "";
# Remove comments within the line.
s/\/\*.*?\*\///g;
if(<>) {
while (<>) {
if($ARGV =~ /\//) {
($filename) = ($ARGV =~ /^.*\/([A-Za-z0-9_]*)\.c$/);
} else {
($filename) = ($ARGV =~ /([A-Za-z0-9_]*)\.c$/);
}
# Process comment begin and end tokens on this line.
$comment-- if /\*\//; # count comment ends
next if $comment; # skip line if in comment
$comment++ if /\/\*/; # count comment starts
s/(.*)\/\*.*/$1/; # remove comments that begin on this line
if($filename =~ /H5FDmulti|H5FDstdio/) {
if($filename ne $lastname) {
print "$ARGV is exempt from checking\n";
$lastname = $filename;
}
} else {
# Get rid of comments by removing the inside part.
s|/\*.*?\*/||g;
if ($in_comment) {
if (/\*\//) {
s|.*?\*/||;
$in_comment = 0;
} else {
$_="\n";
}
} elsif (m|/\*|) {
s|/\*.*||;
$in_comment = 1;
}
# Remove character strings
s/\\.//g; # remove escaped characters
s/\".*?\"//g; # remove string constants
# Remove character strings
s/\\.//g; # remove escaped characters
s/\".*?\"//g; # remove string constants
# Disregard the following hits
next if /^H5/;
next if /^\#/;
next if /FUNC_ENTER(_NOINIT)*/;
# Disregard the following hits
next if /^H5/;
next if /^\#/;
next if /FUNC_ENTER(_NOINIT)*/;
next unless /(H5[A-Z]{1,2}[a-z]\w*)/;
print "$ARGV:$.: $1\n";
} continue {
if (eof) {
print "$ARGV:$.: bad comment nesting\n" if $comment;
$comment = 0;
close ARGV; # reset line number
}
next unless /(H5[A-Z]{1,2}[a-z]\w*)/;
print "$ARGV:$.: $1\n";
}
} continue {
close ARGV if eof; # reset line number
}
}

View File

@@ -1,4 +1,4 @@
#!/usr/local/bin/perl -w
#!/usr/bin/perl -w
require 5.003;
#
@@ -27,60 +27,89 @@ require 5.003;
# use `next-error' (usually bound to M-`) to find each name
# violation.
while (<>) {
if(<>) {
if($ARGV =~ /\//) {
($filename) = ($ARGV =~ /^.*\/([A-Za-z0-9_]*)\.c$/);
} else {
($filename) = ($ARGV =~ /([A-Za-z0-9_]*)\.c$/);
}
# Get rid of comments by removing the inside part.
s|/\*.*?\*/||g;
if ($in_comment) {
if (/\*\//) {
s|.*?\*/||;
$in_comment = 0;
} else {
$_="\n";
}
} elsif (m|/\*|) {
s|/\*.*||;
$in_comment = 1;
}
if($filename =~ /H5FDmulti|H5FDstdio/) {
print "$ARGV is exempt from using Standard library macro wrappers\n";
} else {
while (<>) {
# Get rid of string constants if they begin and end on this line.
s/([\'\"])([^\1]|\\\1)*?\1/$1$1/g;
# Get rid of comments by removing the inside part.
s|/\*.*?\*/||g;
if ($in_comment) {
if (/\*\//) {
s|.*?\*/||;
$in_comment = 0;
} else {
$_="\n";
}
} elsif (m|/\*|) {
s|/\*.*||;
$in_comment = 1;
}
# Get rid of preprocessor directives
s/^\#.*//;
# Get rid of string constants if they begin and end on this line.
s/([\'\"])([^\1]|\\\1)*?\1/$1$1/g;
# Now find all function calls on this line
while (($name)=/\b([a-gi-z_A-GI-Z]\w*)\s*\(/) {
$_ = $';
# Ignore C statements that look sort of like function
# calls.
next if $name =~ /^(if|for|return|sizeof|switch|while|void)$/;
# Get rid of preprocessor directives
s/^\#.*//;
# Ignore things that get misdetected because of the simplified
# parsing that takes place here.
next if $name =~ /^int$/;
# Skip callbacks invoked as methods in a struct
next if $_ =~ /\b(\)?->|\.)\(?([a-z_A-Z]\w*)\s*\(/;
# These are really HDF5 functions/macros even though they don't
# start with `h' or `H'.
next if $name =~ /^FUNC_(ENTER|LEAVE)(_INIT)?$/;
next if $name =~ /^U?INT(8|16|32|64)(ENCODE|DECODE)$/;
next if $name =~ /^(MIN3?|MAX3?|NELMTS|BOUND|CONSTR)$/;
next if $name =~ /^IS_H5FD_MPIO$/;
next if $name =~ /^addr_defined$/;
# Now find all function calls on this line which don't start with 'H'
while (($name)=/\b([a-z_A-GI-Z]\w*)\s*\(/) {
$_ = $';
# Ignore C statements that look sort of like function
# calls.
next if $name =~ /^(if|for|offsetof|return|sizeof|switch|while|void)$/;
# These functions/macros are exempt.
next if $name =~ /^(assert|main|[fs]?printf|va_(start|arg|end))$/;
# Ignore things that get misdetected because of the simplified
# parsing that takes place here.
next if $name =~ /^(int|herr_t|_term_interface)$/;
# These are MPI function calls. Ignore them.
next if $name =~ /^MPI_/;
# These are really HDF5 functions/macros even though they don't
# start with `h' or `H'.
next if $name =~ /^FUNC_(ENTER|LEAVE)(_(NO)?API|_PACKAGE|_STATIC)?(_NOFS|_NOCLEAR|_NOINIT)?(_NOFUNC|_TAG)?$/;
next if $name =~ /^(BEGIN|END)_FUNC$/;
next if $name =~ /^U?INT(8|16|32|64)(ENCODE|DECODE)(_VAR)?$/;
next if $name =~ /^CI_(PRINT_STATS|INC_SRC|INC_DST)$/;
next if $name =~ /^(ABS|ADDR_OVERFLOW|ALL_MEMBERS|BOUND|CONSTR|DETECT_[I|F|M]|DOWN)$/;
next if $name =~ /^(MIN3?|MAX3?|NELMTS|POWER_OF_TWO|REGION_OVERFLOW)$/;
next if $name =~ /^(UNIQUE_MEMBERS)$/;
next if $name =~ /^addr_defined$/;
# These are POSIX threads function calls. Ignore them.
next if $name =~ /^pthread_/;
# These functions/macros are exempt.
next if $name =~ /^(main|[fs]?printf|va_(start|arg|end))$/;
print "$ARGV:$.: $name\n";
}
# These are Windows system calls. Ignore them.
next if $name =~ /^(_get_osfhandle|GetFileInformationByHandle|SetFilePointer|GetLastError|SetEndOfFile)$/;
next if $name =~ /^(FindNextFile|FindClose|_tzset|Wgettimeofday|GetSystemTimeAsFileTime|Wgetlogin|GetUserName)$/;
} continue {
close ARGV if eof;
# These are MPI function calls. Ignore them.
next if $name =~ /^(MPI_|MPE_)/;
# These are POSIX threads function calls. Ignore them.
next if $name =~ /^pthread_/;
# These are Windows threads function calls. Ignore them.
next if $name =~ /^(_beginthread|(Initialize|Enter|Leave)CriticalSection|TlsAlloc)$/;
# These are zlib & szlib function calls. Ignore them.
next if $name =~ /^(inflate|SZ_)/;
next if $name =~ /^compress2$/;
print "$ARGV:$.: $name\n";
}
} continue {
close ARGV if eof; # reset line number
}
}
}

View File

@@ -20,75 +20,17 @@
verbose=yes
MANIFEST=/tmp/HD_MANIFEST.$$
SVNENTRY=/tmp/HD_SVNENTRY.$$
# function definitions
GETSVNENTRIES_13 ()
# Purpose: Extract filenames from the svn v1.3.* entries file
# $1: directory name in which the svn entries is.
# steps:
# 1. remove all single line entries so that step 2 does not fail on them.
# 2. merge all multiple lines entries into single lines.
# 3. remove all non file entries.
# 4. insert a blank line because some entries files has no kind="file"
# entry and ed does not like to do g on an empty file.
# 5. remove everything except the file name.
# 6. remove all blank lines, including the inserted one.
{
cp $1/entries $SVNENTRY
chmod u+w $SVNENTRY # entries file is not writable.
ed - $SVNENTRY <<EOF
g/^<.*>$/d
g/^</.,/>$/j
v/kind="file"/d
a
.
g/.*name="/s///
g/".*/s///
g/^$/d
w
q
EOF
cat $SVNENTRY
rm $SVNENTRY
}
GETSVNENTRIES_14 ()
# Purpose: Extract filenames from the svn v1.4.* entries file
# $1: directory name in which the svn entries is.
# steps:
# 1. all valid files are followed by a line containing "file" only.
# 2. find them by looking for "file" first, then mark its preceding line as
# wanted.
# 3. remove all non-marked line.
# 4. insert a blank line because some entries files has no kind="file"
# entry and ed does not like to do g on an empty file.
# 5. remove the marks.
{
cp $1/entries $SVNENTRY
chmod u+w $SVNENTRY # entries file is not writable.
ed - $SVNENTRY <<EOF
g/^file$/-s/^/%WANTED%/
v/%WANTED%/d
a
.
g/^%WANTED%/s///
w
q
EOF
cat $SVNENTRY
rm $SVNENTRY
}
# Main
test "$verbose" && echo " Checking MANIFEST..." 1>&2
# clean up $MANIFEST file when exits
trap "rm -f $MANIFEST" 0
# Only split lines on newline, not whitespace
set -f
IFS='
'
# First make sure i am in the directory in which there is an MANIFEST file
# and then do the checking from there. Will try the following,
# current directory, parent directory, the directory this command resides.
@@ -132,36 +74,55 @@ for file in `cat $MANIFEST`; do
fi
done
# Get the list of files under version control and check that they are
# present.
#
# First get a list of all the pending files with svn stat and
# check those.
svn_stat=`svn stat -q`
for file in $svn_stat; do
# Inspect the .svn/entries to figure out what version of svn file entry is
# used.
# The following algorithm is formed via reverse engineering.
# I don't know what the official svn format is if such a specification exists.
# Algorithm:
# If the first line of the file has 'xml version="1.0"' in it, it is created
# by svn 1.3 or older; else if it has '^file$' in it, it is created by svn 1.4.
svn_entry_file=.svn/entries
if head -1 $svn_entry_file | grep 'xml version="1.0"' > /dev/null 2>&1;then
getsvnentries=GETSVNENTRIES_13
elif grep '^file$' $svn_entry_file > /dev/null 2>&1; then
getsvnentries=GETSVNENTRIES_14
else
echo "Unknown svn entries format. Aborted"
exit 1
fi
# Newly added files are not listed by svn ls, which
# we check later.
for svn in `find . -type d -name .svn -print`; do
path=`echo $svn |sed 's/\/.svn//'`
for file in `$getsvnentries $svn`; do
if (grep ^$path/$file$ $MANIFEST >/dev/null); then
:
else
echo "+ $path/$file"
fail=yes
fi
done
# The line listing new files starts with 'A'.
letter=`echo $file | head -c 1`
if [ "$letter" = "A" ]; then
# Convert the seven Subversion status columns to './' so it matches
# the manifest file name.
#
# There is a space between the status columns and file name, hence
# the '8' instead of '7'.
path=`echo $file | sed 's/^.\{8\}/\.\//g'`
# Ignore directories
if [ ! -d $path ]; then
if (grep ^$path$ $MANIFEST >/dev/null); then
:
else
echo "- $path"
fail=yes
fi
fi
fi
done
# Next check svn ls, which gets a list of all files that are
# checked in.
svn_ls=`svn ls -R`
for file in $svn_ls; do
path="./${file}"
# Ignore directories
if [ ! -d $path ]; then
if (grep ^$path$ $MANIFEST >/dev/null); then
:
else
echo "+ $path"
fail=yes
fi
fi
done
# Finish up
if [ "X$fail" = "Xyes" ]; then
cat 1>&2 <<EOF
The MANIFEST is out of date. Files marked with a minus sign (-) no

505
bin/cmakehdf5 Executable file
View File

@@ -0,0 +1,505 @@
#! /bin/sh
# Build and Test HDF5 using cmake.
# Author: Allen Byrne
# Albert Cheng
# Creation Date: Nov 2012
# Modified:
# Changed to use the quick steps described in INSTALL_CMake.txt. (AKC 2014/1/1)
# Copyright: The HDF Group, 2012-14
# Debug Print: remove the comment hash if you want DPRINT to do echo
DPRINT=:
#DPRINT=echo
# use the ctest scripting method if --script is given
if [ "$1" != "--script" ]; then
# variable names
# The "extra" number is the step number and easier to see all logfiles in
# the sorted order of steps
progname=`basename $0` # program name
configlog="#${progname}_1config.log"
makelog="#${progname}_2build.log"
testlog="#${progname}_3test.log"
packlog="#${progname}_4pack.log"
installlog="#${progname}_5install.log"
exit_code=0
# This command should be in the source directory's bin/
# and should have invoked as "$srcdir/bin/$progname" or
# "bin/$progname". So, by striping bin/$program from $0,
# we can find $srcdir.
if [ $0 == bin/$progname ]; then
srcdir="." # current directory
else
# $0 is $srdir/bin/$progname
srcdir=`echo $0 | sed -e s%/bin/$progname\$%%`
fi
# Sanity check
if [ ! -r $srcdir/bin/$progname ]; then
echo "encountered error while trying to find srcdir($srdir)"
exit 1
fi
# Cmake build options
cacheinit=$srcdir/config/cmake/cacheinit.cmake
build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=OFF # C++ interface default off
build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=OFF # Fortran interface default off
enable_f2003=-DHDF5_ENABLE_F2003:BOOL=OFF # Fortran2003 interface default off
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=ON # High Level interface default on
build_testing=-DBUILD_TESTING:BOOL=ON # Build tests default on
build_tools=-DHDF5_BUILD_TOOLS:BOOL=ON # Build tools default on
with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT=ON # enable zlib filter default on
with_szlib=-DHDF5_ENABLE_SZIP_SUPPORT=OFF # enables zlib filter default off
#=============
# Function definitions
#=============
# Show user brief help page
HELP_BRIEF()
{
cat << EOF
Usage: $progname [options]
--help: shows details help page
EOF
}
# Show user detail help page
HELP()
{
cat << EOF
Usage: $progname [<options>]
where options are:
--enable-fortran | --disable-fortran:
enable or disable fortran API. Default is off.
--enable-fortran2003 | --disable-fortran2003:
enable or disable fortran2003 API. Default is off.
--enable-cxx | --disable-cxx:
enable or disable c++ API. Default is off.
--enable-hl | --disable-hl:
enable or disable high level API. Default is on.
--enable-tools | --disable-tools:
enable or disable building tools. Default is on.
--enable-testing | --disable-testing:
enable or disable building tests. Default is on.
--with-zlib=INC,LIB | --without-zlib:
Use zlib library for external deflate I/O filter. Default is on.
INC and LIB are the include and lib directories.
--with-szlib=INC,LIB| --without-szlib:
Use szip library for external szip library I/O filter. Default is off.
INC and LIB are the include and lib directories.
--help: shows details help page
EOF
}
# Display a time stamp
TIMESTAMP()
{
echo "=====" "`date`" "====="
}
# Do one step bracketed with time stamps
# The '< /dev/null' is needed to prevent some applications like MPI
# jobs blocked for reading when they read stdin unnecessary.
# $1 is banner message to be displayed.
# $2 is command to run
# $3 is logfile name for saving output from the command
STEP()
{
banner="$1"
command="$2"
logfile="$3"
echo "$banner" with output saved in $logfile
(TIMESTAMP; nerror=0 ;
echo "eval $command"
eval $command || nerror=1 ;
TIMESTAMP; exit $nerror) < /dev/null > "$logfile" 2>&1
if [ $? -ne 0 ]; then
echo "error in '$banner'. $progname aborted."
exit 1
fi
}
#==========
# main
#==========
# Show a start time stamp
TIMESTAMP
# Parse Cmake configure options
# --enable-XXX or --disable-XXX will enable or disable feature XXX.
# XXX can be:
# fortran Fortran interface
# cxx C++ interface
# hl Highlevel interface
# testing Build tests
# tools Build tools
while [ $# -gt 0 ]; do
case "$1" in
--enable-fortran)
build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=ON
;;
--disable-fortran)
build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=OFF
;;
--enable-fortran2003)
enable_f2003=-DHDF5_ENABLE_F2003:BOOL=ON
;;
--disable-fortran2003)
enable_f2003=-DHDF5_ENABLE_F2003:BOOL=OFF
;;
--enable-cxx)
build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=ON
;;
--disable-cxx)
build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=OFF
;;
--enable-hl)
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=ON
;;
--disable-hl)
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=OFF
;;
--enable-tools)
build_tools=-DHDF5_BUILD_TOOLS:BOOL=ON
;;
--disable-tools)
build_tools=-DHDF5_BUILD_TOOLS:BOOL=OFF
;;
--enable-testing)
build_testing=-DBUILD_TESTING:BOOL=ON
;;
--disable-testing)
build_testing=-DBUILD_TESTING:BOOL=OFF
;;
--help)
# print the detail help page and exit
HELP
exit 0
;;
*)
echo "Unknown options: $1"
HELP
exit 1
;;
esac
shift
done
# Always display the brief help page
HELP_BRIEF
# Verify there is a valid hdf5 source directory present
if [ ! -d $srcdir ]; then
echo $srcdir not found. Aborted.
exit 1
fi
# figure out version information
vers=bin/h5vers
if [ ! -x $srcdir/$vers ]; then
echo $srcdir/$vers not found or not executable. Aborted.
exit 1
fi
version=`cd $srcdir; $vers`
if [ $? != 0 ]; then
echo $vers failed. Aborted.
exit 1
fi
echo Running Cmake for HDF5-${version} ...
# 4. Configure the C library, tools and tests with this command:
STEP "Configure..." "cmake \
-C $cacheinit \
$build_cpp_lib \
$build_fortran \
$enable_f2003 \
$build_hl_lib \
$build_testing \
$build_tools \
$with_zlib \
$with_szlib \
$srcdir" $configlog
# 5. Build the C library, tools and tests with this command:
STEP "Build the library, tools and tests, ..." "cmake --build . --config Release" $makelog
# 6. Test the C library and tools with this command:
STEP "Test the library and tools..." "ctest . -C Release" $testlog
# 7. Create an install image with this command:
STEP "Create an install image..." "cpack -C Release CPackConfig.cmake" $packlog
# 8. Install with this command:
STEP "Install..." "./HDF5-${version}-Linux.sh --skip-license" $installlog
# save the last exit code
exit_code=$?
# Show a closing time stamp
TIMESTAMP
exit $exit_code
else
# ---------------
# older version
# ---------------
# variable names
progname=`basename $0` # program name
cminfile="cmakemin.$$" # Cmake minimum file
cfgfile=$progname.$$ # configure file
ctest_log=ctest.log # output of ctest script
install_log=install.log # output of installation
$DPRINT $cfgfile
# Remove temporary generated files if exit 0
trap "rm -f $cminfile $cfgfile" 0
#=============
# Function definitions
#=============
TIMESTAMP()
{
echo "=====" "`date`" "====="
}
#==========
# main
#==========
# Show a start time stamp
TIMESTAMP
# Explain what and where log files are.
cat <<EOF
$ctest_log: output of ctest script.
$install_log: output of installation
Log files will be stored in Testing/Temporary:
LastConfigure_<timestamp>.log: output of configure
LastBuild_<timestamp>.log: output of build
LastTest_<timestamp>.log: output of testing
LastTestsFailed_<timestamp>.log: list of failed tests
EOF
# First generate the two needed input files, the $cimnfile and $cfgfile.
# Then use ctest to use the two input files.
#==========
# create the configure file
#==========
# Create the cmake minimum required file to be used by the following
# configure file. Though not absolute needed, it is better to generate
# this file before the configure file. Quote the EOF to preven substitution
# in the text.
#==========
#==========
cat > $cfgfile <<'EOF'
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
########################################################
# This dashboard is maintained by The HDF Group
# For any comments please contact cdashhelp@hdfgroup.org
#
########################################################
set (CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
set (CTEST_SOURCE_DIRECTORY "../hdf5")
set (CTEST_BINARY_DIRECTORY ".")
set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
set (CTEST_BUILD_CONFIGURATION "Release")
set (CTEST_MAX_N 8)
# -- CDash variables
set (LOCAL_NO_SUBMIT TRUE) # No CDash submit.
set (MODEL "Experimental")
set (CDASH_LOCAL TRUE)
set (SITE_BUILDNAME_SUFFIX "cmakehdf5")
# -- URL set for internal check, default is to not update
set (LOCAL_SKIP_UPDATE TRUE)
set (REPOSITORY_URL "http://svn.${hdfgroup_url}/hdf5/branches/hdf5_1_8")
# -- Standard build options
set (ADD_BUILD_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=${CTEST_BINARY_DIRECTORY} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=\"SVN\" -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
# Use multiple CPU cores to build
include(ProcessorCount)
ProcessorCount(N)
if(NOT N EQUAL 0)
if(N GREATER ${CTEST_MAX_N})
set(N ${CTEST_MAX_N})
endif(N GREATER ${CTEST_MAX_N})
set(CTEST_BUILD_FLAGS -j${N})
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
endif()
# -----------------------------------------------------------
# -- Get environment
# -----------------------------------------------------------
## -- set hostname
## --------------------------
find_program (HOSTNAME_CMD NAMES hostname)
exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
set (CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
find_program (UNAME NAMES uname)
macro (getuname name flag)
exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
endmacro (getuname)
getuname (osname -s)
getuname (osrel -r)
getuname (cpu -m)
if (SITE_BUILDNAME_SUFFIX)
set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}-${SITE_BUILDNAME_SUFFIX}")
else (SITE_BUILDNAME_SUFFIX)
set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
endif (SITE_BUILDNAME_SUFFIX)
# -----------------------------------------------------------
set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
#-----------------------------------------------------------------------------
# MAC machines need special option
#-----------------------------------------------------------------------------
if (APPLE)
# Compiler choice
execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
SET(ENV{CC} "${XCODE_CC}")
SET(ENV{CXX} "${XCODE_CXX}")
# Shared fortran is not supported, build static
set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
endif (APPLE)
# -----------------------------------------------------------
find_package (Subversion)
set (CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
# -- Only clean build folder if LOCAL_CLEAR_BUILD is set
if (LOCAL_CLEAR_BUILD)
set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
endif (LOCAL_CLEAR_BUILD)
#-----------------------------------------------------------------------------
# Send the main script as a note.
list (APPEND CTEST_NOTES_FILES
"${CMAKE_CURRENT_LIST_FILE}"
"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
)
# Check for required variables.
foreach (req
CTEST_CMAKE_GENERATOR
CTEST_SITE
CTEST_BUILD_NAME
)
if (NOT DEFINED ${req})
message(FATAL_ERROR "The containing script must set ${req}")
endif (NOT DEFINED ${req})
endforeach (req)
## -- set output to english
set($ENV{LC_MESSAGES} "en_EN")
#-----------------------------------------------------------------------------
# Initialize the CTEST commands
#------------------------------
set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
set (CTEST_CONFIGURE_COMMAND
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"")
# Print summary information.
foreach (v
CTEST_SITE
CTEST_BUILD_NAME
CTEST_SOURCE_DIRECTORY
CTEST_BINARY_DIRECTORY
CTEST_CMAKE_GENERATOR
CTEST_BUILD_CONFIGURATION
CTEST_CONFIGURE_COMMAND
CTEST_SCRIPT_DIRECTORY
)
set (vars "${vars} ${v}=[${${v}}]\n")
endforeach (v)
message ("Dashboard script configuration:\n${vars}\n")
CTEST_START (${MODEL} TRACK ${MODEL})
if (NOT LOCAL_SKIP_UPDATE)
CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
endif (NOT LOCAL_SKIP_UPDATE)
CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
if(NOT res STREQUAL "0")
message (FATAL_ERROR "Configure FAILED")
endif()
message ("Configure DONE")
CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
if (NOT LOCAL_NO_SUBMIT)
CTEST_SUBMIT (PARTS Update Configure Notes)
endif (NOT LOCAL_NO_SUBMIT)
CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res)
if (NOT LOCAL_NO_SUBMIT)
CTEST_SUBMIT (PARTS Build)
endif (NOT LOCAL_NO_SUBMIT)
if(NOT res STREQUAL "0")
message (FATAL_ERROR "Build FAILED")
endif()
message ("build DONE")
if (NOT LOCAL_SKIP_TEST)
CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
if (NOT LOCAL_NO_SUBMIT)
CTEST_SUBMIT (PARTS Test)
endif (NOT LOCAL_NO_SUBMIT)
if(NOT res STREQUAL "0")
message (FATAL_ERROR "Test FAILED")
endif()
message ("test DONE")
endif (NOT LOCAL_SKIP_TEST)
if(NOT LOCAL_MEMCHECK_TEST)
##-----------------------------------------------
## Package the product
##-----------------------------------------------
execute_process(COMMAND cpack -C ${CTEST_BUILD_CONFIGURATION} -V
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
RESULT_VARIABLE cpackResult
OUTPUT_VARIABLE cpackLog
ERROR_VARIABLE cpackLog.err
)
file(WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
endif(NOT LOCAL_MEMCHECK_TEST)
#-----------------------------------------------------------------------------
message ("DONE")
EOF
# Run ctest
ctest -S $cfgfile -C Release -V -O $ctest_log
exit_code=$?
if [ $exit_code = 0 ]; then
echo CTest script completed without error
else
echo Error encountered CTest script
fi
# Using HDF5-*.sh because actual name is unavailable
install_sh=HDF5-*.sh
echo installing with $install_sh ...
./$install_sh --skip-license > $install_log
exit_code=$?
if [ $exit_code = 0 ]; then
echo Complete without error
else
echo Error encountered
fi
TIMESTAMP
exit $exit_code
fi

8
bin/config.guess vendored
View File

@@ -778,9 +778,9 @@ EOF
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
i*:CYGWIN*:* | x*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
@@ -815,7 +815,7 @@ EOF
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
amd64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
p*:CYGWIN*:*)

96
bin/genltanalyze Executable file
View File

@@ -0,0 +1,96 @@
#!/bin/sh
##
## Copyright by the Board of Trustees of the University of Illinois.
## All rights reserved.
##
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the files COPYING and Copyright.html. COPYING can be found at the root
## of the source code distribution tree; Copyright.html can be found at the
## root level of an installed copy of the electronic HDF5 document set and
## is linked from the top-level documents page. It can also be found at
## http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have
## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
##
# regenerate hl/src/H5LTanalyze.c
# HDF5 currently uses the following versions of the bison flex:
BISON_VERSION="bison (GNU Bison) 2.7"
FLEX_VERSION="flex 2.5.37"
# If paths to bison flex are not specified by the user, assume tools are
# running on jam in /mnt/hdf/packages and set paths accordingly.
if test -z ${BISON}; then
BISON=/usr/hdf/bin/bison
fi
if test -z ${FLEX}; then
FLEX=/usr/hdf/bin/flex
fi
# Check version numbers of all bison flex against the "correct" versions
BI_VERS=`${BISON} --version 2>&1 | grep "^${BISON_VERSION}"`
if test -z "${BI_VERS}"; then
echo "${BISON} version is not ${BISON_VERSION}"
exit 1
fi
FL_VERS=`${FLEX} --version 2>&1 | grep "^${FLEX_VERSION}"`
if test -z "${FL_VERS}"; then
echo "${FLEX} version is not ${FLEX_VERSION}"
exit 1
fi
# Make sure that the tools are in the path.
BISON_DIR=`dirname ${BISON}`
FLEX_DIR=`dirname ${FLEX}`
# Main body
cd hl/src
echo "Generate hl/src/H5LTparse.c from hl/src/H5LTparse.y"
bison -pH5LTyy -o H5LTparse.c -d H5LTparse.y
echo "Generate hl/src/H5LTanalyze.c from hl/src/H5LTanalyze.l"
flex --nounistd -PH5LTyy -oH5LTanalyze.c H5LTanalyze.l
# fix H5LTparse.c to declare H5LTyyparse return type as an hid_t
# instead of int. Currently the generated function H5LTyyparse is
# generated with a return value of type int, which is a mapping to the
# flex yyparse function. The return value in the HL library should be
# an hid_t.
# I propose to not use flex to generate this function, but for now I am
# adding a perl command to find and replace this function declaration in
# H5LTparse.c.
perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' H5LTparse.c
perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' H5LTparse.c
# Add code that disables warnings in the flex/bison-generated code.
#
# Note that the GCC pragmas did not exist until gcc 4.2. Earlier versions
# will simply ignore them, but we want to avoid those warnings.
for f in H5LTparse.c H5LTanalyze.c
do
echo '#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2 ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wconversion" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wmissing-prototypes" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wnested-externs" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wold-style-definition" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wsign-compare" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wsign-conversion" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wstrict-prototypes" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wswitch-default" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wunused-function" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wunused-macros" ' >> tmp.out
echo '#pragma GCC diagnostic ignored "-Wunused-parameter" ' >> tmp.out
echo '#elif defined __SUNPRO_CC ' >> tmp.out
echo '#pragma disable_warn ' >> tmp.out
echo '#elif defined _MSC_VER ' >> tmp.out
echo '#pragma warning(push, 1) ' >> tmp.out
echo '#endif ' >> tmp.out
cat $f >> tmp.out
mv tmp.out $f
done
cd ../..
exit 0

View File

@@ -159,10 +159,10 @@ while ($_ = shift) {
die "mutually exclusive options given\n" if $set && $inc;
# Determine file to use as H5public.h, README.txt,
# release_docs/RELEASE.txt, configure.ac, windows/src/H5pubconf.h,
# vms/src/h5pubconf.h and config/lt_vers.am.
# release_docs/RELEASE.txt, configure.ac, windows/src/H5pubconf.h
# and config/lt_vers.am.
# The README.txt, release_docs/RELEASE.txt, configure.ac,
# vms/src/h5pubconf.h, windows/src/H5pubconf.h, and config/lt_vers.am
# windows/src/H5pubconf.h, and config/lt_vers.am
# files are always in the directory above H5public.h
unless ($file) {
for (@files) {
@@ -187,14 +187,6 @@ die "unable to read file: $RELEASE\n" unless -r $file;
my $CONFIGURE = $file;
$CONFIGURE =~ s/[^\/]*$/..\/configure.ac/;
die "unable to read file: $CONFIGURE\n" unless -r $file;
# windows/src/H5pubconf.h
my $H5PUBCONF = $file;
$H5PUBCONF =~ s/[^\/]*$/..\/windows\/src\/H5pubconf.h/;
die "unable to read file: $H5PUBCONF\n" unless -r $file;
# vms/src/h5pubconf.h
my $H5VMSPUBCONF = $file;
$H5VMSPUBCONF =~ s/[^\/]*$/..\/vms\/src\/h5pubconf.h/;
die "unable to read file: $H5VMSPUBCONF\n" unless -r $file;
# Get the current version number.
open FILE, $file or die "unable to open $file: $!\n";
@@ -242,8 +234,6 @@ if ($set) {
$README = "";
$RELEASE = "";
$CONFIGURE = "";
$H5PUBCONF = "";
$H5VMSPUBCONF = "";
$LT_VERS = "";
@newver = @curver;
}
@@ -392,12 +382,6 @@ sub gen_h5pubconf {
close FILE;
}
# Update the Windows-maintained H5pubconf.h file
gen_h5pubconf("HDF5", $H5PUBCONF, @newver) if $H5PUBCONF;
# Update the VMS-maintained h5pubconf.h file
gen_h5pubconf("HDF5", $H5VMSPUBCONF, @newver) if $H5VMSPUBCONF;
# Print the new version number
if ($verbose) {
printf("version %d.%d release %d%s\n", @newver[0,1,2],

View File

@@ -67,33 +67,6 @@ case "$OSname" in
;;
esac
;;
IRIX)
swpaths="/afs/ncsa/packages/hdf/IRIX_6.5"
;;
IRIX64)
case "$CC" in
cc|"") #default cc
abi=`cc -show_defaults 2>&1 | grep 'default abi'`
case $abi in
*-n32)
swpaths="/afs/ncsa/packages/hdf/IRIX64-n32_6.5"
;;
*-64)
swpaths="/afs/ncsa/packages/hdf/IRIX64_6.5"
;;
*)
swpaths="/afs/ncsa/packages/hdf/IRIX64_6.5"
;;
esac # $abi
;;
*-n32)
swpaths="/afs/ncsa/packages/hdf/IRIX64-n32_6.5"
;;
*)
swpaths="/afs/ncsa/packages/hdf/IRIX64_6.5"
;;
esac
;;
Linux)
swpaths="/afs/ncsa/packages/hdf/Linux"
;;
@@ -150,36 +123,6 @@ case "$OSname" in
;;
esac
;;
IRIX)
swpaths="/afs/ncsa/packages/hdf5/IRIX_6.5"
;;
IRIX64)
case "$CC" in
cc|"") #default cc
abi=`cc -show_defaults 2>&1 | grep 'default abi'`
case $abi in
*-n32)
swpaths="/afs/ncsa/packages/hdf5/IRIX64-n32_6.5"
;;
*-64)
#swpaths="/afs/ncsa/packages/hdf5/IRIX64_6.5"
swpaths="/afs/ncsa/packages/hdf5/5-1.4.3-irix64"
;;
*)
#swpaths="/afs/ncsa/packages/hdf5/IRIX64_6.5"
swpaths="/afs/ncsa/packages/hdf5/5-1.4.3-irix64"
;;
esac # $abi
;;
*-n32)
swpaths="/afs/ncsa/packages/hdf5/IRIX64-n32_6.5"
;;
*)
#swpaths="/afs/ncsa/packages/hdf5/IRIX64_6.5"
swpaths="/afs/ncsa/packages/hdf5/5-1.4.3-irix64"
;;
esac
;;
Linux)
swpaths="/afs/ncsa/packages/hdf5/Linux"
;;

350
bin/make1814TarFiles.pl Executable file
View File

@@ -0,0 +1,350 @@
#!/usr/bin/perl
# makeTarFiles.pl
use warnings;
use strict;
use Cwd;
my %destsubdir = ('duck' => 'mac-lion-x86_64',
'emu' => 'solaris',
'emu64' => 'solaris64',
'freedom' => 'freebsd-amd64',
'jam' => 'linux',
'jamgnu482' => 'linux-gnu482',
'koala' => 'linux-x86_64',
'koalagnu482' => 'linux-x86_64-gnu482',
'loyalty' => 'freebsd',
'ostrich' => 'linux-ppc64',
'ostrichxl' => 'linux-ppc64xl',
'platypus' => 'linux-centos6-x86_64',
'hdf-duck' => 'mac-lion-x86_64',
'kite' => 'mac-mountainlion-x86_64',
'quail' => 'mac-mavericks-x86_64');
#my %destsubdir = ('jam' => 'linux',
# 'jamgnu481' => 'linux-gnu481',
# 'koalagnu481' => 'linux-x86_64-gnu481',
# 'koala' => 'linux-x86_64');
my %szipdir = ('duck' => '/mnt/hdf/packages/szip/shared/encoder/macOS-10.8',
'duck-static' => '/mnt/hdf/packages/szip/static/encoder/mac-intel-x86_64',
'emu' => '/mnt/hdf/packages/szip/shared/encoder/SunOS-5.10',
'emu-static' => '/mnt/hdf/packages/szip/static/encoder/SunOS-5.10',
'emu64' => '/mnt/hdf/packages/szip-PIC/shared/encoder/SunOS-5.11-64',
'emu64-static' => '/mnt/hdf/packages/szip-PIC/shared/encoder/SunOS-5.11-64',
'freedom' => '/mnt/hdf/packages/szip/shared/encoder/FreeBSD-64',
'freedom-static' => '/mnt/hdf/packages/szip/static/encoder/FreeBSD-64',
'hdf-duck' => '/mnt/hdf/packages/szip/shared/encoder/MacOS-10.8',
'hdf-duck-static' => '/mnt/hdf/packages/szip/static/encoder/mac-intel-x86_64',
'jam' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-gcc',
'jamgnu482' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-gcc',
'jam-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-gcc',
'jamgnu482-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-gcc',
'kite' => '/mnt/hdf/packages/szip/shared/encoder/MacOS-10.8',
'kite-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/MacOS-10.8',
'koala' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc',
'koalagnu482' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc',
'koala-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-x86_64-gcc',
'koalagnu482-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-x86_64-gcc',
'jam-new' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-gcc',
'jam-new-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-gcc',
'koala-new' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc',
'koala-new-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-x86_64-gcc',
'loyalty' => '/mnt/hdf/packages/szip/shared/encoder/FreeBSD',
'loyalty-static' => '/mnt/hdf/packages/szip/static/encoder/FreeBSD',
'ostrich32' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc',
'ostrich32-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc-32',
'ostrich' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc-64',
'ostrich-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc',
'ostrichxl' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-ppc64-gcc-64',
'ostrichxl-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-ibmppc64-gcc',
'platypus' => '/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc',
'platypus-static' => '/mnt/hdf/packages/szip/static/encoder/Linux2.6-x86_64-gcc',
'quail' => '/mnt/hdf/packages/szip/shared/encoder/MacOS-10.8',
'quail-static' => '/mnt/hdf/packages/szip-PIC/static/encoder/MacOS-10.8');
my %zlibdir = ('duck' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64',
'duck-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64',
'emu' => '/mnt/hdf/packages/zlib-125/shared/SunOS-5.10',
'emu-static' => '/mnt/hdf/packages/zlib-125/static/SunOS-5.10',
'emu64' => '/mnt/hdf/packages/zlib-123-PIC/SunOS-5.11-64',
'emu64-static' => '/mnt/hdf/packages/zlib-123-PIC/SunOS-5.11-64',
'fred' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64',
'fred-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64',
'freedom' => '/mnt/hdf/packages/zlib-125/shared/FreeBSD-64',
'freedom-static' => '/mnt/hdf/packages/zlib-125/static/FreeBSD-64',
'hdf-duck' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64',
'hdf-duck-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64',
'jam' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-gcc',
'jamgnu482' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-gcc',
'jam-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-gcc',
'jamgnu482-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-gcc',
'kite' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64',
'kite-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64',
'koala' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-x86_64-gcc',
'koalagnu482' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-x86_64-gcc',
'koala-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-x86_64-gcc',
'koalagnu482-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-x86_64-gcc',
'jam-new' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-gcc',
'jam-new-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-gcc',
'koala-new' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-x86_64-gcc',
'koala-new-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-x86_64-gcc',
'loyalty' => '/mnt/hdf/packages/zlib-125/shared/FreeBSD',
'loyalty-static' => '/mnt/hdf/packages/zlib-125/static/FreeBSD',
'ostrich32' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc',
'ostrich32-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc',
'ostrich' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64',
'ostrich-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64',
'ostrichxl' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64',
'ostrichxl-static' => '/mnt/hdf/packages/zlib-125/PIC/Linux2.6-ppc64-gcc-64',
'platypus' => '/mnt/hdf/packages/zlib-125/shared/Linux2.6-x86_64-gcc',
'platypus-static' => '/mnt/hdf/packages/zlib-125/static/Linux2.6-x86_64-gcc',
'quail' => ' /mnt/hdf/packages/zlib-125/shared/mac-intel-x86_64',
'quail-static' => ' /mnt/hdf/packages/zlib-125/static/mac-intel-x86_64');
my $indirectory = ".";
$indirectory = shift;
my $outdirectory = ".";
$outdirectory = shift;
my $key = ".";
#$key = shift;
unless (-d $outdirectory) {
print "$outdirectory not found. Create it or choose another one and try again.\n";
exit 1;
}
print "Subdirectories of $indirectory will be tarred and stored in $outdirectory.\n";
my $tarfilename;
my $tardirname;
my $output;
my $cmd;
# I'm currently copying system zlibs for at least solaris and FreeBSD machines. Since this script runs on jam it may require scp to get the libs.
#For future reference
# command for getting szlib files and links for shared binaries:
# tar cvf - -C <szipDir>/lib . | tar xvf - -C <libdir> .
# libz.so.1.2.3 and the static files should just be copied because they're in directories
# with other files. Then create the libz.so.1 and libz.so symbolic links.
sub addzandszlibs {
my $dir = shift;
my $indirectory = shift;
my $currentdir = getcwd();
if (-d "$indirectory/$dir" ) {
my $szdir = $szipdir{$dir};
my $zldir = $zlibdir{$dir};
if ($dir =~ /static/ || $dir =~ /ostrich/) {
$cmd = "cp $szdir/lib/libsz.a $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
$cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
} elsif ($dir eq "freedom" || $dir eq "loyalty") {
$cmd = "cp $szdir/lib/libsz.so.2 $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
$cmd = "cp $zldir/lib/libz.so.5 $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!";
$cmd = "ln -s libsz.so.2 libsz.so";
$output = `$cmd`;
print $output;
$cmd = "ln -s libz.so.5 libz.so";
$output = `$cmd`;
print $output;
chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
} elsif ($dir eq "duck" || $dir eq "quail" || $dir eq "kite") {
#we've been using the static libraries for the macs - built with -fPIC
# $cmd = "cp $szdir/lib/libsz.a $indirectory/$dir/lib";
# $output = `$cmd`;
# print $output;
# $cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib";
# $output = `$cmd`;
# print $output;
$cmd = "cp $szdir/lib/libsz.so.2.0.0.dylib $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
$cmd = "cp $zldir/lib/libz.1.2.5.dylib $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!";
$cmd = "ln -s libsz.so.2.0.0.dylib libsz.2.dylib";
$output = `$cmd`;
print $output;
$cmd = "ln -s libsz.so.2.0.0.dylib libsz.cylib";
$output = `$cmd`;
print $output;
$cmd = "ln -s libz.1.2.5.dylib libz.1.dylib";
$output = `$cmd`;
print $output;
$cmd = "ln -s libz.1.2.5.dylib libz.dylib";
$output = `$cmd`;
print $output;
chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
} elsif ($dir eq "emu64") {
$cmd = "cp $szdir/lib/libsz.so.2.0.0 $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
$cmd = "cp $zldir/lib/libz.a $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!";
$cmd = "ln -s libsz.so.2.0.0 libsz.so.2";
$output = `$cmd`;
print $output;
$cmd = "ln -s libsz.so.2.0.0 libsz.so";
$output = `$cmd`;
print $output;
chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
} else {
$cmd = "cp $szdir/lib/libsz.so.2.0.0 $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
$cmd = "cp $zldir/lib/libz.so.1.2.5 $indirectory/$dir/lib";
$output = `$cmd`;
print $output;
chdir "$indirectory/$dir/lib" or die "Couldn't change directory to $indirectory/$dir/lib, $!";
$cmd = "ln -s libsz.so.2.0.0 libsz.so.2";
$output = `$cmd`;
print $output;
$cmd = "ln -s libsz.so.2.0.0 libsz.so";
$output = `$cmd`;
print $output;
$cmd = "ln -s libz.so.1.2.5 libz.so.1";
$output = `$cmd`;
print $output;
$cmd = "ln -s libz.so.1.2.5 libz.so";
$output = `$cmd`;
print $output;
chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
}
}
}
sub makeTarFile {
my $directoryname = shift;
my $origdirname = shift;
my $tarfilename = shift;
my $tardirname = shift;
$cmd = "mv $indirectory/$origdirname $indirectory/$tardirname";
$output = `$cmd`;
print $output;
if (-d $indirectory."/".$tardirname."/doc/hdf5/examples") {
$cmd = "mv $indirectory/$tardirname/doc/hdf5/examples $indirectory/$tardirname/examples";
$output = `$cmd`;
print $output;
$cmd = "rm -rf $indirectory/$tardirname/doc";
$output = `$cmd`;
print $output;
}
$cmd = "tar zcvf $outdirectory/$directoryname/$tarfilename -C $indirectory $tardirname";
print "Need to run $cmd.\n";
$output = `$cmd`;
sleep 10;
print "Create $tarfilename: $output\n";
$cmd = "mv $indirectory/$tardirname $indirectory/$origdirname";
$output = `$cmd`;
print $output;
}
foreach $key (keys %destsubdir) {
print "Process ".$key."\n\n";
#skip unless there's a directory by the name of $key or $key-static
next unless -d $indirectory.'/'.$key || -d $indirectory.'/'.$key."-static";
my $version;
# This assumes a static directory. Probably the others should be checked if this
# doesn't exist.
$cmd = "grep \"HDF5 Version\" $indirectory/$key/lib/libhdf5.settings";
$_ = `$cmd`;
#print OUTFILE $_, "\n";
s/HDF5 Version://;
s/^\s+//;
chomp;
$version = $_;
#my $directoryname = substr $destsubdir{$key}, 0, rindex($destsubdir{$key}, '-');
my $directoryname = $destsubdir{$key};
mkdir $outdirectory."/".$directoryname, 0755 unless -d $outdirectory."/".$directoryname;
my $staticdir = $key."-static";
print $indirectory."/$key tarfile will be put in " . $outdirectory."/".$directoryname."\n";
if (-e $outdirectory."/".$destsubdir{$key}."/README") {
print $outdirectory."/".$destsubdir{$key}."/README" . " has already been created.\n";
}
else {
print "Make the Outer README file: ";
$cmd = "perl ./makeOuter1814README.pl $indirectory/$key $outdirectory $directoryname";
print $cmd, "\n";
my $output = `$cmd`;
print $output;
}
my $file = "";
my @dirnames = "";
opendir(DIR, $indirectory) or die "can't open .: $!";
while (defined($file = readdir(DIR))) {
next unless ($file eq $key || $file eq "$key-static") && -d $indirectory."/".$file;
push @dirnames, $file;
}
foreach my $dir (@dirnames) {
next if $dir eq "";
print "Make the Inner README files.\n";
$cmd = "perl ./makeInternal1814README.pl $indirectory/$dir";
print $cmd, "\n";
$output = `$cmd`;
print $output;
print "Add the zlib and szip files for $dir.\n";
&addzandszlibs($dir, $indirectory);
my $currentdir = getcwd();
chdir "$indirectory/$dir/bin" or die "Couldn't change directory to $indirectory/$dir/bin, $!";
$cmd = "/home/lrknox/hdf/release_scripts/h5rmflags -force";
$output = `$cmd`;
print $output;
chdir $currentdir or die "Couldn't change directory back to $currentdir, $!";
print "Tar up the files into the output directory.\n";
if (-d $indirectory."/".$dir) {
if ($dir =~ /static/) {
$tarfilename = "hdf5-$version-$destsubdir{$key}-static.tar.gz";
$tardirname = "hdf5-$version-$destsubdir{$key}-static";
} else {
$tarfilename = "hdf5-$version-$destsubdir{$key}-shared.tar.gz";
$tardirname = "hdf5-$version-$destsubdir{$key}-shared";
}
&makeTarFile($directoryname, $dir, $tarfilename, $tardirname);
}
}
# If this copy is done after h5rmflags is run on all the directories the compile scripts
# in the utilities directory will already have the paths removed.
if (-d $indirectory."/".$staticdir) {
$cmd = "cp -prv $indirectory/$staticdir/bin $outdirectory/$directoryname/utilities";
$output = `$cmd`;
print $output;
}
}

190
bin/makeInternal1814README.pl Executable file
View File

@@ -0,0 +1,190 @@
#!/usr/bin/perl
# makeInternalREADME.pl
use warnings;
use strict;
my $section2="For information on compilers and settings used to build these HDF5
libraries, please refer to:
./lib/libhdf5.settings
The contents of this directory are:
COPYING - Copyright notice
README - This file
RELEASE.txt - Detailed information regarding this release
bin/ - Directory containing HDF5 pre-compiled utilities
include/ - Directory containing HDF5 include files
lib/ - Directory containing HDF5 libraries and settings
share/ - Directory containing HDF5 C, C++ and Fortran example
program code and scripts to test compile scripts
h5cc, h5c++ and h5fc
These binaries were built with the ZLIB and SZIP (version 2.1, Encoder
ENABLED) external libraries which are included in the lib directory for
convenience.
We also provide the ZLIB and SZIP source code on our ftp server at:
ftp://ftp.hdfgroup.org/lib-external/
The official ZLIB and SZIP pages are at:
ZLIB: http://www.zlib.net/
SZIP: http://hdfgroup.org/doc_resource/SZIP/
";
my $section3 = "If using the shared libraries, you must add the HDF5 library path
to the LD_LIBRARY_PATH variable.
";
my $section4 = "We provide scripts for compiling applications with the HDF5 libraries:
bin/h5cc - for C
bin/h5fc - for F90 (if Fortran 90 is included with the binaries)
bin/h5c++ - for C++ (if C++ is included with the binaries)
After you have installed the binaries to their final destination,
you can use these scripts (h5cc, h5fc, h5c++) to compile. However,
you must first:
1) Run ./h5redeploy in the bin directory to change site specific paths in the scripts.
2) Edit each script and update the paths for the external libraries
in LDFLAGS and CPPFLAGS.
You may also need to change other variables in the scripts, depending
on how things are set up on your system. Here are some of the variables
to check:
prefix - Path to the HDF5 top level installation directory
CCBASE - Name of the alternative C compiler
CLINKERBASE - Name of the alternative linker
LIBS - Libraries your application will link with
For further details refer to the INSTALL files in the ./release_docs/
directory of the HDF5 source code:
ftp://ftp.hdfgroup.org/HDF5/current/src/unpacked/release_docs/
Source code can be found on the THG ftp server in:
ftp://ftp.hdfgroup.org/HDF5/current/src/
Please send questions, comments, and suggestions to:
http://hdfgroup.org/about/contact.html
";
my $indirectory = ".";
$indirectory = shift;
my $linktype = "shared";
if ($indirectory =~ /static/) {
$linktype = "static";
}
my $version;
my $outfile = "$indirectory/README";
open OUTFILE, ">$outfile" or die "$!Couldn't open $outfile - check permissions for $indirectory\n";
my $hostname;
my $cmd = "grep \"HDF5 Version\" $indirectory/lib/libhdf5.settings";
$_ = `$cmd`;
#print OUTFILE $_, "\n";
s/HDF5 Version://;
s/^\s+//;
chomp;
$version = $_;
#print OUTFILE $_, "\n";
my $versionstring= "This directory contains the $linktype binary distribution of HDF5-".$version;
$cmd = "grep \"Uname information:\" $indirectory/lib/libhdf5.settings";
$_ = `$cmd`;
s/Uname information://;
s/^\s+//;
#print OUTFILE $_;
chomp;
#s/(^\w+)(\s)(\S+)/$1/;
#s/(^.*)(-)(.*)(200[7-8])(.*)(\s)(\S+)/$1 $5/;
#my $platformstring = "\nthat was compiled on:" . $_ . " ";
my $platformstring = "";
my $hostnamestring = $_;
my @hostnamestring = split / /, $hostnamestring;
#print OUTFILE "Size of hostnamestring is ", scalar @hostnamestring, "\n";
#print OUTFILE $hostnamestring[0] . "\t" . $hostnamestring[2]."\t".$hostnamestring[19]."\n";
$hostname = $hostnamestring[1];
#my $size = scalar @hostnamestring;
if ($hostname =~ /loyalty/) {
$platformstring = "\nthat was compiled on: " . $hostnamestring[0]." " . $hostnamestring[2]." " . $hostnamestring[-1] . " ";
}
elsif ($hostname =~ /freedom/) {
$platformstring = "\nthat was compiled on: " . $hostnamestring[0]." " . $hostnamestring[2]." " . $hostnamestring[-1] . " ";
} elsif ($hostname =~ /emu/) {
$platformstring = "\nthat was compiled on: " . $hostnamestring[0]." " . $hostnamestring[2] . " " . $hostnamestring[-2] . " ";
} elsif ($hostname =~ /fred/) {
$platformstring = "\nthat was compiled on: " . $hostnamestring[0]." " . $hostnamestring[2] . " " . $hostnamestring[-1] . " ";
} else {
$_ = $hostnamestring[2];
my $pos = index $_, '-';
my $os = substr $_, 0, $pos;
$platformstring = "\nthat was compiled on: " . $hostnamestring[0] . " " . $os . " " . $hostnamestring[-2] . " ";
}
my $mappingstring = "";
#no mappingstring for 1.6. Put it back for 1.8.
#$cmd = "grep \"Default API Mapping:\" $indirectory/lib/libhdf5.settings";
#$_ = `$cmd`;
#s/Default API Mapping://;
#s/^\s+//;
#chomp;
#if (/v\d+/) {
# s/v//;
# s/(\d)(\d)/$1\.$2/g;
# $mappingstring = "using the default\nAPI mapping for VERSION ".$_.".";
#
#}
print OUTFILE $versionstring;
print OUTFILE $platformstring."\n\n";
#print OUTFILE $mappingstring;
#if ($hostname eq "loyalty.hdfgroup.uiuc.edu" || $hostname eq "freedom.hdfgroup.uiuc.edu") {
# print OUTFILE " It includes the C APIs,\nbuilt using the following ";
# print OUTFILE "compilers:\n\n";
#}
#else {
print OUTFILE "\n\nIt includes the C, C++, and F90 APIs, built using the following\n";
print OUTFILE "compilers:\n\n";
#}
# Only the gcc compiler version is in libhdf5.settings, so for now I looked
# up the versions and hardcoded them here. We will put them in libhdf5.settings
# for the next release.
if ($indirectory =~ /gnu482/) {
print OUTFILE "\tgcc, g++, and gfortran 4.8.2\n\n";
} elsif ($hostname =~ /jam/ || $hostname =~ /koala/) {
print OUTFILE "\tgcc, g++, and gfortran 4.1.2\n\n";
} elsif ($hostname =~ /platypus/) {
print OUTFILE "\tgcc, g++, and gfortran 4.4.7\n\n";
} elsif ($hostname =~ /emu/) {
print OUTFILE "\tSun C and C++ 5.12, Sun Fortran 95 8.6\n\n";
} elsif ($hostname =~ /loyalty/ || $hostname =~ /freedom/) {
print OUTFILE "\tgcc, g++, and gfortran 4.6.1\n\n";
} elsif ($hostname =~ /duck/) {
print OUTFILE "\tApple clang/clang++ 3.0 from Xcode 4.6.1 and gfortran 4.8.2\n\n";
} elsif ($hostname =~ /kite/) {
print OUTFILE "\tApple clang/clang++ 5.1 from Xcode 5.0.2 and gfortran 4.8.2\n\n";
} elsif ($hostname =~ /quail/) {
print OUTFILE "\tgcc, g++ 5.1 from Xcode 5.1 and gfortran 4.8.2\n\n";
}
print OUTFILE $section2;
print OUTFILE $section3;
print OUTFILE $section4;

173
bin/makeOuter1814README.pl Executable file
View File

@@ -0,0 +1,173 @@
#!/usr/bin/perl
# makeOuterREADME.pl
use warnings;
use strict;
my $indirectory = ".";
$indirectory = shift;
my $outdirectory = ".";
$outdirectory = shift;
my $outsubdir = shift;
my $version;
my $outfile = "$outdirectory/$outsubdir/README";
open OUTFILE, ">$outfile";
my $hostname="";
my $cmd = "grep \"HDF5 Version\" $indirectory-static/lib/libhdf5.settings";
$_ = `$cmd`;
#print OUTFILE $_, "\n";
s/HDF5 Version://;
s/^\s+//;
chomp;
$version = $_;
#print OUTFILE $_, "\n";
my $versionstring= "This directory contains the precompiled HDF5 $version binary distribution\n(include files, libraries, utilities) for";
$cmd = "grep \"Uname information:\" $indirectory-static/lib/libhdf5.settings";
$_ = `$cmd`;
s/Uname information://;
s/^\s+//;
chomp;
print "String to work with is $_\n";
my $platformstring = "";
my $hostnamestring = $_;
my @hostnamestring = split / /, $hostnamestring;
$platformstring = "$hostnamestring[0] ";
if ($indirectory =~ /jam/ || $indirectory =~ /koala/) {
$hostnamestring = $hostnamestring[2];
my $pos = index $hostnamestring, "-";
if ($pos > 0) {
$platformstring .= substr $hostnamestring, 0, $pos;
} else {
$platformstring .= $hostnamestring[2];
}
$platformstring .= " ".$hostnamestring[-3];
} elsif ($indirectory =~ /linew/) {
$platformstring .= "$hostnamestring[2] $hostnamestring[-2]";
} else {
$platformstring .= "$hostnamestring[2] $hostnamestring[-1]";
}
print OUTFILE $versionstring." ".$platformstring.":\n\n";
my $line1;
my $line3;
my $line5;
my $compilerstring="";
print $indirectory, "\n";
if ($indirectory =~ /loyalty/) {
# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C and C++ APIs (using\n";
$line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C APIs (using\n";
$line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C APIs (using\n";
$compilerstring = " gcc, g++, and gfortran 4.6.1)\n";
}
elsif ($indirectory =~ /freedom/) {
# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C and C++ APIs (using\n";
$line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C APIs (using\n";
$line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C APIs (using\n";
$compilerstring = " gcc, g++, and gfortran 4.6.1)\n";
}
elsif ($indirectory =~ /ostrich/) {
# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
$line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n";
$line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n";
$compilerstring = " gcc, g++, and gfortran 4.4.7)\n";
}
elsif ($indirectory =~ /platypus/) {
# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
$line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n";
$line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n";
$compilerstring = " gcc, g++, and gfortran 4.4.7)\n";
}
elsif ($indirectory =~ /jam/) {
# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
$line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n";
$line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n";
if ($indirectory =~ /gnu482/) {
$compilerstring = " gcc, g++, and gfortran 4.8.2)\n";
} else {
$compilerstring = " gcc, g++, and gfortran 4.1.2)\n";
}
}
elsif ($indirectory =~ /koala/) {
# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
$line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n";
$line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n";
if ($indirectory =~ /gnu482/) {
$compilerstring = " gcc, g++, and gfortran 4.8.2)\n";
} else {
$compilerstring = " gcc, g++, and gfortran 4.1.2)\n";
}
}
elsif ($indirectory =~ /emu/) {
# $line1 = " 5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
$line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n";
$line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n";
$compilerstring = " Sun C and C++ 5.12, Sun Fortran 95 8.6)\n";
}
elsif ($indirectory =~ /duck/) {
$line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n";
$line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n";
$compilerstring = " Apple clang/clang++ 3.0 from Xcode 4.6.1,
gfortran 4.6.2)\n";
}
elsif ($indirectory =~ /kite/) {
$line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n";
$line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n";
$compilerstring = " Apple clang/clang++ 5.0 from Xcode 5.0.2,
gfortran 4.8.2)\n";
}
elsif ($indirectory =~ /quail/) {
$line3 = " 5-$version-$outsubdir-static.tar.gz - Includes C, C++, F90 APIs (using\n";
$line5 = " 5-$version-$outsubdir-shared.tar.gz - Includes C, C++, F90 APIs (using\n";
$compilerstring = " Apple clang/clang++ 5.1 from Xcode 5.1,
gfortran 4.8.2)\n";
}
print OUTFILE $line3;
print OUTFILE $compilerstring."\n";
if ($line5 ne "") {
print OUTFILE $line5;
print OUTFILE $compilerstring."\n";
}
#elsif ($indirectory =~ /-16API/) {
# print OUTFILE $line1;
# print OUTFILE $compilerstring;
# print OUTFILE " USES THE VERSION 1.6 DEFAULT API\n";
# print OUTFILE " MAPPING.\n\n";
#}
print OUTFILE " utilities/ - Directory containing the compiled HDF5 utilities.\n";
print OUTFILE " These utilities are STATICALLY linked and will run as is.\n\n";
#print OUTFILE " The tools can be downloaded separately, or ALL in one\n";
#print OUTFILE " compressed file (5-$version-$outsubdir-static-util.tar.gz).\n\n";
print OUTFILE "\n";
print OUTFILE "To obtain the HDF5 distribution, 'unzip' and 'untar' the distribution\n";
print OUTFILE "file:\n\n";
print OUTFILE " gzip -cd <gz file from above> | tar xvf -\n";
#$cmd = "grep \"Configured by:\" $indirectory/$key-static/lib/libhdf5.settings";
#$_ = `$cmd`;
#s/Configured by://;
#s/^\s+//;
#print OUTFILE $_;
#chomp;
#my $hostnamestring = $_;
#s/(^\w+)(\s)(\S+)/$1/;
#s/(^.*)(-)(.*)(200[7-8])(.*)(\s)(\S+)/$1 $5/;
#my $platformstring = $_ . ":\n\n";
#my @hostnamestring = split /@/, $hostnamestring;
#print "Size of hostnamestring is ", scalar @hostnamestring, "\n";
#print $hostnamestring[0] . "\t" . $hostnamestring[2]."\t".$hostnamestring[19]."\n";
#my $platformstring = $hostnamestring[1].":\n\n";
#$hostnamestring = $hostnamestring[1];
#my $pos = index $hostnamestring, ".";
#if ($pos > 0) {
# @hostnamestring = split /\./, $hostnamestring;
# $platformstring = $hostnamestring[0].":\n\n";
#}

View File

@@ -1,11 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Common wrapper for a few potentially missing GNU programs.
scriptversion=2005-02-08.22
scriptversion=2013-10-28.13; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,9 +17,7 @@ scriptversion=2005-02-08.22
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -28,63 +25,40 @@ scriptversion=2005-02-08.22
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
fi
run=:
case $1 in
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
--is-lightweight)
# Used by our autoconf macros to check whether the available missing
# script is modern enough.
exit 0
;;
msg="missing on your system"
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
--run)
# Back-compat with the calling convention used by older automake.
shift
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
aclocal autoconf autoheader autom4te automake makeinfo
bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
@@ -96,262 +70,146 @@ Send bug reports to <bug-automake@gnu.org>."
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
lex|yacc)
# Not GNU programs, they don't have --version.
# Run the given program, remember its exit status.
"$@"; st=$?
# If it succeeded, we are done.
test $st -eq 0 && exit 0
# Also exit now if we it failed (or wasn't found), and '--version' was
# passed; such an option is passed most likely to detect whether the
# program is present and works.
case $2 in --version|--help) exit $st;; esac
# Exit code 63 means version mismatch. This often happens when the user
# tries to use an ancient version of a tool on a file that requires a
# minimum version.
if test $st -eq 63; then
msg="probably too old"
elif test $st -eq 127; then
# Program was missing.
msg="missing on your system"
else
# Program was found and executed, but failed. Give up.
exit $st
fi
perl_URL=http://www.perl.org/
flex_URL=http://flex.sourceforge.net/
gnu_software_URL=http://www.gnu.org/software
program_details ()
{
case $1 in
aclocal|automake)
echo "The '$1' program is part of the GNU Automake package:"
echo "<$gnu_software_URL/automake>"
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/autoconf>"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
autoconf|autom4te|autoheader)
echo "The '$1' program is part of the GNU Autoconf package:"
echo "<$gnu_software_URL/autoconf/>"
echo "It also requires GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
esac
}
give_advice ()
{
# Normalize program name to check for.
normalized_program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
printf '%s\n' "'$1' is $msg."
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
case $normalized_program in
autoconf*)
echo "You should only need it if you modified 'configure.ac',"
echo "or m4 files included by it."
program_details 'autoconf'
;;
autoheader*)
echo "You should only need it if you modified 'acconfig.h' or"
echo "$configure_deps."
program_details 'autoheader'
;;
automake*)
echo "You should only need it if you modified 'Makefile.am' or"
echo "$configure_deps."
program_details 'automake'
;;
aclocal*)
echo "You should only need it if you modified 'acinclude.m4' or"
echo "$configure_deps."
program_details 'aclocal'
;;
autom4te*)
echo "You might have modified some maintainer files that require"
echo "the 'autom4te' program to be rebuilt."
program_details 'autom4te'
;;
bison*|yacc*)
echo "You should only need it if you modified a '.y' file."
echo "You may want to install the GNU Bison package:"
echo "<$gnu_software_URL/bison/>"
;;
lex*|flex*)
echo "You should only need it if you modified a '.l' file."
echo "You may want to install the Fast Lexical Analyzer package:"
echo "<$flex_URL>"
;;
help2man*)
echo "You should only need it if you modified a dependency" \
"of a man page."
echo "You may want to install the GNU Help2man package:"
echo "<$gnu_software_URL/help2man/>"
;;
makeinfo*)
echo "You should only need it if you modified a '.texi' file, or"
echo "any other file indirectly affecting the aspect of the manual."
echo "You might want to install the Texinfo package:"
echo "<$gnu_software_URL/texinfo/>"
echo "The spurious makeinfo call might also be the consequence of"
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
echo "want to install GNU make:"
echo "<$gnu_software_URL/make/>"
;;
*)
echo "You might have modified some files without having the proper"
echo "tools for further handling them. Check the 'README' file, it"
echo "often tells you about the needed prerequisites for installing"
echo "this package. You may also peek at any GNU archive site, in"
echo "case some other package contains this missing '$1' program."
;;
esac
}
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
give_advice "$1" | sed -e '1s/^/WARNING: /' \
-e '2,$s/^/ /' >&2
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
touch $file
;;
tar)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Propagate the correct exit status (expected to be 127 for a program
# not found, 63 for a program that failed due to version mismatch).
exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

View File

@@ -29,11 +29,11 @@
# HDF5 currently uses the following versions of the autotools:
AUTOCONF_VERSION="autoconf (GNU Autoconf) 2.69"
AUTOMAKE_VERSION="automake (GNU automake) 1.12.3"
AUTOMAKE_VERSION="automake (GNU automake) 1.14.1"
AUTOHEADER_VERSION="autoheader (GNU Autoconf) 2.69"
ACLOCAL_VERSION="aclocal (GNU automake) 1.12.3"
ACLOCAL_VERSION="aclocal (GNU automake) 1.14.1"
LIBTOOL_VERSION="(GNU libtool) 2.4.2"
M4_VERSION="m4 (GNU M4) 1.4.16"
M4_VERSION="m4 (GNU M4) 1.4.17"
#
# When upgrading automake's version, don't forget to also update its
@@ -42,23 +42,26 @@ M4_VERSION="m4 (GNU M4) 1.4.16"
# If paths to autotools are not specified by the user, assume tools are
# running on jam in /mnt/hdf/packages and set paths accordingly.
if test -z ${AUTORECONF}; then
AUTORECONF=/mnt/hdf/packages/autoconf/autoconf-2.69/bin/autoreconf
fi
if test -z ${AUTOCONF}; then
AUTOCONF=/mnt/hdf/packages/autoconf/autoconf-2.69/bin/autoconf
fi
if test -z ${AUTOMAKE}; then
AUTOMAKE=/mnt/hdf/packages/automake/automake-1.12.3/bin/automake-1.12
AUTOMAKE=/mnt/hdf/packages/automake/automake-1.14.1/bin/automake-1.14
fi
if test -z ${AUTOHEADER}; then
AUTOHEADER=/mnt/hdf/packages/autoconf/autoconf-2.69/bin/autoheader
fi
if test -z ${ACLOCAL}; then
ACLOCAL=/mnt/hdf/packages/automake/automake-1.12.3/bin/aclocal-1.12
ACLOCAL=/mnt/hdf/packages/automake/automake-1.14.1/bin/aclocal-1.14
fi
if test -z ${LIBTOOL}; then
LIBTOOL=/mnt/hdf/packages/libtool/libtool-2.4.2/bin/libtool
fi
if test -z ${M4}; then
M4=/mnt/hdf/packages/m4/m4-1.4.16/bin/m4
M4=/mnt/hdf/packages/m4/m4-1.4.17/bin/m4
fi
# Check version numbers of all autotools against the "correct" versions
@@ -140,4 +143,10 @@ echo
echo " Running API version generation script:"
bin/make_vers src/H5vers.txt || exit 1
# Run flex
# automatically generates the lexical file for hl/src/H5LTanalyze.c
echo
echo " Running flex generation script:"
bin/genltanalyze || exit 1
exit 0

View File

@@ -40,49 +40,119 @@
USAGE()
{
cat << EOF
Usage: $0 [--nocheck] [-d <dir>] [-h] <methods> ...
Usage: $0 -d <dir> [--docver BRANCHNAME] [-h] [--nocheck] [--private] <methods> ...
-d DIR The name of the directory where the releas(es) should be
placed. By default, the directory is ./releases
placed.
--docver BRANCHNAME This is added for 1.8 and beyond to get the correct
version of documentation files from the hdf5docs
repository. BRANCHNAME for v1.8 should be hdf5_1_8.
-h print the help page.
--nocheck Ignore errors in MANIFEST file.
--private Make a private release with today's date in version information.
This must be run at the top level of the source directory.
The other command-line options are the names of the programs to use
for compressing the resulting tar archive (if none are given then
"tar md5" is assumed):
"tar" is assumed):
tar -- use tar and don't do any compressing.
compress -- use compress and append ".Z" to the output name.
gzip -- use gzip with "-9" and append ".gz" to the output name.
bzip2 -- use bzip2 with "-9" and append ".bz2" to the output name.
md5 -- produce a md5 checksum in addition to the archive.
zip -- convert all text files to DOS style and form a zip file for Windows use.
doc -- produce the latest doc tree in addition to the archive.
An md5 checksum is produced for each archive created and stored in the md5 file.
Examples:
$ release
releases/hdf5-1.0.38.tar
releases/hdf5-1.0.38.tar.md5
$ bin/release -d /tmp
/tmp/hdf5-1.8.13-RELEASE.txt
/tmp/hdf5-1.8.13.md5
/tmp/hdf5-1.8.13.tar
$ release gzip
releases/hdf5-1.0.38.tar.gz
$ bin/release -d /tmp gzip
/tmp/hdf5-1.8.13-RELEASE.txt
/tmp/hdf5-1.8.13.md5
/tmp/hdf5-1.8.13.tar.gz
$ release -d /tmp tar compress gzip bzip2 md5
/tmp/hdf5-1.0.38.tar
/tmp/hdf5-1.0.38.tar.Z
/tmp/hdf5-1.0.38.tar.gz
/tmp/hdf5-1.0.38.tar.bz2
/tmp/hdf5-1.0.38.tar.md5
$ bin/release -d /tmp tar gzip zip
/tmp/hdf5-1.8.13-RELEASE.txt
/tmp/hdf5-1.8.13.md5
/tmp/hdf5-1.8.13.tar
/tmp/hdf5-1.8.13.tar.gz
/tmp/hdf5-1.8.13.tar.zip
EOF
}
# Function name: tar2zip
# Convert the release tarball to a Windows zipball.
#
# Programmer: Albert Cheng
# Creation date: 2014-04-23
#
# Modifications
#
# Steps:
# 1. untar the tarball in a temporay directory;
# Note: do this in a temporary directory to avoid changing
# the original source directory which maybe around.
# 2. convert all its text files to DOS (LF-CR) style;
# 3. form a zip file which is usable by Windows users.
#
# Parameters:
# $1 version
# $2 release tarball
# $3 output zipball file name
#
# Returns 0 if successful; 1 otherwise
#
tar2zip()
{
if [ $# -ne 3 ]; then
echo "usage: tar2zip <tarfilename> <zipfilename>"
return 1
fi
ztmpdir=/tmp/tmpdir$$
mkdir -p $ztmpdir
version=$1
tarfile=$2
zipfile=$3
# step 1: untar tarball in ztmpdir
(cd $ztmpdir; tar xf -) < $tarfile
# sanity check
if [ ! -d $ztmpdir/$version ]; then
echo "untar did not create $ztmpdir/$version source dir"
# cleanup
rm -rf $ztmpdir
return 1
fi
# step 2: convert text files
# There maybe a simpler way to do this.
# options used in unix2dos:
# -k Keep the date stamp
# -q quiet mode
# grep redirect output to /dev/null because -q or -s are not portable.
find $ztmpdir/$version | \
while read inf; do \
if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \
unix2dos -q -k $inf; \
fi\
done
# step 3: make zipball
# -9 maximum compression
# -y Store symbolic links as such in the zip archive
# -r recursive
# -q quiet
(cd $ztmpdir; zip -9 -y -r -q $version.zip $version)
mv $ztmpdir/$version.zip $zipfile
# cleanup
rm -rf $ztmpdir
}
# This command must be run at the top level of the hdf5 source directory.
# Verify this requirement.
if [ ! \( -f configure -a -f bin/release \) ]; then
@@ -151,9 +221,9 @@ while [ -n "$1" ]; do
esac
done
# Default methods are tar and md5
# Default method is tar
if [ "X$methods" = "X" ]; then
methods="tar md5"
methods="tar"
fi
# Create the temporay work directory.
@@ -233,26 +303,28 @@ test "$verbose" && echo " Running tar..." 1>&2
)
# Compress
MD5file=$HDF5_VERS.md5
cp /dev/null $DEST/$MD5file
for comp in $methods; do
case $comp in
tar)
cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar
;;
compress)
test "$verbose" && echo " Running compress..." 1>&2
compress -c <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.Z
(cd $DEST; md5sum $HDF5_VERS.tar >> $MD5file)
;;
gzip)
test "$verbose" && echo " Running gzip..." 1>&2
gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz
(cd $DEST; md5sum $HDF5_VERS.tar.gz >> $MD5file)
;;
bzip2)
test "$verbose" && echo " Running bzip2..." 1>&2
bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2
(cd $DEST; md5sum $HDF5_VERS.tar.bz2 >> $MD5file)
;;
md5)
test "$verbose" && echo " Creating checksum..." 1>&2
(cd $tmpdir; md5sum $HDF5_VERS.tar ) > $DEST/$HDF5_VERS.tar.md5
zip)
test "$verbose" && echo " Creating zip ball..." 1>&2
tar2zip $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
(cd $DEST; md5sum $HDF5_VERS.zip >> $MD5file)
;;
doc)
if [ "${DOCVERSION}" = "" ]; then
@@ -271,6 +343,10 @@ for comp in $methods; do
(cd $tmpdir && tar cf ${HDF5_VERS}_docs.tar ${HDF5_VERS}_docs)
mv $tmpdir/${HDF5_VERS}_docs.tar $DEST
;;
*)
echo "***Error*** Unknown method $comp"
exit 1
;;
esac
done

View File

@@ -68,7 +68,7 @@ ZLIB_default=
ZLIB=$ZLIB_default
# What compression methods to use? (md5 does checksum).
METHODS="gzip bzip2 md5 doc"
METHODS="gzip zip bzip2 md5 doc"
# Use User's MAKE if set. Else use generic make.
MAKE=${MAKE:-make}

139
bin/test-driver Normal file
View File

@@ -0,0 +1,139 @@
#! /bin/sh
# test-driver - basic testsuite driver script.
scriptversion=2013-07-13.22; # UTC
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
# Make unconditional expansion of undefined variables an error. This
# helps a lot in preventing typo-related bugs.
set -u
usage_error ()
{
echo "$0: $*" >&2
print_usage >&2
exit 2
}
print_usage ()
{
cat <<END
Usage:
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
[--expect-failure={yes|no}] [--color-tests={yes|no}]
[--enable-hard-errors={yes|no}] [--]
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
END
}
test_name= # Used for reporting.
log_file= # Where to save the output of the test script.
trs_file= # Where to save the metadata of the test run.
expect_failure=no
color_tests=no
enable_hard_errors=yes
while test $# -gt 0; do
case $1 in
--help) print_usage; exit $?;;
--version) echo "test-driver $scriptversion"; exit $?;;
--test-name) test_name=$2; shift;;
--log-file) log_file=$2; shift;;
--trs-file) trs_file=$2; shift;;
--color-tests) color_tests=$2; shift;;
--expect-failure) expect_failure=$2; shift;;
--enable-hard-errors) enable_hard_errors=$2; shift;;
--) shift; break;;
-*) usage_error "invalid option: '$1'";;
*) break;;
esac
shift
done
missing_opts=
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
if test x"$missing_opts" != x; then
usage_error "the following mandatory options are missing:$missing_opts"
fi
if test $# -eq 0; then
usage_error "missing argument"
fi
if test $color_tests = yes; then
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
red='' # Red.
grn='' # Green.
lgn='' # Light green.
blu='' # Blue.
mgn='' # Magenta.
std='' # No color.
else
red= grn= lgn= blu= mgn= std=
fi
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
trap "st=129; $do_exit" 1
trap "st=130; $do_exit" 2
trap "st=141; $do_exit" 13
trap "st=143; $do_exit" 15
# Test script is run here.
"$@" >$log_file 2>&1
estatus=$?
if test $enable_hard_errors = no && test $estatus -eq 99; then
estatus=1
fi
case $estatus:$expect_failure in
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
0:*) col=$grn res=PASS recheck=no gcopy=no;;
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
esac
# Report outcome to console.
echo "${col}${res}${std}: $test_name"
# Register the test result, and other relevant metadata.
echo ":test-result: $res" > $trs_file
echo ":global-test-result: $res" >> $trs_file
echo ":recheck: $recheck" >> $trs_file
echo ":copy-in-global-log: $gcopy" >> $trs_file
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

688
bin/testh51814binary.sh Normal file
View File

@@ -0,0 +1,688 @@
#! /bin/sh
FORTRAN=yes
ARG=$1
if [ -n "${ARG}" ] && [ "${ARG}" = "-nofortran" ]; then
FORTRAN=no
fi
echo "Fortran: ${FORTRAN}"
THIS_DIR=`pwd`
THIS_TEST_RESULT=0
TEST_RESULT=0
FILE_LIST=`ls`
RESULTSLOG=""
SUMMARYLOG=""
EXAMPLE1LOG=""
EXAMPLE2LOG=""
FAILED_TEST_LOGS=""
# step 0: Check presence of top-level README file
STEP0RESULT=0
README_FILE=""
README_FILE=`ls README`
echo "Check for presence of top-level README file"
if test -z "$README_FILE"; then
echo "Missing Outer README file."
STEP0RESULT=1
else
echo "Present"
fi
for f in $FILE_LIST ; do
#be sure to start in the "top level" directory
cd $THIS_DIR
IS_TARFILE=""
UTILTEST=""
THIS_TEST_RESULT=0
IS_TARFILE=`ls $f | grep tar.gz`
if [ "$f" = "utilities" ]; then
UTILTEST="yes"
cd utilities
RESULTSLOG=$THIS_DIR/utilities_Results.log
SUMMARYLOG=$THIS_DIR/utilities_Summary
echo " SUMMARY" > $SUMMARYLOG
echo ""
echo "Testing $f"
echo ""
elif [ -n "$IS_TARFILE" ] ; then
UTILTEST=""
EXTRACTED=`echo $f | sed 's/\.tar\.gz//'`
STORSH=`echo $EXTRACTED | awk -F- '{ print $NF }'`
if [ "$STORSH" = "shared" ]; then
SHAREDLIBS=yes
else
SHAREDLIBS=""
fi
echo ""
echo "Testing $f"
echo
echo "Unpack and install $f."
echo
EXTRACTLOG=extract_$f.log
RESULTSLOG=$THIS_DIR/${STORSH}_Results.log
SUMMARYLOG=$THIS_DIR/${STORSH}_Summary
EXAMPLE1LOG=$THIS_DIR/${STORSH}_hdf5-examples.log
EXAMPLE2LOG=$THIS_DIR/${STORSH}_share_examples.log
echo " SUMMARY" > $SUMMARYLOG
# Step 1: unpack binary and run h5redeploy
# Extraction not needed when testing the utilities directory ($UTILTEST = "yes")
echo "Executing step 1: Extracting $f"
tar zxvf $f > $EXTRACTLOG
cd $EXTRACTED/bin
# Check for internal README file in $EXTRACTED
echo "Check for presence of top-level README file"
STEP1RESULT=0
README_FILE=""
README_FILE=`ls ../README`
if test -z "$README_FILE"; then
echo "Missing Internal README file."
STEP1RESULT=1
else
echo "Present"
fi
else
continue
fi
./h5redeploy -force > ${RESULTSLOG}
# Steps 2 & 3 don't apply for testing the utilities directory ($UTILTEST = "yes")
if [ -z "$UTILTEST" ]; then
# For testing tar files, go back up to the test directory
cd $THIS_DIR
# Step 2
STEP2RESULT=0
echo "Executing step 2: Check and verify contents of the lib/libhdf5.settings file."
# 2.1 Check Platform
# The platform information won't match exactly and is somewhat irregular. We
# can write a script with awk and sed to match enough information to determine
# a match, but it will take some thought and research to determine which parts
# to check. For now, present the output of "uname -a" and the "Uname information"
# line from libhdf5.settings and let the developer decide.
MACH_UNAME=`uname -a`
BIN_UNAME=`grep "Uname information" $EXTRACTED/lib/libhdf5.settings | sed 's/\s*Uname information://'`
IS_SOLARIS=`echo $BIN_UNAME | grep SunOS`
IS_PPC64=`echo$BIN_UNAME | grep ppc64`
IS_MAC=`echo $BIN_UNAME | grep Darwin`
# if [ -n "$IS_MAC" ]; then
# IS_MAC32=`echo $BIN_UNAME | grep tejeda`
# IS_MAC64=`echo $BIN_UNAME | grep fred`
# fi
# at present we only need to know if the binary is for mac or not, so if
# echo "The output of \"uname -a\" for this machine is:"
# echo ""
# echo " $MACH_UNAME"
# echo ""
# echo "The \"Uname information\" line from the libhdf5.settings in this binary is:"
# echo ""
# echo " $BIN_UNAME"
# echo ""
# Probably we won't ask, just print the results in the summary
#echo "Is this the correct binary to install on this machine? (yes/no - yes to continue, no to exit)"
#read CORRECT
#if [ "$CORRECT" = "yes" ]; then
# echo "Continuing with binary tests."
#else
# echo "Exiting - Try downloading another binary for this machine."
#fi
# 2.2 Check compiler versions in libhdf5.settings against RELEASE.txt
# Need to compare both files in detail to find unique string to compare
# grep -A 70 "^Platforms Tested$" $EXTRACTED/RELEASE.txt
# echo ""
# echo "We need to check that the compilers listed in"
# echo "$EXTRACTED/lib/libhdf5.settings are also listed"
# echo "in the \"Platforms Tested\" section of $EXTRACTED/RELEASE.txt, displayed above."
# echo "Please find the compiler version information for the following compilers"
# echo "and for this platform, $BIN_UNAME, in the \"Platforms Tested\" section (printed above)"
# echo "and enter it below."
# echo ""
# echo "For multiple lines copy a line at a time separated by a space."
# echo ""
# echo "If the compiler cannot in the \"Platforms Tested\" section above please check the RELEASE.txt file."
# echo "If no match is found there, please enter \"NO MATCH\""
#
C_COMPILER=`grep "C Compiler:" $EXTRACTED/lib/libhdf5.settings | sed 's/\s*//'`
F_COMPILER=`grep "Fortran Compiler:" $EXTRACTED/lib/libhdf5.settings | sed 's/\s*//'`
CXX_COMPILER=`grep "C++ Compiler:" $EXTRACTED/lib/libhdf5.settings | sed 's/\s*//'`
# echo ""
# echo $C_COMPILER
# echo ""
# echo $F_COMPILER
# echo ""
# echo $CXX_COMPILER
# echo ""
# echo "Enter info from RELEASE.txt for C Compiler:"
# read C_COMP_INFO
# echo "Enter info for Fortran Compiler:"
# read F_COMP_INFO
# echo "Enter info for C++ Compiler:"
# read CXX_COMP_INFO
# 2.3 Check libhdf5.settings for Shared and Static (Static Executables?)
STATIC=`grep Static $EXTRACTED/lib/libhdf5.settings | grep Library | grep yes`
RETVAL=$?
if [ "$RETVAL" = "0" ]; then
#echo "Static Libraries PASSED."
echo "Static Libraries PASSED." >> $RESULTSLOG
else
#echo "No static libraries: FAILED."
STEP2RESULT=1
echo "No static libraries: FAILED." >> $RESULTSLOG
fi
if [ -n "$SHAREDLIBS" ]; then
SHARED=`grep Shared $EXTRACTED/lib/libhdf5.settings | grep Library | grep yes`
RETVAL=$?
if [ "$RETVAL" = "0" ]; then
# echo "Shared Libraries present: PASSED."
# echo $SHARED
echo "Shared Libraries present: PASSED." >> $RESULTSLOG
else
# echo "Shared libraries are missing: FAILED."
STEP2RESULT=1
echo "Shared libraries are missing: FAILED." >> $RESULTSLOG
fi
fi
#2.4 Check for Fortran support
SUPPORT=`grep "Fortran: yes" $EXTRACTED/lib/libhdf5.settings`
RETVAL=$?
if [ "$RETVAL" = "0" ]; then
# echo "Fortran supported: PASSED"
echo "Fortran supported: PASSED" >> $RESULTSLOG
else
# echo "Fortran not supported: FAILED"
STEP2RESULT=1
echo "Fortran not supported: FAILED" >> $RESULTSLOG
fi
#2.5 Check for C++ support
SUPPORT=`grep "C++: yes" $EXTRACTED/lib/libhdf5.settings`
if [ "$RETVAL" = "0" ]; then
# echo "C++ supported: PASSED"
echo "C++ supported: PASSED" >> $RESULTSLOG
else
# echo "C++ not supported: FAILED"
STEP2RESULT=1
echo "C++ not supported: FAILED" >> $RESULTSLOG
fi
#2.6 Check that zlib and szip are enabled
SUPPORT=`grep "I/O filters (external): " $EXTRACTED/lib/libhdf5.settings | grep "deflate(zlib)"`
if [ "$RETVAL" = "0" ]; then
echo "zlib supported: PASSED" >> $RESULTSLOG
else
STEP2RESULT=1
echo "zlib not supported: FAILED" >> $RESULTSLOG
fi
SUPPORT=`grep "I/O filters (external): " $EXTRACTED/lib/libhdf5.settings | grep "szip(encoder)"`
if [ "$RETVAL" = "0" ]; then
# echo "szip with encoder supported: PASSED"
echo "szip with encoder supported: PASSED" >> $RESULTSLOG
else
# echo "szip with encoder not supported: FAILED"
STEP2RESULT=1
echo "szip with encoder not supported: FAILED" >> $RESULTSLOG
fi
#2.7 Check for Compilation Mode = production
PRODUCTION=`grep "Compilation Mode: production" $EXTRACTED/lib/libhdf5.settings`
if [ "$RETVAL" = "0" ]; then
#echo "Compilation Mode is production: PASSED"
echo "Compilation Mode is production: PASSED" >> $RESULTSLOG
else
#echo "Compilation Mode is development: FAILED"
STEP2RESULT=1
echo "Compilation Mode is development: FAILED" >> $RESULTSLOG
fi
#2.8 Check for optimization flag
OPTIMIZED=`grep -i FLAGS $EXTRACTED/lib/libhdf5.settings | grep "\-O"`
if [ "$RETVAL" = "0" ]; then
# echo "Optimization is on: PASSED"
echo "Optimization is on: PASSED" >> $RESULTSLOG
else
# echo "No optimization found in FLAGS: FAILED"
STEP2RESULT=1
echo "No optimization found in FLAGS: FAILED" >> $RESULTSLOG
fi
#2.9 Check for no "-g" flags
DEBUG=`grep -i FLAGS $EXTRACTED/lib/libhdf5.settings | grep " \-g "`
RETVAL=$?
if [ "$RETVAL" = "0" ]; then
#echo "-g flag is present: $DEBUG FAILED"
echo "-g flag is present: $DEBUG FAILED" >> $RESULTSLOG
else
#echo "-g flag is not present: PASSED"
echo "-g flag is not present: PASSED" >> $RESULTSLOG
fi
if [ "$STEP2RESULT" = "0" ]; then
echo "PASSED"
echo "Step 2 PASSED" >> $SUMMARYLOG
else
echo "**** FAILED"
echo "**** Step 2 FAILED ****" >> $RESULTSLOG
echo "**** Step 2 FAILED ****" >> $SUMMARYLOG
fi
# Step 3
echo "Executing step 3: Check and verify included libraries."
STEP3RESULT=0
RETVAL=0
THIS_DIR=`pwd`
cd $EXTRACTED/lib
STATIC_LIBFILES="libhdf5.a libhdf5_cpp.a libhdf5_fortran.a libhdf5_hl.a libhdf5_hl_cpp.a libhdf5hl_fortran.a libhdf5_cpp.a"
for s in $STATIC_LIBFILES ; do
if test -f $s; then
echo "found $s" >> $RESULTSLOG
else
echo "$s not found." >> $RESULTSLOG
RETVAL=1
fi
done
if [ -n "$IS_MAC" ]; then
# Currently no shared libraries for Fortran are produced on the mac-intel machines
SHARED_LIBFILES="libhdf5_cpp.9.dylib libhdf5_hl_cpp.9.dylib libhdf5_hl.9.dylib libhdf5.9.dylib libsz.a"
elif [ -n "$IS_PPC64" ]; then
SHARED_LIBFILES="libhdf5_cpp.so.9.0.0 libhdf5_fortran.so.9.0.0 libhdf5_hl_cpp.so.9.0.0 libhdf5hl_fortran.so.9.0.0 libhdf5_hl.so.9.0.0 libhdf5.so.9.0.0"
else
SHARED_LIBFILES="libhdf5_cpp.so.9.0.0 libhdf5_fortran.so.9.0.0 libhdf5_hl_cpp.so.9.0.0 libhdf5hl_fortran.so.9.0.0 libhdf5_hl.so.9.0.0 libhdf5.so.9.0.0 libsz.so.2.0.0 libz.so.1.2.5"
fi
if [ -n "${SHAREDLIBS}" ]; then
for s in $SHARED_LIBFILES ; do
if test -f $s; then
echo "found $s" >> $RESULTSLOG
else
echo "$s not found." >> $RESULTSLOG
RETVAL=1
fi
done
if [ "$RETVAL" = "0" ]; then
#echo "All shared and static library files are included: PASSED"
echo "All shared and static library files are included: PASSED" >> $RESULTSLOG
else
#echo "Expected library files are missing: FAILED"
STEP3RESULT=1
echo "Expected library files are missing: FAILED" >> $RESULTSLOG
fi
else
EXTLIBS="libsz.a libz.a"
for l in $EXTLIBS ; do
if test -f $l; then
echo "found $l" >> $RESULTSLOG
else
echo "$l not found." >> $RESULTSLOG
RETVAL=1
fi
done
if [ "$RETVAL" = "0" ]; then
# check to see if any shared library files are in the directory
# 'ls' returns 0 if it finds a match, non-zero if no match is found.
ls *.so* >& /dev/null
RETVAL=$?
if [ "$RETVAL" = "0" ]; then
#echo "Unexpected shared library files are present: FAILED"
STEP3RESULT=1
echo "Unexpected shared library files are present: FAILED" >> $RESULTSLOG
else
#echo "Static library files are included and no shared libraries are present: PASSED"
echo "Static library files are included and no shared libraries are present: PASSED" >> $RESULTSLOG
fi
else
#echo "Expected library files are missing: FAILED"
STEP3RESULT=1
echo "Expected library files are missing: FAILED" >> $RESULTSLOG
fi
fi
if [ "$STEP3RESULT" = "0" ]; then
echo "PASSED"
echo "Step 3 PASSED" >> $SUMMARYLOG
else
echo "**** FAILED ****"
echo "**** Step 3 FAILED ****" >> $RESULTSLOG
echo "**** Step 3 FAILED ****" >> $SUMMARYLOG
fi
# change to the $EXTRACTED/bin directory.
# For utilities testing we should already be in the utilities directory
cd ../bin
fi
# Step 4
echo "Executing step 4: Verify binary platform type."
STEP4RESULT=0
# This step is included to check that the binaries built with --enable-static-exec
# aren't dynamically linked to any libraries. --enable-static-exec doesn't work on
# solaris, and our macs and ppc64 only have dynamic zlib libraries, so we skip this step for
# those machines.
if [ -z "$IS_SOLARIS" ] && [ -z "$IS_MAC" ] && [ -z "$IS_PPC64" ]; then
RETVAL=0
EXEC_BINFILES="gif2h5 h52gif h5copy h5debug h5diff h5dump h5import h5jam h5ls h5mkgrp h5perf_serial h5repack h5repart h5stat h5unjam"
for e in $EXEC_BINFILES ; do
if [ -n "$IS_MAC" ]; then
OUTPUT=`otool -L $e`
else
OUTPUT=`ldd $e`
fi
match_number=`expr "$OUTPUT" : '\s*not a dynamic executable'`
if [ "$match_number" = "25" ]; then
#echo "$e $OUTPUT PASSED"
echo "$e $OUTPUT PASSED" >> $RESULTSLOG
else
#echo "$e $OUTPUT Please report whether this output is acceptable"
STEP4RESULT=1
echo "$e $OUTPUT Please report whether this output is acceptable" >> $RESULTSLOG
fi
done
if [ "$STEP4RESULT" = "0" ]; then
#echo "Executable files ran successfully on this platform"
echo "PASSED"
echo "Step 4 PASSED" >> $SUMMARYLOG
else
#echo "Not all executable files ran successfully on this platform"
echo "**** FAILED ****"
echo "**** Step 4 FAILED ****" >> $RESULTSLOG
echo "**** Step 4 FAILED. See $RESULTSLOG for details ****" >> $SUMMARYLOG
fi
fi
if [ -z "$UTILTEST" ]; then
# Step 5
echo "Executing step 5: Compile and test examples in hdf5-examples repository with the tar file's h5cc, h5fc and h5c++."
#return to the top level test directory (the starting directory)
cd $THIS_DIR
STEP5RESULT=0
# For the macs, we need DYLD_LIBRARY_PATH set to the lib directory of the hdf5 to be tested.
if [ -n "${IS_MAC}" ] && [ "${SHAREDLIBS}" = "yes" ]; then
DYLD_LIBRARY_PATH=$THIS_DIR/$EXTRACTED/lib
export DYLD_LIBRARY_PATH
fi
if test -d hdf5-examples ; then
rm -rf hdf5-examples
fi
svn co https://svn.hdfgroup.uiuc.edu/hdf5-examples/trunk/ hdf5-examples > checkout.log
CC=$THIS_DIR/$EXTRACTED/bin/h5cc
export CC
FC=$THIS_DIR/$EXTRACTED/bin/h5fc
export FC
# hdf5-examples/1_8/FORTRAN fails with -O2 or higher
if [ -n "$IS_MAC" ]; then
FCFLAGS=-O1
export FCFLAGS
fi
CXX=$THIS_DIR/$EXTRACTED/bin/h5c++
export CXX
H5EX_16=yes
export H5EX_16
H5EX_18=yes
export H5EX_18
cd hdf5-examples
./configure > ${EXAMPLE1LOG}
if [ "${FORTRAN}" = "yes" ]; then
make check > ${EXAMPLE1LOG}
else
cd 1_6
make check > ${EXAMPLE1LOG}
cd ../1_8/C
make check >> ${EXAMPLE1LOG}
cd ../..
fi
RETVAL=`echo $?`
NUMFAILED=`grep -c FAILED ${EXAMPLE1LOG}`
NUMFAILED0=`grep -c "# FAIL: 0" ${EXAMPLE1LOG}`
NUMPASSED=`grep -c "# PASS: 1" ${EXAMPLE1LOG}`
NUMTOTAL=`grep -c "# TOTAL: 1" ${EXAMPLE1LOG}`
NUMERR=`grep -i error ${EXAMPLE1LOG} | grep -v "# ERROR: 0" | grep -ic error`
NUMERR0=`grep -c "# ERROR: 0" ${EXAMPLE1LOG}`
# NUMPASSREQ=120
# if [ "${FORTRAN}" = "no" ]; then
# NUMPASSREQ=102
# fi
if test "$RETVAL" = "0" -a "$NUMFAILED" = "0" ; then
if test "$NUMERR" = "0" -a "$NUMPASSED" = "$NUMTOTAL" -a "$NUMERR0" = "$NUMTOTAL" -a "$NUMFAILED0" = "$NUMTOTAL" ; then
echo "PASSED"
echo "Step 5 PASSED: $NUMPASSED tests passed in hdf5-examples with no failures or errors" >> ${RESULTSLOG}
echo "Step 5 PASSED: $NUMPASSED tests passed in hdf5-examples with no failures or errors" >> ${SUMMARYLOG}
else
STEP5RESULT=1
if test $NUMERR -gt 0 -o $NUMFAILED -gt 0 ; then
echo "**** FAILED ****"
echo "**** Step 5 FAILED: Some examples failed. There were $NUMERR errors. See details in ${EXAMPLE1LOG} ****" >> ${RESULTSLOG}
echo "**** Step 5 FAILED: Some examples failed. There were $NUMERR errors. See details in ${EXAMPLE1LOG} ****" >> ${SUMMARYLOG}
else
echo "**** Step 5 FAILED: $NUMPASSED examples passed; there should have been at least $NUMTOTAL. See details in ${EXAMPLE1LOG} ****" >> ${RESULTSLOG}
echo "**** Step 5 FAILED: $NUMPASSED examples passed; there should have been at least $NUMTOTAL. See details in ${EXAMPLE1LOG} ****" >> ${SUMMARYLOG}
fi
fi
else
STEP5RESULT=1
echo "**** FAILED ****"
echo "**** Step 5 FAILED: Some examples failed. There were $NUMERR errors. See details in ${EXAMPLE1LOG} ****" >> ${RESULTSLOG}
echo "**** Step 5 FAILED: Some examples failed. There were $NUMERR errors. See details in ${EXAMPLE1LOG} ****" >> ${SUMMARYLOG}
fi
cd $THIS_DIR
# Step 6 NA for utilities
# Step 6
echo "Executing step 6: Use run-all-ex.sh to compile and run installed examples."
STEP6RESULT=0
cd $EXTRACTED/share/hdf5_examples
if [ "${FORTRAN}" = "no" ]; then
echo "Run c examples"
if ((cd c; sh ./run-c-ex.sh) && \
(if test -d c++; then
echo "Run c++ examples"
cd c++; sh ./run-c++-ex.sh
fi) && \
(if test -d hl; then
echo "Run hl examples."
cd hl && \
(cd c; sh ./run-hlc-ex.sh) && \
(if test -d c++; then
echo "Run hl c++ examples"
cd c++; sh ./run-hlc++-ex.sh
fi)
fi)) > $EXAMPLE2LOG; then
echo "Done"
RETVAL=0
else
RETVAL=1
fi
else
sh ./run-all-ex.sh > $EXAMPLE2LOG
RETVAL=$?
fi
if [ "$RETVAL" = "0" ]; then
echo "PASSED"
echo "Step 6 PASSED: The examples in .../share/hdf5_examples were successfully compiled and ran without errors." >> ${RESULTSLOG}
echo "Step 6 PASSED: The examples in .../share/hdf5_examples were successfully compiled and ran without errors." >> ${SUMMARYLOG}
else
echo "**** FAILED ****"
STEP6RESULT=1
"**** Step 6 FAILED: The examples in .../share/hdf5_examples failed to compile or run. See details in $EXAMPLE2LOG ****" >> ${RESULTSLOG}
"**** Step 6 FAILED: The examples in .../share/hdf5_examples failed to compile or run. See details in $EXAMPLE2LOG ****" >> ${SUMMARYLOG}
fi
fi
# Step 7
echo "Executing step 7: Run command -V with executables to be sure that they will run."
STEP7PASS=0
STEP7FAIL=0
STEP7RESULT=0
# h5debug and h5perf_serial don't return 0 with -V, so they aren't in this list. -h would be another
# option, but even more bin files don't return 0. h5redeploy is tested as part of install, and doesn't
# support -V.
EXEC_BINFILES="gif2h5 h52gif h5copy h5diff h5dump h5import h5jam h5ls h5mkgrp h5repack h5repart h5stat h5unjam"
for e in $EXEC_BINFILES ; do
OUTPUT=`$THIS_DIR/$EXTRACTED/bin/$e -V`
RETVAL=$?
if [ "$RETVAL" = "0" ]; then
echo "$e $OUTPUT PASSED" >> $RESULTSLOG
STEP7PASS=`expr $STEP7PASS + 1`
else
echo "$e $OUTPUT FAILED" >> $RESULTSLOG
STEP7FAIL=`expr $STEP7FAIL + 1`
fi
done
if [ $STEP7PASS -gt 12 ] && [ $STEP7FAIL -eq 0 ]; then
echo "PASSED"
echo "Step 7 PASSED: $STEP7PASS executable files in bin ran with -V on this machine." >> $SUMMARYLOG
else
STEP7RESULT=1
echo "**** FAILED ****"
echo "**** Step 7 FAILED: $STEP7FAIL executable files in bin failed to run with -V on this machine. ****" >> $RESULTSLOG
echo "**** Step 7 FAILED: $STEP7FAIL executable files in bin failed to run with -V on this machine. ****" >> $SUMMARYLOG
fi
# echo ""
# echo "SUMMARY:"
# echo ""
# echo "Uname information:"
# echo " Machine: $MACH_UNAME"
# echo " Binary: $BIN_UNAME"
# echo ""
# if [ "$C_COMP_INFO" = "NO MATCH" ]; then
# echo "$C_COMPILER not found in RELEASE.txt"
# else
# echo "C Compiler: $C_COMPILER - $C_COMP_INFO"
# fi
# if [ "$F_COMP_INFO" = "NO MATCH" ]; then
# echo "$F_COMPILER not found in RELEASE.txt"
# else
# echo "Fortran Compiler: $F_COMPILER - $F_COMP_INFO"
# fi
# if [ "$CXX_COMP_INFO" = "NO MATCH" ]; then
# echo "$CXX_COMPILER not found in RELEASE.txt"
# else
# echo "C++ Compiler: $CXX_COMPILER - $CXX_COMP_INFO"
# fi
# echo ""
if [ "$STEP0RESULT" != "0" ]; then
THIS_TEST_RESULT=1
echo "Step 0 failed"
STEP0RESULT=0
fi
if [ "$STEP1RESULT" != "0" ]; then
THIS_TEST_RESULT=1
echo "Step 1 failed"
STEP1RESULT=0
fi
if [ "$STEP2RESULT" != "0" ]; then
THIS_TEST_RESULT=1
echo "Step 2 failed"
STEP2RESULT=0
fi
if [ "$STEP3RESULT" != "0" ]; then
THIS_TEST_RESULT=1
echo "Step 3 failed"
STEP3RESULT=0
fi
if [ "$STEP4RESULT" != "0" ]; then
THIS_TEST_RESULT=1
echo "Step 4 failed"
STEP4RESULT=0
fi
if [ "$STEP5RESULT" != "0" ]; then
THIS_TEST_RESULT=1
echo "Step 5 failed"
STEP5RESULT=0
fi
if [ "$STEP6RESULT" != "0" ]; then
THIS_TEST_RESULT=1
echo "Step 6 failed"
STEP6RESULT=0
fi
if [ "$STEP7RESULT" != "0" ]; then
THIS_TEST_RESULT=1
echo "Step 7 failed"
STEP7RESULT=0
fi
echo "Done testing $f"
if [ "$THIS_TEST_RESULT" != "0" ]; then
TEST_RESULT=1
FAILED_TEST_LOGS="$FAILED_TEST_LOGS $RESULTSLOG"
fi
done
echo ""
if [ "$TEST_RESULT" = "0" ]; then
echo "**** FINAL RESULT: All tests PASSED ****"
else
echo "**** FINAL RESULT: TESTS FAILED! See FAILED details in $FAILED_TEST_LOGS ****"
fi
echo ""
echo "For this version we need to perform the two following checks manually. We hope that for future versions these can also be automated, and any suggestions for accomplishing that are most welcome."
echo ""
echo "The output of \"uname -a\" for this machine is:"
echo ""
echo " $MACH_UNAME"
echo ""
echo "The \"Uname information\" line from the libhdf5.settings in this binary is:"
echo ""
echo " $BIN_UNAME"
echo ""
echo "Please verify that the above information for this machine is compatible with that from the binary."
echo ""
echo $C_COMPILER
echo ""
echo $F_COMPILER
echo ""
echo $CXX_COMPILER
echo ""
echo "Please check that these compiler versions are listed for this platform in the \"Platforms Tested\" section of the binary's RELEASE.txt file."
#cat $THIS_DIR/*Summary

View File

@@ -62,6 +62,7 @@ $Source = "";
"int32_t" => "Is",
"unsigned" => "Iu",
"unsigned int" => "Iu",
"uint32_t" => "Iu",
"H5I_type_t" => "It",
"H5G_link_t" => "Ll", #Same as H5L_type_t now
"H5L_type_t" => "Ll",
@@ -74,6 +75,7 @@ $Source = "";
"hobj_ref_t" => "r",
"H5R_type_t" => "Rt",
"char" => "s",
"unsigned char" => "s",
"H5S_class_t" => "Sc",
"H5S_seloper_t" => "Ss",
"H5S_sel_type" => "St",
@@ -96,7 +98,9 @@ $Source = "";
"H5A_operator2_t" => "x",
"H5A_info_t" => "x",
"H5AC_cache_config_t" => "x",
"H5D_gather_func_t" => "x",
"H5D_operator_t" => "x",
"H5D_scatter_func_t" => "x",
"H5E_auto_t" => "x",
"H5E_auto1_t" => "x",
"H5E_auto2_t" => "x",
@@ -111,7 +115,8 @@ $Source = "";
"H5G_iterate_t" => "x",
"H5G_info_t" => "x",
"H5I_free_t" => "x",
"H5L_class_t" => "x",
"H5I_search_func_t" => "x",
"H5L_class_t" => "x",
"H5L_elink_traverse_t" => "x",
"H5L_iterate_t" => "x",
"H5MM_allocate_t" => "x",
@@ -135,6 +140,7 @@ $Source = "";
"H5T_conv_except_func_t" => "x",
"H5Z_func_t" => "x",
"H5Z_filter_func_t" => "x",
"va_list" => "x",
"size_t" => "z",
"H5Z_SO_scale_type_t" => "Za",
"H5Z_class_t" => "Zc",
@@ -273,14 +279,10 @@ sub rewrite_func ($$$$$) {
# The H5TRACE() statement
if ($body =~ /\/\*[ \t]*NO[ \t]*TRACE[ \t]*\*\//) {
if ($body =~ /\s*H5TRACE\d+\s*\(/) {
errmesg $file, $name, "warning: trace info was not updated because of NO TRACE comment";
} else {
errmesg $file, $name, "warning: trace info was not inserted because of NO TRACE comment";
}
# Ignored due to NO TRACE comment.
} elsif ($body =~ s/((\n[ \t]*)H5TRACE\d+\s*\(.*?\);)\n/"$2$trace"/es) {
# Replaced an H5TRACE macro
} elsif ($body=~s/((\n[ \t]*)FUNC_ENTER\w*\s*\(.*?\);??)\n/"$1$2$trace"/es) {
# Replaced an H5TRACE macro.
} elsif ($body=~s/((\n[ \t]*)FUNC_ENTER\w*\s*(\(.*?\))?;??)\n/"$1$2$trace"/es) {
# Added an H5TRACE macro after a FUNC_ENTER macro.
} else {
errmesg $file, $name, "unable to insert tracing information";
@@ -309,14 +311,14 @@ for $file (@ARGV) {
# Make modifications
my $original = $Source;
my $napi = $Source =~ s/\n([A-Za-z]\w*(\s+[a-z]\w*)*)\s*\n #type
my $napi = $Source =~ s/\n([A-Za-z]\w*(\s+[A-Za-z]\w*)*\s*\**)\n #type
(H5[A-Z]{0,2}[^_A-Z0-9]\w*) #name
\s*\((.*?)\)\s* #args
(\{.*?\n\}[^\n]*) #body
/rewrite_func($file,$1,$3,$4,$5)/segx;
$total_api += $napi;
# If the source changed then print out the new version
# If the source changed then print out the new version
if ($original ne $Source) {
printf "%s: instrumented %d API function%s\n",
$file, $napi, 1==$napi?"":"s";
@@ -327,3 +329,6 @@ for $file (@ARGV) {
}
}
}
printf "Finished processing HDF5 API calls\n"

View File

@@ -1,24 +1,24 @@
cmake_minimum_required (VERSION 2.8.6)
cmake_minimum_required (VERSION 3.1.0)
PROJECT (HDF5_CPP)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Shared/Static Libs
#-----------------------------------------------------------------------------
IF (BUILD_SHARED_LIBS)
SET (CPP_BUILT_AS_DYNAMIC_LIB 1)
ELSE (BUILD_SHARED_LIBS)
SET (CPP_BUILT_AS_STATIC_LIB 1)
ENDIF (BUILD_SHARED_LIBS)
if (BUILD_SHARED_LIBS)
set (CPP_BUILT_AS_DYNAMIC_LIB 1)
else (BUILD_SHARED_LIBS)
set (CPP_BUILT_AS_STATIC_LIB 1)
endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Generate configure file
#-----------------------------------------------------------------------------
CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in
${HDF5_BINARY_DIR}/H5cxx_pubconf.h
)
@@ -31,23 +31,23 @@ INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR})
#-----------------------------------------------------------------------------
# Parallel/MPI, prevent spurious cpp/cxx warnings
#-----------------------------------------------------------------------------
IF (H5_HAVE_PARALLEL)
ADD_DEFINITIONS ("-DMPICH_SKIP_MPICXX")
ADD_DEFINITIONS ("-DMPICH_IGNORE_CXX_SEEK")
ENDIF (H5_HAVE_PARALLEL)
if (H5_HAVE_PARALLEL)
add_definitions ("-DMPICH_SKIP_MPICXX")
add_definitions ("-DMPICH_IGNORE_CXX_SEEK")
endif (H5_HAVE_PARALLEL)
ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/src ${HDF5_CPP_BINARY_DIR}/src)
add_subdirectory (${HDF5_CPP_SOURCE_DIR}/src ${HDF5_CPP_BINARY_DIR}/src)
#-----------------------------------------------------------------------------
# Build the CPP Examples
#-----------------------------------------------------------------------------
IF (HDF5_BUILD_EXAMPLES)
ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/examples ${HDF5_CPP_BINARY_DIR}/examples)
ENDIF (HDF5_BUILD_EXAMPLES)
if (HDF5_BUILD_EXAMPLES)
add_subdirectory (${HDF5_CPP_SOURCE_DIR}/examples ${HDF5_CPP_BINARY_DIR}/examples)
endif (HDF5_BUILD_EXAMPLES)
#-----------------------------------------------------------------------------
# Build the CPP unit tests
#-----------------------------------------------------------------------------
IF (BUILD_TESTING)
ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/test ${HDF5_CPP_BINARY_DIR}/test)
ENDIF (BUILD_TESTING)
if (BUILD_TESTING)
add_subdirectory (${HDF5_CPP_SOURCE_DIR}/test ${HDF5_CPP_BINARY_DIR}/test)
endif (BUILD_TESTING)

View File

@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.12.3 from Makefile.am.
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -31,23 +31,51 @@
# Top-level HDF5-C++ Makefile(.in)
#
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
test $$am__dry = yes; \
}
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -66,14 +94,15 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/bin/mkinstalldirs \
$(top_srcdir)/config/commence.am \
$(top_srcdir)/config/conclude.am COPYING
DIST_COMMON = $(top_srcdir)/config/commence.am \
$(top_srcdir)/config/conclude.am $(srcdir)/Makefile.in \
$(srcdir)/Makefile.am $(top_srcdir)/bin/mkinstalldirs \
$(top_srcdir)/bin/test-driver COPYING
TESTS =
subdir = c++
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
$(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
@@ -94,13 +123,14 @@ am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -108,15 +138,230 @@ am__can_run_installinfo = \
esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
check recheck distdir
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__tty_colors_dummy = \
mgn= red= grn= lgn= blu= brg= std=; \
am__color_tests=no
am__tty_colors = $(am__tty_colors_dummy)
am__tty_colors = { \
$(am__tty_colors_dummy); \
if test "X$(AM_COLOR_TESTS)" = Xno; then \
am__color_tests=no; \
elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
am__color_tests=yes; \
elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
am__color_tests=yes; \
fi; \
if test $$am__color_tests = yes; then \
red=''; \
grn=''; \
lgn=''; \
blu=''; \
mgn=''; \
brg=''; \
std=''; \
fi; \
}
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__recheck_rx = ^[ ]*:recheck:[ ]*
am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
# A command that, given a newline-separated list of test names on the
# standard input, print the name of the tests that are to be re-run
# upon "make recheck".
am__list_recheck_tests = $(AWK) '{ \
recheck = 1; \
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
{ \
if (rc < 0) \
{ \
if ((getline line2 < ($$0 ".log")) < 0) \
recheck = 0; \
break; \
} \
else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
{ \
recheck = 0; \
break; \
} \
else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
{ \
break; \
} \
}; \
if (recheck) \
print $$0; \
close ($$0 ".trs"); \
close ($$0 ".log"); \
}'
# A command that, given a newline-separated list of test names on the
# standard input, create the global log from their .trs and .log files.
am__create_global_log = $(AWK) ' \
function fatal(msg) \
{ \
print "fatal: making $@: " msg | "cat >&2"; \
exit 1; \
} \
function rst_section(header) \
{ \
print header; \
len = length(header); \
for (i = 1; i <= len; i = i + 1) \
printf "="; \
printf "\n\n"; \
} \
{ \
copy_in_global_log = 1; \
global_test_result = "RUN"; \
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
{ \
if (rc < 0) \
fatal("failed to read from " $$0 ".trs"); \
if (line ~ /$(am__global_test_result_rx)/) \
{ \
sub("$(am__global_test_result_rx)", "", line); \
sub("[ ]*$$", "", line); \
global_test_result = line; \
} \
else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
copy_in_global_log = 0; \
}; \
if (copy_in_global_log) \
{ \
rst_section(global_test_result ": " $$0); \
while ((rc = (getline line < ($$0 ".log"))) != 0) \
{ \
if (rc < 0) \
fatal("failed to read from " $$0 ".log"); \
print line; \
}; \
printf "\n"; \
}; \
close ($$0 ".trs"); \
close ($$0 ".log"); \
}'
# Restructured Text title.
am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
# Solaris 10 'make', and several other traditional 'make' implementations,
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
# by disabling -e (using the XSI extension "set +e") if it's set.
am__sh_e_setup = case $$- in *e*) set +e;; esac
# Default flags passed to test drivers.
am__common_driver_flags = \
--color-tests "$$am__color_tests" \
--enable-hard-errors "$$am__enable_hard_errors" \
--expect-failure "$$am__expect_failure"
# To be inserted before the command running the test. Creates the
# directory for the log if needed. Stores in $dir the directory
# containing $f, in $tst the test, in $log the log. Executes the
# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
# will run the test scripts (or their associated LOG_COMPILER, if
# thy have one).
am__check_pre = \
$(am__sh_e_setup); \
$(am__vpath_adj_setup) $(am__vpath_adj) \
$(am__tty_colors); \
srcdir=$(srcdir); export srcdir; \
case "$@" in \
*/*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
*) am__odir=.;; \
esac; \
test "x$$am__odir" = x"." || test -d "$$am__odir" \
|| $(MKDIR_P) "$$am__odir" || exit $$?; \
if test -f "./$$f"; then dir=./; \
elif test -f "$$f"; then dir=; \
else dir="$(srcdir)/"; fi; \
tst=$$dir$$f; log='$@'; \
if test -n '$(DISABLE_HARD_ERRORS)'; then \
am__enable_hard_errors=no; \
else \
am__enable_hard_errors=yes; \
fi; \
case " $(XFAIL_TESTS) " in \
*[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
am__expect_failure=yes;; \
*) \
am__expect_failure=no;; \
esac; \
$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
# A shell command to get the names of the tests scripts with any registered
# extension removed (i.e., equivalently, the names of the test logs, with
# the '.log' extension removed). The result is saved in the shell variable
# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
# since that might cause problem with VPATH rewrites for suffix-less tests.
# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
am__set_TESTS_bases = \
bases='$(TEST_LOGS)'; \
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
bases=`echo $$bases`
RECHECK_LOGS = $(TEST_LOGS)
TEST_SUITE_LOG = test-suite.log
am__test_logs1 = $(TESTS:=.log)
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
TEST_LOGS = $(am__test_logs2:.sh.log=.log)
SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver
SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS)
am__set_b = \
case '$@' in \
*/*) \
case '$*' in \
*/*) b='$*';; \
*) b=`echo '$@' | sed 's/\.log$$//'`; \
esac;; \
*) \
b='$*';; \
esac
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@@ -160,7 +405,6 @@ AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -192,7 +436,6 @@ DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
DYNAMIC_DIRS = @DYNAMIC_DIRS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -211,14 +454,11 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GPFS = @GPFS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
H5_CXX_SHARED = @H5_CXX_SHARED@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -227,6 +467,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -244,7 +485,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
LARGEFILE = @LARGEFILE@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -260,7 +500,6 @@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
MPI_GET_SIZE = @MPI_GET_SIZE@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@@ -278,7 +517,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -287,7 +525,6 @@ R_INTEGER = @R_INTEGER@
R_LARGE = @R_LARGE@
SEARCH = @SEARCH@
SED = @SED@
SETX = @SETX@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIZE_T = @SIZE_T@
@@ -302,10 +539,6 @@ TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@
USE_FILTER_NBIT = @USE_FILTER_NBIT@
USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@
USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
VERSION = @VERSION@
@@ -419,8 +652,8 @@ TRACE = perl $(top_srcdir)/bin/trace
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
# *.clog are from the MPE option.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# *.clog and *.clog2 are from the MPE option.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
@BUILD_CXX_CONDITIONAL_TRUE@SUBDIRS = src test
DIST_SUBDIRS = src test examples
@@ -446,6 +679,7 @@ TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_)
all: all-recursive
.SUFFIXES:
.SUFFIXES: .log .sh .sh$(EXEEXT) .trs
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -490,14 +724,13 @@ clean-libtool:
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
@@ -518,31 +751,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
cscopelist-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -558,12 +773,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -575,15 +785,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -592,9 +798,10 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-recursive
cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP)'; \
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
@@ -610,6 +817,151 @@ cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
# Recover from deleted '.trs' file; this should ensure that
# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
# to avoid problems with "make -n".
.log.trs:
rm -f $< $@
$(MAKE) $(AM_MAKEFLAGS) $<
# Leading 'am--fnord' is there to ensure the list of targets does not
# expand to empty, as could happen e.g. with make check TESTS=''.
am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
am--force-recheck:
@:
$(TEST_SUITE_LOG): $(TEST_LOGS)
@$(am__set_TESTS_bases); \
am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
redo_bases=`for i in $$bases; do \
am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
done`; \
if test -n "$$redo_bases"; then \
redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
if $(am__make_dryrun); then :; else \
rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
fi; \
fi; \
if test -n "$$am__remaking_logs"; then \
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
"recursion detected" >&2; \
else \
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
fi; \
if $(am__make_dryrun); then :; else \
st=0; \
errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
for i in $$redo_bases; do \
test -f $$i.trs && test -r $$i.trs \
|| { echo "$$errmsg $$i.trs" >&2; st=1; }; \
test -f $$i.log && test -r $$i.log \
|| { echo "$$errmsg $$i.log" >&2; st=1; }; \
done; \
test $$st -eq 0 || exit 1; \
fi
@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
ws='[ ]'; \
results=`for b in $$bases; do echo $$b.trs; done`; \
test -n "$$results" || results=/dev/null; \
all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
if test `expr $$fail + $$xpass + $$error` -eq 0; then \
success=true; \
else \
success=false; \
fi; \
br='==================='; br=$$br$$br$$br$$br; \
result_count () \
{ \
if test x"$$1" = x"--maybe-color"; then \
maybe_colorize=yes; \
elif test x"$$1" = x"--no-color"; then \
maybe_colorize=no; \
else \
echo "$@: invalid 'result_count' usage" >&2; exit 4; \
fi; \
shift; \
desc=$$1 count=$$2; \
if test $$maybe_colorize = yes && test $$count -gt 0; then \
color_start=$$3 color_end=$$std; \
else \
color_start= color_end=; \
fi; \
echo "$${color_start}# $$desc $$count$${color_end}"; \
}; \
create_testsuite_report () \
{ \
result_count $$1 "TOTAL:" $$all "$$brg"; \
result_count $$1 "PASS: " $$pass "$$grn"; \
result_count $$1 "SKIP: " $$skip "$$blu"; \
result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
result_count $$1 "FAIL: " $$fail "$$red"; \
result_count $$1 "XPASS:" $$xpass "$$red"; \
result_count $$1 "ERROR:" $$error "$$mgn"; \
}; \
{ \
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
$(am__rst_title); \
create_testsuite_report --no-color; \
echo; \
echo ".. contents:: :depth: 2"; \
echo; \
for b in $$bases; do echo $$b; done \
| $(am__create_global_log); \
} >$(TEST_SUITE_LOG).tmp || exit 1; \
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
if $$success; then \
col="$$grn"; \
else \
col="$$red"; \
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
fi; \
echo "$${col}$$br$${std}"; \
echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
echo "$${col}$$br$${std}"; \
create_testsuite_report --maybe-color; \
echo "$$col$$br$$std"; \
if $$success; then :; else \
echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
if test -n "$(PACKAGE_BUGREPORT)"; then \
echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
fi; \
echo "$$col$$br$$std"; \
fi; \
$$success || exit 1
recheck: all
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@set +e; $(am__set_TESTS_bases); \
bases=`for i in $$bases; do echo $$i; done \
| $(am__list_recheck_tests)` || exit 1; \
log_list=`for i in $$bases; do echo $$i.log; done`; \
log_list=`echo $$log_list`; \
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
am__force_recheck=am--force-recheck \
TEST_LOGS="$$log_list"; \
exit $$?
.sh.log:
@p='$<'; \
$(am__set_b); \
$(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
@am__EXEEXT_TRUE@.sh$(EXEEXT).log:
@am__EXEEXT_TRUE@ @p='$<'; \
@am__EXEEXT_TRUE@ $(am__set_b); \
@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -691,6 +1043,9 @@ install-strip:
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
clean-generic:
@@ -768,14 +1123,11 @@ ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \
cscopelist-recursive ctags-recursive install-am install-strip \
tags-recursive
.MAKE: $(am__recursive_targets) check-am install-am install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am all-local check check-TESTS check-am clean \
clean-generic clean-libtool cscopelist cscopelist-recursive \
ctags ctags-recursive distclean distclean-generic \
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
check check-TESTS check-am clean clean-generic clean-libtool \
cscopelist-am ctags ctags-am distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
@@ -785,7 +1137,7 @@ uninstall-am:
installcheck-am installcheck-local installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am
# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.8.6)
cmake_minimum_required (VERSION 3.1.0)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
# with "cpp_ex_". This allows for easier filtering of the examples.
@@ -10,7 +10,7 @@ PROJECT (HDF5_CPP_EXAMPLES)
# Define examples
#-----------------------------------------------------------------------------
SET (examples
set (examples
create
readdata
writedata
@@ -20,35 +20,34 @@ SET (examples
h5group
)
FOREACH (example ${examples})
ADD_EXECUTABLE (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
set (tutr_examples
h5tutr_cmprss
h5tutr_crtdat
h5tutr_crtatt
h5tutr_crtgrpar
h5tutr_crtgrp
h5tutr_crtgrpd
h5tutr_extend
h5tutr_rdwt
h5tutr_subset
)
foreach (example ${examples})
add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE})
TARGET_LINK_LIBRARIES (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
SET_TARGET_PROPERTIES (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
ENDFOREACH (example ${examples})
TARGET_C_PROPERTIES (cpp_ex_${example} ${LIB_TYPE} " " " ")
target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
endforeach (example ${examples})
IF (BUILD_TESTING)
# Remove any output file left over from previous test run
ADD_TEST (
NAME cpp_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
Group.h5
SDS.h5
SDScompound.h5
SDSextendible.h5
Select.h5
)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (cpp_ex-clear-objects PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "cpp_ex-clear-objects")
foreach (example ${tutr_examples})
add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE})
TARGET_C_PROPERTIES (cpp_ex_${example} ${LIB_TYPE} " " " ")
target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
endforeach (example ${tutr_examples})
FOREACH (example ${examples})
ADD_TEST (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "cpp_ex_${example}")
ENDFOREACH (example ${examples})
ENDIF (BUILD_TESTING)
if (BUILD_TESTING)
include (CMakeTests.cmake)
endif (BUILD_TESTING)

View File

@@ -0,0 +1,61 @@
##############################################################################
##############################################################################
### T E S T I N G ###
##############################################################################
##############################################################################
# Remove any output file left over from previous test run
add_test (
NAME CPP_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
Group.h5
SDS.h5
SDScompound.h5
SDSextendible.h5
Select.h5
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (CPP_ex-clear-objects PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "CPP_ex-clear-objects")
foreach (example ${examples})
add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "CPP_ex_${example}")
endforeach (example ${examples})
#the following dependicies are handled by the order of the files
# SET_TESTS_PROPERTIES(CPP_ex_readdata PROPERTIES DEPENDS CPP_ex_create)
# SET_TESTS_PROPERTIES(CPP_ex_chunks PROPERTIES DEPENDS CPP_ex_extend_ds)
add_test (
NAME CPP_ex_tutr-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
h5tutr_cmprss.h5
h5tutr_dset.h5
h5tutr_extend.h5
h5tutr_group.h5
h5tutr_groups.h5
h5tutr_subset.h5
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (CPP_ex_tutr-clear-objects PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "CPP_ex_tutr-clear-objects")
foreach (example ${tutr_examples})
add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "CPP_ex_${example}")
endforeach (example ${tutr_examples})
#the following dependicies are handled by the order of the files
# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtatt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat)
# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_rdwt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat)
# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtgrpd PROPERTIES DEPENDS CPP_ex_h5tutr_crtgrpar)

View File

@@ -21,19 +21,30 @@
include $(top_srcdir)/config/commence.am
INSTALL_SCRIPT_FILES = run-c++-ex.sh
# These are the programs that 'make all' or 'make prog' will build and
# which 'make check' will run. List them in the order they should be run.
EXAMPLE_PROG=create readdata writedata compound extend_ds chunks h5group
EXAMPLE_PROG=create readdata writedata compound extend_ds chunks h5group \
h5tutr_cmprss h5tutr_crtatt h5tutr_crtdat h5tutr_crtgrpar \
h5tutr_crtgrp h5tutr_crtgrpd h5tutr_extend h5tutr_rdwt \
h5tutr_subset
TEST_SCRIPT=testh5c++.sh
TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES)
# These are the example files to be installed
INSTALL_FILES=create.cpp readdata.cpp writedata.cpp compound.cpp \
extend_ds.cpp chunks.cpp h5group.cpp
INSTALL_SCRIPT_FILES = run-c++-ex.sh
extend_ds.cpp chunks.cpp h5group.cpp \
h5tutr_cmprss.cpp h5tutr_crtatt.cpp h5tutr_crtdat.cpp \
h5tutr_crtgrpar.cpp h5tutr_crtgrp.cpp h5tutr_crtgrpd.cpp \
h5tutr_extend.cpp h5tutr_rdwt.cpp h5tutr_subset.cpp
# Some of the examples depend on files created by running other examples
readdata.chkexe_: create.chkexe_
chunks.chkexe_: extend_ds.chkexe_
h5tutr_rdwt.chkexe_: h5tutr_crtdat.chkexe
h5tutrcrtatt.chkexe_: h5tutr_crtdat.chkexe
h5tutr_crtgrpd.chkexe_: h5tutr_crtgrpar.chkexe
# Tell conclude.am that these are C++ tests.
CXX_API=yes
@@ -58,5 +69,15 @@ extend_ds: $(srcdir)/extend_ds.cpp
chunks: $(srcdir)/chunks.cpp
h5group: $(srcdir)/h5group.cpp
h5tutr_cmprss: $(srcdir)/h5tutr_cmprss.cpp
h5tutr_crtatt: $(srcdir)/h5tutr_crtatt.cpp
h5tutr_crtdat: $(srcdir)/h5tutr_crtdat.cpp
h5tutr_crtgrpar: $(srcdir)/h5tutr_crtgrpar.cpp
h5tutr_crtgrp: $(srcdir)/h5tutr_crtgrp.cpp
h5tutr_crtgrpd: $(srcdir)/h5tutr_crtgrpd.cpp
h5tutr_extend: $(srcdir)/h5tutr_extend.cpp
h5tutr_rdwt: $(srcdir)/h5tutr_rdwt.cpp
h5tutr_subset: $(srcdir)/h5tutr_subset.cpp
include $(top_srcdir)/config/examples.am
include $(top_srcdir)/config/conclude.am

View File

@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.12.3 from Makefile.am.
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -35,23 +35,51 @@
# built using h5cc (or h5fc, etc.) instead of the standard compilers.
# This creates some extra work for us.
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
test $$am__dry = yes; \
}
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -70,16 +98,17 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
DIST_COMMON = $(top_srcdir)/config/commence.am \
$(top_srcdir)/config/examples.am \
$(top_srcdir)/config/conclude.am $(srcdir)/Makefile.in \
$(srcdir)/Makefile.am $(top_srcdir)/bin/mkinstalldirs \
$(srcdir)/run-c++-ex.sh.in $(srcdir)/testh5c++.sh.in \
$(top_srcdir)/bin/mkinstalldirs \
$(top_srcdir)/config/commence.am \
$(top_srcdir)/config/conclude.am \
$(top_srcdir)/config/examples.am
$(top_srcdir)/bin/test-driver
TESTS = $(TEST_SCRIPT)
subdir = c++/examples
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
$(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
@@ -105,10 +134,207 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__tty_colors_dummy = \
mgn= red= grn= lgn= blu= brg= std=; \
am__color_tests=no
am__tty_colors = $(am__tty_colors_dummy)
am__tty_colors = { \
$(am__tty_colors_dummy); \
if test "X$(AM_COLOR_TESTS)" = Xno; then \
am__color_tests=no; \
elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
am__color_tests=yes; \
elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
am__color_tests=yes; \
fi; \
if test $$am__color_tests = yes; then \
red=''; \
grn=''; \
lgn=''; \
blu=''; \
mgn=''; \
brg=''; \
std=''; \
fi; \
}
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__recheck_rx = ^[ ]*:recheck:[ ]*
am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
# A command that, given a newline-separated list of test names on the
# standard input, print the name of the tests that are to be re-run
# upon "make recheck".
am__list_recheck_tests = $(AWK) '{ \
recheck = 1; \
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
{ \
if (rc < 0) \
{ \
if ((getline line2 < ($$0 ".log")) < 0) \
recheck = 0; \
break; \
} \
else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
{ \
recheck = 0; \
break; \
} \
else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
{ \
break; \
} \
}; \
if (recheck) \
print $$0; \
close ($$0 ".trs"); \
close ($$0 ".log"); \
}'
# A command that, given a newline-separated list of test names on the
# standard input, create the global log from their .trs and .log files.
am__create_global_log = $(AWK) ' \
function fatal(msg) \
{ \
print "fatal: making $@: " msg | "cat >&2"; \
exit 1; \
} \
function rst_section(header) \
{ \
print header; \
len = length(header); \
for (i = 1; i <= len; i = i + 1) \
printf "="; \
printf "\n\n"; \
} \
{ \
copy_in_global_log = 1; \
global_test_result = "RUN"; \
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
{ \
if (rc < 0) \
fatal("failed to read from " $$0 ".trs"); \
if (line ~ /$(am__global_test_result_rx)/) \
{ \
sub("$(am__global_test_result_rx)", "", line); \
sub("[ ]*$$", "", line); \
global_test_result = line; \
} \
else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
copy_in_global_log = 0; \
}; \
if (copy_in_global_log) \
{ \
rst_section(global_test_result ": " $$0); \
while ((rc = (getline line < ($$0 ".log"))) != 0) \
{ \
if (rc < 0) \
fatal("failed to read from " $$0 ".log"); \
print line; \
}; \
printf "\n"; \
}; \
close ($$0 ".trs"); \
close ($$0 ".log"); \
}'
# Restructured Text title.
am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
# Solaris 10 'make', and several other traditional 'make' implementations,
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
# by disabling -e (using the XSI extension "set +e") if it's set.
am__sh_e_setup = case $$- in *e*) set +e;; esac
# Default flags passed to test drivers.
am__common_driver_flags = \
--color-tests "$$am__color_tests" \
--enable-hard-errors "$$am__enable_hard_errors" \
--expect-failure "$$am__expect_failure"
# To be inserted before the command running the test. Creates the
# directory for the log if needed. Stores in $dir the directory
# containing $f, in $tst the test, in $log the log. Executes the
# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
# will run the test scripts (or their associated LOG_COMPILER, if
# thy have one).
am__check_pre = \
$(am__sh_e_setup); \
$(am__vpath_adj_setup) $(am__vpath_adj) \
$(am__tty_colors); \
srcdir=$(srcdir); export srcdir; \
case "$@" in \
*/*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
*) am__odir=.;; \
esac; \
test "x$$am__odir" = x"." || test -d "$$am__odir" \
|| $(MKDIR_P) "$$am__odir" || exit $$?; \
if test -f "./$$f"; then dir=./; \
elif test -f "$$f"; then dir=; \
else dir="$(srcdir)/"; fi; \
tst=$$dir$$f; log='$@'; \
if test -n '$(DISABLE_HARD_ERRORS)'; then \
am__enable_hard_errors=no; \
else \
am__enable_hard_errors=yes; \
fi; \
case " $(XFAIL_TESTS) " in \
*[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
am__expect_failure=yes;; \
*) \
am__expect_failure=no;; \
esac; \
$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
# A shell command to get the names of the tests scripts with any registered
# extension removed (i.e., equivalently, the names of the test logs, with
# the '.log' extension removed). The result is saved in the shell variable
# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
# since that might cause problem with VPATH rewrites for suffix-less tests.
# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
am__set_TESTS_bases = \
bases='$(TEST_LOGS)'; \
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
bases=`echo $$bases`
RECHECK_LOGS = $(TEST_LOGS)
AM_RECURSIVE_TARGETS = check recheck
TEST_SUITE_LOG = test-suite.log
am__test_logs1 = $(TESTS:=.log)
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
TEST_LOGS = $(am__test_logs2:.sh.log=.log)
SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver
SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS)
am__set_b = \
case '$@' in \
*/*) \
case '$*' in \
*/*) b='$*';; \
*) b=`echo '$@' | sed 's/\.log$$//'`; \
esac;; \
*) \
b='$*';; \
esac
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
@@ -127,7 +353,6 @@ AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -159,7 +384,6 @@ DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
DYNAMIC_DIRS = @DYNAMIC_DIRS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -178,14 +402,11 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GPFS = @GPFS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
H5_CXX_SHARED = @H5_CXX_SHARED@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
@@ -194,6 +415,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -211,7 +433,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
LARGEFILE = @LARGEFILE@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -227,7 +448,6 @@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
MPI_GET_SIZE = @MPI_GET_SIZE@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@@ -245,7 +465,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -254,7 +473,6 @@ R_INTEGER = @R_INTEGER@
R_LARGE = @R_LARGE@
SEARCH = @SEARCH@
SED = @SED@
SETX = @SETX@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIZE_T = @SIZE_T@
@@ -269,10 +487,6 @@ TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@
USE_FILTER_NBIT = @USE_FILTER_NBIT@
USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@
USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
VERSION = @VERSION@
@@ -386,19 +600,27 @@ TRACE = perl $(top_srcdir)/bin/trace
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
# *.clog are from the MPE option.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
# *.clog and *.clog2 are from the MPE option.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5
INSTALL_SCRIPT_FILES = run-c++-ex.sh
# These are the programs that 'make all' or 'make prog' will build and
# which 'make check' will run. List them in the order they should be run.
EXAMPLE_PROG = create readdata writedata compound extend_ds chunks h5group
EXAMPLE_PROG = create readdata writedata compound extend_ds chunks h5group \
h5tutr_cmprss h5tutr_crtatt h5tutr_crtdat h5tutr_crtgrpar \
h5tutr_crtgrp h5tutr_crtgrpd h5tutr_extend h5tutr_rdwt \
h5tutr_subset
TEST_SCRIPT = testh5c++.sh
TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES)
# These are the example files to be installed
INSTALL_FILES = create.cpp readdata.cpp writedata.cpp compound.cpp \
extend_ds.cpp chunks.cpp h5group.cpp
extend_ds.cpp chunks.cpp h5group.cpp \
h5tutr_cmprss.cpp h5tutr_crtatt.cpp h5tutr_crtdat.cpp \
h5tutr_crtgrpar.cpp h5tutr_crtgrp.cpp h5tutr_crtgrpd.cpp \
h5tutr_extend.cpp h5tutr_rdwt.cpp h5tutr_subset.cpp
INSTALL_SCRIPT_FILES = run-c++-ex.sh
# Tell conclude.am that these are C++ tests.
CXX_API = yes
@@ -437,6 +659,7 @@ TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_)
all: all-am
.SUFFIXES:
.SUFFIXES: .log .sh .sh$(EXEEXT) .trs
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/examples.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -478,15 +701,158 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
tags: TAGS
TAGS:
tags TAGS:
ctags: CTAGS
CTAGS:
ctags CTAGS:
cscope cscopelist:
# Recover from deleted '.trs' file; this should ensure that
# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
# to avoid problems with "make -n".
.log.trs:
rm -f $< $@
$(MAKE) $(AM_MAKEFLAGS) $<
# Leading 'am--fnord' is there to ensure the list of targets does not
# expand to empty, as could happen e.g. with make check TESTS=''.
am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
am--force-recheck:
@:
$(TEST_SUITE_LOG): $(TEST_LOGS)
@$(am__set_TESTS_bases); \
am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
redo_bases=`for i in $$bases; do \
am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
done`; \
if test -n "$$redo_bases"; then \
redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
if $(am__make_dryrun); then :; else \
rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
fi; \
fi; \
if test -n "$$am__remaking_logs"; then \
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
"recursion detected" >&2; \
else \
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
fi; \
if $(am__make_dryrun); then :; else \
st=0; \
errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
for i in $$redo_bases; do \
test -f $$i.trs && test -r $$i.trs \
|| { echo "$$errmsg $$i.trs" >&2; st=1; }; \
test -f $$i.log && test -r $$i.log \
|| { echo "$$errmsg $$i.log" >&2; st=1; }; \
done; \
test $$st -eq 0 || exit 1; \
fi
@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
ws='[ ]'; \
results=`for b in $$bases; do echo $$b.trs; done`; \
test -n "$$results" || results=/dev/null; \
all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
if test `expr $$fail + $$xpass + $$error` -eq 0; then \
success=true; \
else \
success=false; \
fi; \
br='==================='; br=$$br$$br$$br$$br; \
result_count () \
{ \
if test x"$$1" = x"--maybe-color"; then \
maybe_colorize=yes; \
elif test x"$$1" = x"--no-color"; then \
maybe_colorize=no; \
else \
echo "$@: invalid 'result_count' usage" >&2; exit 4; \
fi; \
shift; \
desc=$$1 count=$$2; \
if test $$maybe_colorize = yes && test $$count -gt 0; then \
color_start=$$3 color_end=$$std; \
else \
color_start= color_end=; \
fi; \
echo "$${color_start}# $$desc $$count$${color_end}"; \
}; \
create_testsuite_report () \
{ \
result_count $$1 "TOTAL:" $$all "$$brg"; \
result_count $$1 "PASS: " $$pass "$$grn"; \
result_count $$1 "SKIP: " $$skip "$$blu"; \
result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
result_count $$1 "FAIL: " $$fail "$$red"; \
result_count $$1 "XPASS:" $$xpass "$$red"; \
result_count $$1 "ERROR:" $$error "$$mgn"; \
}; \
{ \
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
$(am__rst_title); \
create_testsuite_report --no-color; \
echo; \
echo ".. contents:: :depth: 2"; \
echo; \
for b in $$bases; do echo $$b; done \
| $(am__create_global_log); \
} >$(TEST_SUITE_LOG).tmp || exit 1; \
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
if $$success; then \
col="$$grn"; \
else \
col="$$red"; \
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
fi; \
echo "$${col}$$br$${std}"; \
echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
echo "$${col}$$br$${std}"; \
create_testsuite_report --maybe-color; \
echo "$$col$$br$$std"; \
if $$success; then :; else \
echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
if test -n "$(PACKAGE_BUGREPORT)"; then \
echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
fi; \
echo "$$col$$br$$std"; \
fi; \
$$success || exit 1
recheck: all
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@set +e; $(am__set_TESTS_bases); \
bases=`for i in $$bases; do echo $$i; done \
| $(am__list_recheck_tests)` || exit 1; \
log_list=`for i in $$bases; do echo $$i.log; done`; \
log_list=`echo $$log_list`; \
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
am__force_recheck=am--force-recheck \
TEST_LOGS="$$log_list"; \
exit $$?
.sh.log:
@p='$<'; \
$(am__set_b); \
$(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
@am__EXEEXT_TRUE@.sh$(EXEEXT).log:
@am__EXEEXT_TRUE@ @p='$<'; \
@am__EXEEXT_TRUE@ $(am__set_b); \
@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -543,6 +909,9 @@ install-strip:
fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -624,17 +993,18 @@ uninstall-am: uninstall-local
.MAKE: check-am install-am install-strip
.PHONY: all all-am all-local check check-TESTS check-am clean \
clean-generic clean-libtool distclean distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-data-local install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installcheck-local installdirs \
clean-generic clean-libtool cscopelist-am ctags-am distclean \
distclean-generic distclean-libtool distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-data-local install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installcheck-local installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
pdf-am ps ps-am uninstall uninstall-am uninstall-local
pdf-am ps ps-am recheck tags-am uninstall uninstall-am \
uninstall-local
# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
@@ -651,6 +1021,9 @@ help:
# Some of the examples depend on files created by running other examples
readdata.chkexe_: create.chkexe_
chunks.chkexe_: extend_ds.chkexe_
h5tutr_rdwt.chkexe_: h5tutr_crtdat.chkexe
h5tutrcrtatt.chkexe_: h5tutr_crtdat.chkexe
h5tutr_crtgrpd.chkexe_: h5tutr_crtgrpar.chkexe
# How to build programs using h5c++
$(EXTRA_PROG): $(H5CPP)
@@ -668,6 +1041,16 @@ extend_ds: $(srcdir)/extend_ds.cpp
chunks: $(srcdir)/chunks.cpp
h5group: $(srcdir)/h5group.cpp
h5tutr_cmprss: $(srcdir)/h5tutr_cmprss.cpp
h5tutr_crtatt: $(srcdir)/h5tutr_crtatt.cpp
h5tutr_crtdat: $(srcdir)/h5tutr_crtdat.cpp
h5tutr_crtgrpar: $(srcdir)/h5tutr_crtgrpar.cpp
h5tutr_crtgrp: $(srcdir)/h5tutr_crtgrp.cpp
h5tutr_crtgrpd: $(srcdir)/h5tutr_crtgrpd.cpp
h5tutr_extend: $(srcdir)/h5tutr_extend.cpp
h5tutr_rdwt: $(srcdir)/h5tutr_rdwt.cpp
h5tutr_subset: $(srcdir)/h5tutr_subset.cpp
# How to create EXAMPLEDIR if it doesn't already exist
$(EXAMPLEDIR):
-$(top_srcdir)/bin/mkdirs $@
@@ -708,27 +1091,34 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
uninstall-examples:
@if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
fi
fi
@if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \
fi
fi
@if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \
fi
fi
@if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \
fi
fi
installcheck-local:
@if test "$(STATIC_SHARED)" = "static, shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
$(MAKE) $(AM_MAKEFLAGS) clean; \
H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \
elif test "$(STATIC_SHARED)" = "shared"; then \
elif test "$(STATIC_SHARED)" = "shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
else \
else \
$(MAKE) $(AM_MAKEFLAGS) check; \
fi
fi
@if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \
echo "============================"; \
echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \
echo "============================"; \
(cd $(EXAMPLEDIR); \
/bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
fi
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.

View File

@@ -0,0 +1,162 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* This example illustrates how to create a compressed dataset.
* It is used in the HDF5 Tutorial.
*/
#include <iostream>
#include <string>
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
using namespace H5;
#ifndef H5_NO_STD
using std::cout;
using std::endl;
#endif // H5_NO_STD
#endif
const H5std_string FILE_NAME("h5tutr_cmprss.h5");
const H5std_string DATASET_NAME("Compressed_Data");
const int DIM0 = 100;
const int DIM1 = 20;
int main (void)
{
hsize_t dims[2] = { DIM0, DIM1 }; // dataset dimensions
hsize_t chunk_dims[2] = { 20, 20 }; // chunk dimensions
int i,j, buf[DIM0][DIM1];
// Try block to detect exceptions raised by any of the calls inside it
try
{
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
// Create a new file using the default property lists.
H5File file(FILE_NAME, H5F_ACC_TRUNC);
// Create the data space for the dataset.
DataSpace *dataspace = new DataSpace(2, dims);
// Modify dataset creation property to enable chunking
DSetCreatPropList *plist = new DSetCreatPropList;
plist->setChunk(2, chunk_dims);
// Set ZLIB (DEFLATE) Compression using level 6.
// To use SZIP compression comment out this line.
plist->setDeflate(6);
// Uncomment these lines to set SZIP Compression
// unsigned szip_options_mask = H5_SZIP_NN_OPTION_MASK;
// unsigned szip_pixels_per_block = 16;
// plist->setSzip(szip_options_mask, szip_pixels_per_block);
// Create the dataset.
DataSet *dataset = new DataSet(file.createDataSet( DATASET_NAME,
PredType::STD_I32BE, *dataspace, *plist) );
for (i = 0; i< DIM0; i++)
for (j=0; j<DIM1; j++)
buf[i][j] = i+j;
// Write data to dataset.
dataset->write(buf, PredType::NATIVE_INT);
// Close objects and file. Either approach will close the HDF5 item.
delete dataspace;
delete dataset;
delete plist;
file.close();
// -----------------------------------------------
// Re-open the file and dataset, retrieve filter
// information for dataset and read the data back.
// -----------------------------------------------
int rbuf[DIM0][DIM1];
int numfilt;
size_t nelmts={1}, namelen={1};
unsigned flags, filter_info, cd_values[1], idx;
char name[1];
H5Z_filter_t filter_type;
// Open the file and the dataset in the file.
file.openFile(FILE_NAME, H5F_ACC_RDONLY);
dataset = new DataSet(file.openDataSet( DATASET_NAME));
// Get the create property list of the dataset.
plist = new DSetCreatPropList(dataset->getCreatePlist ());
// Get the number of filters associated with the dataset.
numfilt = plist->getNfilters();
cout << "Number of filters associated with dataset: " << numfilt << endl;
for (idx=0; idx < numfilt; idx++) {
nelmts = 0;
filter_type = plist->getFilter(idx, flags, nelmts, cd_values, namelen, name , filter_info);
cout << "Filter Type: ";
switch (filter_type) {
case H5Z_FILTER_DEFLATE:
cout << "H5Z_FILTER_DEFLATE" << endl;
break;
case H5Z_FILTER_SZIP:
cout << "H5Z_FILTER_SZIP" << endl;
break;
default:
cout << "Other filter type included." << endl;
}
}
// Read data.
dataset->read(rbuf, PredType::NATIVE_INT);
delete plist;
delete dataset;
file.close(); // can be skipped
} // end of try block
// catch failure caused by the H5File operations
catch(FileIException error)
{
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
catch(DataSetIException error)
{
error.printError();
return -1;
}
// catch failure caused by the DataSpace operations
catch(DataSpaceIException error)
{
error.printError();
return -1;
}
return 0; // successfully terminated
}

View File

@@ -0,0 +1,95 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* This example illustrates how to create an attribute attached to a
* dataset. It is used in the HDF5 Tutorial.
*/
#include <iostream>
#include <string>
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
using namespace H5;
#endif
const H5std_string FILE_NAME( "h5tutr_dset.h5" );
const H5std_string DATASET_NAME( "dset" );
const H5std_string ATTR_NAME( "Units" );
const int DIM1 = 2;
int main (void)
{
int attr_data[2] = { 100, 200};
hsize_t dims[1] = { DIM1 };
// Try block to detect exceptions raised by any of the calls inside it
try
{
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
// Open an existing file and dataset.
H5File file( FILE_NAME, H5F_ACC_RDWR );
DataSet dataset = file.openDataSet( DATASET_NAME );
// Create the data space for the attribute.
DataSpace attr_dataspace = DataSpace (1, dims );
// Create a dataset attribute.
Attribute attribute = dataset.createAttribute( ATTR_NAME, PredType::STD_I32BE,
attr_dataspace);
// Write the attribute data.
attribute.write( PredType::NATIVE_INT, attr_data);
} // end of try block
// catch failure caused by the H5File operations
catch( DataSpaceIException error )
{
error.printError();
return -1;
}
// catch failure caused by the H5File operations
catch( AttributeIException error )
{
error.printError();
return -1;
}
// catch failure caused by the H5File operations
catch( FileIException error )
{
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
catch( DataSetIException error )
{
error.printError();
return -1;
}
return 0; // successfully terminated
}

View File

@@ -0,0 +1,82 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* This example illustrates how to create a dataset that is a 4 x 6
* array. It is used in the HDF5 Tutorial.
*/
#include <iostream>
#include <string>
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
using namespace H5;
#endif
const H5std_string FILE_NAME("h5tutr_dset.h5");
const H5std_string DATASET_NAME("dset");
const int NX = 4; // dataset dimensions
const int NY = 6;
const int RANK = 2;
int main (void)
{
// Try block to detect exceptions raised by any of the calls inside it
try
{
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
// Create a new file using the default property lists.
H5File file(FILE_NAME, H5F_ACC_TRUNC);
// Create the data space for the dataset.
hsize_t dims[2]; // dataset dimensions
dims[0] = NX;
dims[1] = NY;
DataSpace dataspace(RANK, dims);
// Create the dataset.
DataSet dataset = file.createDataSet(DATASET_NAME, PredType::STD_I32BE, dataspace);
} // end of try block
// catch failure caused by the H5File operations
catch(FileIException error)
{
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
catch(DataSetIException error)
{
error.printError();
return -1;
}
// catch failure caused by the DataSpace operations
catch(DataSpaceIException error)
{
error.printError();
return -1;
}
return 0; // successfully terminated
}

View File

@@ -0,0 +1,69 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* This example illustrates how to create and close a group.
* It is used in the HDF5 Tutorial.
*/
#include <iostream>
#include <string>
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
using namespace H5;
#ifndef H5_NO_STD
using std::cout;
using std::endl;
#endif // H5_NO_STD
#endif
const H5std_string FILE_NAME("h5tutr_group.h5");
int main(void)
{
// Try block to detect exceptions raised by any of the calls inside it
try
{
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
// Create a new file using default property lists.
H5File file(FILE_NAME, H5F_ACC_TRUNC);
// Create a group named "/MygGroup" in the file
Group group(file.createGroup("/MyGroup"));
// File and group will be closed as their instances go out of scope.
} // end of try block
// catch failure caused by the H5File operations
catch(FileIException error)
{
error.printError();
return -1;
}
// catch failure caused by the Group operations
catch(GroupIException error)
{
error.printError();
return -1;
}
return 0;
}

View File

@@ -0,0 +1,92 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* This example illustrates the creation of groups using absolute and
* relative names. It is used in the HDF5 Tutorial.
*/
#include <iostream>
#include <string>
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
using namespace H5;
#ifndef H5_NO_STD
using std::cout;
using std::endl;
#endif // H5_NO_STD
#endif
const H5std_string FILE_NAME("h5tutr_groups.h5");
int main(void)
{
// Try block to detect exceptions raised by any of the calls inside it
try
{
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately.
Exception::dontPrint();
// Create a new file using default properties.
H5File file(FILE_NAME, H5F_ACC_TRUNC);
// Create group "MyGroup" in the root group using an absolute name.
Group group1(file.createGroup( "/MyGroup"));
// Create group "Group_A" in group "MyGroup" using an
// absolute name.
Group group2(file.createGroup("/MyGroup/Group_A"));
// Create group "Group_B" in group "MyGroup" using a
// relative name.
Group group3(group1.createGroup ("Group_B"));
// Close the groups and file.
group1.close();
group2.close();
group3.close();
file.close();
} // end of try block
// catch failure caused by the File operations
catch(FileIException error)
{
error.printError();
return -1;
}
// catch failure caused by the Group operations
catch(GroupIException error)
{
error.printError();
return -1;
}
return 0;
}

View File

@@ -0,0 +1,141 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* This example illustrates how to create a dataset in a group.
* It is used in the HDF5 Tutorial.
*/
#include <iostream>
#include <string>
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
using namespace H5;
#ifndef H5_NO_STD
using std::cout;
using std::endl;
#endif // H5_NO_STD
#endif
const H5std_string FILE_NAME("h5tutr_groups.h5");
const H5std_string DATASET_NAME1("/MyGroup/dset1");
const H5std_string DATASET_NAME2("dset2");
const int RANK = 2;
const int D1DIM1 = 3;
const int D1DIM2 = 3;
const int D2DIM1 = 2;
const int D2DIM2 = 10;
int main(void)
{
int dset1_data[D1DIM1][D1DIM2], dset2_data[D2DIM1][D2DIM2]; // data buffers
int i, j;
// Try block to catch exceptions raised by any of the calls inside it
try
{
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
// Initialize the first dataset.
for (i = 0; i < D1DIM1; i++)
for (j = 0; j < D1DIM2; j++)
dset1_data[i][j] = j + 1;
// Initialize the second dataset.
for (i = 0; i < D2DIM1; i++)
for (j = 0; j < D2DIM2; j++)
dset2_data[i][j] = j + 1;
// Open an existing file and dataset.
H5File file(FILE_NAME, H5F_ACC_RDWR);
// Create the data space for the first dataset. Note the use of
// pointer for the instance 'dataspace'. It can be deleted and
// used again later for another data space. An HDF5 identifier is
// closed by the destructor or the method 'close()'.
hsize_t dims[RANK]; // dataset dimensions
dims[0] = D1DIM1;
dims[1] = D1DIM2;
DataSpace *dataspace = new DataSpace (RANK, dims);
// Create the dataset in group "MyGroup". Same note as for the
// dataspace above.
DataSet *dataset = new DataSet (file.createDataSet(DATASET_NAME1,
PredType::STD_I32BE, *dataspace));
// Write the data to the dataset using default memory space, file
// space, and transfer properties.
dataset->write(dset1_data, PredType::NATIVE_INT);
// Close the current dataset and data space.
delete dataset;
delete dataspace;
// Create the data space for the second dataset.
dims[0] = D2DIM1;
dims[1] = D2DIM2;
dataspace = new DataSpace (RANK, dims);
// Create group "Group_A" in group "MyGroup".
Group group(file.openGroup("/MyGroup/Group_A"));
// Create the second dataset in group "Group_A".
dataset = new DataSet (group.createDataSet(DATASET_NAME2,
PredType::STD_I32BE, *dataspace));
// Write the data to the dataset using default memory space, file
// space, and transfer properties.
dataset->write(dset2_data, PredType::NATIVE_INT);
// Close all objects.
delete dataspace;
delete dataset;
group.close();
} // end of try block
// catch failure caused by the H5File operations
catch(FileIException error)
{
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
catch(DataSetIException error)
{
error.printError();
return -1;
}
// catch failure caused by the DataSpace operations
catch(DataSpaceIException error)
{
error.printError();
return -1;
}
// catch failure caused by the Group operations
catch(GroupIException error)
{
error.printError();
return -1;
}
return 0;
}

View File

@@ -0,0 +1,177 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* This example illustrates how to create a dataset that is a 4 x 6
* array. It is used in the HDF5 Tutorial.
*/
#include <iostream>
#include <string>
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
using namespace H5;
#ifndef H5_NO_STD
using std::cout;
using std::endl;
#endif // H5_NO_STD
#endif
const H5std_string FILE_NAME("h5tutr_extend.h5");
const H5std_string DATASETNAME("ExtendibleArray");
int main (void)
{
hsize_t dims[2] = {3,3}; // dataset dimensions at creation
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims[2] ={2, 5};
int data[3][3] = { {1, 1, 1}, // data to write
{1, 1, 1},
{1, 1, 1} };
// Variables used in extending and writing to the extended portion of dataset
hsize_t size[2];
hsize_t offset[2];
hsize_t dimsext[2] = {7, 3}; // extend dimensions
int dataext[7][3] = { {2, 3, 4},
{2, 3, 4},
{2, 3, 4},
{2, 3, 4},
{2, 3, 4},
{2, 3, 4},
{2, 3, 4} };
// Try block to detect exceptions raised by any of the calls inside it
try
{
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
// Create a new file using the default property lists.
H5File file(FILE_NAME, H5F_ACC_TRUNC);
// Create the data space for the dataset. Note the use of pointer
// for the instance 'dataspace'. It can be deleted and used again
// later for another dataspace. An HDF5 identifier can be closed
// by the destructor or the method 'close()'.
DataSpace *dataspace = new DataSpace (2, dims, maxdims);
// Modify dataset creation property to enable chunking
DSetCreatPropList prop;
prop.setChunk(2, chunk_dims);
// Create the chunked dataset. Note the use of pointer.
DataSet *dataset = new DataSet(file.createDataSet( DATASETNAME,
PredType::STD_I32BE, *dataspace, prop) );
// Write data to dataset.
dataset->write(data, PredType::NATIVE_INT);
// Extend the dataset. Dataset becomes 10 x 3.
size[0] = dims[0] + dimsext[0];
size[1] = dims[1];
dataset->extend(size);
// Select a hyperslab in extended portion of the dataset.
DataSpace *filespace = new DataSpace(dataset->getSpace ());
offset[0] = 3;
offset[1] = 0;
filespace->selectHyperslab(H5S_SELECT_SET, dimsext, offset);
// Define memory space.
DataSpace *memspace = new DataSpace(2, dimsext, NULL);
// Write data to the extended portion of the dataset.
dataset->write(dataext, PredType::NATIVE_INT, *memspace, *filespace);
// Close all objects and file.
prop.close();
delete filespace;
delete memspace;
delete dataspace;
delete dataset;
file.close();
// ---------------------------------------
// Re-open the file and read the data back
// ---------------------------------------
int rdata[10][3];
int i,j, rank, rank_chunk;
hsize_t chunk_dimsr[2], dimsr[2];
// Open the file and dataset.
file.openFile(FILE_NAME, H5F_ACC_RDONLY);
dataset = new DataSet(file.openDataSet( DATASETNAME));
// Get the dataset's dataspace and creation property list.
filespace = new DataSpace(dataset->getSpace());
prop = dataset->getCreatePlist();
// Get information to obtain memory dataspace.
rank = filespace->getSimpleExtentNdims();
herr_t status_n = filespace->getSimpleExtentDims(dimsr);
if (H5D_CHUNKED == prop.getLayout())
rank_chunk = prop.getChunk(rank, chunk_dimsr);
cout << "rank chunk = " << rank_chunk << endl;;
memspace = new DataSpace(rank, dimsr, NULL);
dataset->read(rdata, PredType::NATIVE_INT, *memspace, *filespace);
cout << endl;
for (j = 0; j < dimsr[0]; j++) {
for (i = 0; i < dimsr[1]; i++)
cout << " " << rdata[j][i];
cout << endl;
}
// Close all objects and file.
prop.close();
delete filespace;
delete memspace;
delete dataset;
file.close();
} // end of try block
// catch failure caused by the H5File operations
catch(FileIException error)
{
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
catch(DataSetIException error)
{
error.printError();
return -1;
}
// catch failure caused by the DataSpace operations
catch(DataSpaceIException error)
{
error.printError();
return -1;
}
return 0; // successfully terminated
}

View File

@@ -0,0 +1,79 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* This example illustrates how to write to and read from an existing
* dataset. It is used in the HDF5 Tutorial.
*/
#include <iostream>
#include <string>
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
using namespace H5;
#endif
const H5std_string FILE_NAME("h5tutr_dset.h5");
const H5std_string DATASET_NAME("dset");
const int DIM0 = 4; // dataset dimensions
const int DIM1 = 6;
int main (void)
{
// Data initialization.
int i, j;
int data[DIM0][DIM1]; // buffer for data to write
for (j = 0; j < DIM0; j++)
for (i = 0; i < DIM1; i++)
data[j][i] = i * 6 + j + 1;
// Try block to detect exceptions raised by any of the calls inside it
try
{
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
// Open an existing file and dataset.
H5File file(FILE_NAME, H5F_ACC_RDWR);
DataSet dataset = file.openDataSet(DATASET_NAME);
// Write the data to the dataset using default memory space, file
// space, and transfer properties.
dataset.write(data, PredType::NATIVE_INT);
} // end of try block
// catch failure caused by the H5File operations
catch(FileIException error)
{
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
catch(DataSetIException error)
{
error.printError();
return -1;
}
return 0; // successfully terminated
}

View File

@@ -0,0 +1,183 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* This example illustrates how to read/write a subset of data (a slab)
* from/to a dataset in an HDF5 file. It is used in the HDF5 Tutorial.
*/
#include <iostream>
#include <string>
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
using namespace H5;
#ifndef H5_NO_STD
using std::cout;
using std::endl;
#endif // H5_NO_STD
#endif
const H5std_string FILE_NAME("h5tutr_subset.h5");
const H5std_string DATASET_NAME("IntArray");
const int RANK = 2;
const int DIM0_SUB = 3; // subset dimensions
const int DIM1_SUB = 4;
const int DIM0 = 8; // size of dataset
const int DIM1 = 10;
int main (void)
{
int i,j;
int data[DIM0][DIM1], sdata[DIM0_SUB][DIM1_SUB], rdata[DIM0][DIM1];
// Try block to detect exceptions raised by any of the calls inside it
try
{
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
Exception::dontPrint();
// ---------------------------------------------------
// Create a new file using the default property lists.
// Then create a dataset and write data to it.
// Close the file and dataset.
// ---------------------------------------------------
H5File file(FILE_NAME, H5F_ACC_TRUNC);
hsize_t dims[2];
dims[0] = DIM0;
dims[1] = DIM1;
DataSpace dataspace = DataSpace (RANK, dims);
DataSet dataset(file.createDataSet( DATASET_NAME,
PredType::STD_I32BE, dataspace) );
for (j = 0; j < DIM0; j++) {
for (i = 0; i < DIM1; i++)
if (i< (DIM1/2))
data[j][i] = 1;
else
data[j][i] = 2;
}
dataset.write(data, PredType::NATIVE_INT);
cout << endl << "Data Written to File:" << endl;
for (j = 0; j < DIM0; j++) {
for (i = 0; i < DIM1; i++)
cout << " " << data[j][i];
cout << endl;
}
dataspace.close();
dataset.close();
file.close();
// ---------------------------------------------------
// Reopen the file and dataset and write a subset of
// values to the dataset.
// ---------------------------------------------------
hsize_t offset[2], count[2], stride[2], block[2];
hsize_t dimsm[2];
file.openFile(FILE_NAME, H5F_ACC_RDWR);
dataset = file.openDataSet(DATASET_NAME);
// Specify size and shape of subset to write.
offset[0] = 1;
offset[1] = 2;
count[0] = DIM0_SUB;
count[1] = DIM1_SUB;
stride[0] = 1;
stride[1] = 1;
block[0] = 1;
block[1] = 1;
// Define Memory Dataspace. Get file dataspace and select
// a subset from the file dataspace.
dimsm[0] = DIM0_SUB;
dimsm[1] = DIM1_SUB;
DataSpace memspace(RANK, dimsm, NULL);
dataspace = dataset.getSpace();
dataspace.selectHyperslab(H5S_SELECT_SET, count, offset, stride, block);
// Write a subset of data to the dataset, then read the
// entire dataset back from the file.
cout << endl << "Write subset to file specifying: " << endl;
cout << " offset=1x2 stride=1x1 count=3x4 block=1x1" << endl;
for (j = 0; j < DIM0_SUB; j++) {
for (i = 0; i < DIM1_SUB; i++)
sdata[j][i] = 5;
}
dataset.write(sdata, PredType::NATIVE_INT, memspace, dataspace);
dataset.read(rdata, PredType::NATIVE_INT);
cout << endl << "Data in File after Subset is Written:" << endl;
for (i = 0; i < DIM0; i++) {
for (j = 0; j < DIM1; j++)
cout << " " << rdata[i][j];
cout << endl;
}
cout << endl;
// It is not necessary to close these objects because close() will
// be called when the object instances are going out of scope.
dataspace.close();
memspace.close();
dataset.close();
file.close();
} // end of try block
// catch failure caused by the H5File operations
catch(FileIException error)
{
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
catch(DataSetIException error)
{
error.printError();
return -1;
}
// catch failure caused by the DataSpace operations
catch(DataSpaceIException error)
{
error.printError();
return -1;
}
return 0; // successfully terminated
}

View File

@@ -64,6 +64,10 @@ RunTest()
# Run tests
if [ $? -eq 0 ]
then
echo "*************************************************"
echo "** Run C++ API Examples **"
echo "** **"
echo "*************************************************"
if (RunTest create &&\
rm create &&\
RunTest readdata &&\
@@ -82,6 +86,33 @@ then
else
EXIT_VALUE=${EXIT_FAILURE}
fi
echo
echo "***************************************************"
echo "** Run Tutorial Examples **"
echo "** **"
echo "***************************************************"
if (RunTest h5tutr_crtdat &&\
rm h5tutr_crtdat &&\
RunTest h5tutr_rdwt &&\
rm h5tutr_rdwt &&\
RunTest h5tutr_crtatt &&\
rm h5tutr_crtatt &&\
RunTest h5tutr_crtgrp &&\
rm h5tutr_crtgrp &&\
RunTest h5tutr_crtgrpar &&\
rm h5tutr_crtgrpar &&\
RunTest h5tutr_crtgrpd &&\
rm h5tutr_crtgrpd &&\
RunTest h5tutr_extend &&\
rm h5tutr_extend &&\
RunTest h5tutr_subset &&\
rm h5tutr_subset &&\
RunTest h5tutr_cmprss &&\
rm h5tutr_cmprss ); then
EXIT_VALUE=${EXIT_SUCCESS}
else
EXIT_VALUE=${EXIT_FAILURE}
fi
fi
# Cleanup

View File

@@ -1,24 +1,24 @@
cmake_minimum_required (VERSION 2.8.6)
cmake_minimum_required (VERSION 3.1.0)
PROJECT (HDF5_CPP_SRC)
#-----------------------------------------------------------------------------
# Shared/Static Libs
#-----------------------------------------------------------------------------
IF (BUILD_SHARED_LIBS)
SET (CPP_BUILT_AS_DYNAMIC_LIB 1)
ENDIF (BUILD_SHARED_LIBS)
if (BUILD_SHARED_LIBS)
set (CPP_BUILT_AS_DYNAMIC_LIB 1)
endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Generate configure file
#-----------------------------------------------------------------------------
CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in
${HDF5_BINARY_DIR}/H5cxx_pubconf.h
)
#-----------------------------------------------------------------------------
# Define cpp Library
#-----------------------------------------------------------------------------
SET (CPP_SRCS
set (CPP_SRCS
${HDF5_CPP_SRC_SOURCE_DIR}/H5AbstractDs.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5ArrayType.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5AtomType.cpp
@@ -40,6 +40,7 @@ SET (CPP_SRCS
${HDF5_CPP_SRC_SOURCE_DIR}/H5IdComponent.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5IntType.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5Library.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5Location.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5Object.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5PredType.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5PropList.cpp
@@ -47,7 +48,7 @@ SET (CPP_SRCS
${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.cpp
)
SET (CPP_HDRS
set (CPP_HDRS
${HDF5_CPP_SRC_SOURCE_DIR}/H5AbstractDs.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5Alltypes.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5ArrayType.h
@@ -74,6 +75,7 @@ SET (CPP_HDRS
${HDF5_CPP_SRC_SOURCE_DIR}/H5Include.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5IntType.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5Library.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5Location.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5Object.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5PredType.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5PropList.h
@@ -81,20 +83,24 @@ SET (CPP_HDRS
${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.h
)
ADD_LIBRARY (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} ${CPP_SRCS} ${CPP_HDRS})
TARGET_LINK_LIBRARIES (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}")
add_library (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} ${CPP_SRCS} ${CPP_HDRS})
TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} " " " ")
target_link_libraries (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} ${LIB_TYPE})
SET_TARGET_PROPERTIES (${HDF5_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/cpp)
set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES
FOLDER libraries/cpp
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
INSTALL (
install (
FILES
${CPP_HDRS}
DESTINATION
${HDF5_INSTALL_INCLUDE_DIR}/cpp
${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
cppheaders
)
@@ -102,11 +108,12 @@ INSTALL (
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
IF (HDF5_EXPORTED_TARGETS)
INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} cpplibraries)
if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries)
endif (BUILD_SHARED_LIBS)
INSTALL (
install (
TARGETS
${HDF5_CPP_LIB_TARGET}
EXPORT
@@ -115,4 +122,4 @@ IF (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT cpplibraries
)
ENDIF (HDF5_EXPORTED_TARGETS)
endif (HDF5_EXPORTED_TARGETS)

View File

@@ -25,11 +25,6 @@
#include "H5CommonFG.h"
#include "H5Alltypes.h"
#include <iostream> // remove when done
using std::cerr;
using std::endl;
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif

View File

@@ -14,13 +14,8 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// Class AbstractDs is an abstract base class, from which Attribute and
// DataSet inherit. It provides the services that are common to both
// Attribute and DataSet. It also inherits from H5Object and passes down
// the services that H5Object provides.
#ifndef _AbstractDs_H
#define _AbstractDs_H
#ifndef __AbstractDs_H
#define __AbstractDs_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
@@ -33,6 +28,14 @@ class FloatType;
class IntType;
class StrType;
class VarLenType;
/*! \class AbstractDs
\brief AbstractDs is an abstract base class, inherited by Attribute
and DataSet.
It provides a collection of services that are common to both Attribute
and DataSet. AbstractDs inherits from H5Object.
*/
class H5_DLLCPP AbstractDs {
public:
// Gets a copy the datatype of that this abstract dataset uses.
@@ -51,21 +54,20 @@ class H5_DLLCPP AbstractDs {
StrType getStrType() const;
VarLenType getVarLenType() const;
// Gets the size in memory of this abstract dataset.
///\brief Gets the size in memory of this abstract dataset.
virtual size_t getInMemDataSize() const = 0;
// Gets the dataspace of this abstract dataset - pure virtual.
///\brief Gets the dataspace of this abstract dataset - pure virtual.
virtual DataSpace getSpace() const = 0;
// Gets the class of the datatype that is used by this abstract
// dataset.
H5T_class_t getTypeClass() const;
// Returns the amount of storage size required for this abstract
// dataset - pure virtual.
///\brief Returns the amount of storage size required - pure virtual.
virtual hsize_t getStorageSize() const = 0;
// Returns this class name
// Returns this class name - pure virtual.
virtual H5std_string fromClass() const = 0;
// Copy constructor
@@ -82,10 +84,10 @@ class H5_DLLCPP AbstractDs {
AbstractDs( const hid_t ds_id );
private:
// This member function is implemented by DataSet and Attribute.
// This member function is implemented by DataSet and Attribute - pure virtual.
virtual hid_t p_get_type() const = 0;
};
#ifndef H5_NO_NAMESPACE
}
#endif
#endif // _AbstractDs_H
#endif // __AbstractDs_H

View File

@@ -54,15 +54,16 @@ ArrayType::ArrayType( const hid_t existing_id ) : DataType( existing_id )
rank = H5Tget_array_ndims(existing_id);
if (rank < 0)
{
throw DataTypeIException("ArrayType overloaded constructor", "H5Tget_array_ndims failed");
throw DataTypeIException("ArrayType constructor (existing id)", "H5Tget_array_ndims failed");
}
// Get the dimensions of the existing array and store it in this array
dimensions = new hsize_t[rank];
//hsize_t rdims2[H5S_MAX_RANK];
int ret_value = H5Tget_array_dims2(id, dimensions);
if (ret_value < 0)
throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims2 failed");
// Allocate space for the dimensions
dimensions = new hsize_t[rank];
// Get the dimensions of the existing array and store it in this array
int ret_value = H5Tget_array_dims2(id, dimensions);
if (ret_value < 0)
throw DataTypeIException("ArrayType constructor (existing id)", "H5Tget_array_dims2 failed");
}
//--------------------------------------------------------------------------
@@ -72,10 +73,13 @@ ArrayType::ArrayType( const hid_t existing_id ) : DataType( existing_id )
//--------------------------------------------------------------------------
ArrayType::ArrayType( const ArrayType& original ) : DataType( original )
{
rank = original.rank;
dimensions = new hsize_t[rank];
for (int i = 0; i < rank; i++)
dimensions[i] = original.dimensions[i];
// Copy the rank of the original array
rank = original.rank;
// Allocate space then copy the dimensions from the original array
dimensions = new hsize_t[rank];
for (int i = 0; i < rank; i++)
dimensions[i] = original.dimensions[i];
}
//--------------------------------------------------------------------------
@@ -90,14 +94,19 @@ ArrayType::ArrayType( const ArrayType& original ) : DataType( original )
//--------------------------------------------------------------------------
ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims) : DataType()
{
hid_t new_type_id = H5Tarray_create2(base_type.getId(), ndims, dims);
if (new_type_id < 0)
throw DataTypeIException("ArrayType constructor", "H5Tarray_create2 failed");
id = new_type_id;
rank = ndims;
dimensions = new hsize_t[rank];
for (int i = 0; i < rank; i++)
dimensions[i] = dims[i];
// Call C API to create an array data type
hid_t new_type_id = H5Tarray_create2(base_type.getId(), ndims, dims);
if (new_type_id < 0)
throw DataTypeIException("ArrayType constructor", "H5Tarray_create2 failed");
// Set the id and rank for this object
id = new_type_id;
rank = ndims;
// Allocate space then set the dimensions as provided by caller
dimensions = new hsize_t[rank];
for (int i = 0; i < rank; i++)
dimensions[i] = dims[i];
}
//--------------------------------------------------------------------------
@@ -132,19 +141,19 @@ int ArrayType::getArrayNDims()
//--------------------------------------------------------------------------
int ArrayType::getArrayDims(hsize_t* dims)
{
// if the array's dimensions have not been stored, retrieve them via C API
// If the array's dimensions have not been stored, retrieve them via C API
if (dimensions == NULL)
{
int ndims = H5Tget_array_dims2(id, dims);
if (ndims < 0)
throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims2 failed");
// store the array's info in memory
// Store the array's info in memory
rank = ndims;
dimensions = new hsize_t[rank];
for (int i = 0; i < rank; i++)
dimensions[i] = dims[i];
}
// otherwise, simply copy what's in 'dimensions' to 'dims'
// Otherwise, simply copy what's in 'dimensions' to 'dims'
for (int i = 0; i < rank; i++)
dims[i] = dimensions[i];
return(rank);

View File

@@ -14,16 +14,17 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// Class ArrayType inherits from DataType and provides wrappers for the
// HDF5 C's Array Datatypes.
#ifndef _H5ArrayType_H
#define _H5ArrayType_H
#ifndef __H5ArrayType_H
#define __H5ArrayType_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
/*! \class ArrayType
\brief Class ArrayType inherits from DataType and provides wrappers for
the HDF5's Array Datatypes.
*/
class H5_DLLCPP ArrayType : public DataType {
public:
// Constructor that creates a new array data type based on the
@@ -36,7 +37,7 @@ class H5_DLLCPP ArrayType : public DataType {
// Returns the sizes of dimensions of this array datatype.
int getArrayDims(hsize_t* dims);
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("ArrayType"); }
// Copy constructor: makes copy of the original object.
@@ -59,4 +60,4 @@ class H5_DLLCPP ArrayType : public DataType {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5ArrayType_H

View File

@@ -45,7 +45,6 @@ AtomType::AtomType() : DataType() {}
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType( const hid_t existing_id ) : DataType( existing_id ) {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: AtomType copy constructor
@@ -53,6 +52,7 @@ AtomType::AtomType( const hid_t existing_id ) : DataType( existing_id ) {}
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType( const AtomType& original ) : DataType( original ) {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: AtomType::setSize
@@ -285,12 +285,14 @@ void AtomType::setPad( H5T_pad_t lsb, H5T_pad_t msb ) const
}
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: AtomType destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::~AtomType() {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
#ifndef H5_NO_NAMESPACE
} // end namespace

View File

@@ -14,18 +14,20 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// Class AtomType is a base class, from which IntType, FloatType, StrType,
// and PredType inherit. It provides the services that are common to these
// subclasses. It also inherits from DataType and passes down the
// services that are common to all the datatypes.
#ifndef _H5AtomType_H
#define _H5AtomType_H
#ifndef __H5AtomType_H
#define __H5AtomType_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
/*! \class AtomType
\brief AtomType is a base class, inherited by IntType, FloatType,
StrType, and PredType.
AtomType provides operations on HDF5 atomic datatypes. It also inherits
from DataType.
*/
class H5_DLLCPP AtomType : public DataType {
public:
// Returns the byte order of an atomic datatype.
@@ -57,14 +59,16 @@ class H5_DLLCPP AtomType : public DataType {
// Sets the total size for an atomic datatype.
void setSize( size_t size ) const;
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("AtomType"); }
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Copy constructor - makes copy of the original object
AtomType( const AtomType& original );
// Noop destructor
virtual ~AtomType();
#endif // DOXYGEN_SHOULD_SKIP_THIS
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -78,4 +82,4 @@ class H5_DLLCPP AtomType : public DataType {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5AtomType_H

View File

@@ -44,12 +44,13 @@ namespace H5 {
#endif // H5_NO_STD
#endif
class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate
//--------------------------------------------------------------------------
// Function: Attribute default constructor
///\brief Default constructor: Creates a stub attribute
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
Attribute::Attribute() : AbstractDs(), IdComponent(), id(0) {}
Attribute::Attribute() : AbstractDs(), IdComponent(), id(H5I_INVALID_HID) {}
//--------------------------------------------------------------------------
// Function: Attribute copy constructor
@@ -161,13 +162,13 @@ void Attribute::read( const DataType& mem_type, void *buf ) const
// Mar 2008
// Corrected a misunderstanding that H5Aread would allocate
// space for the buffer. Obtained the attribute size and
// allocated memory properly. - BMR
// allocated memory properly. -BMR
// Apr 2009
// Used getInMemDataSize to get attribute data size. - BMR
// Used getInMemDataSize to get attribute data size. -BMR
// Jul 2009
// Divided into specific private functions for fixed- and
// variable-len string data: p_read_fixed_len and
// p_read_variable_len. This should improve readability.
// p_read_variable_len. This should improve readability. -BMR
//--------------------------------------------------------------------------
void Attribute::read(const DataType& mem_type, H5std_string& strg) const
{
@@ -298,75 +299,169 @@ H5std_string Attribute::getFileName() const
//--------------------------------------------------------------------------
// Function: Attribute::getName
///\brief Gets the name of this attribute, returning its length.
///\param buf_size - IN: Desired length of the name
///\param attr_name - OUT: Buffer for the name string
///\return Length of the attribute name
///\param attr_name - OUT: Buffer for the name string as char*
///\param buf_size - IN: Length of the buffer, default to 0
///\return Actual length of the attribute name
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Nov, 2001
///\par Description
/// This function retrieves \a buf_size chars of the attribute's
/// name including null termination. Thus, if the actual length
/// of the name is more than buf_size-1, the retrieved name will
/// be truncated to accommodate the null terminator.
/// To get length of the attribute's name for buffer allocation,
/// an application can call this function passing in NULL for the
/// first argument and ignore the second argument.
// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
ssize_t Attribute::getName( size_t buf_size, H5std_string& attr_name ) const
ssize_t Attribute::getName(char* attr_name, size_t buf_size) const
{
char* name_C = new char[buf_size+1]; // temporary C-string for C API
// H5Aget_name will get buf_size-1 chars of the name to null terminate it
ssize_t name_size = H5Aget_name(id, buf_size, attr_name);
// Calls C routine H5Aget_name to get the name of the attribute
ssize_t name_size = H5Aget_name( id, buf_size, name_C );
// If H5Aget_name returns a negative value, raise an exception
if (name_size < 0)
{
throw AttributeIException("Attribute::getName", "H5Aget_name failed");
}
else if (name_size == 0)
{
throw AttributeIException("Attribute::getName", "Attribute must have a name, name length is 0");
}
// Return length of the name
return(name_size);
}
// If H5Aget_name returns a negative value, raise an exception,
if( name_size < 0 )
{
throw AttributeIException("Attribute::getName", "H5Aget_name failed");
}
// otherwise, convert the C attribute name and return
attr_name = name_C;
delete []name_C;
return( name_size );
//--------------------------------------------------------------------------
// Function: Attribute::getName
///\brief Returns the name of this attribute as an \a H5std_string.
///\return Name of the attribute
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - May, 2004
// Modification
// Mar 2014 - BMR
// Revised to use the modified getName() above
//--------------------------------------------------------------------------
H5std_string Attribute::getName() const
{
H5std_string attr_name(""); // attribute name to return
// Preliminary call to get the size of the attribute name
ssize_t name_size = H5Aget_name(id, (size_t)0, NULL);
// If H5Aget_name failed, throw exception
if (name_size < 0)
{
throw AttributeIException("Attribute::getName", "H5Aget_name failed");
}
else if (name_size == 0)
{
throw AttributeIException("Attribute::getName", "Attribute must have a name, name length is 0");
}
// Attribute's name exists, retrieve it
else if (name_size > 0)
{
char* name_C = new char[name_size+1]; // temporary C-string
HDmemset(name_C, 0, name_size+1); // clear buffer
// Use overloaded function
name_size = getName(name_C, name_size+1);
// Convert the C attribute name to return
attr_name = name_C;
// Clean up resource
delete []name_C;
}
// Return attribute's name
return(attr_name);
}
//--------------------------------------------------------------------------
// Function: Attribute::getName
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it returns the
/// attribute's name, not the length.
///\return Name of the attribute
///\param buf_size - IN: Desired length of the name
/// It differs from the above function in that it takes an integer
/// specifying a desired length to be retrieved of the name.
///\return Name (or part of name) of the attribute
///\param len - IN: Desired length of the name
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
// Modification
// Mar 2014 - BMR
// Revised to use the new getName() below
//--------------------------------------------------------------------------
H5std_string Attribute::getName( size_t buf_size ) const
H5std_string Attribute::getName(size_t len) const
{
H5std_string attr_name;
ssize_t name_size = getName( buf_size, attr_name );
return( attr_name );
ssize_t name_size = getName(attr_name, len);
return(attr_name);
// let caller catch exception if any
}
//--------------------------------------------------------------------------
// Function: Attribute::getName
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above functions in that it doesn't take
/// any arguments and returns the attribute's name.
///\return Name of the attribute
///\brief Gets the name of this attribute, returning its length.
///\param attr_name - OUT: Buffer for the name string as \a H5std_string
///\param len - IN: Desired length of the name, default to 0
///\return Actual length of the attribute name
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - May, 2004
///\par Description
/// This function retrieves the attribute's name as a string. The
/// buf_size can specify a specific length or default to 0, in
/// which case the entire name will be retrieved.
// Programmer Binh-Minh Ribler - Nov, 2001
// Modification
// Mar 2014 - BMR
// Added to replace getName(size_t, H5std_string&) so that it'll
// allow the argument "len" to be skipped.
//--------------------------------------------------------------------------
H5std_string Attribute::getName() const
ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
{
// Try with 256 characters for the name first, if the name's length
// returned is more than that then, read the name again with the
// appropriate space allocation
char* name_C = new char[256]; // temporary C-string for C API
ssize_t name_size = H5Aget_name(id, 255, name_C);
ssize_t name_size = 0;
H5std_string attr_name;
if (name_size >= 256)
name_size = getName(name_size, attr_name);
// If no length is provided, get the entire attribute name
if (len == 0)
{
attr_name = getName();
name_size = attr_name.length();
}
// If length is provided, get that number of characters in name
else
{
char* name_C = new char[len+1]; // temporary C-string
HDmemset(name_C, 0, len+1); // clear buffer
// otherwise, convert the C attribute name and return
else
attr_name = name_C;
// Use overloaded function
name_size = getName(name_C, len+1);
delete []name_C;
return( attr_name );
// Convert the C attribute name to return
attr_name = name_C;
// Clean up resource
delete []name_C;
}
// Otherwise, keep attr_name intact
// Return name size
return(name_size);
}
//--------------------------------------------------------------------------
// Function: Attribute::getName
///\brief This function is replaced by the previous function, which
/// provides more convenient prototype. It will be removed
/// in future release.
///\param len - IN: Desired length of the name
///\param attr_name - OUT: Buffer for the name string
///\return Actual length of the attribute name
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Nov, 2001
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
//--------------------------------------------------------------------------
ssize_t Attribute::getName( size_t len, H5std_string& attr_name ) const
{
return (getName(attr_name, len));
}
//--------------------------------------------------------------------------
@@ -384,9 +479,35 @@ hsize_t Attribute::getStorageSize() const
return (storage_size);
}
//--------------------------------------------------------------------------
// Function: Attribute::flush
///\brief Flushes all buffers associated with a file specified by
/// this attribute, to disk.
///\param scope - IN: Specifies the scope of the flushing action,
/// which can be either of these values:
/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
///\exception H5::AttributeIException
///\par Description
/// This attribute is used to identify the file to be flushed.
// Programmer Binh-Minh Ribler - 2013
// Modification
// Mar 2013 - BMR
// Duplicated from H5Location
//--------------------------------------------------------------------------
void Attribute::flush(H5F_scope_t scope) const
{
herr_t ret_value = H5Fflush(getId(), scope);
if( ret_value < 0 )
{
throw AttributeIException("Attribute::flush", "H5Fflush failed");
}
}
//--------------------------------------------------------------------------
// Function: Attribute::getId
// Purpose: Get the id of this attribute
///\brief Get the id of this attribute
///\return Attribute identifier
// Description:
// Class hierarchy is revised to address bugzilla 1068. Class
// AbstractDS and Attribute are moved out of H5Object. In
@@ -465,7 +586,7 @@ void Attribute::p_read_fixed_len(const DataType& mem_type, H5std_string& strg) c
// Modification
// Jul 2009
// Separated the variable length case from the original
// Attribute::read
// Attribute::read. -BMR
//--------------------------------------------------------------------------
void Attribute::p_read_variable_len(const DataType& mem_type, H5std_string& strg) const
{
@@ -527,7 +648,7 @@ void Attribute::close()
throw AttributeIException("Attribute::close", "H5Aclose failed");
}
// reset the id
id = 0;
id = H5I_INVALID_HID;
}
}

View File

@@ -14,13 +14,21 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5Attribute_H
#define _H5Attribute_H
#ifndef __H5Attribute_H
#define __H5Attribute_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
/*! \class Attribute
\brief Class Attribute operates on HDF5 attributes.
An attribute has many characteristics similar to a dataset, thus both
Attribute and DataSet are derivatives of AbstractDs. Attribute also
inherits from IdComponent because an attribute is an HDF5 component that
is identified by an identifier.
*/
class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
public:
// Closes this attribute.
@@ -30,9 +38,13 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
H5std_string getFileName() const;
// Gets the name of this attribute.
ssize_t getName(char* attr_name, size_t buf_size = 0) const;
H5std_string getName(size_t len) const;
H5std_string getName() const;
ssize_t getName(H5std_string& attr_name, size_t len = 0) const;
// The overloaded function below is replaced by the one above and it
// is kept for backward compatibility purpose.
ssize_t getName( size_t buf_size, H5std_string& attr_name ) const;
H5std_string getName( size_t buf_size ) const; // returns name, not its length
H5std_string getName() const; // returns name, no argument
// Gets a copy of the dataspace for this attribute.
virtual DataSpace getSpace() const;
@@ -51,7 +63,11 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
void write(const DataType& mem_type, const void *buf ) const;
void write(const DataType& mem_type, const H5std_string& strg ) const;
///\brief Returns this class name
// Flushes all buffers associated with the file specified by this
// attribute to disk.
void flush( H5F_scope_t scope ) const;
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("Attribute"); }
// Creates a copy of an existing attribute using the attribute id
@@ -95,4 +111,4 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5Attribute_H

View File

@@ -14,14 +14,15 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5Classes_H
#define _H5Classes_H
#ifndef __H5Classes_H
#define __H5Classes_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
class Exception;
class IdComponent;
class H5Location;
class H5Object;
class PropList;
class FileCreatPropList;
@@ -48,4 +49,4 @@ namespace H5 {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5Classes_H

View File

@@ -33,6 +33,9 @@
#include "H5Alltypes.h"
#include "H5private.h" // for HDstrcpy
#include <iostream>
using namespace std;
// There are a few comments that are common to most of the functions
// defined in this file so they are listed here.
// - getLocId is called by all functions, that call a C API, to get
@@ -130,9 +133,7 @@ Group CommonFG::openGroup( const char* name ) const
// If the opening of the group failed, throw an exception
if( group_id < 0 )
{
throwException("openGroup", "H5Gopen2 failed");
}
// No failure, create and return the Group object
Group group( group_id );
@@ -174,9 +175,7 @@ DataSet CommonFG::createDataSet( const char* name, const DataType& data_type, co
// If the creation of the dataset failed, throw an exception
if( dataset_id < 0 )
{
throwException("createDataSet", "H5Dcreate2 failed");
}
// No failure, create and return the DataSet object
DataSet dataset( dataset_id );
@@ -270,9 +269,8 @@ void CommonFG::link( H5L_type_t link_type, const char* curr_name, const char* ne
break;
} /* end switch */
if( ret_value < 0 ) {
if( ret_value < 0 )
throwException("link", "creating link failed");
}
}
//--------------------------------------------------------------------------
@@ -300,9 +298,7 @@ void CommonFG::unlink( const char* name ) const
{
herr_t ret_value = H5Ldelete( getLocId(), name, H5P_DEFAULT );
if( ret_value < 0 )
{
throwException("unlink", "H5Ldelete failed");
}
}
//--------------------------------------------------------------------------
@@ -336,9 +332,7 @@ void CommonFG::move( const char* src, const char* dst ) const
{
herr_t ret_value = H5Lmove( getLocId(), src, H5L_SAME_LOC, dst, H5P_DEFAULT, H5P_DEFAULT );
if( ret_value < 0 )
{
throwException("move", "H5Lmove failed");
}
}
//--------------------------------------------------------------------------
@@ -371,9 +365,7 @@ void CommonFG::getObjinfo( const char* name, hbool_t follow_link, H5G_stat_t& st
{
herr_t ret_value = H5Gget_objinfo( getLocId(), name, follow_link, &statbuf );
if( ret_value < 0 )
{
throwException("getObjinfo", "H5Gget_objinfo failed");
}
}
//--------------------------------------------------------------------------
@@ -400,9 +392,7 @@ void CommonFG::getObjinfo( const char* name, H5G_stat_t& statbuf ) const
{
herr_t ret_value = H5Gget_objinfo( getLocId(), name, 0, &statbuf );
if( ret_value < 0 )
{
throwException("getObjinfo", "H5Gget_objinfo failed");
}
}
//--------------------------------------------------------------------------
@@ -440,9 +430,8 @@ H5std_string CommonFG::getLinkval( const char* name, size_t size ) const
{
ret_value = H5Lget_info(getLocId(), name, &linkinfo, H5P_DEFAULT);
if( ret_value < 0 )
{
throwException("getLinkval", "H5Lget_info to find buffer size failed");
}
val_size = linkinfo.u.val_size;
}
@@ -450,12 +439,15 @@ H5std_string CommonFG::getLinkval( const char* name, size_t size ) const
if (val_size > 0)
{
value_C = new char[val_size+1]; // temporary C-string for C API
HDmemset(value_C, 0, val_size+1); // clear buffer
ret_value = H5Lget_val(getLocId(), name, value_C, val_size, H5P_DEFAULT);
if( ret_value < 0 )
{
delete []value_C;
throwException("getLinkval", "H5Lget_val failed");
}
value = H5std_string(value_C);
delete []value_C;
}
@@ -474,140 +466,6 @@ H5std_string CommonFG::getLinkval( const H5std_string& name, size_t size ) const
return( getLinkval( name.c_str(), size ));
}
//--------------------------------------------------------------------------
// Function: CommonFG::setComment
///\brief Sets or resets the comment for an object specified by its name.
///\param name - IN: Name of the object
///\param comment - IN: New comment
///\exception H5::FileIException or H5::GroupIException
///\par Description
/// If \a comment is an empty string or a null pointer, the comment
/// message is removed from the object.
/// Comments should be relatively short, null-terminated, ASCII
/// strings. They can be attached to any object that has an
/// object header, e.g., data sets, groups, named data types,
/// and data spaces, but not symbolic links.
// Programmer Binh-Minh Ribler - 2000
// Modification
// 2007: QAK modified to use H5O APIs; however the first parameter is
// no longer just file or group, this function should be moved
// to another class to accommodate attribute, dataset, and named
// datatype. - BMR
//--------------------------------------------------------------------------
void CommonFG::setComment( const char* name, const char* comment ) const
{
herr_t ret_value = H5Oset_comment_by_name( getLocId(), name, comment, H5P_DEFAULT );
if( ret_value < 0 )
{
throwException("setComment", "H5Oset_comment_by_name failed");
}
}
//--------------------------------------------------------------------------
// Function: CommonFG::setComment
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name and \a comment.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::setComment( const H5std_string& name, const H5std_string& comment ) const
{
setComment( name.c_str(), comment.c_str() );
}
//--------------------------------------------------------------------------
// Function: CommonFG::removeComment
///\brief Removes the comment from an object specified by its name.
///\param name - IN: Name of the object
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - May 2005
// 2007: QAK modified to use H5O APIs; however the first parameter is
// no longer just file or group, this function should be moved
// to another class to accommodate attribute, dataset, and named
// datatype. - BMR
//--------------------------------------------------------------------------
void CommonFG::removeComment(const char* name) const
{
herr_t ret_value = H5Oset_comment_by_name(getLocId(), name, NULL, H5P_DEFAULT);
if( ret_value < 0 )
{
throwException("removeComment", "H5Oset_comment_by_name failed");
}
}
//--------------------------------------------------------------------------
// Function: CommonFG::removeComment
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - May 2005
//--------------------------------------------------------------------------
void CommonFG::removeComment(const H5std_string& name) const
{
removeComment (name.c_str());
}
//--------------------------------------------------------------------------
// Function: CommonFG::getComment
///\brief Retrieves comment for the specified object and its comment's
/// length.
///\param name - IN: Name of the object
///\param bufsize - IN: Length of the comment to retrieve
///\return Comment string
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
// 2007: QAK modified to use H5O APIs; however the first parameter is
// no longer just file or group, this function should be moved
// to another class to accommodate attribute, dataset, and named
// datatype. - BMR
//--------------------------------------------------------------------------
H5std_string CommonFG::getComment( const char* name, size_t bufsize ) const
{
// bufsize is default to 256
// temporary variable
hid_t loc_id = getLocId(); // temporary variable
// temporary C-string for the object's comment; bufsize already including
// null character
char* comment_C = new char[bufsize];
ssize_t ret_value = H5Oget_comment_by_name(loc_id, name, comment_C, bufsize, H5P_DEFAULT);
// if the actual length of the comment is longer than bufsize and bufsize
// was the default value, i.e., not given by the user, then call
// H5Oget_comment_by_name again with the correct value.
// If the call to H5Oget_comment_by_name returned an error, skip this block
// and throw an exception below.
if (ret_value >= 0 && (size_t)ret_value > bufsize && bufsize == 256)
{
size_t new_size = ret_value;
delete []comment_C;
comment_C = new char[new_size]; // new_size including null terminator
ret_value = H5Oget_comment_by_name(loc_id, name, comment_C, new_size, H5P_DEFAULT);
}
// if H5Oget_comment_by_name returns SUCCEED, return the string comment,
// otherwise, throw an exception
if( ret_value < 0 )
{
throwException("getComment", "H5Oget_comment_by_name failed");
}
H5std_string comment = H5std_string(comment_C);
delete []comment_C;
return (comment);
}
//--------------------------------------------------------------------------
// Function: CommonFG::getComment
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5std_string CommonFG::getComment( const H5std_string& name, size_t bufsize ) const
{
return( getComment( name.c_str(), bufsize ));
}
//--------------------------------------------------------------------------
// Function: CommonFG::mount
///\brief Mounts the file \a child onto this group.
@@ -615,9 +473,9 @@ H5std_string CommonFG::getComment( const H5std_string& name, size_t bufsize ) co
///\param child - IN: File to mount
///\param plist - IN: Property list to use
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
// Programmer Binh-Minh Ribler - 2014 (original 2000)
//--------------------------------------------------------------------------
void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const
void CommonFG::mount(const char* name, const H5File& child, const PropList& plist ) const
{
// Obtain identifiers for C API
hid_t plist_id = plist.getId();
@@ -628,21 +486,46 @@ void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const
// Raise exception if H5Fmount returns negative value
if( ret_value < 0 )
{
throwException("mount", "H5Fmount failed");
}
}
//--------------------------------------------------------------------------
// Function: CommonFG::mount
///\brief This is an overloaded member function, kept for backward
/// compatibility. It differs from the above function in that it
/// misses const's. This wrapper will be removed in future release.
///\param name - IN: Name of the group
///\param child - IN: File to mount
///\param plist - IN: Property list to use
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::mount(const char* name, H5File& child, PropList& plist) const
{
mount(name, (const H5File)child, (const PropList)plist);
}
//--------------------------------------------------------------------------
// Function: CommonFG::mount
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
/// It takes an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::mount( const H5std_string& name, H5File& child, PropList& plist ) const
void CommonFG::mount(const H5std_string& name, const H5File& child, const PropList& plist) const
{
mount( name.c_str(), child, plist );
mount(name.c_str(), child, plist);
}
//--------------------------------------------------------------------------
// Function: CommonFG::mount
///\brief This is an overloaded member function, kept for backward
/// compatibility. It differs from the above function in that it
/// misses const's. This wrapper will be removed in future release.
// Programmer Binh-Minh Ribler - 2014
//--------------------------------------------------------------------------
void CommonFG::mount(const H5std_string& name, H5File& child, PropList& plist) const
{
mount(name.c_str(), (const H5File)child, (const PropList)plist);
}
//--------------------------------------------------------------------------
@@ -659,9 +542,7 @@ void CommonFG::unmount( const char* name ) const
// Raise exception if H5Funmount returns negative value
if( ret_value < 0 )
{
throwException("unmount", "H5Funmount failed");
}
}
//--------------------------------------------------------------------------
@@ -1006,9 +887,7 @@ hsize_t CommonFG::getNumObjs() const
herr_t ret_value = H5Gget_info(getLocId(), &ginfo);
if(ret_value < 0)
{
throwException("getNumObjs", "H5Gget_info failed");
}
return (ginfo.nlinks);
}
@@ -1032,14 +911,20 @@ H5std_string CommonFG::getObjnameByIdx(hsize_t idx) const
// call H5Lget_name_by_idx with name as NULL to get its length
ssize_t name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, NULL, 0, H5P_DEFAULT);
if(name_len < 0)
{
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
}
// now, allocate C buffer to get the name
char* name_C = new char[name_len+1];
HDmemset(name_C, 0, name_len+1); // clear buffer
name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name_C, name_len+1, H5P_DEFAULT);
if (name_len < 0)
{
delete []name_C;
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
}
// clean up and return the string
H5std_string name = H5std_string(name_C);
delete []name_C;
@@ -1067,9 +952,8 @@ ssize_t CommonFG::getObjnameByIdx(hsize_t idx, char* name, size_t size) const
{
ssize_t name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name, size, H5P_DEFAULT);
if(name_len < 0)
{
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
}
return (name_len);
}
@@ -1082,18 +966,142 @@ ssize_t CommonFG::getObjnameByIdx(hsize_t idx, char* name, size_t size) const
//--------------------------------------------------------------------------
ssize_t CommonFG::getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const
{
char* name_C = new char[size];
ssize_t name_len = getObjnameByIdx(idx, name_C, size);
char* name_C = new char[size+1]; // temporary C-string for object name
HDmemset(name_C, 0, size+1); // clear buffer
// call overloaded function to get the name
ssize_t name_len = getObjnameByIdx(idx, name_C, size+1);
if(name_len < 0)
{
delete []name_C;
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
}
// clean up and return the string
name = H5std_string(name_C);
delete []name_C;
return (name_len);
}
//--------------------------------------------------------------------------
// Function: CommonFG::childObjType
///\brief Returns the type of an object in this file/group, given the
/// object's name.
///\param objname - IN: Name of the object
///\return Object type, which can have the following values for group,
/// dataset, and named datatype
/// \li \c H5O_TYPE_GROUP
/// \li \c H5O_TYPE_DATASET
/// \li \c H5O_TYPE_NAMED_DATATYPE
/// Refer to the C API documentation for more details:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-GetInfo
///\exception H5::FileIException or H5::GroupIException
/// Exception will be thrown when:
/// - an error returned by the C API
/// - object type is not one of the valid values above
// Programmer Binh-Minh Ribler - April, 2014
//--------------------------------------------------------------------------
H5O_type_t CommonFG::childObjType(const char* objname) const
{
H5O_info_t objinfo;
H5O_type_t objtype = H5O_TYPE_UNKNOWN;
// Use C API to get information of the object
herr_t ret_value = H5Oget_info_by_name(getLocId(), objname, &objinfo, H5P_DEFAULT);
// Throw exception if C API returns failure
if (ret_value < 0)
throwException("childObjType", "H5Oget_info_by_name failed");
// Return a valid type or throw an exception for unknown type
else
switch (objinfo.type)
{
case H5O_TYPE_GROUP:
case H5O_TYPE_DATASET:
case H5O_TYPE_NAMED_DATATYPE:
objtype = objinfo.type;
break;
default:
throwException("childObjType", "Unknown type of object");
}
return(objtype);
}
//--------------------------------------------------------------------------
// Function: CommonFG::childObjType
///\brief This is an overloaded member function, provided for convenience.
/// It takes an \a H5std_string for the object's name.
///\brief Returns the type of an object in this group, given the
/// object's name.
///\param objname - IN: Name of the object (H5std_string&)
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - April, 2014
//--------------------------------------------------------------------------
H5O_type_t CommonFG::childObjType(const H5std_string& objname) const
{
// Use overloaded function
H5O_type_t objtype = childObjType(objname.c_str());
return(objtype);
}
//--------------------------------------------------------------------------
// Function: CommonFG::childObjType
///\brief Returns the type of an object in this file/group, given the
/// object's index and its type and order.
///\param index - IN: Position of the object
///\param index_type - IN: Type of the index, default to H5_INDEX_NAME
///\param order - IN: Traversing order, default to H5_ITER_INC
///\param objname - IN: Name of the object, default to "."
///\return Object type, which can have the following values for group,
/// dataset, and named datatype
/// \li \c H5O_TYPE_GROUP
/// \li \c H5O_TYPE_DATASET
/// \li \c H5O_TYPE_NAMED_DATATYPE
/// Refer to the C API documentation for more details:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-GetInfo
///\exception H5::FileIException or H5::GroupIException
/// Exception will be thrown when:
/// - an error returned by the C API
/// - object type is not one of the valid values above
// Developer's Notes:
// - this overload uses H5Oget_info_by_idx instead of H5Oget_info_by_name
// like the previous childObjType()
// - index is the required argument so, first
// - objname is last because it's more likely the location is already
// fully specified
// - Leave property list out for now because C API is not using it, it
// can be added later when needed.
// Programmer Binh-Minh Ribler - April, 2014
//--------------------------------------------------------------------------
H5O_type_t CommonFG::childObjType(hsize_t index, H5_index_t index_type, H5_iter_order_t order, const char* objname) const
{
herr_t ret_value;
H5O_info_t objinfo;
H5O_type_t objtype = H5O_TYPE_UNKNOWN;
// Use C API to get information of the object
ret_value = H5Oget_info_by_idx(getLocId(), objname, index_type, order, index, &objinfo, H5P_DEFAULT);
// Throw exception if C API returns failure
if (ret_value < 0)
throwException("childObjType", "H5Oget_info_by_idx failed");
// Return a valid type or throw an exception for unknown type
else
switch (objinfo.type)
{
case H5O_TYPE_GROUP:
case H5O_TYPE_DATASET:
case H5O_TYPE_NAMED_DATATYPE:
objtype = objinfo.type;
break;
default:
throwException("childObjType", "Unknown type of object");
}
return(objtype);
}
#ifndef H5_NO_DEPRECATED_SYMBOLS
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: CommonFG::getObjTypeByIdx
///\brief Returns the type of an object in this group, given the
@@ -1107,9 +1115,8 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx) const
{
H5G_obj_t obj_type = H5Gget_objtype_by_idx(getLocId(), idx);
if (obj_type == H5G_UNKNOWN)
{
throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
}
return (obj_type);
}
@@ -1119,7 +1126,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx) const
/// It differs from the above function because it also provides
/// the returned object type in text (char*)
///\param idx - IN: Transient index of the object
///\param type_name - IN: Object type in text
///\param type_name - OUT: Object type in text
///\return Object type
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - May, 2010
@@ -1135,9 +1142,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, char* type_name) const
case H5G_TYPE: HDstrcpy(type_name, "datatype"); break;
case H5G_UNKNOWN:
default:
{
throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
}
}
return (obj_type);
}
@@ -1147,7 +1152,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, char* type_name) const
/// It differs from the above function because it also provides
/// the returned object type in text (H5std_string&)
///\param idx - IN: Transient index of the object
///\param type_name - IN: Object type in text
///\param type_name - OUT: Object type in text
///\return Object type
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - January, 2003
@@ -1163,14 +1168,14 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const
case H5G_TYPE: type_name = H5std_string("datatype"); break;
case H5G_UNKNOWN:
default:
{
throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
}
}
return (obj_type);
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
#endif /* H5_NO_DEPRECATED_SYMBOLS */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: CommonFG default constructor
///\brief Default constructor.
@@ -1184,6 +1189,7 @@ CommonFG::CommonFG() {}
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CommonFG::~CommonFG() {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
#ifndef H5_NO_NAMESPACE
}

View File

@@ -14,21 +14,24 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// CommonFG is a protocol class. Its existence is simply to provide the
// common services that are provided by H5File and Group. The file or
// group in the context of this class is referred to as 'location'.
#ifndef _CommonFG_H
#define _CommonFG_H
#ifndef __CommonFG_H
#define __CommonFG_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
// Class forwarding
class Group;
class H5File;
class ArrayType;
class VarLenType;
/*! \class CommonFG
\brief \a CommonFG is an abstract base class of H5File and H5Group.
It provides common operations of H5File and H5Group.
*/
class H5_DLLCPP CommonFG {
public:
// Creates a new group at this location which can be a file
@@ -49,18 +52,6 @@ class H5_DLLCPP CommonFG {
DataSet openDataSet(const char* name) const;
DataSet openDataSet(const H5std_string& name) const;
// Retrieves comment for the HDF5 object specified by its name.
H5std_string getComment(const char* name, size_t bufsize=256) const;
H5std_string getComment(const H5std_string& name, size_t bufsize=256) const;
// Removes the comment for the HDF5 object specified by its name.
void removeComment(const char* name) const;
void removeComment(const H5std_string& name) const;
// Sets the comment for an HDF5 object specified by its name.
void setComment(const char* name, const char* comment) const;
void setComment(const H5std_string& name, const H5std_string& comment) const;
// Returns the value of a symbolic link.
H5std_string getLinkval(const char* link_name, size_t size=0) const;
H5std_string getLinkval(const H5std_string& link_name, size_t size=0) const;
@@ -74,6 +65,12 @@ class H5_DLLCPP CommonFG {
ssize_t getObjnameByIdx(hsize_t idx, char* name, size_t size) const;
ssize_t getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const;
// Retrieves the type of an object in this file or group, given the
// object's name
H5O_type_t childObjType(const H5std_string& objname) const;
H5O_type_t childObjType(const char* objname) const;
H5O_type_t childObjType(hsize_t index, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_INC, const char* objname=".") const;
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Returns the type of an object in this group, given the
// object's index.
@@ -104,8 +101,10 @@ class H5_DLLCPP CommonFG {
void unlink(const H5std_string& name) const;
// Mounts the file 'child' onto this location.
void mount(const char* name, H5File& child, PropList& plist) const;
void mount(const H5std_string& name, H5File& child, PropList& plist) const;
void mount(const char* name, const H5File& child, const PropList& plist) const;
void mount(const char* name, H5File& child, PropList& plist) const; // backward compatibility
void mount(const H5std_string& name, const H5File& child, const PropList& plist) const;
void mount(const H5std_string& name, H5File& child, PropList& plist) const; // backward compatibility
// Unmounts the file named 'name' from this parent location.
void unmount(const char* name) const;
@@ -152,7 +151,6 @@ class H5_DLLCPP CommonFG {
/// object id, i.e. file or group id.
virtual hid_t getLocId() const = 0;
#endif // DOXYGEN_SHOULD_SKIP_THIS
/// For subclasses, H5File and Group, to throw appropriate exception.
virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const = 0;
@@ -162,11 +160,12 @@ class H5_DLLCPP CommonFG {
// Noop destructor.
virtual ~CommonFG();
#endif // DOXYGEN_SHOULD_SKIP_THIS
}; // end of CommonFG declaration
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __CommonFG_H

View File

@@ -123,7 +123,7 @@ H5std_string CompType::getMemberName( unsigned member_num ) const
"H5Tget_member_name returns NULL for member name");
}
H5std_string member_name = H5std_string(member_name_C); // convert C string to string
HDfree(member_name_C); // free the C string
H5free_memory(member_name_C); // free the C string
return( member_name ); // return the member name string
}
@@ -450,6 +450,25 @@ void CompType::pack() const
}
}
//--------------------------------------------------------------------------
// Function: CompType::setSize
///\brief Sets the total size for this compound datatype.
///\param size - IN: Size to set
///\exception H5::DataTypeIException
// Note
// H5Tset_size works on atom datatypes and compound datatypes only
// Programmer Binh-Minh Ribler - 2014
//--------------------------------------------------------------------------
void CompType::setSize(size_t size) const
{
// Call C routine H5Tset_size to set the total size
herr_t ret_value = H5Tset_size(id, size);
if (ret_value < 0)
{
throw DataTypeIException("CompType::setSize", "H5Tset_size failed");
}
}
//--------------------------------------------------------------------------
// Function: CompType destructor
///\brief Properly terminates access to this compound datatype.

View File

@@ -14,16 +14,17 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// Class CompType inherits from DataType and provides accesses to a compound
// datatype.
#ifndef _H5CompType_H
#define _H5CompType_H
#ifndef __H5CompType_H
#define __H5CompType_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
/*! \class CompType
\brief CompType is a derivative of a DataType and operates on HDF5
compound datatypes.
*/
class H5_DLLCPP CompType : public DataType {
public:
// Default constructor
@@ -97,7 +98,10 @@ class H5_DLLCPP CompType : public DataType {
// Recursively removes padding from within this compound datatype.
void pack() const;
///\brief Returns this class name
// Sets the total size for this compound datatype.
void setSize(size_t size) const;
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("CompType"); }
// Noop destructor.
@@ -111,4 +115,4 @@ class H5_DLLCPP CompType : public DataType {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5CompType_H

View File

@@ -14,14 +14,15 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5CPP_H
#define _H5CPP_H
#ifndef __H5Cpp_H
#define __H5Cpp_H
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5DataSpace.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5AbstractDs.h"
#include "H5Attribute.h"
@@ -55,4 +56,4 @@
#define HOFFSET(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
#endif
#endif // __H5Cpp_H

View File

@@ -14,8 +14,8 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5CPPDOC_H
#define _H5CPPDOC_H
#ifndef __H5CppDoc_H
#define __H5CppDoc_H
//-------------------------------------------------------------------------
// The following section will be used to generate the 'Mainpage'
@@ -23,39 +23,48 @@
// ------------------------------------------------------------------------
/*! \mainpage notitle
*
* <br />
* \section intro_sec Introduction
*
* The C++ API provides C++ wrappers for the HDF5 C library.
* It is assumed that the user has knowledge of the HDF5 file format
* and its components. If you are not familiar with HDF5 file format,
* and would like to find out more, please refer to the HDF5 documentation
* at http://www.hdfgroup.org/HDF5/doc/index.html
* The C++ API provides C++ wrappers for the HDF5 C Library.
*
* It is assumed that the user has knowledge of the
* <a href="http://www.hdfgroup.org/HDF5/doc/H5.format.html">
* HDF5 file format</a> and its components.
* For more information on the HDF5 C Library, see the
* <a href="http://www.hdfgroup.org/HDF5/doc/index.html">
* HDF5 Software Documentation</a> page.
*
* Because the HDF5 library maps very well to
* Because the HDF5 C Library maps very well to
* the object oriented design approach, classes in the C++ API can
* closely represent the interfaces of the HDF5 APIs, as followed:
* closely represent the interfaces of the C APIs as follows:
*
* \verbatim
HDF5 C APIs C++ Classes
----------- -----------
Attribute Interface (H5A) Attribute
Datasets Interface (H5D) DataSet
Error Interface (H5E) Exception
File Interface (H5F) H5File
Group Interface (H5G) Group
Identifier Interface (H5I) IdComponent
Property List Interface (H5P) PropList and subclasses
Dataspace Interface (H5S) DataSpace
Datatype Interface (H5T) DataType and subclasses
HDF5 C APIs C++ Classes
----------- -----------
Attribute Interface (H5A) Attribute
Datasets Interface (H5D) DataSet
Error Interface (H5E) Exception
File Interface (H5F) H5File
Group Interface (H5G) Group
Identifier Interface (H5I) IdComponent
Property List Interface (H5P) PropList and subclasses
Dataspace Interface (H5S) DataSpace
Datatype Interface (H5T) DataType and subclasses
\endverbatim
* <br />
* \section install_sec Installation
*
* Please refer to the file release_docs/INSTALL_Windows.txt
* under the top directory for information about installing, building,
* The HDF5 C++ API is included with the HDF5 source code and can
* be obtained from
* <a href="http://www.hdfgroup.org/HDF5/release/obtainsrc.html">
* http://www.hdfgroup.org/HDF5/release/obtainsrc.html</a>.
*
* Please refer to the release_docs/INSTALL file under the top directory
* of the HDF5 source code for information about installing, building,
* and testing the C++ API.
*
*
* <br />
*/
/// This example shows how to create datasets.
@@ -88,4 +97,4 @@
/// This example shows how to work with groups.
///\example h5group.cpp
#endif
#endif // __H5CppDoc_H

View File

@@ -52,7 +52,7 @@ namespace H5 {
///\brief Default constructor: creates a stub DataSet.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSet::DataSet() : AbstractDs(), H5Object(), id(0) {}
DataSet::DataSet() : AbstractDs(), H5Object(), id(H5I_INVALID_HID) {}
//--------------------------------------------------------------------------
// Function: DataSet overloaded constructor
@@ -79,57 +79,29 @@ DataSet::DataSet(const DataSet& original) : AbstractDs(original), H5Object(origi
//--------------------------------------------------------------------------
// Function: DataSet overload constructor - dereference
///\brief Given a reference, ref, to an hdf5 dataset, creates a
///\brief Given a reference, ref, to an hdf5 location, creates a
/// DataSet object
///\param obj - IN: Dataset reference object is in or location of
///\param loc - IN: Dataset reference object is in or location of
/// object that the dataset is located within.
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type - default to H5R_OBJECT
///\exception H5::DataSetIException
///\par Description
/// \c obj can be DataSet, Group, H5File, or named DataType, that
/// \c loc can be DataSet, Group, H5File, or named DataType, that
/// is a datatype that has been named by DataType::commit.
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// Jul, 2008
// Added for application convenience.
//--------------------------------------------------------------------------
DataSet::DataSet(H5Object& obj, const void* ref, H5R_type_t ref_type) : AbstractDs(), H5Object()
DataSet::DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type) : AbstractDs(), H5Object(), id(H5I_INVALID_HID)
{
try {
id = p_dereference(obj.getId(), ref, ref_type);
} catch (ReferenceException deref_error) {
throw ReferenceException("DataSet constructor - located by object",
deref_error.getDetailMsg());
}
id = H5Location::p_dereference(loc.getId(), ref, ref_type, "constructor - by dereferenced");
}
//--------------------------------------------------------------------------
// Function: DataSet overload constructor - dereference
///\brief Given a reference, ref, to an hdf5 dataset, creates a
/// DataSet object
///\param h5file - IN: Location referenced object is in
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type - default to H5R_OBJECT
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// Jul, 2008
// Added for application convenience.
//--------------------------------------------------------------------------
DataSet::DataSet(H5File& h5file, const void* ref, H5R_type_t ref_type) : AbstractDs(), H5Object()
{
try {
id = p_dereference(h5file.getId(), ref, ref_type);
} catch (ReferenceException deref_error) {
throw ReferenceException("DataSet constructor - located by HDF5 file",
deref_error.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: DataSet overload constructor - dereference
///\brief Given a reference, ref, to an hdf5 dataset, creates a
///\brief Given a reference, ref, to an hdf5 attribute, creates a
/// DataSet object
///\param attr - IN: Specifying location where the referenced object is in
///\param ref - IN: Reference pointer
@@ -140,14 +112,9 @@ DataSet::DataSet(H5File& h5file, const void* ref, H5R_type_t ref_type) : Abstrac
// Jul, 2008
// Added for application convenience.
//--------------------------------------------------------------------------
DataSet::DataSet(Attribute& attr, const void* ref, H5R_type_t ref_type) : AbstractDs(), H5Object()
DataSet::DataSet(const Attribute& attr, const void* ref, H5R_type_t ref_type) : AbstractDs(), H5Object(), id(H5I_INVALID_HID)
{
try {
id = p_dereference(attr.getId(), ref, ref_type);
} catch (ReferenceException deref_error) {
throw ReferenceException("DataSet constructor - located by attribute",
deref_error.getDetailMsg());
}
id = H5Location::p_dereference(attr.getId(), ref, ref_type, "constructor - by dereference");
}
//--------------------------------------------------------------------------
@@ -327,7 +294,7 @@ void DataSet::getSpaceStatus(H5D_space_status_t& status) const
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
hsize_t DataSet::getVlenBufSize(const DataType& type, const DataSpace& space ) const
{
// Obtain identifiers for C API
hid_t type_id = type.getId();
@@ -343,6 +310,20 @@ hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
return( size );
}
//--------------------------------------------------------------------------
// Function: DataSet::getVlenBufSize
///\brief This is an overloaded member function, kept for backward
/// compatibility. It differs from the above function in that it
/// misses const's. This wrapper will be removed in future release.
///\return Amount of storage
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
{
return(getVlenBufSize((const DataType)type, (const DataSpace)space));
}
//--------------------------------------------------------------------------
// Function: DataSet::vlenReclaim
///\brief Reclaims VL datatype memory buffers.
@@ -430,7 +411,7 @@ void DataSet::read( void* buf, const DataType& mem_type, const DataSpace& mem_sp
// Function: DataSet::read
///\brief This is an overloaded member function, provided for convenience.
/// It takes a reference to a \c H5std_string for the buffer.
///\param buf - IN: Buffer for read data
///\param strg - IN: Buffer for read data string
///\param mem_type - IN: Memory datatype
///\param mem_space - IN: Memory dataspace
///\param file_space - IN: Dataset's dataspace in the file
@@ -608,9 +589,11 @@ void DataSet::extend( const hsize_t* size ) const
///\param buf_type - IN: Datatype of the elements in buffer
///\param space - IN: Dataspace describing memory buffer & containing selection to use
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
// Programmer Binh-Minh Ribler - 2014
// Modification
// Used the non-const version.
//--------------------------------------------------------------------------
void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space)
void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space) const
{
hid_t fill_type_id = fill_type.getId();
hid_t buf_type_id = buf_type.getId();
@@ -624,16 +607,32 @@ void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataT
//--------------------------------------------------------------------------
// Function: DataSet::fillMemBuf
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it only takes the
/// the last three arguments.
///\brief This is an overloaded member function, kept for backward
/// compatibility. It differs from the above function in that it
/// misses const's. This wrapper will be removed in future release.
///\param fill - IN: Pointer to fill value to use - default NULL
///\param fill_type - IN: Datatype of the fill value
///\param buf - IN/OUT: Memory buffer to fill selection within
///\param buf_type - IN: Datatype of the elements in buffer
///\param space - IN: Dataspace describing memory buffer & containing selection to use
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space)
{
fillMemBuf(fill, (const DataType)fill_type, buf, (const DataType)buf_type, (const DataSpace)space);
}
//--------------------------------------------------------------------------
// Function: DataSet::fillMemBuf
///\brief Fills a selection in memory with 0.
///\param buf - IN/OUT: Memory buffer to fill selection within
///\param buf_type - IN: Datatype of the elements in buffer
///\param space - IN: Dataspace describing memory buffer & containing selection to use
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space) const
{
hid_t buf_type_id = buf_type.getId();
hid_t space_id = space.getId();
@@ -644,57 +643,26 @@ void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
}
}
#ifndef H5_NO_DEPRECATED_SYMBOLS
//--------------------------------------------------------------------------
// Function: DataSet::getObjType
///\brief Retrieves the type of object that an object reference points to.
///\param ref_type - IN: Type of reference to query, valid values are:
/// \li \c H5R_OBJECT - Reference is an object reference.
/// \li \c H5R_DATASET_REGION - Reference is a dataset region reference.
///\param ref - IN: Reference to query
///\return An object type, which can be one of the following:
/// \li \c H5G_LINK (0) - Object is a symbolic link.
/// \li \c H5G_GROUP (1) - Object is a group.
/// \li \c H5G_DATASET (2) - Object is a dataset.
/// \li \c H5G_TYPE (3) - Object is a named datatype
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - May, 2004
// Function: DataSet::fillMemBuf
///\brief This is an overloaded member function, kept for backward
/// compatibility. It differs from the above function in that it
/// misses const's. This wrapper will be removed in future release.
///\param buf - IN/OUT: Memory buffer to fill selection within
///\param buf_type - IN: Datatype of the elements in buffer
///\param space - IN: Dataspace describing memory buffer & containing selection to use
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5G_obj_t DataSet::getObjType(void *ref, H5R_type_t ref_type) const
void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
{
try {
return(p_get_obj_type(ref, ref_type));
}
catch (IdComponentException E) {
throw DataSetIException("DataSet::getObjType", E.getDetailMsg());
}
}
#endif /* H5_NO_DEPRECATED_SYMBOLS */
//--------------------------------------------------------------------------
// Function: DataSet::getRegion
///\brief Retrieves a dataspace with the region pointed to selected.
///\param ref - IN: Reference to get region of
///\param ref_type - IN: Type of reference to get region of - default
/// to H5R_DATASET_REGION
///\return DataSpace instance
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
DataSpace DataSet::getRegion(void *ref, H5R_type_t ref_type) const
{
try {
DataSpace dataspace(p_get_region(ref, ref_type));
return(dataspace);
}
catch (IdComponentException E) {
throw DataSetIException("DataSet::getRegion", E.getDetailMsg());
}
fillMemBuf(buf, (const DataType)buf_type, (const DataSpace)space);
}
//--------------------------------------------------------------------------
// Function: DataSet::getId
///\brief Get the id of this dataset.
///\return DataSet identifier
// Description:
// Class hierarchy is revised to address bugzilla 1068. Class
// AbstractDs and Attribute are moved out of H5Object. In
@@ -709,7 +677,7 @@ hid_t DataSet::getId() const
//--------------------------------------------------------------------------
// Function: DataSet::p_read_fixed_len (private)
// brief Reads a fixed length \a H5std_string from an dataset.
// brief Reads a fixed length \a H5std_string from a dataset.
// param mem_type - IN: DataSet datatype (in memory)
// param strg - IN: Buffer for read string
// exception H5::DataSetIException
@@ -723,14 +691,14 @@ void DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id
// Only allocate for fixed-len string.
// Get the size of the dataset's data
size_t attr_size = getInMemDataSize();
size_t data_size = getInMemDataSize();
// If there is data, allocate buffer and read it.
if (attr_size > 0)
if (data_size > 0)
{
char *strg_C = NULL;
char *strg_C = new char [data_size+1];
HDmemset(strg_C, 0, data_size+1); // clear buffer
strg_C = new char [(size_t)attr_size+1];
herr_t ret_value = H5Dread(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg_C);
if( ret_value < 0 )
@@ -774,8 +742,9 @@ void DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space
HDfree(strg_C);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: DataSet::p_setId (private)
// Function: DataSet::p_setId (protected)
///\brief Sets the identifier of this dataset to a new value.
///
///\exception H5::IdComponentException when the attempt to close the HDF5
@@ -797,10 +766,8 @@ void DataSet::p_setId(const hid_t new_id)
}
// reset object's id to the given id
id = new_id;
// increment the reference counter of the new id
//incRefCount();
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: DataSet::close
@@ -819,7 +786,7 @@ void DataSet::close()
throw DataSetIException("DataSet::close", "H5Dclose failed");
}
// reset the id
id = 0;
id = H5I_INVALID_HID;
}
}

View File

@@ -14,15 +14,20 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// Class DataSet inherits from AbstractDs and provides accesses to a dataset.
#ifndef _H5DataSet_H
#define _H5DataSet_H
#ifndef __H5DataSet_H
#define __H5DataSet_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
/*! \class DataSet
\brief Class DataSet operates on HDF5 datasets.
An datasets has many characteristics similar to an attribute, thus both
Attribute and DataSet are derivatives of AbstractDs. DataSet also
inherits from H5Object because a dataset is an HDF5 object.
*/
class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
public:
// Close this dataset.
@@ -32,9 +37,12 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
void extend( const hsize_t* size ) const;
// Fills a selection in memory with a value
void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space);
void fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space) const;
void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space); // kept for backward compatibility
// Fills a selection in memory with zero
void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space);
void fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space) const;
void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space); // kept for backward compatibility
// Gets the creation property list of this dataset.
DSetCreatPropList getCreatePlist() const;
@@ -55,7 +63,8 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
virtual size_t getInMemDataSize() const;
// Returns the number of bytes required to store VL data.
hsize_t getVlenBufSize( DataType& type, DataSpace& space ) const;
hsize_t getVlenBufSize(const DataType& type, const DataSpace& space ) const;
hsize_t getVlenBufSize(DataType& type, DataSpace& space) const; // kept for backward compatibility
// Reclaims VL datatype memory buffers.
static void vlenReclaim(const DataType& type, const DataSpace& space, const DSetMemXferPropList& xfer_plist, void* buf );
@@ -76,21 +85,12 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
// Iterates the selected elements in the specified dataspace - not implemented in C++ style yet
int iterateElems( void* buf, const DataType& type, const DataSpace& space, H5D_operator_t op, void* op_data = NULL );
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Retrieves the type of object that an object reference points to.
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
// Retrieves a dataspace with the region pointed to selected.
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("DataSet"); }
// Creates a dataset by way of dereference.
DataSet(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
DataSet(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
DataSet(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
DataSet(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
// Default constructor.
DataSet();
@@ -110,7 +110,6 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
private:
hid_t id; // HDF5 dataset id
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// This function contains the common code that is used by
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
@@ -122,6 +121,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
void p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const;
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Sets the dataset id.
virtual void p_setId(const hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -129,4 +129,4 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5DataSet_H

View File

@@ -279,7 +279,7 @@ H5S_class_t DataSpace::getSimpleExtentType () const
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::extentCopy ( DataSpace& dest_space ) const
void DataSpace::extentCopy (const DataSpace& dest_space) const
{
hid_t dest_space_id = dest_space.getId();
herr_t ret_value = H5Sextent_copy( dest_space_id, id );
@@ -289,6 +289,20 @@ void DataSpace::extentCopy ( DataSpace& dest_space ) const
}
}
//--------------------------------------------------------------------------
// Function: DataSpace::extentCopy
///\brief This is an overloaded member function, kept for backward
/// compatibility. It differs from the above function in that it
/// misses const. This wrapper will be removed in future release.
///\param dest_space - IN: Dataspace to copy from
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::extentCopy( DataSpace& dest_space ) const
{
extentCopy((const DataSpace)dest_space);
}
//--------------------------------------------------------------------------
// Function: DataSpace::setExtentSimple
///\brief Sets or resets the size of an existing dataspace.
@@ -446,7 +460,7 @@ void DataSpace::getSelectBounds ( hsize_t* start, hsize_t* end ) const
}
//--------------------------------------------------------------------------
// Function: DataSpace::H5Sselect_elements
// Function: DataSpace::selectElements
///\brief Selects array elements to be included in the selection for
/// this dataspace.
///\param op - IN: Operator specifying how the new selection is to be
@@ -556,7 +570,8 @@ void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const h
//--------------------------------------------------------------------------
// Function: DataSpace::getId
// Purpose: Get the id of this attribute
///\brief Get the id of this dataspace
///\return Dataspace identifier
// Modification:
// May 2008 - BMR
// Class hierarchy is revised to address bugzilla 1068. Class
@@ -570,6 +585,7 @@ hid_t DataSpace::getId() const
return(id);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: DataSpace::p_setId
///\brief Sets the identifier of this object to a new value.
@@ -594,6 +610,7 @@ void DataSpace::p_setId(const hid_t new_id)
// reset object's id to the given id
id = new_id;
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: DataSpace::close
@@ -613,7 +630,7 @@ void DataSpace::close()
throw DataSpaceIException("DataSpace::close", "H5Sclose failed");
}
// reset the id
id = 0;
id = H5I_INVALID_HID;
}
}

View File

@@ -14,13 +14,14 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5DataSpace_H
#define _H5DataSpace_H
#ifndef __H5DataSpace_H
#define __H5DataSpace_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
//! Class DataSpace operates on HDF5 dataspaces.
class H5_DLLCPP DataSpace : public IdComponent {
public:
// Default DataSpace objects
@@ -32,6 +33,12 @@ class H5_DLLCPP DataSpace : public IdComponent {
// Creates a simple dataspace
DataSpace(int rank, const hsize_t * dims, const hsize_t * maxdims = NULL);
// Creates a DataSpace object using an existing dataspace id.
DataSpace(const hid_t space_id);
// Copy constructor: makes a copy of the original DataSpace object.
DataSpace(const DataSpace& original);
// Assignment operator
DataSpace& operator=( const DataSpace& rhs );
@@ -42,7 +49,9 @@ class H5_DLLCPP DataSpace : public IdComponent {
void copy(const DataSpace& like_space);
// Copies the extent of this dataspace.
void extentCopy( DataSpace& dest_space ) const;
void extentCopy(const DataSpace& dest_space) const;
// Kept for backward compatibility only.
void extentCopy(DataSpace& dest_space) const;
// Gets the bounding box containing the current selection.
void getSelectBounds( hsize_t* start, hsize_t* end ) const;
@@ -103,15 +112,9 @@ class H5_DLLCPP DataSpace : public IdComponent {
// Sets or resets the size of this dataspace.
void setExtentSimple( int rank, const hsize_t *current_size, const hsize_t *maximum_size = NULL ) const;
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("DataSpace"); }
// Creates a DataSpace object using an existing dataspace id.
DataSpace(const hid_t space_id);
// Copy constructor: makes a copy of the original DataSpace object.
DataSpace(const DataSpace& original);
// Gets the dataspace id.
virtual hid_t getId() const;
@@ -122,10 +125,13 @@ class H5_DLLCPP DataSpace : public IdComponent {
hid_t id; // HDF5 dataspace id
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Sets the dataspace id.
virtual void p_setId(const hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
};
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5DataSpace_H

View File

@@ -48,6 +48,13 @@ namespace H5 {
#endif // H5_NO_STD
#endif
//--------------------------------------------------------------------------
// Function: DataType default constructor
///\brief Default constructor: Creates a stub datatype
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::DataType() : H5Object(), id(H5I_INVALID_HID) {}
//--------------------------------------------------------------------------
// Function: DataType overloaded constructor
///\brief Creates a datatype using an existing datatype's id
@@ -88,33 +95,7 @@ DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object()
// Function: DataType overload constructor - dereference
///\brief Given a reference, ref, to an hdf5 group, creates a
/// DataType object
///\param obj - IN: Specifying location referenced object is in
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type - default to H5R_OBJECT
///\exception H5::ReferenceException
///\par Description
/// \c obj can be DataSet, Group, or named DataType, that
/// is a datatype that has been named by DataType::commit.
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// Jul, 2008
// Added for application convenience.
//--------------------------------------------------------------------------
DataType::DataType(H5Object& obj, const void* ref, H5R_type_t ref_type) : H5Object()
{
try {
id = p_dereference(obj.getId(), ref, ref_type);
} catch (ReferenceException deref_error) {
throw ReferenceException("DataType constructor - located by an H5Object",
deref_error.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: DataType overload constructor - dereference
///\brief Given a reference, ref, to an hdf5 group, creates a
/// DataType object
///\param h5file - IN: Location referenced object is in
///\param loc - IN: Location referenced object is in
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type - default to H5R_OBJECT
///\exception H5::ReferenceException
@@ -123,14 +104,9 @@ DataType::DataType(H5Object& obj, const void* ref, H5R_type_t ref_type) : H5Obje
// Jul, 2008
// Added for application convenience.
//--------------------------------------------------------------------------
DataType::DataType(H5File& h5file, const void* ref, H5R_type_t ref_type) : H5Object()
DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type) : H5Object(), id(H5I_INVALID_HID)
{
try {
id = p_dereference(h5file.getId(), ref, ref_type);
} catch (ReferenceException deref_error) {
throw ReferenceException("DataType constructor - located by an H5File",
deref_error.getDetailMsg());
}
id = H5Location::p_dereference(loc.getId(), ref, ref_type, "constructor - by dereference");
}
//--------------------------------------------------------------------------
@@ -146,23 +122,11 @@ DataType::DataType(H5File& h5file, const void* ref, H5R_type_t ref_type) : H5Obj
// Jul, 2008
// Added for application convenience.
//--------------------------------------------------------------------------
DataType::DataType(Attribute& attr, const void* ref, H5R_type_t ref_type) : H5Object()
DataType::DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type) : H5Object(), id(H5I_INVALID_HID)
{
try {
id = p_dereference(attr.getId(), ref, ref_type);
} catch (ReferenceException deref_error) {
throw ReferenceException("DataType constructor - located by an Attribute",
deref_error.getDetailMsg());
}
id = H5Location::p_dereference(attr.getId(), ref, ref_type, "constructor - by dereference");
}
//--------------------------------------------------------------------------
// Function: DataType default constructor
///\brief Default constructor: Creates a stub datatype
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::DataType() : H5Object(), id(0) {}
//--------------------------------------------------------------------------
// Function: DataType copy constructor
///\brief Copy constructor: makes a copy of the original DataType object.
@@ -295,38 +259,27 @@ void DataType::p_commit(hid_t loc_id, const char* name)
// Function: DataType::commit
///\brief Commits a transient datatype to a file, creating a new
/// named datatype
///\param loc - IN: A file
///\param loc - IN: A location (file, dataset, datatype, or group)
///\param name - IN: Name of the datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::commit(H5File& loc, const char* name)
void DataType::commit(const H5Location& loc, const char* name)
{
p_commit(loc.getLocId(), name);
p_commit(loc.getId(), name);
}
//--------------------------------------------------------------------------
// Function: DataType::commit
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of the
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::commit(H5File& loc, const H5std_string& name)
{
p_commit(loc.getLocId(), name.c_str());
}
//--------------------------------------------------------------------------
// Function: DataType::commit
///\brief Commits a transient datatype to a file, creating a new
/// named datatype
///\param loc - IN: Either a group, dataset, named datatype, or attribute.
///\brief This is an overloaded member function, kept for backward
/// compatibility. It differs from the above function in that it
/// misses const's. This wrapper will be removed in future release.
///\param loc - IN: A location (file, dataset, datatype, or group)
///\param name - IN: Name of the datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Jan, 2007
//--------------------------------------------------------------------------
void DataType::commit(H5Object& loc, const char* name)
void DataType::commit(H5Location& loc, const char* name)
{
p_commit(loc.getId(), name);
}
@@ -338,7 +291,22 @@ void DataType::commit(H5Object& loc, const char* name)
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::commit(H5Object& loc, const H5std_string& name)
void DataType::commit(const H5Location& loc, const H5std_string& name)
{
p_commit(loc.getId(), name.c_str());
}
//--------------------------------------------------------------------------
// Function: DataType::commit
///\brief This is an overloaded member function, kept for backward
/// compatibility. It differs from the above function in that it
/// misses const's. This wrapper will be removed in future release.
///\param loc - IN: A location (file, dataset, datatype, or group)
///\param name - IN: Name of the datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Jan, 2007
//--------------------------------------------------------------------------
void DataType::commit(H5Location& loc, const H5std_string& name)
{
p_commit(loc.getId(), name.c_str());
}
@@ -395,7 +363,7 @@ H5T_conv_t DataType::find( const DataType& dest, H5T_cdata_t **pcdata ) const
///\param buf - IN/OUT: Array containing pre- and post-conversion
/// values
///\param background - IN: Optional backgroud buffer
///\param plist - IN: Dataset transfer property list
///\param plist - IN: Property list - default to PropList::DEFAULT
///\return Pointer to a suitable conversion function
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
@@ -625,7 +593,7 @@ H5std_string DataType::getTag() const
if( tag_Cstr != NULL )
{
H5std_string tag = H5std_string(tag_Cstr); // C string to string object
HDfree(tag_Cstr); // free the C string
H5free_memory(tag_Cstr); // free the C string
return (tag); // return the tag
}
else
@@ -679,54 +647,10 @@ bool DataType::isVariableStr() const
}
}
#ifndef H5_NO_DEPRECATED_SYMBOLS
//--------------------------------------------------------------------------
// Function: DataType::getObjType
///\brief Retrieves the type of object that an object reference points to.
///\param ref - IN: Reference to query
///\param ref_type - IN: Type of reference to query
///\return Object type, which can be one of the following:
/// \li \c H5G_LINK Object is a symbolic link.
/// \li \c H5G_GROUP Object is a group.
/// \li \c H5G_DATASET Object is a dataset.
/// \li \c H5G_TYPE Object is a named datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5G_obj_t DataType::getObjType(void *ref, H5R_type_t ref_type) const
{
try {
return(p_get_obj_type(ref, ref_type));
}
catch (IdComponentException E) {
throw DataTypeIException(inMemFunc("getObjType"), E.getDetailMsg());
}
}
#endif /* H5_NO_DEPRECATED_SYMBOLS */
//--------------------------------------------------------------------------
// Function: DataType::getRegion
///\brief Retrieves a dataspace with the region pointed to selected.
///\param ref - IN: Reference to get region of
///\param ref_type - IN: Type of reference to get region of - default
///\return DataSpace instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
DataSpace DataType::getRegion(void *ref, H5R_type_t ref_type) const
{
try {
DataSpace dataspace(p_get_region(ref, ref_type));
return(dataspace);
}
catch (IdComponentException E) {
throw DataTypeIException(inMemFunc("getRegion"), E.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: DataType::getId
// Purpose: Get the id of this attribute
///\brief Get the id of this datatype
///\return Datatype identifier
// Modification:
// May 2008 - BMR
// Class hierarchy is revised to address bugzilla 1068. Class
@@ -740,6 +664,7 @@ hid_t DataType::getId() const
return(id);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: DataType::p_setId
///\brief Sets the identifier of this object to a new value.
@@ -764,6 +689,7 @@ void DataType::p_setId(const hid_t new_id)
// reset object's id to the given id
id = new_id;
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: DataType::close
@@ -782,7 +708,7 @@ void DataType::close()
throw DataTypeIException(inMemFunc("close"), "H5Tclose failed");
}
// reset the id
id = 0;
id = H5I_INVALID_HID;
}
}

View File

@@ -14,13 +14,23 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5DataType_H
#define _H5DataType_H
// Class DataType inherits from H5Object and has several subclasses for
// specific HDF5 data types.
#ifndef __H5DataType_H
#define __H5DataType_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
/*! \class DataType
\brief Class DataType provides generic operations on HDF5 datatypes.
DataType inherits from H5Object because a named datatype is an HDF5
object and is a base class of ArrayType, AtomType, CompType, EnumType,
and VarLenType.
*/
class H5_DLLCPP DataType : public H5Object {
public:
// Creates a datatype given its class and size
@@ -30,9 +40,8 @@ class H5_DLLCPP DataType : public H5Object {
DataType( const DataType& original );
// Creates a datatype by way of dereference.
DataType(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
DataType(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
DataType(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
// Closes this datatype.
virtual void close();
@@ -48,10 +57,12 @@ class H5_DLLCPP DataType : public H5Object {
// Commits a transient datatype to a file; this datatype becomes
// a named datatype which can be accessed from the location.
void commit( H5File& loc, const char* name);
void commit( H5File& loc, const H5std_string& name);
void commit( H5Object& loc, const char* name);
void commit( H5Object& loc, const H5std_string& name);
void commit(const H5Location& loc, const char* name);
void commit(const H5Location& loc, const H5std_string& name);
// These two overloaded functions are kept for backward compatibility
// only; they missed the const.
void commit(H5Location& loc, const char* name);
void commit(H5Location& loc, const H5std_string& name);
// Determines whether this datatype is a named datatype or
// a transient datatype.
@@ -101,15 +112,7 @@ class H5_DLLCPP DataType : public H5Object {
// Checks whether this datatype is a variable-length string.
bool isVariableStr() const;
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Retrieves the type of object that an object reference points to.
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
// Retrieves a dataspace with the region pointed to selected.
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("DataType"); }
// Creates a copy of an existing DataType using its id
@@ -125,10 +128,12 @@ class H5_DLLCPP DataType : public H5Object {
virtual ~DataType();
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
hid_t id; // HDF5 datatype id
// Sets the datatype id.
virtual void p_setId(const hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
void p_commit(hid_t loc_id, const char* name);
@@ -136,4 +141,4 @@ class H5_DLLCPP DataType : public H5Object {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5DataType_H

View File

@@ -349,13 +349,16 @@ int DSetCreatPropList::getNfilters() const
///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number
/// of values defined by the filter
///\param cd_values - OUT: Array to hold the data; allocated by the user
///\param namelen - OUT: Length of \a name
///\param namelen - IN: Length of \a name
///\param name - OUT: Name of the filter
///\param filter_config - OUT: Flags indicating whether filter can encode/decode
///\return Filter id
///\exception H5::PropListIException
///\par Description
/// Failure occurs when \a filter_number is out of range.
// Note: the first argument was mistakenly typed as int instead
// of unsigned int, but for backward compatibility, it cannot be
// changed. -BMR (2014/04/15)
//--------------------------------------------------------------------------
H5Z_filter_t DSetCreatPropList::getFilter(int filter_number,
unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values,
@@ -635,8 +638,8 @@ int DSetCreatPropList::getExternalCount() const
///\param idx - IN: Index of the external file, ranges [0-(N-1)] and
/// returned by getExternalCount()
///\param name_size - IN: Maximum length of \a name
///\param name - IN: Name of the external file
///\param offset - IN: Location to return an offset value
///\param name - OUT: Name of the external file
///\param offset - OUT: Location to return an offset value
///\param size - OUT: Location to return the size of the external file data
///\exception H5::PropListIException
///\par Description

View File

@@ -14,13 +14,20 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5DSCreatPropList_H
#define _H5DSCreatPropList_H
// Class DSetCreatPropList represents the HDF5 dataset creation property list
// and inherits from PropList.
#ifndef __H5DSCreatPropList_H
#define __H5DSCreatPropList_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
/*! \class DSetCreatPropList
\brief Class DSetCreatPropList represents the dataset creation property
list.
*/
class H5_DLLCPP DSetCreatPropList : public PropList {
public:
// Default dataset creation property list.
@@ -107,7 +114,7 @@ class H5_DLLCPP DSetCreatPropList : public PropList {
// Sets SZIP compression method.
void setSzip(unsigned int options_mask, unsigned int pixels_per_block) const;
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("DSetCreatPropList"); }
// Copy constructor: creates a copy of a DSetCreatPropList object.
@@ -123,4 +130,4 @@ class H5_DLLCPP DSetCreatPropList : public PropList {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5DSCreatPropList_H

View File

@@ -20,6 +20,17 @@
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5DxferProp.h"
#include "H5private.h" // for HDmemset
#include <iostream>
#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
#endif
#ifndef H5_NO_NAMESPACE
namespace H5 {
@@ -38,6 +49,17 @@ const DSetMemXferPropList DSetMemXferPropList::DEFAULT;
//--------------------------------------------------------------------------
DSetMemXferPropList::DSetMemXferPropList() : PropList(H5P_DATASET_XFER) {}
//--------------------------------------------------------------------------
// Function DSetMemXferPropList constructor
///\brief Creates a dataset transfer property list with transform
/// expression.
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetMemXferPropList::DSetMemXferPropList(const char* exp) : PropList(H5P_DATASET_XFER)
{
setDataTransform(exp);
}
//--------------------------------------------------------------------------
// Function DSetMemXferPropList copy constructor
///\brief Copy constructor: makes a copy of the original
@@ -175,7 +197,110 @@ void DSetMemXferPropList::getBtreeRatios( double& left, double& middle, double&
}
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setTypeConvCB
// Function: DSetMemXferPropList::setDataTransform
///\brief Sets data transform expression.
///\param expression - IN: null-terminated data transform expression (char*)
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
void DSetMemXferPropList::setDataTransform(const char* expression) const
{
herr_t ret_value = H5Pset_data_transform( id, expression);
if( ret_value < 0 )
{
throw PropListIException("DSetMemXferPropList::setDataTransform",
"H5Pset_data_transform failed");
}
}
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setDataTransform
///\brief This is an overloaded member function, provided for convenience.
/// It takes a reference to a \c H5std_string for the expression.
///\param expression - IN: H5std_string data transform expression
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
void DSetMemXferPropList::setDataTransform(const H5std_string& expression) const
{
setDataTransform(expression.c_str());
}
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getDataTransform
///\brief Sets data transform expression.
///\param exp - OUT: buffer for data transform expression (char*)
///\param buf_size - IN: size of buffer for expression, including the
/// null terminator
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
ssize_t DSetMemXferPropList::getDataTransform(char* exp, size_t buf_size) const
{
// H5Pget_data_transform will get buf_size characters of the expression
// including the null terminator
ssize_t exp_len;
exp_len = H5Pget_data_transform(id, exp, buf_size);
// H5Pget_data_transform returns a negative value, raise an exception
if (exp_len < 0)
{
throw PropListIException("DSetMemXferPropList::getDataTransform",
"H5Pget_data_transform failed");
}
// H5Pget_data_transform will put a null terminator at the end of the
// expression or at [buf_size-1] if the expression is at least the size
// of the buffer.
// Return the expression length, which might be different from buf_size
return(exp_len);
}
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getDataTransform
///\brief This is an overloaded member function, provided for convenience.
/// It takes no parameter and returns a \c H5std_string for the expression.
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
H5std_string DSetMemXferPropList::getDataTransform() const
{
// Initialize string to "", so that if there is no expression, the returned
// string will be empty
H5std_string expression("");
// Preliminary call to get the expression's length
ssize_t exp_len = H5Pget_data_transform(id, NULL, (size_t)0);
// If H5Pget_data_transform returns a negative value, raise an exception
if (exp_len < 0)
{
throw PropListIException("DSetMemXferPropList::getDataTransform", "H5Pget_data_transform failed");
}
// If expression exists, calls C routine again to get it
else if (exp_len > 0)
{
// Temporary buffer for char* expression
char* exp_C = new char[exp_len+1];
HDmemset(exp_C, 0, exp_len+1); // clear buffer
// Used overloaded function
exp_len = getDataTransform(exp_C, exp_len+1);
// Convert the C expression to return
expression = exp_C;
// Clean up resource
delete []exp_C;
}
// Return the string expression
return(expression);
}
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getTypeConvCB
///\brief Sets an exception handling callback for datatype conversion
/// for a dataset transfer property list.
///\param op - IN: User's function
@@ -265,43 +390,6 @@ void DSetMemXferPropList::getVlenMemManager( H5MM_allocate_t& alloc_func, void**
}
}
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setMulti
///\brief Sets the data transfer property list for the multi-file driver.
///\param memb_dxpl - OUT: Array of data access property lists
///\exception H5::PropListIException
///\par Description
/// This function can only be used after the member map has
/// been set with FileAccPropList::setMulti (not done - BMR.)
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void DSetMemXferPropList::setMulti(const hid_t *memb_dxpl)
{
herr_t ret_value = H5Pset_dxpl_multi(id, memb_dxpl);
if (ret_value < 0)
{
throw PropListIException("DSetMemXferPropList::setMulti",
"H5Pset_dxpl_multi failed");
}
}
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getMulti
///\brief Returns multi-file data transfer property list information.
///\param memb_dxpl - OUT: Array of data access property lists
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void DSetMemXferPropList::getMulti(hid_t *memb_dxpl)
{
herr_t ret_value = H5Pget_dxpl_multi(id, memb_dxpl);
if (ret_value < 0)
{
throw PropListIException("DSetMemXferPropList::getMulti",
"H5Pget_dxpl_multi failed");
}
}
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setSmallDataBlockSize
///\brief Sets the size of a contiguous block reserved for small data.

View File

@@ -14,13 +14,20 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5DSetMemXferPropList_H
#define _H5DSetMemXferPropList_H
// Class DSetMemXferPropList represents the HDF5 dataset transfer property list
// and inherits from PropList.
#ifndef __H5DSetMemXferPropList_H
#define __H5DSetMemXferPropList_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
/*! \class DSetMemXferPropList
\brief Class DSetMemXferPropList represents the dataset memory and
transfer property list.
*/
class H5_DLLCPP DSetMemXferPropList : public PropList {
public:
static const DSetMemXferPropList DEFAULT;
@@ -28,6 +35,9 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
// Creates a dataset memory and transfer property list.
DSetMemXferPropList();
// Creates a dataset transform property list.
DSetMemXferPropList(const char* expression);
// Sets type conversion and background buffers.
void setBuffer( size_t size, void* tconv, void* bkg ) const;
@@ -40,6 +50,14 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
// Gets B-tree split ratios for a dataset transfer property list.
void getBtreeRatios( double& left, double& middle, double& right ) const;
// Sets data transform expression.
void setDataTransform(const char* expression) const;
void setDataTransform(const H5std_string& expression) const;
// Gets data transform expression.
ssize_t getDataTransform(char* exp, size_t buf_size=0) const;
H5std_string getDataTransform() const;
// Sets the dataset transfer property list status to TRUE or FALSE.
void setPreserve( bool status ) const;
@@ -66,12 +84,6 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
void getVlenMemManager( H5MM_allocate_t& alloc, void** alloc_info,
H5MM_free_t& free, void** free_info ) const;
// Sets the data transfer property list for the multi-file driver.
void setMulti(const hid_t *memb_dxpl);
// Returns multi-file data transfer property list information.
void getMulti(hid_t *memb_dxpl);
// Sets the size of a contiguous block reserved for small data.
void setSmallDataBlockSize(hsize_t size);
@@ -108,4 +120,4 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5DSetMemXferPropList_H

View File

@@ -30,6 +30,7 @@
#include "H5AtomType.h"
#include "H5IntType.h"
#include "H5EnumType.h"
#include "H5private.h" // for HDmemset
#ifndef H5_NO_NAMESPACE
namespace H5 {
@@ -150,6 +151,7 @@ void EnumType::insert( const H5std_string& name, void *value ) const
H5std_string EnumType::nameOf( void *value, size_t size ) const
{
char* name_C = new char[size+1]; // temporary C-string for C API
HDmemset(name_C, 0, size+1); // clear buffer
// Calls C routine H5Tenum_nameof to get the name of the specified enum type
herr_t ret_value = H5Tenum_nameof( id, value, name_C, size );
@@ -157,10 +159,11 @@ H5std_string EnumType::nameOf( void *value, size_t size ) const
// If H5Tenum_nameof returns a negative value, raise an exception,
if( ret_value < 0 )
{
delete []name_C;
throw DataTypeIException("EnumType::nameOf", "H5Tenum_nameof failed");
}
// otherwise, create the string to hold the datatype name and return it
H5std_string name = H5std_string(name_C);
H5std_string name(name_C);
delete []name_C;
return( name );
}

View File

@@ -14,13 +14,14 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5EnumType_H
#define _H5EnumType_H
#ifndef __H5EnumType_H
#define __H5EnumType_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
//! Class EnumType operates on HDF5 enum datatypes.
class H5_DLLCPP EnumType : public DataType {
public:
@@ -57,7 +58,7 @@ class H5_DLLCPP EnumType : public DataType {
void valueOf( const char* name, void *value ) const;
void valueOf( const H5std_string& name, void *value ) const;
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("EnumType"); }
// Default constructor
@@ -74,4 +75,4 @@ class H5_DLLCPP EnumType : public DataType {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5EnumType_H

View File

@@ -80,8 +80,11 @@ H5std_string Exception::getMajorString( hid_t err_major ) const
// Check for failure again
if( mesg_size < 0 )
{
delete []mesg_C;
throw IdComponentException("Exception::getMajorString",
"H5Eget_msg failed");
}
// Convert the C error description and return
H5std_string major_str(mesg_C);
@@ -116,8 +119,11 @@ H5std_string Exception::getMinorString( hid_t err_minor ) const
// Check for failure again
if( mesg_size < 0 )
{
delete []mesg_C;
throw IdComponentException("Exception::getMinorString",
"H5Eget_msg failed");
}
// Convert the C error description and return
H5std_string minor_str(mesg_C);
@@ -295,16 +301,33 @@ const char* Exception::getCFuncName() const
}
//--------------------------------------------------------------------------
// Function: Exception::printError
// Function: Exception::printErrorStack (static)
///\brief Prints the error stack in a default manner.
///\param stream - IN: File pointer, default to stderr
///\param err_stack - IN: Error stack ID, default to H5E_DEFAULT(0)
// Programmer Binh-Minh Ribler - Apr, 2014 (1.8.13)
//--------------------------------------------------------------------------
void Exception::printErrorStack(FILE* stream, hid_t err_stack)
{
herr_t ret_value = H5Eprint2(err_stack, stream);
if( ret_value < 0 )
throw Exception( "Printing error stack", "H5Eprint2 failed" );
}
//--------------------------------------------------------------------------
// Function: Exception::printError
///\brief Prints the error stack in a default manner. This member
/// function is replaced by the static function printErrorStack
/// and will be removed from the next major release.
///\param stream - IN: File pointer
// Programmer Binh-Minh Ribler - 2000
// Description:
// This function can be removed in next major release.
// -BMR, 2014/04/24
//--------------------------------------------------------------------------
void Exception::printError( FILE* stream ) const
void Exception::printError(FILE* stream) const
{
herr_t ret_value = H5Eprint2( H5E_DEFAULT, stream ); // print to stderr
if( ret_value < 0 )
throw Exception( "Exception::printError", "H5Eprint failed" );
Exception::printErrorStack(stream, H5E_DEFAULT);
}
//--------------------------------------------------------------------------
@@ -312,7 +335,7 @@ void Exception::printError( FILE* stream ) const
///\brief Noop destructor
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Exception::~Exception() {}
Exception::~Exception() throw() {}
//--------------------------------------------------------------------------
// Subclass: FileIException
@@ -335,7 +358,7 @@ FileIException::FileIException(const H5std_string& func_name, const H5std_string
// Function: FileIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
FileIException::~FileIException() {}
FileIException::~FileIException() throw() {}
//--------------------------------------------------------------------------
// Subclass: GroupIException
@@ -358,7 +381,7 @@ GroupIException::GroupIException(const H5std_string& func_name, const H5std_stri
// Function: GroupIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
GroupIException::~GroupIException() {}
GroupIException::~GroupIException() throw() {}
//--------------------------------------------------------------------------
// Subclass: DataSpaceIException
@@ -381,7 +404,7 @@ DataSpaceIException::DataSpaceIException(const H5std_string& func_name, const H5
// Function: DataSpaceIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
DataSpaceIException::~DataSpaceIException() {}
DataSpaceIException::~DataSpaceIException() throw() {}
//--------------------------------------------------------------------------
// Subclass: DataTypeIException
@@ -404,7 +427,7 @@ DataTypeIException::DataTypeIException(const H5std_string& func_name, const H5st
// Function: DataTypeIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
DataTypeIException::~DataTypeIException() {}
DataTypeIException::~DataTypeIException() throw() {}
//--------------------------------------------------------------------------
// Subclass: PropListIException
@@ -427,7 +450,7 @@ PropListIException::PropListIException(const H5std_string& func_name, const H5st
// Function: PropListIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
PropListIException::~PropListIException() {}
PropListIException::~PropListIException() throw() {}
//--------------------------------------------------------------------------
// Subclass: DataSetIException
@@ -450,7 +473,7 @@ DataSetIException::DataSetIException(const H5std_string& func_name, const H5std_
// Function: DataSetIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
DataSetIException::~DataSetIException() {}
DataSetIException::~DataSetIException() throw() {}
//--------------------------------------------------------------------------
// Subclass: AttributeIException
@@ -473,7 +496,7 @@ AttributeIException::AttributeIException(const H5std_string& func_name, const H5
// Function: AttributeIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
AttributeIException::~AttributeIException() {}
AttributeIException::~AttributeIException() throw() {}
//--------------------------------------------------------------------------
// Subclass: ReferenceException
@@ -496,7 +519,7 @@ ReferenceException::ReferenceException(const H5std_string& func_name, const H5st
// Function: ReferenceException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
ReferenceException::~ReferenceException() {}
ReferenceException::~ReferenceException() throw() {}
//--------------------------------------------------------------------------
// Subclass: LibraryIException
@@ -519,7 +542,30 @@ LibraryIException::LibraryIException(const H5std_string& func_name, const H5std_
// Function: LibraryIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
LibraryIException::~LibraryIException() {}
LibraryIException::~LibraryIException() throw() {}
//--------------------------------------------------------------------------
// Subclass: LocationException
// Programmer Binh-Minh Ribler - 2014
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: LocationException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
LocationException::LocationException():Exception(){}
//--------------------------------------------------------------------------
// Function: LocationException overloaded constructor
///\brief Creates a LocationException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
///\param func_name - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
LocationException::LocationException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: LocationException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
LocationException::~LocationException() throw() {}
//--------------------------------------------------------------------------
// Subclass: IdComponentException
@@ -542,7 +588,7 @@ IdComponentException::IdComponentException(const H5std_string& func_name, const
// Function: IdComponentException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
IdComponentException::~IdComponentException() {}
IdComponentException::~IdComponentException() throw() {}
#ifndef H5_NO_NAMESPACE
} // end namespace
#endif

View File

@@ -14,8 +14,8 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5Exception_H
#define _H5Exception_H
#ifndef __H5Exception_H
#define __H5Exception_H
#include <string>
@@ -28,6 +28,11 @@ namespace H5 {
#endif
#endif
/*! \class Exception
\brief Exception provides wrappers of HDF5 error handling functions.
Many classes are derived from Exception for specific HDF5 C interfaces.
*/
class H5_DLLCPP Exception {
public:
// Creates an exception with a function name where the failure occurs
@@ -67,7 +72,9 @@ class H5_DLLCPP Exception {
H5E_walk2_t func, void* client_data);
// Prints the error stack in a default manner.
virtual void printError( FILE* stream = NULL ) const;
static void printErrorStack(FILE* stream = stderr,
hid_t err_stack = H5E_DEFAULT); // Static
virtual void printError(FILE* stream = NULL) const;
// Default constructor
Exception();
@@ -76,7 +83,7 @@ class H5_DLLCPP Exception {
Exception( const Exception& orig);
// virtual Destructor
virtual ~Exception();
virtual ~Exception() throw();
private:
H5std_string detail_message;
@@ -91,74 +98,81 @@ class H5_DLLCPP FileIException : public Exception {
public:
FileIException( const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
FileIException();
virtual ~FileIException();
virtual ~FileIException() throw();
};
class H5_DLLCPP GroupIException : public Exception {
public:
GroupIException( const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
GroupIException();
virtual ~GroupIException();
virtual ~GroupIException() throw();
};
class H5_DLLCPP DataSpaceIException : public Exception {
public:
DataSpaceIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
DataSpaceIException();
virtual ~DataSpaceIException();
virtual ~DataSpaceIException() throw();
};
class H5_DLLCPP DataTypeIException : public Exception {
public:
DataTypeIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
DataTypeIException();
virtual ~DataTypeIException();
virtual ~DataTypeIException() throw();
};
class H5_DLLCPP PropListIException : public Exception {
public:
PropListIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
PropListIException();
virtual ~PropListIException();
virtual ~PropListIException() throw();
};
class H5_DLLCPP DataSetIException : public Exception {
public:
DataSetIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
DataSetIException();
virtual ~DataSetIException();
virtual ~DataSetIException() throw();
};
class H5_DLLCPP AttributeIException : public Exception {
public:
AttributeIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
AttributeIException();
virtual ~AttributeIException();
virtual ~AttributeIException() throw();
};
class H5_DLLCPP ReferenceException : public Exception {
public:
ReferenceException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
ReferenceException();
virtual ~ReferenceException();
virtual ~ReferenceException() throw();
};
class H5_DLLCPP LibraryIException : public Exception {
public:
LibraryIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
LibraryIException();
virtual ~LibraryIException();
virtual ~LibraryIException() throw();
};
class H5_DLLCPP LocationException : public Exception {
public:
LocationException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
LocationException();
virtual ~LocationException() throw();
};
class H5_DLLCPP IdComponentException : public Exception {
public:
IdComponentException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
IdComponentException();
virtual ~IdComponentException();
virtual ~IdComponentException() throw();
};
#ifndef H5_NO_NAMESPACE
}
#endif
#endif // _H5Exception_H
#endif // __H5Exception_H

View File

@@ -264,7 +264,7 @@ FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplSplit
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
{
hid_t meta_pid = meta_plist.getId();
hid_t raw_pid = raw_plist.getId();
@@ -275,21 +275,56 @@ void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& ra
}
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSplit
///\brief This is an overloaded member function, kept for backward
/// compatibility. It differs from the above function in that it
/// misses const's. This wrapper will be removed in future release.
///\param meta_plist - IN: File access plist for the metadata file
///\param raw_plist - IN: File access plist for the raw data file
///\param meta_ext - IN: Metadata filename extension as \c char*
///\param raw_ext - IN: Raw data filename extension as \c char*
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
// Note: Retiring April, 2014
//--------------------------------------------------------------------------
void FileAccPropList::setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
{
setSplit((const FileAccPropList)meta_plist, (const FileAccPropList)raw_plist, meta_ext, raw_ext);
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSplit
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
/// It takes character arguments as \c H5std_string.
///\param meta_plist - IN: File access plist for the metadata file
///\param raw_plist - IN: File access plist for the raw data file
///\param meta_ext - IN: Metadata filename extension as \c H5std_string
///\param raw_ext - IN: Raw data filename extension as \c H5std_string
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
{
setSplit( meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str() );
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSplit
///\brief This is an overloaded member function, kept for backward
/// compatibility. It differs from the above function in that it
/// misses const's. This wrapper will be removed in future release.
///\param meta_plist - IN: File access plist for the metadata file
///\param raw_plist - IN: File access plist for the raw data file
///\param meta_ext - IN: Metadata filename extension as \c string
///\param raw_ext - IN: Raw data filename extension as \c string
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
// Note: Retiring April, 2014
//--------------------------------------------------------------------------
void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
void FileAccPropList::setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
{
setSplit( meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str() );
setSplit((const FileAccPropList)meta_plist, (const FileAccPropList)raw_plist, meta_ext.c_str(), raw_ext.c_str() );
}
// Stream Virtual File Driver had been removed from the main library.

View File

@@ -14,14 +14,17 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5FileAccPropList_H
#define _H5FileAccPropList_H
// Class FileAccPropList represents the HDF5 file access property list and
// inherits from DataType.
#ifndef __H5FileAccPropList_H
#define __H5FileAccPropList_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
// class for file access properties
//! Class FileAccPropList represents the HDF5 file access property list.
class H5_DLLCPP FileAccPropList : public PropList {
public:
static const FileAccPropList DEFAULT;
@@ -62,18 +65,21 @@ class H5_DLLCPP FileAccPropList : public PropList {
FileAccPropList getFamily(hsize_t& memb_size) const;
// Emulates the old split file driver,
void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
const char* meta_ext = ".meta", const char* raw_ext = ".raw" ) const;
void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
const H5std_string& meta_ext, const H5std_string& raw_ext ) const;
#ifdef H5_HAVE_STREAM // for Stream Virtual File Driver
// Modifies this file access property list to use the Stream driver.
void setStream(H5FD_stream_fapl_t &fapl) const;
// Retrieves the streaming I/O driver settings
H5FD_stream_fapl_t getStream() const;
#endif
void setSplit(const FileAccPropList& meta_plist,
const FileAccPropList& raw_plist,
const char* meta_ext = ".meta",
const char* raw_ext = ".raw" ) const;
void setSplit(const FileAccPropList& meta_plist,
const FileAccPropList& raw_plist,
const H5std_string& meta_ext = ".meta",
const H5std_string& raw_ext = ".raw") const;
// These two overloaded functions are kept for backward compatibility
// only; they missed the const's and will be removed in future release.
void setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist,
const char* meta_ext=".meta", const char* raw_ext=".raw") const;
void setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist,
const H5std_string& meta_ext=".meta",
const H5std_string& raw_ext=".raw") const;
// Sets the maximum size of the data sieve buffer.
void setSieveBufSize(size_t bufsize) const;
@@ -123,7 +129,7 @@ class H5_DLLCPP FileAccPropList : public PropList {
// Returns garbage collecting references setting.
unsigned getGcReferences() const;
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("FileAccPropList"); }
// Copy constructor: creates a copy of a FileAccPropList object.
@@ -139,4 +145,4 @@ class H5_DLLCPP FileAccPropList : public PropList {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5FileAccPropList_H

View File

@@ -14,14 +14,14 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5FileCreatPropList_H
#define _H5FileCreatPropList_H
#ifndef __H5FileCreatPropList_H
#define __H5FileCreatPropList_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
// class for file access properties
//! Class FileCreatPropList represents the HDF5 file create property list.
class H5_DLLCPP FileCreatPropList : public PropList {
public:
// Default file creation property list.
@@ -60,7 +60,7 @@ class H5_DLLCPP FileCreatPropList : public PropList {
// indexing chunked datasets.
void setIstorek( unsigned ik ) const;
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("FileCreatPropList"); }
// Copy constructor: creates a copy of a FileCreatPropList object.
@@ -76,4 +76,4 @@ class H5_DLLCPP FileCreatPropList : public PropList {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5FileCreatPropList_H

View File

@@ -50,7 +50,7 @@ namespace H5 {
///\brief Default constructor: creates a stub H5File object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File() : IdComponent(), id(0) {}
H5File::H5File() : H5Location(), id(H5I_INVALID_HID) {}
//--------------------------------------------------------------------------
// Function: H5File overloaded constructor
@@ -61,7 +61,7 @@ H5File::H5File() : IdComponent(), id(0) {}
/// modifying default file meta-data. Default to
/// FileCreatPropList::DEFAULT
///\param access_plist - IN: File access property list. Default to
/// FileCreatPropList::DEFAULT
/// FileAccPropList::DEFAULT
///\par Description
/// Valid values of \a flags include:
/// \li \c H5F_ACC_TRUNC - Truncate file, if it already exists,
@@ -69,6 +69,10 @@ H5File::H5File() : IdComponent(), id(0) {}
/// the file.
/// \li \c H5F_ACC_EXCL - Fail if file already exists.
/// \c H5F_ACC_TRUNC and \c H5F_ACC_EXCL are mutually exclusive
/// \li \c H5F_ACC_RDONLY - Open file as read-only, if it already
/// exists, and fail, otherwise
/// \li \c H5F_ACC_RDWR - Open file for read/write, if it already
/// exists, and fail, otherwise
/// \li \c H5F_ACC_DEBUG - print debug information. This flag is
/// used only by HDF5 library developers; it is neither
/// tested nor supported for use in applications.
@@ -77,11 +81,18 @@ H5File::H5File() : IdComponent(), id(0) {}
/// please refer to the \b Special \b case section in the C layer
/// Reference Manual at:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5F.html#File-Create
// Notes With a PGI compiler (~2012-2013), the exception thrown by p_get_file
// could not be caught in the applications. Added try block here
// to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : IdComponent(0)
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(), id(H5I_INVALID_HID)
{
p_get_file(name, flags, create_plist, access_plist);
try {
p_get_file(name, flags, create_plist, access_plist);
} catch (FileIException open_file) {
throw open_file;
}
}
//--------------------------------------------------------------------------
@@ -94,24 +105,35 @@ H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& c
/// modifying default file meta-data. Default to
/// FileCreatPropList::DEFAULT
///\param access_plist - IN: File access property list. Default to
/// FileCreatPropList::DEFAULT
/// FileAccPropList::DEFAULT
// Notes With a PGI compiler (~2012-2013), the exception thrown by p_get_file
// could not be caught in the applications. Added try block here
// to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : IdComponent(0)
H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(), id(H5I_INVALID_HID)
{
p_get_file(name.c_str(), flags, create_plist, access_plist);
try {
p_get_file(name.c_str(), flags, create_plist, access_plist);
} catch (FileIException open_file) {
throw open_file;
}
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// This function is private and contains common code between the
// constructors taking a string or a char*
// Programmer Binh-Minh Ribler - 2000
// Modification
// - removed H5F_ACC_CREAT because H5Fcreate will fail with
// H5F_ACC_CREAT. - BMR, Sep 17, 2014
//--------------------------------------------------------------------------
void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist)
{
// These bits only set for creation, so if any of them are set,
// create the file.
if( flags & (H5F_ACC_CREAT|H5F_ACC_EXCL|H5F_ACC_TRUNC|H5F_ACC_DEBUG))
if( flags & (H5F_ACC_EXCL|H5F_ACC_TRUNC|H5F_ACC_DEBUG))
{
hid_t create_plist_id = create_plist.getId();
hid_t access_plist_id = access_plist.getId();
@@ -133,6 +155,8 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
}
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5File copy constructor
///\brief Copy constructor: makes a copy of the original
@@ -140,34 +164,15 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
///\param original - IN: H5File instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File(const H5File& original) : IdComponent(original)
H5File::H5File(const H5File& original) : H5Location(original)
{
id = original.getId();
incRefCount(); // increment number of references to this id
}
//--------------------------------------------------------------------------
// Function: H5File::flush
///\brief Flushes all buffers associated with a file to disk.
///\param scope - IN: Specifies the scope of the flushing action,
/// which can be either of these values:
/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - Dec. 2005
//--------------------------------------------------------------------------
void H5File::flush(H5F_scope_t scope) const
{
herr_t ret_value = H5Fflush( id, scope );
if( ret_value < 0 )
{
throw FileIException("H5File::flush", "H5Fflush failed");
}
}
//--------------------------------------------------------------------------
// Function: H5File::isHdf5
///\brief Determines whether a file in HDF5 format.
// Function: H5File::isHdf5 (static)
///\brief Determines whether a file in HDF5 format. (Static)
///\param name - IN: Name of the file
///\return true if the file is in HDF5 format, and false, otherwise
///\exception H5::FileIException
@@ -189,9 +194,9 @@ bool H5File::isHdf5(const char* name)
}
//--------------------------------------------------------------------------
// Function: H5File::isHdf5
// Function: H5File::isHdf5 (static)
///\brief This is an overloaded member function, provided for convenience.
/// It takes an \c H5std_string for \a name.
/// It takes an \c H5std_string for \a name. (Static)
///\param name - IN: Name of the file - \c H5std_string
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -269,28 +274,13 @@ void H5File::reOpen()
throw FileIException("H5File::reOpen", close_error.getDetailMsg());
}
// call C routine to reopen the file - Note: not sure about this
// does id need to be closed later? which id to be the parameter?
// call C routine to reopen the file - Note: not sure about this,
// which id to be the parameter when closing?
id = H5Freopen( id );
if( id < 0 ) // Raise exception when H5Freopen returns a neg value
throw FileIException("H5File::reOpen", "H5Freopen failed");
}
//--------------------------------------------------------------------------
// Function: H5File::reopen
///\brief Reopens this file.
///
///\exception H5::FileIException
///\par Description
/// This function will be replaced by the above function \c reOpen
/// in future releases.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5File::reopen()
{
H5File::reOpen();
}
//--------------------------------------------------------------------------
// Function: H5File::getCreatePlist
///\brief Returns the creation property list of this file
@@ -460,7 +450,7 @@ void H5File::getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const
/// closed and reopened or opened during a subsequent session.
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
{
hid_t fapl_id = fapl.getId();
herr_t ret_value = H5Fget_vfd_handle(id, fapl_id, file_handle);
@@ -470,6 +460,23 @@ void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
}
}
//--------------------------------------------------------------------------
// Function: H5File::getVFDHandle
///\brief This is an overloaded member function, kept for backward
/// compatibility. It differs from the above function in that it
/// misses const. This wrapper will be removed in future release.
///\param fapl - File access property list
///\param file_handle - Pointer to the file handle being used by
/// the low-level virtual file driver
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - May 2004
// Note: Retiring April, 2014
//--------------------------------------------------------------------------
void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
{
getVFDHandle((const FileAccPropList)fapl, file_handle);
}
//--------------------------------------------------------------------------
// Function: H5File::getVFDHandle
///\brief This is an overloaded member function, provided for convenience.
@@ -489,70 +496,6 @@ void H5File::getVFDHandle(void **file_handle) const
}
}
//--------------------------------------------------------------------------
// Function: H5File::getFileName
///\brief Gets the name of this file.
///\return File name
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - Jul, 2004
//--------------------------------------------------------------------------
H5std_string H5File::getFileName() const
{
try {
return(p_get_file_name());
}
catch (IdComponentException E) {
throw FileIException("H5File::getFileName", E.getDetailMsg());
}
}
#ifndef H5_NO_DEPRECATED_SYMBOLS
//--------------------------------------------------------------------------
// Function: H5File::getObjType
///\brief Retrieves the type of object that an object reference points to.
///\param ref - IN: Reference to query
///\param ref_type - IN: Type of reference, valid values are:
/// \li \c H5R_OBJECT - Reference is an object reference
/// \li \c H5R_DATASET_REGION - Reference is a dataset region reference
///\return Object type, which can be one of the following:
/// \li \c H5G_LINK - Object is a symbolic link.
/// \li \c H5G_GROUP - Object is a group.
/// \li \c H5G_DATASET - Object is a dataset.
/// \li \c H5G_TYPE - Object is a named datatype
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5G_obj_t H5File::getObjType(void *ref, H5R_type_t ref_type) const
{
try {
return(p_get_obj_type(ref, ref_type));
}
catch (IdComponentException E) {
throw FileIException("H5File::getObjType", E.getDetailMsg());
}
}
#endif /* H5_NO_DEPRECATED_SYMBOLS */
//--------------------------------------------------------------------------
// Function: H5File::getRegion
///\brief Retrieves a dataspace with the region pointed to selected.
///\param ref - IN: Reference to get region of
///\param ref_type - IN: Type of reference to get region of - default
///\return DataSpace instance
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
DataSpace H5File::getRegion(void *ref, H5R_type_t ref_type) const
{
try {
DataSpace dataspace(p_get_region(ref, ref_type));
return(dataspace);
}
catch (IdComponentException E) {
throw FileIException("H5File::getRegion", E.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: H5File::getFileSize
///\brief Returns the file size of the HDF5 file.
@@ -574,132 +517,18 @@ hsize_t H5File::getFileSize() const
return (file_size);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5File::p_reference (protected)
// Purpose Creates a reference to an HDF5 object or a dataset region.
// Parameters
// name - IN: Name of the object to be referenced
// dataspace - IN: Dataspace with selection
// ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
// Exception H5::IdComponentException
// Programmer Binh-Minh Ribler - May, 2004
// Function: H5File::reopen
// Purpose: Reopens this file.
// Exception H5::FileIException
// Description
// This function is replaced by the above function reOpen.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5File::p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const
void H5File::reopen()
{
herr_t ret_value = H5Rcreate(ref, getId(), name, ref_type, space_id);
if (ret_value < 0)
{
throw IdComponentException("", "H5Rcreate failed");
}
}
//--------------------------------------------------------------------------
// Function: H5File::reference
///\brief Creates a reference to an HDF5 object or a dataset region.
///\param ref - IN: Reference pointer
///\param name - IN: Name of the object to be referenced
///\param dataspace - IN: Dataspace with selection
///\param ref_type - IN: Type of reference to query, valid values are:
/// \li \c H5R_OBJECT - Reference is an object reference
/// \li \c H5R_DATASET_REGION - Reference is a dataset region
/// reference - this is the default
///\exception H5::IdComponentException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5File::reference(void* ref, const char* name, const DataSpace& dataspace, H5R_type_t ref_type) const
{
try {
p_reference(ref, name, dataspace.getId(), ref_type);
}
catch (IdComponentException E) {
throw IdComponentException("H5File::reference", E.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: H5File::reference
///\brief This is an overloaded function, provided for your convenience.
/// It differs from the above function in that it only creates
/// a reference to an HDF5 object, not to a dataset region.
///\param ref - IN: Reference pointer
///\param name - IN: Name of the object to be referenced - \c char pointer
///\exception H5::IdComponentException
///\par Description
// This function passes H5R_OBJECT and -1 to the protected
// function for it to pass to the C API H5Rcreate
// to create a reference to the named object.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5File::reference(void* ref, const char* name) const
{
try {
p_reference(ref, name, -1, H5R_OBJECT);
}
catch (IdComponentException E) {
throw IdComponentException("H5File::reference", E.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: H5File::reference
///\brief This is an overloaded function, provided for your convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for the object's name.
///\param ref - IN: Reference pointer
///\param name - IN: Name of the object to be referenced - \c H5std_string
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5File::reference(void* ref, const H5std_string& name) const
{
reference(ref, name.c_str());
}
#ifndef H5_NO_DEPRECATED_SYMBOLS
//--------------------------------------------------------------------------
// Function: H5File::p_get_obj_type (protected)
// Purpose Retrieves the type of object that an object reference points to.
// Parameters
// ref - IN: Reference to query
// ref_type - IN: Type of reference to query
// Return An object type, which can be one of the following:
// H5G_LINK Object is a symbolic link.
// H5G_GROUP Object is a group.
// H5G_DATASET Object is a dataset.
// H5G_TYPE Object is a named datatype
// Exception H5::IdComponentException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5G_obj_t H5File::p_get_obj_type(void *ref, H5R_type_t ref_type) const
{
H5G_obj_t obj_type = H5Rget_obj_type1(getId(), ref_type, ref);
if (obj_type == H5G_UNKNOWN)
{
throw IdComponentException("", "H5Rget_obj_type failed");
}
return(obj_type);
}
#endif /* H5_NO_DEPRECATED_SYMBOLS */
//--------------------------------------------------------------------------
// Function: H5File::p_get_region (protected)
// Purpose Retrieves a dataspace with the region pointed to selected.
// Parameters
// ref_type - IN: Type of reference to get region of - default
// to H5R_DATASET_REGION
// ref - IN: Reference to get region of
// Return Dataspace id
// Exception H5::IdComponentException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
hid_t H5File::p_get_region(void *ref, H5R_type_t ref_type) const
{
hid_t space_id = H5Rget_region(getId(), ref_type, ref);
if (space_id < 0)
{
throw IdComponentException("", "H5Rget_region failed");
}
return(space_id);
H5File::reOpen();
}
//--------------------------------------------------------------------------
@@ -714,10 +543,12 @@ hid_t H5File::getLocId() const
{
return( getId() );
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5File::getId
// Purpose: Get the id of this attribute
///\brief Get the id of this file
///\return File identifier
// Modification:
// May 2008 - BMR
// Class hierarchy is revised to address bugzilla 1068. Class
@@ -731,8 +562,9 @@ hid_t H5File::getId() const
return(id);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5File::p_setId
// Function: H5File::p_setId (protected)
///\brief Sets the identifier of this object to a new value.
///
///\exception H5::IdComponentException when the attempt to close the HDF5
@@ -755,6 +587,7 @@ void H5File::p_setId(const hid_t new_id)
// reset object's id to the given id
id = new_id;
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5File::close
@@ -773,7 +606,7 @@ void H5File::close()
throw FileIException("H5File::close", "H5Fclose failed");
}
// reset the id
id = 0;
id = H5I_INVALID_HID;
}
}

View File

@@ -14,14 +14,19 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5File_H
#define _H5File_H
#ifndef __H5File_H
#define __H5File_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
class H5_DLLCPP H5File : public IdComponent, public CommonFG {
/*! \class H5File
\brief Class H5File represents an HDF5 file.
It inherits from H5Location and CommonFG.
*/
class H5_DLLCPP H5File : public H5Location, public CommonFG {
public:
// Creates or opens an HDF5 file.
H5File( const char* name, unsigned int flags,
@@ -40,18 +45,12 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
// Close this file.
virtual void close();
// Flushes all buffers associated with this file to disk
void flush(H5F_scope_t scope) const;
// Gets the access property list of this file.
FileAccPropList getAccessPlist() const;
// Gets the creation property list of this file.
FileCreatPropList getCreatePlist() const;
// Gets the name of this file.
H5std_string getFileName() const;
// Retrieves the file size of an opened file.
hsize_t getFileSize() const;
@@ -67,17 +66,10 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
// and datatypes) in the same file.
void getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const;
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Retrieves the type of object that an object reference points to.
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
// Retrieves a dataspace with the region pointed to selected.
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Returns the pointer to the file handle of the low-level file driver.
void getVFDHandle(FileAccPropList& fapl, void **file_handle) const;
void getVFDHandle(void **file_handle) const;
void getVFDHandle(const FileAccPropList& fapl, void **file_handle) const;
void getVFDHandle(FileAccPropList& fapl, void **file_handle) const; // kept for backward compatibility
// Determines if a file, specified by its name, is in HDF5 format
static bool isHdf5(const char* name );
@@ -85,24 +77,21 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
// Reopens this file.
void reOpen(); // added for better name
void reopen();
// Creates a reference to a named HDF5 object or to a dataset region
// in this object.
void reference(void* ref, const char* name, const DataSpace& dataspace,
H5R_type_t ref_type = H5R_DATASET_REGION) const;
void reference(void* ref, const char* name) const;
void reference(void* ref, const H5std_string& name) const;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
void reopen(); // obsolete in favor of reOpen()
///\brief Returns this class name
// Gets the file id
virtual hid_t getLocId() const;
#endif // DOXYGEN_SHOULD_SKIP_THIS
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("H5File"); }
// Throw file exception.
virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const;
// Gets the file id
virtual hid_t getLocId() const;
// Default constructor
H5File();
@@ -115,34 +104,21 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
// H5File destructor.
virtual ~H5File();
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Sets the HDF5 file id.
virtual void p_setId(const hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
hid_t id; // HDF5 file id
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// This function is private and contains common code between the
// constructors taking a string or a char*
void p_get_file( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist );
// Creates a reference to an HDF5 object or a dataset region.
void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Retrieves the type of object that an object reference points to.
H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
// Retrieves a dataspace with the region pointed to selected.
hid_t p_get_region(void *ref, H5R_type_t ref_type) const;
protected:
// Sets the HDF5 file id.
virtual void p_setId(const hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
};
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5File_H

View File

@@ -14,19 +14,20 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5FloatType_H
#define _H5FloatType_H
#ifndef __H5FloatType_H
#define __H5FloatType_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
//! Class FloatType operates on HDF5 floating point datatype.
class H5_DLLCPP FloatType : public AtomType {
public:
// Creates a floating-point type using a predefined type
// Creates a floating-point type using a predefined type.
FloatType( const PredType& pred_type );
// Gets the floating-point datatype of the specified dataset
// Gets the floating-point datatype of the specified dataset.
FloatType( const DataSet& dataset );
// Retrieves the exponent bias of a floating-point type.
@@ -53,13 +54,13 @@ class H5_DLLCPP FloatType : public AtomType {
// Sets the mantissa normalization of a floating-point datatype.
void setNorm( H5T_norm_t norm ) const;
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("FloatType"); }
// Default constructor
FloatType();
// Creates a floating-point datatype using an existing id
// Creates a floating-point datatype using an existing id.
FloatType( const hid_t existing_id );
// Copy constructor: makes a copy of the original FloatType object.
@@ -71,4 +72,4 @@ class H5_DLLCPP FloatType : public AtomType {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5FloatType_H

View File

@@ -51,7 +51,7 @@ namespace H5 {
///\brief Default constructor: creates a stub Group.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group::Group() : H5Object(), id(0) {}
Group::Group() : H5Object(), id(H5I_INVALID_HID) {}
//--------------------------------------------------------------------------
// Function: Group copy constructor
@@ -90,7 +90,7 @@ Group::Group(const hid_t existing_id) : H5Object()
//--------------------------------------------------------------------------
// Function: Group overload constructor - dereference
///\brief Given a reference, ref, to an hdf5 group, creates a Group object
///\param obj - IN: Specifying location referenced object is in
///\param loc - IN: Specifying location referenced object is in
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type - default to H5R_OBJECT
///\exception H5::ReferenceException
@@ -99,33 +99,9 @@ Group::Group(const hid_t existing_id) : H5Object()
/// is a datatype that has been named by DataType::commit.
// Programmer Binh-Minh Ribler - Oct, 2006
//--------------------------------------------------------------------------
Group::Group(H5Object& obj, const void* ref, H5R_type_t ref_type) : H5Object()
Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type) : H5Object(), id(H5I_INVALID_HID)
{
try {
id = p_dereference(obj.getId(), ref, ref_type);
} catch (ReferenceException deref_error) {
throw ReferenceException("Group constructor - located by an H5Object",
deref_error.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: Group overload constructor - dereference
///\brief Given a reference, ref, to an hdf5 group, creates a Group object
///\param h5file - IN: Location referenced object is in
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type - default to H5R_OBJECT
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
//--------------------------------------------------------------------------
Group::Group(H5File& h5file, const void* ref, H5R_type_t ref_type) : H5Object()
{
try {
id = p_dereference(h5file.getId(), ref, ref_type);
} catch (ReferenceException deref_error) {
throw ReferenceException("Group constructor - located by an H5File",
deref_error.getDetailMsg());
}
id = H5Location::p_dereference(loc.getId(), ref, ref_type, "constructor - by dereference");
}
//--------------------------------------------------------------------------
@@ -137,66 +113,15 @@ Group::Group(H5File& h5file, const void* ref, H5R_type_t ref_type) : H5Object()
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
//--------------------------------------------------------------------------
Group::Group(Attribute& attr, const void* ref, H5R_type_t ref_type) : H5Object()
Group::Group(const Attribute& attr, const void* ref, H5R_type_t ref_type) : H5Object(), id(H5I_INVALID_HID)
{
try {
id = p_dereference(attr.getId(), ref, ref_type);
} catch (ReferenceException deref_error) {
throw ReferenceException("Group constructor - located by an Attribute",
deref_error.getDetailMsg());
}
}
#ifndef H5_NO_DEPRECATED_SYMBOLS
//--------------------------------------------------------------------------
// Function: Group::getObjType
///\brief Retrieves the type of object that an object reference points to.
///\param ref - IN: Reference to query
///\param ref_type - IN: Type of reference to query, valid values are:
/// \li \c H5R_OBJECT - Reference is an object reference.
/// \li \c H5R_DATASET_REGION - Reference is a dataset region reference.
///\return An object type, which can be one of the following:
/// \li \c H5G_LINK (0) - Object is a symbolic link.
/// \li \c H5G_GROUP (1) - Object is a group.
/// \li \c H5G_DATASET (2) - Object is a dataset.
/// \li \c H5G_TYPE (3) - Object is a named datatype
///\exception H5::GroupIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5G_obj_t Group::getObjType(void *ref, H5R_type_t ref_type) const
{
try {
return(p_get_obj_type(ref, ref_type));
}
catch (IdComponentException E) {
throw GroupIException("Group::getObjType", E.getDetailMsg());
}
}
#endif /* H5_NO_DEPRECATED_SYMBOLS */
//--------------------------------------------------------------------------
// Function: Group::getRegion
///\brief Retrieves a dataspace with the region pointed to selected.
///\param ref - IN: Reference to get region of
///\param ref_type - IN: Type of reference to get region of - default
///\return DataSpace instance
///\exception H5::GroupIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
DataSpace Group::getRegion(void *ref, H5R_type_t ref_type) const
{
try {
DataSpace dataspace(p_get_region(ref, ref_type));
return(dataspace);
}
catch (IdComponentException E) {
throw GroupIException("Group::getRegion", E.getDetailMsg());
}
id = H5Location::p_dereference(attr.getId(), ref, ref_type, "constructor - by dereference");
}
//--------------------------------------------------------------------------
// Function: Group::getId
// Purpose: Get the id of this attribute
///\brief Get the id of this group
///\return Group identifier
// Modification:
// May 2008 - BMR
// Class hierarchy is revised to address bugzilla 1068. Class
@@ -210,6 +135,7 @@ hid_t Group::getId() const
return(id);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: Group::p_setId
///\brief Sets the identifier of this object to a new value.
@@ -234,6 +160,7 @@ void Group::p_setId(const hid_t new_id)
// reset object's id to the given id
id = new_id;
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: Group::close
@@ -252,7 +179,7 @@ void Group::close()
throw GroupIException("Group::close", "H5Gclose failed");
}
// reset the id
id = 0;
id = H5I_INVALID_HID;
}
}

View File

@@ -14,27 +14,24 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5Group_H
#define _H5Group_H
#ifndef __H5Group_H
#define __H5Group_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
/*! \class Group
\brief Class Group represents an HDF5 group.
It inherits many operations from H5Location and CommonFG.
*/
class H5_DLLCPP Group : public H5Object, public CommonFG {
public:
// Close this group.
virtual void close();
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Retrieves the type of object that an object reference points to.
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
// Retrieves a dataspace with the region pointed to selected.
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("Group"); }
// Throw group exception.
@@ -44,9 +41,8 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
virtual hid_t getLocId() const;
// Creates a group by way of dereference.
Group(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
Group(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
Group(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
Group(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
Group(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
// default constructor
Group();
@@ -63,14 +59,17 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
// Creates a copy of an existing group using its id.
Group( const hid_t group_id );
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Sets the group id.
virtual void p_setId(const hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
hid_t id; // HDF5 group id
protected:
// Sets the group id.
virtual void p_setId(const hid_t new_id);
};
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5Group_H

View File

@@ -25,6 +25,7 @@
#include "H5Library.h"
#include "H5IdComponent.h"
#include "H5DataSpace.h"
#include "H5private.h" // for HDmemset
#ifndef H5_NO_NAMESPACE
namespace H5 {
@@ -129,7 +130,7 @@ int IdComponent::getCounter() const
}
//--------------------------------------------------------------------------
// Function: hdfObjectType
// Function: getHDFObjType (static)
///\brief Given an id, returns the type of the object.
///\return a valid HDF object type, which may be one of the following:
/// \li \c H5I_FILE
@@ -144,6 +145,8 @@ int IdComponent::getCounter() const
//--------------------------------------------------------------------------
H5I_type_t IdComponent::getHDFObjType(const hid_t obj_id)
{
if (obj_id <= 0)
return H5I_BADID; // invalid
H5I_type_t id_type = H5Iget_type(obj_id);
if (id_type <= H5I_BADID || id_type >= H5I_NTYPES)
return H5I_BADID; // invalid
@@ -151,6 +154,26 @@ H5I_type_t IdComponent::getHDFObjType(const hid_t obj_id)
return id_type; // valid type
}
//--------------------------------------------------------------------------
// Function: getHDFObjType
///\brief Returns the type of the object. It is an overloaded function
/// of the above function.
///\return a valid HDF object type, which may be one of the following:
/// \li \c H5I_FILE
/// \li \c H5I_GROUP
/// \li \c H5I_DATATYPE
/// \li \c H5I_DATASPACE
/// \li \c H5I_DATASET
/// \li \c H5I_ATTR
/// \li or \c H5I_BADID, if no valid type can be determined or the
/// input object id is invalid.
// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
H5I_type_t IdComponent::getHDFObjType() const
{
return(getHDFObjType(getId()));
}
//--------------------------------------------------------------------------
// Function: IdComponent::operator=
///\brief Assignment operator.
@@ -269,7 +292,7 @@ IdComponent::IdComponent() {}
// Description:
// This function is protected so that the user applications can
// only have access to its code via allowable classes, namely,
// H5File and H5Object subclasses.
// Attribute and H5Location subclasses.
// Programmer Binh-Minh Ribler - Jul, 2004
//--------------------------------------------------------------------------
H5std_string IdComponent::p_get_file_name() const
@@ -287,11 +310,14 @@ H5std_string IdComponent::p_get_file_name() const
// Call H5Fget_name again to get the actual file name
char* name_C = new char[name_size+1]; // temporary C-string for C API
HDmemset(name_C, 0, name_size+1); // clear buffer
name_size = H5Fget_name(temp_id, name_C, name_size+1);
// Check for failure again
if( name_size < 0 )
{
delete []name_C;
throw IdComponentException("", "H5Fget_name failed");
}
@@ -314,6 +340,9 @@ H5std_string IdComponent::p_get_file_name() const
//--------------------------------------------------------------------------
bool IdComponent::p_valid_id(const hid_t obj_id)
{
if (obj_id <= 0)
return false;
H5I_type_t id_type = H5Iget_type(obj_id);
if (id_type <= H5I_BADID || id_type >= H5I_NTYPES)
return false;
@@ -321,6 +350,14 @@ bool IdComponent::p_valid_id(const hid_t obj_id)
return true;
}
// Notes about IdComponent::id
// May 2008 - BMR
// Class hierarchy is revised to address bugzilla 1068...
// ...member IdComponent::id is moved into subclasses, and
// IdComponent::getId now becomes pure virtual function.
// (reasons: 1. encountered problems when adding H5Location;
// 2. Scott Meyers, item 33)
#endif // DOXYGEN_SHOULD_SKIP_THIS
#ifndef H5_NO_NAMESPACE

View File

@@ -14,8 +14,8 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _IdComponent_H
#define _IdComponent_H
#ifndef __IdComponent_H
#define __IdComponent_H
// IdComponent represents an HDF5 object that has an identifier.
@@ -24,6 +24,13 @@ namespace H5 {
#endif
class DataSpace;
/*! \class IdComponent
\brief Class IdComponent provides wrappers of the C functions that
operate on an HDF5 identifier.
In most cases, the C library handles these operations and an application
rarely needs them.
*/
class H5_DLLCPP IdComponent {
public:
// Increment reference counter.
@@ -41,11 +48,16 @@ class H5_DLLCPP IdComponent {
// Returns an HDF5 object type, given the object id.
static H5I_type_t getHDFObjType(const hid_t obj_id);
// Returns an HDF5 object type of this object.
H5I_type_t getHDFObjType() const;
// Assignment operator.
IdComponent& operator=( const IdComponent& rhs );
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Gets the identifier of this object.
virtual hid_t getId () const = 0;
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Sets the identifier of this object to a new value.
void setId(const hid_t new_id);
@@ -96,4 +108,4 @@ class H5_DLLCPP IdComponent {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __IdComponent_H

View File

@@ -14,13 +14,14 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5IntType_H
#define _H5IntType_H
#ifndef __H5IntType_H
#define __H5IntType_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
//! Class IntType operates on HDF5 integer datatype.
class H5_DLLCPP IntType : public AtomType {
public:
// Creates a integer type using a predefined type
@@ -35,7 +36,7 @@ class H5_DLLCPP IntType : public AtomType {
// Sets the sign proprety for an integer type.
void setSign( H5T_sign_t sign ) const;
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("IntType"); }
// Default constructor
@@ -53,4 +54,4 @@ class H5_DLLCPP IntType : public AtomType {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5IntType_H

View File

@@ -14,8 +14,8 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5Library_H
#define _H5Library_H
#ifndef __H5Library_H
#define __H5Library_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
@@ -29,6 +29,12 @@ namespace H5 {
// calling H5close
#endif // DOXYGEN_SHOULD_SKIP_THIS
/*! \class H5Library
\brief Class H5Library operates the HDF5 library globably.
It is not neccessary to construct an instance of H5Library to use the
methods.
*/
class H5_DLLCPP H5Library {
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -67,4 +73,4 @@ class H5_DLLCPP H5Library {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5Library_H

914
c++/src/H5Location.cpp Normal file
View File

@@ -0,0 +1,914 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
#include "H5FaccProp.h"
#include "H5FcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5DataSpace.h"
#include "H5AbstractDs.h"
#include "H5File.h"
#include "H5DataSet.h"
#include "H5Attribute.h"
#include "H5private.h" // for HDmemset
#include <iostream>
using namespace std;
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// userAttrOpWrpr simply interfaces between the user's function and the
// C library function H5Aiterate2; used to resolve the different prototype
// problem. May be moved to Iterator later.
extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
const H5A_info_t *ainfo, void *op_data)
{
H5std_string s_attr_name = H5std_string( attr_name );
#ifdef NO_STATIC_CAST
UserData4Aiterate* myData = (UserData4Aiterate *) op_data;
#else
UserData4Aiterate* myData = static_cast <UserData4Aiterate *> (op_data);
#endif
myData->op( *myData->location, s_attr_name, myData->opData );
return 0;
}
//--------------------------------------------------------------------------
// Function: H5Location default constructor (protected)
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Location::H5Location() : IdComponent() {}
//--------------------------------------------------------------------------
// Function: H5Location overloaded constructor (protected)
// Purpose Creates an H5Location object using the id of an existing HDF5
// object.
// Parameters object_id - IN: Id of an existing HDF5 object
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Location::H5Location(const hid_t object_id) : IdComponent(object_id) {}
//--------------------------------------------------------------------------
// Function: H5Location copy constructor
///\brief Copy constructor: makes a copy of the original H5Location
/// instance.
///\param original - IN: H5Location instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Location::H5Location( const H5Location& original ) : IdComponent( original ) {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Location::createAttribute
///\brief Creates an attribute for a group, dataset, or named datatype.
///\param name - IN: Name of the attribute
///\param data_type - IN: Datatype for the attribute
///\param data_space - IN: Dataspace for the attribute - only simple
/// dataspaces are allowed at this time
///\param create_plist - IN: Creation property list - default to
/// PropList::DEFAULT
///\return Attribute instance
///\exception H5::AttributeIException
///\par Description
/// The attribute name specified in \a name must be unique.
/// Attempting to create an attribute with the same name as an
/// existing attribute will raise an exception, leaving the
/// pre-existing attribute intact. To overwrite an existing
/// attribute with a new attribute of the same name, first
/// delete the existing one with \c H5Location::removeAttr, then
/// recreate it with this function.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Location::createAttribute( const char* name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
{
hid_t type_id = data_type.getId();
hid_t space_id = data_space.getId();
hid_t plist_id = create_plist.getId();
hid_t attr_id = H5Acreate2(getId(), name, type_id, space_id, plist_id, H5P_DEFAULT );
// If the attribute id is valid, create and return the Attribute object
if( attr_id > 0 )
{
Attribute attr( attr_id );
return( attr );
}
else
throw AttributeIException(inMemFunc("createAttribute"), "H5Acreate2 failed");
}
//--------------------------------------------------------------------------
// Function: H5Location::createAttribute
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Location::createAttribute( const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
{
return( createAttribute( name.c_str(), data_type, data_space, create_plist ));
}
//--------------------------------------------------------------------------
// Function: H5Location::openAttribute
///\brief Opens an attribute given its name.
///\param name - IN: Name of the attribute
///\return Attribute instance
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Location::openAttribute( const char* name ) const
{
hid_t attr_id = H5Aopen(getId(), name, H5P_DEFAULT);
if( attr_id > 0 )
{
Attribute attr( attr_id );
return( attr );
}
else
{
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen failed");
}
}
//--------------------------------------------------------------------------
// Function: H5Location::openAttribute
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Location::openAttribute( const H5std_string& name ) const
{
return( openAttribute( name.c_str()) );
}
//--------------------------------------------------------------------------
// Function: H5Location::openAttribute
///\brief Opens an attribute given its index.
///\param idx - IN: Index of the attribute, a 0-based, non-negative integer
///\return Attribute instance
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Location::openAttribute( const unsigned int idx ) const
{
hid_t attr_id = H5Aopen_by_idx(getId(), ".", H5_INDEX_CRT_ORDER,
H5_ITER_INC, (hsize_t)idx, H5P_DEFAULT, H5P_DEFAULT);
if( attr_id > 0 )
{
Attribute attr( attr_id );
return( attr );
}
else
{
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen_by_idx failed");
}
}
//--------------------------------------------------------------------------
// Function: H5Location::iterateAttrs
///\brief Iterates a user's function over all the attributes of an H5
/// object, which may be a group, dataset or named datatype.
///\param user_op - IN: User's function to operate on each attribute
///\param _idx - IN/OUT: Starting (IN) and ending (OUT) attribute indices
///\param op_data - IN: User's data to pass to user's operator function
///\return Returned value of the last operator if it was non-zero, or
/// zero if all attributes were processed
///\exception H5::AttributeIException
///\par Description
/// The signature of user_op is
/// void (*)(H5::H5Location&, H5std_string, void*).
/// For information, please refer to the C layer Reference Manual
/// at:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-Iterate
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int H5Location::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_data )
{
// store the user's function and data
UserData4Aiterate* userData = new UserData4Aiterate;
userData->opData = op_data;
userData->op = user_op;
userData->location = this;
// call the C library routine H5Aiterate2 to iterate the attributes
hsize_t idx = _idx ? (hsize_t)*_idx : 0;
int ret_value = H5Aiterate2(getId(), H5_INDEX_NAME, H5_ITER_INC, &idx,
userAttrOpWrpr, (void *) userData);
// release memory
delete userData;
if( ret_value >= 0 ) {
/* Pass back update index value to calling code */
if (_idx)
*_idx = (unsigned)idx;
return( ret_value );
}
else // raise exception when H5Aiterate returns a negative value
throw AttributeIException(inMemFunc("iterateAttrs"), "H5Aiterate2 failed");
}
//--------------------------------------------------------------------------
// Function: H5Location::getNumAttrs
///\brief Returns the number of attributes attached to this HDF5 object.
///\return Number of attributes
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int H5Location::getNumAttrs() const
{
H5O_info_t oinfo; /* Object info */
if(H5Oget_info(getId(), &oinfo) < 0)
throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed");
else
return( (int)oinfo.num_attrs );
}
//--------------------------------------------------------------------------
// Function: H5Location::attrExists
///\brief Checks whether the named attribute exists at this location.
///\param name - IN: Name of the attribute to be queried
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2013
//--------------------------------------------------------------------------
bool H5Location::attrExists(const char* name) const
{
// Call C routine H5Aexists to determine whether an attribute exists
// at this location, which could be specified by a file, group, dataset,
// or named datatype.
herr_t ret_value = H5Aexists(getId(), name);
if( ret_value > 0 )
return true;
else if(ret_value == 0)
return false;
else // Raise exception when H5Aexists returns a negative value
throw AttributeIException(inMemFunc("attrExists"), "H5Aexists failed");
}
//--------------------------------------------------------------------------
// Function: H5Location::attrExists
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool H5Location::attrExists(const H5std_string& name) const
{
return(attrExists(name.c_str()));
}
//--------------------------------------------------------------------------
// Function: H5Location::removeAttr
///\brief Removes the named attribute from this object.
///\param name - IN: Name of the attribute to be removed
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Location::removeAttr( const char* name ) const
{
herr_t ret_value = H5Adelete(getId(), name);
if( ret_value < 0 )
throw AttributeIException(inMemFunc("removeAttr"), "H5Adelete failed");
}
//--------------------------------------------------------------------------
// Function: H5Location::removeAttr
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Location::removeAttr( const H5std_string& name ) const
{
removeAttr( name.c_str() );
}
//--------------------------------------------------------------------------
// Function: H5Location::renameAttr
///\brief Renames the named attribute from this object.
///\param oldname - IN: Name of the attribute to be renamed
///\param newname - IN: New name ame of the attribute
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
void H5Location::renameAttr(const char* oldname, const char* newname) const
{
herr_t ret_value = H5Arename(getId(), oldname, newname);
if (ret_value < 0)
throw AttributeIException(inMemFunc("renameAttr"), "H5Arename failed");
}
//--------------------------------------------------------------------------
// Function: H5Location::renameAttr
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for the names.
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
void H5Location::renameAttr(const H5std_string& oldname, const H5std_string& newname) const
{
renameAttr (oldname.c_str(), newname.c_str());
}
//--------------------------------------------------------------------------
// Function: H5Location::flush
///\brief Flushes all buffers associated with a location to disk.
///\param scope - IN: Specifies the scope of the flushing action,
/// which can be either of these values:
/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
///\exception H5::Exception
///\par Description
/// This location is used to identify the file to be flushed.
// Programmer Binh-Minh Ribler - 2012
// Modification
// Sep 2012 - BMR
// Moved from H5File/H5Object
//--------------------------------------------------------------------------
void H5Location::flush(H5F_scope_t scope) const
{
herr_t ret_value = H5Fflush(getId(), scope);
if( ret_value < 0 )
{
throw LocationException(inMemFunc("flush"), "H5Fflush failed");
}
}
//--------------------------------------------------------------------------
// Function: H5Location::getFileName
///\brief Gets the name of the file, in which this HDF5 object belongs.
///\return File name
///\exception H5::LocationException
// Programmer Binh-Minh Ribler - Jul, 2004
//--------------------------------------------------------------------------
H5std_string H5Location::getFileName() const
{
try {
return(p_get_file_name());
}
catch (LocationException E) {
throw FileIException(inMemFunc("getFileName"), E.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: H5Location::setComment
///\brief Sets or resets the comment for an object specified by its name.
///\param name - IN: Name of the object
///\param comment - IN: New comment
///\exception H5::LocationException
///\par Description
/// If \a comment is an empty string or a null pointer, the comment
/// message is removed from the object.
/// Comments should be relatively short, null-terminated, ASCII
/// strings. They can be attached to any object that has an
/// object header, e.g., data sets, groups, named data types,
/// and data spaces, but not symbolic links.
// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013)
// Modification
// 2007: QAK modified to use H5O APIs; however the first parameter is
// no longer just file or group, this function should be moved
// to another class to accommodate attribute, dataset, and named
// datatype. - BMR
//--------------------------------------------------------------------------
void H5Location::setComment(const char* name, const char* comment) const
{
herr_t ret_value = H5Oset_comment_by_name(getId(), name, comment, H5P_DEFAULT);
if( ret_value < 0 )
throw LocationException(inMemFunc("setComment"), "H5Oset_comment_by_name failed");
}
//--------------------------------------------------------------------------
// Function: H5Location::setComment
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name and \a comment.
// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013)
//--------------------------------------------------------------------------
void H5Location::setComment(const H5std_string& name, const H5std_string& comment) const
{
setComment(name.c_str(), comment.c_str());
}
//--------------------------------------------------------------------------
// Function: H5Location::setComment
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it doesn't take
/// an object name.
// Programmer Binh-Minh Ribler - Sep 2013
// Modification
//--------------------------------------------------------------------------
void H5Location::setComment(const char* comment) const
{
herr_t ret_value = H5Oset_comment_by_name(getId(), ".", comment, H5P_DEFAULT);
if( ret_value < 0 )
throw LocationException(inMemFunc("setComment"), "H5Oset_comment_by_name failed");
}
//--------------------------------------------------------------------------
// Function: H5Location::setComment
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a comment.
// Programmer Binh-Minh Ribler - Sep 2013
//--------------------------------------------------------------------------
void H5Location::setComment(const H5std_string& comment) const
{
setComment(comment.c_str());
}
//--------------------------------------------------------------------------
// Function: H5Location::removeComment
///\brief Removes the comment from an object specified by its name.
///\param name - IN: Name of the object
///\exception H5::LocationException
// Programmer Binh-Minh Ribler - May 2005 (moved from CommonFG, Sep 2013)
// 2007: QAK modified to use H5O APIs; however the first parameter is
// no longer just file or group, this function should be moved
// to another class to accommodate attribute, dataset, and named
// datatype. - BMR
//--------------------------------------------------------------------------
void H5Location::removeComment(const char* name) const
{
herr_t ret_value = H5Oset_comment_by_name(getId(), name, NULL, H5P_DEFAULT);
if( ret_value < 0 )
throw LocationException(inMemFunc("removeComment"), "H5Oset_comment_by_name failed");
}
//--------------------------------------------------------------------------
// Function: H5Location::removeComment
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - May 2005 (moved from CommonFG, Sep 2013)
//--------------------------------------------------------------------------
void H5Location::removeComment(const H5std_string& name) const
{
removeComment (name.c_str());
}
//--------------------------------------------------------------------------
// Function: H5Location::getComment
///\brief Retrieves the comment for this location, returning its length.
///\param name - IN: Name of the object
///\param buf_size - IN: Length of the comment to retrieve
///\param comment - OUT: Retrieved comment
///\return Actual length of the comment
///\exception H5::LocationException
///\par Description
/// This function retrieves \a buf_size characters of the comment
/// including the null terminator. Thus, if the actual length
/// of the comment is more than buf_size-1, the retrieved comment
/// will be truncated to accommodate the null terminator.
// Programmer Binh-Minh Ribler - Mar 2014
//--------------------------------------------------------------------------
ssize_t H5Location::getComment(const char* name, size_t buf_size, char* comment) const
{
// H5Oget_comment_by_name will get buf_size chars of the comment including
// the null terminator
ssize_t comment_len;
comment_len = H5Oget_comment_by_name(getId(), name, comment, buf_size, H5P_DEFAULT);
// If H5Oget_comment_by_name returns a negative value, raise an exception
if (comment_len < 0)
{
throw LocationException("H5Location::getComment", "H5Oget_comment_by_name failed");
}
// If the comment is longer than the provided buffer size, the C library
// will not null terminate it
if ((size_t)comment_len >= buf_size)
comment[buf_size-1] = '\0';
// Return the actual comment length, which might be different from buf_size
return(comment_len);
}
//--------------------------------------------------------------------------
// Function: H5Location::getComment
///\brief Returns the comment as \a string for this location,
/// returning its length.
///\param name - IN: Name of the object
///\param buf_size - IN: Length of the comment to retrieve, default to 0
///\return Comment string
///\exception H5::LocationException
// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013)
//--------------------------------------------------------------------------
H5std_string H5Location::getComment(const char* name, size_t buf_size) const
{
// Initialize string to "", so that if there is no comment, the returned
// string will be empty
H5std_string comment("");
// Preliminary call to get the comment's length
ssize_t comment_len = H5Oget_comment_by_name(getId(), name, NULL, (size_t)0, H5P_DEFAULT);
// If H5Oget_comment_by_name returns a negative value, raise an exception
if (comment_len < 0)
{
throw LocationException("H5Location::getComment", "H5Oget_comment_by_name failed");
}
// If comment exists, calls C routine again to get it
else if (comment_len > 0)
{
size_t tmp_len = buf_size;
// If buffer size is not provided, use comment length
if (tmp_len == 0)
tmp_len = comment_len;
// Temporary buffer for char* comment
char* comment_C = new char[tmp_len+1];
HDmemset(comment_C, 0, tmp_len+1); // clear buffer
// Used overloaded function
ssize_t comment_len = getComment(name, tmp_len+1, comment_C);
if (comment_len < 0)
{
delete []comment_C;
throw LocationException("H5Location::getComment", "H5Oget_comment_by_name failed");
}
// Convert the C comment to return
comment = comment_C;
// Clean up resource
delete []comment_C;
}
// Return the string comment
return(comment);
}
//--------------------------------------------------------------------------
// Function: H5Location::getComment
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013)
//--------------------------------------------------------------------------
H5std_string H5Location::getComment(const H5std_string& name, size_t buf_size) const
{
return(getComment(name.c_str(), buf_size));
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Location::p_reference (protected)
// Purpose Creates a reference to an HDF5 object or a dataset region.
// Parameters
// name - IN: Name of the object to be referenced
// dataspace - IN: Dataspace with selection
// ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
// Exception H5::ReferenceException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5Location::p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const
{
herr_t ret_value = H5Rcreate(ref, getId(), name, ref_type, space_id);
if (ret_value < 0)
{
throw ReferenceException(inMemFunc("reference"), "H5Rcreate failed");
}
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Location::reference
///\brief Creates a reference to an HDF5 object or a dataset region.
///\param ref - IN: Reference pointer
///\param name - IN: Name of the object to be referenced
///\param dataspace - IN: Dataspace with selection
///\param ref_type - IN: Type of reference to query, valid values are:
/// \li \c H5R_OBJECT - Reference is an object reference.
/// \li \c H5R_DATASET_REGION - Reference is a dataset region
/// reference. (default)
///\exception H5::ReferenceException
///\note This method is more suitable for a dataset region reference.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5Location::reference(void* ref, const char* name, const DataSpace& dataspace, H5R_type_t ref_type) const
{
try {
p_reference(ref, name, dataspace.getId(), ref_type);
}
catch (ReferenceException E) {
throw ReferenceException(inMemFunc("reference"), E.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: H5Location::reference
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
///\param ref - IN: Reference pointer
///\param name - IN: Name of the object to be referenced
///\param dataspace - IN: Dataspace with selection
///\param ref_type - IN: Type of reference to query, valid values are:
/// \li \c H5R_OBJECT - Reference is an object reference.
/// \li \c H5R_DATASET_REGION - Reference is a dataset region
/// reference. (default)
///\exception H5::ReferenceException
///\note This method is more suitable for a dataset region reference.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5Location::reference(void* ref, const H5std_string& name, const DataSpace& dataspace, H5R_type_t ref_type) const
{
try {
p_reference(ref, name.c_str(), dataspace.getId(), ref_type);
}
catch (ReferenceException E) {
throw ReferenceException(inMemFunc("reference"), E.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: H5Location::reference
///\brief This is an overloaded function, provided for your convenience.
/// It differs from the above function in that it does not take
/// a DataSpace object and the reference type must be specified.
///\param ref - IN: Reference pointer
///\param name - IN: Name of the object to be referenced
///\param ref_type - IN: Type of reference to query, valid values are:
/// \li \c H5R_OBJECT - Reference is an object reference (default)
/// \li \c H5R_DATASET_REGION - Reference is a dataset region
///\exception H5::ReferenceException
///\note This method is more suitable for an object reference.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5Location::reference(void* ref, const char* name, H5R_type_t ref_type) const
{
try {
p_reference(ref, name, -1, ref_type);
}
catch (ReferenceException E) {
throw ReferenceException(inMemFunc("reference"), E.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: H5Location::reference
///\brief This is an overloaded function, provided for your convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for the object's name.
///\param ref - IN: Reference pointer
///\param name - IN: Name of the object to be referenced - \c H5std_string
///\param ref_type - IN: Type of reference to query, valid values are:
/// \li \c H5R_OBJECT - Reference is an object reference (default)
/// \li \c H5R_DATASET_REGION - Reference is a dataset region
///\note This method is more suitable for an object reference.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5Location::reference(void* ref, const H5std_string& name, H5R_type_t ref_type) const
{
reference(ref, name.c_str(), ref_type);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Location::p_dereference (protected)
// Purpose Dereference a ref into an hdf5 object.
// Parameters
// loc_id - IN: An hdf5 identifier specifying the location of the
// referenced object
// ref - IN: Reference pointer
// ref_type - IN: Reference type
// Exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// May 2008 - BMR
// Moved from IdComponent.
//--------------------------------------------------------------------------
hid_t H5Location::p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type, const char* from_func)
{
hid_t temp_id = H5Rdereference(loc_id, ref_type, ref);
if (temp_id < 0)
{
throw ReferenceException(inMemFunc(from_func), "H5Rdereference failed");
}
return(temp_id);
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Location::dereference
///\brief Dereferences a reference into an HDF5 object, given an HDF5 object.
///\param loc - IN: Location of the referenced object
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// May, 2008
// Corrected missing parameters. - BMR
//--------------------------------------------------------------------------
void H5Location::dereference(const H5Location& loc, const void* ref, H5R_type_t ref_type)
{
p_setId(p_dereference(loc.getId(), ref, ref_type, "dereference"));
}
//--------------------------------------------------------------------------
// Function: H5Location::dereference
///\brief Dereferences a reference into an HDF5 object, given an attribute.
///\param attr - IN: Attribute specifying the location of the referenced object
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// May, 2008
// Corrected missing parameters. - BMR
//--------------------------------------------------------------------------
void H5Location::dereference(const Attribute& attr, const void* ref, H5R_type_t ref_type)
{
p_setId(p_dereference(attr.getId(), ref, ref_type, "dereference"));
}
#ifndef H5_NO_DEPRECATED_SYMBOLS
//--------------------------------------------------------------------------
// Function: H5Location::getObjType
///\brief Retrieves the type of object that an object reference points to.
///\param ref_type - IN: Type of reference to query, valid values are:
/// \li \c H5R_OBJECT - Reference is an object reference.
/// \li \c H5R_DATASET_REGION - Reference is a dataset region reference.
///\param ref - IN: Reference to query
///\return An object type, which can be one of the following:
/// \li \c H5G_UNKNOWN - A failure occurs. (-1)
/// \li \c H5G_GROUP - Object is a group.
/// \li \c H5G_DATASET - Object is a dataset.
/// \li \c H5G_TYPE Object - is a named datatype
/// \li \c H5G_LINK - Object is a symbolic link.
/// \li \c H5G_UDLINK - Object is a user-defined link.
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - May, 2004
// Modification
// Sep 2012: Moved up from H5File, Group, DataSet, and DataType
//--------------------------------------------------------------------------
H5G_obj_t H5Location::getObjType(void *ref, H5R_type_t ref_type) const
{
try {
return(p_get_obj_type(ref, ref_type));
}
catch (ReferenceException E) {
throw ReferenceException(inMemFunc("getObjType"), E.getDetailMsg());
}
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Location::p_get_obj_type (protected)
// Purpose Retrieves the type of object that an object reference points to.
// Parameters
// ref - IN: Reference to query
// ref_type - IN: Type of reference to query
// Return An object type, which can be one of the following:
// H5G_UNKNOWN \tFailure occurs (-1)
// H5G_GROUP \tObject is a group.
// H5G_DATASET \tObject is a dataset.
// H5G_TYPE Object \tis a named datatype.
// H5G_LINK \tObject is a symbolic link.
// H5G_UDLINK \tObject is a user-defined link.
// Exception H5::ReferenceException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5G_obj_t H5Location::p_get_obj_type(void *ref, H5R_type_t ref_type) const
{
H5G_obj_t obj_type = H5Rget_obj_type1(getId(), ref_type, ref);
if (obj_type == H5G_UNKNOWN)
{
throw ReferenceException(inMemFunc("getObjType"), "H5Rget_obj_type1 failed");
}
return(obj_type);
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
#endif /* H5_NO_DEPRECATED_SYMBOLS */
//--------------------------------------------------------------------------
// Function: H5Location::getRefObjType
///\brief Retrieves the type of object that an object reference points to.
///\param ref - IN: Reference to query
///\param ref_type - IN: Type of reference to query, valid values are:
/// \li \c H5R_OBJECT - Reference is an object reference.
/// \li \c H5R_DATASET_REGION - Reference is a dataset region reference.
///\return An object type, which can be one of the following:
/// \li \c H5O_TYPE_UNKNOWN - Unknown object type (-1)
/// \li \c H5O_TYPE_GROUP - Object is a group
/// \li \c H5O_TYPE_DATASET - Object is a dataset
/// \li \c H5O_TYPE_NAMED_DATATYPE - Object is a named datatype
/// \li \c H5O_TYPE_NTYPES - Number of different object types
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5O_type_t H5Location::getRefObjType(void *ref, H5R_type_t ref_type) const
{
try {
return(p_get_ref_obj_type(ref, ref_type));
}
catch (ReferenceException E) {
throw ReferenceException(inMemFunc("getRefObjType"), E.getDetailMsg());
}
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Location::p_get_ref_obj_type (protected)
// Purpose Retrieves the type of object that an object reference points to.
// Parameters
// ref - IN: Reference to query
// ref_type - IN: Type of reference to query
// Return An object type, which can be one of the following:
// H5O_TYPE_UNKNOWN - Unknown object type (-1)
// H5O_TYPE_GROUP - Object is a group
// H5O_TYPE_DATASET - Object is a dataset
// H5O_TYPE_NAMED_DATATYPE - Object is a named datatype
// H5O_TYPE_NTYPES - Number of object types
// Exception H5::ReferenceException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5O_type_t H5Location::p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const
{
H5O_type_t obj_type = H5O_TYPE_UNKNOWN;
herr_t ret_value = H5Rget_obj_type2(getId(), ref_type, ref, &obj_type);
if (ret_value < 0)
{
throw ReferenceException(inMemFunc("getRefObjType"), "H5Rget_obj_type2 failed");
}
if (obj_type == H5O_TYPE_UNKNOWN || obj_type >= H5O_TYPE_NTYPES)
{
throw ReferenceException(inMemFunc("getRefObjType"), "H5Rget_obj_type2 returned invalid type");
}
return(obj_type);
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Location::getRegion
///\brief Retrieves a dataspace with the region pointed to selected.
///\param ref - IN: Reference to get region of
///\param ref_type - IN: Type of reference to get region of - default
// to H5R_DATASET_REGION
///\return DataSpace object
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
DataSpace H5Location::getRegion(void *ref, H5R_type_t ref_type) const
{
hid_t space_id = H5Rget_region(getId(), ref_type, ref);
if (space_id < 0)
{
throw ReferenceException(inMemFunc("getRegion"), "H5Rget_region failed");
}
try {
DataSpace dataspace(space_id);
return(dataspace);
}
catch (DataSpaceIException E) {
throw ReferenceException(inMemFunc("getRegion"), E.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: H5Location destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Location::~H5Location() {}
#ifndef H5_NO_NAMESPACE
} // end namespace
#endif

171
c++/src/H5Location.h Normal file
View File

@@ -0,0 +1,171 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef __H5Location_H
#define __H5Location_H
#include "H5Classes.h" // constains forward class declarations
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
class H5_DLLCPP H5Location; // forward declaration for UserData4Aiterate
// Define the operator function pointer for H5Aiterate().
typedef void (*attr_operator_t)( H5Location& loc/*in*/,
const H5std_string attr_name/*in*/,
void *operator_data/*in,out*/);
class UserData4Aiterate { // user data for attribute iteration
public:
attr_operator_t op;
void* opData;
H5Location* location;
};
/*! \class H5Location
\brief H5Location is an abstract base class, added in version 1.8.12.
It provides a collection of wrappers for the C functions that take a
location identifier to specify the HDF5 object. The location identifier
can be either file, group, dataset, or named datatype.
*/
// Most of these methods were in H5Object but are now moved here because
// a location can be a file, group, dataset, or named datatype. -BMR, 2013-10-1
class H5_DLLCPP H5Location : public IdComponent {
public:
// Creates an attribute for the specified object at this location
// PropList is currently not used, so always be default.
Attribute createAttribute( const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
Attribute createAttribute( const H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
// Given its name, opens the attribute that belongs to an object at
// this location.
Attribute openAttribute( const char* name ) const;
Attribute openAttribute( const H5std_string& name ) const;
// Given its index, opens the attribute that belongs to an object at
// this location.
Attribute openAttribute( const unsigned int idx ) const;
// Flushes all buffers associated with this location to disk.
void flush( H5F_scope_t scope ) const;
// Gets the name of the file, specified by this location.
H5std_string getFileName() const;
// Determines the number of attributes at this location.
int getNumAttrs() const;
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Retrieves the type of object that an object reference points to.
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
// Retrieves the type of object that an object reference points to.
H5O_type_t getRefObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
// Note: getRefObjType deprecates getObjType, but getObjType's name is
// misleading, so getRefObjType is used in the new function instead.
// Iterate user's function over the attributes at this location.
int iterateAttrs(attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL);
// Checks whether the named attribute exists at this location.
bool attrExists(const char* name) const;
bool attrExists(const H5std_string& name) const;
// Renames the named attribute to a new name.
void renameAttr(const char* oldname, const char* newname) const;
void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
// Removes the named attribute from this location.
void removeAttr(const char* name) const;
void removeAttr(const H5std_string& name) const;
// Sets the comment for an HDF5 object specified by its name.
void setComment(const char* name, const char* comment) const;
void setComment(const H5std_string& name, const H5std_string& comment) const;
void setComment(const char* comment) const;
void setComment(const H5std_string& comment) const;
// Retrieves comment for the HDF5 object specified by its name.
ssize_t getComment(const char* name, size_t buf_size, char* comment) const;
H5std_string getComment(const char* name, size_t buf_size=0) const;
H5std_string getComment(const H5std_string& name, size_t buf_size=0) const;
// Removes the comment for the HDF5 object specified by its name.
void removeComment(const char* name) const;
void removeComment(const H5std_string& name) const;
// Creates a reference to a named object or to a dataset region
// in this object.
void reference(void* ref, const char* name,
H5R_type_t ref_type = H5R_OBJECT) const;
void reference(void* ref, const H5std_string& name,
H5R_type_t ref_type = H5R_OBJECT) const;
void reference(void* ref, const char* name, const DataSpace& dataspace,
H5R_type_t ref_type = H5R_DATASET_REGION) const;
void reference(void* ref, const H5std_string& name, const DataSpace& dataspace,
H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Open a referenced object whose location is specified by either
// a file, an HDF5 object, or an attribute.
void dereference(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
void dereference(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
// Retrieves a dataspace with the region pointed to selected.
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
///\brief Returns an identifier. (pure virtual)
virtual hid_t getId() const = 0;
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Default constructor,
H5Location();
// Creates a copy of an existing object giving the location id.
H5Location(const hid_t loc_id);
// Copy constructor.
H5Location(const H5Location& original);
// Creates a reference to an HDF5 object or a dataset region.
void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
// Dereferences a ref into an HDF5 id.
hid_t p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type, const char* from_func);
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Retrieves the type of object that an object reference points to.
H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
// Retrieves the type of object that an object reference points to.
H5O_type_t p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const;
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Noop destructor.
virtual ~H5Location();
}; /* end class H5Location */
#ifndef H5_NO_NAMESPACE
}
#endif
#endif // __H5Location_H

View File

@@ -31,36 +31,18 @@
#include "H5File.h"
#include "H5DataSet.h"
#include "H5Attribute.h"
#include "H5private.h" // for HDmemset
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// userAttrOpWrpr simply interfaces between the user's function and the
// C library function H5Aiterate2; used to resolve the different prototype
// problem. May be moved to Iterator later.
extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
const H5A_info_t *ainfo, void *op_data)
{
H5std_string s_attr_name = H5std_string( attr_name );
#ifdef NO_STATIC_CAST
UserData4Aiterate* myData = (UserData4Aiterate *) op_data;
#else
UserData4Aiterate* myData = static_cast <UserData4Aiterate *> (op_data);
#endif
myData->op( *myData->object, s_attr_name, myData->opData );
return 0;
}
//--------------------------------------------------------------------------
// Function: H5Object default constructor (protected)
// Description
// The id is set by IdComponent() but subclass constructor will
// set it to a valid HDF5 id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Object::H5Object() : IdComponent(0) {}
H5Object::H5Object() : H5Location() {}
//--------------------------------------------------------------------------
// Function: H5Object overloaded constructor (protected)
@@ -69,9 +51,118 @@ H5Object::H5Object() : IdComponent(0) {}
// Parameters object_id - IN: Id of an existing HDF5 object
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Object::H5Object( const hid_t object_id ) : IdComponent( object_id ) {}
H5Object::H5Object( const hid_t object_id ) : H5Location( object_id ) {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: getObjName
///\brief Given an id, returns the type of the object.
///\return The name of the object
// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
ssize_t H5Object::getObjName(char *obj_name, size_t buf_size) const
{
// H5Iget_name will get buf_size-1 chars of the name to null terminate it
ssize_t name_size = H5Iget_name(getId(), obj_name, buf_size);
// If H5Iget_name returns a negative value, raise an exception
if (name_size < 0)
{
throw Exception(inMemFunc("getObjName"), "H5Iget_name failed");
}
else if (name_size == 0)
{
throw Exception(inMemFunc("getObjName"), "Object must have a name, but name length is 0");
}
// Return length of the name
return(name_size);
}
//--------------------------------------------------------------------------
// Function: H5Object::getObjName
///\brief Returns the name of this object as an \a H5std_string.
///\return Name of the object
///\exception H5::Exception
// Programmer Binh-Minh Ribler - Mar, 2014
// Modification
//--------------------------------------------------------------------------
H5std_string H5Object::getObjName() const
{
H5std_string obj_name(""); // object name to return
// Preliminary call to get the size of the object name
ssize_t name_size = H5Iget_name(getId(), NULL, (size_t)0);
// If H5Iget_name failed, throw exception
if (name_size < 0)
{
throw Exception(inMemFunc("getObjName"), "H5Iget_name failed");
}
else if (name_size == 0)
{
throw Exception(inMemFunc("getObjName"), "Object must have a name, but name length is 0");
}
// Object's name exists, retrieve it
else if (name_size > 0)
{
char* name_C = new char[name_size+1]; // temporary C-string
HDmemset(name_C, 0, name_size+1); // clear buffer
// Use overloaded function
name_size = getObjName(name_C, name_size+1);
// Convert the C object name to return
obj_name = name_C;
// Clean up resource
delete []name_C;
}
// Return object's name
return(obj_name);
}
//--------------------------------------------------------------------------
// Function: H5Object::getObjName
///\brief Gets the name of this object, returning its length.
///\param obj_name - OUT: Buffer for the name string as \a H5std_string
///\param len - IN: Desired length of the name, default to 0
///\return Actual length of the object name
///\exception H5::Exception
///\par Description
/// This function retrieves the object's name as an std string.
/// buf_size can specify a specific length or default to 0, in
/// which case the entire name will be retrieved.
// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
ssize_t H5Object::getObjName(H5std_string& obj_name, size_t len) const
{
ssize_t name_size = 0;
// If no length is provided, get the entire object name
if (len == 0)
{
obj_name = getObjName();
name_size = obj_name.length();
}
// If length is provided, get that number of characters in name
else
{
char* name_C = new char[len+1]; // temporary C-string
HDmemset(name_C, 0, len+1); // clear buffer
// Use overloaded function
name_size = getObjName(name_C, len+1);
// Convert the C object name to return
obj_name = name_C;
// Clean up resource
delete []name_C;
}
// Otherwise, keep obj_name intact
// Return name size
return(name_size);
}
//--------------------------------------------------------------------------
// Function: H5Object copy constructor
@@ -80,496 +171,7 @@ H5Object::H5Object( const hid_t object_id ) : IdComponent( object_id ) {}
///\param original - IN: H5Object instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Object::H5Object( const H5Object& original ) : IdComponent( original ) {}
//--------------------------------------------------------------------------
// Function: H5Object::createAttribute
///\brief Creates an attribute for a group, dataset, or named datatype.
///\param name - IN: Name of the attribute
///\param data_type - IN: Datatype for the attribute
///\param data_space - IN: Dataspace for the attribute - only simple
/// dataspaces are allowed at this time
///\param create_plist - IN: Creation property list - default to
/// PropList::DEFAULT
///\return Attribute instance
///\exception H5::AttributeIException
///\par Description
/// The attribute name specified in \a name must be unique.
/// Attempting to create an attribute with the same name as an
/// existing attribute will raise an exception, leaving the
/// pre-existing attribute intact. To overwrite an existing
/// attribute with a new attribute of the same name, first
/// delete the existing one with \c H5Object::removeAttr, then
/// recreate it with this function.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::createAttribute( const char* name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
{
hid_t type_id = data_type.getId();
hid_t space_id = data_space.getId();
hid_t plist_id = create_plist.getId();
hid_t attr_id = H5Acreate2(getId(), name, type_id, space_id, plist_id, H5P_DEFAULT );
// If the attribute id is valid, create and return the Attribute object
if( attr_id > 0 )
{
Attribute attr( attr_id );
return( attr );
}
else
throw AttributeIException(inMemFunc("createAttribute"), "H5Acreate2 failed");
}
//--------------------------------------------------------------------------
// Function: H5Object::createAttribute
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::createAttribute( const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
{
return( createAttribute( name.c_str(), data_type, data_space, create_plist ));
}
//--------------------------------------------------------------------------
// Function: H5Object::openAttribute
///\brief Opens an attribute given its name.
///\param name - IN: Name of the attribute
///\return Attribute instance
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::openAttribute( const char* name ) const
{
hid_t attr_id = H5Aopen(getId(), name, H5P_DEFAULT);
if( attr_id > 0 )
{
Attribute attr( attr_id );
return( attr );
}
else
{
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen failed");
}
}
//--------------------------------------------------------------------------
// Function: H5Object::openAttribute
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::openAttribute( const H5std_string& name ) const
{
return( openAttribute( name.c_str()) );
}
//--------------------------------------------------------------------------
// Function: H5Object::openAttribute
///\brief Opens an attribute given its index.
///\param idx - IN: Index of the attribute, a 0-based, non-negative integer
///\return Attribute instance
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::openAttribute( const unsigned int idx ) const
{
hid_t attr_id = H5Aopen_by_idx(getId(), ".", H5_INDEX_CRT_ORDER,
H5_ITER_INC, (hsize_t)idx, H5P_DEFAULT, H5P_DEFAULT);
if( attr_id > 0 )
{
Attribute attr( attr_id );
return( attr );
}
else
{
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen_by_idx failed");
}
}
//--------------------------------------------------------------------------
// Function: H5Object::iterateAttrs
///\brief Iterates a user's function over all the attributes of an H5
/// object, which may be a group, dataset or named datatype.
///\param user_op - IN: User's function to operate on each attribute
///\param _idx - IN/OUT: Starting (IN) and ending (OUT) attribute indices
///\param op_data - IN: User's data to pass to user's operator function
///\return Returned value of the last operator if it was non-zero, or
/// zero if all attributes were processed
///\exception H5::AttributeIException
///\par Description
/// The signature of user_op is
/// void (*)(H5::H5Object&, H5std_string, void*).
/// For information, please refer to the C layer Reference Manual
/// at:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-Iterate
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int H5Object::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_data )
{
// store the user's function and data
UserData4Aiterate* userData = new UserData4Aiterate;
userData->opData = op_data;
userData->op = user_op;
userData->object = this;
// call the C library routine H5Aiterate2 to iterate the attributes
hsize_t idx = _idx ? (hsize_t)*_idx : 0;
int ret_value = H5Aiterate2(getId(), H5_INDEX_NAME, H5_ITER_INC, &idx,
userAttrOpWrpr, (void *) userData);
// release memory
delete userData;
if( ret_value >= 0 ) {
/* Pass back update index value to calling code */
if (_idx)
*_idx = (unsigned)idx;
return( ret_value );
}
else // raise exception when H5Aiterate returns a negative value
throw AttributeIException(inMemFunc("iterateAttrs"), "H5Aiterate2 failed");
}
//--------------------------------------------------------------------------
// Function: H5Object::getNumAttrs
///\brief Returns the number of attributes attached to this HDF5 object.
///\return Number of attributes
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int H5Object::getNumAttrs() const
{
H5O_info_t oinfo; /* Object info */
if(H5Oget_info(getId(), &oinfo) < 0)
throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed");
else
return( (int)oinfo.num_attrs );
}
//--------------------------------------------------------------------------
// Function: H5Object::removeAttr
///\brief Removes the named attribute from this object.
///\param name - IN: Name of the attribute to be removed
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Object::removeAttr( const char* name ) const
{
herr_t ret_value = H5Adelete(getId(), name);
if( ret_value < 0 )
throw AttributeIException(inMemFunc("removeAttr"), "H5Adelete failed");
}
//--------------------------------------------------------------------------
// Function: H5Object::removeAttr
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Object::removeAttr( const H5std_string& name ) const
{
removeAttr( name.c_str() );
}
//--------------------------------------------------------------------------
// Function: H5Object::renameAttr
///\brief Renames the named attribute from this object.
///\param oldname - IN: Name of the attribute to be renamed
///\param newname - IN: New name ame of the attribute
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
void H5Object::renameAttr(const char* oldname, const char* newname) const
{
herr_t ret_value = H5Arename(getId(), oldname, newname);
if (ret_value < 0)
throw AttributeIException(inMemFunc("renameAttr"), "H5Arename failed");
}
//--------------------------------------------------------------------------
// Function: H5Object::renameAttr
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for the names.
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
void H5Object::renameAttr(const H5std_string& oldname, const H5std_string& newname) const
{
renameAttr (oldname.c_str(), newname.c_str());
}
//--------------------------------------------------------------------------
// Function: H5Object::flush
///\brief Flushes all buffers associated with a file to disk.
///\param scope - IN: Specifies the scope of the flushing action,
/// which can be either of these values:
/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
///\exception H5::AttributeIException
///\par Description
/// This object is used to identify the file to be flushed.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Object::flush(H5F_scope_t scope) const
{
herr_t ret_value = H5Fflush(getId(), scope);
if( ret_value < 0 )
{
throw FileIException(inMemFunc("flush"), "H5Fflush failed");
}
}
//--------------------------------------------------------------------------
// Function: H5Object::getFileName
///\brief Gets the name of the file, in which this HDF5 object belongs.
///\return File name
///\exception H5::IdComponentException
// Programmer Binh-Minh Ribler - Jul, 2004
//--------------------------------------------------------------------------
H5std_string H5Object::getFileName() const
{
try {
return(p_get_file_name());
}
catch (IdComponentException E) {
throw FileIException(inMemFunc("getFileName"), E.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: H5Object::p_reference (protected)
// Purpose Creates a reference to an HDF5 object or a dataset region.
// Parameters
// name - IN: Name of the object to be referenced
// dataspace - IN: Dataspace with selection
// ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
// Exception H5::IdComponentException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5Object::p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const
{
herr_t ret_value = H5Rcreate(ref, getId(), name, ref_type, space_id);
if (ret_value < 0)
{
throw IdComponentException("", "H5Rcreate failed");
}
}
//--------------------------------------------------------------------------
// Function: H5Object::reference
///\brief Creates a reference to an HDF5 object or a dataset region.
///\param ref - IN: Reference pointer
///\param name - IN: Name of the object to be referenced
///\param dataspace - IN: Dataspace with selection
///\param ref_type - IN: Type of reference to query, valid values are:
/// \li \c H5R_OBJECT - Reference is an object reference.
/// \li \c H5R_DATASET_REGION - Reference is a dataset region
/// reference. - this is the default
///\exception H5::IdComponentException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5Object::reference(void* ref, const char* name, const DataSpace& dataspace, H5R_type_t ref_type) const
{
try {
p_reference(ref, name, dataspace.getId(), ref_type);
}
catch (IdComponentException E) {
throw IdComponentException("H5Object::reference", E.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: H5Object::reference
///\brief This is an overloaded function, provided for your convenience.
/// It differs from the above function in that it only creates
/// a reference to an HDF5 object, not to a dataset region.
///\param ref - IN: Reference pointer
///\param name - IN: Name of the object to be referenced - \c char pointer
///\exception H5::IdComponentException
///\par Description
// This function passes H5R_OBJECT and -1 to the protected
// function for it to pass to the C API H5Rcreate
// to create a reference to the named object.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5Object::reference(void* ref, const char* name) const
{
try {
p_reference(ref, name, -1, H5R_OBJECT);
}
catch (IdComponentException E) {
throw IdComponentException("H5Object::reference", E.getDetailMsg());
}
}
//--------------------------------------------------------------------------
// Function: H5Object::reference
///\brief This is an overloaded function, provided for your convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for the object's name.
///\param ref - IN: Reference pointer
///\param name - IN: Name of the object to be referenced - \c H5std_string
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5Object::reference(void* ref, const H5std_string& name) const
{
reference(ref, name.c_str());
}
//--------------------------------------------------------------------------
// Function: H5Object::p_dereference (protected)
// Purpose Dereference a ref into an hdf5 object.
// Parameters
// loc_id - IN: An hdf5 identifier specifying the location of the
// referenced object
// ref - IN: Reference pointer
// ref_type - IN: Reference type
// Exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// May 2008 - BMR
// Moved from IdComponent.
//--------------------------------------------------------------------------
hid_t H5Object::p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type)
{
hid_t temp_id;
temp_id = H5Rdereference(loc_id, ref_type, ref);
if (temp_id < 0)
{
throw ReferenceException("", "H5Rdereference failed");
}
// No failure, set id to the object
return(temp_id);
}
//--------------------------------------------------------------------------
// Function: H5Object::dereference
///\brief Dereferences a reference into an HDF5 object, given an HDF5 object.
///\param obj - IN: Object specifying the location of the referenced object
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// May, 2008
// Corrected missing parameters. - BMR
//--------------------------------------------------------------------------
void H5Object::dereference(H5Object& obj, const void* ref, H5R_type_t ref_type)
{
hid_t temp_id;
try {
temp_id = p_dereference(obj.getId(), ref, ref_type);
}
catch (ReferenceException E) {
throw ReferenceException("H5Object::dereference - located by object", E.getDetailMsg());
}
p_setId(temp_id);
}
//--------------------------------------------------------------------------
// Function: H5Object::dereference
///\brief Dereferences a reference into an HDF5 object, given an HDF5 file.
///\param h5file - IN: HDF5 file specifying the location of the referenced object
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// May, 2008
// Corrected missing parameters. - BMR
//--------------------------------------------------------------------------
void H5Object::dereference(H5File& h5file, const void* ref, H5R_type_t ref_type)
{
hid_t temp_id;
try {
temp_id = p_dereference(h5file.getId(), ref, ref_type);
}
catch (ReferenceException E) {
throw ReferenceException("H5Object::dereference - located by file", E.getDetailMsg());
}
p_setId(temp_id);
}
//--------------------------------------------------------------------------
// Function: H5Object::dereference
///\brief Dereferences a reference into an HDF5 object, given an attribute.
///\param attr - IN: Attribute specifying the location of the referenced object
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// May, 2008
// Corrected missing parameters. - BMR
//--------------------------------------------------------------------------
void H5Object::dereference(Attribute& attr, const void* ref, H5R_type_t ref_type)
{
hid_t temp_id;
try {
temp_id = p_dereference(attr.getId(), ref, ref_type);
}
catch (ReferenceException E) {
throw ReferenceException("H5Object::dereference - located by attribute", E.getDetailMsg());
}
p_setId(temp_id);
}
#ifndef H5_NO_DEPRECATED_SYMBOLS
//--------------------------------------------------------------------------
// Function: H5Object::p_get_obj_type (protected)
// Purpose Retrieves the type of object that an object reference points to.
// Parameters
// ref - IN: Reference to query
// ref_type - IN: Type of reference to query
// Return An object type, which can be one of the following:
// H5G_LINK Object is a symbolic link.
// H5G_GROUP Object is a group.
// H5G_DATASET Object is a dataset.
// H5G_TYPE Object is a named datatype
// Exception H5::IdComponentException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5G_obj_t H5Object::p_get_obj_type(void *ref, H5R_type_t ref_type) const
{
H5G_obj_t obj_type = H5Rget_obj_type1(getId(), ref_type, ref);
if (obj_type == H5G_UNKNOWN)
{
throw IdComponentException("", "H5Rget_obj_type failed");
}
return(obj_type);
}
#endif /* H5_NO_DEPRECATED_SYMBOLS */
//--------------------------------------------------------------------------
// Function: H5Object::p_get_region (protected)
// Purpose Retrieves a dataspace with the region pointed to selected.
// Parameters
// ref_type - IN: Type of reference to get region of - default
// to H5R_DATASET_REGION
// ref - IN: Reference to get region of
// Return Dataspace id
// Exception H5::IdComponentException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
hid_t H5Object::p_get_region(void *ref, H5R_type_t ref_type) const
{
hid_t space_id = H5Rget_region(getId(), ref_type, ref);
if (space_id < 0)
{
throw IdComponentException("", "H5Rget_region failed");
}
return(space_id);
}
H5Object::H5Object( const H5Object& original ) : H5Location( original ) {}
//--------------------------------------------------------------------------
// Function: H5Object destructor
@@ -577,6 +179,7 @@ hid_t H5Object::p_get_region(void *ref, H5R_type_t ref_type) const
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Object::~H5Object() {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
#ifndef H5_NO_NAMESPACE
} // end namespace

View File

@@ -14,115 +14,58 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5Object_H
#define _H5Object_H
#ifndef __H5Object_H
#define __H5Object_H
#include "H5Location.h"
#include "H5Classes.h" // constains forward class declarations
// H5Object is a baseclass. It has these subclasses:
// Group, DataSet, and DataType.
// DataType, in turn, has several specific datatypes as subclasses.
// Modification:
// Sept 18, 2012: Added class H5Location in between IdComponent and
// H5Object. An H5File now inherits from H5Location. All HDF5
// wrappers in H5Object are moved up to H5Location. H5Object
// is left mostly empty for future wrappers that are only for
// group, dataset, and named datatype. Note that the reason for
// adding H5Location instead of simply moving H5File to be under
// H5Object is H5File is not an HDF5 object, and renaming H5Object
// to H5Location will risk breaking user applications.
// -BMR
// Apr 2, 2014: Added wrapper getObjName for H5Iget_name
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
/*! \class H5Object
\brief Class H5Object is a bridge between H5Location and DataSet, DataType,
and Group.
All the wrappers in H5Object were moved to H5Location.
*/
class H5_DLLCPP H5Object : public H5Location {
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate
// Define the operator function pointer for H5Aiterate().
typedef void (*attr_operator_t)( H5Object& loc/*in*/,
const H5std_string attr_name/*in*/,
void *operator_data/*in,out*/);
class UserData4Aiterate { // user data for attribute iteration
public:
attr_operator_t op;
void* opData;
H5Object* object;
};
#endif // DOXYGEN_SHOULD_SKIP_THIS
// The above part is being moved into Iterator, but not completed
class H5_DLLCPP H5Object : public IdComponent {
public:
// Creates an attribute for a group, dataset, or named datatype.
// PropList is currently not used, so always be default.
Attribute createAttribute( const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
Attribute createAttribute( const H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
// Opens an attribute given its name.
Attribute openAttribute( const char* name ) const;
Attribute openAttribute( const H5std_string& name ) const;
// Opens an attribute given its index.
Attribute openAttribute( const unsigned int idx ) const;
// Flushes all buffers associated with this object to disk
void flush( H5F_scope_t scope ) const;
// Gets the name of the file, in which this HDF5 object belongs.
H5std_string getFileName() const;
// Determines the number of attributes attached to this object.
int getNumAttrs() const;
// Iterate user's function over the attributes of this object
int iterateAttrs( attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL );
// Removes the named attribute from this object.
void removeAttr( const char* name ) const;
void removeAttr( const H5std_string& name ) const;
// Renames the attribute to a new name.
void renameAttr(const char* oldname, const char* newname) const;
void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
// Creates a reference to a named Hdf5 object or to a dataset region
// in this object.
void reference(void* ref, const char* name, const DataSpace& dataspace,
H5R_type_t ref_type = H5R_DATASET_REGION) const;
void reference(void* ref, const char* name) const;
void reference(void* ref, const H5std_string& name) const;
// Open a referenced HDF5 object whose location is specified by either
// a file, an HDF5 object, or an attribute.
void dereference(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
void dereference(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
void dereference(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
// Copy constructor: makes copy of an H5Object object.
H5Object(const H5Object& original);
// Gets the name of this HDF5 object, i.e., Group, DataSet, or
// DataType.
ssize_t getObjName(char *obj_name, size_t buf_size = 0) const;
ssize_t getObjName(H5std_string& obj_name, size_t len = 0) const;
H5std_string getObjName() const;
// Noop destructor.
virtual ~H5Object();
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Default constructor
H5Object();
// Creates a copy of an existing object giving the object id
H5Object( const hid_t object_id );
// Gets the id of the H5 file in which the given object is located.
hid_t p_get_file_id();
// Creates a reference to an HDF5 object or a dataset region.
void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
// Dereferences a ref into an hdf5 id.
hid_t p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type);
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Retrieves the type of object that an object reference points to.
H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
// Retrieves a dataspace with the region pointed to selected.
hid_t p_get_region(void *ref, H5R_type_t ref_type) const;
#endif // DOXYGEN_SHOULD_SKIP_THIS
}; /* end class H5Object */
@@ -130,4 +73,4 @@ class H5_DLLCPP H5Object : public IdComponent {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5Object_H

View File

@@ -56,6 +56,7 @@ PredType::PredType( const hid_t predtype_id ) : AtomType( predtype_id )
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PredType::PredType() : AtomType() {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: PredType copy constructor
@@ -65,6 +66,7 @@ PredType::PredType() : AtomType() {}
//--------------------------------------------------------------------------
PredType::PredType( const PredType& original ) : AtomType( original ) {}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Flag to terminate HDF5 library in DataType::~DataType
const PredType PredType::AtExit(H5CPP_EXITED);
@@ -270,22 +272,12 @@ PredType& PredType::operator=( const PredType& rhs )
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// These dummy functions do not inherit from DataType - they'll
// throw an DataTypeIException if invoked.
void PredType::commit( H5File& loc, const char* name )
void PredType::commit(H5Location& loc, const char* name )
{
throw DataTypeIException("PredType::commit", "Error: Attempted to commit a predefined datatype. Invalid operation!" );
}
void PredType::commit( H5File& loc, const H5std_string& name )
{
commit( loc, name.c_str());
}
void PredType::commit( H5Object& loc, const char* name )
{
throw DataTypeIException("PredType::commit", "Error: Attempted to commit a predefined datatype. Invalid operation!" );
}
void PredType::commit( H5Object& loc, const H5std_string& name )
void PredType::commit(H5Location& loc, const H5std_string& name )
{
commit( loc, name.c_str());
}

View File

@@ -14,13 +14,8 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// PredType holds the definition of all the HDF5 predefined datatypes.
// These types can only be made copy of, not created by H5Tcreate or
// closed by H5Tclose. They are treated as constants.
/////////////////////////////////////////////////////////////////////
#ifndef _H5PredType_H
#define _H5PredType_H
#ifndef __H5PredType_H
#define __H5PredType_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
@@ -32,11 +27,20 @@ namespace H5 {
before the other PredType objects are created. At exit, when this special
PredType object is to be destructed, no HDF5 library function will be called
and the library will be terminated. -BMR, Mar 30, 2012 */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define H5CPP_EXITED -3 // -3 is less likely to be used elsewhere
#endif // DOXYGEN_SHOULD_SKIP_THIS
/*! \class PredType
\brief Class PredType holds the definition of all the HDF5 predefined
datatypes.
These types can only be made copy of, not created by H5Tcreate or
closed by H5Tclose. They are treated as constants.
*/
class H5_DLLCPP PredType : public AtomType {
public:
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("PredType"); }
// Makes a copy of the predefined type and stores the new
@@ -226,16 +230,20 @@ class H5_DLLCPP PredType : public AtomType {
static const PredType NATIVE_UINT_FAST64;
#endif /* H5_SIZEOF_UINT_FAST64_T */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// These dummy functions do not inherit from DataType - they'll
// throw a DataTypeIException if invoked.
void commit( H5File& loc, const H5std_string& name );
void commit( H5File& loc, const char* name );
void commit( H5Object& loc, const H5std_string& name );
void commit( H5Object& loc, const char* name );
/*! \brief This dummy function do not inherit from DataType - it will
throw a DataTypeIException if invoked.
*/
void commit(H5Location& loc, const H5std_string& name );
/*! \brief This dummy function do not inherit from DataType - it will
throw a DataTypeIException if invoked.
*/
void commit(H5Location& loc, const char* name );
/*! \brief This dummy function do not inherit from DataType - it will
throw a DataTypeIException if invoked.
*/
bool committed();
#endif // DOXYGEN_SHOULD_SKIP_THIS
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
// Added this to work around the atexit/global destructor problem.
// It'll help to terminate the library after other PredType instances
@@ -243,7 +251,6 @@ class H5_DLLCPP PredType : public AtomType {
static const PredType AtExit;
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Default constructor
PredType();
@@ -256,4 +263,4 @@ class H5_DLLCPP PredType : public AtomType {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5PredType_H

View File

@@ -39,14 +39,14 @@ namespace H5 {
//--------------------------------------------------------------------------
///\brief Constant for default property.
//--------------------------------------------------------------------------
const PropList PropList::DEFAULT( H5P_DEFAULT );
const PropList PropList::DEFAULT;
//--------------------------------------------------------------------------
// Function Default constructor
///\brief Default constructor: creates a stub property list object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList::PropList() : IdComponent(), id(0) {}
PropList::PropList() : IdComponent(), id(H5P_DEFAULT) {}
//--------------------------------------------------------------------------
// Function: PropList copy constructor
@@ -74,6 +74,9 @@ PropList::PropList(const PropList& original) : IdComponent(original)
//--------------------------------------------------------------------------
PropList::PropList( const hid_t plist_id ) : IdComponent()
{
if (plist_id <= 0)
id = H5P_DEFAULT;
H5I_type_t id_type = H5Iget_type(plist_id);
switch (id_type) {
case H5I_GENPROP_CLS:
@@ -216,7 +219,8 @@ void PropList::copyProp( PropList& dest, PropList& src, const H5std_string& name
//--------------------------------------------------------------------------
// Function: PropList::getId
// Purpose: Get the id of this attribute
///\brief Get the id of this property list
///\return Property list identifier
// Description:
// Class hierarchy is revised to address bugzilla 1068. Class
// AbstractDS and Attribute are moved out of H5Object. In
@@ -229,6 +233,7 @@ hid_t PropList::getId() const
return(id);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: PropList::p_setId
///\brief Sets the identifier of this object to a new value.
@@ -253,6 +258,7 @@ void PropList::p_setId(const hid_t new_id)
// reset object's id to the given id
id = new_id;
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: PropList::close
@@ -271,7 +277,7 @@ void PropList::close()
throw PropListIException(inMemFunc("close"), "H5Pclose failed");
}
// reset the id
id = 0;
id = H5I_INVALID_HID;
}
}
@@ -384,13 +390,19 @@ void PropList::getProperty(const char* name, void* value) const
//--------------------------------------------------------------------------
H5std_string PropList::getProperty(const char* name) const
{
// Get property size first
size_t size = getPropSize(name);
// Allocate buffer then get the property
char* prop_strg_C = new char[size+1]; // temporary C-string for C API
HDmemset(prop_strg_C, 0, size+1); // clear buffer
herr_t ret_value = H5Pget(id, name, prop_strg_C); // call C API
// Throw exception if H5Pget returns failure
if (ret_value < 0)
{
delete []prop_strg_C;
throw PropListIException(inMemFunc("getProperty"), "H5Pget failed");
}
@@ -479,7 +491,7 @@ H5std_string PropList::getClassName() const
if (temp_str != NULL)
{
H5std_string class_name(temp_str);
HDfree(temp_str);
H5free_memory(temp_str);
return(class_name);
}
else

View File

@@ -14,13 +14,14 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5PropList_H
#define _H5PropList_H
#ifndef __H5PropList_H
#define __H5PropList_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
//! Class PropList provides operations for generic property lists.
class H5_DLLCPP PropList : public IdComponent {
public:
// Default property list
@@ -94,7 +95,7 @@ class H5_DLLCPP PropList : public IdComponent {
void removeProp(const char *name) const;
void removeProp(const H5std_string& name) const;
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("PropList"); }
// Default constructor: creates a stub PropList object.
@@ -110,13 +111,15 @@ class H5_DLLCPP PropList : public IdComponent {
virtual ~PropList();
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
hid_t id; // HDF5 property list id
// Sets the property list id.
virtual void p_setId(const hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
};
#ifndef H5_NO_NAMESPACE
}
#endif
#endif // _H5PropList_H
#endif // __H5PropList_H

View File

@@ -146,6 +146,13 @@ StrType::StrType( const DataSet& dataset ) : AtomType ()
///\brief Retrieves the character set type of this string datatype.
///\return Character set type, which can be:
/// \li \c H5T_CSET_ASCII (0) - Character set is US ASCII.
///\note
/// ASCII and UTF-8 Unicode are the only currently supported character
/// encodings. Extended ASCII encodings (for example, ISO 8859) are not
/// supported. This encoding policy is not enforced by the HDF5 Library.
/// Using encodings other than ASCII and UTF-8 can lead to compatibility
/// and usability problems. See the C API entry H5Pset_char_encoding for
/// more information.
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -166,6 +173,13 @@ H5T_cset_t StrType::getCset() const
///\brief Sets character set to be used.
///\param cset - IN: character set type, which can be:
/// \li \c H5T_CSET_ASCII (0) - Character set is US ASCII.
///\note
/// ASCII and UTF-8 Unicode are the only currently supported character
/// encodings. Extended ASCII encodings (for example, ISO 8859) are not
/// supported. This encoding policy is not enforced by the HDF5 Library.
/// Using encodings other than ASCII and UTF-8 can lead to compatibility
/// and usability problems. See the C API entry H5Pset_char_encoding for
/// more information.
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------

View File

@@ -14,13 +14,14 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5StrType_H
#define _H5StrType_H
#ifndef __H5StrType_H
#define __H5StrType_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
//! Class StrType operates on HDF5 string datatypes.
class H5_DLLCPP StrType : public AtomType {
public:
// Creates a string type using a predefined type
@@ -47,7 +48,7 @@ class H5_DLLCPP StrType : public AtomType {
// Defines the storage mechanism for character strings.
void setStrpad(H5T_str_t strpad) const;
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("StrType"); }
// default constructor
@@ -65,4 +66,4 @@ class H5_DLLCPP StrType : public AtomType {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5StrType_H

View File

@@ -17,20 +17,21 @@
// Class VarLenType inherits from DataType and provides wrappers for
// the HDF5 C's Variable-length Datatypes.
#ifndef _H5VarLenType_H
#define _H5VarLenType_H
#ifndef __H5VarLenType_H
#define __H5VarLenType_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
//! VarLenType operates on the HDF5 C's Variable-length Datatypes.
class H5_DLLCPP VarLenType : public DataType {
public:
// Constructor that creates a variable-length datatype based
// on the specified base type.
VarLenType(const DataType* base_type);
///\brief Returns this class name
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("VarLenType"); }
// Copy constructor: makes copy of the original object.
@@ -49,4 +50,4 @@ class H5_DLLCPP VarLenType : public DataType {
#ifndef H5_NO_NAMESPACE
}
#endif
#endif
#endif // __H5VarLenType_H

Some files were not shown because too many files have changed in this diff Show More