Compare commits
408 Commits
hdf5_1_8_1
...
hdf5-1_4_2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef1e79b42b | ||
|
|
ce28d20976 | ||
|
|
657ff95e96 | ||
|
|
22d5dc1ee4 | ||
|
|
95a8875013 | ||
|
|
e1d58d1a9a | ||
|
|
5f1c3a0fb9 | ||
|
|
3eea878166 | ||
|
|
162e324e82 | ||
|
|
b892ecdbf9 | ||
|
|
e5640f5e79 | ||
|
|
4eed8f4cca | ||
|
|
8e1730d75c | ||
|
|
f348d50d97 | ||
|
|
a5d11feba3 | ||
|
|
4a23124301 | ||
|
|
0585cfc56d | ||
|
|
dfb660da4a | ||
|
|
c16809de29 | ||
|
|
8f4ca8da68 | ||
|
|
71a882c91f | ||
|
|
8bf64755a9 | ||
|
|
13484bf3ef | ||
|
|
be64a4c2ad | ||
|
|
02f66931ea | ||
|
|
c591c17a5a | ||
|
|
964549b935 | ||
|
|
fffa7202b2 | ||
|
|
fb1b6d411f | ||
|
|
f06ac19488 | ||
|
|
3ba44a43f5 | ||
|
|
4bbf35b6d8 | ||
|
|
9e8d499a45 | ||
|
|
2acb2bbb6b | ||
|
|
eac318ba04 | ||
|
|
3d644774c3 | ||
|
|
05e81f551d | ||
|
|
27ded6c538 | ||
|
|
53f425a001 | ||
|
|
f594637c83 | ||
|
|
d70a29d088 | ||
|
|
8fead7436e | ||
|
|
aee5bdb149 | ||
|
|
9983177ee4 | ||
|
|
7855457726 | ||
|
|
78a750de45 | ||
|
|
7cca9a3687 | ||
|
|
bf5f42e87d | ||
|
|
94c5bad084 | ||
|
|
e951147bc6 | ||
|
|
b79fbdaad8 | ||
|
|
98ed6a7268 | ||
|
|
8b9bd8d3a4 | ||
|
|
dd742ac4c6 | ||
|
|
c76ee0d68b | ||
|
|
031fdc2f0a | ||
|
|
eb21050bcf | ||
|
|
fad3a77529 | ||
|
|
291c8b9bfc | ||
|
|
8a5a5f410e | ||
|
|
4b6d44b809 | ||
|
|
068464492a | ||
|
|
498b6fed11 | ||
|
|
c4e98f4c9b | ||
|
|
a36a6e42c2 | ||
|
|
820f6c2cfc | ||
|
|
fda79322f9 | ||
|
|
479add0802 | ||
|
|
3463353af0 | ||
|
|
fb194a8085 | ||
|
|
0f6a8fbaad | ||
|
|
6b269cb0d7 | ||
|
|
8fd511d0c6 | ||
|
|
05bb851551 | ||
|
|
16325d4815 | ||
|
|
cef1b90471 | ||
|
|
9e165858d2 | ||
|
|
bb1d4e704f | ||
|
|
fc13ddb7b3 | ||
|
|
4e7ea72353 | ||
|
|
546bd4f004 | ||
|
|
7f5b00c215 | ||
|
|
447830cdfb | ||
|
|
8a46a25a5d | ||
|
|
3a2b02b25c | ||
|
|
c03caafc15 | ||
|
|
d8ff843f0c | ||
|
|
bc619bd8a6 | ||
|
|
a57ced01e7 | ||
|
|
9a2c38ed1f | ||
|
|
f57b3a7945 | ||
|
|
95bee36161 | ||
|
|
f1dcc2b510 | ||
|
|
adbd3ac893 | ||
|
|
9eb005a7d0 | ||
|
|
87bf7b5bf1 | ||
|
|
749b37bc74 | ||
|
|
1527bfa72a | ||
|
|
e1298b111c | ||
|
|
a294128311 | ||
|
|
35f7cbbac5 | ||
|
|
2ec7e1b270 | ||
|
|
56553a0cb8 | ||
|
|
177d2c795f | ||
|
|
dc78e24609 | ||
|
|
1b7c6039c5 | ||
|
|
4c5e3ff22b | ||
|
|
78e2bab0b4 | ||
|
|
ace710ac13 | ||
|
|
6d7917d341 | ||
|
|
e6379c6d3d | ||
|
|
3f49c1a9de | ||
|
|
44019af998 | ||
|
|
3065788b11 | ||
|
|
226a6b3929 | ||
|
|
d66d9f9218 | ||
|
|
d096777503 | ||
|
|
ee0f7e2218 | ||
|
|
b9c5316346 | ||
|
|
917b3b7658 | ||
|
|
fdb35caa69 | ||
|
|
45993ee78e | ||
|
|
955ef79577 | ||
|
|
aca104be97 | ||
|
|
9154d41f47 | ||
|
|
62264a8bb5 | ||
|
|
bcb587dcc2 | ||
|
|
3a925f72d0 | ||
|
|
106da7a861 | ||
|
|
378dd7cd74 | ||
|
|
66f2ea839e | ||
|
|
91798be1c3 | ||
|
|
1a4c6d9966 | ||
|
|
997ae15cc8 | ||
|
|
f2e9234ab7 | ||
|
|
4cb6fa0f6e | ||
|
|
07854c3b55 | ||
|
|
ed37e35d5f | ||
|
|
5ebfdea71c | ||
|
|
4abe81ec20 | ||
|
|
f42aab2397 | ||
|
|
6c9f206b21 | ||
|
|
2ed34acd4d | ||
|
|
01f5653c98 | ||
|
|
d1b9983c54 | ||
|
|
f1b719823a | ||
|
|
e66998d4dd | ||
|
|
ef31e2929d | ||
|
|
aa08bf1245 | ||
|
|
88fecd169b | ||
|
|
cf26accf28 | ||
|
|
0017dab7c1 | ||
|
|
fe56538eec | ||
|
|
5961f1ef5f | ||
|
|
af52f635a9 | ||
|
|
188bf1d56b | ||
|
|
247a7e49a2 | ||
|
|
2d9628c376 | ||
|
|
36ea086430 | ||
|
|
1d98202eed | ||
|
|
85d8862d82 | ||
|
|
857074354a | ||
|
|
735dd552be | ||
|
|
9bee7bdb2b | ||
|
|
9275de5237 | ||
|
|
e60434c327 | ||
|
|
be45b84db1 | ||
|
|
89d60c40b4 | ||
|
|
e3ed0c6766 | ||
|
|
d8845ebe43 | ||
|
|
22131bb2dd | ||
|
|
4101a3561f | ||
|
|
44c5d2ff50 | ||
|
|
c514abd496 | ||
|
|
a31d4b8619 | ||
|
|
71173ca954 | ||
|
|
dbb42ea373 | ||
|
|
48f724c523 | ||
|
|
52ea32a129 | ||
|
|
e91ac26124 | ||
|
|
fb9d0686ba | ||
|
|
87456c1137 | ||
|
|
46eebaa438 | ||
|
|
94e3e4b98c | ||
|
|
187b151e0a | ||
|
|
b6446f2a6f | ||
|
|
988e4ce0bb | ||
|
|
0c46256e02 | ||
|
|
01e00e23a3 | ||
|
|
6611d35258 | ||
|
|
0371ab32fd | ||
|
|
d95bfd75dc | ||
|
|
dff47a2054 | ||
|
|
a6b0e81432 | ||
|
|
db4b7e0fee | ||
|
|
082e6a77d5 | ||
|
|
9b6e8a4cae | ||
|
|
56a4ecf4cc | ||
|
|
2f588dbecd | ||
|
|
b3961ff99f | ||
|
|
bce863bc3a | ||
|
|
e1728a297b | ||
|
|
4244889d68 | ||
|
|
7ce1e08ec1 | ||
|
|
27a80efaac | ||
|
|
1ce5247891 | ||
|
|
0aef093e34 | ||
|
|
b317a1e80d | ||
|
|
596a9c1eff | ||
|
|
a2b9addbab | ||
|
|
d2cce99e65 | ||
|
|
494526db09 | ||
|
|
178a09d44e | ||
|
|
287db5fd55 | ||
|
|
6d76ebb8d9 | ||
|
|
212d90d25d | ||
|
|
fa89e8134c | ||
|
|
c1f6b093e2 | ||
|
|
93d80c661f | ||
|
|
f83a9cbcbd | ||
|
|
a756f0e0c9 | ||
|
|
321fa0f5a9 | ||
|
|
a3ee4fe0b5 | ||
|
|
6cfe1ebd86 | ||
|
|
de30468a17 | ||
|
|
eb9b812902 | ||
|
|
f9c019349e | ||
|
|
20c791c5f1 | ||
|
|
9302d5e927 | ||
|
|
4c14b7745e | ||
|
|
af75e5da51 | ||
|
|
aee2673383 | ||
|
|
a7dbac6541 | ||
|
|
e2e4a78df7 | ||
|
|
a5248bcbee | ||
|
|
d04e0d9481 | ||
|
|
9142e9d82d | ||
|
|
797da30579 | ||
|
|
446946ba93 | ||
|
|
4df6f44f35 | ||
|
|
edf16f72d4 | ||
|
|
322edf254e | ||
|
|
546fe419bc | ||
|
|
df839af181 | ||
|
|
ddae0d34e7 | ||
|
|
c50c4e600a | ||
|
|
5d1735238d | ||
|
|
64a3c6ba4a | ||
|
|
0b72ee6c7e | ||
|
|
c7a759aef0 | ||
|
|
73d4b7034e | ||
|
|
403143c9bf | ||
|
|
81f61d5cb5 | ||
|
|
fcc5355744 | ||
|
|
2b3b5cc556 | ||
|
|
5ab5c1d665 | ||
|
|
8399082916 | ||
|
|
9bf7d0ab65 | ||
|
|
2d79c4652d | ||
|
|
b9a636874a | ||
|
|
b21ade680f | ||
|
|
e517058a95 | ||
|
|
2a15ef1ee8 | ||
|
|
9d8f65f366 | ||
|
|
1c456be9b9 | ||
|
|
80d0834d31 | ||
|
|
2140a47dc5 | ||
|
|
47906b836f | ||
|
|
24bd4f7bbc | ||
|
|
72ce6a6873 | ||
|
|
0522c42e7a | ||
|
|
30d0bfe906 | ||
|
|
0fe5046855 | ||
|
|
29801c3770 | ||
|
|
401ec5ed98 | ||
|
|
615a1fa336 | ||
|
|
e1351ca633 | ||
|
|
62fa26dc66 | ||
|
|
73cca99a2a | ||
|
|
6d99354c4d | ||
|
|
c041a0dc92 | ||
|
|
011b427e13 | ||
|
|
f336257bc8 | ||
|
|
a2163cc6fc | ||
|
|
7321946d93 | ||
|
|
9c6b1e47c7 | ||
|
|
159482fa07 | ||
|
|
61aa32678b | ||
|
|
e201d20b00 | ||
|
|
49e5246d5a | ||
|
|
771c9da9c5 | ||
|
|
c65c1d2523 | ||
|
|
6da03040a2 | ||
|
|
3beb8880c0 | ||
|
|
9147dd1ae8 | ||
|
|
8fbdc7fbe3 | ||
|
|
57d6c3fa57 | ||
|
|
d8b6238ff7 | ||
|
|
68ad879114 | ||
|
|
dfaef91c67 | ||
|
|
b03ed1dcec | ||
|
|
dadeb7e4f8 | ||
|
|
58c607e236 | ||
|
|
f11cef2c56 | ||
|
|
380eb42bc5 | ||
|
|
a30241435d | ||
|
|
1bfaa99087 | ||
|
|
cb7823388b | ||
|
|
44047587c1 | ||
|
|
ad80cc25ea | ||
|
|
3718a608c6 | ||
|
|
330509e64e | ||
|
|
569c51ed05 | ||
|
|
29d2bf06bf | ||
|
|
6e160fa1e5 | ||
|
|
fcfa277476 | ||
|
|
d07e626066 | ||
|
|
d04d3c94e3 | ||
|
|
e341ea6504 | ||
|
|
1c47477b05 | ||
|
|
c5adbd01ac | ||
|
|
538f287a4a | ||
|
|
4382285a8b | ||
|
|
1ffd43e5f6 | ||
|
|
d4d3835803 | ||
|
|
c601f48574 | ||
|
|
d3d60bdf87 | ||
|
|
421dd50964 | ||
|
|
d425c11375 | ||
|
|
9bd9d08a1d | ||
|
|
b8d963dc34 | ||
|
|
dd93ad4862 | ||
|
|
6fd91a1f40 | ||
|
|
7d7b28e602 | ||
|
|
2ddb74e11d | ||
|
|
f351e2724a | ||
|
|
1a426273b9 | ||
|
|
1965c76749 | ||
|
|
ce84bb5a8a | ||
|
|
10c2b3cb1b | ||
|
|
8e42638bb1 | ||
|
|
14396a74c3 | ||
|
|
c5a940d13f | ||
|
|
254d0a79b3 | ||
|
|
d0b8c9b23f | ||
|
|
ea82f9e04d | ||
|
|
517662fdce | ||
|
|
5246af2c9d | ||
|
|
a2496b4a6f | ||
|
|
a5ead23568 | ||
|
|
94294acd44 | ||
|
|
742c3b080a | ||
|
|
54f9d411bb | ||
|
|
77870af8f1 | ||
|
|
07966076a8 | ||
|
|
78db38652f | ||
|
|
7bc667ee29 | ||
|
|
e8316ff8c6 | ||
|
|
5983d2b628 | ||
|
|
fadbd4bcee | ||
|
|
cbe375f9cc | ||
|
|
b4aebf1f91 | ||
|
|
841939cb09 | ||
|
|
5fc2f23ed0 | ||
|
|
5c929dfe23 | ||
|
|
ec7bfce84b | ||
|
|
1a1fc4f0a0 | ||
|
|
683fb8d0b4 | ||
|
|
24000cb5f6 | ||
|
|
5a21563a18 | ||
|
|
1941c9bc3d | ||
|
|
31d0fc8b48 | ||
|
|
fbb9009151 | ||
|
|
8e30a40405 | ||
|
|
8af1845dd3 | ||
|
|
1a48afc0d8 | ||
|
|
defaac17fa | ||
|
|
b4b58b95b7 | ||
|
|
7787eadde5 | ||
|
|
2b9e736d63 | ||
|
|
bbea378a4b | ||
|
|
60c4f4f82d | ||
|
|
61a9b421fd | ||
|
|
cdc3e26bad | ||
|
|
1212dc0a55 | ||
|
|
9be92869be | ||
|
|
ffbbc4a5f8 | ||
|
|
6a18f2f75e | ||
|
|
98bce96569 | ||
|
|
26e7e3b607 | ||
|
|
457d8e72ba | ||
|
|
e3999cc810 | ||
|
|
0bdf813173 | ||
|
|
fe5cd67e74 | ||
|
|
734454d3ab | ||
|
|
c8dcc595d8 | ||
|
|
835b33ecef | ||
|
|
81cbf759eb | ||
|
|
ec8563cf52 | ||
|
|
79fa3898a8 | ||
|
|
6e9418d9d0 | ||
|
|
77fd42de13 | ||
|
|
0a2bae345d | ||
|
|
e98e4dea74 | ||
|
|
9c475eccd9 | ||
|
|
ee5f339108 | ||
|
|
3b3163a715 | ||
|
|
489f076c36 |
2
COPYING
2
COPYING
@@ -2,7 +2,7 @@ Copyright Notice and Statement for NCSA Hierarchical Data Format (HDF)
|
||||
Software Library and Utilities
|
||||
|
||||
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
|
||||
Copyright 1998, 1999, 2000 by the Board of Trustees of the University of
|
||||
Copyright 1998, 1999, 2000, 2001 by the Board of Trustees of the University of
|
||||
Illinois. All rights reserved.
|
||||
|
||||
Contributors: National Center for Supercomputing Applications (NCSA) at the
|
||||
|
||||
152
INSTALL_parallel
152
INSTALL_parallel
@@ -1,152 +0,0 @@
|
||||
Installation instructions for Parallel HDF5
|
||||
-------------------------------------------
|
||||
|
||||
1. Overview
|
||||
-----------
|
||||
This file contains instructions for the installation of parallel
|
||||
HDF5. Platforms supported by this release are SGI Origin 2000,
|
||||
IBM SP2, and the Intel TFLOP. The steps are kind of unnatural and
|
||||
will be more automized in the next release. If you have difficulties
|
||||
installing the software in your system, please send mail to
|
||||
hdfparallel@ncsa.uiuc.edu
|
||||
In your mail, please enclose the output of "uname -a". Also attach the
|
||||
content of "config.log" if you have run the "configure" command.
|
||||
|
||||
First, you must obtain and unpack the HDF5 source as
|
||||
described in the file INSTALL. You also need to obtain the
|
||||
information of the include and library paths of MPI and MPIO
|
||||
software installed in your system since the parallel HDF5 library
|
||||
uses them for parallel I/O access.
|
||||
|
||||
|
||||
2. Quick Instruction for known systems
|
||||
--------------------------------------
|
||||
The following shows particular steps to run the parallel HDF5
|
||||
configure for a few machines we tested. If your particular platform
|
||||
is not shown or somehow the steps do not work for yours, please go
|
||||
to the next section for more detail explanations.
|
||||
|
||||
------
|
||||
TFLOPS
|
||||
------
|
||||
follow the instuctions in INSTALL_TFLOPS.
|
||||
|
||||
-------
|
||||
IBM SP2
|
||||
-------
|
||||
First of all, make sure your environment variables are set correctly
|
||||
to compile and execute single process mpi applications for the SP2
|
||||
machine. They should be the same or comparable to the following.
|
||||
|
||||
setenv CC mpcc_r
|
||||
setenv MP_PROCS 1
|
||||
setenv MP_NODES 1
|
||||
setenv MP_LABELIO no
|
||||
setenv MP_RMPOOL 0
|
||||
setenv RUNPARALLEL "MP_PROCS=2 MP_TASKS_PER_NODE=2 poe"
|
||||
setenv LLNL_COMPILE_SINGLE_THREADED TRUE
|
||||
|
||||
The shared library configuration for this version is broken.
|
||||
So, only static library is supported.
|
||||
An error for powerpc-ibm-aix4.3.2.0 (LLNL Blue) about install method
|
||||
is discovered after code freeze. You need to remove the following
|
||||
line from config/powerpc-ibm-aix4.3.2.0 before configuration.
|
||||
ac_cv_path_install=${ac_cv_path_install='cp -r'}
|
||||
|
||||
Then do the following steps:
|
||||
|
||||
./configure --disable-shared --prefix=<install-directory>
|
||||
make # build the library
|
||||
make check # verify the correctness
|
||||
make install
|
||||
|
||||
|
||||
---------------
|
||||
SGI Origin 2000
|
||||
Cray T3E
|
||||
(where MPI-IO is part of system MPI library such as mpt 1.3)
|
||||
---------------
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
RUNPARALLEL="mpirun -np 2"
|
||||
export RUNPARALLEL
|
||||
LIBS="-lmpi"
|
||||
export LIBS
|
||||
./configure --enable-parallel --disable-shared --prefix=$PWD/installdir
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
|
||||
---------------
|
||||
SGI Origin 2000
|
||||
Cray T3E
|
||||
(where MPI-IO is not part of system MPI library or I want to
|
||||
use my own version of MPIO)
|
||||
---------------
|
||||
|
||||
|
||||
mpi1_inc="" #mpi-1 include
|
||||
mpi1_lib="" #mpi-1 library
|
||||
mpio_inc=-I$HOME/ROMIO/include #mpio include
|
||||
mpio_lib="-L$HOME/ROMIO/lib/IRIX64" #mpio library
|
||||
|
||||
MPI_INC="$mpio_inc $mpi1_inc"
|
||||
MPI_LIB="$mpio_lib $mpi1_lib"
|
||||
|
||||
#for version 1.1
|
||||
CPPFLAGS=$MPI_INC
|
||||
export CPPFLAGS
|
||||
LDFLAGS=$MPI_LIB
|
||||
export LDFLAGS
|
||||
RUNPARALLEL="mpirun -np 2"
|
||||
export RUNPARALLEL
|
||||
LIBS="-lmpio -lmpi"
|
||||
export LIBS
|
||||
|
||||
./configure --enable-parallel --disable-shared --prefix=$PWD/installdir
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
|
||||
3. Detail explanation
|
||||
---------------------
|
||||
The HDF5 library can be configured to use MPI and MPI-IO for
|
||||
parallelizm on a distributed multi-processor system. The easy
|
||||
way to do this is to have a properly installed parallel
|
||||
compiler (e.g., MPICH's mpicc or IBM's mpcc) and supply that
|
||||
executable as the value of the CC environment variable:
|
||||
|
||||
$ CC=mpcc ./configure
|
||||
$ CC=/usr/local/mpi/bin/mpicc ./configure
|
||||
|
||||
If no such wrapper script is available then you must specify
|
||||
your normal C compiler along with the distribution of
|
||||
MPI/MPI-IO which is to be used (values other than `mpich' will
|
||||
be added at a later date):
|
||||
|
||||
$ ./configure --enable-parallel=mpich
|
||||
|
||||
If the MPI/MPI-IO include files and/or libraries cannot be
|
||||
found by the compiler then their directories must be given as
|
||||
arguments to CPPFLAGS and/or LDFLAGS:
|
||||
|
||||
$ CPPFLAGS=-I/usr/local/mpi/include \
|
||||
LDFLAGS=-L/usr/local/mpi/lib/LINUX/ch_p4 \
|
||||
./configure --enable-parallel=mpich
|
||||
|
||||
If a parallel library is being built then configure attempts
|
||||
to determine how to run a parallel application on one
|
||||
processor and on many processors. If the compiler is mpicc
|
||||
and the user hasn't specified values for RUNSERIAL and
|
||||
RUNPARALLEL then configure chooses `mpirun' from the same
|
||||
directory as `mpicc':
|
||||
|
||||
RUNSERIAL: /usr/local/mpi/bin/mpirun -np 1
|
||||
RUNPARALLEL: /usr/local/mpi/bin/mpirun -np $${NPROCS:=2}
|
||||
|
||||
The `$${NPROCS:=2}' will be substituted with the value of the
|
||||
NPROCS environment variable at the time `make check' is run
|
||||
(or the value 2).
|
||||
382
MANIFEST
382
MANIFEST
@@ -6,23 +6,14 @@
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
./COPYING
|
||||
./INSTALL
|
||||
./INSTALL_TFLOPS
|
||||
./INSTALL_VFL
|
||||
./INSTALL_parallel
|
||||
./INSTALL_Windows.txt
|
||||
./HISTORY.txt
|
||||
./MANIFEST
|
||||
./Makefile.dist
|
||||
./Makefile.in
|
||||
./README
|
||||
./RELEASE.txt
|
||||
./README.txt
|
||||
./acconfig.h
|
||||
./aclocal.m4
|
||||
./configure
|
||||
./configure.in
|
||||
./all.zip
|
||||
./all_withhdf4.zip
|
||||
|
||||
./bin/checkapi _DO_NOT_DISTRIBUTE_
|
||||
./bin/checkposix _DO_NOT_DISTRIBUTE_
|
||||
@@ -44,9 +35,9 @@
|
||||
./bin/runtest _DO_NOT_DISTRIBUTE_
|
||||
./bin/snapshot
|
||||
./bin/trace
|
||||
./bin/versinc _DO_NOT_DISTRIBUTE_
|
||||
|
||||
./config/BlankForm
|
||||
./config/alphaev67-linux-gnu
|
||||
./config/commence.in
|
||||
./config/conclude.in
|
||||
./config/dec-flags
|
||||
@@ -69,8 +60,6 @@
|
||||
./config/linux-gnulibc1
|
||||
./config/linux-gnulibc2
|
||||
./config/powerpc-ibm-aix4.x
|
||||
./config/powerpc-ibm-aix4.2.1.0
|
||||
./config/powerpc-ibm-aix4.3.2.0
|
||||
./config/rs6000-ibm-aix4.x
|
||||
./config/solaris2.x
|
||||
./config/sv1-cray
|
||||
@@ -184,6 +173,7 @@
|
||||
./doc/html/Graphics/Makefile.in
|
||||
./doc/html/Graphics/OtherAPIs.gif
|
||||
|
||||
./doc/html/Intro/Dependencies
|
||||
./doc/html/Intro/IntroExamples.html
|
||||
./doc/html/Intro/Makefile.in
|
||||
|
||||
@@ -255,6 +245,7 @@
|
||||
./doc/html/Tutor/crtgrpd.html
|
||||
./doc/html/Tutor/extend.html
|
||||
./doc/html/Tutor/fileorg.html
|
||||
./doc/html/Tutor/footer-ncsalogo.gif
|
||||
./doc/html/Tutor/glossary.html
|
||||
./doc/html/Tutor/img001.gif
|
||||
./doc/html/Tutor/img002.gif
|
||||
@@ -265,6 +256,7 @@
|
||||
./doc/html/Tutor/intro.html
|
||||
./doc/html/Tutor/iterate.html
|
||||
./doc/html/Tutor/mount.html
|
||||
./doc/html/Tutor/property.html
|
||||
./doc/html/Tutor/questions.html
|
||||
./doc/html/Tutor/rdwt.html
|
||||
./doc/html/Tutor/references.html
|
||||
@@ -272,8 +264,11 @@
|
||||
./doc/html/Tutor/reftoreg.html
|
||||
./doc/html/Tutor/select.html
|
||||
./doc/html/Tutor/selectc.html
|
||||
./doc/html/Tutor/software.html
|
||||
./doc/html/Tutor/title.html
|
||||
./doc/html/Tutor/util.html
|
||||
./doc/html/Tutor/property.html
|
||||
./doc/html/Tutor/software.html
|
||||
|
||||
./doc/html/Tutor/Graphics/AddInfo.gif
|
||||
./doc/html/Tutor/Graphics/AdvTopics.gif
|
||||
@@ -315,6 +310,15 @@
|
||||
|
||||
./doc/html/Tutor/examples/Dependencies
|
||||
./doc/html/Tutor/examples/Makefile.in
|
||||
./doc/html/Tutor/examples/attrexample.f90
|
||||
./doc/html/Tutor/examples/chunk.f90
|
||||
./doc/html/Tutor/examples/compound.f90
|
||||
./doc/html/Tutor/examples/dsetexample.f90
|
||||
./doc/html/Tutor/examples/fileexample.f90
|
||||
./doc/html/Tutor/examples/groupexample.f90
|
||||
./doc/html/Tutor/examples/grpdsetexample.f90
|
||||
./doc/html/Tutor/examples/grpit.f90
|
||||
./doc/html/Tutor/examples/grpsexample.f90
|
||||
./doc/html/Tutor/examples/h5_compound.c
|
||||
./doc/html/Tutor/examples/h5_copy.c
|
||||
./doc/html/Tutor/examples/h5_crtatt.c
|
||||
@@ -329,14 +333,59 @@
|
||||
./doc/html/Tutor/examples/h5_mount.c
|
||||
./doc/html/Tutor/examples/h5_rdwt.c
|
||||
./doc/html/Tutor/examples/h5_read.c
|
||||
./doc/html/Tutor/examples/h5_ref2obj.c
|
||||
./doc/html/Tutor/examples/h5_ref2objr.c
|
||||
./doc/html/Tutor/examples/h5_ref2objw.c
|
||||
./doc/html/Tutor/examples/h5_ref2reg.c
|
||||
./doc/html/Tutor/examples/h5_ref2regr.c
|
||||
./doc/html/Tutor/examples/h5_ref2regw.c
|
||||
./doc/html/Tutor/examples/h5_reference.c
|
||||
./doc/html/Tutor/examples/hyperslab.f90
|
||||
./doc/html/Tutor/examples/mountexample.f90
|
||||
./doc/html/Tutor/examples/refobjexample.f90
|
||||
./doc/html/Tutor/examples/refregexample.f90
|
||||
./doc/html/Tutor/examples/rwdsetexample.f90
|
||||
./doc/html/Tutor/examples/selectele.f90
|
||||
|
||||
./doc/html/Tutor/examples/java/Dependencies
|
||||
./doc/html/Tutor/examples/java/Makefile.in
|
||||
./doc/html/Tutor/examples/java/Makefile.in.txt
|
||||
./doc/html/Tutor/examples/java/Makefile.txt
|
||||
./doc/html/Tutor/examples/java/Compound.java
|
||||
./doc/html/Tutor/examples/java/Copy.java
|
||||
./doc/html/Tutor/examples/java/CreateAttribute.java
|
||||
./doc/html/Tutor/examples/java/CreateDataset.java
|
||||
./doc/html/Tutor/examples/java/CreateFile.java
|
||||
./doc/html/Tutor/examples/java/CreateFileInput.java
|
||||
./doc/html/Tutor/examples/java/CreateGroup.java
|
||||
./doc/html/Tutor/examples/java/CreateGroupAR.java
|
||||
./doc/html/Tutor/examples/java/CreateGroupDataset.java
|
||||
./doc/html/Tutor/examples/java/DatasetRdWt.java
|
||||
./doc/html/Tutor/examples/java/HyperSlab.java
|
||||
./doc/html/Tutor/examples/java/README
|
||||
./doc/html/Tutor/examples/java/readme.html
|
||||
./doc/html/Tutor/examples/java/runCompound.sh
|
||||
./doc/html/Tutor/examples/java/runCompound.sh.in
|
||||
./doc/html/Tutor/examples/java/runCopy.sh
|
||||
./doc/html/Tutor/examples/java/runCopy.sh.in
|
||||
./doc/html/Tutor/examples/java/runCreateAttribute.sh
|
||||
./doc/html/Tutor/examples/java/runCreateAttribute.sh.in
|
||||
./doc/html/Tutor/examples/java/runCreateDataset.sh
|
||||
./doc/html/Tutor/examples/java/runCreateDataset.sh.in
|
||||
./doc/html/Tutor/examples/java/runCreateFile.sh
|
||||
./doc/html/Tutor/examples/java/runCreateFile.sh.in
|
||||
./doc/html/Tutor/examples/java/runCreateFileInput.sh
|
||||
./doc/html/Tutor/examples/java/runCreateFileInput.sh.in
|
||||
./doc/html/Tutor/examples/java/runCreateGroup.sh
|
||||
./doc/html/Tutor/examples/java/runCreateGroup.sh.in
|
||||
./doc/html/Tutor/examples/java/runCreateGroupAR.sh
|
||||
./doc/html/Tutor/examples/java/runCreateGroupAR.sh.in
|
||||
./doc/html/Tutor/examples/java/runCreateGroupDataset.sh
|
||||
./doc/html/Tutor/examples/java/runCreateGroupDataset.sh.in
|
||||
./doc/html/Tutor/examples/java/runDatasetRdWt.sh
|
||||
./doc/html/Tutor/examples/java/runDatasetRdWt.sh.in
|
||||
./doc/html/Tutor/examples/java/runHyperSlab.sh
|
||||
./doc/html/Tutor/examples/java/runHyperSlab.sh.in
|
||||
|
||||
./doc/html/cpplus/CppInterfaces.html
|
||||
./doc/html/cpplus/CppUserNotes.doc
|
||||
@@ -345,8 +394,10 @@
|
||||
./doc/html/cpplus/Makefile.in
|
||||
|
||||
./doc/html/fortran/Dependencies
|
||||
./doc/html/fortran/F90Flags.html
|
||||
./doc/html/fortran/F90UserNotes.html
|
||||
./doc/html/fortran/Makefile.in
|
||||
./doc/html/fortran/h5_FORTRAN.html
|
||||
./doc/html/fortran/h5a_FORTRAN.html
|
||||
./doc/html/fortran/h5d_FORTRAN.html
|
||||
./doc/html/fortran/h5e_FORTRAN.html
|
||||
@@ -423,6 +474,7 @@
|
||||
./examples/h5_attribute.c
|
||||
./examples/h5_mount.c
|
||||
./examples/h5_reference.c
|
||||
./examples/ph5example.c
|
||||
./examples/run_examples.sh
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@@ -439,13 +491,8 @@
|
||||
./fortran/configure
|
||||
./fortran/configure.in
|
||||
|
||||
./fortran/bin/config.guess
|
||||
./fortran/bin/config.sub
|
||||
./fortran/bin/install-sh
|
||||
./fortran/bin/ltconfig
|
||||
./fortran/bin/ltmain.sh
|
||||
|
||||
./fortran/config/BlankForm
|
||||
./fortran/config/alphaev67-linux-gnu
|
||||
./fortran/config/commence.in
|
||||
./fortran/config/conclude.in
|
||||
./fortran/config/dec-flags
|
||||
@@ -468,8 +515,6 @@
|
||||
./fortran/config/linux-gnu
|
||||
./fortran/config/linux-gnulibc1
|
||||
./fortran/config/linux-gnulibc2
|
||||
./fortran/config/powerpc-ibm-aix4.2.1.0
|
||||
./fortran/config/powerpc-ibm-aix4.3.2.0
|
||||
./fortran/config/powerpc-ibm-aix4.x
|
||||
./fortran/config/rs6000-ibm-aix4.x
|
||||
./fortran/config/solaris2.x
|
||||
@@ -498,8 +543,8 @@
|
||||
./fortran/examples/selectele.f90
|
||||
|
||||
./fortran/src/Dependencies
|
||||
./fortran/src/H5f.c
|
||||
./fortran/src/H5ff.f90
|
||||
./fortran/src/H5_f.c
|
||||
./fortran/src/H5_ff.f90
|
||||
./fortran/src/H5Af.c
|
||||
./fortran/src/H5Aff.f90
|
||||
./fortran/src/H5Df.c
|
||||
@@ -559,7 +604,6 @@
|
||||
./fortran/testpar/ptesthdf5_fortran.f90
|
||||
./fortran/testpar/tcheck.f90
|
||||
./fortran/testpar/thdf5.f90
|
||||
./fortran/testpar/thdf5.f90
|
||||
./fortran/testpar/thyperslab_wr.f90
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@@ -579,12 +623,6 @@
|
||||
./c++/configure
|
||||
./c++/configure.in
|
||||
|
||||
./c++/bin/config.guess
|
||||
./c++/bin/config.sub
|
||||
./c++/bin/install-sh
|
||||
./c++/bin/ltconfig
|
||||
./c++/bin/ltmain.sh
|
||||
|
||||
./c++/config/BlankForm
|
||||
./c++/config/commence.in
|
||||
./c++/config/conclude.in
|
||||
@@ -676,6 +714,11 @@
|
||||
|
||||
./c++/test/Dependencies
|
||||
./c++/test/Makefile.in
|
||||
./c++/test/testhdf5.cpp
|
||||
./c++/test/dsets.cpp
|
||||
./c++/test/tfile.cpp
|
||||
./c++/test/th5s.cpp
|
||||
./c++/test/th5s.h5
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
@@ -695,9 +738,19 @@
|
||||
./pablo/ProcIDs.h
|
||||
./pablo/PabloSedscr
|
||||
./pablo/ProcTrace.h
|
||||
./pablo/ProcTrace.inc
|
||||
./pablo/READ_ME
|
||||
|
||||
|
||||
./release_docs/INSTALL
|
||||
./release_docs/INSTALL_TFLOPS
|
||||
./release_docs/INSTALL_VFL
|
||||
./release_docs/INSTALL_parallel
|
||||
./release_docs/INSTALL_Windows.txt
|
||||
./release_docs/INSTALL_Windows_withF90.txt
|
||||
./release_docs/INSTALL_codewarrior.txt
|
||||
./release_docs/HISTORY.txt
|
||||
./release_docs/RELEASE.txt
|
||||
|
||||
./src/.indent.pro _DO_NOT_DISTRIBUTE_
|
||||
./src/Dependencies
|
||||
./src/H5.c
|
||||
@@ -875,6 +928,7 @@
|
||||
./test/tattr.c
|
||||
./test/testhdf5.c
|
||||
./test/testhdf5.h
|
||||
./test/testmeta.c
|
||||
./test/tfile.c
|
||||
./test/tgenprop.c
|
||||
./test/th5s.c
|
||||
@@ -906,33 +960,68 @@
|
||||
|
||||
./tools/Dependencies
|
||||
./tools/Makefile.in
|
||||
./tools/h5debug.c
|
||||
./tools/h5dump.c
|
||||
./tools/h5dump.h
|
||||
./tools/h5dumptst.c
|
||||
./tools/h5import.c
|
||||
./tools/h5ls.c
|
||||
./tools/h5repart.c
|
||||
./tools/h5toh4.c
|
||||
./tools/h5toh4.h
|
||||
./tools/h5tools.c
|
||||
./tools/h5tools.h
|
||||
./tools/h4toh5main.c
|
||||
./tools/h4toh5main.h
|
||||
./tools/h4toh5pal.c
|
||||
./tools/h4toh5sds.c
|
||||
./tools/h4toh5util.c
|
||||
./tools/h4toh5util.h
|
||||
./tools/h4toh5image.c
|
||||
./tools/h4toh5vgroup.c
|
||||
./tools/h4toh5vdata.c
|
||||
./tools/h4toh5anno.c
|
||||
./tools/pdb2hdf.c
|
||||
./tools/talign.c
|
||||
./tools/testh5dump.sh
|
||||
./tools/testh5ls.sh
|
||||
./tools/testh5toh4.sh
|
||||
./tools/testh4toh5.sh
|
||||
|
||||
./tools/gifconv/Dependencies
|
||||
./tools/gifconv/Makefile.in
|
||||
./tools/gifconv/decompress.c
|
||||
./tools/gifconv/gif.h
|
||||
./tools/gifconv/gif2hdf.c
|
||||
./tools/gifconv/gif2mem.c
|
||||
./tools/gifconv/gifread.c
|
||||
./tools/gifconv/hdf2gif.c
|
||||
./tools/gifconv/hdfgifwr.c
|
||||
./tools/gifconv/readhdf.c
|
||||
./tools/gifconv/writehdf.c
|
||||
|
||||
./tools/h4toh5/Dependencies
|
||||
./tools/h4toh5/Makefile.in
|
||||
./tools/h4toh5/h4toh5anno.c
|
||||
./tools/h4toh5/h4toh5image.c
|
||||
./tools/h4toh5/h4toh5main.c
|
||||
./tools/h4toh5/h4toh5main.h
|
||||
./tools/h4toh5/h4toh5pal.c
|
||||
./tools/h4toh5/h4toh5sds.c
|
||||
./tools/h4toh5/h4toh5test.c
|
||||
./tools/h4toh5/h4toh5util.c
|
||||
./tools/h4toh5/h4toh5util.h
|
||||
./tools/h4toh5/h4toh5vdata.c
|
||||
./tools/h4toh5/h4toh5vgroup.c
|
||||
./tools/h4toh5/testh4toh5.sh
|
||||
|
||||
./tools/h5dump/Dependencies
|
||||
./tools/h5dump/Makefile.in
|
||||
./tools/h5dump/h5dump.c
|
||||
./tools/h5dump/h5dump.h
|
||||
./tools/h5dump/h5dumptst.c
|
||||
./tools/h5dump/testh5dump.sh
|
||||
|
||||
./tools/h5ls/Dependencies
|
||||
./tools/h5ls/Makefile.in
|
||||
./tools/h5ls/h5ls.c
|
||||
./tools/h5ls/testh5ls.sh
|
||||
|
||||
./tools/h5toh4/Dependencies
|
||||
./tools/h5toh4/Makefile.in
|
||||
./tools/h5toh4/h5toh4.c
|
||||
./tools/h5toh4/h5toh4.h
|
||||
./tools/h5toh4/testh5toh4.sh
|
||||
|
||||
./tools/lib/Dependencies
|
||||
./tools/lib/Makefile.in
|
||||
./tools/lib/h5tools.c
|
||||
./tools/lib/h5tools.h
|
||||
./tools/lib/h5tools_str.c
|
||||
./tools/lib/h5tools_str.h
|
||||
./tools/lib/h5tools_utils.c
|
||||
./tools/lib/h5tools_utils.h
|
||||
./tools/lib/talign.c
|
||||
|
||||
./tools/misc/Dependencies
|
||||
./tools/misc/Makefile.in
|
||||
./tools/misc/h5debug.c
|
||||
./tools/misc/h5import.c
|
||||
./tools/misc/h5repart.c
|
||||
./tools/misc/pdb2hdf.c
|
||||
|
||||
./tools/testfiles/tall-1.ddl
|
||||
./tools/testfiles/tall-2.ddl
|
||||
@@ -1012,46 +1101,24 @@
|
||||
./tools/testfiles/tvldtypes3.h5
|
||||
./tools/testfiles/tvldtypes4.ddl
|
||||
./tools/testfiles/tvldtypes4.h5
|
||||
./tools/testfiles/vg.hdf
|
||||
./tools/testfiles/anfile.hdf
|
||||
./tools/testfiles/anno_obj.hdf
|
||||
./tools/testfiles/image_attr.hdf
|
||||
./tools/testfiles/image_pal.hdf
|
||||
./tools/testfiles/image_uint16.hdf
|
||||
./tools/testfiles/image_uint161.hdf
|
||||
./tools/testfiles/image_uint8.hdf
|
||||
./tools/testfiles/image_uint81.hdf
|
||||
./tools/testfiles/image_uint32.hdf
|
||||
./tools/testfiles/image_uint321.hdf
|
||||
./tools/testfiles/sds_dimsca_data.hdf
|
||||
./tools/testfiles/sds_dimscaunl_data.hdf
|
||||
./tools/testfiles/sds_typattr.hdf
|
||||
./tools/testfiles/sds_typchar8.hdf
|
||||
./tools/testfiles/sds_typchunk_comp.hdf
|
||||
./tools/testfiles/sds_typfloat32.hdf
|
||||
./tools/testfiles/sds_typfloat64.hdf
|
||||
./tools/testfiles/sds_typnfloat32.hdf
|
||||
./tools/testfiles/sds_typnfloat64.hdf
|
||||
./tools/testfiles/sds_typint16.hdf
|
||||
./tools/testfiles/sds_typint32.hdf
|
||||
./tools/testfiles/sds_typint8.hdf
|
||||
./tools/testfiles/sds_typlint16.hdf
|
||||
./tools/testfiles/sds_typlint32.hdf
|
||||
./tools/testfiles/sds_typlint8.hdf
|
||||
./tools/testfiles/sds_typluint16.hdf
|
||||
./tools/testfiles/sds_typluint32.hdf
|
||||
./tools/testfiles/sds_typluint8.hdf
|
||||
./tools/testfiles/sds_typuint16.hdf
|
||||
./tools/testfiles/sds_typuint32.hdf
|
||||
./tools/testfiles/sds_typuint8.hdf
|
||||
./tools/testfiles/vdata_attrtest.hdf
|
||||
./tools/testfiles/vdata_typtest.hdf
|
||||
./tools/testfiles/vg_attrtest.hdf
|
||||
./tools/testfiles/vg_hl.hdf
|
||||
./tools/testfiles/vg_loop.hdf
|
||||
./tools/testfiles/vg_nameclash.hdf
|
||||
./tools/testfiles/vg_nameclash2.hdf
|
||||
./tools/testfiles/vg_simple.hdf
|
||||
|
||||
# new hdf4 files for testing h4toh5 converter
|
||||
./tools/testfiles/anno_test.hdf
|
||||
./tools/testfiles/gr_typ_test.hdf
|
||||
./tools/testfiles/grnameclash_test.hdf
|
||||
./tools/testfiles/image_attr_test.hdf
|
||||
./tools/testfiles/ras_24_test.hdf
|
||||
./tools/testfiles/ras_8_test.hdf
|
||||
./tools/testfiles/sds_attr_test.hdf
|
||||
./tools/testfiles/sds_dim_test.hdf
|
||||
./tools/testfiles/sds_typ_test.hdf
|
||||
./tools/testfiles/sdsnameclash_test.hdf
|
||||
./tools/testfiles/vdata_test.hdf
|
||||
./tools/testfiles/vdnameclash_test.hdf
|
||||
./tools/testfiles/vg_all_test.hdf
|
||||
./tools/testfiles/vg_hl_test.hdf
|
||||
./tools/testfiles/vg_loop_test.hdf
|
||||
./tools/testfiles/vgnameclash_test.hdf
|
||||
|
||||
# Expected output from h5ls tests
|
||||
./tools/testfiles/help-1.ls
|
||||
@@ -1083,43 +1150,82 @@
|
||||
./tools/testfiles/Expected/tslink.hdf
|
||||
./tools/testfiles/Expected/tstr.hdf
|
||||
./tools/testfiles/Expected/tstr2.hdf
|
||||
./tools/testfiles/Expected/vg.h5
|
||||
./tools/testfiles/Expected/anfile.h5
|
||||
./tools/testfiles/Expected/anno_obj.h5
|
||||
./tools/testfiles/Expected/image_attr.h5
|
||||
./tools/testfiles/Expected/image_pal.h5
|
||||
./tools/testfiles/Expected/image_uint16.h5
|
||||
./tools/testfiles/Expected/image_uint161.h5
|
||||
./tools/testfiles/Expected/image_uint8.h5
|
||||
./tools/testfiles/Expected/image_uint81.h5
|
||||
./tools/testfiles/Expected/image_uint32.h5
|
||||
./tools/testfiles/Expected/image_uint321.h5
|
||||
./tools/testfiles/Expected/sds_dimsca_data.h5
|
||||
./tools/testfiles/Expected/sds_dimscaunl_data.h5
|
||||
./tools/testfiles/Expected/sds_typattr.h5
|
||||
./tools/testfiles/Expected/sds_typchar8.h5
|
||||
./tools/testfiles/Expected/sds_typchunk_comp.h5
|
||||
./tools/testfiles/Expected/sds_typfloat32.h5
|
||||
./tools/testfiles/Expected/sds_typfloat64.h5
|
||||
./tools/testfiles/Expected/sds_typnfloat32.h5
|
||||
./tools/testfiles/Expected/sds_typnfloat64.h5
|
||||
./tools/testfiles/Expected/sds_typint16.h5
|
||||
./tools/testfiles/Expected/sds_typint32.h5
|
||||
./tools/testfiles/Expected/sds_typint8.h5
|
||||
./tools/testfiles/Expected/sds_typlint16.h5
|
||||
./tools/testfiles/Expected/sds_typlint32.h5
|
||||
./tools/testfiles/Expected/sds_typlint8.h5
|
||||
./tools/testfiles/Expected/sds_typluint16.h5
|
||||
./tools/testfiles/Expected/sds_typluint32.h5
|
||||
./tools/testfiles/Expected/sds_typluint8.h5
|
||||
./tools/testfiles/Expected/sds_typuint16.h5
|
||||
./tools/testfiles/Expected/sds_typuint32.h5
|
||||
./tools/testfiles/Expected/sds_typuint8.h5
|
||||
./tools/testfiles/Expected/vdata_attrtest.h5
|
||||
./tools/testfiles/Expected/vdata_typtest.h5
|
||||
./tools/testfiles/Expected/vg_attrtest.h5
|
||||
./tools/testfiles/Expected/vg_hl.h5
|
||||
./tools/testfiles/Expected/vg_loop.h5
|
||||
./tools/testfiles/Expected/vg_nameclash.h5
|
||||
./tools/testfiles/Expected/vg_nameclash2.h5
|
||||
./tools/testfiles/Expected/vg_simple.h5
|
||||
|
||||
#new expected hdf5 files from converter,2/15/01
|
||||
./tools/testfiles/Expected/anno_test.h5
|
||||
./tools/testfiles/Expected/gr_typ_test.h5
|
||||
./tools/testfiles/Expected/grnameclash_test.h5
|
||||
./tools/testfiles/Expected/image_attr_test.h5
|
||||
./tools/testfiles/Expected/ras_24_test.h5
|
||||
./tools/testfiles/Expected/ras_8_test.h5
|
||||
./tools/testfiles/Expected/sds_attr.h5
|
||||
./tools/testfiles/Expected/sds_attr_test.h5
|
||||
./tools/testfiles/Expected/sds_dim_test.h5
|
||||
./tools/testfiles/Expected/sds_typ_test.h5
|
||||
./tools/testfiles/Expected/sdsnameclash_test.h5
|
||||
./tools/testfiles/Expected/vdata_test.h5
|
||||
./tools/testfiles/Expected/vdnameclash_test.h5
|
||||
./tools/testfiles/Expected/vg_all_test.h5
|
||||
./tools/testfiles/Expected/vg_hl_test.h5
|
||||
./tools/testfiles/Expected/vg_loop_test.h5
|
||||
./tools/testfiles/Expected/vgnameclash_test.h5
|
||||
|
||||
#additional test input and output for h5dump XML
|
||||
./tools/testfiles/tall.h5.xml
|
||||
./tools/testfiles/tarray1.h5.xml
|
||||
./tools/testfiles/tarray2.h5.xml
|
||||
./tools/testfiles/tarray3.h5.xml
|
||||
./tools/testfiles/tarray6.h5.xml
|
||||
./tools/testfiles/tarray7.h5.xml
|
||||
./tools/testfiles/tattr.h5.xml
|
||||
./tools/testfiles/tbitfields.h5.xml
|
||||
./tools/testfiles/tcompound.h5.xml
|
||||
./tools/testfiles/tcompound2.h5.xml
|
||||
./tools/testfiles/tdatareg.h5.xml
|
||||
./tools/testfiles/tdset.h5.xml
|
||||
./tools/testfiles/tdset2.h5.xml
|
||||
./tools/testfiles/tempty.h5.xml
|
||||
./tools/testfiles/tenum.h5.xml
|
||||
./tools/testfiles/tgroup.h5.xml
|
||||
./tools/testfiles/thlink.h5.xml
|
||||
./tools/testfiles/tloop.h5.xml
|
||||
./tools/testfiles/tloop2.h5.xml
|
||||
./tools/testfiles/tmany.h5.xml
|
||||
./tools/testfiles/tname-amp.h5
|
||||
./tools/testfiles/tname-amp.h5.xml
|
||||
./tools/testfiles/tname-apos.h5
|
||||
./tools/testfiles/tname-apos.h5.xml
|
||||
./tools/testfiles/tname-gt.h5
|
||||
./tools/testfiles/tname-gt.h5.xml
|
||||
./tools/testfiles/tname-lt.h5
|
||||
./tools/testfiles/tname-lt.h5.xml
|
||||
./tools/testfiles/tname-quot.h5
|
||||
./tools/testfiles/tname-quot.h5.xml
|
||||
./tools/testfiles/tname-sp.h5
|
||||
./tools/testfiles/tname-sp.h5.xml
|
||||
./tools/testfiles/tnestedcomp.h5.xml
|
||||
./tools/testfiles/tnodata.h5
|
||||
./tools/testfiles/tnodata.h5.xml
|
||||
./tools/testfiles/tobjref.h5.xml
|
||||
./tools/testfiles/topaque.h5.xml
|
||||
./tools/testfiles/tref-escapes-at.h5
|
||||
./tools/testfiles/tref-escapes-at.h5.xml
|
||||
./tools/testfiles/tref-escapes.h5
|
||||
./tools/testfiles/tref-escapes.h5.xml
|
||||
./tools/testfiles/tref.h5
|
||||
./tools/testfiles/tref.h5.xml
|
||||
./tools/testfiles/tsaf.h5.xml
|
||||
./tools/testfiles/tslink.h5.xml
|
||||
./tools/testfiles/tstr.h5.xml
|
||||
./tools/testfiles/tstr2.h5.xml
|
||||
./tools/testfiles/tstring-at.h5
|
||||
./tools/testfiles/tstring-at.h5.xml
|
||||
./tools/testfiles/tstring.h5
|
||||
./tools/testfiles/tstring.h5.xml
|
||||
./tools/testfiles/tvldtypes1.h5.xml
|
||||
./tools/testfiles/tvldtypes2.h5.xml
|
||||
./tools/testfiles/tvldtypes3.h5.xml
|
||||
|
||||
./windows/all.zip
|
||||
./windows/all_withf90.zip
|
||||
./windows/all_withhdf4.zip
|
||||
|
||||
55
Makefile.in
55
Makefile.in
@@ -20,41 +20,41 @@ SUBDIRS=src test tools doc @TESTPARALLEL@ @subdirs@
|
||||
## T A R G E T S
|
||||
##
|
||||
## all: Build libraries, header files, tests, and programs in the
|
||||
## various subdirectories but does not run tests or install the
|
||||
## library, header files, or programs. The components can be
|
||||
## built individually with the targets lib, progs, and tests.
|
||||
## various subdirectories but does not run tests or install the
|
||||
## library, header files, or programs. The components can be
|
||||
## built individually with the targets lib, progs, and tests.
|
||||
## check: Test the uninstalled library to make sure it works. You may
|
||||
## also say `test' or `_test' (`test' doesn't work from the top
|
||||
## level directory for some versions of make because `test' is
|
||||
## also a directory).
|
||||
## also say `test' or `_test' (`test' doesn't work from the top
|
||||
## level directory for some versions of make because `test' is
|
||||
## also a directory).
|
||||
## install: Installs libraries, header files, programs, and documentation
|
||||
## in the various directories under the prefix directory (lib,
|
||||
## include, bin, man, info). Use the `--prefix=PATH' option
|
||||
## to `configure' (or `config.status') or say `--help' for
|
||||
## other alternatives. The default prefix is `/usr/local'.
|
||||
## in the various directories under the prefix directory (lib,
|
||||
## include, bin, man, info). Use the `--prefix=PATH' option
|
||||
## to `configure' (or `config.status') or say `--help' for
|
||||
## other alternatives. The default prefix is `/usr/local'.
|
||||
## uninstall: Delete all the installed files that the `install' target
|
||||
## created (but not the noninstalled files such as `make all'
|
||||
## created).
|
||||
## created (but not the noninstalled files such as `make all'
|
||||
## created).
|
||||
## clean: Removes temporary files except those that record the
|
||||
## configuration and those that are part of the distribution.
|
||||
## configuration and those that are part of the distribution.
|
||||
## mostlyclean: Like `clean' except it doesn't delete a few files like
|
||||
## libraries, programs, and/or generated header files because
|
||||
## regenerating them is rarely necessary and takes a lot of time.
|
||||
## libraries, programs, and/or generated header files because
|
||||
## regenerating them is rarely necessary and takes a lot of time.
|
||||
## distclean: Deletes all files that are created by configuring or building
|
||||
## HDF5. If you have unpacked the source and built HDF5 without
|
||||
## creating any other files, then `make distclean' will leave
|
||||
## only the files that were in the distrubution.
|
||||
## HDF5. If you have unpacked the source and built HDF5 without
|
||||
## creating any other files, then `make distclean' will leave
|
||||
## only the files that were in the distrubution.
|
||||
## maintainer-clean:
|
||||
## Like `distclean' except it deletes more files. It deletes
|
||||
## all generated files. This target is not intended for normal
|
||||
## users; it deletes files that may require special tools to
|
||||
## rebuild.
|
||||
## Like `distclean' except it deletes more files. It deletes
|
||||
## all generated files. This target is not intended for normal
|
||||
## users; it deletes files that may require special tools to
|
||||
## rebuild.
|
||||
## TAGS: Updates the tags table for this program.
|
||||
## dep depend: Builds dependencies in all subdirectories. These targets
|
||||
## might not be available on certain combinations of make
|
||||
## programs and C compilers. At the other extreme, the GNU
|
||||
## make used in combination with gcc will maintain dependency
|
||||
## information automatically.
|
||||
## might not be available on certain combinations of make
|
||||
## programs and C compilers. At the other extreme, the GNU
|
||||
## make used in combination with gcc will maintain dependency
|
||||
## information automatically.
|
||||
lib progs check test _test uninstall:
|
||||
@@SETX@; for d in $(SUBDIRS); do \
|
||||
(cd $$d && $(MAKE) $@) || exit 1; \
|
||||
@@ -74,6 +74,9 @@ install:
|
||||
install-doc:
|
||||
(cd doc && $(MAKE) $@) || exit 1;
|
||||
|
||||
uninstall-doc:
|
||||
(cd doc && $(MAKE) $@) || exit 1;
|
||||
|
||||
## Number format detection
|
||||
H5detect:
|
||||
(cd src && $(MAKE) $@)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
This is hdf5-1.4.0-beta3-pre5 currently under development
|
||||
HDF5 version 1.4.2 currently under development
|
||||
Please refer to the INSTALL file for installation instructions.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
467
RELEASE.txt
467
RELEASE.txt
@@ -1,467 +0,0 @@
|
||||
|
||||
|
||||
HDF5 Release 1.4-Beta3
|
||||
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
This document describes the differences between HDF5-1.2.0 and
|
||||
HDF5-1.4-Beta3, and contains information on the platforms tested and
|
||||
known problems in HDF5-1.4-Beta3. For more details check the HISTORY.txt
|
||||
file in the HDF5 source.
|
||||
|
||||
The HDF5 documentation can be found on the NCSA ftp server
|
||||
(ftp.ncsa.uiuc.edu) in the directory:
|
||||
|
||||
/HDF/HDF5/docs/
|
||||
|
||||
For more information look at the HDF5 home page at:
|
||||
|
||||
http://hdf.ncsa.uiuc.edu/HDF5/
|
||||
|
||||
If you have any questions or comments, please send them to:
|
||||
|
||||
hdfhelp@ncsa.uiuc.edu
|
||||
|
||||
|
||||
CONTENTS
|
||||
|
||||
- New Features
|
||||
- h4toh5 Utility
|
||||
- F90 Support
|
||||
- C++ Support
|
||||
- Bug Fixes since HDF5-1.2.0
|
||||
- Bug Fixes since HDF5-1.4.0-beta2
|
||||
- Platforms Tested
|
||||
- Known Problems
|
||||
|
||||
New Features
|
||||
============
|
||||
* The Virtual File Layer, VFL, was added to replace the old file
|
||||
drivers. It also provides an API for user defined file drivers.
|
||||
* New features added to snapshots. Use 'snapshot help' to see a
|
||||
complete list of features.
|
||||
* Improved configure to detect if MPIO routines are available when
|
||||
parallel mode is requested.
|
||||
* Added Thread-Safe support. Phase I implemented.
|
||||
* Added data sieve buffering to raw data I/O path. This is enabled
|
||||
for all VFL drivers except the mpio & core drivers. Setting the
|
||||
sieve buffer size is controlled with the new API function,
|
||||
H5Pset_sieve_buf_size(), and retrieved with H5Pget_sieve_buf_size().
|
||||
* Added new Virtual File Driver, Stream VFD, to send/receive entire
|
||||
HDF5 files via socket connections.
|
||||
* As parts of VFL, HDF-GASS and HDF-SRB are also added to this
|
||||
release. To find out details, please read INSTALL_VFL file.
|
||||
* Increased maximum number of dimensions for a dataset (H5S_MAX_RANK)
|
||||
from 31 to 32 to align with HDF4 & netCDF.
|
||||
* Added 'query' function to VFL drivers. Also added 'type' parameter to
|
||||
VFL 'read' & 'write' calls, so they are aware of the type of data
|
||||
being accessed in the file. Updated the VFL document also.
|
||||
* A new h4toh5 uitlity, to convert HDF4 files to analogous HDF5 files.
|
||||
* Added a new array datatype to the datatypes which can be created. Removed
|
||||
"array fields" from compound datatypes (use an array datatype instead).
|
||||
* Parallel HDF5 works correctly with mpich-1.2.1 on Solaris, SGI, Linux.
|
||||
* You can now install the HDF5 documentation using the
|
||||
``make install-doc'' command. The documentation is installed in the
|
||||
$(prefix)/doc directory where $(prefix) is the prefix specified by
|
||||
the (optional) ``--prefix'' flag during configuration.
|
||||
|
||||
h4toh5 Utility
|
||||
==============
|
||||
|
||||
The h4toh5 utility is a new utility that converts an HDF4 file to an
|
||||
HDF5 file. For details, see the document, "Mapping HDF4 Objects to
|
||||
HDF5 Objects":
|
||||
http://hdf.ncsa.uiuc.edu/HDF5/papers/H4-H5MappingGuidelines.pdf
|
||||
|
||||
Known Bugs:
|
||||
|
||||
The h4toh5 utility produces images that do not correctly conform
|
||||
to the HDF5 Image and Palette Specification.
|
||||
http://hdf.ncsa.uiuc.edu/HDF5/doc/ImageSpec.html
|
||||
Several required HDF5 attributes are omitted, and the dataspace
|
||||
is reversed (i.e., the ht. and width of the image dataset is
|
||||
incorrectly described.) For more information, please see:
|
||||
http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageDetails.htm
|
||||
|
||||
Known Limitations of the h4toh5 beta release
|
||||
---------------------------------------------
|
||||
|
||||
1. Error Handling
|
||||
|
||||
Error reporting is minimal.
|
||||
|
||||
2. String Datatype
|
||||
|
||||
HDF4 has no 'string' type. String valued data are usually defined as
|
||||
an array of 'char' in HDF4. The h4toh5 utility will generally map
|
||||
these to HDF5 'String' types rather than array of char, with the
|
||||
following additional rules:
|
||||
|
||||
* For the data of an HDF4 SDS, image, and palette, if the data is
|
||||
declared 'DFNT_CHAR8' it will be assumed to be integer and
|
||||
will be an H5T_INTEGER type.
|
||||
* For attributes of any HDF4 object, data of type 'DFNT_CHAR8'
|
||||
will be converted to an HDF5 'H5T_STRING' type.
|
||||
* For an HDF4 Vdata, it is difficult to determine whether data
|
||||
of type 'DFNT_CHAR8' is intended to be bytes or characters.
|
||||
The h4toh5 utility will consider them to be C characters, and
|
||||
will convert them to an HDF5 'H5T_STRING' type.
|
||||
|
||||
|
||||
3. Compression, Chunking and External Storage
|
||||
|
||||
Chunking is supported, but compression and external storage is not.
|
||||
|
||||
An HDF4 object that uses chunking will be converted to an HDF5 file
|
||||
with analogous chunked storage.
|
||||
|
||||
An HDF4 object that uses compression will be converted to an
|
||||
uncompressed HDF5 object.
|
||||
|
||||
An HDF4 object that uses external storage will be converted to an
|
||||
HDF5 object without external storage.
|
||||
|
||||
4. Memory Use
|
||||
|
||||
The beta version of the h4toh5 utility copies data from HDF4 objects
|
||||
in a single read followed by a single write to the HDF5 object. For
|
||||
large objects, this requires a very large amount of memory, which may
|
||||
be extremely slow or fail on some platforms.
|
||||
|
||||
Note that a dataset that has only been partly written will
|
||||
be read completely, including uninitialized data, and all the
|
||||
data will be written to the HDF5 object.
|
||||
|
||||
5. Platforms
|
||||
|
||||
The h4toh5 utility requires HDF5.1.4 and HDF4r1.4
|
||||
|
||||
The beta h4toh5 utility has been tested on Solaris 2.6, Solaris 2.5,
|
||||
Irix 6.5, HPUX 11.0, DEC Unix, FreeBSD, Windows 2000(NT5.0),Windows NT
|
||||
and Windows 98.
|
||||
|
||||
F90 Support
|
||||
===========
|
||||
|
||||
This is the first release of the HDF5 Library with fully integrated
|
||||
F90 API support. The Fortran Library is created when the
|
||||
--enable-fortran flag is specified during configuration.
|
||||
|
||||
Not all F90 subroutines are implemented. Please refer to the HDF5
|
||||
Reference Manual for more details.
|
||||
|
||||
F90 APIs are available for the Solaris 2.6 and 2.7, Linux, DEC UNIX,
|
||||
T3E, J90 and O2K (64 bit option only) platforms. The Parallel version of
|
||||
the HDF5 F90 Library is supported on the O2K and T3E platforms.
|
||||
|
||||
Changes since the last prototype release (July 2000)
|
||||
----------------------------------------------------
|
||||
|
||||
* h5open_f and h5close_f must be called instead of h5init_types and
|
||||
h5close_types.
|
||||
|
||||
* The following subroutines are no longer available:
|
||||
h5pset_xfer_f
|
||||
h5pget_xfer_f
|
||||
h5pset_mpi_f
|
||||
h5pget_mpi_f
|
||||
h5pset_stdio_f
|
||||
h5pget_stdio_f
|
||||
h5pset_sec2_f
|
||||
h5pget_sec2_f
|
||||
h5pset_core_f
|
||||
h5pget_core_f
|
||||
h5pset_family_f
|
||||
h5pget_family_f
|
||||
|
||||
* The following functions have been added:
|
||||
h5pset_fapl_mpio_f
|
||||
h5pget_fapl_mpio_f
|
||||
h5pset_dxpl_mpio_f
|
||||
h5pget_dxpl_mpio_f
|
||||
|
||||
* In the previous HDF5 F90 releases, the implementation of object
|
||||
references and dataset region references was not portable. This
|
||||
release introduces a portable implementation, but it also introduces
|
||||
changes to the read/write APIs that handle references. If object or
|
||||
dataset region references are written or read to/from an HDF5 file,
|
||||
h5dwrite_f and h5dread_f must use the extra parameter, n, for the
|
||||
buffer size:
|
||||
|
||||
h5dwrite(read)_f(dset_id, mem_type_id, buf, n, hdferr, &
|
||||
^^^
|
||||
mem_space_id, file_space_id, xfer_prp)
|
||||
|
||||
For other datatypes the APIs were not changed.
|
||||
|
||||
|
||||
C++ Support
|
||||
===========
|
||||
|
||||
This is the first release of the HDF5 Library with fully integrated
|
||||
C++ API support. The HDF5 C++ library is built when the --enable-cxx
|
||||
flag is specified during configuration.
|
||||
|
||||
Check the HDF5 Reference Manual for available C++ documentation.
|
||||
|
||||
C++ APIs are available for Solaris 2.6 and 2.7, Linux, and FreeBSD.
|
||||
|
||||
|
||||
Bug Fixes since HDF5-1.2.0
|
||||
==========================
|
||||
|
||||
Library
|
||||
-------
|
||||
|
||||
* The function H5Pset_mpi is renamed as H5Pset_fapl_mpio.
|
||||
* Corrected a floating point number conversion error for the Cray J90
|
||||
platform. The error did not convert the value 0.0 correctly.
|
||||
* Error was fixed which was not allowing dataset region references to
|
||||
have their regions retrieved correctly.
|
||||
* Corrected a bug that caused non-parallel file drivers to fail in
|
||||
the parallel version.
|
||||
* Added internal free-lists to reduce memory required by the library
|
||||
and H5garbage_collect API function
|
||||
* Fixed error in H5Giterate which was not updating the "index"
|
||||
parameter correctly.
|
||||
* Fixed error in hyperslab iteration which was not walking through the
|
||||
correct sequence of array elements if hyperslabs were staggered in a
|
||||
certain pattern
|
||||
* Fixed several other problems in hyperslab iteration code.
|
||||
* Fixed another H5Giterate bug which was causes groups with large
|
||||
numbers of objects in them to misbehave when the callback function
|
||||
returned non-zero values.
|
||||
* Changed return type of H5Aiterate and H5A_operator_t typedef to be
|
||||
herr_t, to align them with the dataset and group iterator functions.
|
||||
* Changed H5Screate_simple and H5Sset_extent_simple to not allow
|
||||
dimensions of size 0 with out the same dimension being unlimited.
|
||||
* QAK - 4/19/00 - Improved metadata hashing & caching algorithms to
|
||||
avoid many hash flushes and also remove some redundant I/O when
|
||||
moving metadata blocks in the file.
|
||||
* The "struct(opt)" type conversion function which gets invoked for
|
||||
certain compound datatype conversions was fixed for nested compound
|
||||
types. This required a small change in the datatype conversion
|
||||
function API.
|
||||
* Re-wrote lots of the hyperslab code to speed it up quite a bit.
|
||||
* Added bounded garbage collection for the free lists when they run
|
||||
out of memory and also added H5set_free_list_limits API call to
|
||||
allow users to put an upper limit on the amount of memory used for
|
||||
free lists.
|
||||
* Checked for non-existent or deleted objects when dereferencing one
|
||||
with object or region references and disallow dereference.
|
||||
* "Time" datatypes (H5T_UNIX_D*) were not being stored and retrieved
|
||||
from object headers correctly, fixed now.
|
||||
* Fixed H5Dread or H5Dwrite calls with H5FD_MPIO_COLLECTIVE requests
|
||||
that may hang because not all processes are transfer the same amount
|
||||
of data. (A.K.A. prematured collective return when zero amount data
|
||||
requested.) Collective calls that may cause hanging is done via the
|
||||
corresponding MPI-IO independent calls.
|
||||
* If configure with --enable-debug=all, couple functions would issue
|
||||
warning messages to "stderr" that the operation is expensive time-wise.
|
||||
This messed up applications (like testings) that did not expect the
|
||||
extra output. It is changed so that the warning will be printed only
|
||||
if the corresponding Debug key is set.
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
* The hdf5.h include file was fixed to allow the HDF5 Library to be
|
||||
compiled with other libraries/applications that use GNU autoconf.
|
||||
* Configuration for parallel HDF5 was improved. Configure now attempts
|
||||
to link with libmpi.a and/or libmpio.a as the MPI libraries by
|
||||
default. It also uses "mpirun" to launch MPI tests by default. It
|
||||
tests to link MPIO routines during the configuration stage, rather
|
||||
than failing later as before. One can just do "./configure
|
||||
--enable-parallel" if the MPI library is in the system library.
|
||||
* Added support for pthread library and thread-safe option.
|
||||
* The libhdf5.settings file shows the correct machine byte-sex.
|
||||
* Added option "--enable-stream-vfd" to configure w/o the Stream VFD.
|
||||
For Solaris, added -lsocket to the LIBS list of libraries.
|
||||
|
||||
Tools
|
||||
-----
|
||||
* h5dump now accepts both short and long command-line parameters:
|
||||
-h, --help Print a usage message and exit
|
||||
-B, --bootblock Print the content of the boot block
|
||||
-H, --header Print the header only; no data is displayed
|
||||
-i, --object-ids Print the object ids
|
||||
-V, --version Print version number and exit
|
||||
-a P, --attribute=P Print the specified attribute
|
||||
-d P, --dataset=P Print the specified dataset
|
||||
-g P, --group=P Print the specified group and all members
|
||||
-l P, --soft-link=P Print the value(s) of the specified soft link
|
||||
-o F, --output=F Output raw data into file F
|
||||
-t T, --datatype=T Print the specified named data type
|
||||
-w #, --width=# Set the number of columns
|
||||
|
||||
P - is the full path from the root group to the object.
|
||||
T - is the name of the data type.
|
||||
F - is a filename.
|
||||
# - is an integer greater than 1.
|
||||
* A change from the old way command line parameters were interpreted
|
||||
is that multiple attributes, datasets, groups, soft-links, and
|
||||
object-ids cannot be specified with just one flag but you have to
|
||||
use a flag with each object. I.e., instead of doing this:
|
||||
|
||||
h5dump -a /attr1 /attr2 foo.h5
|
||||
|
||||
do this:
|
||||
|
||||
h5dump -a /attr1 -a /attr2 foo.h5
|
||||
|
||||
The cases are similar for the other object types.
|
||||
* h5dump correctly displays compound datatypes.
|
||||
* Corrected an error in h5toh4 which did not convert the 32bits
|
||||
int from HDF5 to HDF4 corectly for the T3E platform.
|
||||
* h5dump correctly displays the committed copy of predefined types
|
||||
correctly.
|
||||
* Added an option, -V, to show the version information of h5dump.
|
||||
* Fixed a core dumping bug of h5toh4 when executed on platforms like
|
||||
TFLOPS.
|
||||
* The test script for h5toh4 used to not able to detect the hdp
|
||||
dumper command was not valid. It now detects and reports the
|
||||
failure of hdp execution.
|
||||
* Merged the tools with the 1.2.2 branch. Required adding new
|
||||
macros, VERSION12 and VERSION13, used in conditional compilation.
|
||||
Updated the Windows project files for the tools.
|
||||
* h5dump displays opaque and bitfield data correctly.
|
||||
* h5dump and h5ls can browse files created with the Stream VFD
|
||||
(eg. "h5ls <hostname>:<port>").
|
||||
* h5dump has a new feature "-o <filename>" which outputs the raw data
|
||||
of the dataset into ascii text file <filename>.
|
||||
* h5toh4 used to converts hdf5 strings type to hdf4 DFNT_INT8 type.
|
||||
Corrected to produce hdf4 DFNT_CHAR type instead.
|
||||
* h5dump and h5ls displays array data correctly.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
* User's Guide and Reference Manual were updated.
|
||||
See doc/html/PSandPDF/index.html for more details.
|
||||
|
||||
|
||||
Bug Fixes since HDF5-1.4.0-beta2
|
||||
================================
|
||||
|
||||
* Fixed a bug in the conversion from a little endian double to a big endian float
|
||||
in some special cases.
|
||||
* Corrected configuration error which was not including compression support
|
||||
correctly.
|
||||
* Cleaned up lots of warnings.
|
||||
* Changed a few h5dump command line switches and added long versions of
|
||||
the switches.
|
||||
* Changed parameters for H5Tconvert, H5Pset_bufer and H5Pget_buffer from
|
||||
size_t to hsize_t
|
||||
* Fixed fairly obscure bug in hyperslab I/O which could (in rare cases)
|
||||
not copy all the data during a transfer.
|
||||
* Removed ragged array code from library.
|
||||
* F90 library and module files are installed properly now on all supported platforms.
|
||||
|
||||
Platforms Tested
|
||||
================
|
||||
|
||||
Note: Due to the nature of the bug fixes, only static versions of the
|
||||
library and tools were tested.
|
||||
|
||||
|
||||
AIX 4.3.2 (IBM SP) mpcc_r 3.6.6
|
||||
Cray T3E sn6711 2.0.5.45 Cray Standard C Version 6.4.0.0
|
||||
Cray Fortran Version 3.4.0.2
|
||||
Cray SV1 sn9605 10.0.0.7 Cray Standard C Version 6.4.0.0
|
||||
Cray Fortran Version 3.4.0.2
|
||||
FreeBSD 4.2 gcc 2.95.2
|
||||
g++ 2.95.2
|
||||
HP-UX B.10.20 HP C HP92453-01 A.10.32.30
|
||||
HP-UX B.11.00 HP C HP92453-01 A.11.00.13
|
||||
IRIX 6.5 MIPSpro cc 7.30
|
||||
IRIX64 6.5 (64 & n32) MIPSpro cc 7.3.1m
|
||||
mpt.1.4.0.2
|
||||
mpich-1.2.1
|
||||
Linux 2.2.16-3smp gcc-2.95.2
|
||||
g++ 2.95.2
|
||||
pgf90 3.1-3
|
||||
OSF1 V4.0 DEC-V5.2-040
|
||||
Digital Fortran 90 V4.1-270
|
||||
SunOS 5.6 WorkShop Compilers 5.0 98/12/15 C 5.0
|
||||
(Solaris 2.6) WorkShop Compilers 5.0 99/10/25 Fortran 90
|
||||
2.0 Patch 107356-04
|
||||
Workshop Compilers 5.0 98/12/15 C++ 5.0
|
||||
SunOS 5.7 WorkShop Compilers 5.0 98/12/15 C 5.0
|
||||
(Solaris 2.7) WorkShop Compilers 5.0 99/10/25 Fortran 90
|
||||
2.0 Patch 107356-04
|
||||
Workshop Compilers 5.0 98/12/15 C++ 5.0
|
||||
TFLOPS 3.3 mpich-1.2.0 with local changes
|
||||
Windows NT4.0, 2000 (NT5.0) MSVC++ 6.0
|
||||
Windows 98 MSVC++ 6.0
|
||||
|
||||
Known Problems
|
||||
==============
|
||||
|
||||
* The --enable-static-exec configure flag fails to compile for Solaris
|
||||
platforms. This is due to the fact that not all of the system
|
||||
libraries on Solaris are available in a static format.
|
||||
|
||||
The --enable-static-exec configure flag also fails to correctly compile
|
||||
on Linux platforms using the gcc-2.95.2 compiler.
|
||||
|
||||
It is suggested that you don't use this option on these platforms
|
||||
during configuration.
|
||||
|
||||
* With the gcc 2.95.2 compiler, HDF 5 uses the `-ansi' flag during
|
||||
compilation. The ANSI version of the compiler complains about not being
|
||||
able to handle the `long long' datatype with the warning:
|
||||
|
||||
warning: ANSI C does not support `long long'
|
||||
|
||||
This warning is innocuous and can be safely ignored.
|
||||
|
||||
* SunOS 5.6 with C WorkShop Compilers 4.2: Hyperslab selections will
|
||||
fail if library is compiled using optimization of any level.
|
||||
|
||||
* When building hdf5 tools and applications on windows platform, a linking
|
||||
warning: defaultlib "LIBC" conflicts with use of other libs will appear
|
||||
on debug version when running VC++6.0. This warning doesn't affect building
|
||||
and testing hdf5 applications. We will continue investigating this.
|
||||
|
||||
* h5toh4 converter fails two cases(tstr.h5 and tmany.h5) for release dll version on
|
||||
windows 2000 and NT.
|
||||
The reason is possibly due to windows NT DLL convention on freeing memory. It seems
|
||||
that memory cannot be free across library or DLL. It is still under investigated.
|
||||
|
||||
* The Stream VFD was not tested yet under Windows.
|
||||
It is not supported in the TFLOPS machine.
|
||||
|
||||
* Shared library option is broken for IBM SP and some Origin 2000 platforms.
|
||||
One needs to run ./configure with '--disable-shared'
|
||||
|
||||
* The ./dsets tests failed in the TFLOPS machine if the test program,
|
||||
dsets.c, is compiled with the -O option. The hdf5 library still works
|
||||
correctly with the -O option. The test program works fine if it is
|
||||
compiled with -O1 or -O0. Only -O (same as -O2) causes the test
|
||||
program to fail.
|
||||
|
||||
* Certain platforms give false negatives when testing h5ls:
|
||||
- Solaris x86 2.5.1, Cray T3E and Cray J90 give errors during testing
|
||||
when displaying object references in certain files. These are benign
|
||||
differences due to the difference in sizes of the objects created on
|
||||
those platforms. h5ls appears to be dumping object references
|
||||
correctly.
|
||||
- Cray J90 (and Cray T3E?) give errors during testing when displaying
|
||||
some floating-point values. These are benign differences due to the
|
||||
different precision in the values displayed and h5ls appears to be
|
||||
dumping floating-point numbers correctly.
|
||||
|
||||
* Before building HDF5 F90 Library from source on Crays (T3E and J90)
|
||||
replace H5Aff.f90, H5Dff.f90 and H5Pff.f90 files in the fortran/src subdirectory
|
||||
in the top level directory with the Cray-specific files from the
|
||||
ftp://hdf.ncsa.uiuc.edu/pub/ougoing/hdf5/hdf5-1.4.0-beta/F90_source_for_Crays
|
||||
directory.
|
||||
|
||||
* The h4toh5 utility produces images that do not correctly conform
|
||||
to the HDF5 Image and Palette Specification.
|
||||
http://hdf.ncsa.uiuc.edu/HDF5/doc/ImageSpec.html
|
||||
Several required HDF5 attributes are omitted, and the dataspace
|
||||
is reversed (i.e., the ht. and width of the image dataset is
|
||||
incorrectly described.) For more information, please see:
|
||||
http://hdf.ncsa.uiuc.edu/HDF5/H5Image/ImageDetails.htm
|
||||
40
bin/h5vers
40
bin/h5vers
@@ -56,8 +56,8 @@ use strict;
|
||||
# ./H5public.h or ./src/H5public.h.
|
||||
#
|
||||
# If the version number is changed (either `-s' or `-i' was used on
|
||||
# the command line) then the first line of the README file one
|
||||
# directory above the H5public.h file is also modified so it looks
|
||||
# the command line) then the first line of the README.txt and RELEASE.txt files
|
||||
# one directory above the H5public.h file is also modified so it looks
|
||||
# something like: This is hdf5-1.2.3-pre1 currently under development.
|
||||
##############################################################################
|
||||
|
||||
@@ -78,6 +78,9 @@ sub setvers {
|
||||
$_[0] =~ s/^(\#\s*define\s+H5_VERS_MINOR\s+)\d+/$1$vers[1]/m;
|
||||
$_[0] =~ s/^(\#\s*define\s+H5_VERS_RELEASE\s+)\d+/$1$vers[2]/m;
|
||||
$_[0] =~ s/^(\#\s*define\s+H5_VERS_SUBRELEASE\s+\")[^\"]*/$1$vers[3]/m;
|
||||
$_[0] =~ s/^(\#\s*define\s+H5_VERS_INFO\s+\")[^\"]*/
|
||||
sprintf("%sHDF5 library version: %d.%d.%d%s%s", $1, @vers[0,1,2],
|
||||
$vers[3]?"-":"", $vers[3])/me;
|
||||
}
|
||||
|
||||
sub usage {
|
||||
@@ -90,7 +93,7 @@ Usage: $prog [OPTS] [FILE]
|
||||
-s VERSION
|
||||
Set the version as specified. The version number can be embedded in
|
||||
some other string such as \"hdf5-1.1.0-pre1.tar.bz2\" or even
|
||||
\"this is hdf5 version 1.1 release 0 (pre1)\" for convenience.
|
||||
\"this is HDF5 library version 1.1 release 0 (pre1)\" for convenience.
|
||||
-v
|
||||
Instead of displaying only a dotted triple version number a line such
|
||||
as \"version 1.1 release 0 (pre1)\" will be printed.
|
||||
@@ -133,8 +136,9 @@ while ($_ = shift) {
|
||||
}
|
||||
die "mutually exclusive options given\n" if $set && $inc;
|
||||
|
||||
# Determine file to use as H5public.h and README. The README file is
|
||||
# always in the directory above H5public.h
|
||||
# Determine file to use as H5public.h, README.txt and release_docs/RELEASE.txt.
|
||||
# The README.txt and release_docs/RELEASE.txt files are always in the
|
||||
# directory above H5public.h
|
||||
unless ($file) {
|
||||
for (@files) {
|
||||
($file=$_,last) if -f $_;
|
||||
@@ -142,9 +146,14 @@ unless ($file) {
|
||||
}
|
||||
die "unable to find source files\n" unless defined $file;
|
||||
die "unable to read file: $file\n" unless -r $file;
|
||||
# README.txt
|
||||
my $README = $file;
|
||||
$README =~ s/[^\/]*$/..\/README/;
|
||||
$README =~ s/[^\/]*$/..\/README.txt/;
|
||||
die "unable to read file: $README\n" unless -r $file;
|
||||
# release_docs/RELEASE.txt
|
||||
my $RELEASE = $file;
|
||||
$RELEASE =~ s/[^\/]*$/..\/release_docs\/RELEASE.txt/;
|
||||
die "unable to read file: $RELEASE\n" unless -r $file;
|
||||
|
||||
# Get the current version number.
|
||||
open FILE, $file or die "unable to open $file: $!\n";
|
||||
@@ -190,6 +199,7 @@ if ($set) {
|
||||
} else {
|
||||
# Nothing to do but print result
|
||||
$README = "";
|
||||
$RELEASE = "";
|
||||
@newver = @curver;
|
||||
}
|
||||
|
||||
@@ -212,12 +222,12 @@ if ($newver[0]!=$curver[0] ||
|
||||
close FILE;
|
||||
}
|
||||
|
||||
# Update the README file
|
||||
# Update the README.txt file
|
||||
if ($README) {
|
||||
open FILE, $README or die "$README: $!\n";
|
||||
my @contents = <FILE>;
|
||||
close FILE;
|
||||
$contents[0] = sprintf("This is hdf5-%d.%d.%d%s %s",
|
||||
$contents[0] = sprintf("HDF5 version %d.%d.%d%s %s",
|
||||
@newver[0,1,2],
|
||||
$newver[3] eq "" ? "" : "-".$newver[3],
|
||||
"currently under development\n");
|
||||
@@ -226,6 +236,20 @@ if ($README) {
|
||||
close FILE;
|
||||
}
|
||||
|
||||
# Update the release_docs/RELEASE.txt file
|
||||
if ($RELEASE) {
|
||||
open FILE, $RELEASE or die "$RELEASE: $!\n";
|
||||
my @contents = <FILE>;
|
||||
close FILE;
|
||||
$contents[0] = sprintf("HDF5 version %d.%d.%d%s %s",
|
||||
@newver[0,1,2],
|
||||
$newver[3] eq "" ? "" : "-".$newver[3],
|
||||
"currently under development\n");
|
||||
open FILE, ">$RELEASE" or die "$RELEASE: $!\n";
|
||||
print FILE @contents;
|
||||
close FILE;
|
||||
}
|
||||
|
||||
# Print the new version number
|
||||
if ($verbose) {
|
||||
printf("version %d.%d release %d%s\n", @newver[0,1,2],
|
||||
|
||||
@@ -1284,7 +1284,7 @@ else
|
||||
hname="`hostname`"
|
||||
|
||||
case "$hname" in
|
||||
*pacific.llnl.gov*)
|
||||
*pacific.llnl.gov* | *gs01015*)
|
||||
hardcode_libdir_flag_spec=' '
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -1656,7 +1656,7 @@ compiler."
|
||||
|
||||
# Check that each of the things are valid numbers.
|
||||
case "$current" in
|
||||
0 | [1-9] | [1-9][0-9]*) ;;
|
||||
[0-9]*) ;;
|
||||
*)
|
||||
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
|
||||
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
|
||||
@@ -1665,7 +1665,7 @@ compiler."
|
||||
esac
|
||||
|
||||
case "$revision" in
|
||||
0 | [1-9] | [1-9][0-9]*) ;;
|
||||
[0-9]*) ;;
|
||||
*)
|
||||
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
|
||||
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
|
||||
@@ -1674,7 +1674,7 @@ compiler."
|
||||
esac
|
||||
|
||||
case "$age" in
|
||||
0 | [1-9] | [1-9][0-9]*) ;;
|
||||
[0-9]*) ;;
|
||||
*)
|
||||
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
|
||||
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
|
||||
@@ -2451,7 +2451,25 @@ EOF
|
||||
libdir="$hardcode_libdirs"
|
||||
eval rpath=\" $hardcode_libdir_flag_spec\"
|
||||
fi
|
||||
finalize_rpath="$rpath"
|
||||
|
||||
# Hack to fix the problem with compilers on Irix[56] machines which
|
||||
# can't handle long -Wl flags being sent to the linker during a
|
||||
# "recompile" just before execution. -BW 20. April 2001
|
||||
case "$host" in
|
||||
*irix[56]*)
|
||||
# Add in paths just for the HDF5 library stuff...
|
||||
pwd=`pwd`;
|
||||
rpath="$rpath:$pwd/.libs:$pwd/../src/.libs:$pwd/../../src/.libs:$pwd/../test/.libs";
|
||||
|
||||
# Modify the rpaths so that the compiler can handle the number
|
||||
# of library paths
|
||||
finalize_rpath=`echo $rpath | sed -e "s#:# ${wl}-rpath ${wl}#g"`;
|
||||
compile_rpath=`echo $rpath | sed -e "s#:# ${wl}-rpath ${wl}#g"`;
|
||||
;;
|
||||
*)
|
||||
finalize_rpath="$rpath";
|
||||
;;
|
||||
esac
|
||||
|
||||
output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
|
||||
if test "X$output_objdir" = "X$output"; then
|
||||
@@ -3462,7 +3480,11 @@ libdir='$install_libdir'\
|
||||
if test "$finalize" = yes && test -z "$run"; then
|
||||
tmpdir="/tmp"
|
||||
test -n "$TMPDIR" && tmpdir="$TMPDIR"
|
||||
tmpdir="$tmpdir/libtool-$$"
|
||||
tmpdir=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null`
|
||||
if test $? = 0 ; then :
|
||||
else
|
||||
tmpdir="$tmpdir/libtool-$$"
|
||||
fi
|
||||
if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
|
||||
else
|
||||
$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
|
||||
|
||||
24
bin/release
24
bin/release
@@ -99,11 +99,20 @@ test -h ../hdf5-$VERS && rm ../hdf5-$VERS
|
||||
ln -s `pwd` ../hdf5-$VERS || exit 1
|
||||
mv Makefile ../Makefile.x 2>/dev/null #might fail
|
||||
cp -p Makefile.dist Makefile
|
||||
# synchronize the HISTORY and RELEASE files in the doc area
|
||||
cp HISTORY.txt RELEASE.txt doc/html/ADGuide/.
|
||||
echo "This is hdf5-$VERS released on `date`" >README.x
|
||||
tail +2l README >>README.x
|
||||
mv README.x README
|
||||
|
||||
# Update README.txt and release_docs/RELEASE.txt with release information.
|
||||
for f in README.txt release_docs/RELEASE.txt; do
|
||||
echo "HDF5 version $VERS released on `date`" >$f.x
|
||||
tail +2l $f >>$f.x
|
||||
mv $f.x $f
|
||||
# Make sure new files are of the right access mode
|
||||
chmod 644 $f
|
||||
done
|
||||
|
||||
# synchronize the HISTORY.tx and RELEASE.tx files in the doc area
|
||||
cp release_docs/HISTORY.txt release_docs/RELEASE.txt doc/html/ADGuide/.
|
||||
|
||||
# Create the tar file
|
||||
test "$verbose" && echo " Running tar..." 1>&2
|
||||
( \
|
||||
cd ..; \
|
||||
@@ -112,8 +121,6 @@ test "$verbose" && echo " Running tar..." 1>&2
|
||||
)
|
||||
|
||||
# Compress
|
||||
# Make sure new files are of the right access mode
|
||||
umask 0133
|
||||
for comp in $methods; do
|
||||
case $comp in
|
||||
tar)
|
||||
@@ -130,6 +137,9 @@ for comp in $methods; do
|
||||
esac
|
||||
done
|
||||
|
||||
# Copy the RELEASE.txt to the release area.
|
||||
cp release_docs/RELEASE.txt $DEST/hdf5-$VERS-RELEASE.txt
|
||||
|
||||
# Remove temporary things
|
||||
test -f ../Makefile.x && mv ../Makefile.x Makefile
|
||||
rm -f $MANIFEST
|
||||
|
||||
150
bin/runtest
150
bin/runtest
@@ -22,11 +22,11 @@ test -n "$DEBUGMODE" && echo "******** DEBUGMODE is $DEBUGMODE ************"
|
||||
WHEREAMI='pwd'
|
||||
|
||||
# the name of this program
|
||||
PROGNAME=bin/runtest
|
||||
PROGNAME="bin/runtest $DEBUGMODE"
|
||||
|
||||
# Setup
|
||||
HOSTNAME=`hostname | cut -f1 -d.` # no domain part
|
||||
H5DIR=$HOME/HDF5/v_1_3/hdf5
|
||||
H5DIR=$HOME/HDF5/v_1_4/hdf5
|
||||
TODAY=`date +%y%m%d`
|
||||
H5VER= # default to current CVS version
|
||||
H5VERSTR= # default to current CVS version
|
||||
@@ -47,13 +47,13 @@ ENABLE_PARALLEL="op-configure --enable-parallel"
|
||||
#***************
|
||||
# DEC
|
||||
# Gondolin: DEC
|
||||
#DECHOST="skydive" # skydive is being upgraded.
|
||||
# gondolin rsh/ssh don't work.
|
||||
#DECHOST="skydive" # skydive is dead.
|
||||
# gondolin rsh/ssh don't work. run as alone-host.
|
||||
# HP
|
||||
# sangamon: HPUX 10
|
||||
# opus: HPUX 11
|
||||
HPHOST="sangamon" # HPUX 10 & 11 # opus removed because both its
|
||||
# NFS and AFS filesystems have problems.
|
||||
# kelgia: HPUX 11
|
||||
HPHOST="kelgia sangamon" # HPUX 10 & 11
|
||||
|
||||
# Linux
|
||||
# Dangermouse, eirene: Linux
|
||||
# Dangermouse used to die if gmake -j is used.
|
||||
@@ -188,6 +188,71 @@ CHECK_RSH()
|
||||
}
|
||||
|
||||
|
||||
# Wait for a file for at most number of minutes
|
||||
# $1--the file
|
||||
# $2--number of minutes
|
||||
# WAIT_STATUS set to:
|
||||
# -1 if errors encountered
|
||||
# 0 if file found within time limit
|
||||
# 1 if file not found within time limit
|
||||
WAITFOR()
|
||||
{
|
||||
wait_file=$1
|
||||
nminutes=$2
|
||||
if [ -z "$wait_file" -o ! "$nminutes" -ge 0 ]
|
||||
then
|
||||
echo "errors in argument of WAITFOR(): wait_file($1) or nminutes($2)"
|
||||
WAIT_STATUS=-1
|
||||
return
|
||||
fi
|
||||
while [ ! -f $wait_file ]; do
|
||||
if [ $nminutes -gt 0 ]; then
|
||||
echo "Wait For $wait_file to appear"
|
||||
sleep 60 #sleep 1 minute
|
||||
else
|
||||
WAIT_STATUS=1
|
||||
return
|
||||
fi
|
||||
nminutes=`expr $nminutes - 1`
|
||||
done
|
||||
WAIT_STATUS=0
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
# Wait till a file disappears for at most number of minutes.
|
||||
# Useful to wait till a lock is removed by another process.
|
||||
# $1--the file
|
||||
# $2--number of minutes
|
||||
# WAIT_STATUS set to:
|
||||
# -1 if errors encountered
|
||||
# 0 if file disappears within time limit
|
||||
# 1 if file has not disappeared within time limit
|
||||
WAITTILL()
|
||||
{
|
||||
wait_file=$1
|
||||
nminutes=$2
|
||||
if [ -z "$wait_file" -o ! "$nminutes" -ge 0 ]
|
||||
then
|
||||
echo "errors in argument of WAITTILL(): wait_file($1) or nminutes($2)"
|
||||
WAIT_STATUS=-1
|
||||
return
|
||||
fi
|
||||
while [ -f $wait_file ]; do
|
||||
if [ $nminutes -gt 0 ]; then
|
||||
echo "Wait till $wait_file has disappeared"
|
||||
sleep 60 #sleep 1 minute
|
||||
else
|
||||
WAIT_STATUS=1
|
||||
return
|
||||
fi
|
||||
nminutes=`expr $nminutes - 1`
|
||||
done
|
||||
WAIT_STATUS=0
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
# Run one snapshot test
|
||||
# $*--Types of test being run
|
||||
RUNSNAPTEST()
|
||||
@@ -225,6 +290,13 @@ RUNSNAPTEST()
|
||||
SNAPCMD_OPT="$SNAPCMD_OPT $1 $2"
|
||||
shift; shift
|
||||
;;
|
||||
setenv)
|
||||
# set environment variable
|
||||
shift
|
||||
eval $1="$2"
|
||||
export $1
|
||||
shift; shift
|
||||
;;
|
||||
*) # unknown test
|
||||
echo "$0: unknown type of test ($1)"
|
||||
retcode=1
|
||||
@@ -249,14 +321,8 @@ RUNSNAPTEST()
|
||||
SNAPCMD_OPT="$SNAPCMD_OPT srcdirname ${SRCDIRNAME}"
|
||||
fi
|
||||
|
||||
# If LOGFILE already exists, it means this host has been tested today.
|
||||
# Do at most one run per day.
|
||||
# Setup log file name to save test output
|
||||
LOGFILE=${LOGBASENAME}${SRCDIRNAME}_${TODAY}
|
||||
if [ -f $LOGFILE ]; then
|
||||
echo LOGFILE $LOGFILE exists. No more run today.
|
||||
retcode=1 && errcode=$retcode && return $retcode
|
||||
fi
|
||||
|
||||
echo Running snapshot with output saved in $LOGFILE
|
||||
(date; echo Hostname=$HOSTNAME) >> $LOGFILE
|
||||
|
||||
@@ -335,13 +401,17 @@ FLUSH_FILES()
|
||||
USAGE()
|
||||
{
|
||||
cat <<EOF
|
||||
Usage: runtest [-h] [-r<version>] [-all] [<host> ...]
|
||||
Usage: runtest [-h] [-debug] [-r<version>] [-all] [-nocvs] [<host> ...]
|
||||
-h
|
||||
print this help page
|
||||
-debug
|
||||
turn on debug mode
|
||||
-r<version>
|
||||
do runtest for <version>
|
||||
-all
|
||||
launch tests for all pre-defined testing hosts
|
||||
-nocvs
|
||||
do not do cvs commands
|
||||
<host>
|
||||
launch tests for <host>
|
||||
|
||||
@@ -371,6 +441,13 @@ while [ $# -gt 0 ]; do
|
||||
USAGE
|
||||
exit 0
|
||||
;;
|
||||
-debug*)
|
||||
# set debug mode
|
||||
DEBUGMODE="$1"
|
||||
SNAPSHOT="echo bin/snapshot"
|
||||
PROGNAME="$PROGNAME $DEBUGMODE"
|
||||
echo "******** DEBUGMODE is $DEBUGMODE ************"
|
||||
;;
|
||||
-r*)
|
||||
# the version string has a leading _ but not for H5DIR name
|
||||
H5VER="$1"
|
||||
@@ -379,7 +456,12 @@ while [ $# -gt 0 ]; do
|
||||
PROGNAME="$PROGNAME $H5VER"
|
||||
;;
|
||||
-all)
|
||||
TESTHOST=$ALLHOSTS
|
||||
# cannot assign ALLHOSTS yet.
|
||||
TESTHOST=-all
|
||||
;;
|
||||
-nocvs)
|
||||
# do not do cvs commands
|
||||
NOCVS=nocvs
|
||||
;;
|
||||
-*) # Unknow option
|
||||
echo "Unknown option ($1)"
|
||||
@@ -403,10 +485,23 @@ SNAPYARD=`cd $HOME/snapshots-hdf5${H5VERSTR} && /bin/pwd`
|
||||
LOGBASENAME=${SNAPYARD}/log/${HOSTNAME}
|
||||
FAILEDLOG=${SNAPYARD}/log/FAILED_LOG_${TODAY}
|
||||
CVSLOG=${SNAPYARD}/log/CVS_LOG_${TODAY}
|
||||
CVSLOG_LOCK=${SNAPYARD}/log/CVS_LOG_LOCK_${TODAY}
|
||||
# Snap Test Configuration file
|
||||
SNAPTESTCFG=${SNAPYARD}/snaptest.cfg
|
||||
|
||||
|
||||
#################################
|
||||
# Setup test host(s)
|
||||
#################################
|
||||
ALLHOSTSFILE=${SNAPYARD}/allhostfile
|
||||
if [ -f $ALLHOSTSFILE ]; then
|
||||
ALLHOSTS=`grep -v '#' $ALLHOSTSFILE`
|
||||
fi
|
||||
if [ "$TESTHOST" = -all ]; then
|
||||
TESTHOST=$ALLHOSTS
|
||||
fi
|
||||
|
||||
|
||||
#################################
|
||||
# Setup to print a trailer summary when exiting not via
|
||||
# the normal end of the script.
|
||||
@@ -423,10 +518,14 @@ echo TEST_TYPES=$TEST_TYPES
|
||||
|
||||
# Do a checkout if one has not been done today
|
||||
# Also check MANIFEST file
|
||||
if [ ! -f $CVSLOG ]; then
|
||||
if [ -z "$NOCVS" -a ! -f $CVSLOG ]; then
|
||||
echo Running CVS checkout with output saved in $CVSLOG
|
||||
# Set CVS lock first
|
||||
touch $CVSLOG_LOCK
|
||||
($SNAPSHOT checkout ) >> $CVSLOG 2>&1
|
||||
# Save error code and remove the lock
|
||||
errcode=$?
|
||||
rm -f $CVSLOG_LOCK
|
||||
if [ $errcode -ne 0 ]; then
|
||||
# test failed.
|
||||
REPORT_ERR "****CVS checkout FAILED in $HOSTNAME****"
|
||||
@@ -440,6 +539,23 @@ if [ ! -f $CVSLOG ]; then
|
||||
REPORT_ERR "****MANIFEST check FAILED****"
|
||||
fi
|
||||
PRINT_BLANK
|
||||
else
|
||||
# make sure the cvs update, if done by another host, has completed.
|
||||
# First wait for the presence of $CVSLOG which signals some host
|
||||
# has started the cvs update. Then wait for the absense of $CVSLOG_LOCK
|
||||
# which signals the host has completed the cvs update.
|
||||
WAITFOR $CVSLOG 90
|
||||
if [ $WAIT_STATUS -ne 0 ]; then
|
||||
errcode=$WAIT_STATUS
|
||||
REPORT_ERR "****Time expired waiting CVS update to start****"
|
||||
exit $errcode
|
||||
fi
|
||||
WAITTILL $CVSLOG_LOCK 10
|
||||
if [ $WAIT_STATUS -ne 0 ]; then
|
||||
errcode=$WAIT_STATUS
|
||||
REPORT_ERR "****Time expired waiting CVS update to finish****"
|
||||
exit $errcode
|
||||
fi
|
||||
fi
|
||||
|
||||
# we can use the version of script in SNAPYARD/current now
|
||||
|
||||
34
bin/snapshot
34
bin/snapshot
@@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
echo "====================================="
|
||||
echo "$0 $*"
|
||||
echo "====================================="
|
||||
set -x
|
||||
date
|
||||
uname -a
|
||||
@@ -40,7 +43,6 @@ fi
|
||||
cmd="all"
|
||||
test_opt=""
|
||||
errcode=0
|
||||
echo '$#=' $# '$*="' $* '"'
|
||||
while [ $# -gt 0 ] ; do
|
||||
case "$1" in
|
||||
all)
|
||||
@@ -164,11 +166,16 @@ CONFIGURE="./configure $HDF4LIB $OP_CONFIGURE"
|
||||
# Execute the requests
|
||||
snapshot=yes
|
||||
|
||||
H5VERSION=hdf5
|
||||
H5VERSION=hdf5_1_4
|
||||
BASEDIR=${HOME}/snapshots-${H5VERSION}
|
||||
CURRENT=${BASEDIR}/current
|
||||
PREVIOUS=${BASEDIR}/previous
|
||||
HOSTNAME=`hostname | cut -f1 -d.` # no domain part
|
||||
if [ $H5VERSION != hdf5 ]; then
|
||||
CVSVERSION="-r $H5VERSION"
|
||||
else
|
||||
CVSVERSION= # use the default (main) version
|
||||
fi
|
||||
|
||||
# Try finding a version of diff that supports the -I option too.
|
||||
DIFF=diff
|
||||
@@ -187,7 +194,7 @@ if [ "$cmd" = "all" -o -n "$cmdcheckout" ]; then
|
||||
test -d ${BASEDIR} || mkdir -p ${BASEDIR} || exit 1
|
||||
|
||||
# Check out the current version from CVS
|
||||
cvs -Q co -d ${CURRENT} hdf5 || exit 1
|
||||
cvs -Q co -d ${CURRENT} ${CVSVERSION} hdf5 || exit 1
|
||||
fi # Do CVS checkout
|
||||
|
||||
|
||||
@@ -211,6 +218,8 @@ if [ "$cmd" = "all" -o -n "$cmdtest" ]; then
|
||||
TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME}
|
||||
test -d ${TESTDIR} || mkdir ${TESTDIR}
|
||||
fi
|
||||
INSTALLDIR=${TESTDIR}/installdir
|
||||
test -d $INSTALLDIR || mkdir $INSTALLDIR
|
||||
# Make sure current version exists and is clean
|
||||
if [ -d ${TESTDIR} ]; then
|
||||
(cd ${TESTDIR} && ${MAKE} distclean)
|
||||
@@ -226,20 +235,27 @@ if [ "$cmd" = "all" -o -n "$cmdtest" ]; then
|
||||
if (${DIFF} -c ${PREVIOUS}/MANIFEST ${CURRENT}/MANIFEST); then
|
||||
snapshot=no
|
||||
for src in `grep '^\.' ${CURRENT}/MANIFEST|expand|cut -f1 -d' '`; do
|
||||
${DIFF} -I H5_VERS_RELEASE -I " released on " \
|
||||
if ${DIFF} -I H5_VERS_RELEASE -I " released on " \
|
||||
-I " currently under development" \
|
||||
${PREVIOUS}/$src ${CURRENT}/$src || \
|
||||
${PREVIOUS}/$src ${CURRENT}/$src
|
||||
then
|
||||
: #continue
|
||||
else
|
||||
snapshot=yes
|
||||
# Don't break because we want to see all the diffs.
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
# Make sure all the serial tests work.
|
||||
if [ "$snapshot" = "yes" ]; then
|
||||
if (cd ${TESTDIR}; \
|
||||
${srcdir:+${CURRENT}/}${CONFIGURE}; \
|
||||
${MAKE} check); then
|
||||
if (cd ${TESTDIR} && \
|
||||
${srcdir:+${CURRENT}/}${CONFIGURE} --prefix=$INSTALLDIR && \
|
||||
${MAKE} check && \
|
||||
${MAKE} install install-doc && \
|
||||
${MAKE} uninstall uninstall-doc); then
|
||||
:
|
||||
else
|
||||
errcode=$?
|
||||
@@ -255,7 +271,7 @@ fi # Test the HDF5 library
|
||||
#=============================
|
||||
if [ "$cmd" = "all" -o -n "$cmdrel" ]; then
|
||||
if [ "$snapshot" = "yes" ]; then
|
||||
(cd ${CURRENT}; ${MAKE} distclean)
|
||||
(cd ${CURRENT} && ${MAKE} distclean)
|
||||
(
|
||||
# Turn on exit on error in the sub-shell so that it does not
|
||||
# cvs commit if errors encounter here.
|
||||
|
||||
32
bin/versinc
32
bin/versinc
@@ -1,32 +0,0 @@
|
||||
#! /usr/local/bin/perl -w
|
||||
require 5.003;
|
||||
use Cwd;
|
||||
|
||||
# Get the current directory and build the source files name based on it.
|
||||
($cwd)=(cwd()=~m#(.*?hdf5)/.*#);
|
||||
|
||||
$hdr = "$cwd/src/H5public.h";
|
||||
$bak = "$cwd/src/H5public.h~";
|
||||
$tmp = "$cwd/src/H5public.$$";
|
||||
|
||||
# Open files
|
||||
open OLD, $hdr or die "cannot read $hdr";
|
||||
open NEW, ">$tmp" or die "cannot write to $tmp";
|
||||
|
||||
while (<OLD>) {
|
||||
if (/^(\#\s*define\s+H5_VERS_RELEASE\s+)(\d+)(.*)/) {
|
||||
print NEW $1, $2+1, $3, "\n";
|
||||
} elsif (/^(\#\s*define\s+H5_VERS_PATCH\s+)(\d+)(.*)/) {
|
||||
print NEW $1, "0", $3, "\n";
|
||||
} else {
|
||||
print NEW;
|
||||
}
|
||||
}
|
||||
close OLD;
|
||||
close NEW;
|
||||
|
||||
# Create a backup
|
||||
rename $hdr, $bak or warn "cannot create backup version";
|
||||
rename $tmp, $hdr or die "cannot update version number";
|
||||
|
||||
exit 0;
|
||||
@@ -1,7 +1,7 @@
|
||||
## Top-level HDF5-C++ Makefile(.in)
|
||||
##
|
||||
## Copyright (C) 2000 National Center for Supercomputing Applications.
|
||||
## All rights reserved.
|
||||
## Copyright (C) 2000-2001 National Center for Supercomputing Applications.
|
||||
## All rights reserved.
|
||||
##
|
||||
##
|
||||
## This makefile mostly just reinvokes make in the various subdirectories
|
||||
@@ -17,7 +17,7 @@ srcdir=@srcdir@
|
||||
# Subdirectories in build-order (not including `examples')
|
||||
# We include examples now since those are our "tests" at this time. We
|
||||
# can remove it later.
|
||||
SUBDIRS=src test examples
|
||||
SUBDIRS=src test
|
||||
|
||||
##############################################################################
|
||||
## T A R G E T S
|
||||
@@ -72,9 +72,8 @@ lib progs check test _test uninstall:
|
||||
(cd $$d && $(MAKE) $@) || exit 1; \
|
||||
done
|
||||
|
||||
## @@SETX@; for d in $(SUBDIRS) examples; do
|
||||
tests TAGS dep depend:
|
||||
@@SETX@; for d in $(SUBDIRS); do \
|
||||
@@SETX@; for d in $(SUBDIRS) examples; do \
|
||||
(cd $$d && $(MAKE) $@) || exit 1; \
|
||||
done
|
||||
|
||||
@@ -87,16 +86,14 @@ install:
|
||||
.PHONY: all lib progs test _test install uninstall dep depend clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
## @@SETX@; for d in $(SUBDIRS) examples; do
|
||||
clean mostlyclean:
|
||||
@@SETX@; for d in $(SUBDIRS); do \
|
||||
@@SETX@; for d in $(SUBDIRS) examples; do \
|
||||
(cd $$d && $(MAKE) $@); \
|
||||
done
|
||||
-$(RM) conftest conftest.c
|
||||
|
||||
## @@SETX@; for d in $(SUBDIRS) examples; do
|
||||
distclean:
|
||||
@@SETX@; for d in $(SUBDIRS); do \
|
||||
@@SETX@; for d in $(SUBDIRS) examples; do \
|
||||
(cd $$d && $(MAKE) $@); \
|
||||
done
|
||||
-$(RM) config/commence config/conclude
|
||||
|
||||
1183
c++/bin/config.guess
vendored
1183
c++/bin/config.guess
vendored
File diff suppressed because it is too large
Load Diff
1272
c++/bin/config.sub
vendored
1272
c++/bin/config.sub
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,251 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
||||
3114
c++/bin/ltconfig
3114
c++/bin/ltconfig
File diff suppressed because it is too large
Load Diff
4024
c++/bin/ltmain.sh
4024
c++/bin/ltmain.sh
File diff suppressed because it is too large
Load Diff
@@ -28,9 +28,6 @@ CP=cp
|
||||
INSTALL=@INSTALL@
|
||||
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
||||
INSTALL_DATA=@INSTALL_DATA@
|
||||
RUNSERIAL=@RUNSERIAL@
|
||||
RUNPARALLEL=@RUNPARALLEL@
|
||||
RUNTEST=$(RUNSERIAL)
|
||||
TRACE=:
|
||||
|
||||
## Installation points
|
||||
@@ -47,7 +44,7 @@ LT_STATIC_EXEC=@LT_STATIC_EXEC@
|
||||
DYNAMIC_DIRS=@DYNAMIC_DIRS@
|
||||
LT=$(top_builddir)/libtool
|
||||
LT_COMPILE=$(LT) --mode=compile $(CXX)
|
||||
LT_LINK_LIB=$(LT) --mode=link $(CXX) -static -rpath $(libdir)
|
||||
LT_LINK_LIB=$(LT) --mode=link $(CXX) -static -rpath $(libdir) $(DYNAMIC_DIRS)
|
||||
LT_LINK_EXE=$(LT) --mode=link $(CXX) $(LT_STATIC_EXEC) -dlopen self -static -rpath $(bindir) $(DYNAMIC_DIRS)
|
||||
LT_RUN=$(LT) --mode=execute
|
||||
LT_INSTALL_PROG=$(LT) --mode=install $(INSTALL_PROGRAM)
|
||||
|
||||
@@ -25,28 +25,29 @@ tests: $(TEST_PROGS) $(LIB)
|
||||
check test _test: tests
|
||||
@for test in $(TEST_PROGS) dummy; do \
|
||||
if test $$test != dummy; then \
|
||||
echo "============================"; \
|
||||
echo "Testing $$test $(TEST_FLAGS)"; \
|
||||
echo "============================"; \
|
||||
echo ""; \
|
||||
echo "====================================="; \
|
||||
echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
|
||||
echo "====================================="; \
|
||||
echo ""; \
|
||||
srcdir="$(srcdir)" \
|
||||
$(RUNTEST) ./$$test $(TEST_FLAGS) || \
|
||||
./$$test $(TEST_FLAGS) || \
|
||||
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
|
||||
break; \
|
||||
echo ""; \
|
||||
fi; \
|
||||
done; \
|
||||
test $$test = dummy || false
|
||||
@for test in $(TEST_SCRIPTS) dummy; do \
|
||||
if test $$test != dummy; then \
|
||||
echo "============================"; \
|
||||
echo "Testing $$test $(TEST_FLAGS)"; \
|
||||
echo "============================"; \
|
||||
RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
|
||||
echo ""; \
|
||||
echo "====================================="; \
|
||||
echo "C++ API: Testing $$test $(TEST_FLAGS)"; \
|
||||
echo "====================================="; \
|
||||
echo ""; \
|
||||
srcdir="$(srcdir)" \
|
||||
/bin/sh $$test $(TEST_FLAGS) || \
|
||||
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
|
||||
break; \
|
||||
echo ""; \
|
||||
fi; \
|
||||
done; \
|
||||
test $$test = dummy || false
|
||||
|
||||
@@ -40,7 +40,7 @@ $(srcdir)/Dependencies: .depend
|
||||
obj=`basename $$dep .cpp`.lo; \
|
||||
sed '\%^'"$$obj"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \
|
||||
$(TRACE) $$dep; \
|
||||
$(CC) -M -MG $(CPPFLAGS) $$dep 2>/dev/null | \
|
||||
$(CC) -MM -MG $(CPPFLAGS) $$dep 2>/dev/null | \
|
||||
sed 's% $(srcdir)/% $$(srcdir)/%g' | \
|
||||
sed 's% $(top_srcdir)/% $$(top_srcdir)/%g' | \
|
||||
sed 's% $(top_builddir)/% $$(top_builddir)/%g' | \
|
||||
|
||||
4
c++/configure
vendored
4
c++/configure
vendored
@@ -636,7 +636,7 @@ fi
|
||||
|
||||
|
||||
ac_aux_dir=
|
||||
for ac_dir in bin $srcdir/bin; do
|
||||
for ac_dir in ../bin $srcdir/../bin; do
|
||||
if test -f $ac_dir/install-sh; then
|
||||
ac_aux_dir=$ac_dir
|
||||
ac_install_sh="$ac_aux_dir/install-sh -c"
|
||||
@@ -648,7 +648,7 @@ for ac_dir in bin $srcdir/bin; do
|
||||
fi
|
||||
done
|
||||
if test -z "$ac_aux_dir"; then
|
||||
{ echo "configure: error: can not find install-sh or install.sh in bin $srcdir/bin" 1>&2; exit 1; }
|
||||
{ echo "configure: error: can not find install-sh or install.sh in ../bin $srcdir/../bin" 1>&2; exit 1; }
|
||||
fi
|
||||
ac_config_guess=$ac_aux_dir/config.guess
|
||||
ac_config_sub=$ac_aux_dir/config.sub
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Process this file with autoconf to produce configure.
|
||||
dnl
|
||||
dnl Copyright (C) 2000 National Center for Supercomputing Applications.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (C) 2000-2001 National Center for Supercomputing Applications
|
||||
dnl All rights reserved.
|
||||
dnl ----------------------------------------------------------------------
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
@@ -10,7 +10,7 @@ dnl Initialize configure.
|
||||
dnl
|
||||
AC_REVISION($Id$)
|
||||
AC_INIT(src/H5Library.cpp)
|
||||
AC_CONFIG_AUX_DIR(bin)
|
||||
AC_CONFIG_AUX_DIR(../bin)
|
||||
AC_CANONICAL_HOST
|
||||
AC_SUBST(CPPFLAGS)
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
## HDF5-C++ examples/Makefile(.in)
|
||||
##
|
||||
## Copyright (C) 2000 National Center for Supercomputing Applications.
|
||||
## All rights reserved.
|
||||
## Copyright (C) 2000-2001 National Center for Supercomputing Applications.
|
||||
## All rights reserved.
|
||||
##
|
||||
##
|
||||
top_srcdir=@top_srcdir@/..
|
||||
@@ -27,16 +27,16 @@ TEST_OBJ=$(TEST_SRC:.cpp=.lo)
|
||||
|
||||
## These are the programs that `make all' or `make tests' will build and which
|
||||
## `make check' will run. List them in the order they should be run.
|
||||
PROGS=$(TEST_SRC:.cpp=)
|
||||
TEST_PROGS=$(TEST_SRC:.cpp=)
|
||||
|
||||
TEST_SCRIPTS=$(srcdir)/testexamples.sh
|
||||
##TEST_SCRIPTS=$(srcdir)/testexamples.sh
|
||||
|
||||
## These are the files that `make clean' (and derivatives) will remove from
|
||||
## this directory.
|
||||
CLEAN=
|
||||
|
||||
## How to build the programs... they all depend on the Fortran & C hdf5 libraries
|
||||
$(PROGS): $(LIB) $(LIBHDF5)
|
||||
$(TEST_PROGS): $(LIB) $(LIBHDF5)
|
||||
|
||||
compound: compound.lo
|
||||
@$(LT_LINK_EXE) $(CXXFLAGS) -o $@ compound.lo $(LDFLAGS) $(LIB) $(LIBS) $(LIBHDF5)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -37,7 +37,8 @@ H5T_class_t AbstractDs::getTypeClass() const
|
||||
return( type_class );
|
||||
else
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("AbstractDs::getTypeClass",
|
||||
"H5Tget_class returns something different than H5T_NO_CLASS");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
// 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
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
// This header file simply serves as a container to hold the
|
||||
// header files of all datatypes. It simplifies the header
|
||||
// file including in the code.
|
||||
|
||||
@@ -29,7 +29,7 @@ void AtomType::setSize( size_t size ) const
|
||||
herr_t ret_value = H5Tset_size( id, size );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("AtomType::setSize", "H5Tset_size failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,8 @@ H5T_order_t AtomType::getOrder( string& order_string ) const
|
||||
// return a byte order constant if successful
|
||||
if( type_order == H5T_ORDER_ERROR )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("AtomType::getOrder",
|
||||
"H5Tget_order returns H5T_ORDER_ERROR");
|
||||
}
|
||||
if( type_order == H5T_ORDER_LE )
|
||||
order_string = "Little endian byte ordering (0)";
|
||||
@@ -60,7 +61,7 @@ void AtomType::setOrder( H5T_order_t order ) const
|
||||
herr_t ret_value = H5Tset_order( id, order );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("AtomType::setOrder", "H5Tset_order failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +73,8 @@ size_t AtomType::getPrecision() const
|
||||
// returns number of significant bits if successful
|
||||
if( num_signi_bits == 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("AtomType::getPrecision",
|
||||
"H5Tget_precision returns invalid number of significant bits");
|
||||
}
|
||||
return( num_signi_bits );
|
||||
}
|
||||
@@ -84,7 +86,7 @@ void AtomType::setPrecision( size_t precision ) const
|
||||
herr_t ret_value = H5Tset_precision( id, precision );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("AtomType::setPrecision", "H5Tset_precision failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +101,8 @@ int AtomType::getOffset() const
|
||||
// returns a non-negative offset value if successful
|
||||
if( offset == -1 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("AtomType::getOffset",
|
||||
"H5Tget_offset returns a negative offset value");
|
||||
}
|
||||
return( offset );
|
||||
}
|
||||
@@ -111,7 +114,7 @@ void AtomType::setOffset( size_t offset ) const
|
||||
herr_t ret_value = H5Tset_offset( id, offset );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("AtomType::setOffset", "H5Tset_offset failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +126,7 @@ void AtomType::setOffset( size_t offset ) const
|
||||
//herr_t ret_value = H5Tget_pad( id, &lsb, &msb );
|
||||
//if( ret_value < 0 )
|
||||
//{
|
||||
//throw DataTypeIException();
|
||||
//throw DataTypeIException("AtomType::getPad", "H5Tget_pad failed");
|
||||
//}
|
||||
//}
|
||||
|
||||
@@ -134,7 +137,7 @@ void AtomType::setOffset( size_t offset ) const
|
||||
//herr_t ret_value = H5Tset_pad( id, lsb, msb );
|
||||
//if( ret_value < 0 )
|
||||
//{
|
||||
//throw DataTypeIException();
|
||||
//throw DataTypeIException("AtomType::setPad", "H5Tset_pad failed");
|
||||
//}
|
||||
//}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
// 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
|
||||
|
||||
@@ -29,7 +29,7 @@ void Attribute::write( const DataType& mem_type, void *buf ) const
|
||||
herr_t ret_value = H5Awrite( id, mem_type.getId(), buf );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw AttributeIException();
|
||||
throw AttributeIException("Attribute::write", "H5Awrite failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ void Attribute::read( const DataType& mem_type, void *buf ) const
|
||||
herr_t ret_value = H5Aread( id, mem_type.getId(), buf );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw AttributeIException();
|
||||
throw AttributeIException("Attribute::read", "H5Aread failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ DataSpace Attribute::getSpace() const
|
||||
}
|
||||
else
|
||||
{
|
||||
throw AttributeIException();
|
||||
throw AttributeIException("Attribute::getSpace", "H5Aget_space failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ hid_t Attribute::p_getType() const
|
||||
return( type_id );
|
||||
else
|
||||
{
|
||||
throw AttributeIException();
|
||||
throw AttributeIException(NULL, "H5Aget_type failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ string Attribute::getName( size_t buf_size ) const
|
||||
// If H5Aget_name returns a negative value, raise an exception,
|
||||
if( name_size < 0 )
|
||||
{
|
||||
throw AttributeIException();
|
||||
throw AttributeIException("Attribute::getName", "H5Aget_name failed");
|
||||
}
|
||||
// otherwise, create the string to hold the attribute name and return it
|
||||
string name = string( name_C );
|
||||
@@ -102,7 +102,7 @@ void Attribute::p_close() const
|
||||
herr_t ret_value = H5Aclose( id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw AttributeIException();
|
||||
throw AttributeIException(NULL, "H5Aclose failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,11 @@ void Attribute::p_close() const
|
||||
Attribute::~Attribute()
|
||||
{
|
||||
// The attribute id will be closed properly
|
||||
resetIdComponent( this );
|
||||
try {
|
||||
resetIdComponent( this ); }
|
||||
catch (Exception close_error) { // thrown by p_close
|
||||
throw AttributeIException("Attribute::~Attribute", close_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#ifndef _H5Attribute_H
|
||||
#define _H5Attribute_H
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef H5Attribute_H_
|
||||
#define H5Attribute_H_
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5Classes_H
|
||||
#define _H5Classes_H
|
||||
|
||||
|
||||
@@ -55,8 +55,7 @@ Group CommonFG::createGroup( const char* name, size_t size_hint ) const
|
||||
}
|
||||
else
|
||||
{
|
||||
//throw File_GroupException();
|
||||
throwException();
|
||||
throwException("createGroup", "H5Gcreate failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,8 +78,7 @@ Group CommonFG::openGroup( const char* name ) const
|
||||
}
|
||||
else
|
||||
{
|
||||
//throw File_GroupException();
|
||||
throwException();
|
||||
throwException("openGroup", "H5Gopen failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,8 +105,7 @@ DataSet CommonFG::createDataSet( const char* name, const DataType& data_type, co
|
||||
}
|
||||
else
|
||||
{
|
||||
//throw File_GroupException();
|
||||
throwException();
|
||||
throwException("createDataSet", "H5Dcreate failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,8 +128,7 @@ DataSet CommonFG::openDataSet( const char* name ) const
|
||||
}
|
||||
else
|
||||
{
|
||||
//throw File_GroupException();
|
||||
throwException();
|
||||
throwException("openDataSet", "H5Dopen failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,8 +143,7 @@ void CommonFG::link( H5G_link_t link_type, const char* curr_name, const char* ne
|
||||
herr_t ret_value = H5Glink( getLocId(), link_type, curr_name, new_name );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
//throw File_GroupException();
|
||||
throwException();
|
||||
throwException("link", "H5Glink failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,8 +157,7 @@ void CommonFG::unlink( const char* name ) const
|
||||
herr_t ret_value = H5Gunlink( getLocId(), name );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
//throw File_GroupException();
|
||||
throwException();
|
||||
throwException("unlink", "H5Gunlink failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,8 +171,7 @@ void CommonFG::move( const char* src, const char* dst ) const
|
||||
herr_t ret_value = H5Gmove( getLocId(), src, dst );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
//throw File_GroupException();
|
||||
throwException();
|
||||
throwException("move", "H5Gmove failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,8 +185,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 )
|
||||
{
|
||||
//throw File_GroupException();
|
||||
throwException();
|
||||
throwException("getObjinfo", "H5Gget_objinfo failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,8 +201,7 @@ string CommonFG::getLinkval( const char* name, size_t size ) const
|
||||
herr_t ret_value = H5Gget_linkval( getLocId(), name, size, value_C );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
//throw File_GroupException();
|
||||
throwException();
|
||||
throwException("getLinkval", "H5Gget_linkval failed");
|
||||
}
|
||||
string value = string( value_C );
|
||||
delete value_C;
|
||||
@@ -227,8 +218,7 @@ void CommonFG::setComment( const char* name, const char* comment ) const
|
||||
herr_t ret_value = H5Gset_comment( getLocId(), name, comment );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
//throw File_GroupException();
|
||||
throwException();
|
||||
throwException("setComment", "H5Gset_comment failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,8 +237,7 @@ string CommonFG::getComment( const char* name, size_t bufsize ) const
|
||||
// if H5Gget_comment returns SUCCEED, return the string comment
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
//throw File_GroupException();
|
||||
throwException();
|
||||
throwException("getComment", "H5Gget_comment failed");
|
||||
}
|
||||
string comment = string( comment_C );
|
||||
delete comment_C;
|
||||
@@ -272,8 +261,7 @@ void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const
|
||||
// Raise exception if H5Fmount returns negative value
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
//throw File_GroupException();
|
||||
throwException();
|
||||
throwException("mount", "H5Fmount failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,8 +278,7 @@ void CommonFG::unmount( const char* name ) const
|
||||
// Raise exception if H5Funmount returns negative value
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
//throw File_GroupException();
|
||||
throwException();
|
||||
throwException("unmount", "H5Funmount failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,7 +288,7 @@ void CommonFG::unmount( const char* name ) const
|
||||
hid_t CommonFG::p_openDataType( const char* name ) const
|
||||
{
|
||||
// Call C function H5Topen to open the named datatype in this group,
|
||||
// giving the group id
|
||||
// giving either the file or group id
|
||||
hid_t datatype_id = H5Topen( getLocId(), name );
|
||||
|
||||
// If the datatype id is valid, return it, otherwise, throw an exception.
|
||||
@@ -309,8 +296,7 @@ hid_t CommonFG::p_openDataType( const char* name ) const
|
||||
return( datatype_id );
|
||||
else
|
||||
{
|
||||
//throw GroupIException();
|
||||
throwException();
|
||||
throwException("openDataType", "H5Topen failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -395,9 +381,9 @@ int CommonFG::iterateElems( const char* name, int *idx, H5G_iterate_t op , void*
|
||||
int ret_value = H5Giterate( getLocId(), name, idx, op, op_data );
|
||||
if( ret_value >= 0 )
|
||||
return( ret_value );
|
||||
else // raise exception when H5Aiterate returns a negative value
|
||||
else // raise exception when H5Giterate returns a negative value
|
||||
{
|
||||
throwException();
|
||||
throwException("iterateElems", "H5Giterate failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
// 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'.
|
||||
@@ -101,7 +102,7 @@ class CommonFG {
|
||||
StrType openStrType( const char* name ) const;
|
||||
|
||||
// for H5File and Group to throw appropriate exception
|
||||
virtual void throwException() const = 0;
|
||||
virtual void throwException(const string& func_name, const string& msg) const = 0;
|
||||
|
||||
CommonFG();
|
||||
virtual ~CommonFG();
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5DataSpace.h"
|
||||
#include "H5DataSet.h"
|
||||
#include "H5private.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -37,7 +38,7 @@ CompType::CompType( const DataSet& dataset ) : DataType()
|
||||
// If the datatype id is invalid, throw exception
|
||||
if( id <= 0 )
|
||||
{
|
||||
throw DataSetIException();
|
||||
throw DataSetIException("CompType constructor", "H5Dget_type failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +48,8 @@ int CompType::getNmembers() const
|
||||
int num_members = H5Tget_nmembers( id );
|
||||
if( num_members < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("CompType::getNmembers",
|
||||
"H5Tget_nmembers returns negative number of members");
|
||||
}
|
||||
return( num_members );
|
||||
}
|
||||
@@ -55,13 +57,15 @@ int CompType::getNmembers() const
|
||||
// Retrieves the name of a member of this compound datatype.
|
||||
string CompType::getMemberName( int member_num ) const
|
||||
{
|
||||
char* member_name_C = H5Tget_member_name( id, member_num );
|
||||
if( member_name_C == NULL ) // should this be returned also???
|
||||
{
|
||||
throw DataTypeIException();
|
||||
}
|
||||
string member_name = string( member_name_C );
|
||||
return( member_name );
|
||||
char* member_name_C = H5Tget_member_name( id, member_num );
|
||||
if( member_name_C == NULL ) // NULL means failure
|
||||
{
|
||||
throw DataTypeIException("CompType::getMemberName",
|
||||
"H5Tget_member_name returns NULL for member name");
|
||||
}
|
||||
string member_name = string(member_name_C); // convert C string to string
|
||||
HDfree(member_name_C); // free the C string
|
||||
return( member_name ); // return the member name string
|
||||
}
|
||||
|
||||
// Retrieves the offset of a member of a compound datatype.
|
||||
@@ -71,7 +75,8 @@ size_t CompType::getMemberOffset( int member_num ) const
|
||||
// Q. said: for now, 0 is not a failure
|
||||
//if( offset == 0 )
|
||||
//{
|
||||
//throw DataTypeIException();
|
||||
//throw DataTypeIException("CompType::getMemberOffset",
|
||||
//"H5Tget_member_offset failed");
|
||||
//}
|
||||
return( offset );
|
||||
}
|
||||
@@ -80,7 +85,8 @@ size_t CompType::getMemberOffset( int member_num ) const
|
||||
int CompType::getMemberDims( int member_num, size_t* dims, int* perm ) const
|
||||
{
|
||||
throw DataTypeIException( "Error: getMemberDims is no longer supported." );
|
||||
return (-1);
|
||||
return (-1); // unreachable statement; but without it, the compiler
|
||||
// will complain
|
||||
}
|
||||
|
||||
// Gets the type class of the specified member.
|
||||
@@ -90,29 +96,35 @@ H5T_class_t CompType::getMemberClass( int member_num ) const
|
||||
hid_t member_type_id = H5Tget_member_type( id, member_num );
|
||||
if( member_type_id <= 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("CompType::getMemberClass",
|
||||
"H5Tget_member_type failed");
|
||||
}
|
||||
|
||||
// then get its class
|
||||
H5T_class_t member_class = H5Tget_class( member_type_id );
|
||||
if( member_class == H5T_NO_CLASS )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("CompType::getMemberClass",
|
||||
"H5Tget_class returns H5T_NO_CLASS");
|
||||
}
|
||||
return( member_class );
|
||||
}
|
||||
|
||||
// This private member function calls the C API to get the identifier
|
||||
// of the specified member. It is used by the getMemberXxxType
|
||||
// below for the sub-types.
|
||||
// of the specified member. It provides the id to construct appropriate
|
||||
// sub-types in the functions getMemberXxxType below, where Xxx indicates
|
||||
// the sub-types.
|
||||
hid_t CompType::p_getMemberType( int member_num ) const
|
||||
{
|
||||
// get the id of the specified member first
|
||||
hid_t member_type_id = H5Tget_member_type( id, member_num );
|
||||
if( member_type_id > 0 )
|
||||
return( member_type_id );
|
||||
else
|
||||
{
|
||||
throw DataTypeIException();
|
||||
// p_getMemberType is private, use caller's function name for api
|
||||
throw DataTypeIException("CompType::getMemberDataType",
|
||||
"H5Tget_member_type failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,6 +167,7 @@ StrType CompType::getMemberStrType( int member_num ) const
|
||||
|
||||
/* old style of getMemberType - using overloads; new style above
|
||||
returns the appropriate datatypes but has different named functions.
|
||||
In the old style, a datatype must be passed into the function.
|
||||
// Returns the datatype of the specified member in this compound datatype.
|
||||
// Several overloading of getMemberType are for different datatypes
|
||||
void CompType::getMemberType( int member_num, EnumType& enumtype ) const
|
||||
@@ -197,7 +210,7 @@ void CompType::insertMember( const string name, size_t offset, const DataType& n
|
||||
herr_t ret_value = H5Tinsert( id, name_C, offset, new_member_id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("CompType::insertMember", "H5Tinsert failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +221,7 @@ void CompType::pack() const
|
||||
herr_t ret_value = H5Tpack( id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("CompType::pack", "H5Tpack failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
// Class CompType inherits from DataType and provides accesses to a compound
|
||||
// datatype.
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5CPP_H
|
||||
#define _H5CPP_H
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ DataSpace DataSet::getSpace() const
|
||||
// If the dataspace id is invalid, throw an exception
|
||||
if( dataspace_id <= 0 )
|
||||
{
|
||||
throw DataSetIException();
|
||||
throw DataSetIException("DataSet::getSpace", "H5Dget_space failed");
|
||||
}
|
||||
//create dataspace object using the existing id then return the object
|
||||
DataSpace data_space( dataspace_id );
|
||||
@@ -55,7 +55,7 @@ hid_t DataSet::p_getType() const
|
||||
return( type_id );
|
||||
else
|
||||
{
|
||||
throw DataSetIException();
|
||||
throw DataSetIException(NULL, "H5Dget_type failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ DSetCreatPropList DataSet::getCreatePlist() const
|
||||
hid_t create_plist_id = H5Dget_create_plist( id );
|
||||
if( create_plist_id <= 0 )
|
||||
{
|
||||
throw DataSetIException();
|
||||
throw DataSetIException("DataSet::getCreatePlist", "H5Dget_create_plist failed");
|
||||
}
|
||||
// create and return the DSetCreatPropList object
|
||||
DSetCreatPropList create_plist( create_plist_id );
|
||||
@@ -77,47 +77,46 @@ hsize_t DataSet::getStorageSize() const
|
||||
{
|
||||
hsize_t storage_size = H5Dget_storage_size( id );
|
||||
|
||||
if( storage_size > 0 )
|
||||
if( storage_size > 0 ) // checking with Quincey for failure value - BMR
|
||||
return( storage_size );
|
||||
else
|
||||
{
|
||||
throw DataSetIException();
|
||||
throw DataSetIException("DataSet::getStorageSize", "H5Dget_storage_size failed");
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the number of bytes required to store VL data.
|
||||
hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
|
||||
{
|
||||
//herr_t ret_value;
|
||||
// Obtain identifiers for C API
|
||||
//hid_t type_id = type.getId();
|
||||
//hid_t space_id = space.getId();
|
||||
//hsize_t size;
|
||||
|
||||
throw DataSetIException( "getVlenBufSize: Currently not implemented yet.");
|
||||
//ret_value = H5Dget_vlen_buf_size( id, type_id, space_id, &size );
|
||||
//herr_t ret_value = H5Dget_vlen_buf_size( id, type_id, space_id, &size );
|
||||
//if( ret_value >= 0 )
|
||||
// return( size );
|
||||
//else
|
||||
//{
|
||||
//throw DataSetIException();
|
||||
//}
|
||||
throw DataSetIException( "DataSet::getVlenBufSize",
|
||||
"Currently not implemented yet.");
|
||||
return (0);
|
||||
}
|
||||
|
||||
// Reclaims VL datatype memory buffers.
|
||||
void DataSet::vlenReclaim( DataType& type, DataSpace& space, DSetMemXferPropList& xfer_plist, void* buf ) const
|
||||
{
|
||||
herr_t ret_value;
|
||||
// Obtain identifiers for C API
|
||||
hid_t type_id = type.getId();
|
||||
hid_t space_id = space.getId();
|
||||
hid_t xfer_plist_id = xfer_plist.getId();
|
||||
|
||||
ret_value = H5Dvlen_reclaim( type_id, space_id, xfer_plist_id, buf );
|
||||
herr_t ret_value = H5Dvlen_reclaim( type_id, space_id, xfer_plist_id, buf );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSetIException();
|
||||
throw DataSetIException("DataSet::vlenReclaim", "H5Dvlen_reclaim failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +133,7 @@ void DataSet::read( void* buf, const DataType& mem_type, const DataSpace& mem_sp
|
||||
herr_t ret_value = H5Dread( id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSetIException();
|
||||
throw DataSetIException("DataSet::read", "H5Dread failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +151,7 @@ void DataSet::write( const void* buf, const DataType& mem_type, const DataSpace&
|
||||
herr_t ret_value = H5Dwrite( id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSetIException();
|
||||
throw DataSetIException("DataSet::write", "H5Dwrite failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +166,7 @@ int DataSet::iterateElems( void* buf, const DataType& type, const DataSpace& spa
|
||||
return( ret_value );
|
||||
else // raise exception when H5Diterate returns a negative value
|
||||
{
|
||||
throw DataSetIException();
|
||||
throw DataSetIException("DataSet::iterateElems", "H5Diterate failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +176,7 @@ void DataSet::extend( const hsize_t* size ) const
|
||||
herr_t ret_value = H5Dextend( id, size );
|
||||
if( ret_value < 0 ) // raise exception when H5Dextend returns a neg value
|
||||
{
|
||||
throw DataSetIException();
|
||||
throw DataSetIException("DataSet::extend", "H5Dextend failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,7 +187,7 @@ void DataSet::p_close() const
|
||||
herr_t ret_value = H5Dclose( id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSetIException();
|
||||
throw DataSetIException(NULL, "H5Dclose failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,7 +199,11 @@ void DataSet::p_close() const
|
||||
DataSet::~DataSet()
|
||||
{
|
||||
// The dataset id will be closed properly
|
||||
resetIdComponent( this );
|
||||
try {
|
||||
resetIdComponent( this ); }
|
||||
catch (Exception close_error) { // thrown by p_close
|
||||
throw DataSetIException("DataSet::~DataSet", close_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
// Class DataSet inherits from AbstractDs and provides accesses to a dataset.
|
||||
|
||||
#ifndef _H5DataSet_H
|
||||
|
||||
@@ -22,7 +22,7 @@ DataSpace::DataSpace( H5S_class_t type ) : IdComponent()
|
||||
id = H5Screate( type );
|
||||
if( id <= 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace constructor", "H5Screate failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ DataSpace::DataSpace( int rank, const hsize_t * dims, const hsize_t * maxdims) :
|
||||
id = H5Screate_simple( rank, dims, maxdims );
|
||||
if( id <= 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace constructor", "H5Screate_simple failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,20 +50,32 @@ void DataSpace::copy( const DataSpace& like_space )
|
||||
{
|
||||
// reset the identifier of this instance - send 'this' in so that
|
||||
// H5Sclose can be called appropriately
|
||||
resetIdComponent( this );
|
||||
try {
|
||||
resetIdComponent( this ); }
|
||||
catch (Exception close_error) { // thrown by p_close
|
||||
throw DataSpaceIException("DataSpace::copy", close_error.getDetailMsg());
|
||||
}
|
||||
|
||||
// call C routine to copy the dataspace
|
||||
id = H5Scopy( like_space.getId() );
|
||||
|
||||
// points to the same ref counter
|
||||
// new ref counter for this id
|
||||
ref_count = new RefCounter;
|
||||
|
||||
if( id <= 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::copy", "H5Scopy failed");
|
||||
}
|
||||
}
|
||||
|
||||
// Makes a copy of the dataspace on the right hand side and stores
|
||||
// the new id in the left hand side object.
|
||||
DataSpace& DataSpace::operator=( const DataSpace& rhs )
|
||||
{
|
||||
copy(rhs);
|
||||
return(*this);
|
||||
}
|
||||
|
||||
// Determines whether this dataspace is a simple dataspace.
|
||||
bool DataSpace::isSimple () const
|
||||
{
|
||||
@@ -74,7 +86,8 @@ bool DataSpace::isSimple () const
|
||||
return false;
|
||||
else
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::isSimple",
|
||||
"H5Sis_simple returns negative value");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +97,7 @@ void DataSpace::offsetSimple ( const hssize_t* offset ) const
|
||||
herr_t ret_value = H5Soffset_simple( id, offset );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::offsetSimple", "H5Soffset_simple failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +107,8 @@ int DataSpace::getSimpleExtentDims ( hsize_t *dims, hsize_t *maxdims ) const
|
||||
int ndims = H5Sget_simple_extent_dims( id, dims, maxdims );
|
||||
if( ndims < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::getSimpleExtentDims",
|
||||
"H5Sget_simple_extent_dims returns negative number of dimensions");
|
||||
}
|
||||
return( ndims );
|
||||
}
|
||||
@@ -105,7 +119,8 @@ int DataSpace::getSimpleExtentNdims () const
|
||||
int ndims = H5Sget_simple_extent_ndims( id );
|
||||
if( ndims < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::getSimpleExtentNdims",
|
||||
"H5Sget_simple_extent_ndims returns negative value for dimensionality of the dataspace");
|
||||
}
|
||||
return( ndims );
|
||||
}
|
||||
@@ -122,7 +137,8 @@ hssize_t DataSpace::getSimpleExtentNpoints () const
|
||||
return( num_elements );
|
||||
else
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::getSimpleExtentNpoints",
|
||||
"H5Sget_simple_extent_npoints returns negative value for the number of elements in the dataspace");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +148,8 @@ H5S_class_t DataSpace::getSimpleExtentType () const
|
||||
H5S_class_t class_name = H5Sget_simple_extent_type( id );
|
||||
if( class_name == H5S_NO_CLASS )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::getSimpleExtentType",
|
||||
"H5Sget_simple_extent_type returns H5S_NO_CLASS");
|
||||
}
|
||||
return( class_name );
|
||||
}
|
||||
@@ -144,7 +161,7 @@ void DataSpace::extentCopy ( DataSpace& dest_space ) const
|
||||
herr_t ret_value = H5Sextent_copy( dest_space_id, id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::extentCopy", "H5Sextent_copy failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +172,7 @@ void DataSpace::setExtentSimple( int rank, const hsize_t *current_size, const hs
|
||||
ret_value = H5Sset_extent_simple( id, rank, current_size, maximum_size );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::setExtentSimple", "H5Sset_extent_simple failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +182,7 @@ void DataSpace::setExtentNone () const
|
||||
herr_t ret_value = H5Sset_extent_none( id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::setExtentNone", "H5Sset_extent_none failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +192,8 @@ hssize_t DataSpace::getSelectNpoints () const
|
||||
hssize_t num_elements = H5Sget_select_npoints( id );
|
||||
if( num_elements < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::getSelectNpoints",
|
||||
"H5Sget_select_npoints returns negative value for number of elements in the dataspace selection");
|
||||
}
|
||||
return( num_elements );
|
||||
}
|
||||
@@ -186,7 +204,8 @@ hssize_t DataSpace::getSelectHyperNblocks () const
|
||||
hssize_t num_blocks = H5Sget_select_hyper_nblocks( id );
|
||||
if( num_blocks < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::getSelectHyperNblocks",
|
||||
"H5Sget_select_hyper_nblocks returns negative value for the number of hyperslab blocks");
|
||||
}
|
||||
return( num_blocks );
|
||||
}
|
||||
@@ -198,7 +217,8 @@ void DataSpace::getSelectHyperBlocklist( hsize_t startblock, hsize_t numblocks,
|
||||
ret_value = H5Sget_select_hyper_blocklist( id, startblock, numblocks, buf );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::getSelectHyperBlocklist",
|
||||
"H5Sget_select_hyper_blocklist failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +228,8 @@ hssize_t DataSpace::getSelectElemNpoints () const
|
||||
hssize_t num_points = H5Sget_select_elem_npoints( id );
|
||||
if( num_points < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::getSelectElemNpoints",
|
||||
"H5Sget_select_elem_npoints failed");
|
||||
}
|
||||
return( num_points );
|
||||
}
|
||||
@@ -220,7 +241,8 @@ void DataSpace::getSelectElemPointlist ( hsize_t startpoint, hsize_t numpoints,
|
||||
ret_value = H5Sget_select_elem_pointlist( id, startpoint, numpoints, buf );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::getSelectElemPointlist",
|
||||
"H5Sget_select_elem_pointlist failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,7 +252,8 @@ void DataSpace::getSelectBounds ( hsize_t* start, hsize_t* end ) const
|
||||
herr_t ret_value = H5Sget_select_bounds( id, start, end );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::getSelectBounds",
|
||||
"H5Sget_select_bounds failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,7 +264,8 @@ void DataSpace::selectElements ( H5S_seloper_t op, const size_t num_elements, co
|
||||
ret_value = H5Sselect_elements( id, op, num_elements, coord );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::selectElements",
|
||||
"H5Sselect_elements failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +275,7 @@ void DataSpace::selectAll () const
|
||||
herr_t ret_value = H5Sselect_all( id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::selectAll", "H5Sselect_all failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,7 +285,8 @@ void DataSpace::selectNone () const
|
||||
herr_t ret_value = H5Sselect_none( id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::selectNone",
|
||||
"H5Sselect_none failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,7 +300,8 @@ bool DataSpace::selectValid () const
|
||||
return false;
|
||||
else
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::selectValid",
|
||||
"H5Sselect_valid returns negative value");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,7 +312,8 @@ void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const h
|
||||
ret_value = H5Sselect_hyperslab( id, op, start, stride, count, block );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException("DataSpace::selectHyperslab",
|
||||
"H5Sselect_hyperslab failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,7 +326,7 @@ void DataSpace::p_close() const
|
||||
herr_t ret_value = H5Sclose( space_id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSpaceIException();
|
||||
throw DataSpaceIException(NULL, "H5Sclose failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -312,7 +339,11 @@ void DataSpace::p_close() const
|
||||
DataSpace::~DataSpace()
|
||||
{
|
||||
// The dataspace id will be closed properly
|
||||
resetIdComponent( this );
|
||||
try {
|
||||
resetIdComponent( this ); }
|
||||
catch (Exception close_error) { // thrown by p_close
|
||||
throw DataSpaceIException("DataSpace::~DataSpace", close_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5DataSpace_H
|
||||
#define _H5DataSpace_H
|
||||
|
||||
@@ -19,64 +20,67 @@ class DataSpace : public IdComponent {
|
||||
// Makes copy of an existing dataspace.
|
||||
void copy( const DataSpace& like_space ); // H5Scopy
|
||||
|
||||
// Assignment operator
|
||||
virtual DataSpace& operator=( const DataSpace& rhs );
|
||||
|
||||
// Determines if this dataspace is a simple one.
|
||||
bool isSimple () const;
|
||||
bool isSimple() const;
|
||||
|
||||
// Sets the offset of this simple dataspace.
|
||||
void offsetSimple ( const hssize_t* offset ) const;
|
||||
void offsetSimple( const hssize_t* offset ) const;
|
||||
|
||||
// Retrieves dataspace dimension size and maximum size.
|
||||
int getSimpleExtentDims ( hsize_t *dims, hsize_t *maxdims = NULL ) const;
|
||||
int getSimpleExtentDims( hsize_t *dims, hsize_t *maxdims = NULL ) const;
|
||||
|
||||
// Gets the dimensionality of this dataspace.
|
||||
int getSimpleExtentNdims () const;
|
||||
int getSimpleExtentNdims() const;
|
||||
|
||||
// Gets the number of elements in this dataspace.
|
||||
// 12/05/00 - changed return type to hssize_t from hsize_t - C API
|
||||
hssize_t getSimpleExtentNpoints () const;
|
||||
hssize_t getSimpleExtentNpoints() const;
|
||||
|
||||
// Gets the current class of this dataspace.
|
||||
H5S_class_t getSimpleExtentType () const;
|
||||
H5S_class_t getSimpleExtentType() const;
|
||||
|
||||
// Copies the extent of this dataspace.
|
||||
void extentCopy ( DataSpace& dest_space ) const;
|
||||
void extentCopy( DataSpace& dest_space ) const;
|
||||
|
||||
// Sets or resets the size of this dataspace.
|
||||
void setExtentSimple( int rank, const hsize_t *current_size, const hsize_t *maximum_size = NULL ) const;
|
||||
|
||||
// Removes the extent from this dataspace.
|
||||
void setExtentNone () const;
|
||||
void setExtentNone() const;
|
||||
|
||||
// Gets the number of elements in this dataspace selection.
|
||||
hssize_t getSelectNpoints () const;
|
||||
hssize_t getSelectNpoints() const;
|
||||
|
||||
// Get number of hyperslab blocks.
|
||||
hssize_t getSelectHyperNblocks () const;
|
||||
hssize_t getSelectHyperNblocks() const;
|
||||
|
||||
// Gets the list of hyperslab blocks currently selected.
|
||||
void getSelectHyperBlocklist( hsize_t startblock, hsize_t numblocks, hsize_t *buf ) const;
|
||||
|
||||
// Gets the number of element points in the current selection.
|
||||
hssize_t getSelectElemNpoints () const;
|
||||
hssize_t getSelectElemNpoints() const;
|
||||
|
||||
// Retrieves the list of element points currently selected.
|
||||
void getSelectElemPointlist ( hsize_t startpoint, hsize_t numpoints, hsize_t *buf ) const;
|
||||
void getSelectElemPointlist( hsize_t startpoint, hsize_t numpoints, hsize_t *buf ) const;
|
||||
|
||||
// Gets the bounding box containing the current selection.
|
||||
void getSelectBounds ( hsize_t* start, hsize_t* end ) const;
|
||||
void getSelectBounds( hsize_t* start, hsize_t* end ) const;
|
||||
|
||||
// Selects array elements to be included in the selection for
|
||||
// this dataspace.
|
||||
void selectElements ( H5S_seloper_t op, const size_t num_elements, const hssize_t *coord[ ] ) const;
|
||||
void selectElements( H5S_seloper_t op, const size_t num_elements, const hssize_t *coord[ ] ) const;
|
||||
|
||||
// Selects the entire dataspace.
|
||||
void selectAll () const;
|
||||
void selectAll() const;
|
||||
|
||||
// Resets the selection region to include no elements.
|
||||
void selectNone () const;
|
||||
void selectNone() const;
|
||||
|
||||
// Verifies that the selection is within the extent of the dataspace.
|
||||
bool selectValid () const;
|
||||
bool selectValid() const;
|
||||
|
||||
// Selects a hyperslab region to add to the current selected region.
|
||||
void selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hssize_t *start, const hsize_t *stride = NULL, const hsize_t *block = NULL ) const;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "H5DataType.h"
|
||||
#include "H5AtomType.h"
|
||||
#include "H5PredType.h"
|
||||
#include "H5private.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -29,7 +30,7 @@ DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object(), is
|
||||
id = H5Tcreate( type_class, size );
|
||||
if( id <= 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType constructor", "H5Tcreate failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,28 +50,41 @@ void DataType::copy( const DataType& like_type )
|
||||
{
|
||||
// reset the identifier of this instance, H5Tclose will be called
|
||||
// if needed
|
||||
resetIdComponent( this );
|
||||
try {
|
||||
resetIdComponent( this ); }
|
||||
catch (Exception close_error) { // thrown by p_close
|
||||
throw DataTypeIException("DataType::copy", close_error.getDetailMsg());
|
||||
}
|
||||
|
||||
// call C routine to copy the datatype
|
||||
id = H5Tcopy( like_type.getId() );
|
||||
|
||||
// new reference counter for this id
|
||||
ref_count = new RefCounter;
|
||||
|
||||
/*
|
||||
id != like_type.id so this object has a different ref_count than
|
||||
like_type
|
||||
ref_count = like_type.ref_count;
|
||||
|
||||
// increment ref counter to indicate additional references to this id
|
||||
ref_count->increment();
|
||||
*/
|
||||
|
||||
if( id <= 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::copy", "H5Tcopy failed");
|
||||
}
|
||||
}
|
||||
|
||||
// Determines whether two datatypes are the same. ???
|
||||
// Makes a copy of the type on the right hand side and stores the new
|
||||
// id in the left hand side object.
|
||||
DataType& DataType::operator=( const DataType& rhs )
|
||||
{
|
||||
copy(rhs);
|
||||
return(*this);
|
||||
}
|
||||
|
||||
// Makes a copy of the predefined type and stores the new
|
||||
// id in the left hand side object.
|
||||
DataType& DataType::operator=( const PredType& rhs )
|
||||
{
|
||||
copy(rhs);
|
||||
return(*this);
|
||||
}
|
||||
|
||||
// Determines whether two datatypes refer to the same actual datatype.
|
||||
bool DataType::operator==(const DataType& compared_type ) const
|
||||
{
|
||||
// Call C routine H5Tequal to determines whether two datatype
|
||||
@@ -82,18 +96,20 @@ bool DataType::operator==(const DataType& compared_type ) const
|
||||
return false;
|
||||
else
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::operator==",
|
||||
"H5Tequal returns negative value");
|
||||
}
|
||||
}
|
||||
|
||||
// Operates a user's function on each attribute of an object - commented
|
||||
// out because it should use the one from H5Object; need to check
|
||||
// the parameter list???
|
||||
// the parameter list??? - work in progress
|
||||
//int DataType::iterate( unsigned * idx, H5A_operator_t op, void *op_data )
|
||||
//{
|
||||
//}
|
||||
|
||||
// Creates a new variable-length datatype - Note: make it inheritance???
|
||||
// work in progress
|
||||
//DataType DataType::vlenCreate( const DataType& base_type )
|
||||
//{
|
||||
//}
|
||||
@@ -111,7 +127,7 @@ void DataType::commit( H5Object& loc, const char* name ) const
|
||||
herr_t ret_value = H5Tcommit( loc_id, name, id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::commit", "H5Tcommit failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +142,7 @@ bool DataType::committed() const
|
||||
return false;
|
||||
else
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::committed", "H5Tcommitted return negative value");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +153,7 @@ H5T_conv_t DataType::find( const DataType& dest, H5T_cdata_t **pcdata ) const
|
||||
H5T_conv_t func = H5Tfind( id, dest.getId(), pcdata );
|
||||
if( func == NULL )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::find", "H5Tfind returns a NULL function");
|
||||
}
|
||||
return( func );
|
||||
}
|
||||
@@ -154,7 +170,7 @@ void DataType::convert( const DataType& dest, size_t nelmts, void *buf, void *ba
|
||||
ret_value = H5Tconvert( id, dest_id, nelmts, buf, background, plist_id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::convert", "H5Tconvert failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +181,7 @@ void DataType::setOverflow( H5T_overflow_t func ) const
|
||||
herr_t ret_value = H5Tset_overflow( func );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::setOverflow", "H5Tset_overflow failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +199,7 @@ void DataType::lock() const
|
||||
herr_t ret_value = H5Tlock( id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::lock", "H5Tlock failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +211,8 @@ H5T_class_t DataType::getClass() const
|
||||
// Return datatype class identifier if successful
|
||||
if( type_class == H5T_NO_CLASS )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::getClass",
|
||||
"H5Tget_class returns H5T_NO_CLASS");
|
||||
}
|
||||
return( type_class );
|
||||
}
|
||||
@@ -205,9 +222,10 @@ size_t DataType::getSize() const
|
||||
{
|
||||
// Call C routine to get the datatype size
|
||||
size_t type_size = H5Tget_size( id );
|
||||
if( type_size <= 0 ) // Is 0 valid value ???
|
||||
if( type_size <= 0 ) // valid data types are never zero size
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::getSize",
|
||||
"H5Tget_size returns invalid datatype size");
|
||||
}
|
||||
return( type_size );
|
||||
}
|
||||
@@ -229,7 +247,7 @@ DataType DataType::getSuper() const
|
||||
}
|
||||
else
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::getSuper", "H5Tget_super failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,7 +264,7 @@ void DataType::registerFunc( H5T_pers_t pers, const char* name, const DataType&
|
||||
herr_t ret_value = H5Tregister( pers, name, id, dest_id, func );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::registerFunc", "H5Tregister failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,7 +281,7 @@ void DataType::unregister( H5T_pers_t pers, const char* name, const DataType& de
|
||||
herr_t ret_value = H5Tunregister( pers, name, id, dest_id, func );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::unregister", "H5Tunregister failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,7 +296,7 @@ void DataType::setTag( const char* tag ) const
|
||||
herr_t ret_value = H5Tset_tag( id, tag );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::setTag", "H5Tset_tag failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,12 +309,14 @@ string DataType::getTag() const
|
||||
// and return it, otherwise, raise an exception
|
||||
if( tag_Cstr != NULL )
|
||||
{
|
||||
string tag = string( tag_Cstr );
|
||||
return( tag );
|
||||
string tag = string(tag_Cstr); // convert C string to string object
|
||||
HDfree(tag_Cstr); // free the C string
|
||||
return (tag); // return the tag
|
||||
}
|
||||
else
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("DataType::getTag",
|
||||
"H5Tget_tag returns NULL for tag");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,7 +330,7 @@ void DataType::p_close() const
|
||||
herr_t ret_value = H5Tclose( id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException(NULL, "H5Tclose failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -323,7 +343,11 @@ void DataType::p_close() const
|
||||
DataType::~DataType()
|
||||
{
|
||||
// The datatype id will be closed properly
|
||||
resetIdComponent( this );
|
||||
try {
|
||||
resetIdComponent( this ); }
|
||||
catch (Exception close_error) { // thrown by p_close
|
||||
throw DataTypeIException("DataType::~DataType", close_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5DataType_H
|
||||
#define _H5DataType_H
|
||||
|
||||
@@ -13,10 +14,6 @@ class DataType : public H5Object {
|
||||
// Copy constructor: makes a copy of the original object
|
||||
DataType( const DataType& original );
|
||||
|
||||
// Creates a new variable-length datatype - not implemented yet
|
||||
// Will be moved into a subclass when completed
|
||||
//DataType vlenCreate( const DataType& base_type );
|
||||
|
||||
// Copies an existing datatype to this datatype object
|
||||
void copy( const DataType& like_type );
|
||||
|
||||
@@ -45,7 +42,13 @@ class DataType : public H5Object {
|
||||
// Returns a pointer to the current global overflow function.
|
||||
H5T_overflow_t getOverflow(void) const;
|
||||
|
||||
// Determines whether two datatypes are the same. ???
|
||||
// Assignment operator that takes a predefined type
|
||||
virtual DataType& operator=( const PredType& rhs );
|
||||
|
||||
// Assignment operator
|
||||
virtual DataType& operator=( const DataType& rhs );
|
||||
|
||||
// Determines whether two datatypes are the same.
|
||||
bool operator==(const DataType& compared_type ) const;
|
||||
|
||||
// Locks a datatype.
|
||||
@@ -73,6 +76,10 @@ class DataType : public H5Object {
|
||||
// Gets the tag associated with an opaque datatype.
|
||||
string getTag() const;
|
||||
|
||||
// Creates a new variable-length datatype - not implemented yet
|
||||
// Will be moved into a subclass when completed
|
||||
//DataType vlenCreate( const DataType& base_type );
|
||||
|
||||
// Used by the API to appropriately close a datatype
|
||||
void p_close() const;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ void DSetCreatPropList::setChunk( int ndims, const hsize_t* dim ) const
|
||||
herr_t ret_value = H5Pset_chunk( id, ndims, dim );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetCreatPropList::setChunk", "H5Pset_chunk failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,8 @@ H5D_layout_t DSetCreatPropList::getLayout() const
|
||||
H5D_layout_t layout = H5Pget_layout( id );
|
||||
if( layout == H5D_LAYOUT_ERROR )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetCreatPropList::getLayout",
|
||||
"H5Pget_layout returns H5D_LAYOUT_ERROR");
|
||||
}
|
||||
return( layout );
|
||||
}
|
||||
@@ -46,7 +47,8 @@ int DSetCreatPropList::getChunk( int max_ndims, hsize_t* dim ) const
|
||||
int chunk_size = H5Pget_chunk( id, max_ndims, dim );
|
||||
if( chunk_size < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetCreatPropList::getChunk",
|
||||
"H5Pget_chunk returns negative chunk size");
|
||||
}
|
||||
return( chunk_size );
|
||||
}
|
||||
@@ -57,7 +59,8 @@ void DSetCreatPropList::setLayout(hid_t plist, H5D_layout_t layout ) const
|
||||
herr_t ret_value = H5Pset_layout( id, layout );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetCreatPropList::setLayout",
|
||||
"H5Pset_layout failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +70,8 @@ void DSetCreatPropList::setDeflate( int level ) const
|
||||
herr_t ret_value = H5Pset_deflate( id, level );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetCreatPropList::setDeflate",
|
||||
"H5Pset_deflate failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +81,8 @@ void DSetCreatPropList::setFillValue( DataType& fvalue_type, const void* value )
|
||||
herr_t ret_value = H5Pset_fill_value( id, fvalue_type.getId(), value );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetCreatPropList::setFillValue",
|
||||
"H5Pset_fill_value failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +92,8 @@ void DSetCreatPropList::getFillValue( DataType& fvalue_type, void* value ) const
|
||||
herr_t ret_value = H5Pget_fill_value( id, fvalue_type.getId(), value );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetCreatPropList::getFillValue",
|
||||
"H5Pget_fill_value failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +103,8 @@ void DSetCreatPropList::setFilter( H5Z_filter_t filter, unsigned int flags, size
|
||||
herr_t ret_value = H5Pset_filter( id, filter, flags, cd_nelmts, cd_values );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetCreatPropList::setFilter",
|
||||
"H5Pset_filter failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +114,8 @@ int DSetCreatPropList::getNfilters() const
|
||||
int num_filters = H5Pget_nfilters( id );
|
||||
if( num_filters < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetCreatPropList::getNfilters",
|
||||
"H5Pget_nfilters returned negative number of filters");
|
||||
}
|
||||
else
|
||||
return( num_filters );
|
||||
@@ -117,10 +125,12 @@ int DSetCreatPropList::getNfilters() const
|
||||
H5Z_filter_t DSetCreatPropList::getFilter( int filter_number, unsigned int& flags, size_t& cd_nelmts, unsigned int* cd_values, size_t namelen, char name[] ) const
|
||||
{
|
||||
H5Z_filter_t filter;
|
||||
filter = H5Pget_filter( id, filter_number, &flags, &cd_nelmts, cd_values, namelen, name );
|
||||
filter = H5Pget_filter( id, filter_number, &flags, &cd_nelmts,
|
||||
cd_values, namelen, name );
|
||||
if( filter == H5Z_FILTER_ERROR )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetCreatPropList::getFilter",
|
||||
"H5Pget_filter returned H5Z_FILTER_ERROR");
|
||||
}
|
||||
else
|
||||
return( filter );
|
||||
@@ -132,7 +142,8 @@ void DSetCreatPropList::setExternal( const char* name, off_t offset, hsize_t siz
|
||||
herr_t ret_value = H5Pset_external( id, name, offset, size );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetCreatPropList::setExternal",
|
||||
"H5Pset_external failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +153,8 @@ int DSetCreatPropList::getExternalCount() const
|
||||
int num_ext_files = H5Pget_external_count( id );
|
||||
if( num_ext_files < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetCreatPropList::getExternalCount",
|
||||
"H5Pget_external_count returns negative number of external files");
|
||||
}
|
||||
else
|
||||
return( num_ext_files );
|
||||
@@ -154,7 +166,8 @@ void DSetCreatPropList::getExternal( int idx, size_t name_size, char* name, off_
|
||||
herr_t ret_value = H5Pget_external( id, idx, name_size, name, &offset, &size );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetCreatPropList::getExternal",
|
||||
"H5Pget_external failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5DSCreatPropList_H
|
||||
#define _H5DSCreatPropList_H
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ void DSetMemXferPropList::setBuffer( size_t size, void* tconv, void* bkg ) const
|
||||
herr_t ret_value = H5Pset_buffer( id, size, tconv, bkg );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetMemXferPropList::setBuffer",
|
||||
"H5Pset_buffer failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +36,8 @@ size_t DSetMemXferPropList::getBuffer( void** tconv, void** bkg ) const
|
||||
size_t buffer_size = H5Pget_buffer( id, tconv, bkg );
|
||||
if( buffer_size == 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetMemXferPropList::getBuffer",
|
||||
"H5Pget_buffer returned 0 for buffer size - failure");
|
||||
}
|
||||
return( buffer_size );
|
||||
}
|
||||
@@ -46,7 +48,8 @@ void DSetMemXferPropList::setPreserve( bool status ) const
|
||||
herr_t ret_value = H5Pset_preserve( id, (hbool_t) status );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetMemXferPropList::setPreserve",
|
||||
"H5Pset_preserve failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +63,8 @@ bool DSetMemXferPropList::getPreserve() const
|
||||
return false;
|
||||
else
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetMemXferPropList::getPreserve",
|
||||
"H5Pget_preserve returned negative value for status");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +74,8 @@ void DSetMemXferPropList::setHyperCache( bool cache, unsigned limit ) const
|
||||
herr_t ret_value = H5Pset_hyper_cache( id, cache, limit );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetMemXferPropList::setHyperCache",
|
||||
"H5Pset_hyper_cache failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +86,8 @@ void DSetMemXferPropList::getHyperCache( bool& cache, unsigned& limit ) const
|
||||
herr_t ret_value = H5Pget_hyper_cache( id, &temp_cache, &limit );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetMemXferPropList::getHyperCache",
|
||||
"H5Pget_hyper_cache failed");
|
||||
}
|
||||
if( temp_cache > 0 )
|
||||
cache = true;
|
||||
@@ -95,7 +101,8 @@ void DSetMemXferPropList::setBtreeRatios( double left, double middle, double rig
|
||||
herr_t ret_value = H5Pset_btree_ratios( id, left, middle, right );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetMemXferPropList::setBtreeRatios",
|
||||
"H5Pset_btree_ratios failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +112,8 @@ void DSetMemXferPropList::getBtreeRatios( double& left, double& middle, double&
|
||||
herr_t ret_value = H5Pget_btree_ratios( id, &left, &middle, &right );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetMemXferPropList::getBtreeRatios",
|
||||
"H5Pget_btree_ratios failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +124,8 @@ void DSetMemXferPropList::setVlenMemManager( H5MM_allocate_t alloc_func, void* a
|
||||
free_func, free_info );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetMemXferPropList::setVlenMemManager",
|
||||
"H5Pset_vlen_mem_manager failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +137,8 @@ void DSetMemXferPropList::setVlenMemManager() const
|
||||
//herr_t ret_value = H5Pset_vlen_mem_manager( id, NULL, NULL, NULL, NULL );
|
||||
//if( ret_value < 0 )
|
||||
//{
|
||||
//throw PropListIException();
|
||||
//throw PropListIException("DSetMemXferPropList::setVlenMemManager",
|
||||
//"H5Pset_vlen_mem_manager failed");
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -138,7 +148,8 @@ void DSetMemXferPropList::getVlenMemManager( H5MM_allocate_t& alloc_func, void**
|
||||
herr_t ret_value = H5Pget_vlen_mem_manager( id, &alloc_func, alloc_info, &free_func, free_info );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetMemXferPropList::getVlenMemManager",
|
||||
"H5Pget_vlen_mem_manager failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +160,8 @@ void DSetMemXferPropList::setXfer( H5D_transfer_t data_xfer_mode = H5D_XFER_INDE
|
||||
herr_t ret_value = H5Pset_xfer( ... );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetMemXferPropList::setXfer",
|
||||
"H5Pset_xfer failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,10 +170,12 @@ void DSetMemXferPropList::setXfer( H5D_transfer_t data_xfer_mode = H5D_XFER_INDE
|
||||
H5D_transfer_t DSetMemXferPropList::getXfer() const
|
||||
{
|
||||
H5D_transfer_t xfer = H5Pget_xfer( id );
|
||||
// remove when done - find out what the value is for ??
|
||||
// BMR - need to find out what the value is for ?? when this function
|
||||
// is supported
|
||||
if( xfer == ?? )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("DSetMemXferPropList::getXfer",
|
||||
"H5Pget_xfer failed");
|
||||
}
|
||||
return( xfer );
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5DSetMemXferPropList_H
|
||||
#define _H5DSetMemXferPropList_H
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ EnumType::EnumType( const DataSet& dataset ) : DataType()
|
||||
// If the datatype id is not valid, throw an exception
|
||||
if( id <= 0 )
|
||||
{
|
||||
throw DataSetIException("Getting datatype fails...");
|
||||
throw DataSetIException("EnumType constructor", "H5Dget_type failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ EnumType::EnumType( const IntType& data_type ) : DataType()
|
||||
// If the datatype id is not valid, throw an exception
|
||||
if( id <= 0 )
|
||||
{
|
||||
throw DataSetIException("Creating enumeration datatype fails...");
|
||||
throw DataSetIException("EnumType constructor", "H5Tenum_create failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ void EnumType::insert( const char* name, void *value ) const
|
||||
herr_t ret_value = H5Tenum_insert( id, name, value );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("EnumType::insert", "H5Tenum_insert failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ string EnumType::nameOf( void *value, size_t size ) const
|
||||
// If H5Tenum_nameof returns a negative value, raise an exception,
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("EnumType::nameOf", "H5Tenum_nameof failed");
|
||||
}
|
||||
// otherwise, create the string to hold the datatype name and return it
|
||||
string name = string( name_C );
|
||||
@@ -104,7 +104,7 @@ void EnumType::valueOf( const char* name, void *value ) const
|
||||
herr_t ret_value = H5Tenum_valueof( id, name, value );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("EnumType::valueOf", "H5Tenum_valueof failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ void EnumType::getMemberValue( int memb_no, void *value ) const
|
||||
hid_t ret_value = H5Tget_member_value( id, memb_no, value );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("EnumType::getMemberValue", "H5Tget_member_value failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5EnumType_H
|
||||
#define _H5EnumType_H
|
||||
|
||||
|
||||
@@ -6,33 +6,44 @@
|
||||
|
||||
#include "H5Include.h"
|
||||
#include <string>
|
||||
|
||||
// Added this line for CC to work at this time. Will remove it when
|
||||
// the problem is fixed. BMR - 10/30/00
|
||||
|
||||
#include "H5Exception.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
Exception::Exception() : detailMessage("") {}
|
||||
// Default constructor
|
||||
Exception::Exception() : detailMessage(""), funcName("") {}
|
||||
|
||||
// Constructor taking only a detailed message as string object
|
||||
//Exception::Exception(const string& message) : detailMessage(message) {}
|
||||
|
||||
// Constructor taking a function name and a detailed message as string objects
|
||||
Exception::Exception(const string& func_name, const string& message) : detailMessage(message), funcName(func_name) {}
|
||||
|
||||
// Constructor taking a detailed message as character string
|
||||
// digital alpha (gondolin) produces compilation error at static_cast<string>
|
||||
// so I replaced this constructor by the one below it
|
||||
//Exception::Exception( const char* message) : detailMessage(static_cast<string>(message)) {}
|
||||
//Exception::Exception(const char* message)
|
||||
//{
|
||||
//detailMessage = string(message);
|
||||
//}
|
||||
|
||||
Exception::Exception( const char* message)
|
||||
// Constructor taking a function name and a detailed message as character
|
||||
// strings
|
||||
Exception::Exception(const char* func_name, const char* message)
|
||||
{
|
||||
detailMessage = string( message );
|
||||
detailMessage = string(message);
|
||||
if (func_name != NULL)
|
||||
funcName = string(func_name);
|
||||
}
|
||||
|
||||
Exception::Exception( const string& message ) : detailMessage( message ) {}
|
||||
|
||||
// copy constructor
|
||||
Exception::Exception( const Exception& orig )
|
||||
{
|
||||
detailMessage = orig.detailMessage;
|
||||
funcName = orig.funcName;
|
||||
}
|
||||
|
||||
// Returns the character string that describes an error specified by
|
||||
@@ -56,13 +67,13 @@ string Exception::getMinorString( H5E_minor_t minor_num ) const
|
||||
}
|
||||
|
||||
// Turns on the automatic error printing.
|
||||
void Exception::setAutoPrint( H5E_auto_t func, void* client_data ) const
|
||||
void Exception::setAutoPrint( H5E_auto_t func, void* client_data )
|
||||
{
|
||||
// calls the C API routine H5Eset_auto to set the auto printing to
|
||||
// the specified function.
|
||||
herr_t ret_value = H5Eset_auto( func, client_data );
|
||||
if( ret_value < 0 )
|
||||
throw Exception( "setAutoPrint: H5Eset_auto fails" );
|
||||
throw Exception( "Exception::setAutoPrint", "H5Eset_auto failed" );
|
||||
}
|
||||
|
||||
// Turns off the automatic error printing.
|
||||
@@ -72,52 +83,67 @@ void Exception::dontPrint()
|
||||
// off the automatic error printing.
|
||||
herr_t ret_value = H5Eset_auto( NULL, NULL );
|
||||
if( ret_value < 0 )
|
||||
throw Exception( "dontPrint: H5Eset_auto fails" );
|
||||
throw Exception( "Exception::dontPrint", "H5Eset_auto failed" );
|
||||
}
|
||||
|
||||
// Retrieves the current settings for the automatic error stack traversal
|
||||
// function and its data.
|
||||
void Exception::getAutoPrint( H5E_auto_t& func, void** client_data ) const
|
||||
void Exception::getAutoPrint( H5E_auto_t& func, void** client_data )
|
||||
{
|
||||
// calls the C API routine H5Eget_auto to get the current setting of
|
||||
// the automatic error printing
|
||||
herr_t ret_value = H5Eget_auto( &func, client_data );
|
||||
if( ret_value < 0 )
|
||||
throw Exception( "getAutoPrint: H5Eget_auto fails" );
|
||||
throw Exception( "Exception::getAutoPrint", "H5Eget_auto failed" );
|
||||
}
|
||||
|
||||
// Clears the error stack for the current thread.
|
||||
void Exception::clearErrorStack() const
|
||||
void Exception::clearErrorStack()
|
||||
{
|
||||
// calls the C API routine H5Eclear to clear the error stack
|
||||
herr_t ret_value = H5Eclear();
|
||||
if( ret_value < 0 )
|
||||
throw Exception( "clearErrorStack: H5Eclear fails" );
|
||||
throw Exception( "Exception::clearErrorStack", "H5Eclear failed" );
|
||||
}
|
||||
|
||||
// Walks the error stack for the current thread, calling the specified function.
|
||||
void Exception::walkErrorStack( H5E_direction_t direction, H5E_walk_t func, void* client_data ) const
|
||||
void Exception::walkErrorStack( H5E_direction_t direction, H5E_walk_t func, void* client_data )
|
||||
{
|
||||
// calls the C API routine H5Ewalk to walk the error stack
|
||||
herr_t ret_value = H5Ewalk( direction, func, client_data );
|
||||
if( ret_value < 0 )
|
||||
throw Exception( "walkErrorStack: H5Ewalk fails" );
|
||||
throw Exception( "Exception::walkErrorStack", "H5Ewalk failed" );
|
||||
}
|
||||
|
||||
// Default error stack traversal callback function that prints error
|
||||
// messages to the specified output stream.
|
||||
void Exception::walkDefErrorStack( int n, H5E_error_t& err_desc, void* client_data ) const
|
||||
void Exception::walkDefErrorStack( int n, H5E_error_t& err_desc, void* client_data )
|
||||
{
|
||||
// calls the C API routine H5Ewalk_cb to walk the error stack
|
||||
herr_t ret_value = H5Ewalk_cb( n, &err_desc, client_data );
|
||||
if( ret_value < 0 )
|
||||
throw Exception( "walkDefErrorStack: H5Ewalk_cb fails" );
|
||||
throw Exception( "Exception::walkDefErrorStack", "H5Ewalk_cb failed" );
|
||||
}
|
||||
|
||||
// Returns the detailed message set at the time the exception is thrown
|
||||
string Exception::getDetailMesg() const
|
||||
string Exception::getDetailMsg() const
|
||||
{
|
||||
return( detailMessage );
|
||||
return(detailMessage);
|
||||
}
|
||||
|
||||
const char* Exception::getCDetailMsg() const
|
||||
{
|
||||
return(detailMessage.c_str());
|
||||
}
|
||||
|
||||
// Returns the function name where the exception is thrown
|
||||
string Exception::getFuncName() const
|
||||
{
|
||||
return(funcName);
|
||||
}
|
||||
const char* Exception::getCFuncName() const
|
||||
{
|
||||
return(funcName.c_str());
|
||||
}
|
||||
|
||||
// Prints the error stack in a default manner.
|
||||
@@ -125,54 +151,59 @@ void Exception::printError( FILE* stream ) const
|
||||
{
|
||||
herr_t ret_value = H5Eprint( NULL ); // print to stderr
|
||||
if( ret_value < 0 )
|
||||
throw Exception( "printError: H5Eprint fails" );
|
||||
throw Exception( "Exception::printError", "H5Eprint failed" );
|
||||
}
|
||||
|
||||
Exception::~Exception()
|
||||
{
|
||||
herr_t ret_value = H5Eprint( NULL ); // print to stderr
|
||||
if( ret_value < 0 )
|
||||
throw Exception( "printError: H5Eprint fails" );
|
||||
}
|
||||
Exception::~Exception() {}
|
||||
|
||||
FileIException::FileIException():Exception(){}
|
||||
FileIException::FileIException( string message ): Exception( message ){}
|
||||
FileIException::FileIException(const string& func_name, const string& message) : Exception(func_name, message) {}
|
||||
FileIException::FileIException(const char* func_name, const char* message) : Exception(func_name, message) {}
|
||||
FileIException::~FileIException() {}
|
||||
|
||||
GroupIException::GroupIException():Exception(){}
|
||||
GroupIException::GroupIException( string message ): Exception( message ){}
|
||||
GroupIException::GroupIException(const string& func_name, const string& message) : Exception(func_name, message) {}
|
||||
GroupIException::GroupIException(const char* func_name, const char* message) : Exception(func_name, message) {}
|
||||
GroupIException::~GroupIException() {}
|
||||
|
||||
DataSpaceIException::DataSpaceIException():Exception(){}
|
||||
DataSpaceIException::DataSpaceIException( string message ): Exception( message ) {}
|
||||
DataSpaceIException::DataSpaceIException(const string& func_name, const string& message) : Exception(func_name, message) {}
|
||||
DataSpaceIException::DataSpaceIException(const char* func_name, const char* message) : Exception(func_name, message) {}
|
||||
DataSpaceIException::~DataSpaceIException() {}
|
||||
|
||||
DataTypeIException::DataTypeIException():Exception(){}
|
||||
DataTypeIException::DataTypeIException( string message ): Exception( message ) {}
|
||||
DataTypeIException::DataTypeIException(const string& func_name, const string& message) : Exception(func_name, message) {}
|
||||
DataTypeIException::DataTypeIException(const char* func_name, const char* message) : Exception(func_name, message) {}
|
||||
DataTypeIException::~DataTypeIException() {}
|
||||
|
||||
PropListIException::PropListIException():Exception(){}
|
||||
PropListIException::PropListIException( string message ): Exception( message ) {}
|
||||
PropListIException::PropListIException(const string& func_name, const string& message) : Exception(func_name, message) {}
|
||||
PropListIException::PropListIException(const char* func_name, const char* message) : Exception(func_name, message) {}
|
||||
PropListIException::~PropListIException() {}
|
||||
|
||||
DataSetIException::DataSetIException():Exception(){}
|
||||
DataSetIException::DataSetIException( string message ): Exception( message ) {}
|
||||
DataSetIException::DataSetIException(const string& func_name, const string& message) : Exception(func_name, message) {}
|
||||
DataSetIException::DataSetIException(const char* func_name, const char* message) : Exception(func_name, message) {}
|
||||
DataSetIException::~DataSetIException() {}
|
||||
|
||||
AttributeIException::AttributeIException():Exception(){}
|
||||
AttributeIException::AttributeIException( string message ): Exception( message ) {}
|
||||
AttributeIException::AttributeIException(const string& func_name, const string& message) : Exception(func_name, message) {}
|
||||
AttributeIException::AttributeIException(const char* func_name, const char* message) : Exception(func_name, message) {}
|
||||
AttributeIException::~AttributeIException() {}
|
||||
|
||||
ReferenceException::ReferenceException():Exception(){}
|
||||
ReferenceException::ReferenceException( string message ): Exception( message ) {}
|
||||
ReferenceException::ReferenceException(const string& func_name, const string& message) : Exception(func_name, message) {}
|
||||
ReferenceException::ReferenceException(const char* func_name, const char* message) : Exception(func_name, message) {}
|
||||
ReferenceException::~ReferenceException() {}
|
||||
|
||||
LibraryIException::LibraryIException():Exception(){}
|
||||
LibraryIException::LibraryIException( string message ): Exception( message ) {}
|
||||
LibraryIException::LibraryIException(const string& func_name, const string& message) : Exception(func_name, message) {}
|
||||
LibraryIException::LibraryIException(const char* func_name, const char* message) : Exception(func_name, message) {}
|
||||
LibraryIException::~LibraryIException() {}
|
||||
|
||||
IdComponentException::IdComponentException(): Exception() {}
|
||||
IdComponentException::IdComponentException( string message ): Exception( message ) {}
|
||||
IdComponentException::IdComponentException(const string& func_name, const string& message) : Exception(func_name, message) {}
|
||||
IdComponentException::IdComponentException(const char* func_name, const char* message) : Exception(func_name, message) {}
|
||||
IdComponentException::~IdComponentException() {}
|
||||
|
||||
// The following are from Java API but not done here:
|
||||
|
||||
@@ -10,16 +10,16 @@ using namespace std;
|
||||
|
||||
class Exception {
|
||||
public:
|
||||
// Creates an exception with no message
|
||||
// Default constructor
|
||||
Exception();
|
||||
|
||||
// Creates an exception with a detailed message
|
||||
Exception( const string& message );
|
||||
|
||||
Exception( const char* message);
|
||||
// Creates an exception with a function name where the failure occurs
|
||||
// and an optional detailed message
|
||||
Exception( const string& func_name, const string& message = NULL);
|
||||
Exception( const char* func_name, const char* message = NULL);
|
||||
|
||||
// copy constructor
|
||||
Exception( const Exception& orig );
|
||||
Exception( const Exception& orig);
|
||||
|
||||
// Returns the character string that describes an error specified by
|
||||
// a major error number.
|
||||
@@ -30,35 +30,35 @@ class Exception {
|
||||
string getMinorString( H5E_minor_t minor_num ) const;
|
||||
|
||||
// Returns the detailed message set at the time the exception is thrown
|
||||
string getDetailMesg() const;
|
||||
string getDetailMsg() const;
|
||||
const char* getCDetailMsg() const; // C string of detailed message
|
||||
string getFuncName() const; // function name as a string object
|
||||
const char* getCFuncName() const; // function name as a char string
|
||||
|
||||
// Turns on the automatic error printing.
|
||||
void setAutoPrint( H5E_auto_t func,
|
||||
void* client_data ) const;
|
||||
static void setAutoPrint( H5E_auto_t func, void* client_data);
|
||||
|
||||
// Turns off the automatic error printing.
|
||||
static void dontPrint();
|
||||
|
||||
// Retrieves the current settings for the automatic error stack
|
||||
// traversal function and its data.
|
||||
void getAutoPrint( H5E_auto_t& func,
|
||||
void** client_data ) const;
|
||||
static void getAutoPrint( H5E_auto_t& func, void** client_data);
|
||||
|
||||
// Clears the error stack for the current thread.
|
||||
void clearErrorStack() const;
|
||||
static void clearErrorStack();
|
||||
|
||||
// Walks the error stack for the current thread, calling the
|
||||
// specified function.
|
||||
void walkErrorStack( H5E_direction_t direction,
|
||||
H5E_walk_t func, void* client_data ) const;
|
||||
static void walkErrorStack( H5E_direction_t direction,
|
||||
H5E_walk_t func, void* client_data);
|
||||
|
||||
// Default error stack traversal callback function that prints
|
||||
// error messages to the specified output stream.
|
||||
void walkDefErrorStack( int n, H5E_error_t& err_desc,
|
||||
void* client_data ) const;
|
||||
static void walkDefErrorStack( int n, H5E_error_t& err_desc,
|
||||
void* client_data);
|
||||
|
||||
// Prints the error stack in a default manner.
|
||||
//void printError() const;
|
||||
virtual void printError( FILE* stream = NULL ) const;
|
||||
|
||||
// virtual Destructor
|
||||
@@ -66,75 +66,86 @@ class Exception {
|
||||
|
||||
private:
|
||||
string detailMessage;
|
||||
string funcName;
|
||||
};
|
||||
|
||||
class FileIException : public Exception {
|
||||
public:
|
||||
FileIException();
|
||||
FileIException( string message );
|
||||
FileIException( const string& func_name, const string& message = NULL);
|
||||
FileIException( const char* func_name, const char* message = NULL);
|
||||
virtual ~FileIException();
|
||||
};
|
||||
|
||||
class GroupIException : public Exception {
|
||||
public:
|
||||
GroupIException();
|
||||
GroupIException( string message );
|
||||
GroupIException( const string& func_name, const string& message=NULL);
|
||||
GroupIException( const char* func_name, const char* message = NULL);
|
||||
virtual ~GroupIException();
|
||||
};
|
||||
|
||||
class DataSpaceIException : public Exception {
|
||||
public:
|
||||
DataSpaceIException();
|
||||
DataSpaceIException( string message );
|
||||
DataSpaceIException(const string& func_name, const string& message=NULL);
|
||||
DataSpaceIException(const char* func_name, const char* message = NULL);
|
||||
virtual ~DataSpaceIException();
|
||||
};
|
||||
|
||||
class DataTypeIException : public Exception {
|
||||
public:
|
||||
DataTypeIException();
|
||||
DataTypeIException( string message );
|
||||
DataTypeIException(const string& func_name, const string& message = NULL);
|
||||
DataTypeIException(const char* func_name, const char* message = NULL);
|
||||
virtual ~DataTypeIException();
|
||||
};
|
||||
|
||||
class PropListIException : public Exception {
|
||||
public:
|
||||
PropListIException();
|
||||
PropListIException( string message );
|
||||
PropListIException(const string& func_name, const string& message=NULL);
|
||||
PropListIException(const char* func_name, const char* message = NULL);
|
||||
virtual ~PropListIException();
|
||||
};
|
||||
|
||||
class DataSetIException : public Exception {
|
||||
public:
|
||||
DataSetIException();
|
||||
DataSetIException( string message );
|
||||
DataSetIException(const string& func_name, const string& message=NULL);
|
||||
DataSetIException(const char* func_name, const char* message = NULL);
|
||||
virtual ~DataSetIException();
|
||||
};
|
||||
|
||||
class AttributeIException : public Exception {
|
||||
public:
|
||||
AttributeIException();
|
||||
AttributeIException( string message );
|
||||
AttributeIException(const string& func_name, const string& message=NULL);
|
||||
AttributeIException(const char* func_name, const char* message = NULL);
|
||||
virtual ~AttributeIException();
|
||||
};
|
||||
|
||||
class ReferenceException : public Exception {
|
||||
public:
|
||||
ReferenceException();
|
||||
ReferenceException( string message );
|
||||
ReferenceException(const string& func_name, const string& message=NULL);
|
||||
ReferenceException(const char* func_name, const char* message = NULL);
|
||||
virtual ~ReferenceException();
|
||||
};
|
||||
|
||||
class LibraryIException : public Exception {
|
||||
public:
|
||||
LibraryIException();
|
||||
LibraryIException( string message );
|
||||
LibraryIException(const string& func_name, const string& message=NULL);
|
||||
LibraryIException(const char* func_name, const char* message = NULL);
|
||||
virtual ~LibraryIException();
|
||||
};
|
||||
|
||||
class IdComponentException : public Exception {
|
||||
public:
|
||||
IdComponentException();
|
||||
IdComponentException( string message );
|
||||
IdComponentException(const string& func_name, const string& message=NULL);
|
||||
IdComponentException(const char* func_name, const char* message = NULL);
|
||||
virtual ~IdComponentException();
|
||||
};
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ void FileAccPropList::setStdio() const
|
||||
herr_t ret_value = H5Pset_stdio( id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileAccPropList::setStdio", "H5Pset_stdio failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ H5F_driver_t FileAccPropList::getDriver() const
|
||||
H5F_driver_t driver = H5Pget_driver( id );
|
||||
if( driver == H5F_LOW_ERROR )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileAccPropList::getDriver", "H5Pget_driver failed");
|
||||
}
|
||||
return( driver );
|
||||
}
|
||||
@@ -53,7 +53,7 @@ void FileAccPropList::setSec2() const
|
||||
herr_t ret_value = H5Pset_sec2( id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileAccPropList::setSec2", "H5Pset_sec2 failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ void FileAccPropList::setCore( size_t increment ) const
|
||||
herr_t ret_value = H5Pset_core( id, increment );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileAccPropList::setCore", "H5Pset_core failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ void FileAccPropList::setFamily( hsize_t memb_size, const FileAccPropList& memb_
|
||||
herr_t ret_value = H5Pset_family( id, memb_size, memb_plist.getId() );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileAccPropList::setFamily", "H5Pset_family failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& ra
|
||||
herr_t ret_value = H5Pset_split( id, meta_ext, meta_pid, raw_ext, raw_pid );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileAccPropList::setSplit", "H5Pset_split failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ void FileAccPropList::getSplit( size_t meta_ext_size, string& meta_ext, FileAccP
|
||||
&meta_plist_id, raw_ext_size, raw_ext_C, &raw_plist_id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileAccPropList::getSplit", "H5Pget_split failed");
|
||||
}
|
||||
meta_plist.setId( meta_plist_id );
|
||||
raw_plist.setId( raw_plist_id );
|
||||
@@ -155,7 +155,7 @@ void FileAccPropList::setAlignment( hsize_t threshold, hsize_t alignment ) const
|
||||
herr_t ret_value = H5Pset_alignment( id, threshold, alignment );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileAccPropList::setAlignment", "H5Pset_alignment failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ void FileAccPropList::getAlignment( hsize_t& threshold, hsize_t& alignment ) con
|
||||
herr_t ret_value = H5Pget_alignment( id, &threshold, &alignment );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileAccPropList::getAlignment", "H5Pget_alignment failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ void FileAccPropList::setMpi( MPI_Comm comm, MPI_Info info ) const
|
||||
herr_t ret_value = H5Pset_mpi( id, comm, info );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileAccPropList::setMpi", "H5Pset_mpi failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ void FileAccPropList::setCache( int mdc_nelmts, int rdcc_nelmts, size_t rdcc_nby
|
||||
herr_t ret_value = H5Pset_cache( id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0 );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileAccPropList::setCache", "H5Pset_cache failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ void FileAccPropList::getCache( int& mdc_nelmts, int& rdcc_nelmts, size_t& rdcc_
|
||||
herr_t ret_value = H5Pget_cache( id, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0 );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileAccPropList::getCache", "H5Pget_cache failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ void FileAccPropList::setGcReferences( unsigned gc_ref ) const
|
||||
herr_t ret_value = H5Pset_gc_references( id, gc_ref );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileAccPropList::setGcReferences", "H5Pset_gc_references failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ unsigned FileAccPropList::getGcReferences() const
|
||||
herr_t ret_value = H5Pget_gc_references( id, &gc_ref );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileAccPropList::getGcReferences", "H5Pget_gc_references failed");
|
||||
}
|
||||
return( gc_ref );
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5FileAccPropList_H
|
||||
#define _H5FileAccPropList_H
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ void FileCreatPropList::getVersion(
|
||||
herr_t ret_value = H5Pget_version( id, &boot, &freelist, &stab, &shhdr );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileCreatPropList::getVersion",
|
||||
"H5Pget_version failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +35,8 @@ void FileCreatPropList::setUserblock( hsize_t size ) const
|
||||
herr_t ret_value = H5Pset_userblock( id, size);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileCreatPropList::setUserblock",
|
||||
"H5Pset_userblock failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +46,8 @@ hsize_t FileCreatPropList::getUserblock() const
|
||||
herr_t ret_value = H5Pget_userblock( id, &userblock_size );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileCreatPropList::getUserblock",
|
||||
"H5Pget_userblock failed");
|
||||
}
|
||||
return( userblock_size );
|
||||
}
|
||||
@@ -54,7 +57,8 @@ void FileCreatPropList::setSizes( size_t sizeof_addr, size_t sizeof_size ) const
|
||||
herr_t ret_value = H5Pset_sizes( id, sizeof_addr, sizeof_size );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileCreatPropList::setSizes",
|
||||
"H5Pset_sizes failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +67,8 @@ void FileCreatPropList::getSizes( size_t& sizeof_addr, size_t& sizeof_size ) con
|
||||
herr_t ret_value = H5Pget_sizes( id, &sizeof_addr, &sizeof_size );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileCreatPropList::getSizes",
|
||||
"H5Pget_sizes failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +77,8 @@ void FileCreatPropList::setSymk( int ik, int lk ) const
|
||||
herr_t ret_value = H5Pset_sym_k( id, ik, lk );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileCreatPropList::setSymk",
|
||||
"H5Pset_sym_k failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +87,8 @@ void FileCreatPropList::getSymk( int& ik, int& lk ) const
|
||||
herr_t ret_value = H5Pget_sym_k( id, &ik, &lk );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileCreatPropList::getSymk",
|
||||
"H5Pget_sym_k failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +97,8 @@ void FileCreatPropList::setIstorek( int ik ) const
|
||||
herr_t ret_value = H5Pset_istore_k( id, ik );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileCreatPropList::setIstorek",
|
||||
"H5Pset_istore_k failed");
|
||||
}
|
||||
}
|
||||
int FileCreatPropList::getIstorek() const
|
||||
@@ -99,7 +107,8 @@ int FileCreatPropList::getIstorek() const
|
||||
herr_t ret_value = H5Pget_istore_k( id, &ik );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("FileCreatPropList::getIstorek",
|
||||
"H5Pget_istore_k failed");
|
||||
}
|
||||
return( ik );
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5FileCreatPropList_H
|
||||
#define _H5FileCreatPropList_H
|
||||
|
||||
|
||||
@@ -38,26 +38,29 @@ H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& c
|
||||
// constructors taking a string or a char*
|
||||
void H5File::getFile( 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_EXCL|H5F_ACC_TRUNC|H5F_ACC_DEBUG ))
|
||||
{
|
||||
hid_t create_plist_id = create_plist.getId();
|
||||
hid_t access_plist_id = access_plist.getId();
|
||||
id = H5Fcreate( name, flags, create_plist_id, access_plist_id );
|
||||
}
|
||||
// Open the file if none of the bits above are set.
|
||||
else
|
||||
{
|
||||
// use create_plist for access plist because of the default argument
|
||||
hid_t access_plist_id = create_plist.getId();
|
||||
id = H5Fopen( name, flags, access_plist_id );
|
||||
}
|
||||
|
||||
if( id <= 0 ) // throw an exception when open/create fail
|
||||
{
|
||||
throw FileIException();
|
||||
}
|
||||
// These bits only set for creation, so if any of them are set,
|
||||
// create the file.
|
||||
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();
|
||||
id = H5Fcreate( name, flags, create_plist_id, access_plist_id );
|
||||
if( id <= 0 ) // throw an exception when open/create fail
|
||||
{
|
||||
throw FileIException("H5File constructor", "H5Fcreate failed");
|
||||
}
|
||||
}
|
||||
// Open the file if none of the bits above are set.
|
||||
else
|
||||
{
|
||||
// use create_plist for access plist because of the default argument
|
||||
hid_t access_plist_id = create_plist.getId();
|
||||
id = H5Fopen( name, flags, access_plist_id );
|
||||
if( id <= 0 ) // throw an exception when open/create fail
|
||||
{
|
||||
throw FileIException("H5File constructor", "H5Fopen failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Copy constructor: makes a copy of the original H5File object.
|
||||
@@ -79,7 +82,7 @@ bool H5File::isHdf5(const char* name )
|
||||
return false;
|
||||
else // Raise exception when H5Fis_hdf5 returns a negative value
|
||||
{
|
||||
throw FileIException();
|
||||
throw FileIException("H5File::isHdf5", "H5Fis_hdf5 returned negative value");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,14 +98,18 @@ void H5File::reopen()
|
||||
{
|
||||
// reset the identifier of this H5File - send 'this' in so that
|
||||
// H5Fclose can be called appropriately
|
||||
resetIdComponent( this );
|
||||
try {
|
||||
resetIdComponent( this ); }
|
||||
catch (Exception close_error) { // thrown by p_close
|
||||
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?
|
||||
id = H5Freopen( id );
|
||||
if( id <= 0 ) // Raise exception when H5Freopen returns a neg value
|
||||
{
|
||||
throw FileIException();
|
||||
throw FileIException("H5File::reopen", "H5Freopen failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +127,7 @@ FileCreatPropList H5File::getCreatePlist() const
|
||||
}
|
||||
else
|
||||
{
|
||||
throw FileIException();
|
||||
throw FileIException("H5File::getCreatePlist", "H5Fget_create_plist failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +145,7 @@ FileAccPropList H5File::getAccessPlist() const
|
||||
}
|
||||
else // Raise an exception
|
||||
{
|
||||
throw FileIException();
|
||||
throw FileIException("H5File::getAccessPlist", "H5Fget_access_plist failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,14 +155,19 @@ void H5File::p_close() const
|
||||
herr_t ret_value = H5Fclose( id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw FileIException();
|
||||
throw FileIException(NULL, "H5Fclose failed");
|
||||
}
|
||||
}
|
||||
|
||||
// Throw file exception
|
||||
void H5File::throwException() const
|
||||
// Throw file exception; used in CommonFG implementation so that proper
|
||||
// exception can be thrown for file or group. The func_name is a member
|
||||
// function of CommonFG and "H5File::" will be inserted to indicate the
|
||||
// function called is an implementation of H5File
|
||||
void H5File::throwException(const string& func_name, const string& msg) const
|
||||
{
|
||||
throw FileIException();
|
||||
string full_name = func_name;
|
||||
full_name.insert(0, "H5File::");
|
||||
throw FileIException(full_name, msg);
|
||||
}
|
||||
|
||||
// The destructor of this instance calls IdComponent::reset to
|
||||
@@ -166,7 +178,11 @@ void H5File::throwException() const
|
||||
H5File::~H5File()
|
||||
{
|
||||
// The HDF5 file id will be closed properly
|
||||
resetIdComponent( this );
|
||||
try {
|
||||
resetIdComponent( this ); }
|
||||
catch (Exception close_error) { // thrown by p_close
|
||||
throw FileIException("H5File::~H5File", close_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5File_H
|
||||
#define _H5File_H
|
||||
|
||||
@@ -22,7 +23,8 @@ class H5File : public IdComponent, public CommonFG {
|
||||
virtual hid_t getLocId() const;
|
||||
|
||||
// Throw file exception
|
||||
virtual void throwException() const;
|
||||
virtual void throwException(const string& func_name, const string& msg) const;
|
||||
|
||||
|
||||
// Determines if a file, specified by its name, is in HDF5 format
|
||||
static bool isHdf5(const string& name );
|
||||
|
||||
@@ -43,7 +43,7 @@ FloatType::FloatType( const DataSet& dataset ) : AtomType()
|
||||
|
||||
if( id <= 0 )
|
||||
{
|
||||
throw DataSetIException();
|
||||
throw DataSetIException("FloatType constructor", "H5Dget_type failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ void FloatType::getFields( size_t& spos, size_t& epos, size_t& esize, size_t& mp
|
||||
herr_t ret_value = H5Tget_fields( id, &spos, &epos, &esize, &mpos, &msize );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("FloatType::getFields", "H5Tget_fields failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ void FloatType::setFields( size_t spos, size_t epos, size_t esize, size_t mpos,
|
||||
herr_t ret_value = H5Tset_fields( id, spos, epos, esize, mpos, msize );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("FloatType::setFields", "H5Tset_fields failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ size_t FloatType::getEbias() const
|
||||
// Returns the bias if successful
|
||||
if( ebias == 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("FloatType::getEbias", "H5Tget_ebias failed - returned exponent bias as 0");
|
||||
}
|
||||
return( ebias );
|
||||
}
|
||||
@@ -85,7 +85,7 @@ void FloatType::setEbias( size_t ebias ) const
|
||||
herr_t ret_value = H5Tset_ebias( id, ebias );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("FloatType::setEbias", "H5Tset_ebias failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ H5T_norm_t FloatType::getNorm( string& norm_string ) const
|
||||
// Returns a valid normalization type if successful
|
||||
if( norm == H5T_NORM_ERROR )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("FloatType::getNorm", "H5Tget_norm failed - returned H5T_NORM_ERROR");
|
||||
}
|
||||
if( norm == H5T_NORM_IMPLIED )
|
||||
norm_string = "H5T_NORM_IMPLIED (0)";
|
||||
@@ -113,7 +113,7 @@ void FloatType::setNorm( H5T_norm_t norm ) const
|
||||
herr_t ret_value = H5Tset_norm( id, norm );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("FloatType::setNorm", "H5Tset_norm failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ H5T_pad_t FloatType::getInpad( string& pad_string ) const
|
||||
// Returns a valid padding type if successful
|
||||
if( pad_type == H5T_PAD_ERROR )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("FloatType::getInpad", "H5Tget_inpad failed - returned H5T_PAD_ERROR");
|
||||
}
|
||||
if( pad_type == H5T_PAD_ZERO )
|
||||
pad_string = "H5T_PAD_ZERO (0)";
|
||||
@@ -141,7 +141,7 @@ void FloatType::setInpad( H5T_pad_t inpad ) const
|
||||
herr_t ret_value = H5Tset_inpad( id, inpad );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("FloatType::setInpad", "H5Tset_inpad failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5FloatType_H
|
||||
#define _H5FloatType_H
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ Group::Group( const hid_t group_id ) : H5Object( group_id ) {}
|
||||
//return( ret_value );
|
||||
//else // raise exception when H5Aiterate returns a negative value
|
||||
//{
|
||||
//throw GroupIException();
|
||||
//throw GroupIException("Group::iterateElems", "H5Giterate failed");
|
||||
//}
|
||||
//}
|
||||
|
||||
@@ -61,14 +61,16 @@ void Group::p_close() const
|
||||
herr_t ret_value = H5Gclose( id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw GroupIException();
|
||||
throw GroupIException(NULL, "H5Gclose failed");
|
||||
}
|
||||
}
|
||||
|
||||
// Throw file exception
|
||||
void Group::throwException() const
|
||||
void Group::throwException(const string& func_name, const string& msg) const
|
||||
{
|
||||
throw GroupIException();
|
||||
string full_name = func_name;
|
||||
full_name.insert(0, "Group::");
|
||||
throw GroupIException(full_name, msg);
|
||||
}
|
||||
|
||||
// The destructor of this instance calls IdComponent::reset to
|
||||
@@ -79,7 +81,12 @@ void Group::throwException() const
|
||||
Group::~Group()
|
||||
{
|
||||
// The group id will be closed properly
|
||||
resetIdComponent( this );
|
||||
try {
|
||||
resetIdComponent( this ); }
|
||||
catch (Exception close_error) { // thrown by p_close
|
||||
throw GroupIException("Group::~Group", close_error.getDetailMsg());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5Group_H
|
||||
#define _H5Group_H
|
||||
|
||||
@@ -17,7 +18,8 @@ class Group : public H5Object, public CommonFG {
|
||||
virtual hid_t getLocId() const;
|
||||
|
||||
// Throw group exception
|
||||
virtual void throwException() const;
|
||||
virtual void throwException(const string& func_name, const string& msg) const;
|
||||
|
||||
|
||||
// Used by the API to appropriately close a group
|
||||
void p_close() const;
|
||||
|
||||
@@ -63,7 +63,11 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
|
||||
{
|
||||
// reset the identifier of this object - resetIdComponent will call the
|
||||
// appropriate H5xclose to close the id
|
||||
resetIdComponent( this );
|
||||
try {
|
||||
resetIdComponent( this ); }
|
||||
catch (Exception close_error) { // thrown by p_close
|
||||
throw IdComponentException("IdComponent::operator=", close_error.getDetailMsg());
|
||||
}
|
||||
|
||||
// copy the data members from the rhs object
|
||||
id = rhs.id;
|
||||
@@ -85,7 +89,11 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
|
||||
void IdComponent::setId( hid_t new_id )
|
||||
{
|
||||
// reset the identifier of this object, call appropriate H5Xclose
|
||||
resetIdComponent( this );
|
||||
try {
|
||||
resetIdComponent( this ); }
|
||||
catch (Exception close_error) { // thrown by p_close
|
||||
throw IdComponentException("IdComponent::setId", close_error.getDetailMsg());
|
||||
}
|
||||
|
||||
id = new_id;
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _IdComponent_H
|
||||
#define _IdComponent_H
|
||||
|
||||
@@ -25,7 +26,7 @@ class IdComponent {
|
||||
IdComponent( const IdComponent& original );
|
||||
|
||||
// Gets the value of IdComponent's data member
|
||||
hid_t getId () const;
|
||||
virtual hid_t getId () const;
|
||||
|
||||
// Increment reference counter
|
||||
void incRefCount();
|
||||
@@ -40,6 +41,9 @@ class IdComponent {
|
||||
// reference to this object
|
||||
bool noReference();
|
||||
|
||||
// Assignment operator
|
||||
virtual IdComponent& operator=( const IdComponent& rhs );
|
||||
|
||||
// Resets this IdComponent instance
|
||||
//template <class Type>
|
||||
//void reset( Type* parent );
|
||||
@@ -54,9 +58,6 @@ class IdComponent {
|
||||
RefCounter* ref_count; // used to keep track of the
|
||||
// number of copies of an object
|
||||
|
||||
// Assignment operator
|
||||
IdComponent& operator=( const IdComponent& rhs );
|
||||
|
||||
// Default constructor
|
||||
IdComponent();
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _Reset_h
|
||||
#define _Reset_h
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
// Added this line for CC to compile at this time. Will remove it when
|
||||
// the problem of "Multiple declaration for RcsId" is fixed. BMR - 10/30/00
|
||||
#ifdef RCSID
|
||||
#undef RCSID
|
||||
#endif
|
||||
|
||||
#include <hdf5.h>
|
||||
// This problem is removed. I could replace all #include "H5Include.h"
|
||||
// by #include <hdf5.h>, but decide not to. BMR - 3/22/01
|
||||
|
||||
#include "hdf5.h"
|
||||
|
||||
@@ -32,10 +32,18 @@ IntType::IntType( const PredType& pred_type ) : AtomType()
|
||||
copy( pred_type );
|
||||
}
|
||||
|
||||
/* BMR - may not keep
|
||||
IntType& IntType::operator=( const PredType& rhs )
|
||||
{
|
||||
copy(rhs);
|
||||
return(*this);
|
||||
}
|
||||
*/
|
||||
|
||||
// Creates a integer datatype using an existing id
|
||||
IntType::IntType( const hid_t existing_id ) : AtomType( existing_id ) {}
|
||||
|
||||
// Gets the integer datatype of the specified dataset - will reimplement
|
||||
// Gets the integer datatype of the specified dataset - may reimplement -BMR
|
||||
IntType::IntType( const DataSet& dataset ) : AtomType()
|
||||
{
|
||||
// Calls C function H5Dget_type to get the id of the datatype
|
||||
@@ -43,7 +51,7 @@ IntType::IntType( const DataSet& dataset ) : AtomType()
|
||||
|
||||
if( id <= 0 )
|
||||
{
|
||||
throw DataSetIException();
|
||||
throw DataSetIException("IntType constructor", "H5Dget_type failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +62,8 @@ H5T_sign_t IntType::getSign() const
|
||||
// Returns a valid sign type if successful
|
||||
if( type_sign == H5T_SGN_ERROR )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("IntType::getSign",
|
||||
"H5Tget_sign failed - returned H5T_SGN_ERROR for the sign type");
|
||||
}
|
||||
return( type_sign );
|
||||
}
|
||||
@@ -66,7 +75,7 @@ void IntType::setSign( H5T_sign_t sign ) const
|
||||
herr_t ret_value = H5Tset_sign( id, sign );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("IntType::setSign", "H5Tset_sign failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5IntType_H
|
||||
#define _H5IntType_H
|
||||
|
||||
@@ -22,6 +23,10 @@ class IntType : public AtomType {
|
||||
// Gets the integer datatype of the specified dataset
|
||||
IntType( const DataSet& dataset );
|
||||
|
||||
// Assignment operator that takes a predefined type
|
||||
// may not use - BMR
|
||||
// virtual IntType& operator=( const PredType& rhs );
|
||||
|
||||
// Retrieves the sign type for an integer type
|
||||
H5T_sign_t getSign() const;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ void H5Library::open()
|
||||
herr_t ret_value = H5open();
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw LibraryIException();
|
||||
throw LibraryIException("H5Library::open", "H5open failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ void H5Library::close()
|
||||
herr_t ret_value = H5close();
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw LibraryIException();
|
||||
throw LibraryIException("H5Library::close", "H5close failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ void H5Library::dontAtExit()
|
||||
herr_t ret_value = H5dont_atexit();
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw LibraryIException();
|
||||
throw LibraryIException("H5Library::dontAtExit", "H5dont_atexit failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ void H5Library::getLibVersion( unsigned& majnum, unsigned& minnum, unsigned& rel
|
||||
herr_t ret_value = H5get_libversion( &majnum, &minnum, &relnum );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw LibraryIException();
|
||||
throw LibraryIException("H5Library::getLibVersion", "H5get_libversion failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ void H5Library::checkVersion( unsigned majnum, unsigned minnum, unsigned relnum
|
||||
herr_t ret_value = H5check_version( majnum, minnum, relnum );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw LibraryIException();
|
||||
throw LibraryIException("H5Library::checkVersion", "H5check_version failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5Library_H
|
||||
#define _H5Library_H
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ Attribute H5Object::createAttribute( const char* name, const DataType& data_type
|
||||
}
|
||||
else
|
||||
{
|
||||
throw AttributeIException();
|
||||
throw AttributeIException("H5Object::createAttribute", "H5Acreate failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ Attribute H5Object::openAttribute( const char* name ) const
|
||||
}
|
||||
else
|
||||
{
|
||||
throw AttributeIException();
|
||||
throw AttributeIException("H5Object::openAttribute", "H5Aopen_name failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ Attribute H5Object::openAttribute( const unsigned int idx ) const
|
||||
}
|
||||
else
|
||||
{
|
||||
throw AttributeIException();
|
||||
throw AttributeIException("H5Object::openAttribute", "H5Aopen_idx failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ int H5Object::iterateAttrs( attr_operator_t user_op, unsigned * idx, void *op_da
|
||||
return( ret_value );
|
||||
else // raise exception when H5Aiterate returns a negative value
|
||||
{
|
||||
throw AttributeIException();
|
||||
throw AttributeIException("H5Object::iterateAttrs", "H5Aiterate failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +132,8 @@ int H5Object::getNumAttrs() const
|
||||
int num_attrs = H5Aget_num_attrs( id );
|
||||
if( num_attrs < 0 )
|
||||
{
|
||||
throw AttributeIException();
|
||||
throw AttributeIException("H5Object::getNumAttrs",
|
||||
"H5Aget_num_attrs failed - returned negative number of attributes");
|
||||
}
|
||||
else
|
||||
return( num_attrs );
|
||||
@@ -144,7 +145,7 @@ void H5Object::removeAttr( const char* name ) const
|
||||
herr_t ret_value = H5Adelete( id, name );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw AttributeIException();
|
||||
throw AttributeIException("H5Object::removeAttr", "H5Adelete failed");
|
||||
}
|
||||
}
|
||||
void H5Object::removeAttr( const string& name ) const
|
||||
@@ -158,7 +159,7 @@ void H5Object::flush(H5F_scope_t scope ) const
|
||||
herr_t ret_value = H5Fflush( id, scope );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw FileIException();
|
||||
throw FileIException("H5Object::flush", "H5Fflush failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5Object_H
|
||||
#define _H5Object_H
|
||||
|
||||
|
||||
@@ -30,148 +30,427 @@ PredType::PredType( const PredType& original ) : AtomType( original ) {}
|
||||
const PredType PredType::NotAtexit; // only for atexit/global dest. problem
|
||||
|
||||
// Definition of pre-defined types
|
||||
const PredType PredType::C_S1( H5T_C_S1 );
|
||||
const PredType PredType::FORTRAN_S1( H5T_FORTRAN_S1 );
|
||||
// Note: the parameter E_xxxx_yyyy is the enum value that represents
|
||||
// the corresponding HDF5 predefined type H5T_xxxx_yyyy. This enum value
|
||||
// is stored in PredType::id since it is a PredType object id, in a way.
|
||||
// In addition, this storage makes things safely simpler. When a PredType
|
||||
// object is used, the virtual PredType::getId will base on the enum
|
||||
// value to return the correct HDF5 predefined type id.
|
||||
|
||||
const PredType PredType::STD_I8BE( H5T_STD_I8BE );
|
||||
const PredType PredType::STD_I8LE( H5T_STD_I8LE );
|
||||
const PredType PredType::STD_I16BE( H5T_STD_I16BE );
|
||||
const PredType PredType::STD_I16LE( H5T_STD_I16LE );
|
||||
const PredType PredType::STD_I32BE( H5T_STD_I32BE );
|
||||
const PredType PredType::STD_I32LE( H5T_STD_I32LE );
|
||||
const PredType PredType::STD_I64BE( H5T_STD_I64BE );
|
||||
const PredType PredType::STD_I64LE( H5T_STD_I64LE );
|
||||
const PredType PredType::STD_U8BE( H5T_STD_U8BE );
|
||||
const PredType PredType::STD_U8LE( H5T_STD_U8LE );
|
||||
const PredType PredType::STD_U16BE( H5T_STD_U16BE );
|
||||
const PredType PredType::STD_U16LE( H5T_STD_U16LE );
|
||||
const PredType PredType::STD_U32BE( H5T_STD_U32BE );
|
||||
const PredType PredType::STD_U32LE( H5T_STD_U32LE );
|
||||
const PredType PredType::STD_U64BE( H5T_STD_U64BE );
|
||||
const PredType PredType::STD_U64LE( H5T_STD_U64LE );
|
||||
const PredType PredType::STD_B8BE( H5T_STD_B8BE );
|
||||
const PredType PredType::STD_B8LE( H5T_STD_B8LE );
|
||||
const PredType PredType::STD_B16BE( H5T_STD_B16BE );
|
||||
const PredType PredType::STD_B16LE( H5T_STD_B16LE );
|
||||
const PredType PredType::STD_B32BE( H5T_STD_B32BE );
|
||||
const PredType PredType::STD_B32LE( H5T_STD_B32LE );
|
||||
const PredType PredType::STD_B64BE( H5T_STD_B64BE );
|
||||
const PredType PredType::STD_B64LE( H5T_STD_B64LE );
|
||||
const PredType PredType::STD_REF_OBJ( H5T_STD_REF_OBJ );
|
||||
const PredType PredType::STD_REF_DSETREG( H5T_STD_REF_DSETREG );
|
||||
const PredType PredType::C_S1( E_C_S1 );
|
||||
const PredType PredType::FORTRAN_S1( E_FORTRAN_S1 );
|
||||
|
||||
const PredType PredType::IEEE_F32BE( H5T_IEEE_F32BE );
|
||||
const PredType PredType::IEEE_F32LE( H5T_IEEE_F32LE );
|
||||
const PredType PredType::IEEE_F64BE( H5T_IEEE_F64BE );
|
||||
const PredType PredType::IEEE_F64LE( H5T_IEEE_F64LE );
|
||||
const PredType PredType::STD_I8BE( E_STD_I8BE );
|
||||
const PredType PredType::STD_I8LE( E_STD_I8LE );
|
||||
const PredType PredType::STD_I16BE( E_STD_I16BE );
|
||||
const PredType PredType::STD_I16LE( E_STD_I16LE );
|
||||
const PredType PredType::STD_I32BE( E_STD_I32BE );
|
||||
const PredType PredType::STD_I32LE( E_STD_I32LE );
|
||||
const PredType PredType::STD_I64BE( E_STD_I64BE );
|
||||
const PredType PredType::STD_I64LE( E_STD_I64LE );
|
||||
const PredType PredType::STD_U8BE( E_STD_U8BE );
|
||||
const PredType PredType::STD_U8LE( E_STD_U8LE );
|
||||
const PredType PredType::STD_U16BE( E_STD_U16BE );
|
||||
const PredType PredType::STD_U16LE( E_STD_U16LE );
|
||||
const PredType PredType::STD_U32BE( E_STD_U32BE );
|
||||
const PredType PredType::STD_U32LE( E_STD_U32LE );
|
||||
const PredType PredType::STD_U64BE( E_STD_U64BE );
|
||||
const PredType PredType::STD_U64LE( E_STD_U64LE );
|
||||
const PredType PredType::STD_B8BE( E_STD_B8BE );
|
||||
const PredType PredType::STD_B8LE( E_STD_B8LE );
|
||||
|
||||
const PredType PredType::UNIX_D32BE( H5T_UNIX_D32BE );
|
||||
const PredType PredType::UNIX_D32LE( H5T_UNIX_D32LE );
|
||||
const PredType PredType::UNIX_D64BE( H5T_UNIX_D64BE );
|
||||
const PredType PredType::UNIX_D64LE( H5T_UNIX_D64LE );
|
||||
const PredType PredType::STD_B16BE( E_STD_B16BE );
|
||||
const PredType PredType::STD_B16LE( E_STD_B16LE );
|
||||
const PredType PredType::STD_B32BE( E_STD_B32BE );
|
||||
const PredType PredType::STD_B32LE( E_STD_B32LE );
|
||||
const PredType PredType::STD_B64BE( E_STD_B64BE );
|
||||
const PredType PredType::STD_B64LE( E_STD_B64LE );
|
||||
const PredType PredType::STD_REF_OBJ( E_STD_REF_OBJ );
|
||||
const PredType PredType::STD_REF_DSETREG( E_STD_REF_DSETREG );
|
||||
|
||||
const PredType PredType::INTEL_I8( H5T_INTEL_I8 );
|
||||
const PredType PredType::INTEL_I16( H5T_INTEL_I16 );
|
||||
const PredType PredType::INTEL_I32( H5T_INTEL_I32 );
|
||||
const PredType PredType::INTEL_I64( H5T_INTEL_I64 );
|
||||
const PredType PredType::INTEL_U8( H5T_INTEL_U8 );
|
||||
const PredType PredType::INTEL_U16( H5T_INTEL_U16 );
|
||||
const PredType PredType::INTEL_U32( H5T_INTEL_U32 );
|
||||
const PredType PredType::INTEL_U64( H5T_INTEL_U64 );
|
||||
const PredType PredType::INTEL_B8( H5T_INTEL_B8 );
|
||||
const PredType PredType::INTEL_B16( H5T_INTEL_B16 );
|
||||
const PredType PredType::INTEL_B32( H5T_INTEL_B32 );
|
||||
const PredType PredType::INTEL_B64( H5T_INTEL_B64 );
|
||||
const PredType PredType::INTEL_F32( H5T_INTEL_F32 );
|
||||
const PredType PredType::INTEL_F64( H5T_INTEL_F64 );
|
||||
const PredType PredType::IEEE_F32BE( E_IEEE_F32BE );
|
||||
const PredType PredType::IEEE_F32LE( E_IEEE_F32LE );
|
||||
const PredType PredType::IEEE_F64BE( E_IEEE_F64BE );
|
||||
const PredType PredType::IEEE_F64LE( E_IEEE_F64LE );
|
||||
|
||||
const PredType PredType::ALPHA_I8( H5T_ALPHA_I8 );
|
||||
const PredType PredType::ALPHA_I16( H5T_ALPHA_I16 );
|
||||
const PredType PredType::ALPHA_I32( H5T_ALPHA_I32 );
|
||||
const PredType PredType::ALPHA_I64( H5T_ALPHA_I64 );
|
||||
const PredType PredType::ALPHA_U8( H5T_ALPHA_U8 );
|
||||
const PredType PredType::ALPHA_U16( H5T_ALPHA_U16 );
|
||||
const PredType PredType::ALPHA_U32( H5T_ALPHA_U32 );
|
||||
const PredType PredType::ALPHA_U64( H5T_ALPHA_U64 );
|
||||
const PredType PredType::ALPHA_B8( H5T_ALPHA_B8 );
|
||||
const PredType PredType::ALPHA_B16( H5T_ALPHA_B16 );
|
||||
const PredType PredType::ALPHA_B32( H5T_ALPHA_B32 );
|
||||
const PredType PredType::ALPHA_B64( H5T_ALPHA_B64 );
|
||||
const PredType PredType::ALPHA_F32( H5T_ALPHA_F32 );
|
||||
const PredType PredType::ALPHA_F64( H5T_ALPHA_F64 );
|
||||
const PredType PredType::UNIX_D32BE( E_UNIX_D32BE );
|
||||
const PredType PredType::UNIX_D32LE( E_UNIX_D32LE );
|
||||
const PredType PredType::UNIX_D64BE( E_UNIX_D64BE );
|
||||
const PredType PredType::UNIX_D64LE( E_UNIX_D64LE );
|
||||
|
||||
const PredType PredType::MIPS_I8( H5T_MIPS_I8 );
|
||||
const PredType PredType::MIPS_I16( H5T_MIPS_I16 );
|
||||
const PredType PredType::MIPS_I32( H5T_MIPS_I32 );
|
||||
const PredType PredType::MIPS_I64( H5T_MIPS_I64 );
|
||||
const PredType PredType::MIPS_U8( H5T_MIPS_U8 );
|
||||
const PredType PredType::MIPS_U16( H5T_MIPS_U16 );
|
||||
const PredType PredType::MIPS_U32( H5T_MIPS_U32 );
|
||||
const PredType PredType::MIPS_U64( H5T_MIPS_U64 );
|
||||
const PredType PredType::MIPS_B8( H5T_MIPS_B8 );
|
||||
const PredType PredType::MIPS_B16( H5T_MIPS_B16 );
|
||||
const PredType PredType::MIPS_B32( H5T_MIPS_B32 );
|
||||
const PredType PredType::MIPS_B64( H5T_MIPS_B64 );
|
||||
const PredType PredType::MIPS_F32( H5T_MIPS_F32 );
|
||||
const PredType PredType::MIPS_F64( H5T_MIPS_F64 );
|
||||
const PredType PredType::INTEL_I8( E_INTEL_I8 );
|
||||
const PredType PredType::INTEL_I16( E_INTEL_I16 );
|
||||
const PredType PredType::INTEL_I32( E_INTEL_I32 );
|
||||
const PredType PredType::INTEL_I64( E_INTEL_I64 );
|
||||
const PredType PredType::INTEL_U8( E_INTEL_U8 );
|
||||
const PredType PredType::INTEL_U16( E_INTEL_U16 );
|
||||
const PredType PredType::INTEL_U32( E_INTEL_U32 );
|
||||
const PredType PredType::INTEL_U64( E_INTEL_U64 );
|
||||
const PredType PredType::INTEL_B8( E_INTEL_B8 );
|
||||
const PredType PredType::INTEL_B16( E_INTEL_B16 );
|
||||
const PredType PredType::INTEL_B32( E_INTEL_B32 );
|
||||
const PredType PredType::INTEL_B64( E_INTEL_B64 );
|
||||
const PredType PredType::INTEL_F32( E_INTEL_F32 );
|
||||
const PredType PredType::INTEL_F64( E_INTEL_F64 );
|
||||
|
||||
const PredType PredType::NATIVE_CHAR( H5T_NATIVE_CHAR );
|
||||
const PredType PredType::NATIVE_INT( H5T_NATIVE_INT );
|
||||
const PredType PredType::NATIVE_FLOAT( H5T_NATIVE_FLOAT );
|
||||
const PredType PredType::NATIVE_SCHAR( H5T_NATIVE_SCHAR );
|
||||
const PredType PredType::NATIVE_UCHAR( H5T_NATIVE_UCHAR );
|
||||
const PredType PredType::NATIVE_SHORT( H5T_NATIVE_SHORT );
|
||||
const PredType PredType::NATIVE_USHORT( H5T_NATIVE_USHORT );
|
||||
const PredType PredType::NATIVE_UINT( H5T_NATIVE_UINT );
|
||||
const PredType PredType::NATIVE_LONG( H5T_NATIVE_LONG );
|
||||
const PredType PredType::NATIVE_ULONG( H5T_NATIVE_ULONG );
|
||||
const PredType PredType::NATIVE_LLONG( H5T_NATIVE_LLONG );
|
||||
const PredType PredType::NATIVE_ULLONG( H5T_NATIVE_ULLONG );
|
||||
const PredType PredType::NATIVE_DOUBLE( H5T_NATIVE_DOUBLE );
|
||||
const PredType PredType::NATIVE_LDOUBLE( H5T_NATIVE_LDOUBLE );
|
||||
const PredType PredType::NATIVE_B8( H5T_NATIVE_B8 );
|
||||
const PredType PredType::NATIVE_B16( H5T_NATIVE_B16 );
|
||||
const PredType PredType::NATIVE_B32( H5T_NATIVE_B32 );
|
||||
const PredType PredType::NATIVE_B64( H5T_NATIVE_B64 );
|
||||
const PredType PredType::NATIVE_OPAQUE( H5T_NATIVE_OPAQUE );
|
||||
const PredType PredType::NATIVE_HSIZE( H5T_NATIVE_HSIZE );
|
||||
const PredType PredType::NATIVE_HSSIZE( H5T_NATIVE_HSSIZE );
|
||||
const PredType PredType::NATIVE_HERR( H5T_NATIVE_HERR );
|
||||
const PredType PredType::NATIVE_HBOOL( H5T_NATIVE_HBOOL );
|
||||
const PredType PredType::ALPHA_I8( E_ALPHA_I8 );
|
||||
const PredType PredType::ALPHA_I16( E_ALPHA_I16 );
|
||||
const PredType PredType::ALPHA_I32( E_ALPHA_I32 );
|
||||
const PredType PredType::ALPHA_I64( E_ALPHA_I64 );
|
||||
const PredType PredType::ALPHA_U8( E_ALPHA_U8 );
|
||||
const PredType PredType::ALPHA_U16( E_ALPHA_U16 );
|
||||
const PredType PredType::ALPHA_U32( E_ALPHA_U32 );
|
||||
const PredType PredType::ALPHA_U64( E_ALPHA_U64 );
|
||||
const PredType PredType::ALPHA_B8( E_ALPHA_B8 );
|
||||
const PredType PredType::ALPHA_B16( E_ALPHA_B16 );
|
||||
const PredType PredType::ALPHA_B32( E_ALPHA_B32 );
|
||||
const PredType PredType::ALPHA_B64( E_ALPHA_B64 );
|
||||
const PredType PredType::ALPHA_F32( E_ALPHA_F32 );
|
||||
const PredType PredType::ALPHA_F64( E_ALPHA_F64 );
|
||||
|
||||
const PredType PredType::NATIVE_INT8( H5T_NATIVE_INT8 );
|
||||
const PredType PredType::NATIVE_UINT8( H5T_NATIVE_UINT8 );
|
||||
const PredType PredType::NATIVE_INT_LEAST8( H5T_NATIVE_INT_LEAST8 );
|
||||
const PredType PredType::NATIVE_UINT_LEAST8( H5T_NATIVE_UINT_LEAST8 );
|
||||
const PredType PredType::NATIVE_INT_FAST8( H5T_NATIVE_INT_FAST8 );
|
||||
const PredType PredType::NATIVE_UINT_FAST8( H5T_NATIVE_UINT_FAST8 );
|
||||
const PredType PredType::MIPS_I8( E_MIPS_I8 );
|
||||
const PredType PredType::MIPS_I16( E_MIPS_I16 );
|
||||
const PredType PredType::MIPS_I32( E_MIPS_I32 );
|
||||
const PredType PredType::MIPS_I64( E_MIPS_I64 );
|
||||
const PredType PredType::MIPS_U8( E_MIPS_U8 );
|
||||
const PredType PredType::MIPS_U16( E_MIPS_U16 );
|
||||
const PredType PredType::MIPS_U32( E_MIPS_U32 );
|
||||
const PredType PredType::MIPS_U64( E_MIPS_U64 );
|
||||
const PredType PredType::MIPS_B8( E_MIPS_B8 );
|
||||
const PredType PredType::MIPS_B16( E_MIPS_B16 );
|
||||
const PredType PredType::MIPS_B32( E_MIPS_B32 );
|
||||
const PredType PredType::MIPS_B64( E_MIPS_B64 );
|
||||
const PredType PredType::MIPS_F32( E_MIPS_F32 );
|
||||
const PredType PredType::MIPS_F64( E_MIPS_F64 );
|
||||
|
||||
const PredType PredType::NATIVE_INT16( H5T_NATIVE_INT16 );
|
||||
const PredType PredType::NATIVE_UINT16( H5T_NATIVE_UINT16 );
|
||||
const PredType PredType::NATIVE_INT_LEAST16( H5T_NATIVE_INT_LEAST16 );
|
||||
const PredType PredType::NATIVE_UINT_LEAST16( H5T_NATIVE_UINT_LEAST16 );
|
||||
const PredType PredType::NATIVE_INT_FAST16( H5T_NATIVE_INT_FAST16 );
|
||||
const PredType PredType::NATIVE_UINT_FAST16( H5T_NATIVE_UINT_FAST16 );
|
||||
const PredType PredType::NATIVE_CHAR( E_NATIVE_CHAR );
|
||||
const PredType PredType::NATIVE_INT( E_NATIVE_INT );
|
||||
const PredType PredType::NATIVE_FLOAT( E_NATIVE_FLOAT );
|
||||
const PredType PredType::NATIVE_SCHAR( E_NATIVE_SCHAR );
|
||||
const PredType PredType::NATIVE_UCHAR( E_NATIVE_UCHAR );
|
||||
const PredType PredType::NATIVE_SHORT( E_NATIVE_SHORT );
|
||||
const PredType PredType::NATIVE_USHORT( E_NATIVE_USHORT );
|
||||
const PredType PredType::NATIVE_UINT( E_NATIVE_UINT );
|
||||
const PredType PredType::NATIVE_LONG( E_NATIVE_LONG );
|
||||
const PredType PredType::NATIVE_ULONG( E_NATIVE_ULONG );
|
||||
const PredType PredType::NATIVE_LLONG( E_NATIVE_LLONG );
|
||||
const PredType PredType::NATIVE_ULLONG( E_NATIVE_ULLONG );
|
||||
const PredType PredType::NATIVE_DOUBLE( E_NATIVE_DOUBLE );
|
||||
const PredType PredType::NATIVE_LDOUBLE( E_NATIVE_LDOUBLE );
|
||||
const PredType PredType::NATIVE_B8( E_NATIVE_B8 );
|
||||
const PredType PredType::NATIVE_B16( E_NATIVE_B16 );
|
||||
const PredType PredType::NATIVE_B32( E_NATIVE_B32 );
|
||||
const PredType PredType::NATIVE_B64( E_NATIVE_B64 );
|
||||
const PredType PredType::NATIVE_OPAQUE( E_NATIVE_OPAQUE );
|
||||
const PredType PredType::NATIVE_HSIZE( E_NATIVE_HSIZE );
|
||||
const PredType PredType::NATIVE_HSSIZE( E_NATIVE_HSSIZE );
|
||||
const PredType PredType::NATIVE_HERR( E_NATIVE_HERR );
|
||||
const PredType PredType::NATIVE_HBOOL( E_NATIVE_HBOOL );
|
||||
|
||||
const PredType PredType::NATIVE_INT32( H5T_NATIVE_INT32 );
|
||||
const PredType PredType::NATIVE_UINT32( H5T_NATIVE_UINT32 );
|
||||
const PredType PredType::NATIVE_INT_LEAST32( H5T_NATIVE_INT_LEAST32 );
|
||||
const PredType PredType::NATIVE_UINT_LEAST32( H5T_NATIVE_UINT_LEAST32 );
|
||||
const PredType PredType::NATIVE_INT_FAST32( H5T_NATIVE_INT_FAST32 );
|
||||
const PredType PredType::NATIVE_UINT_FAST32( H5T_NATIVE_UINT_FAST32 );
|
||||
const PredType PredType::NATIVE_INT8( E_NATIVE_INT8 );
|
||||
const PredType PredType::NATIVE_UINT8( E_NATIVE_UINT8 );
|
||||
const PredType PredType::NATIVE_INT_LEAST8( E_NATIVE_INT_LEAST8 );
|
||||
const PredType PredType::NATIVE_UINT_LEAST8( E_NATIVE_UINT_LEAST8 );
|
||||
const PredType PredType::NATIVE_INT_FAST8( E_NATIVE_INT_FAST8 );
|
||||
const PredType PredType::NATIVE_UINT_FAST8( E_NATIVE_UINT_FAST8 );
|
||||
|
||||
const PredType PredType::NATIVE_INT64( H5T_NATIVE_INT64 );
|
||||
const PredType PredType::NATIVE_UINT64( H5T_NATIVE_UINT64 );
|
||||
const PredType PredType::NATIVE_INT_LEAST64( H5T_NATIVE_INT_LEAST64 );
|
||||
const PredType PredType::NATIVE_UINT_LEAST64( H5T_NATIVE_UINT_LEAST64 );
|
||||
const PredType PredType::NATIVE_INT_FAST64( H5T_NATIVE_INT_FAST64 );
|
||||
const PredType PredType::NATIVE_UINT_FAST64( H5T_NATIVE_UINT_FAST64 );
|
||||
const PredType PredType::NATIVE_INT16( E_NATIVE_INT16 );
|
||||
const PredType PredType::NATIVE_UINT16( E_NATIVE_UINT16 );
|
||||
const PredType PredType::NATIVE_INT_LEAST16( E_NATIVE_INT_LEAST16 );
|
||||
const PredType PredType::NATIVE_UINT_LEAST16( E_NATIVE_UINT_LEAST16 );
|
||||
const PredType PredType::NATIVE_INT_FAST16( E_NATIVE_INT_FAST16 );
|
||||
const PredType PredType::NATIVE_UINT_FAST16( E_NATIVE_UINT_FAST16 );
|
||||
|
||||
const PredType PredType::NATIVE_INT32( E_NATIVE_INT32 );
|
||||
const PredType PredType::NATIVE_UINT32( E_NATIVE_UINT32 );
|
||||
const PredType PredType::NATIVE_INT_LEAST32( E_NATIVE_INT_LEAST32 );
|
||||
const PredType PredType::NATIVE_UINT_LEAST32( E_NATIVE_UINT_LEAST32 );
|
||||
const PredType PredType::NATIVE_INT_FAST32( E_NATIVE_INT_FAST32 );
|
||||
const PredType PredType::NATIVE_UINT_FAST32( E_NATIVE_UINT_FAST32 );
|
||||
|
||||
const PredType PredType::NATIVE_INT64( E_NATIVE_INT64 );
|
||||
const PredType PredType::NATIVE_UINT64( E_NATIVE_UINT64 );
|
||||
const PredType PredType::NATIVE_INT_LEAST64( E_NATIVE_INT_LEAST64 );
|
||||
const PredType PredType::NATIVE_UINT_LEAST64( E_NATIVE_UINT_LEAST64 );
|
||||
const PredType PredType::NATIVE_INT_FAST64( E_NATIVE_INT_FAST64 );
|
||||
const PredType PredType::NATIVE_UINT_FAST64( E_NATIVE_UINT_FAST64 );
|
||||
|
||||
hid_t PredType::getId() const
|
||||
{
|
||||
switch( id ) {
|
||||
case E_C_S1:
|
||||
return( H5T_C_S1 );
|
||||
case E_FORTRAN_S1:
|
||||
return( H5T_FORTRAN_S1 );
|
||||
|
||||
case E_STD_I8BE:
|
||||
return( H5T_STD_I8BE );
|
||||
case E_STD_I8LE:
|
||||
return( H5T_STD_I8LE );
|
||||
case E_STD_I16BE:
|
||||
return( H5T_STD_I16BE );
|
||||
case E_STD_I16LE:
|
||||
return( H5T_STD_I16LE );
|
||||
case E_STD_I32BE:
|
||||
return( H5T_STD_I32BE );
|
||||
case E_STD_I32LE:
|
||||
return( H5T_STD_I32LE );
|
||||
case E_STD_I64BE:
|
||||
return( H5T_STD_I64BE );
|
||||
case E_STD_I64LE:
|
||||
return( H5T_STD_I64LE );
|
||||
case E_STD_U8BE:
|
||||
return( H5T_STD_U8BE );
|
||||
case E_STD_U8LE:
|
||||
return( H5T_STD_U8LE );
|
||||
case E_STD_U16BE:
|
||||
return( H5T_STD_U16BE );
|
||||
case E_STD_U16LE:
|
||||
return( H5T_STD_U16LE );
|
||||
case E_STD_U32BE:
|
||||
return( H5T_STD_U32BE );
|
||||
case E_STD_U32LE:
|
||||
return( H5T_STD_U32LE );
|
||||
case E_STD_U64BE:
|
||||
return( H5T_STD_U64BE );
|
||||
case E_STD_U64LE:
|
||||
return( H5T_STD_U64LE );
|
||||
case E_STD_B8BE:
|
||||
return( H5T_STD_B8BE );
|
||||
case E_STD_B8LE:
|
||||
return( H5T_STD_B8LE );
|
||||
|
||||
case E_STD_B16BE:
|
||||
return( H5T_STD_B16BE );
|
||||
case E_STD_B16LE:
|
||||
return( H5T_STD_B16LE );
|
||||
case E_STD_B32BE:
|
||||
return( H5T_STD_B32BE );
|
||||
case E_STD_B32LE:
|
||||
return( H5T_STD_B32LE );
|
||||
case E_STD_B64BE:
|
||||
return( H5T_STD_B64BE );
|
||||
case E_STD_B64LE:
|
||||
return( H5T_STD_B64LE );
|
||||
case E_STD_REF_OBJ:
|
||||
return( H5T_STD_REF_OBJ );
|
||||
case E_STD_REF_DSETREG:
|
||||
return( H5T_STD_REF_DSETREG );
|
||||
|
||||
case E_IEEE_F32BE:
|
||||
return( H5T_IEEE_F32BE );
|
||||
case E_IEEE_F32LE:
|
||||
return( H5T_IEEE_F32LE );
|
||||
case E_IEEE_F64BE:
|
||||
return( H5T_IEEE_F64BE );
|
||||
case E_IEEE_F64LE:
|
||||
return( H5T_IEEE_F64LE );
|
||||
|
||||
case E_UNIX_D32BE:
|
||||
return( H5T_UNIX_D32BE );
|
||||
case E_UNIX_D32LE:
|
||||
return( H5T_UNIX_D32LE );
|
||||
case E_UNIX_D64BE:
|
||||
return( H5T_UNIX_D64BE );
|
||||
case E_UNIX_D64LE:
|
||||
return( H5T_UNIX_D64LE );
|
||||
|
||||
case E_INTEL_I8:
|
||||
return( H5T_INTEL_I8 );
|
||||
case E_INTEL_I16:
|
||||
return( H5T_INTEL_I16 );
|
||||
case E_INTEL_I32:
|
||||
return( H5T_INTEL_I32 );
|
||||
case E_INTEL_I64:
|
||||
return( H5T_INTEL_I64 );
|
||||
case E_INTEL_U8:
|
||||
return( H5T_INTEL_U8 );
|
||||
case E_INTEL_U16:
|
||||
return( H5T_INTEL_U16 );
|
||||
case E_INTEL_U32:
|
||||
return( H5T_INTEL_U32 );
|
||||
case E_INTEL_U64:
|
||||
return( H5T_INTEL_U64 );
|
||||
case E_INTEL_B8:
|
||||
return( H5T_INTEL_B8 );
|
||||
case E_INTEL_B16:
|
||||
return( H5T_INTEL_B16 );
|
||||
case E_INTEL_B32:
|
||||
return( H5T_INTEL_B32 );
|
||||
case E_INTEL_B64:
|
||||
return( H5T_INTEL_B64 );
|
||||
case E_INTEL_F32:
|
||||
return( H5T_INTEL_F32 );
|
||||
case E_INTEL_F64:
|
||||
return( H5T_INTEL_F64 );
|
||||
|
||||
case E_ALPHA_I8:
|
||||
return( H5T_ALPHA_I8 );
|
||||
case E_ALPHA_I16:
|
||||
return( H5T_ALPHA_I16 );
|
||||
case E_ALPHA_I32:
|
||||
return( H5T_ALPHA_I32 );
|
||||
case E_ALPHA_I64:
|
||||
return( H5T_ALPHA_I64 );
|
||||
case E_ALPHA_U8:
|
||||
return( H5T_ALPHA_U8 );
|
||||
case E_ALPHA_U16:
|
||||
return( H5T_ALPHA_U16 );
|
||||
case E_ALPHA_U32:
|
||||
return( H5T_ALPHA_U32 );
|
||||
case E_ALPHA_U64:
|
||||
return( H5T_ALPHA_U64 );
|
||||
case E_ALPHA_B8:
|
||||
return( H5T_ALPHA_B8 );
|
||||
case E_ALPHA_B16:
|
||||
return( H5T_ALPHA_B16 );
|
||||
case E_ALPHA_B32:
|
||||
return( H5T_ALPHA_B32 );
|
||||
case E_ALPHA_B64:
|
||||
return( H5T_ALPHA_B64 );
|
||||
case E_ALPHA_F32:
|
||||
return( H5T_ALPHA_F32 );
|
||||
case E_ALPHA_F64:
|
||||
return( H5T_ALPHA_F64 );
|
||||
|
||||
case E_MIPS_I8:
|
||||
return( H5T_MIPS_I8 );
|
||||
case E_MIPS_I16:
|
||||
return( H5T_MIPS_I16 );
|
||||
case E_MIPS_I32:
|
||||
return( H5T_MIPS_I32 );
|
||||
case E_MIPS_I64:
|
||||
return( H5T_MIPS_I64 );
|
||||
case E_MIPS_U8:
|
||||
return( H5T_MIPS_U8 );
|
||||
case E_MIPS_U16:
|
||||
return( H5T_MIPS_U16 );
|
||||
case E_MIPS_U32:
|
||||
return( H5T_MIPS_U32 );
|
||||
case E_MIPS_U64:
|
||||
return( H5T_MIPS_U64 );
|
||||
case E_MIPS_B8:
|
||||
return( H5T_MIPS_B8 );
|
||||
case E_MIPS_B16:
|
||||
return( H5T_MIPS_B16 );
|
||||
case E_MIPS_B32:
|
||||
return( H5T_MIPS_B32 );
|
||||
case E_MIPS_B64:
|
||||
return( H5T_MIPS_B64 );
|
||||
case E_MIPS_F32:
|
||||
return( H5T_MIPS_F32 );
|
||||
case E_MIPS_F64:
|
||||
return( H5T_MIPS_F64 );
|
||||
|
||||
case E_NATIVE_CHAR:
|
||||
return( H5T_NATIVE_CHAR );
|
||||
case E_NATIVE_INT:
|
||||
return( H5T_NATIVE_INT );
|
||||
case E_NATIVE_FLOAT:
|
||||
return( H5T_NATIVE_FLOAT );
|
||||
case E_NATIVE_SCHAR:
|
||||
return( H5T_NATIVE_SCHAR );
|
||||
case E_NATIVE_UCHAR:
|
||||
return( H5T_NATIVE_UCHAR );
|
||||
case E_NATIVE_SHORT:
|
||||
return( H5T_NATIVE_SHORT );
|
||||
case E_NATIVE_USHORT:
|
||||
return( H5T_NATIVE_USHORT );
|
||||
case E_NATIVE_UINT:
|
||||
return( H5T_NATIVE_UINT );
|
||||
case E_NATIVE_LONG:
|
||||
return( H5T_NATIVE_LONG );
|
||||
case E_NATIVE_ULONG:
|
||||
return( H5T_NATIVE_ULONG );
|
||||
case E_NATIVE_LLONG:
|
||||
return( H5T_NATIVE_LLONG );
|
||||
case E_NATIVE_ULLONG:
|
||||
return( H5T_NATIVE_ULLONG );
|
||||
case E_NATIVE_DOUBLE:
|
||||
return( H5T_NATIVE_DOUBLE );
|
||||
case E_NATIVE_LDOUBLE:
|
||||
return( H5T_NATIVE_LDOUBLE );
|
||||
case E_NATIVE_B8:
|
||||
return( H5T_NATIVE_B8 );
|
||||
case E_NATIVE_B16:
|
||||
return( H5T_NATIVE_B16 );
|
||||
case E_NATIVE_B32:
|
||||
return( H5T_NATIVE_B32 );
|
||||
case E_NATIVE_B64:
|
||||
return( H5T_NATIVE_B64 );
|
||||
case E_NATIVE_OPAQUE:
|
||||
return( H5T_NATIVE_OPAQUE );
|
||||
case E_NATIVE_HSIZE:
|
||||
return( H5T_NATIVE_HSIZE );
|
||||
case E_NATIVE_HSSIZE:
|
||||
return( H5T_NATIVE_HSSIZE );
|
||||
case E_NATIVE_HERR:
|
||||
return( H5T_NATIVE_HERR );
|
||||
case E_NATIVE_HBOOL:
|
||||
return( H5T_NATIVE_HBOOL );
|
||||
|
||||
case E_NATIVE_INT8:
|
||||
return( H5T_NATIVE_INT8 );
|
||||
case E_NATIVE_UINT8:
|
||||
return( H5T_NATIVE_UINT8 );
|
||||
case E_NATIVE_INT_LEAST8:
|
||||
return( H5T_NATIVE_INT_LEAST8 );
|
||||
case E_NATIVE_UINT_LEAST8:
|
||||
return( H5T_NATIVE_UINT_LEAST8 );
|
||||
case E_NATIVE_INT_FAST8:
|
||||
return( H5T_NATIVE_INT_FAST8 );
|
||||
case E_NATIVE_UINT_FAST8:
|
||||
return( H5T_NATIVE_UINT_FAST8 );
|
||||
|
||||
case E_NATIVE_INT16:
|
||||
return( H5T_NATIVE_INT16 );
|
||||
case E_NATIVE_UINT16:
|
||||
return( H5T_NATIVE_UINT16 );
|
||||
case E_NATIVE_INT_LEAST16:
|
||||
return( H5T_NATIVE_INT_LEAST16 );
|
||||
case E_NATIVE_UINT_LEAST16:
|
||||
return( H5T_NATIVE_UINT_LEAST16 );
|
||||
case E_NATIVE_INT_FAST16:
|
||||
return( H5T_NATIVE_INT_FAST16 );
|
||||
case E_NATIVE_UINT_FAST16:
|
||||
return( H5T_NATIVE_UINT_FAST16 );
|
||||
|
||||
case E_NATIVE_INT32:
|
||||
return( H5T_NATIVE_INT32 );
|
||||
case E_NATIVE_UINT32:
|
||||
return( H5T_NATIVE_UINT32 );
|
||||
case E_NATIVE_INT_LEAST32:
|
||||
return( H5T_NATIVE_INT_LEAST32 );
|
||||
case E_NATIVE_UINT_LEAST32:
|
||||
return( H5T_NATIVE_UINT_LEAST32 );
|
||||
case E_NATIVE_INT_FAST32:
|
||||
return( H5T_NATIVE_INT_FAST32 );
|
||||
case E_NATIVE_UINT_FAST32:
|
||||
return( H5T_NATIVE_UINT_FAST32 );
|
||||
|
||||
case E_NATIVE_INT64:
|
||||
return( H5T_NATIVE_INT64 );
|
||||
case E_NATIVE_UINT64:
|
||||
return( H5T_NATIVE_UINT64 );
|
||||
case E_NATIVE_INT_LEAST64:
|
||||
return( H5T_NATIVE_INT_LEAST64 );
|
||||
case E_NATIVE_UINT_LEAST64:
|
||||
return( H5T_NATIVE_UINT_LEAST64 );
|
||||
case E_NATIVE_INT_FAST64:
|
||||
return( H5T_NATIVE_INT_FAST64 );
|
||||
case E_NATIVE_UINT_FAST64:
|
||||
return( H5T_NATIVE_UINT_FAST64 );
|
||||
|
||||
default:
|
||||
return( INVALID );
|
||||
} // end switch
|
||||
} // end of getId()
|
||||
|
||||
// These dummy functions do not inherit from DataType - they'll
|
||||
// throw an DataTypeIException if invoked.
|
||||
void PredType::commit( H5Object& loc, const char* name )
|
||||
{
|
||||
throw DataTypeIException( "Attempting to commit a predefined datatype. This operation is invalid" );
|
||||
throw DataTypeIException("PredType::commit", "Attempting to commit a predefined datatype. This operation is invalid" );
|
||||
}
|
||||
|
||||
void PredType::commit( H5Object& loc, const string& name )
|
||||
@@ -181,7 +460,7 @@ void PredType::commit( H5Object& loc, const string& name )
|
||||
|
||||
bool PredType::committed()
|
||||
{
|
||||
throw DataTypeIException( "Error: Attempting to check for commit status on a predefined datatype." );
|
||||
throw DataTypeIException("PredType::committed", "Error: Attempting to check for commit status on a predefined datatype." );
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
// 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.
|
||||
@@ -18,6 +19,8 @@ class PredType : public AtomType {
|
||||
// Copy constructor - makes copy of the original object
|
||||
PredType( const PredType& original );
|
||||
|
||||
virtual hid_t getId() const;
|
||||
hid_t getenum() const { return id; } // remove when done
|
||||
|
||||
// Declaration of predefined types; their definition is in Predtype.C
|
||||
static const PredType STD_I8BE;
|
||||
@@ -166,7 +169,55 @@ class PredType : public AtomType {
|
||||
private:
|
||||
// added this to work around the atexit/global destructor problem
|
||||
// temporarily - it'll prevent the use of atexit to clean up
|
||||
static const PredType NotAtexit;
|
||||
static const PredType NotAtexit; // not working yet
|
||||
|
||||
// This enum type is used by this class only to handle the
|
||||
// global PredType objects. These values will ensure that the
|
||||
// application receives an appropriate and uptodated id for an
|
||||
// HDF5 predefined type; particularly usefull when the application
|
||||
// closes and opens the library again.
|
||||
enum predefined_types {
|
||||
|
||||
INVALID = 0, E_C_S1 = 1, E_FORTRAN_S1,
|
||||
|
||||
E_STD_I8BE, E_STD_I8LE, E_STD_I16BE, E_STD_I16LE, E_STD_I32BE,
|
||||
E_STD_I32LE, E_STD_I64BE, E_STD_I64LE, E_STD_U8BE, E_STD_U8LE,
|
||||
E_STD_U16BE, E_STD_U16LE, E_STD_U32BE, E_STD_U32LE, E_STD_U64BE,
|
||||
E_STD_U64LE, E_STD_B8BE, E_STD_B8LE, E_STD_B16BE, E_STD_B16LE,
|
||||
E_STD_B32BE, E_STD_B32LE, E_STD_B64BE, E_STD_B64LE, E_STD_REF_OBJ,
|
||||
E_STD_REF_DSETREG,
|
||||
|
||||
E_IEEE_F32BE, E_IEEE_F32LE, E_IEEE_F64BE, E_IEEE_F64LE,
|
||||
|
||||
E_UNIX_D32BE, E_UNIX_D32LE, E_UNIX_D64BE, E_UNIX_D64LE,
|
||||
|
||||
E_INTEL_I8, E_INTEL_I16, E_INTEL_I32, E_INTEL_I64, E_INTEL_U8,
|
||||
E_INTEL_U16, E_INTEL_U32, E_INTEL_U64, E_INTEL_B8, E_INTEL_B16,
|
||||
E_INTEL_B32, E_INTEL_B64, E_INTEL_F32, E_INTEL_F64,
|
||||
|
||||
E_ALPHA_I8, E_ALPHA_I16, E_ALPHA_I32, E_ALPHA_I64, E_ALPHA_U8,
|
||||
E_ALPHA_U16, E_ALPHA_U32, E_ALPHA_U64, E_ALPHA_B8, E_ALPHA_B16,
|
||||
E_ALPHA_B32, E_ALPHA_B64, E_ALPHA_F32, E_ALPHA_F64,
|
||||
|
||||
E_MIPS_I8, E_MIPS_I16, E_MIPS_I32, E_MIPS_I64, E_MIPS_U8,
|
||||
E_MIPS_U16, E_MIPS_U32, E_MIPS_U64, E_MIPS_B8, E_MIPS_B16,
|
||||
E_MIPS_B32, E_MIPS_B64, E_MIPS_F32, E_MIPS_F64,
|
||||
|
||||
E_NATIVE_CHAR, E_NATIVE_INT, E_NATIVE_FLOAT, E_NATIVE_SCHAR,
|
||||
E_NATIVE_UCHAR, E_NATIVE_SHORT, E_NATIVE_USHORT, E_NATIVE_UINT,
|
||||
E_NATIVE_LONG, E_NATIVE_ULONG, E_NATIVE_LLONG, E_NATIVE_ULLONG,
|
||||
E_NATIVE_DOUBLE, E_NATIVE_LDOUBLE, E_NATIVE_B8, E_NATIVE_B16,
|
||||
E_NATIVE_B32, E_NATIVE_B64, E_NATIVE_OPAQUE, E_NATIVE_HSIZE,
|
||||
E_NATIVE_HSSIZE, E_NATIVE_HERR, E_NATIVE_HBOOL, E_NATIVE_INT8,
|
||||
E_NATIVE_UINT8, E_NATIVE_INT_LEAST8, E_NATIVE_UINT_LEAST8,
|
||||
E_NATIVE_INT_FAST8, E_NATIVE_UINT_FAST8, E_NATIVE_INT16,
|
||||
E_NATIVE_UINT16, E_NATIVE_INT_LEAST16, E_NATIVE_UINT_LEAST16,
|
||||
E_NATIVE_INT_FAST16, E_NATIVE_UINT_FAST16, E_NATIVE_INT32,
|
||||
E_NATIVE_UINT32, E_NATIVE_INT_LEAST32, E_NATIVE_UINT_LEAST32,
|
||||
E_NATIVE_INT_FAST32, E_NATIVE_UINT_FAST32, E_NATIVE_INT64,
|
||||
E_NATIVE_UINT64, E_NATIVE_INT_LEAST64, E_NATIVE_UINT_LEAST64,
|
||||
E_NATIVE_INT_FAST64, E_NATIVE_UINT_FAST64
|
||||
};
|
||||
|
||||
protected:
|
||||
// Default constructor
|
||||
|
||||
@@ -24,7 +24,7 @@ PropList::PropList( H5P_class_t type ) : IdComponent( 0 )
|
||||
id = H5Pcreate(type );
|
||||
if( id <= 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("PropList constructor", "H5Pcreate failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,11 @@ void PropList::copy( const PropList& like_plist )
|
||||
{
|
||||
// reset the identifier of this PropList - send 'this' in so that
|
||||
// H5Pclose can be called appropriately
|
||||
resetIdComponent( this );
|
||||
try {
|
||||
resetIdComponent( this ); }
|
||||
catch (Exception close_error) { // thrown by p_close
|
||||
throw PropListIException("PropList::copy", close_error.getDetailMsg());
|
||||
}
|
||||
|
||||
// call C routine to copy the property list
|
||||
id = H5Pcopy( like_plist.getId() );
|
||||
@@ -56,10 +60,18 @@ void PropList::copy( const PropList& like_plist )
|
||||
|
||||
if( id <= 0 )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("PropList::copy", "H5Pcopy failed");
|
||||
}
|
||||
}
|
||||
|
||||
// Makes a copy of the property list on the right hand side and stores
|
||||
// the new id in the left hand side object.
|
||||
PropList& PropList::operator=( const PropList& rhs )
|
||||
{
|
||||
copy(rhs);
|
||||
return(*this);
|
||||
}
|
||||
|
||||
// Closes the property list if it is not a default one
|
||||
void PropList::p_close() const
|
||||
{
|
||||
@@ -68,7 +80,7 @@ void PropList::p_close() const
|
||||
herr_t ret_value = H5Pclose( id );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException("PropList::p_close: unable to close the property list. Please report this bug to HDF." );
|
||||
throw PropListIException(NULL, "H5Pclose failed" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,7 +91,8 @@ H5P_class_t PropList::getClass() const
|
||||
H5P_class_t plist_class = H5Pget_class( id );
|
||||
if( plist_class == H5P_NO_CLASS )
|
||||
{
|
||||
throw PropListIException();
|
||||
throw PropListIException("PropList::getClass",
|
||||
"H5Pget_class failed - returned H5P_NO_CLASS");
|
||||
}
|
||||
return( plist_class );
|
||||
}
|
||||
@@ -89,7 +102,11 @@ H5P_class_t PropList::getClass() const
|
||||
PropList::~PropList()
|
||||
{
|
||||
// The property list id will be closed properly
|
||||
resetIdComponent( this );
|
||||
try {
|
||||
resetIdComponent( this ); }
|
||||
catch (Exception close_error) { // thrown by p_close
|
||||
throw PropListIException("PropList::~PropList", close_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5PropList_H
|
||||
#define _H5PropList_H
|
||||
|
||||
@@ -24,11 +25,7 @@ class PropList : public IdComponent {
|
||||
void copy( const PropList& like_plist );
|
||||
|
||||
// Make a copy of the given property list using assignment statement
|
||||
//PropList& operator=( const PropList& rhs );
|
||||
|
||||
// Sets and gets PropList's data member
|
||||
//hid_t getId () const;
|
||||
//void setId( hid_t new_plist_id );
|
||||
virtual PropList& operator=( const PropList& rhs );
|
||||
|
||||
// Gets the class of this property list, i.e. H5P_FILE_CREATE,
|
||||
// H5P_FILE_ACCESS, ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5RefCounter_H
|
||||
#define _H5RefCounter_H
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ StrType::StrType( const hid_t existing_id ) : AtomType( existing_id ) {}
|
||||
// Copy constructor: makes copy of the original StrType object
|
||||
StrType::StrType( const StrType& original ) : AtomType ( original ) {}
|
||||
|
||||
// Gets the string datatype of the specified dataset - will reimplement
|
||||
// Gets the string datatype of the specified dataset - will reimplement - BMR
|
||||
StrType::StrType( const DataSet& dataset ) : AtomType ()
|
||||
{
|
||||
// Calls C function H5Dget_type to get the id of the datatype
|
||||
@@ -43,7 +43,7 @@ StrType::StrType( const DataSet& dataset ) : AtomType ()
|
||||
|
||||
if( id <= 0 )
|
||||
{
|
||||
throw DataSetIException();
|
||||
throw DataSetIException("StrType constructor", "H5Dget_type failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ H5T_cset_t StrType::getCset() const
|
||||
// Returns a valid character set type if successful
|
||||
if( cset == H5T_CSET_ERROR )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("StrType::getCset", "H5Tget_cset failed");
|
||||
}
|
||||
return( cset );
|
||||
}
|
||||
@@ -67,7 +67,7 @@ void StrType::setCset( H5T_cset_t cset ) const
|
||||
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("StrType::setCset", "H5Tset_cset failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,8 @@ H5T_str_t StrType::getStrpad() const
|
||||
// Returns a valid string padding type if successful
|
||||
if( strpad == H5T_STR_ERROR )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("StrType::getStrpad",
|
||||
"H5Tget_strpad failed - returned H5T_STR_ERROR");
|
||||
}
|
||||
return( strpad );
|
||||
}
|
||||
@@ -91,7 +92,7 @@ void StrType::setStrpad( H5T_str_t strpad ) const
|
||||
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataTypeIException();
|
||||
throw DataTypeIException("StrType::setStrpad", "H5Tset_strpad failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
#ifndef _H5StrType_H
|
||||
#define _H5StrType_H
|
||||
|
||||
|
||||
@@ -29,7 +29,13 @@ LIB_SRC=H5Exception.cpp H5RefCounter.cpp H5IdComponent.cpp H5Library.cpp \
|
||||
H5CompType.cpp H5DataSet.cpp H5CommonFG.cpp H5Group.cpp H5File.cpp
|
||||
LIB_OBJ=$(LIB_SRC:.cpp=.lo)
|
||||
|
||||
PUB_HDR=H5Cpp.h
|
||||
PUB_HDR=H5Cpp.h H5AbstractDs.h H5Alltypes.h H5AtomType.h H5Attribute.h \
|
||||
H5Classes.h H5CommonFG.h H5CompType.h H5DataSet.h \
|
||||
H5DataSpace.h H5DataType.h H5DcreatProp.h H5DxferProp.h \
|
||||
H5EnumType.h H5Exception.h H5FaccProp.h H5FcreatProp.h \
|
||||
H5File.h H5FloatType.h H5Group.h H5IdComponent.h \
|
||||
H5Idtemplates.h H5Include.h H5IntType.h H5Library.h H5Object.h \
|
||||
H5PredType.h H5PropList.h H5RefCounter.h H5StrType.h
|
||||
|
||||
ARFLAGS=rs
|
||||
|
||||
|
||||
@@ -14,26 +14,38 @@ hdf5_builddir=$(top_builddir)/src
|
||||
|
||||
## Add include directory to the C preprocessor flags and the h5test and hdf5
|
||||
## libraries to the library list.
|
||||
LT_LINK_LIB=$(LT) --mode=link $(CXX) -rpath $(libdir)
|
||||
LIB=../src/libhdf5_cpp.la
|
||||
CPPFLAGS=-I. -I../src -I$(srcdir)/../src -I$(hdf5_builddir) -I$(hdf5_srcdir) @CPPFLAGS@
|
||||
HDF5LIB=$(hdf5_builddir)/libhdf5.la
|
||||
CPPFLAGS=-I. -I../src -I$(srcdir)/../src -I$(top_srcdir)/test -I$(hdf5_builddir) -I$(hdf5_srcdir) @CPPFLAGS@
|
||||
|
||||
## These are our main targets. They should be listed in the order to be
|
||||
## executed, generally most specific tests to least specific tests.
|
||||
RUNTEST=$(LT_RUN)
|
||||
|
||||
TEST_PROGS_SRC=
|
||||
TEST_PROGS=
|
||||
## Add include directory to the C preprocessor flags and the h5test and hdf5
|
||||
## libraries to the library list.
|
||||
LT_LINK_LIB=$(LT) --mode=link $(CXX) -rpath $(libdir)
|
||||
LIB=../src/libhdf5_cpp.la
|
||||
LIBHDF5=$(hdf5_builddir)/libhdf5.la
|
||||
|
||||
TEST_SRC=
|
||||
## These are our main targets. They should be listed in the order to be
|
||||
## executed, generally most specific tests to least specific tests.
|
||||
RUNTEST=$(LT_RUN)
|
||||
|
||||
TEST_SRC=dsets.cpp testhdf5.cpp tfile.cpp th5s.cpp
|
||||
TEST_OBJ=$(TEST_SRC:.cpp=.lo)
|
||||
TEST_PROGS=dsets testhdf5
|
||||
|
||||
TESTHDF5_OBJ=testhdf5.lo tfile.lo th5s.lo
|
||||
|
||||
TEST_SCRIPTS=
|
||||
|
||||
DISTCLEAN=$(TEST_PROGS_SRC:.cpp=.lo) $(TEST_PROGS_SRC:.cpp=.o) *.h5
|
||||
DISTCLEAN=$(TEST_PROGS_SRC:.cpp=.lo) $(TEST_PROGS_SRC:.cpp=.o)
|
||||
|
||||
$(TEST_PROGS): $(LIB)
|
||||
@echo No C++ test as of yet.
|
||||
$(TEST_PROGS): $(LIB) $(LIBHDF5)
|
||||
|
||||
testhdf5: $(TEST_OBJ)
|
||||
@$(LT_LINK_EXE) $(CFLAGS) -o $@ $(TESTHDF5_OBJ) $(LIB) $(LIBHDF5) $(LDFLAGS) $(LIBS)
|
||||
|
||||
dsets: dsets.lo
|
||||
@$(LT_LINK_EXE) $(CFLAGS) -o $@ dsets.lo $(hdf5_builddir)/../test/h5test.lo $(LIB) $(LIBHDF5) $(LDFLAGS) $(LIBS)
|
||||
|
||||
@CONCLUDE@
|
||||
|
||||
1090
c++/test/dsets.cpp
Normal file
1090
c++/test/dsets.cpp
Normal file
File diff suppressed because it is too large
Load Diff
321
c++/test/testhdf5.cpp
Normal file
321
c++/test/testhdf5.cpp
Normal file
@@ -0,0 +1,321 @@
|
||||
/*
|
||||
* Copyright (C) 2001 National Center for Supercomputing Applications
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
FILE
|
||||
testhdf5.cpp - HDF5 testing framework main file.
|
||||
|
||||
REMARKS
|
||||
General test wrapper for HDF5 base library test programs
|
||||
|
||||
DESIGN
|
||||
Each test function should be implemented as function having no
|
||||
parameters and returning void (i.e. no return value). They should be put
|
||||
into the list of InitTest() calls in main() below. Functions which depend
|
||||
on other functionality should be placed below the InitTest() call for the
|
||||
base functionality testing.
|
||||
Each test module should include testhdf5.h and define a unique set of
|
||||
names for test files they create.
|
||||
|
||||
BUGS/LIMITATIONS
|
||||
|
||||
EXPORTED ROUTINES/VARIABLES:
|
||||
Two variables are exported: num_errs, and Verbosity.
|
||||
|
||||
*/
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#include <console.h>
|
||||
#endif /* __MWERKS__ */
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define MAXNUMOFTESTS 30
|
||||
#define HDF5_TEST_MASTER
|
||||
|
||||
/* Internal Variables */
|
||||
static int Index = 0;
|
||||
|
||||
/* Global variables */
|
||||
int num_errs = 0;
|
||||
int Verbosity;
|
||||
|
||||
// Use C version of the header file testhdf5.h instead of re-coding it
|
||||
#include "testhdf5.h"
|
||||
#include <iostream>
|
||||
#include "H5Cpp.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
using namespace H5;
|
||||
#endif /* !H5_NO_NAMESPACE */
|
||||
|
||||
struct TestStruct {
|
||||
int NumErrors;
|
||||
char Description[64];
|
||||
int SkipFlag;
|
||||
char Name[16];
|
||||
void (*Call) (void);
|
||||
void (*Cleanup) (void);
|
||||
} Test[MAXNUMOFTESTS];
|
||||
|
||||
static void InitTest(const char *, void (*) (void), void (*) (void), const char *TheDescr);
|
||||
static void usage(void);
|
||||
|
||||
static void InitTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), const char *TheDescr)
|
||||
{
|
||||
if (Index >= MAXNUMOFTESTS) {
|
||||
print_func("Uh-oh, too many tests added, increase MAXNUMOFTEST!\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
HDstrcpy(Test[Index].Description, TheDescr);
|
||||
HDstrcpy(Test[Index].Name, TheName);
|
||||
Test[Index].Call = TheCall;
|
||||
Test[Index].Cleanup = Cleanup;
|
||||
Test[Index].NumErrors = -1;
|
||||
Test[Index].SkipFlag = 0;
|
||||
Index++;
|
||||
}
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
print_func("Usage: testhdf5 [-v[erbose] (l[ow]|m[edium]|h[igh]|0-10)] \n");
|
||||
print_func(" [-[e]x[clude] name+] \n");
|
||||
print_func(" [-o[nly] name+] \n");
|
||||
print_func(" [-b[egin] name] \n");
|
||||
print_func(" [-s[ummary]] \n");
|
||||
print_func(" [-c[leanoff]] \n");
|
||||
print_func(" [-n[ocaching]] \n");
|
||||
print_func(" [-h[elp]] \n");
|
||||
print_func("\n\n");
|
||||
print_func("verbose controls the amount of information displayed\n");
|
||||
print_func("exclude to exclude tests by name\n");
|
||||
print_func("only to name tests which should be run\n");
|
||||
print_func("begin start at the name of the test givin\n");
|
||||
print_func("summary prints a summary of test results at the end\n");
|
||||
print_func("cleanoff does not delete *.hdf files after execution of tests\n");
|
||||
print_func("nocaching do not turn on low-level DD caching\n");
|
||||
print_func("help print out this information\n");
|
||||
print_func("\n\n");
|
||||
print_func("This program currently tests the following: \n\n");
|
||||
print_func("%16s %s\n", "Name", "Description");
|
||||
print_func("%16s %s\n", "----", "-----------");
|
||||
|
||||
for (int i = 0; i < Index; i++)
|
||||
print_func("%16s %s\n", Test[i].Name, Test[i].Description);
|
||||
|
||||
print_func("\n\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* This routine is designed to provide equivalent functionality to 'printf'
|
||||
* and allow easy replacement for environments which don't have stdin/stdout
|
||||
* available. (i.e. Windows & the Mac)
|
||||
*/
|
||||
int
|
||||
print_func(const char *format,...)
|
||||
{
|
||||
va_list arglist;
|
||||
int ret_value;
|
||||
|
||||
va_start(arglist, format);
|
||||
ret_value = vprintf(format, arglist);
|
||||
va_end(arglist);
|
||||
return ret_value;
|
||||
}
|
||||
|
||||
void
|
||||
test_tbbt(void)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int CLLoop; /* Command Line Loop */
|
||||
int Loop, Loop1;
|
||||
int Summary = 0;
|
||||
int CleanUp = 1;
|
||||
int Cache = 1;
|
||||
|
||||
#ifdef __MWERKS__
|
||||
argc = ccommand(&argv);
|
||||
#endif /* __MWERKS__ */
|
||||
|
||||
#if !(defined MAC || defined __MWERKS__ || defined SYMANTEC_C)
|
||||
/* Un-buffer the stdout and stderr */
|
||||
setbuf(stderr, NULL);
|
||||
setbuf(stdout, NULL);
|
||||
#endif /* !(MAC || __MWERKS__ || SYMANTEC_C) */
|
||||
|
||||
/*
|
||||
* Turn off automatic error reporting since we do it ourselves. Besides,
|
||||
* half the functions this test calls are private, so automatic error
|
||||
* reporting wouldn't do much good since it's triggered at the API layer.
|
||||
*/
|
||||
Exception::dontPrint();
|
||||
|
||||
// Tests are generally arranged from least to most complexity...
|
||||
//InitTest("metadata", test_metadata, cleanup_metadata, "Encode/decode metadata code");
|
||||
|
||||
// C++ API doesn't need this test */
|
||||
InitTest("tbbt", test_tbbt, NULL, "Threaded, Balanced, Binary Trees - not tested");
|
||||
|
||||
// testing file creation and opening in tfile.cpp
|
||||
InitTest("file", test_file, cleanup_file, "Low-Level File I/O");
|
||||
InitTest("h5s", test_h5s, cleanup_h5s, "Dataspaces");
|
||||
|
||||
/* Comment out tests that are not done yet. - BMR, Feb 2001
|
||||
InitTest("attr", test_attr, cleanup_attr, "Attributes");
|
||||
InitTest("select", test_select, cleanup_select, "Selections");
|
||||
InitTest("time", test_time, cleanup_time, "Time Datatypes");
|
||||
InitTest("reference", test_reference, cleanup_reference, "References");
|
||||
InitTest("vltypes", test_vltypes, cleanup_vltypes, "Variable-Length Datatypes");
|
||||
InitTest("vlstrings", test_vlstrings, cleanup_vlstrings, "Variable-Length Strings");
|
||||
InitTest("iterate", test_iterate, cleanup_iterate, "Group & Attribute Iteration");
|
||||
InitTest("array", test_array, cleanup_array, "Array Datatypes");
|
||||
InitTest("genprop", test_genprop, cleanup_genprop, "Generic Properties");
|
||||
Comment out tests that are not done yet */
|
||||
|
||||
Verbosity = 4; /* Default Verbosity is Low */
|
||||
uintn major, minor, release;
|
||||
H5Library::getLibVersion( major, minor, release);
|
||||
|
||||
print_func("\nFor help use: testhdf5 -help\n");
|
||||
print_func("Linked with hdf5 version %u.%u release %u\n",
|
||||
(unsigned)major, (unsigned)minor, (unsigned)release);
|
||||
|
||||
for (CLLoop = 1; CLLoop < argc; CLLoop++) {
|
||||
if ((argc > CLLoop + 1) && ((HDstrcmp(argv[CLLoop], "-verbose") == 0) ||
|
||||
(HDstrcmp(argv[CLLoop], "-v") == 0))) {
|
||||
if (argv[CLLoop + 1][0] == 'l')
|
||||
Verbosity = 4;
|
||||
else if (argv[CLLoop + 1][0] == 'm')
|
||||
Verbosity = 6;
|
||||
else if (argv[CLLoop + 1][0] == 'h')
|
||||
Verbosity = 10;
|
||||
else
|
||||
Verbosity = atoi(argv[CLLoop + 1]);
|
||||
}
|
||||
|
||||
if ((argc > CLLoop) && ((HDstrcmp(argv[CLLoop], "-summary") == 0) ||
|
||||
(HDstrcmp(argv[CLLoop], "-s") == 0)))
|
||||
Summary = 1;
|
||||
|
||||
if ((argc > CLLoop) && ((HDstrcmp(argv[CLLoop], "-help") == 0) ||
|
||||
(HDstrcmp(argv[CLLoop], "-h") == 0))) {
|
||||
usage();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if ((argc > CLLoop) && ((HDstrcmp(argv[CLLoop], "-cleanoff") == 0) ||
|
||||
(HDstrcmp(argv[CLLoop], "-c") == 0)))
|
||||
CleanUp = 0;
|
||||
|
||||
if ((argc > CLLoop) && ((HDstrcmp(argv[CLLoop], "-nocache") == 0) ||
|
||||
(HDstrcmp(argv[CLLoop], "-n") == 0))) {
|
||||
Cache = 0;
|
||||
printf ("Cache = %d\n", Cache);
|
||||
}
|
||||
|
||||
if ((argc > CLLoop + 1) && ((HDstrcmp(argv[CLLoop], "-exclude") == 0) ||
|
||||
(HDstrcmp(argv[CLLoop], "-x") == 0))) {
|
||||
Loop = CLLoop + 1;
|
||||
|
||||
while ((Loop < argc) && (argv[Loop][0] != '-')) {
|
||||
for (Loop1 = 0; Loop1 < Index; Loop1++)
|
||||
if (HDstrcmp(argv[Loop], Test[Loop1].Name) == 0)
|
||||
Test[Loop1].SkipFlag = 1;
|
||||
|
||||
Loop++;
|
||||
}
|
||||
}
|
||||
|
||||
if ((argc > CLLoop + 1) && ((HDstrcmp(argv[CLLoop], "-begin") == 0) ||
|
||||
(HDstrcmp(argv[CLLoop], "-b") == 0))) {
|
||||
Loop = CLLoop + 1;
|
||||
|
||||
while ((Loop < argc) && (argv[Loop][0] != '-')) {
|
||||
for (Loop1 = 0; Loop1 < Index; Loop1++) {
|
||||
if (HDstrcmp(argv[Loop], Test[Loop1].Name) != 0)
|
||||
Test[Loop1].SkipFlag = 1;
|
||||
if (HDstrcmp(argv[Loop], Test[Loop1].Name) == 0)
|
||||
Loop1 = Index;
|
||||
}
|
||||
|
||||
Loop++;
|
||||
}
|
||||
}
|
||||
|
||||
if ((argc > CLLoop + 1) && ((HDstrcmp(argv[CLLoop], "-only") == 0) ||
|
||||
(HDstrcmp(argv[CLLoop], "-o") == 0))) {
|
||||
for (Loop = 0; Loop < Index; Loop++)
|
||||
Test[Loop].SkipFlag = 1;
|
||||
Loop = CLLoop + 1;
|
||||
while ((Loop < argc) && (argv[Loop][0] != '-')) {
|
||||
for (Loop1 = 0; Loop1 < Index; Loop1++)
|
||||
if (HDstrcmp(argv[Loop], Test[Loop1].Name) == 0)
|
||||
Test[Loop1].SkipFlag = 0;
|
||||
Loop++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NOT_YET
|
||||
if (Cache) /* turn on caching, unless we were instucted not to */
|
||||
Hcache(CACHE_ALL_FILES, TRUE);
|
||||
#endif /* NOT_YET */
|
||||
|
||||
for (Loop = 0; Loop < Index; Loop++) {
|
||||
if (Test[Loop].SkipFlag) {
|
||||
MESSAGE(2, ("Skipping -- %s \n", Test[Loop].Description));
|
||||
} else {
|
||||
MESSAGE(2, ("Testing -- %s (%s) \n", Test[Loop].Description,
|
||||
Test[Loop].Name));
|
||||
MESSAGE(5, ("===============================================\n"));
|
||||
Test[Loop].NumErrors = num_errs;
|
||||
(*Test[Loop].Call) ();
|
||||
Test[Loop].NumErrors = num_errs - Test[Loop].NumErrors;
|
||||
MESSAGE(5, ("===============================================\n"));
|
||||
MESSAGE(5, ("There were %d errors detected.\n\n", (int) Test[Loop].NumErrors));
|
||||
}
|
||||
}
|
||||
|
||||
MESSAGE(2, ("\n\n"))
|
||||
|
||||
if (num_errs)
|
||||
print_func("!!! %d Error(s) were detected !!!\n\n", (int) num_errs);
|
||||
else
|
||||
print_func("All tests were successful. \n\n");
|
||||
|
||||
if (Summary) {
|
||||
print_func("Summary of Test Results:\n");
|
||||
print_func("Name of Test Errors Description of Test\n");
|
||||
print_func("---------------- ------ --------------------------------------\n");
|
||||
|
||||
for (Loop = 0; Loop < Index; Loop++) {
|
||||
if (Test[Loop].NumErrors == -1)
|
||||
print_func("%16s %6s %s\n", Test[Loop].Name, "N/A", Test[Loop].Description);
|
||||
else
|
||||
print_func("%16s %6d %s\n", Test[Loop].Name, (int) Test[Loop].NumErrors,
|
||||
Test[Loop].Description);
|
||||
}
|
||||
|
||||
print_func("\n\n");
|
||||
}
|
||||
|
||||
if (CleanUp && !getenv("HDF5_NOCLEANUP")) {
|
||||
MESSAGE(2, ("\nCleaning Up temp files...\n\n"));
|
||||
|
||||
/* call individual cleanup routines in each source module */
|
||||
for (Loop = 0; Loop < Index; Loop++)
|
||||
if (!Test[Loop].SkipFlag && Test[Loop].Cleanup!=NULL)
|
||||
(*Test[Loop].Cleanup) ();
|
||||
}
|
||||
|
||||
return num_errs;
|
||||
}
|
||||
325
c++/test/tfile.cpp
Normal file
325
c++/test/tfile.cpp
Normal file
@@ -0,0 +1,325 @@
|
||||
/*
|
||||
* Copyright (C) 2001 National Center for Supercomputing Applications
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
/***********************************************************
|
||||
*
|
||||
* Test program: tfile
|
||||
*
|
||||
* Test the low-level file I/O features
|
||||
*
|
||||
*************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include "H5Cpp.h"
|
||||
#include "testhdf5.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
using namespace H5;
|
||||
#endif
|
||||
|
||||
#define F1_USERBLOCK_SIZE (hsize_t)0
|
||||
#define F1_OFFSET_SIZE sizeof(haddr_t)
|
||||
#define F1_LENGTH_SIZE sizeof(hsize_t)
|
||||
#define F1_SYM_LEAF_K 4
|
||||
#define F1_SYM_INTERN_K 16
|
||||
#define FILE1 "tfile1.h5"
|
||||
|
||||
#define F2_USERBLOCK_SIZE (hsize_t)512
|
||||
#define F2_OFFSET_SIZE 8
|
||||
#define F2_LENGTH_SIZE 8
|
||||
#define F2_SYM_LEAF_K 8
|
||||
#define F2_SYM_INTERN_K 32
|
||||
#define FILE2 "tfile2.h5"
|
||||
|
||||
#define F3_USERBLOCK_SIZE (hsize_t)0
|
||||
#define F3_OFFSET_SIZE F2_OFFSET_SIZE
|
||||
#define F3_LENGTH_SIZE F2_LENGTH_SIZE
|
||||
#define F3_SYM_LEAF_K F2_SYM_LEAF_K
|
||||
#define F3_SYM_INTERN_K F2_SYM_INTERN_K
|
||||
#define FILE3 "tfile3.h5"
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_file_create
|
||||
*
|
||||
* Purpose: Test file and template creations
|
||||
*
|
||||
* Return: None
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler (use C version)
|
||||
* January, 2001
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
test_file_create(void)
|
||||
{
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Low-Level File Creation I/O\n"));
|
||||
|
||||
/* Test create with various sequences of H5F_ACC_EXCL and */
|
||||
/* H5F_ACC_TRUNC flags */
|
||||
|
||||
/* Create with H5F_ACC_EXCL */
|
||||
/* First ensure the file does not exist */
|
||||
remove(FILE1);
|
||||
|
||||
try {
|
||||
H5File* fid1 = new H5File (FILE1, H5F_ACC_EXCL);
|
||||
|
||||
/*
|
||||
* try to create the same file with H5F_ACC_TRUNC. This should fail
|
||||
* because fid1 is the same file and is currently open.
|
||||
*/
|
||||
try {
|
||||
H5File fid2 (FILE1, H5F_ACC_TRUNC); // should throw E
|
||||
|
||||
// Should FAIL but didn't - BMR (Note 1): a macro, with a diff
|
||||
// name, that skips the comparison b/w the 1st & 2nd args would
|
||||
// be more appropriate, but VERIFY can be used for now - Mar 13, 01
|
||||
// also, more text about what is testing would be better.
|
||||
VERIFY(fid2.getId(), FAIL, "H5File constructor");
|
||||
}
|
||||
catch( FileIException E ) {} // do nothing, FAIL expected
|
||||
|
||||
// Close file fid1
|
||||
delete fid1;
|
||||
|
||||
/*
|
||||
* Try again with H5F_ACC_EXCL. This should fail because the file already
|
||||
* exists from the previous steps.
|
||||
*/
|
||||
try {
|
||||
fid1 = new H5File( FILE1, H5F_ACC_EXCL ); // should throw E
|
||||
VERIFY(fid1->getId(), FAIL, "H5File constructor");
|
||||
}
|
||||
catch( FileIException E ) {} // do nothing, FAIL expected
|
||||
|
||||
// Test create with H5F_ACC_TRUNC. This will truncate the existing file.
|
||||
fid1 = new H5File (FILE1, H5F_ACC_TRUNC);
|
||||
|
||||
/*
|
||||
* Try to truncate first file again. This should fail because fid1 is the
|
||||
* same file and is currently open.
|
||||
*/
|
||||
try {
|
||||
H5File fid2 (FILE1, H5F_ACC_TRUNC); // should throw E
|
||||
VERIFY(fid2.getId(), FAIL, "H5File constructor");
|
||||
}
|
||||
catch( FileIException E ) {} // do nothing, FAIL expected
|
||||
|
||||
/*
|
||||
* Try with H5F_ACC_EXCL. This should fail too because the file already
|
||||
* exists.
|
||||
*/
|
||||
try {
|
||||
H5File fid3 (FILE1, H5F_ACC_EXCL); // should throw E
|
||||
VERIFY(fid3.getId(), FAIL, "H5File constructor");
|
||||
}
|
||||
catch( FileIException E ) {} // do nothing, FAIL expected
|
||||
|
||||
/* Get the file-creation template */
|
||||
FileCreatPropList tmpl1 = fid1->getCreatePlist();
|
||||
|
||||
hsize_t ublock = tmpl1.getUserblock();
|
||||
VERIFY(ublock, F1_USERBLOCK_SIZE, "FileCreatPropList::getUserblock");
|
||||
|
||||
size_t parm1, parm2; /*file-creation parameters */
|
||||
tmpl1.getSizes( parm1, parm2);
|
||||
VERIFY(parm1, F1_OFFSET_SIZE, "FileCreatPropList::getSizes");
|
||||
VERIFY(parm2, F1_LENGTH_SIZE, "FileCreatPropList::getSizes");
|
||||
|
||||
int iparm1, iparm2; /*file-creation parameters */
|
||||
tmpl1.getSymk( iparm1, iparm2);
|
||||
VERIFY(iparm1, F1_SYM_INTERN_K, "FileCreatPropList::getSymk");
|
||||
VERIFY(iparm2, F1_SYM_LEAF_K, "FileCreatPropList::getSymk");
|
||||
|
||||
// tmpl1 is automatically closed; if error occurs, it'll be
|
||||
// caught in the catch block
|
||||
|
||||
/* Close first file */
|
||||
delete fid1;
|
||||
}
|
||||
catch( PropListIException E ) {
|
||||
CHECK(FAIL, FAIL, E.getCFuncName());
|
||||
}
|
||||
catch( FileIException E ) {
|
||||
CHECK(FAIL, FAIL, E.getCFuncName());
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
/* Create a new file with a non-standard file-creation template */
|
||||
FileCreatPropList* tmpl1 = new FileCreatPropList;
|
||||
|
||||
/* Set the new file-creation parameters */
|
||||
tmpl1->setUserblock (F2_USERBLOCK_SIZE);
|
||||
tmpl1->setSizes( F2_OFFSET_SIZE, F2_LENGTH_SIZE );
|
||||
tmpl1->setSymk( F2_SYM_INTERN_K, F2_SYM_LEAF_K );
|
||||
|
||||
/*
|
||||
* Try to create second file, with non-standard file-creation template
|
||||
* params.
|
||||
*/
|
||||
H5File fid2( FILE2, H5F_ACC_TRUNC, *tmpl1 );
|
||||
|
||||
/* Release file-creation template */
|
||||
delete tmpl1;
|
||||
|
||||
/* Get the file-creation template */
|
||||
tmpl1 = new FileCreatPropList (fid2.getCreatePlist());
|
||||
|
||||
/* Get the file-creation parameters */
|
||||
hsize_t ublock = tmpl1->getUserblock();
|
||||
VERIFY(ublock, F2_USERBLOCK_SIZE, "FileCreatPropList::getUserblock");
|
||||
|
||||
size_t parm1, parm2; /*file-creation parameters */
|
||||
tmpl1->getSizes( parm1, parm2);
|
||||
VERIFY(parm1, F2_OFFSET_SIZE, "FileCreatPropList::getSizes");
|
||||
VERIFY(parm2, F2_LENGTH_SIZE, "FileCreatPropList::getSizes");
|
||||
|
||||
int iparm1, iparm2; /*file-creation parameters */
|
||||
tmpl1->getSymk( iparm1, iparm2);
|
||||
VERIFY(iparm1, F2_SYM_INTERN_K, "FileCreatPropList::getSymk");
|
||||
VERIFY(iparm2, F2_SYM_LEAF_K, "FileCreatPropList::getSymk");
|
||||
|
||||
/* Clone the file-creation template */
|
||||
FileCreatPropList tmpl2;
|
||||
tmpl2.copy (*tmpl1);
|
||||
|
||||
/* Dynamically release file-creation template */
|
||||
delete tmpl1;
|
||||
|
||||
/* Set the new file-creation parameter */
|
||||
tmpl2.setUserblock( F3_USERBLOCK_SIZE );
|
||||
|
||||
/*
|
||||
* Try to create second file, with non-standard file-creation template
|
||||
* params
|
||||
*/
|
||||
H5File fid3( FILE3, H5F_ACC_TRUNC, tmpl2 );
|
||||
|
||||
/* Get the file-creation template */
|
||||
tmpl1 = new FileCreatPropList (fid3.getCreatePlist());
|
||||
|
||||
/* Get the file-creation parameters */
|
||||
ublock = tmpl1->getUserblock();
|
||||
VERIFY(ublock, F3_USERBLOCK_SIZE, "FileCreatPropList::getUserblock");
|
||||
|
||||
tmpl1->getSizes( parm1, parm2);
|
||||
VERIFY(parm1, F3_OFFSET_SIZE, "FileCreatPropList::getSizes");
|
||||
VERIFY(parm2, F3_LENGTH_SIZE, "FileCreatPropList::getSizes");
|
||||
|
||||
tmpl1->getSymk( iparm1, iparm2);
|
||||
VERIFY(iparm1, F3_SYM_INTERN_K, "FileCreatPropList::getSymk");
|
||||
VERIFY(iparm2, F3_SYM_LEAF_K, "FileCreatPropList::getSymk");
|
||||
|
||||
/* Dynamically release file-creation template */
|
||||
delete tmpl1;
|
||||
}
|
||||
catch( PropListIException E ) {
|
||||
CHECK(FAIL, FAIL, E.getCFuncName());
|
||||
}
|
||||
} /* test_file_create() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_file_open
|
||||
*
|
||||
* Purpose: Test file accesses
|
||||
*
|
||||
* Return: None
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler (use C version)
|
||||
* January, 2001
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
test_file_open(void)
|
||||
{
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Low-Level File Opening I/O\n"));
|
||||
|
||||
try {
|
||||
|
||||
/* Open first file */
|
||||
H5File fid1 (FILE2, H5F_ACC_RDWR );
|
||||
|
||||
/* Get the file-creation template */
|
||||
//FileCreatPropList tmpl1;
|
||||
FileCreatPropList tmpl1 = fid1.getCreatePlist();
|
||||
|
||||
/* Get the file-creation parameters */
|
||||
hsize_t ublock = tmpl1.getUserblock();
|
||||
VERIFY(ublock, F2_USERBLOCK_SIZE, "FileCreatPropList::getUserblock");
|
||||
|
||||
size_t parm1, parm2; /*file-creation parameters */
|
||||
tmpl1.getSizes( parm1, parm2);
|
||||
VERIFY(parm1, F2_OFFSET_SIZE, "FileCreatPropList::getSizes");
|
||||
VERIFY(parm2, F2_LENGTH_SIZE, "FileCreatPropList::getSizes");
|
||||
|
||||
int iparm1, iparm2; /*file-creation parameters */
|
||||
tmpl1.getSymk( iparm1, iparm2);
|
||||
VERIFY(iparm1, F2_SYM_INTERN_K, "FileCreatPropList::getSymk");
|
||||
VERIFY(iparm2, F2_SYM_LEAF_K, "FileCreatPropList::getSymk");
|
||||
} // end of try block
|
||||
|
||||
catch( Exception E ) {
|
||||
CHECK(FAIL, FAIL, E.getCFuncName());
|
||||
}
|
||||
} /* test_file_open() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_file
|
||||
*
|
||||
* Purpose: Main program
|
||||
*
|
||||
* Return: None
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler (use C version)
|
||||
* January 2001
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
test_file(void)
|
||||
{
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Low-Level File I/O\n"));
|
||||
|
||||
test_file_create(); /* Test file creation (also creation templates) */
|
||||
test_file_open(); /* Test file opening */
|
||||
} /* test_file() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: cleanup_file
|
||||
*
|
||||
* Purpose: Cleanup temporary test files
|
||||
*
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: (use C version)
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
cleanup_file(void)
|
||||
{
|
||||
remove(FILE1);
|
||||
remove(FILE2);
|
||||
remove(FILE3);
|
||||
} /* cleanup_file */
|
||||
529
c++/test/th5s.cpp
Normal file
529
c++/test/th5s.cpp
Normal file
@@ -0,0 +1,529 @@
|
||||
/*
|
||||
* Copyright (C) 2001 National Center for Supercomputing Applications
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
/***********************************************************
|
||||
*
|
||||
* Test program: th5s
|
||||
*
|
||||
* Test the dataspace functionality
|
||||
*
|
||||
*************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include "H5Cpp.h"
|
||||
#include "testhdf5.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
using namespace H5;
|
||||
#endif /* !H5_NO_NAMESPACE */
|
||||
|
||||
#define TESTFILE "th5s.h5"
|
||||
#define FILE "th5s1.h5"
|
||||
|
||||
/* 3-D dataset with fixed dimensions */
|
||||
#define SPACE1_NAME "Space1"
|
||||
#define SPACE1_RANK 3
|
||||
#define SPACE1_DIM1 3
|
||||
#define SPACE1_DIM2 15
|
||||
#define SPACE1_DIM3 13
|
||||
|
||||
/* 4-D dataset with one unlimited dimension */
|
||||
#define SPACE2_NAME "Space2"
|
||||
#define SPACE2_RANK 4
|
||||
#define SPACE2_DIM1 0
|
||||
#define SPACE2_DIM2 15
|
||||
#define SPACE2_DIM3 13
|
||||
#define SPACE2_DIM4 23
|
||||
#define SPACE2_MAX1 H5S_UNLIMITED
|
||||
#define SPACE2_MAX2 15
|
||||
#define SPACE2_MAX3 13
|
||||
#define SPACE2_MAX4 23
|
||||
|
||||
/* Scalar dataset with simple datatype */
|
||||
#define SPACE3_NAME "Scalar1"
|
||||
#define SPACE3_RANK 0
|
||||
unsigned space3_data=65;
|
||||
|
||||
/* Scalar dataset with compound datatype */
|
||||
#define SPACE4_NAME "Scalar2"
|
||||
#define SPACE4_RANK 0
|
||||
#define SPACE4_FIELDNAME1 "c1"
|
||||
#define SPACE4_FIELDNAME2 "u"
|
||||
#define SPACE4_FIELDNAME3 "f"
|
||||
#define SPACE4_FIELDNAME4 "c2"
|
||||
size_t space4_field1_off=0;
|
||||
size_t space4_field2_off=0;
|
||||
size_t space4_field3_off=0;
|
||||
size_t space4_field4_off=0;
|
||||
struct space4_struct {
|
||||
char c1;
|
||||
unsigned u;
|
||||
float f;
|
||||
char c2;
|
||||
} space4_data={'v',987123,-3.14,'g'}; /* Test data for 4th dataspace */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Function: test_h5s_basic
|
||||
*
|
||||
* Purpose: Test basic H5S (dataspace) code
|
||||
*
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler (using C version)
|
||||
* Mar 2001
|
||||
*
|
||||
* Modifications:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
test_h5s_basic(void)
|
||||
{
|
||||
hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
|
||||
hsize_t dims2[] = {SPACE2_DIM1, SPACE2_DIM2, SPACE2_DIM3,
|
||||
SPACE2_DIM4};
|
||||
hsize_t dims3[H5S_MAX_RANK+1];
|
||||
hsize_t tmax[4];
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Dataspace Manipulation\n"));
|
||||
|
||||
try
|
||||
{ // beginning of first try block
|
||||
|
||||
/* Create file - removed this since the following operations don't
|
||||
need the file to be opened */
|
||||
|
||||
// Create simple dataspace sid1
|
||||
DataSpace sid1 (SPACE1_RANK, dims1 );
|
||||
|
||||
// Get simple extent npoints of the dataspace sid1 and verify it
|
||||
hssize_t n; /* Number of dataspace elements */
|
||||
n = sid1.getSimpleExtentNpoints();
|
||||
VERIFY(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3,
|
||||
"H5Sget_simple_extent_npoints");
|
||||
|
||||
// Get the logical rank of dataspace sid1 and verify it
|
||||
int rank; /* Logical rank of dataspace */
|
||||
rank = sid1.getSimpleExtentNdims();
|
||||
VERIFY(rank, SPACE1_RANK, "H5Sget_simple_extent_ndims");
|
||||
|
||||
// Retrieves dimension size of dataspace sid1 and verify it
|
||||
int ndims; /* Number of dimensions */
|
||||
hsize_t tdims[4]; /* Dimension array to test with */
|
||||
ndims = sid1.getSimpleExtentDims( tdims );
|
||||
VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(unsigned)), 0,
|
||||
"H5Sget_simple_extent_dims");
|
||||
|
||||
// Create simple dataspace sid2
|
||||
hsize_t max2[] = {SPACE2_MAX1, SPACE2_MAX2, SPACE2_MAX3, SPACE2_MAX4};
|
||||
DataSpace sid2 (SPACE2_RANK, dims2, max2);
|
||||
|
||||
// Get simple extent npoints of dataspace sid2 and verify it
|
||||
n = sid2.getSimpleExtentNpoints();
|
||||
VERIFY(n, SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4,
|
||||
"H5Sget_simple_extent_npoints");
|
||||
|
||||
// Get the logical rank of dataspace sid2 and verify it
|
||||
rank = sid2.getSimpleExtentNdims();
|
||||
VERIFY(rank, SPACE2_RANK, "H5Sget_simple_extent_ndims");
|
||||
|
||||
// Retrieves dimension size and max size of dataspace sid2 and
|
||||
// verify them
|
||||
ndims = sid2.getSimpleExtentDims( tdims, tmax );
|
||||
VERIFY(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(unsigned)), 0,
|
||||
"H5Sget_simple_extent_dims");
|
||||
VERIFY(HDmemcmp(tmax, max2, SPACE2_RANK * sizeof(unsigned)), 0,
|
||||
"H5Sget_simple_extent_dims");
|
||||
} // end of first try block
|
||||
catch( DataSpaceIException error )
|
||||
{
|
||||
CHECK(FAIL, FAIL, error.getCFuncName());
|
||||
}
|
||||
|
||||
/*
|
||||
* Check to be sure we can't create a simple data space that has too many
|
||||
* dimensions.
|
||||
*/
|
||||
try {
|
||||
DataSpace manydims_ds(H5S_MAX_RANK+1, dims3, NULL);
|
||||
|
||||
// Should FAIL but didn't - BMR (Note 1): a new macro that skips
|
||||
// the comparison b/w the 1st & 2nd args would be more appropriate,
|
||||
// but VERIFY will still do - Mar 12, 01
|
||||
VERIFY(manydims_ds.getId(), FAIL, "DataSpace constructor");
|
||||
}
|
||||
catch( DataSpaceIException error ) {} // do nothing, FAIL expected
|
||||
|
||||
/*
|
||||
* Try reading a file that has been prepared that has a dataset with a
|
||||
* higher dimensionality than what the library can handle.
|
||||
*
|
||||
* If this test fails and the H5S_MAX_RANK variable has changed, follow
|
||||
* the instructions in space_overflow.c for regenating the th5s.h5 file.
|
||||
*/
|
||||
char testfile[512]="";
|
||||
char *srcdir = getenv("srcdir");
|
||||
if (srcdir && ((strlen(srcdir) + strlen(TESTFILE) + 1) < sizeof(testfile))){
|
||||
strcpy(testfile, srcdir);
|
||||
strcat(testfile, "/");
|
||||
}
|
||||
strcat(testfile, TESTFILE);
|
||||
try { // try block for testing higher dimensionality
|
||||
|
||||
// Create file
|
||||
H5File fid1(testfile, H5F_ACC_RDONLY);
|
||||
|
||||
// Try to open the dataset that has higher dimensionality than
|
||||
// what the library can handle and this operation should fail.
|
||||
try {
|
||||
DataSet dset1 = fid1.openDataSet( "dset" );
|
||||
VERIFY( dset1.getId(), FAIL, "H5File::openDataSet");
|
||||
}
|
||||
catch( FileIException error ) { } // do nothing, FAIL expected
|
||||
} // end of try block for testing higher dimensionality
|
||||
|
||||
// catch exception thrown by H5File constructor
|
||||
catch( FileIException error ) {
|
||||
CHECK_I(FAIL, error.getCFuncName());
|
||||
cout << "***cannot open the pre-created H5S_MAX_RANK test file" <<
|
||||
testfile << endl;
|
||||
}
|
||||
|
||||
// CHECK_I(ret, "H5Fclose"); // leave this here, later, fake a failure
|
||||
// in the p_close see how this will handle it. - BMR
|
||||
|
||||
/* Verify that incorrect dimensions don't work */
|
||||
dims1[0] = 0;
|
||||
try {
|
||||
DataSpace wrongdim_ds (SPACE1_RANK, dims1);
|
||||
VERIFY(wrongdim_ds.getId(), FAIL, "DataSpace constructor");
|
||||
}
|
||||
catch( DataSpaceIException error ) {} // do nothing; FAIL expected
|
||||
|
||||
// Create a simple dataspace
|
||||
DataSpace sid3 (H5S_SIMPLE);
|
||||
|
||||
// Attempts to use incorrect dimensions, should fail
|
||||
try { sid3.setExtentSimple( SPACE1_RANK, dims1 ); }
|
||||
catch( DataSpaceIException error )
|
||||
{
|
||||
// ret value is already < 0 for an exception to be thrown;
|
||||
// also see Note 1 above
|
||||
VERIFY(FAIL, FAIL, error.getCFuncName());
|
||||
}
|
||||
} /* test_h5s_basic() */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Function: test_h5s_scalar_write
|
||||
*
|
||||
* Purpose: Test scalar H5S (dataspace) writing code
|
||||
*
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler (using C version)
|
||||
* Mar 2001
|
||||
*
|
||||
* Modifications:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
test_h5s_scalar_write(void)
|
||||
{
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Scalar Dataspace Writing\n"));
|
||||
|
||||
try
|
||||
{
|
||||
// Create file
|
||||
H5File fid1(FILE, H5F_ACC_TRUNC);
|
||||
|
||||
/* Create scalar dataspace */
|
||||
DataSpace sid1(SPACE3_RANK, NULL);
|
||||
|
||||
//n = H5Sget_simple_extent_npoints(sid1);
|
||||
hssize_t n; /* Number of dataspace elements */
|
||||
n = sid1.getSimpleExtentNpoints();
|
||||
VERIFY(n, 1, "DataSpace::getSimpleExtentNpoints");
|
||||
|
||||
int rank; /* Logical rank of dataspace */
|
||||
rank = sid1.getSimpleExtentNdims();
|
||||
VERIFY(rank, SPACE3_RANK, "DataSpace::getSimpleExtentNdims");
|
||||
|
||||
// Retrieves dimension size of dataspace sid1 and verify it
|
||||
int ndims; /* Number of dimensions */
|
||||
hsize_t tdims[4]; /* Dimension array to test with */
|
||||
ndims = sid1.getSimpleExtentDims( tdims );
|
||||
VERIFY(ndims, 0, "DataSpace::getSimpleExtentDims");
|
||||
|
||||
/* Verify extent type */
|
||||
H5S_class_t ext_type; /* Extent type */
|
||||
ext_type = sid1.getSimpleExtentType();
|
||||
VERIFY(ext_type, H5S_SCALAR, "DataSpace::getSimpleExtentType");
|
||||
|
||||
/* Create a dataset */
|
||||
DataSet dataset = fid1.createDataSet("Dataset1", PredType::NATIVE_UINT,sid1);
|
||||
|
||||
dataset.write(&space3_data, PredType::NATIVE_UINT);
|
||||
} // end of try block
|
||||
catch (Exception error)
|
||||
{
|
||||
CHECK(FAIL, FAIL, error.getCFuncName());
|
||||
}
|
||||
} /* test_h5s_scalar_write() */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Function: test_h5s_scalar_read
|
||||
*
|
||||
* Purpose: Test scalar H5S (dataspace) reading code
|
||||
*
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler (using C version)
|
||||
* Mar 2001
|
||||
*
|
||||
* Modifications:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
test_h5s_scalar_read(void)
|
||||
{
|
||||
hsize_t tdims[4]; /* Dimension array to test with */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Scalar Dataspace Reading\n"));
|
||||
|
||||
try
|
||||
{
|
||||
/* Create file */
|
||||
H5File fid1(FILE, H5F_ACC_RDWR);
|
||||
|
||||
/* Create a dataset */
|
||||
DataSet dataset = fid1.openDataSet("Dataset1");
|
||||
|
||||
DataSpace sid1 = dataset.getSpace();
|
||||
|
||||
// Get the number of dataspace elements
|
||||
hssize_t n = sid1.getSimpleExtentNpoints();
|
||||
VERIFY(n, 1, "H5Sget_simple_extent_npoints");
|
||||
|
||||
// Get the logical rank of the dataspace
|
||||
int ndims = sid1.getSimpleExtentNdims();
|
||||
VERIFY(ndims, SPACE3_RANK, "H5Sget_simple_extent_ndims");
|
||||
|
||||
ndims = sid1.getSimpleExtentDims(tdims);
|
||||
VERIFY(ndims, 0, "H5Sget_simple_extent_dims");
|
||||
|
||||
unsigned rdata; /* Scalar data read in */
|
||||
dataset.read(&rdata, PredType::NATIVE_UINT);
|
||||
VERIFY(rdata, space3_data, "H5Dread");
|
||||
} // end of try block
|
||||
catch (Exception error)
|
||||
{
|
||||
// all the exceptions caused by negative returned values by C APIs
|
||||
CHECK(FAIL, FAIL, error.getCFuncName());
|
||||
}
|
||||
|
||||
} /* test_h5s_scalar_read() */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Function: test_h5s_compound_scalar_write
|
||||
*
|
||||
* Purpose: Test scalar H5S (dataspace) writing for compound
|
||||
* datatypes
|
||||
*
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler (using C version)
|
||||
* Mar 2001
|
||||
*
|
||||
* Modifications:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
test_h5s_compound_scalar_write(void)
|
||||
{
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Compound Dataspace Writing\n"));
|
||||
|
||||
try
|
||||
{
|
||||
/* Create file */
|
||||
H5File fid1(FILE, H5F_ACC_TRUNC);
|
||||
|
||||
/* Create the compound datatype. */
|
||||
CompType tid1(sizeof(struct space4_struct));
|
||||
space4_field1_off=HOFFSET(struct space4_struct, c1);
|
||||
tid1.insertMember(SPACE4_FIELDNAME1, space4_field1_off,
|
||||
PredType::NATIVE_SCHAR);
|
||||
space4_field2_off=HOFFSET(struct space4_struct, u);
|
||||
tid1.insertMember(SPACE4_FIELDNAME2, space4_field2_off,
|
||||
PredType::NATIVE_UINT);
|
||||
space4_field3_off=HOFFSET(struct space4_struct, f);
|
||||
tid1.insertMember(SPACE4_FIELDNAME3, space4_field3_off,
|
||||
PredType::NATIVE_FLOAT);
|
||||
space4_field4_off=HOFFSET(struct space4_struct, c2);
|
||||
tid1.insertMember(SPACE4_FIELDNAME4, space4_field4_off,
|
||||
PredType::NATIVE_SCHAR);
|
||||
|
||||
/* Create scalar dataspace */
|
||||
DataSpace sid1(SPACE3_RANK, NULL);
|
||||
|
||||
// Get the number of dataspace elements
|
||||
hssize_t n = sid1.getSimpleExtentNpoints();
|
||||
VERIFY(n, 1, "H5Sget_simple_extent_npoints");
|
||||
|
||||
// Get the logical rank of the dataspace
|
||||
int ndims = sid1.getSimpleExtentNdims();
|
||||
VERIFY(ndims, SPACE3_RANK, "H5Sget_simple_extent_ndims");
|
||||
|
||||
hsize_t tdims[4]; /* Dimension array to test with */
|
||||
ndims = sid1.getSimpleExtentDims(tdims);
|
||||
VERIFY(ndims, 0, "H5Sget_simple_extent_dims");
|
||||
|
||||
/* Create a dataset */
|
||||
DataSet dataset = fid1.createDataSet("Dataset1", tid1, sid1);
|
||||
|
||||
dataset.write(&space4_data, tid1);
|
||||
} // end of try block
|
||||
catch (Exception error)
|
||||
{
|
||||
// all the exceptions caused by negative returned values by C APIs
|
||||
CHECK(FAIL, FAIL, error.getCFuncName());
|
||||
}
|
||||
|
||||
} /* test_h5s_compound_scalar_write() */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Function: test_h5s_compound_scalar_read
|
||||
*
|
||||
* Purpose: Test scalar H5S (dataspace) reading for compound
|
||||
* datatypes
|
||||
*
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler (using C version)
|
||||
* Mar 2001
|
||||
*
|
||||
* Modifications:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
test_h5s_compound_scalar_read(void)
|
||||
{
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t type; /* Datatype */
|
||||
unsigned rank; /* Logical rank of dataspace */
|
||||
hsize_t tdims[4]; /* Dimension array to test with */
|
||||
size_t n; /* Number of dataspace elements */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Compound Dataspace Reading\n"));
|
||||
try
|
||||
{
|
||||
/* Create file */
|
||||
H5File fid1(FILE, H5F_ACC_RDWR);
|
||||
|
||||
/* Create a dataset */
|
||||
DataSet dataset = fid1.openDataSet("Dataset1");
|
||||
|
||||
DataSpace sid1 = dataset.getSpace();
|
||||
|
||||
// Get the number of dataspace elements
|
||||
hssize_t n = sid1.getSimpleExtentNpoints();
|
||||
VERIFY(n, 1, "H5Sget_simple_extent_npoints");
|
||||
|
||||
// Get the logical rank of the dataspace
|
||||
int ndims = sid1.getSimpleExtentNdims();
|
||||
VERIFY(ndims, SPACE3_RANK, "H5Sget_simple_extent_ndims");
|
||||
|
||||
ndims = sid1.getSimpleExtentDims(tdims);
|
||||
VERIFY(ndims, 0, "H5Sget_simple_extent_dims");
|
||||
|
||||
// Get the datatype of this dataset.
|
||||
CompType type(dataset);
|
||||
|
||||
struct space4_struct rdata; /* Scalar data read in */
|
||||
dataset.read(&rdata, type);
|
||||
|
||||
// Verify read data
|
||||
if(HDmemcmp(&space4_data,&rdata,sizeof(struct space4_struct)))
|
||||
{
|
||||
cout << "scalar data different: space4_data.c1="
|
||||
<< space4_data.c1 << ", read_data4.c1=" << rdata.c1 << endl;
|
||||
cout << "scalar data different: space4_data.u="
|
||||
<< space4_data.u << ", read_data4.u=" << rdata.u << endl;
|
||||
cout << "scalar data different: space4_data.f="
|
||||
<< space4_data.f << ", read_data4.f=" << rdata.f << endl;
|
||||
cout << "scalar data different: space4_data.c1="
|
||||
<< space4_data.c1 << ", read_data4.c1=" << rdata.c2 << endl;
|
||||
num_errs++;
|
||||
} /* end if */
|
||||
} // end of try block
|
||||
catch (Exception error)
|
||||
{
|
||||
// all the exceptions caused by negative returned values by C APIs
|
||||
CHECK(FAIL, FAIL, error.getCFuncName());
|
||||
}
|
||||
} /* test_h5s_compound_scalar_read() */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Function: test_h5s
|
||||
*
|
||||
* Purpose: Main H5S (dataspace) testing routine
|
||||
*
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler (using C version)
|
||||
* Mar 2001
|
||||
*
|
||||
* Modifications:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
test_h5s(void)
|
||||
{
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Dataspaces\n"));
|
||||
|
||||
test_h5s_basic(); /* Test basic H5S code */
|
||||
test_h5s_scalar_write(); /* Test scalar H5S writing code */
|
||||
test_h5s_scalar_read(); /* Test scalar H5S reading code */
|
||||
test_h5s_compound_scalar_write(); /* Test compound datatype scalar H5S writing code */
|
||||
test_h5s_compound_scalar_read(); /* Test compound datatype scalar H5S reading code */
|
||||
} /* test_h5s() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: cleanup_h5s
|
||||
*
|
||||
* Purpose: Cleanup temporary test files
|
||||
*
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Albert Cheng
|
||||
* July 2, 1998
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
cleanup_h5s(void)
|
||||
{
|
||||
remove(FILE);
|
||||
}
|
||||
|
||||
BIN
c++/test/th5s.h5
Normal file
BIN
c++/test/th5s.h5
Normal file
Binary file not shown.
19
config/alphaev67-linux-gnu
Normal file
19
config/alphaev67-linux-gnu
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# This file is part of the HDF5 build script. It is processed shortly
|
||||
# after configure starts and defines, among other things, flags for
|
||||
# the various compile modes.
|
||||
#
|
||||
# See BlankForm in this directory for details.
|
||||
|
||||
# The default compiler is `gcc'.
|
||||
if test "X-" = "X-$CC"; then
|
||||
CC=gcc
|
||||
CC_BASENAME=gcc
|
||||
fi
|
||||
|
||||
# Omit frame pointer for optimized code?
|
||||
NOFP=${NOFP:=-fomit-frame-pointer}
|
||||
|
||||
# Figure out compiler flags
|
||||
. $srcdir/config/gnu-flags
|
||||
@@ -46,7 +46,7 @@ LT_STATIC_EXEC=@LT_STATIC_EXEC@
|
||||
DYNAMIC_DIRS=@DYNAMIC_DIRS@
|
||||
LT=$(top_builddir)/libtool
|
||||
LT_COMPILE=$(LT) --mode=compile $(CC)
|
||||
LT_LINK_LIB=$(LT) --mode=link $(CC) -rpath $(libdir)
|
||||
LT_LINK_LIB=$(LT) --mode=link $(CC) -rpath $(libdir) $(DYNAMIC_DIRS)
|
||||
LT_LINK_EXE=$(LT) --mode=link $(CC) $(LT_STATIC_EXEC) -dlopen self -rpath $(bindir) $(DYNAMIC_DIRS)
|
||||
LT_RUN=$(LT) --mode=execute
|
||||
LT_INSTALL_PROG=$(LT) --mode=install $(INSTALL_PROGRAM)
|
||||
|
||||
@@ -90,8 +90,8 @@ install: $(PUB_LIB) $(PUB_HDR) $(PUB_PROGS) $(libdir) $(includedir) $(bindir)
|
||||
## Install the documents.
|
||||
install-doc: $(PUB_DOCS)
|
||||
@if test -d $(DOCDIR) ; then \
|
||||
:; \
|
||||
else \
|
||||
:; \
|
||||
else \
|
||||
mkdir $(DOCDIR) && chmod 755 $(DOCDIR); \
|
||||
fi
|
||||
@for d in X $(SUBDIRS); do \
|
||||
@@ -102,10 +102,10 @@ install-doc: $(PUB_DOCS)
|
||||
@for f in X $(PUB_DOCS); do \
|
||||
if test $$f != X; then \
|
||||
if test -f $$f; then \
|
||||
(set -x; $(INSTALL_DATA) $$f $(DOCDIR)/. || exit 1); \
|
||||
(set -x; $(INSTALL_DATA) $$f $(DOCDIR)/. || exit 1); \
|
||||
else \
|
||||
(set -x; $(INSTALL_DATA) $(srcdir)/$$f $(DOCDIR)/. || \
|
||||
exit 1); \
|
||||
exit 1); \
|
||||
fi; \
|
||||
fi; \
|
||||
done
|
||||
@@ -139,6 +139,11 @@ uninstall-doc:
|
||||
## remove things like object files but not libraries or executables.
|
||||
##
|
||||
mostlyclean:
|
||||
@for d in X $(SUBDIRS); do \
|
||||
if test $$d != X; then \
|
||||
(set -x; cd $$d; $(MAKE) $@) || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-$(RM) $(LIB_OBJ) $(LIB_OBJ:.lo=.o)
|
||||
-$(RM) $(TEST_OBJ) $(TEST_OBJ:.lo=.o)
|
||||
-$(RM) $(PROG_OBJ) $(PROG_OBJ:.lo=.o) $(MOSTLYCLEAN)
|
||||
@@ -148,6 +153,11 @@ mostlyclean:
|
||||
## is part of the HDF5 distribution.
|
||||
##
|
||||
clean: mostlyclean
|
||||
@for d in X $(SUBDIRS); do \
|
||||
if test $$d != X; then \
|
||||
(set -x; cd $$d; $(MAKE) $@) || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-$(RM) $(LIB) $(TEST_PROGS) $(PROGS) $(CLEAN)
|
||||
-$(RM) -r .libs
|
||||
|
||||
@@ -158,6 +168,11 @@ clean: mostlyclean
|
||||
##
|
||||
distclean: clean
|
||||
-$(RM) .depend TAGS *~ core *.core *.bak *.old *.new $(DISTCLEAN)
|
||||
@for d in X $(SUBDIRS); do \
|
||||
if test $$d != X; then \
|
||||
(set -x; cd $$d; $(MAKE) $@) || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@if test -f $(srcdir)/Makefile.in; then \
|
||||
(set -x; $(RM) Makefile); \
|
||||
fi
|
||||
@@ -167,9 +182,15 @@ distclean: clean
|
||||
## the makefile, including those generated from autoheader and autoconf.
|
||||
##
|
||||
maintainer-clean: distclean
|
||||
@for d in X $(SUBDIRS); do \
|
||||
if test $$d != X; then \
|
||||
(set -x; cd $$d; $(MAKE) $@) || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-$(RM) *~ core core.* *.core *.bak *.contrib gmon.out
|
||||
|
||||
## Implicit rules
|
||||
##
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@ EOF
|
||||
;;
|
||||
esac
|
||||
|
||||
# CFLAGS must be set else configure set it to -g
|
||||
CFLAGS="$CFLAGS"
|
||||
|
||||
# Compiler flags
|
||||
case "$cc_vendor-$cc_version" in
|
||||
DEC-V5.*)
|
||||
|
||||
@@ -40,7 +40,7 @@ $(srcdir)/Dependencies: .depend
|
||||
obj=`basename $$dep .c`.lo; \
|
||||
sed '\%^'"$$obj"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \
|
||||
$(TRACE) $$dep; \
|
||||
$(CC) -M -MG $(CPPFLAGS) $$dep 2>/dev/null | \
|
||||
$(CC) -MM -MG $(CPPFLAGS) $$dep 2>/dev/null | \
|
||||
sed 's% $(srcdir)/% $$(srcdir)/%g' | \
|
||||
sed 's% $(top_srcdir)/% $$(top_srcdir)/%g' | \
|
||||
sed 's% $(top_builddir)/% $$(top_builddir)/%g' | \
|
||||
@@ -51,4 +51,3 @@ $(srcdir)/Dependencies: .depend
|
||||
done;
|
||||
|
||||
-include .depend
|
||||
|
||||
|
||||
@@ -90,10 +90,10 @@ case "$host_os-$host_cpu" in
|
||||
# This check should be kept in sync with the *-i686 check below
|
||||
case "$cc_vendor-$cc_version" in
|
||||
gcc-2.95*)
|
||||
ARCH=${ARCH:="-march=i686 -malign-double"}
|
||||
ARCH=${ARCH:="-march=i686"}
|
||||
;;
|
||||
gcc-*|egcs-*|pgcc-*)
|
||||
ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro -malign-double"}
|
||||
ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro"}
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -102,11 +102,11 @@ case "$host_os-$host_cpu" in
|
||||
|
||||
*-i686)
|
||||
case "$cc_vendor-$cc_version" in
|
||||
gcc-2.95*)
|
||||
ARCH=${ARCH:="-march=i686 -malign-double"}
|
||||
gcc-2.9[56]*)
|
||||
ARCH=${ARCH:="-march=i686"}
|
||||
;;
|
||||
gcc-*|egcs-*|pgcc-*)
|
||||
ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro -malign-double"}
|
||||
ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro"}
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -119,23 +119,30 @@ case "`hostname`" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# Compiler flags
|
||||
# Common GCC flags for various situations
|
||||
case "$cc_vendor-$cc_version" in
|
||||
gcc-2.7*)
|
||||
gcc*|egcs*|pgcc*)
|
||||
# General
|
||||
CFLAGS="$CFLAGS $ARCH -ansi"
|
||||
CFLAGS="$CFLAGS $ARCH -ansi -pedantic -Wchar-subscripts -Wall -W -Wshadow -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline"
|
||||
|
||||
# Production
|
||||
PROC_CFLAGS="-O3 $NOFP -finline-functions"
|
||||
PROD_CFLAGS="-O2 $NOFP -finline-functions"
|
||||
PROD_CPPFLAGS=
|
||||
|
||||
# Debug
|
||||
DEBUG_CFLAGS="-g -fverbose-asm"
|
||||
DEBUG_CFLAGS="-g -fverbose-asm -Wpointer-arith -Wconversion -Wredundant-decls"
|
||||
DEBUG_CPPFLAGS=
|
||||
|
||||
# Profile
|
||||
PROFILE_CFLAGS=-pg
|
||||
PROFILE_CPPFLAGS=
|
||||
;;
|
||||
esac
|
||||
|
||||
# Version specific GCC flags
|
||||
case "$cc_vendor-$cc_version" in
|
||||
gcc-2.7*)
|
||||
# No changes from default GCC flags...
|
||||
|
||||
# Flags are set
|
||||
cc_flags_set=yes
|
||||
@@ -146,36 +153,14 @@ case "$cc_vendor-$cc_version" in
|
||||
CFLAGS="$CFLAGS $ARCH -Wsign-compare"
|
||||
|
||||
# Production
|
||||
PROD_CFLAGS="-O3 $NOFP -finline-functions -fschedule-insns2"
|
||||
PROD_CPPFLAGS=
|
||||
|
||||
# Debug
|
||||
DEBUG_CFLAGS="-g -fverbose-asm"
|
||||
DEBUG_CPPFLAGS=
|
||||
|
||||
# Profile
|
||||
PROFILE_CFLAGS=-pg
|
||||
PROFILE_CPPFLAGS=
|
||||
PROD_CFLAGS="$PROD_CFLAGS -fschedule-insns2"
|
||||
|
||||
# Flags are set
|
||||
cc_flags_set=yes
|
||||
;;
|
||||
|
||||
gcc-2.95*)
|
||||
# General
|
||||
CFLAGS="$CFLAGS $ARCH -Wsign-compare"
|
||||
|
||||
# Production
|
||||
PROD_CFLAGS="-O2 $NOFP"
|
||||
PROD_CPPFLAGS=
|
||||
|
||||
# Debug
|
||||
DEBUG_CFLAGS="-g -fverbose-asm"
|
||||
DEBUG_CPPFLAGS=
|
||||
|
||||
# Profile
|
||||
PROFILE_CFLAGS=-pg
|
||||
PROFILE_CPPFLAGS=
|
||||
# No changes from default GCC flags...
|
||||
|
||||
# Flags are set
|
||||
cc_flags_set=yes
|
||||
@@ -187,15 +172,6 @@ case "$cc_vendor-$cc_version" in
|
||||
|
||||
# Production
|
||||
PROD_CFLAGS="-O6 $NOFP"
|
||||
PROD_CPPFLAGS=
|
||||
|
||||
# Debug
|
||||
DEBUG_CFLAGS="-g -fverbose-asm"
|
||||
DEBUG_CPPFLAGS=
|
||||
|
||||
# Profile
|
||||
PROFILE_CFLAGS=-pg
|
||||
PROFILE_CPPFLAGS=
|
||||
|
||||
# Flags are set
|
||||
cc_flags_set=yes
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# This file is part of the HDF5 build script. It is processed shortly
|
||||
# after configure starts and defines, among other things, flags for
|
||||
# the various compile modes.
|
||||
#
|
||||
# See BlankForm in this directory for details.
|
||||
|
||||
# Cross compiling defaults
|
||||
hdf5_cv_printf_ll=${hdf5_cv_printf_ll='ll'}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}
|
||||
ac_cv_header_stdc=${ac_cv_header_stdc='yes'}
|
||||
ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
|
||||
ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
|
||||
ac_cv_sizeof_long=${ac_cv_sizeof_long=4}
|
||||
ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8}
|
||||
ac_cv_sizeof_float=${ac_cv_sizeof_float=4}
|
||||
ac_cv_sizeof_double=${ac_cv_sizeof_double=8}
|
||||
ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=8}
|
||||
ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
|
||||
ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4}
|
||||
ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=8}
|
||||
@@ -1,79 +0,0 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# This file is part of the HDF5 build script. It is processed shortly
|
||||
# after configure starts and defines, among other things, flags for
|
||||
# the various compile modes.
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Compiler flags. The CPPFLAGS values should not include package debug
|
||||
# flags like `-DH5G_DEBUG' since these are added with the
|
||||
# `--enable-debug' switch of configure.
|
||||
|
||||
# What must *always* be present for things to compile correctly?
|
||||
#CFLAGS="$CFLAGS -ansi"
|
||||
#CPPFLAGS="$CPPFLAGS -I."
|
||||
|
||||
# What compiler flags should be used for code development?
|
||||
DEBUG_CFLAGS=
|
||||
DEBUG_CPPFLAGS=
|
||||
|
||||
# What compiler flags should be used for building a production
|
||||
# library?
|
||||
PROD_CFLAGS=
|
||||
PROD_CPPFLAGS=
|
||||
|
||||
# What compiler flags enable code profiling?
|
||||
PROFILE_CFLAGS=
|
||||
PROFILE_CPPFLAGS=
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Values for overriding configuration tests when cross compiling.
|
||||
# This includes compiling on some machines where the serial front end
|
||||
# compiles for a parallel back end.
|
||||
|
||||
# Set this to `yes' or `no' depending on whether the target is big
|
||||
# endian or little endian.
|
||||
hdf5_cv_printf_ll=${hdf5_cv_printf_ll='ll'}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}
|
||||
ac_cv_header_stdc=${ac_cv_header_stdc='yes'}
|
||||
ac_cv_header_sys_ioctl_h=${ac_cv_header_sys_ioctl_h=yes}
|
||||
RUNPARALLEL="MP_PROCS=2 poe"
|
||||
|
||||
# cache the sizeof of "standard C types" so that configure can run faster.
|
||||
ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
|
||||
ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
|
||||
ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
|
||||
ac_cv_sizeof_long=${ac_cv_sizeof_long=4}
|
||||
ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8}
|
||||
ac_cv_sizeof___int64=${ac_cv_sizeof___int64=8}
|
||||
ac_cv_sizeof_float=${ac_cv_sizeof_float=4}
|
||||
ac_cv_sizeof_double=${ac_cv_sizeof_double=8}
|
||||
ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=8}
|
||||
ac_cv_sizeof_int8_t=${ac_cv_sizeof_int8_t=1}
|
||||
ac_cv_sizeof_uint8_t=${ac_cv_sizeof_uint8_t=1}
|
||||
ac_cv_sizeof_int_least8_t=${ac_cv_sizeof_int_least8_t=1}
|
||||
ac_cv_sizeof_uint_least8_t=${ac_cv_sizeof_uint_least8_t=1}
|
||||
ac_cv_sizeof_int_fast8_t=${ac_cv_sizeof_int_fast8_t=1}
|
||||
ac_cv_sizeof_uint_fast8_t=${ac_cv_sizeof_uint_fast8_t=4}
|
||||
ac_cv_sizeof_int16_t=${ac_cv_sizeof_int16_t=2}
|
||||
ac_cv_sizeof_uint16_t=${ac_cv_sizeof_uint16_t=2}
|
||||
ac_cv_sizeof_int_least16_t=${ac_cv_sizeof_int_least16_t=2}
|
||||
ac_cv_sizeof_uint_least16_t=${ac_cv_sizeof_uint_least16_t=2}
|
||||
ac_cv_sizeof_int_fast16_t=${ac_cv_sizeof_int_fast16_t=4}
|
||||
ac_cv_sizeof_uint_fast16_t=${ac_cv_sizeof_uint_fast16_t=4}
|
||||
ac_cv_sizeof_int32_t=${ac_cv_sizeof_int32_t=4}
|
||||
ac_cv_sizeof_uint32_t=${ac_cv_sizeof_uint32_t=4}
|
||||
ac_cv_sizeof_int_least32_t=${ac_cv_sizeof_int_least32_t=4}
|
||||
ac_cv_sizeof_uint_least32_t=${ac_cv_sizeof_uint_least32_t=4}
|
||||
ac_cv_sizeof_int_fast32_t=${ac_cv_sizeof_int_fast32_t=4}
|
||||
ac_cv_sizeof_uint_fast32_t=${ac_cv_sizeof_uint_fast32_t=4}
|
||||
ac_cv_sizeof_int64_t=${ac_cv_sizeof_int64_t=8}
|
||||
ac_cv_sizeof_uint64_t=${ac_cv_sizeof_uint64_t=8}
|
||||
ac_cv_sizeof_int_least64_t=${ac_cv_sizeof_int_least64_t=8}
|
||||
ac_cv_sizeof_uint_least64_t=${ac_cv_sizeof_uint_least64_t=8}
|
||||
ac_cv_sizeof_int_fast64_t=${ac_cv_sizeof_int_fast64_t=8}
|
||||
ac_cv_sizeof_uint_fast64_t=${ac_cv_sizeof_uint_fast64_t=8}
|
||||
ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4}
|
||||
ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=8}
|
||||
@@ -3,19 +3,80 @@
|
||||
# This file is part of the HDF5 build script. It is processed shortly
|
||||
# after configure starts and defines, among other things, flags for
|
||||
# the various compile modes.
|
||||
#
|
||||
# See BlankForm in this directory for details.
|
||||
|
||||
# Cross compiling defaults
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Compiler flags. The CPPFLAGS values should not include package debug
|
||||
# flags like `-DH5G_DEBUG' since these are added with the
|
||||
# `--enable-debug' switch of configure.
|
||||
|
||||
# What must *always* be present for things to compile correctly?
|
||||
#CFLAGS="$CFLAGS -ansi"
|
||||
#CPPFLAGS="$CPPFLAGS -I."
|
||||
|
||||
# CFLAGS must be set else configure set it to -g
|
||||
CFLAGS="$CFLAGS"
|
||||
|
||||
# What compiler flags should be used for code development?
|
||||
DEBUG_CFLAGS=
|
||||
DEBUG_CPPFLAGS=
|
||||
|
||||
# What compiler flags should be used for building a production
|
||||
# library?
|
||||
PROD_CFLAGS=
|
||||
PROD_CPPFLAGS=
|
||||
|
||||
# What compiler flags enable code profiling?
|
||||
PROFILE_CFLAGS=
|
||||
PROFILE_CPPFLAGS=
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Values for overriding configuration tests when cross compiling.
|
||||
# This includes compiling on some machines where the serial front end
|
||||
# compiles for a parallel back end.
|
||||
|
||||
# Set this to `yes' or `no' depending on whether the target is big
|
||||
# endian or little endian.
|
||||
hdf5_cv_printf_ll=${hdf5_cv_printf_ll='ll'}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}
|
||||
ac_cv_header_stdc=${ac_cv_header_stdc='yes'}
|
||||
ac_cv_header_sys_ioctl_h=${ac_cv_header_sys_ioctl_h=yes}
|
||||
RUNPARALLEL="MP_PROCS=2 poe"
|
||||
|
||||
# cache the sizeof of "standard C types" so that configure can run faster.
|
||||
ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
|
||||
ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
|
||||
ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
|
||||
ac_cv_sizeof_long=${ac_cv_sizeof_long=4}
|
||||
ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8}
|
||||
ac_cv_sizeof___int64=${ac_cv_sizeof___int64=8}
|
||||
ac_cv_sizeof_float=${ac_cv_sizeof_float=4}
|
||||
ac_cv_sizeof_double=${ac_cv_sizeof_double=8}
|
||||
ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=8}
|
||||
ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
|
||||
ac_cv_sizeof_int8_t=${ac_cv_sizeof_int8_t=1}
|
||||
ac_cv_sizeof_uint8_t=${ac_cv_sizeof_uint8_t=1}
|
||||
ac_cv_sizeof_int_least8_t=${ac_cv_sizeof_int_least8_t=1}
|
||||
ac_cv_sizeof_uint_least8_t=${ac_cv_sizeof_uint_least8_t=1}
|
||||
ac_cv_sizeof_int_fast8_t=${ac_cv_sizeof_int_fast8_t=1}
|
||||
ac_cv_sizeof_uint_fast8_t=${ac_cv_sizeof_uint_fast8_t=4}
|
||||
ac_cv_sizeof_int16_t=${ac_cv_sizeof_int16_t=2}
|
||||
ac_cv_sizeof_uint16_t=${ac_cv_sizeof_uint16_t=2}
|
||||
ac_cv_sizeof_int_least16_t=${ac_cv_sizeof_int_least16_t=2}
|
||||
ac_cv_sizeof_uint_least16_t=${ac_cv_sizeof_uint_least16_t=2}
|
||||
ac_cv_sizeof_int_fast16_t=${ac_cv_sizeof_int_fast16_t=4}
|
||||
ac_cv_sizeof_uint_fast16_t=${ac_cv_sizeof_uint_fast16_t=4}
|
||||
ac_cv_sizeof_int32_t=${ac_cv_sizeof_int32_t=4}
|
||||
ac_cv_sizeof_uint32_t=${ac_cv_sizeof_uint32_t=4}
|
||||
ac_cv_sizeof_int_least32_t=${ac_cv_sizeof_int_least32_t=4}
|
||||
ac_cv_sizeof_uint_least32_t=${ac_cv_sizeof_uint_least32_t=4}
|
||||
ac_cv_sizeof_int_fast32_t=${ac_cv_sizeof_int_fast32_t=4}
|
||||
ac_cv_sizeof_uint_fast32_t=${ac_cv_sizeof_uint_fast32_t=4}
|
||||
ac_cv_sizeof_int64_t=${ac_cv_sizeof_int64_t=8}
|
||||
ac_cv_sizeof_uint64_t=${ac_cv_sizeof_uint64_t=8}
|
||||
ac_cv_sizeof_int_least64_t=${ac_cv_sizeof_int_least64_t=8}
|
||||
ac_cv_sizeof_uint_least64_t=${ac_cv_sizeof_uint_least64_t=8}
|
||||
ac_cv_sizeof_int_fast64_t=${ac_cv_sizeof_int_fast64_t=8}
|
||||
ac_cv_sizeof_uint_fast64_t=${ac_cv_sizeof_uint_fast64_t=8}
|
||||
ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4}
|
||||
ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=8}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user