Compare commits
561 Commits
inactive/p
...
hdf5-1_10_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18d990f26e | ||
|
|
2a7bd2bddc | ||
|
|
4954eb9a23 | ||
|
|
26b8fa0d10 | ||
|
|
6db52ee61f | ||
|
|
100404db91 | ||
|
|
5bacc97055 | ||
|
|
10cf31edc9 | ||
|
|
712bbfff9a | ||
|
|
1571a7ffc7 | ||
|
|
146e3223b5 | ||
|
|
4fe9d56f78 | ||
|
|
e9da1c3460 | ||
|
|
61d3297477 | ||
|
|
513ca62daa | ||
|
|
ff548450c3 | ||
|
|
0a54d7e9d0 | ||
|
|
eb07968bfe | ||
|
|
b3b7ed6300 | ||
|
|
e9a3da63a4 | ||
|
|
4b36b8271b | ||
|
|
46a9b495b4 | ||
|
|
2e6cce8485 | ||
|
|
6671139328 | ||
|
|
68037d059e | ||
|
|
015981435e | ||
|
|
73292c21c7 | ||
|
|
a43c8deca0 | ||
|
|
58c96bded0 | ||
|
|
a4331cabde | ||
|
|
256d7a8443 | ||
|
|
a5dce3f4b4 | ||
|
|
bf447f740f | ||
|
|
681e118726 | ||
|
|
b419141463 | ||
|
|
ee0ecca9d8 | ||
|
|
3b46a9055e | ||
|
|
c9712b17eb | ||
|
|
f1660b3227 | ||
|
|
6a79201474 | ||
|
|
cb79a1fd86 | ||
|
|
51eb52dd63 | ||
|
|
e82c9be897 | ||
|
|
0f514236b0 | ||
|
|
c7bf2f7d33 | ||
|
|
1e935175fe | ||
|
|
281a8abd7f | ||
|
|
8fa65b5cd3 | ||
|
|
c8db4b8f62 | ||
|
|
8147b60d66 | ||
|
|
b0cecfab04 | ||
|
|
15eaced5b6 | ||
|
|
4b64692187 | ||
|
|
81d693a1d3 | ||
|
|
31be2a676b | ||
|
|
5913de51c2 | ||
|
|
4d2eb98622 | ||
|
|
38bd287c8d | ||
|
|
406521079c | ||
|
|
05b604da9a | ||
|
|
c327c727cf | ||
|
|
e8ad6b8a8d | ||
|
|
e8fb73f038 | ||
|
|
f8fa4e9508 | ||
|
|
d41e0e0b88 | ||
|
|
55b1eb056e | ||
|
|
294f742823 | ||
|
|
44b932ed53 | ||
|
|
03615fd68f | ||
|
|
e357598456 | ||
|
|
fdab86b184 | ||
|
|
88101388b7 | ||
|
|
4d5a53cade | ||
|
|
9332f6eef5 | ||
|
|
be2ec038ab | ||
|
|
8b3be42603 | ||
|
|
1a295b7082 | ||
|
|
ec47333d65 | ||
|
|
81ae1ef2c3 | ||
|
|
472b94f49b | ||
|
|
495735e766 | ||
|
|
f8e94704ea | ||
|
|
1b58261bc5 | ||
|
|
41a03ad8ed | ||
|
|
69194bdd68 | ||
|
|
54c7698788 | ||
|
|
e83c3a64e8 | ||
|
|
048f77864f | ||
|
|
fef44254fe | ||
|
|
aa1a5861a4 | ||
|
|
5e37fd739c | ||
|
|
84b1e9e137 | ||
|
|
239882bd80 | ||
|
|
51b29b6ab4 | ||
|
|
8a1ca95768 | ||
|
|
c07ff78058 | ||
|
|
3f568b87d6 | ||
|
|
66e1eeffa7 | ||
|
|
bea706880a | ||
|
|
66c1a254f0 | ||
|
|
0caf00455f | ||
|
|
30adc68b24 | ||
|
|
2e7788f196 | ||
|
|
9a3b2c0b63 | ||
|
|
d03e8d183d | ||
|
|
b2f7a76bc6 | ||
|
|
da138d4e46 | ||
|
|
2132f1bdae | ||
|
|
68af82280a | ||
|
|
b247127dc9 | ||
|
|
84d6d40b57 | ||
|
|
31683703d9 | ||
|
|
23a31f45b2 | ||
|
|
46d90a06de | ||
|
|
13cc8ceb43 | ||
|
|
31f99f4be8 | ||
|
|
dcda111779 | ||
|
|
cc261eb5e5 | ||
|
|
2723efefd7 | ||
|
|
b767c1a0ae | ||
|
|
76ff9fa1d2 | ||
|
|
bb656dfc91 | ||
|
|
c5a9bb780f | ||
|
|
9863f8481f | ||
|
|
fa67588218 | ||
|
|
e8409e6ff1 | ||
|
|
2f2bca0e93 | ||
|
|
040d735887 | ||
|
|
4b3730011f | ||
|
|
ec2c0bc6fe | ||
|
|
3705377c3c | ||
|
|
ed5b0214e9 | ||
|
|
11bb0eb6fe | ||
|
|
7779cf2c60 | ||
|
|
288ae329aa | ||
|
|
c0a19450a3 | ||
|
|
0acb80424e | ||
|
|
01eee8cabb | ||
|
|
a7b463e9d4 | ||
|
|
aa9227c3ba | ||
|
|
5f024ec157 | ||
|
|
e2d7bf541d | ||
|
|
d8fe8a2681 | ||
|
|
36e9a8929c | ||
|
|
b51f57fd85 | ||
|
|
14d1cc2a4f | ||
|
|
376f8390b6 | ||
|
|
06e02a2a81 | ||
|
|
37c2195cfc | ||
|
|
b9c4183b5c | ||
|
|
b553ceaa71 | ||
|
|
d7d2db33bc | ||
|
|
32f747588a | ||
|
|
ee1b751d2a | ||
|
|
8a170f1c61 | ||
|
|
a2f7a8f34b | ||
|
|
476b31d101 | ||
|
|
a2236b4e89 | ||
|
|
57d670faa6 | ||
|
|
510ac2e95e | ||
|
|
46fb5b6ccb | ||
|
|
c77dc57fda | ||
|
|
c96f6e6400 | ||
|
|
92f43d6687 | ||
|
|
3b87c7a1f7 | ||
|
|
32e30e06a2 | ||
|
|
b3b06d2703 | ||
|
|
806a3bfa73 | ||
|
|
801f6a504c | ||
|
|
e5fa6451ca | ||
|
|
aa62b729d6 | ||
|
|
a4e730506f | ||
|
|
86b03d3ef8 | ||
|
|
b1ff8f3fde | ||
|
|
a7c8af2fc8 | ||
|
|
37e43905ea | ||
|
|
ad9f6f5e7e | ||
|
|
e4a22c1957 | ||
|
|
b6f4eee12f | ||
|
|
c102869b66 | ||
|
|
3218e2bc88 | ||
|
|
400fafafc9 | ||
|
|
30021a9579 | ||
|
|
9e50696cbd | ||
|
|
6b600373d7 | ||
|
|
5f14a860da | ||
|
|
015670ef67 | ||
|
|
d54ff9d140 | ||
|
|
2333fd7d82 | ||
|
|
8abfc02bb1 | ||
|
|
4611df2cb0 | ||
|
|
191aa42940 | ||
|
|
09faa86b63 | ||
|
|
bdf3967ae7 | ||
|
|
291bf20529 | ||
|
|
eb9fda6709 | ||
|
|
6c66d7db0a | ||
|
|
f5cf503dbd | ||
|
|
a6cbcabeb8 | ||
|
|
0908350a64 | ||
|
|
8fb670338e | ||
|
|
53b4670997 | ||
|
|
1c57b2f174 | ||
|
|
e95208c87d | ||
|
|
0bf2b76c6d | ||
|
|
92d23d1b8f | ||
|
|
9fdcd4b3dc | ||
|
|
6cf0ff17c2 | ||
|
|
8be9d9a7e8 | ||
|
|
abecd36aa3 | ||
|
|
c948f9f3f9 | ||
|
|
d90da43810 | ||
|
|
3cd1ab20e5 | ||
|
|
b1b903ac3f | ||
|
|
29bb203283 | ||
|
|
234cbe5c25 | ||
|
|
cb7214b2f7 | ||
|
|
3d62944b04 | ||
|
|
26e403a521 | ||
|
|
6d36ca2303 | ||
|
|
f3b42904a5 | ||
|
|
0fc7dc5b75 | ||
|
|
b4bf98a126 | ||
|
|
6257e2d29a | ||
|
|
130e77f4fa | ||
|
|
39b99473ea | ||
|
|
e36e886cf7 | ||
|
|
85166660d6 | ||
|
|
e5581d39a5 | ||
|
|
d043c9c265 | ||
|
|
e642d17a4d | ||
|
|
6570de93dc | ||
|
|
2dfc4a7ac6 | ||
|
|
87bb643dbb | ||
|
|
524d0abc13 | ||
|
|
287b1fe70f | ||
|
|
442946d6c9 | ||
|
|
7eca206b77 | ||
|
|
d65747d78b | ||
|
|
a2aa6d4e64 | ||
|
|
e0e28a7aae | ||
|
|
65b3bc2a93 | ||
|
|
3f36df51d8 | ||
|
|
76d509dd6f | ||
|
|
50c38a5733 | ||
|
|
f6fbd4ab36 | ||
|
|
3a1c1caa0e | ||
|
|
e5e96cf1fd | ||
|
|
394f6f50bf | ||
|
|
690b832ce1 | ||
|
|
b53d5c485c | ||
|
|
f8f7c0dfaa | ||
|
|
073252b22a | ||
|
|
5d23fe9d97 | ||
|
|
a0acf1329d | ||
|
|
a00ad64f46 | ||
|
|
5a3e6cf080 | ||
|
|
4ddc3c769e | ||
|
|
5cf77a2a7b | ||
|
|
a956537fd3 | ||
|
|
fc31e90ca5 | ||
|
|
44c62d3d0a | ||
|
|
153725d4ba | ||
|
|
b678f28f71 | ||
|
|
7ec8fad952 | ||
|
|
5818a3045d | ||
|
|
d906619ed2 | ||
|
|
ca609fa9a6 | ||
|
|
3f839063e3 | ||
|
|
7e5823d742 | ||
|
|
4890c5327e | ||
|
|
8640a90adb | ||
|
|
a1701cb901 | ||
|
|
08590f3759 | ||
|
|
9158e8aa03 | ||
|
|
67ba5eb6e8 | ||
|
|
02eab2eb72 | ||
|
|
99ceb100fe | ||
|
|
611d2c89af | ||
|
|
720e0c7623 | ||
|
|
519e231710 | ||
|
|
94d9aa2d31 | ||
|
|
07e3ae1f52 | ||
|
|
43845ae14d | ||
|
|
c31111a5f0 | ||
|
|
33d24d6314 | ||
|
|
9dfe3e854f | ||
|
|
612faec1ac | ||
|
|
f5b8c0b3e8 | ||
|
|
f498b5ef45 | ||
|
|
f09d3e86b3 | ||
|
|
2b18e934c6 | ||
|
|
0a9249a401 | ||
|
|
8748d808b2 | ||
|
|
cab8a28fe4 | ||
|
|
3d78e8e656 | ||
|
|
0af52a0cd7 | ||
|
|
93fa2ba196 | ||
|
|
46595a3276 | ||
|
|
308880e894 | ||
|
|
febb17322b | ||
|
|
b212ce0d85 | ||
|
|
3271e8f53a | ||
|
|
2e5abcc03a | ||
|
|
20b35ab1eb | ||
|
|
d8a0a14591 | ||
|
|
66921438dd | ||
|
|
1220779c31 | ||
|
|
4df44aafaf | ||
|
|
f9486b531f | ||
|
|
c701a6e452 | ||
|
|
a829c8b69c | ||
|
|
46b8a32c6e | ||
|
|
b8a8b54fda | ||
|
|
e78fbfd2a2 | ||
|
|
3146ddb5c2 | ||
|
|
6631036834 | ||
|
|
147522bb61 | ||
|
|
4d080e50f6 | ||
|
|
8e9a3a200b | ||
|
|
d5923ee4ca | ||
|
|
080a7ebb37 | ||
|
|
297ed85ea1 | ||
|
|
5845fed5cb | ||
|
|
d9517c14af | ||
|
|
4cccb339bc | ||
|
|
e1e913f87c | ||
|
|
eae9a5c1ce | ||
|
|
b3526d3b90 | ||
|
|
6e46183e35 | ||
|
|
d01b40e439 | ||
|
|
a33955d60f | ||
|
|
72931be7e8 | ||
|
|
908c946a23 | ||
|
|
5802eec5d4 | ||
|
|
e962355bda | ||
|
|
a35d6c95a9 | ||
|
|
c7b5d11320 | ||
|
|
30cd06b6e1 | ||
|
|
39a3d4aa3e | ||
|
|
d8b37d28a3 | ||
|
|
3413c2e10f | ||
|
|
0e1e79f0e0 | ||
|
|
14d8e1c2b5 | ||
|
|
6ee0e05fb9 | ||
|
|
94f8991154 | ||
|
|
4ce17c9aa6 | ||
|
|
5185d3a76a | ||
|
|
f56cc4156e | ||
|
|
0b7490e7e4 | ||
|
|
ea1e90f95a | ||
|
|
ebebe2dd93 | ||
|
|
cec83436f2 | ||
|
|
adc36c3b4b | ||
|
|
c481032c1b | ||
|
|
ac0f446734 | ||
|
|
a2aba62fe0 | ||
|
|
55d3172d22 | ||
|
|
751eb7610b | ||
|
|
b624395cca | ||
|
|
ddced9ab1d | ||
|
|
7a6c0fc682 | ||
|
|
5683217169 | ||
|
|
0725d04506 | ||
|
|
ad18b90759 | ||
|
|
dd2207f210 | ||
|
|
75cdc2dedf | ||
|
|
d2f3c1b991 | ||
|
|
d179489d46 | ||
|
|
f5afdf8e2a | ||
|
|
6edac6e2df | ||
|
|
6de27c1497 | ||
|
|
200ff7fa83 | ||
|
|
88ebfc6dcd | ||
|
|
2ada9c8628 | ||
|
|
3427f6b172 | ||
|
|
495b8de002 | ||
|
|
4e44c3b7e2 | ||
|
|
515d6ccc8e | ||
|
|
f517376cca | ||
|
|
cd5ad177a2 | ||
|
|
cd3f42096b | ||
|
|
434643dd4d | ||
|
|
f0e0137b61 | ||
|
|
e0319e8423 | ||
|
|
046f1d7b1f | ||
|
|
3fef275c89 | ||
|
|
2d3bf69c77 | ||
|
|
35f98ad8b6 | ||
|
|
ce04965208 | ||
|
|
c21ceb956c | ||
|
|
f5ebc95d0d | ||
|
|
9786c0e5cb | ||
|
|
1f6cb6f84a | ||
|
|
edebad0e78 | ||
|
|
d5a6223958 | ||
|
|
ebf3d99b95 | ||
|
|
d41e30a716 | ||
|
|
bd26865f7d | ||
|
|
5a722a152a | ||
|
|
0083cfc35b | ||
|
|
542acd43b8 | ||
|
|
eb89d7b53a | ||
|
|
3e468e6ff6 | ||
|
|
73c139e29b | ||
|
|
e2cd000552 | ||
|
|
099b37d073 | ||
|
|
94cf912176 | ||
|
|
d6ecc0d448 | ||
|
|
f4e7559bd2 | ||
|
|
9c0a2b2145 | ||
|
|
79757db4c2 | ||
|
|
727b687ae6 | ||
|
|
25486d5089 | ||
|
|
fc38cc4d36 | ||
|
|
8205a888cb | ||
|
|
1b8033b594 | ||
|
|
a32d6d79a3 | ||
|
|
c7dd9dfb50 | ||
|
|
315eb0a168 | ||
|
|
a9ca88d156 | ||
|
|
8e04644abd | ||
|
|
059db7a4f2 | ||
|
|
d3958ee85c | ||
|
|
cf7f386fd4 | ||
|
|
f1c8df81fa | ||
|
|
63ebb100e4 | ||
|
|
3c470c9db6 | ||
|
|
6747ebd985 | ||
|
|
9de3a84f91 | ||
|
|
ab8cc1c511 | ||
|
|
ae7d45d612 | ||
|
|
c348f9405e | ||
|
|
d68991eec0 | ||
|
|
1a119d500a | ||
|
|
642f392ba3 | ||
|
|
c034336452 | ||
|
|
6742cba572 | ||
|
|
abb9cc9cd8 | ||
|
|
8b07a4a214 | ||
|
|
9c218ea879 | ||
|
|
bcbf482347 | ||
|
|
de3a870bcd | ||
|
|
98754fa9d1 | ||
|
|
29321bcafa | ||
|
|
47073183e3 | ||
|
|
747e7945f9 | ||
|
|
9b4163af53 | ||
|
|
ca7fc8e96a | ||
|
|
b24e2d4dd8 | ||
|
|
9542a0e212 | ||
|
|
4518875853 | ||
|
|
954c91c551 | ||
|
|
8a27e4f4a6 | ||
|
|
97f8b83e2d | ||
|
|
13d61651f8 | ||
|
|
42efc1c2b5 | ||
|
|
3360c3af0c | ||
|
|
5b4d327909 | ||
|
|
9d06256018 | ||
|
|
a4750dfae7 | ||
|
|
dfd01b8331 | ||
|
|
15703817a9 | ||
|
|
d2b87ec47e | ||
|
|
ee5a1e0735 | ||
|
|
feed868771 | ||
|
|
426a3c1204 | ||
|
|
a2a61197aa | ||
|
|
f1360e4d06 | ||
|
|
dfa5cb68c0 | ||
|
|
f75166dd98 | ||
|
|
859507f757 | ||
|
|
b043ee1241 | ||
|
|
6c5e37a593 | ||
|
|
58067df6c7 | ||
|
|
328d540a34 | ||
|
|
7a1fcfa419 | ||
|
|
ff0e403315 | ||
|
|
2f0dd6b249 | ||
|
|
53f99e0966 | ||
|
|
fb984423fc | ||
|
|
dafe255d8a | ||
|
|
52df94498e | ||
|
|
eceb405b87 | ||
|
|
238950487f | ||
|
|
7c22743e8e | ||
|
|
2a07e56c05 | ||
|
|
a7372ec352 | ||
|
|
996c2f8d3b | ||
|
|
2d7fcc8553 | ||
|
|
7bc9c34c55 | ||
|
|
21f8fa203a | ||
|
|
acd5a4278a | ||
|
|
51fd7c574f | ||
|
|
239c45e0f5 | ||
|
|
0d41b14350 | ||
|
|
be4c660148 | ||
|
|
0c8e622e1a | ||
|
|
f383c2a622 | ||
|
|
e117aee161 | ||
|
|
b5c82e2e41 | ||
|
|
441b270234 | ||
|
|
41220f0911 | ||
|
|
84728ecf74 | ||
|
|
918973d9fc | ||
|
|
763e6be682 | ||
|
|
13fde5a0b1 | ||
|
|
ed7658df79 | ||
|
|
879d58b86b | ||
|
|
94594831a9 | ||
|
|
3972bca340 | ||
|
|
3ac720455a | ||
|
|
b941208aa1 | ||
|
|
bae373c322 | ||
|
|
29d45ed0d1 | ||
|
|
e5d0555815 | ||
|
|
e3d0563a73 | ||
|
|
55fbd675c6 | ||
|
|
38e7d90442 | ||
|
|
3417e79f88 | ||
|
|
ebe57002d6 | ||
|
|
0917096d34 | ||
|
|
cb0c04e1d4 | ||
|
|
08677fc32a | ||
|
|
284d51f650 | ||
|
|
db82e34584 | ||
|
|
4c3073f955 | ||
|
|
5bb857476f | ||
|
|
35bbc743d4 | ||
|
|
52fed52f9c | ||
|
|
f4a6b264fd | ||
|
|
1b0aacf4c8 | ||
|
|
0051ab6330 | ||
|
|
b19fbb9e4e | ||
|
|
a29e811343 | ||
|
|
505b31ee08 | ||
|
|
5f2e591745 | ||
|
|
53e4b5b90b | ||
|
|
65dc3358db | ||
|
|
33a65add7d | ||
|
|
e63f0baf7e | ||
|
|
90c3d4e0ca | ||
|
|
3c882637c2 | ||
|
|
4adbc1e1db | ||
|
|
72b4a68953 | ||
|
|
7e67d1f00d | ||
|
|
5436f45bd1 | ||
|
|
cde7807ceb | ||
|
|
2aa344d77a | ||
|
|
2d74d46d3f | ||
|
|
7191f26717 | ||
|
|
2cbd7f1b3c | ||
|
|
f7ae23e639 | ||
|
|
0894356a3c | ||
|
|
e0bb475838 | ||
|
|
2ac77da499 | ||
|
|
596f9b4327 | ||
|
|
de5e1d93e4 | ||
|
|
26a82c3575 | ||
|
|
8625a8bd6b | ||
|
|
0e367c3715 |
@@ -10,10 +10,10 @@ set (CTEST_NIGHTLY_START_TIME "18:00:00 CST")
|
||||
set (CTEST_DROP_METHOD "http")
|
||||
if (CDASH_LOCAL)
|
||||
set (CTEST_DROP_SITE "10.10.10.82")
|
||||
set (CTEST_DROP_LOCATION "/submit.php?project=HDF5Trunk")
|
||||
set (CTEST_DROP_LOCATION "/submit.php?project=HDF5110")
|
||||
else (CDASH_LOCAL)
|
||||
set (CTEST_DROP_SITE "cdash.hdfgroup.org")
|
||||
set (CTEST_DROP_LOCATION "/submit.php?project=HDF5+Trunk")
|
||||
set (CTEST_DROP_LOCATION "/submit.php?project=HDF5110")
|
||||
endif (CDASH_LOCAL)
|
||||
set (CTEST_DROP_SITE_CDASH TRUE)
|
||||
|
||||
|
||||
168
MANIFEST
168
MANIFEST
@@ -442,6 +442,7 @@
|
||||
./src/H5Aprivate.h
|
||||
./src/H5Apublic.h
|
||||
./src/H5AC.c
|
||||
./src/H5AClog.c
|
||||
./src/H5ACmodule.h
|
||||
./src/H5ACmpio.c
|
||||
./src/H5ACpkg.h
|
||||
@@ -475,24 +476,29 @@
|
||||
./src/H5CSprivate.h
|
||||
./src/H5D.c
|
||||
./src/H5Dbtree.c
|
||||
./src/H5Dbtree2.c
|
||||
./src/H5Dchunk.c
|
||||
./src/H5Dcompact.c
|
||||
./src/H5Dcontig.c
|
||||
./src/H5Ddbg.c
|
||||
./src/H5Ddeprec.c
|
||||
./src/H5Dearray.c
|
||||
./src/H5Defl.c
|
||||
./src/H5Dfarray.c
|
||||
./src/H5Dfill.c
|
||||
./src/H5Dint.c
|
||||
./src/H5Dio.c
|
||||
./src/H5Dlayout.c
|
||||
./src/H5Dmodule.h
|
||||
./src/H5Dmpio.c
|
||||
./src/H5Dnone.c
|
||||
./src/H5Doh.c
|
||||
./src/H5Dpkg.h
|
||||
./src/H5Dprivate.h
|
||||
./src/H5Dpublic.h
|
||||
./src/H5Dscatgath.c
|
||||
./src/H5Dselect.c
|
||||
./src/H5Dsingle.c
|
||||
./src/H5Dtest.c
|
||||
./src/H5Dvirtual.c
|
||||
./src/H5E.c
|
||||
@@ -542,6 +548,7 @@
|
||||
./src/H5FAdblkpage.c
|
||||
./src/H5FAdblock.c
|
||||
./src/H5FAhdr.c
|
||||
./src/H5FAint.c
|
||||
./src/H5FAmodule.h
|
||||
./src/H5FApkg.h
|
||||
./src/H5FAprivate.h
|
||||
@@ -573,6 +580,7 @@
|
||||
./src/H5FDspace.c
|
||||
./src/H5FDstdio.c
|
||||
./src/H5FDstdio.h
|
||||
./src/H5FDtest.c
|
||||
./src/H5FDwindows.c
|
||||
./src/H5FDwindows.h
|
||||
./src/H5FL.c
|
||||
@@ -583,6 +591,7 @@
|
||||
./src/H5FS.c
|
||||
./src/H5FScache.c
|
||||
./src/H5FSdbg.c
|
||||
./src/H5FSint.c
|
||||
./src/H5FSmodule.h
|
||||
./src/H5FSpkg.h
|
||||
./src/H5FSprivate.h
|
||||
@@ -621,6 +630,7 @@
|
||||
./src/H5HFhdr.c
|
||||
./src/H5HFhuge.c
|
||||
./src/H5HFiblock.c
|
||||
./src/H5HFint.c
|
||||
./src/H5HFiter.c
|
||||
./src/H5HFman.c
|
||||
./src/H5HFmodule.h
|
||||
@@ -695,6 +705,7 @@
|
||||
./src/H5Odtype.c
|
||||
./src/H5Oefl.c
|
||||
./src/H5Ofill.c
|
||||
./src/H5Oflush.c
|
||||
./src/H5Ofsinfo.c
|
||||
./src/H5Oginfo.c
|
||||
./src/H5Olayout.c
|
||||
@@ -708,6 +719,7 @@
|
||||
./src/H5Opkg.h
|
||||
./src/H5Opline.c
|
||||
./src/H5Oprivate.h
|
||||
./src/H5Oproxy.c
|
||||
./src/H5Opublic.h
|
||||
./src/H5Orefcount.c
|
||||
./src/H5Osdspace.c
|
||||
@@ -830,25 +842,37 @@
|
||||
./src/libhdf5.settings.in
|
||||
./src/H5win32defs.h
|
||||
|
||||
./test/AtomicWriterReader.txt
|
||||
./test/COPYING
|
||||
./test/H5srcdir.h
|
||||
./test/H5srcdir_str.h.in
|
||||
./test/Makefile.am
|
||||
./test/POSIX_Order_Write_Test_Report.docx
|
||||
./test/POSIX_Order_Write_Test_Report.pdf
|
||||
./test/SWMR_POSIX_Order_UG.txt
|
||||
./test/SWMR_UseCase_UG.txt
|
||||
./test/accum.c
|
||||
./test/accum_swmr_reader.c
|
||||
./test/app_ref.c
|
||||
./test/atomic_reader.c
|
||||
./test/atomic_writer.c
|
||||
./test/bad_compound.h5
|
||||
./test/be_data.h5
|
||||
./test/be_extlink1.h5
|
||||
./test/be_extlink2.h5
|
||||
./test/big.c
|
||||
./test/bittests.c
|
||||
./test/btree_idx_1_6.h5
|
||||
./test/btree_idx_1_8.h5
|
||||
./test/btree2.c
|
||||
./test/cache.c
|
||||
./test/cache_api.c
|
||||
./test/cache_common.c
|
||||
./test/cache_common.h
|
||||
./test/cache_logging.c
|
||||
./test/cache_tagging.c
|
||||
./test/cmpd_dset.c
|
||||
./test/cork.c
|
||||
./test/corrupt_stab_msg.h5
|
||||
./test/cross_read.c
|
||||
./test/dangle.c
|
||||
@@ -887,6 +911,7 @@
|
||||
./test/filter_fail.c
|
||||
./test/flush1.c
|
||||
./test/flush2.c
|
||||
./test/flushrefresh.c
|
||||
./test/gen_bad_ohdr.c
|
||||
./test/gen_bad_compound.c
|
||||
./test/gen_bogus.c
|
||||
@@ -894,6 +919,7 @@
|
||||
./test/gen_deflate.c
|
||||
./test/gen_file_image.c
|
||||
./test/gen_filespace.c
|
||||
./test/gen_idx.c
|
||||
./test/gen_mergemsg.c
|
||||
./test/gen_new_array.c
|
||||
./test/gen_new_fill.c
|
||||
@@ -941,6 +967,19 @@
|
||||
# ====end distribute this for now. See HDFFV-8236====
|
||||
./test/specmetaread.h5
|
||||
./test/stab.c
|
||||
./test/swmr.c
|
||||
./test/swmr_addrem_writer.c
|
||||
./test/swmr_check_compat_vfd.c
|
||||
./test/swmr_common.c
|
||||
./test/swmr_common.h
|
||||
./test/swmr_generator.c
|
||||
./test/swmr_reader.c
|
||||
./test/swmr_remove_reader.c
|
||||
./test/swmr_remove_writer.c
|
||||
./test/swmr_sparse_reader.c
|
||||
./test/swmr_sparse_writer.c
|
||||
./test/swmr_start_write.c
|
||||
./test/swmr_writer.c
|
||||
./test/tarray.c
|
||||
./test/tarrold.h5
|
||||
./test/tattr.c
|
||||
@@ -953,12 +992,16 @@
|
||||
./test/testcheck_version.sh.in
|
||||
./test/testerror.sh.in
|
||||
./test/testlinks_env.sh.in
|
||||
./test/testflushrefresh.sh.in
|
||||
./test/testframe.c
|
||||
./test/testhdf5.c
|
||||
./test/testhdf5.h
|
||||
./test/testlibinfo.sh.in
|
||||
./test/test_plugin.sh.in
|
||||
./test/test_usecases.sh.in
|
||||
./test/testmeta.c
|
||||
./test/testswmr.sh.in
|
||||
./test/testvdsswmr.sh.in
|
||||
./test/tfile.c
|
||||
./test/tgenprop.c
|
||||
./test/th5o.c
|
||||
@@ -989,14 +1032,24 @@
|
||||
./test/tunicode.c
|
||||
./test/tvlstr.c
|
||||
./test/tvltypes.c
|
||||
./test/twriteorder.c
|
||||
./test/unlink.c
|
||||
./test/unregister.c
|
||||
./test/use_append_chunk.c
|
||||
./test/use_append_mchunks.c
|
||||
./test/use_common.c
|
||||
./test/use_disable_mdc_flushes.c
|
||||
./test/use.h
|
||||
./test/vfd.c
|
||||
./test/test_filters_le.h5
|
||||
./test/test_filters_be.h5
|
||||
./test/gen_filters.c
|
||||
./test/chunk_info.c
|
||||
./test/vds.c
|
||||
./test/vds_swmr.h
|
||||
./test/vds_swmr_gen.c
|
||||
./test/vds_swmr_reader.c
|
||||
./test/vds_swmr_writer.c
|
||||
|
||||
./test/testfiles/err_compat_1
|
||||
./test/testfiles/err_compat_2
|
||||
@@ -1210,6 +1263,29 @@
|
||||
./tools/h5diff/testh5diff.sh.in
|
||||
./tools/h5diff/testph5diff.sh.in
|
||||
|
||||
# h5format_convert sources
|
||||
./tools/h5format_convert/Makefile.am
|
||||
./tools/h5format_convert/h5fc_chk_idx.c
|
||||
./tools/h5format_convert/h5fc_gentest.c
|
||||
./tools/h5format_convert/h5format_convert.c
|
||||
./tools/h5format_convert/testfiles/h5fc_v_n_all.ddl
|
||||
./tools/h5format_convert/testfiles/h5fc_v_bt1.ddl
|
||||
./tools/h5format_convert/testfiles/h5fc_v_non_chunked.ddl
|
||||
./tools/h5format_convert/testfiles/h5fc_d_file.ddl
|
||||
./tools/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl
|
||||
./tools/h5format_convert/testfiles/h5fc_dname.ddl
|
||||
./tools/h5format_convert/testfiles/h5fc_nonexistdset_file.ddl
|
||||
./tools/h5format_convert/testfiles/h5fc_help.ddl
|
||||
./tools/h5format_convert/testfiles/h5fc_v_all.ddl
|
||||
./tools/h5format_convert/testfiles/h5fc_nooption.ddl
|
||||
./tools/h5format_convert/testfiles/h5fc_v_n_1d.ddl
|
||||
./tools/h5format_convert/testfiles/h5fc_nonexistfile.ddl
|
||||
./tools/h5format_convert/testfiles/h5fc_non_v3.h5
|
||||
./tools/h5format_convert/testfiles/h5fc_latest_v3.h5
|
||||
./tools/h5format_convert/testfiles/h5fc_edge_v3.h5
|
||||
./tools/h5format_convert/testfiles/h5fc_v1.h5
|
||||
./tools/h5format_convert/testh5fc.sh.in
|
||||
|
||||
# h5repack sources
|
||||
./tools/h5repack/Makefile.am
|
||||
./tools/h5repack/dynlib_rpk.c
|
||||
@@ -1269,6 +1345,10 @@
|
||||
|
||||
./tools/misc/Makefile.am
|
||||
./tools/misc/h5cc.in
|
||||
./tools/misc/h5clear.c
|
||||
./tools/misc/h5clear_gentest.c
|
||||
./tools/misc/clear_open_chk.c
|
||||
./tools/misc/testh5clear.sh.in
|
||||
./tools/misc/h5debug.c
|
||||
./tools/misc/h5mkgrp.c
|
||||
./tools/misc/h5redeploy.in
|
||||
@@ -1318,6 +1398,8 @@
|
||||
./tools/h5stat/testfiles/h5stat_filters.h5
|
||||
./tools/h5stat/testfiles/h5stat_help1.ddl
|
||||
./tools/h5stat/testfiles/h5stat_help2.ddl
|
||||
./tools/h5stat/testfiles/h5stat_idx.h5
|
||||
./tools/h5stat/testfiles/h5stat_idx.ddl
|
||||
./tools/h5stat/testfiles/h5stat_links1.ddl
|
||||
./tools/h5stat/testfiles/h5stat_links2.ddl
|
||||
./tools/h5stat/testfiles/h5stat_links3.ddl
|
||||
@@ -1457,6 +1539,9 @@
|
||||
./tools/testfiles/tdset-3s.ddl
|
||||
./tools/testfiles/tdset.h5
|
||||
./tools/testfiles/tdset2.h5
|
||||
./tools/testfiles/tdset_idx.ls
|
||||
./tools/testfiles/tdset_idx.ddl
|
||||
./tools/testfiles/tdset_idx.h5
|
||||
./tools/testfiles/tempty.ddl
|
||||
./tools/testfiles/tempty.h5
|
||||
./tools/testfiles/tenum.h5
|
||||
@@ -2058,6 +2143,7 @@
|
||||
./tools/h5diff/testfiles/h5diff_457.txt
|
||||
./tools/h5diff/testfiles/h5diff_458.txt
|
||||
./tools/h5diff/testfiles/h5diff_459.txt
|
||||
./tools/h5diff/testfiles/h5diff_idx.txt
|
||||
./tools/h5diff/testfiles/h5diff_465.txt
|
||||
./tools/h5diff/testfiles/h5diff_466.txt
|
||||
./tools/h5diff/testfiles/h5diff_467.txt
|
||||
@@ -2106,6 +2192,8 @@
|
||||
./tools/h5diff/testfiles/h5diff_basic2.h5
|
||||
./tools/h5diff/testfiles/h5diff_dset1.h5
|
||||
./tools/h5diff/testfiles/h5diff_dset2.h5
|
||||
./tools/h5diff/testfiles/h5diff_dset_idx1.h5
|
||||
./tools/h5diff/testfiles/h5diff_dset_idx2.h5
|
||||
./tools/h5diff/testfiles/h5diff_dtypes.h5
|
||||
./tools/h5diff/testfiles/h5diff_empty.h5
|
||||
./tools/h5diff/testfiles/h5diff_hyper1.h5
|
||||
@@ -2218,6 +2306,8 @@
|
||||
./tools/h5copy/testfiles/h5copy_extlinks_trg.h5
|
||||
./tools/h5copy/testfiles/h5copy_extlinks_src.out.ls
|
||||
./tools/h5copy/testfiles/h5copy_misc1.out
|
||||
./tools/h5copy/testfiles/h5copytst_new.h5
|
||||
./tools/h5copy/testfiles/h5copytst_new.out.ls
|
||||
|
||||
# test files for h5mkgrp
|
||||
./tools/testfiles/h5mkgrp_nested_p.ls
|
||||
@@ -2294,6 +2384,9 @@
|
||||
./hl/src/H5IM.c
|
||||
./hl/src/H5IMprivate.h
|
||||
./hl/src/H5IMpublic.h
|
||||
./hl/src/H5LD.c
|
||||
./hl/src/H5LDprivate.h
|
||||
./hl/src/H5LDpublic.h
|
||||
./hl/src/H5LT.c
|
||||
./hl/src/H5LTanalyze.c
|
||||
./hl/src/H5LTanalyze.l
|
||||
@@ -2310,34 +2403,38 @@
|
||||
./hl/src/H5TBpublic.h
|
||||
./hl/src/hdf5_hl.h
|
||||
./hl/test/COPYING
|
||||
./hl/test/H5srcdir_str.h.in
|
||||
./hl/test/Makefile.am
|
||||
./hl/test/dectris_hl_perf.c
|
||||
./hl/test/dsdata.txt
|
||||
./hl/test/dslat.txt
|
||||
./hl/test/dslon.txt
|
||||
./hl/test/dtype_file.txt
|
||||
./hl/test/dtype_file_readable.txt
|
||||
./hl/test/dtype_file.txt
|
||||
./hl/test/earth.pal
|
||||
./hl/test/gen_test_ds.c
|
||||
./hl/test/gen_test_ld.c
|
||||
./hl/test/h5hltest.h
|
||||
./hl/test/image8.txt
|
||||
./hl/test/H5srcdir_str.h.in
|
||||
./hl/test/image24pixel.txt
|
||||
./hl/test/image24plane.txt
|
||||
./hl/test/image8.txt
|
||||
./hl/test/Makefile.am
|
||||
./hl/test/pal_rgb.h
|
||||
./hl/test/sepia.pal
|
||||
./hl/test/dectris_hl_perf.c
|
||||
./hl/test/gen_test_ds.c
|
||||
./hl/test/test_ds_be.h5
|
||||
./hl/test/test_ds.c
|
||||
./hl/test/test_dset_append.c
|
||||
./hl/test/test_dset_opt.c
|
||||
./hl/test/test_ds_le.h5
|
||||
./hl/test/test_file_image.c
|
||||
./hl/test/test_image.c
|
||||
./hl/test/test_ld.c
|
||||
./hl/test/test_ld.h5
|
||||
./hl/test/test_lite.c
|
||||
./hl/test/test_packet.c
|
||||
./hl/test/test_table.c
|
||||
./hl/test/test_ds_le.h5
|
||||
./hl/test/test_ds_be.h5
|
||||
./hl/test/test_table_le.h5
|
||||
./hl/test/test_table_be.h5
|
||||
./hl/test/test_table.c
|
||||
./hl/test/test_table_cray.h5
|
||||
./hl/test/test_table_le.h5
|
||||
./hl/test/usa.wri
|
||||
|
||||
# tools
|
||||
@@ -2358,7 +2455,53 @@
|
||||
./hl/tools/gif2h5/testfiles/ex_image2.h5
|
||||
./hl/tools/gif2h5/testfiles/image1.gif
|
||||
./hl/tools/gif2h5/testfiles/h52giftst.h5
|
||||
#
|
||||
./hl/tools/h5watch/Makefile.am
|
||||
./hl/tools/h5watch/extend_dset.c
|
||||
./hl/tools/h5watch/h5watch.c
|
||||
./hl/tools/h5watch/h5watchgentest.c
|
||||
./hl/tools/h5watch/swmr_check_compat_vfd.c
|
||||
./hl/tools/h5watch/testh5watch.sh.in
|
||||
|
||||
# expected test output from testing h5watch
|
||||
#
|
||||
./hl/tools/testfiles/w-err-cmpd1.ddl
|
||||
./hl/tools/testfiles/w-err-cmpd2.ddl
|
||||
./hl/tools/testfiles/w-err-cmpd3.ddl
|
||||
./hl/tools/testfiles/w-err-cmpd4.ddl
|
||||
./hl/tools/testfiles/w-err-cmpd5.ddl
|
||||
./hl/tools/testfiles/w-err-dset1.ddl
|
||||
./hl/tools/testfiles/w-err-dset2.ddl
|
||||
./hl/tools/testfiles/w-err-dset-nomax.ddl
|
||||
./hl/tools/testfiles/w-err-dset-none.ddl
|
||||
./hl/tools/testfiles/w-err-file.ddl
|
||||
./hl/tools/testfiles/w-err-poll0.ddl
|
||||
./hl/tools/testfiles/w-err-poll.ddl
|
||||
./hl/tools/testfiles/w-err-width.ddl
|
||||
./hl/tools/testfiles/w-ext-cmpd.ddl
|
||||
./hl/tools/testfiles/w-ext-cmpd-esc.ddl
|
||||
./hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl
|
||||
./hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl
|
||||
./hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl
|
||||
./hl/tools/testfiles/w-ext-cmpd-f1.ddl
|
||||
./hl/tools/testfiles/w-ext-cmpd-f2.ddl
|
||||
./hl/tools/testfiles/w-ext-cmpd-ff3.ddl
|
||||
./hl/tools/testfiles/w-ext-cmpd-label.ddl
|
||||
./hl/tools/testfiles/w-ext-cmpd-two.ddl
|
||||
./hl/tools/testfiles/w-ext-cmpd-two-f1.ddl
|
||||
./hl/tools/testfiles/w-ext-cmpd-two-f3.ddl
|
||||
./hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl
|
||||
./hl/tools/testfiles/w-ext-early.ddl
|
||||
./hl/tools/testfiles/w-ext-late.ddl
|
||||
./hl/tools/testfiles/w-ext-one-d.ddl
|
||||
./hl/tools/testfiles/w-ext-one.ddl
|
||||
./hl/tools/testfiles/w-ext-one-simple.ddl
|
||||
./hl/tools/testfiles/w-ext-two-d.ddl
|
||||
./hl/tools/testfiles/w-ext-two.ddl
|
||||
./hl/tools/testfiles/w-ext-two-width.ddl
|
||||
./hl/tools/testfiles/w-help1.ddl
|
||||
|
||||
#
|
||||
# hl fortran
|
||||
./hl/fortran/COPYING
|
||||
./hl/fortran/Makefile.am
|
||||
@@ -2530,9 +2673,6 @@
|
||||
|
||||
# Files generated by autogen
|
||||
./aclocal.m4
|
||||
./autom4te.cache/output.0
|
||||
./autom4te.cache/requests
|
||||
./autom4te.cache/traces.0
|
||||
./bin/compile
|
||||
./bin/config.guess
|
||||
./bin/config.sub
|
||||
@@ -2565,6 +2705,7 @@
|
||||
./hl/src/Makefile.in
|
||||
./hl/test/Makefile.in
|
||||
./hl/tools/gif2h5/Makefile.in
|
||||
./hl/tools/h5watch/Makefile.in
|
||||
./hl/tools/Makefile.in
|
||||
./m4/libtool.m4
|
||||
./m4/lt~obsolete.m4
|
||||
@@ -2585,6 +2726,7 @@
|
||||
./tools/h5copy/Makefile.in
|
||||
./tools/h5diff/Makefile.in
|
||||
./tools/h5dump/Makefile.in
|
||||
./tools/h5format_convert/Makefile.in
|
||||
./tools/h5import/Makefile.in
|
||||
./tools/h5jam/Makefile.in
|
||||
./tools/h5ls/Makefile.in
|
||||
|
||||
1146
Makefile.in
Normal file
1146
Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
HDF5 version 1.9.233 released on 2015-10-06
|
||||
HDF5 version 1.10.0-alpha0 released on 2015-12-29
|
||||
Please refer to the release_docs/INSTALL file for installation instructions.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
||||
1195
aclocal.m4
vendored
Normal file
1195
aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
347
bin/compile
Executable file
347
bin/compile
Executable file
@@ -0,0 +1,347 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
1420
bin/config.guess
vendored
Executable file
1420
bin/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1799
bin/config.sub
vendored
Executable file
1799
bin/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
791
bin/depcomp
Executable file
791
bin/depcomp
Executable file
@@ -0,0 +1,791 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
501
bin/install-sh
Executable file
501
bin/install-sh
Executable file
@@ -0,0 +1,501 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2013-12-25.23; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# 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.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
doit=${DOITPROG-}
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# 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 $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
9661
bin/ltmain.sh
Normal file
9661
bin/ltmain.sh
Normal file
File diff suppressed because it is too large
Load Diff
215
bin/missing
Executable file
215
bin/missing
Executable file
@@ -0,0 +1,215 @@
|
||||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
148
bin/test-driver
Executable file
148
bin/test-driver
Executable file
@@ -0,0 +1,148 @@
|
||||
#! /bin/sh
|
||||
# test-driver - basic testsuite driver script.
|
||||
|
||||
scriptversion=2013-07-13.22; # UTC
|
||||
|
||||
# Copyright (C) 2011-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
# Make unconditional expansion of undefined variables an error. This
|
||||
# helps a lot in preventing typo-related bugs.
|
||||
set -u
|
||||
|
||||
usage_error ()
|
||||
{
|
||||
echo "$0: $*" >&2
|
||||
print_usage >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
print_usage ()
|
||||
{
|
||||
cat <<END
|
||||
Usage:
|
||||
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
|
||||
[--expect-failure={yes|no}] [--color-tests={yes|no}]
|
||||
[--enable-hard-errors={yes|no}] [--]
|
||||
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
|
||||
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
||||
END
|
||||
}
|
||||
|
||||
test_name= # Used for reporting.
|
||||
log_file= # Where to save the output of the test script.
|
||||
trs_file= # Where to save the metadata of the test run.
|
||||
expect_failure=no
|
||||
color_tests=no
|
||||
enable_hard_errors=yes
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
--help) print_usage; exit $?;;
|
||||
--version) echo "test-driver $scriptversion"; exit $?;;
|
||||
--test-name) test_name=$2; shift;;
|
||||
--log-file) log_file=$2; shift;;
|
||||
--trs-file) trs_file=$2; shift;;
|
||||
--color-tests) color_tests=$2; shift;;
|
||||
--expect-failure) expect_failure=$2; shift;;
|
||||
--enable-hard-errors) enable_hard_errors=$2; shift;;
|
||||
--) shift; break;;
|
||||
-*) usage_error "invalid option: '$1'";;
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
missing_opts=
|
||||
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
|
||||
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
|
||||
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
|
||||
if test x"$missing_opts" != x; then
|
||||
usage_error "the following mandatory options are missing:$missing_opts"
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
usage_error "missing argument"
|
||||
fi
|
||||
|
||||
if test $color_tests = yes; then
|
||||
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
|
||||
red='[0;31m' # Red.
|
||||
grn='[0;32m' # Green.
|
||||
lgn='[1;32m' # Light green.
|
||||
blu='[1;34m' # Blue.
|
||||
mgn='[0;35m' # Magenta.
|
||||
std='[m' # No color.
|
||||
else
|
||||
red= grn= lgn= blu= mgn= std=
|
||||
fi
|
||||
|
||||
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
|
||||
trap "st=129; $do_exit" 1
|
||||
trap "st=130; $do_exit" 2
|
||||
trap "st=141; $do_exit" 13
|
||||
trap "st=143; $do_exit" 15
|
||||
|
||||
# Test script is run here.
|
||||
"$@" >$log_file 2>&1
|
||||
estatus=$?
|
||||
|
||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||
tweaked_estatus=1
|
||||
else
|
||||
tweaked_estatus=$estatus
|
||||
fi
|
||||
|
||||
case $tweaked_estatus:$expect_failure in
|
||||
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
|
||||
0:*) col=$grn res=PASS recheck=no gcopy=no;;
|
||||
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
|
||||
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
|
||||
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
|
||||
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
|
||||
esac
|
||||
|
||||
# Report the test outcome and exit status in the logs, so that one can
|
||||
# know whether the test passed or failed simply by looking at the '.log'
|
||||
# file, without the need of also peaking into the corresponding '.trs'
|
||||
# file (automake bug#11814).
|
||||
echo "$res $test_name (exit status: $estatus)" >>$log_file
|
||||
|
||||
# Report outcome to console.
|
||||
echo "${col}${res}${std}: $test_name"
|
||||
|
||||
# Register the test result, and other relevant metadata.
|
||||
echo ":test-result: $res" > $trs_file
|
||||
echo ":global-test-result: $res" >> $trs_file
|
||||
echo ":recheck: $recheck" >> $trs_file
|
||||
echo ":copy-in-global-log: $gcopy" >> $trs_file
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
1398
c++/Makefile.in
Normal file
1398
c++/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1352
c++/examples/Makefile.in
Normal file
1352
c++/examples/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1551
c++/src/Makefile.in
Normal file
1551
c++/src/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
@@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API"
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = "1.9.233 currently under development"
|
||||
PROJECT_NUMBER = "1.10.0-alpha0 currently under development"
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
||||
1403
c++/test/Makefile.in
Normal file
1403
c++/test/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
@@ -732,7 +732,7 @@ static void test_libver_bounds()
|
||||
|
||||
/* Run the tests */
|
||||
test_libver_bounds_real(H5F_LIBVER_EARLIEST, H5O_VERSION_1, H5F_LIBVER_LATEST, H5O_VERSION_2);
|
||||
test_libver_bounds_real(H5F_LIBVER_LATEST, H5O_VERSION_2, H5F_LIBVER_EARLIEST, H5O_VERSION_1);
|
||||
test_libver_bounds_real(H5F_LIBVER_LATEST, H5O_VERSION_2, H5F_LIBVER_EARLIEST, H5O_VERSION_2);
|
||||
PASSED();
|
||||
} /* end test_libver_bounds() */
|
||||
|
||||
|
||||
BIN
c++/test/th5s.h5
BIN
c++/test/th5s.h5
Binary file not shown.
@@ -18,8 +18,8 @@
|
||||
# See libtool versioning documentation online.
|
||||
# After making changes, run bin/reconfigure to update other configure related
|
||||
# files like Makefile.in.
|
||||
LT_VERS_INTERFACE = 6
|
||||
LT_VERS_REVISION = 223
|
||||
LT_VERS_INTERFACE = 100
|
||||
LT_VERS_REVISION = 900
|
||||
LT_VERS_AGE = 0
|
||||
|
||||
## If the API changes *at all*, increment LT_VERS_INTERFACE and
|
||||
|
||||
16
configure.ac
16
configure.ac
@@ -26,7 +26,7 @@ AC_PREREQ([2.69])
|
||||
## NOTE: Do not forget to change the version number here when we do a
|
||||
## release!!!
|
||||
##
|
||||
AC_INIT([HDF5], [1.9.232], [help@hdfgroup.org])
|
||||
AC_INIT([HDF5], [1.10.0-alpha0], [help@hdfgroup.org])
|
||||
|
||||
AC_CONFIG_SRCDIR([src/H5.c])
|
||||
AC_CONFIG_HEADERS([src/H5config.h])
|
||||
@@ -50,7 +50,10 @@ AM_SILENT_RULES([yes])
|
||||
##
|
||||
## By default, it is enabled. Users can configure with
|
||||
## --disable-maintainer-mode to prevent running the autotools.
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
## AM_MAINTAINER_MODE([enable])
|
||||
##
|
||||
## Maintainer mode is disabled in releases.
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Set prefix default (install directory) to a directory in the build area.
|
||||
@@ -3058,10 +3061,14 @@ AC_CONFIG_FILES([src/libhdf5.settings
|
||||
test/Makefile
|
||||
test/testcheck_version.sh
|
||||
test/testerror.sh
|
||||
test/testflushrefresh.sh
|
||||
test/H5srcdir_str.h
|
||||
test/testlibinfo.sh
|
||||
test/testlinks_env.sh
|
||||
test/testswmr.sh
|
||||
test/test_plugin.sh
|
||||
test/test_usecases.sh
|
||||
test/testvdsswmr.sh
|
||||
testpar/Makefile
|
||||
tools/Makefile
|
||||
tools/h5dump/Makefile
|
||||
@@ -3087,11 +3094,14 @@ AC_CONFIG_FILES([src/libhdf5.settings
|
||||
tools/lib/Makefile
|
||||
tools/misc/Makefile
|
||||
tools/misc/h5cc
|
||||
tools/misc/testh5clear.sh
|
||||
tools/misc/testh5mkgrp.sh
|
||||
tools/misc/testh5repart.sh
|
||||
tools/misc/vds/Makefile
|
||||
tools/h5stat/testh5stat.sh
|
||||
tools/h5stat/Makefile
|
||||
tools/h5format_convert/Makefile
|
||||
tools/h5format_convert/testh5fc.sh
|
||||
tools/perform/Makefile
|
||||
examples/Makefile
|
||||
examples/run-c-ex.sh
|
||||
@@ -3120,6 +3130,8 @@ AC_CONFIG_FILES([src/libhdf5.settings
|
||||
hl/tools/Makefile
|
||||
hl/tools/gif2h5/Makefile
|
||||
hl/tools/gif2h5/h52giftest.sh
|
||||
hl/tools/h5watch/Makefile
|
||||
hl/tools/h5watch/testh5watch.sh
|
||||
hl/examples/Makefile
|
||||
hl/examples/run-hlc-ex.sh
|
||||
hl/c++/Makefile
|
||||
|
||||
1394
examples/Makefile.in
Normal file
1394
examples/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
@@ -288,8 +288,9 @@ main (void)
|
||||
|
||||
/* Read all VDS data */
|
||||
|
||||
//EIP We should be able to do it by using H5S_ALL instead of making selection
|
||||
// or using H5Sselect_all from vspace.
|
||||
/* EIP We should be able to do it by using H5S_ALL instead of making selection
|
||||
* or using H5Sselect_all from vspace.
|
||||
*/
|
||||
start[0] = 0;
|
||||
start[1] = 0;
|
||||
start[2] = 0;
|
||||
|
||||
1407
fortran/Makefile.in
Normal file
1407
fortran/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1382
fortran/examples/Makefile.in
Normal file
1382
fortran/examples/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1643
fortran/src/Makefile.in
Normal file
1643
fortran/src/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1577
fortran/test/Makefile.in
Normal file
1577
fortran/test/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1362
fortran/testpar/Makefile.in
Normal file
1362
fortran/testpar/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1408
hl/Makefile.in
Normal file
1408
hl/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1398
hl/c++/Makefile.in
Normal file
1398
hl/c++/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1316
hl/c++/examples/Makefile.in
Normal file
1316
hl/c++/examples/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1444
hl/c++/src/Makefile.in
Normal file
1444
hl/c++/src/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1372
hl/c++/test/Makefile.in
Normal file
1372
hl/c++/test/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1355
hl/examples/Makefile.in
Normal file
1355
hl/examples/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1402
hl/fortran/Makefile.in
Normal file
1402
hl/fortran/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1340
hl/fortran/examples/Makefile.in
Normal file
1340
hl/fortran/examples/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1535
hl/fortran/src/Makefile.in
Normal file
1535
hl/fortran/src/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1414
hl/fortran/test/Makefile.in
Normal file
1414
hl/fortran/test/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
184
hl/src/H5DO.c
184
hl/src/H5DO.c
@@ -97,3 +97,187 @@ done:
|
||||
return(ret_value);
|
||||
} /* end H5DOwrite_chunk() */
|
||||
|
||||
|
||||
/*
|
||||
* Function: H5DOappend()
|
||||
*
|
||||
* Purpose: To append elements to a dataset.
|
||||
* axis: the dataset dimension (zero-based) for the append
|
||||
* extension: the # of elements to append for the axis-th dimension
|
||||
* memtype: the datatype
|
||||
* buf: buffer with data for the append
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*
|
||||
* Programmer: Vailin Choi; Jan 2014
|
||||
*
|
||||
* Note:
|
||||
* This routine is copied from the fast forward feature branch: features/hdf5_ff
|
||||
* src/H5FF.c:H5DOappend() with the following modifications:
|
||||
* 1) Remove and replace macro calls such as
|
||||
* FUNC_ENTER_API, H5TRACE, HGOTO_ERROR
|
||||
* accordingly because hl does not have these macros
|
||||
* 2) Replace H5I_get_type() by H5Iget_type()
|
||||
* 3) Replace H5P_isa_class() by H5Pisa_class()
|
||||
* 4) Fix a bug in the following: replace extension by size[axis]
|
||||
* if(extension < old_size) {
|
||||
* ret_value = FAIL;
|
||||
* goto done;
|
||||
* }
|
||||
*/
|
||||
herr_t
|
||||
H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
|
||||
hid_t memtype, const void *buf)
|
||||
{
|
||||
|
||||
hsize_t size[H5S_MAX_RANK]; /* The new size (after extension */
|
||||
hsize_t old_size = 0; /* The size of the dimension to be extended */
|
||||
int sndims; /* Number of dimensions in dataspace (signed) */
|
||||
unsigned ndims; /* Number of dimensions in dataspace */
|
||||
hid_t space_id = FAIL; /* Old file space */
|
||||
hid_t new_space_id = FAIL; /* New file space (after extension) */
|
||||
hid_t mem_space_id = FAIL; /* Memory space for data buffer */
|
||||
hssize_t snelmts; /* Number of elements in selection (signed) */
|
||||
hsize_t nelmts; /* Number of elements in selection */
|
||||
hid_t dapl = FAIL; /* Dataset access property list */
|
||||
|
||||
hsize_t start[H5S_MAX_RANK]; /* H5Sselect_Hyperslab: starting offset */
|
||||
hsize_t count[H5S_MAX_RANK]; /* H5Sselect_hyperslab: # of blocks to select */
|
||||
hsize_t stride[H5S_MAX_RANK]; /* H5Sselect_hyperslab: # of elements to move when selecting */
|
||||
hsize_t block[H5S_MAX_RANK]; /* H5Sselect_hyperslab: # of elements in a block */
|
||||
|
||||
hsize_t *boundary = NULL; /* Boundary set in append flush property */
|
||||
H5D_append_cb_t append_cb; /* Callback function set in append flush property */
|
||||
void *udata; /* User data set in append flush property */
|
||||
hbool_t hit = FALSE; /* Boundary is hit or not */
|
||||
hsize_t k; /* Local index variable */
|
||||
unsigned u; /* Local index variable */
|
||||
herr_t ret_value = FAIL; /* Return value */
|
||||
|
||||
/* check arguments */
|
||||
if(H5I_DATASET != H5Iget_type(dset_id))
|
||||
goto done;
|
||||
|
||||
/* Get the default dataset transfer property list if the user didn't provide one */
|
||||
if(H5P_DEFAULT == dxpl_id)
|
||||
dxpl_id = H5P_DATASET_XFER_DEFAULT;
|
||||
else
|
||||
if(TRUE != H5Pisa_class(dxpl_id, H5P_DATASET_XFER))
|
||||
goto done;
|
||||
|
||||
/* Get the dataspace of the dataset */
|
||||
if(FAIL == (space_id = H5Dget_space(dset_id)))
|
||||
goto done;
|
||||
|
||||
/* Get the rank of this dataspace */
|
||||
if((sndims = H5Sget_simple_extent_ndims(space_id)) < 0)
|
||||
goto done;
|
||||
ndims = (unsigned)sndims;
|
||||
|
||||
/* Verify correct axis */
|
||||
if(axis >= ndims)
|
||||
goto done;
|
||||
|
||||
/* Get the dimensions sizes of the dataspace */
|
||||
if(H5Sget_simple_extent_dims(space_id, size, NULL) < 0)
|
||||
goto done;
|
||||
|
||||
/* Adjust the dimension size of the requested dimension,
|
||||
but first record the old dimension size */
|
||||
old_size = size[axis];
|
||||
size[axis] += extension;
|
||||
if(size[axis] < old_size)
|
||||
goto done;
|
||||
|
||||
/* Set the extent of the dataset to the new dimension */
|
||||
if(H5Dset_extent(dset_id, size) < 0)
|
||||
goto done;
|
||||
|
||||
/* Get the new dataspace of the dataset */
|
||||
if(FAIL == (new_space_id = H5Dget_space(dset_id)))
|
||||
goto done;
|
||||
|
||||
/* Select a hyperslab corresponding to the append operation */
|
||||
for(u = 0 ; u < ndims ; u++) {
|
||||
start[u] = 0;
|
||||
stride[u] = 1;
|
||||
count[u] = size[u];
|
||||
block[u] = 1;
|
||||
if(u == axis) {
|
||||
count[u] = extension;
|
||||
start[u] = old_size;
|
||||
} /* end if */
|
||||
} /* end for */
|
||||
if(FAIL == H5Sselect_hyperslab(new_space_id, H5S_SELECT_SET, start, stride, count, block))
|
||||
goto done;
|
||||
|
||||
/* The # of elemnts in the new extended dataspace */
|
||||
if((snelmts = H5Sget_select_npoints(new_space_id)) < 0)
|
||||
goto done;
|
||||
nelmts = (hsize_t)snelmts;
|
||||
|
||||
/* create a memory space */
|
||||
mem_space_id = H5Screate_simple(1, &nelmts, NULL);
|
||||
|
||||
/* Write the data */
|
||||
if(H5Dwrite(dset_id, memtype, mem_space_id, new_space_id, dxpl_id, buf) < 0)
|
||||
goto done;
|
||||
|
||||
/* Obtain the dataset's access property list */
|
||||
if((dapl = H5Dget_access_plist(dset_id)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Allocate the boundary array */
|
||||
boundary = (hsize_t *)HDmalloc(ndims * sizeof(hsize_t));
|
||||
|
||||
/* Retrieve the append flush property */
|
||||
if(H5Pget_append_flush(dapl, ndims, boundary, &append_cb, &udata) < 0)
|
||||
goto done;
|
||||
|
||||
/* No boundary for this axis */
|
||||
if(boundary[axis] == 0)
|
||||
goto done;
|
||||
|
||||
/* Determine whether a boundary is hit or not */
|
||||
for(k = start[axis]; k < size[axis]; k++)
|
||||
if(!((k + 1) % boundary[axis])) {
|
||||
hit = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
if(hit) { /* Hit the boundary */
|
||||
/* Invoke callback if there is one */
|
||||
if(append_cb && append_cb(dset_id, size, udata) < 0)
|
||||
goto done;
|
||||
|
||||
/* Do a dataset flush */
|
||||
if(H5Dflush(dset_id) < 0)
|
||||
goto done;
|
||||
} /* end if */
|
||||
|
||||
/* Indicate success */
|
||||
ret_value = SUCCEED;
|
||||
|
||||
done:
|
||||
/* Close old dataspace */
|
||||
if(space_id != FAIL && H5Sclose(space_id) < 0)
|
||||
ret_value = FAIL;
|
||||
|
||||
/* Close new dataspace */
|
||||
if(new_space_id != FAIL && H5Sclose(new_space_id) < 0)
|
||||
ret_value = FAIL;
|
||||
|
||||
/* Close memory dataspace */
|
||||
if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0)
|
||||
ret_value = FAIL;
|
||||
|
||||
/* Close the dataset access property list */
|
||||
if(dapl != FAIL && H5Pclose(dapl) < 0)
|
||||
ret_value = FAIL;
|
||||
|
||||
if(boundary)
|
||||
HDfree(boundary);
|
||||
|
||||
return ret_value;
|
||||
} /* H5DOappend() */
|
||||
|
||||
|
||||
@@ -22,17 +22,16 @@ extern "C" {
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Direct chunk write function
|
||||
* "Optimized dataset" routines.
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
H5_HLDLL herr_t H5DOwrite_chunk(hid_t dset_id,
|
||||
hid_t dxpl_id,
|
||||
uint32_t filters,
|
||||
const hsize_t *offset,
|
||||
size_t data_size,
|
||||
const void *buf);
|
||||
H5_HLDLL herr_t H5DOwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters,
|
||||
const hsize_t *offset, size_t data_size, const void *buf);
|
||||
|
||||
H5_HLDLL herr_t H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis,
|
||||
size_t extension, hid_t memtype, const void *buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
639
hl/src/H5LD.c
Normal file
639
hl/src/H5LD.c
Normal file
@@ -0,0 +1,639 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include "H5LDprivate.h"
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* internal functions
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t H5LD_construct_info(H5LD_memb_t *memb, hid_t par_tid);
|
||||
static herr_t H5LD_get_dset_dims(hid_t did, hsize_t *cur_dims);
|
||||
static size_t H5LD_get_dset_type_size(hid_t did, const char *fields);
|
||||
static herr_t H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims,
|
||||
const hsize_t *cur_dims, const char *fields, void *buf);
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5LD_clean_vector
|
||||
*
|
||||
* Purpose: Process the vector of info:
|
||||
* 1) free the array of pointers to member names in listv[n]
|
||||
* 2) close the type id of the last member in listv[n]
|
||||
* 3) free the H5LD_memb_t structure itself as pointed to by listv[n]
|
||||
*
|
||||
* Return: void
|
||||
*
|
||||
* Programmer: Vailin Choi; Aug 2010
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
H5LD_clean_vector(H5LD_memb_t *listv[])
|
||||
{
|
||||
unsigned n; /* Local index variable */
|
||||
|
||||
HDassert(listv);
|
||||
|
||||
/* Go through info for each field stored in listv[] */
|
||||
for(n = 0; listv[n] != NULL; n++) {
|
||||
if(listv[n]->names) {
|
||||
HDfree(listv[n]->names);
|
||||
listv[n]->names = NULL;
|
||||
} /* end if */
|
||||
|
||||
/* Close the type id of the last member in the field */
|
||||
if(!(listv[n]->last_tid < 0)) {
|
||||
H5Tclose(listv[n]->last_tid);
|
||||
listv[n]->last_tid = -1;
|
||||
} /* end if */
|
||||
|
||||
/* Free the H5LD_memb_t structure for the field */
|
||||
HDfree(listv[n]);
|
||||
listv[n] = NULL;
|
||||
} /* end for */
|
||||
} /* H5LD_clean_vector() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5LD_construct_info()
|
||||
*
|
||||
* Purpose: Get the remaining info for a field:
|
||||
* 1) Get the type id of the last member in the field
|
||||
* 2) Get the total offset of all the members in the field
|
||||
* 3) Get the type size of the last member in the field
|
||||
*
|
||||
* Return: Success: 0
|
||||
* Failure: negative
|
||||
*
|
||||
* Programmer: Vailin Choi; Aug 2010
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5LD_construct_info(H5LD_memb_t *memb, hid_t par_tid)
|
||||
{
|
||||
hid_t tmp_tid = -1; /* Dataset type id */
|
||||
unsigned i; /* Local index variable */
|
||||
herr_t ret_value = FAIL; /* Return value */
|
||||
|
||||
/* Make a copy of the incoming datatype */
|
||||
tmp_tid = H5Tcopy(par_tid);
|
||||
|
||||
/* Validate all the members in a field */
|
||||
for(i = 0; memb->names[i] != NULL; i++) {
|
||||
hid_t memb_tid; /* Type id for a member in a field */
|
||||
int idx; /* Index # of a member in a compound datatype */
|
||||
|
||||
/* Get the member index and member type id */
|
||||
if((idx = H5Tget_member_index(tmp_tid, memb->names[i])) < 0)
|
||||
goto done;
|
||||
if((memb_tid = H5Tget_member_type(tmp_tid, (unsigned)idx)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Sum up the offset of all the members in the field */
|
||||
memb->tot_offset += H5Tget_member_offset(tmp_tid, (unsigned)idx);
|
||||
if(H5Tclose(tmp_tid) < 0)
|
||||
goto done;
|
||||
tmp_tid = memb_tid;
|
||||
} /* end for */
|
||||
|
||||
/* Get the type size of the last member in the field */
|
||||
memb->last_tsize = H5Tget_size(tmp_tid);
|
||||
|
||||
/* Save the type id of the last member in the field */
|
||||
memb->last_tid = H5Tcopy(tmp_tid);
|
||||
|
||||
/* Indicate success */
|
||||
ret_value = SUCCEED;
|
||||
|
||||
done:
|
||||
H5E_BEGIN_TRY
|
||||
H5Tclose(tmp_tid);
|
||||
H5E_END_TRY
|
||||
|
||||
return(ret_value);
|
||||
} /* H5LD_construct_info() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5LD_construct_vector
|
||||
*
|
||||
* Purpose: Process the comma-separated list of fields in "fields" as follows:
|
||||
* Example:
|
||||
* "fields": "a.b.c,d"
|
||||
* listv[0]->tot_offset = total offset of "a" & "b" & "c"
|
||||
* listv[0]->last_tid = type id of "c"
|
||||
* listv[0]->last_tsize = type size of "c"
|
||||
* listv[0]->names[0] = "a"
|
||||
* listv[0]->names[1] = "b"
|
||||
* listv[0]->names[2] = "c"
|
||||
* listv[0]->names[3] = NULL
|
||||
*
|
||||
* listv[1]->tot_offset = offset of "d"
|
||||
* listv[1]->last_tid = type id of "d"
|
||||
* listv[1]->last_tsize = type size of "d"
|
||||
* listv[1]->names[0] = "d"
|
||||
* listv[1]->names[1] = NULL
|
||||
*
|
||||
* Return: Success: # of comma-separated fields in "fields"
|
||||
* Failure: negative value
|
||||
*
|
||||
* Programmer: Vailin Choi; Aug 2010
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
H5LD_construct_vector(char *fields, H5LD_memb_t *listv[]/*OUT*/, hid_t par_tid)
|
||||
{
|
||||
int nfields; /* The # of comma-separated fields in "fields" */
|
||||
hbool_t end_of_fields = FALSE; /* end of "fields" */
|
||||
char *fields_ptr; /* Pointer to "fields" */
|
||||
int ret_value = FAIL; /* Return value */
|
||||
|
||||
HDassert(listv);
|
||||
HDassert(fields);
|
||||
|
||||
fields_ptr = fields;
|
||||
nfields = 0;
|
||||
|
||||
/* Process till end of "fields" */
|
||||
while(!end_of_fields) {
|
||||
H5LD_memb_t *memb = NULL; /* Pointer to structure for storing a field's info */
|
||||
char *cur; /* Pointer to a member in a field */
|
||||
size_t len; /* Estimated # of members in a field */
|
||||
hbool_t gotcomma = FALSE; /* A comma encountered */
|
||||
hbool_t gotmember = FALSE; /* Getting member in a field */
|
||||
hbool_t valid = TRUE; /* Whether a field being processed is valid or not */
|
||||
int j = 0; /* The # of members in a field */
|
||||
|
||||
len = (HDstrlen(fields_ptr) / 2) + 2;
|
||||
|
||||
/* Allocate memory for an H5LD_memb_t for storing a field's info */
|
||||
if(NULL == (memb = (H5LD_memb_t *)HDcalloc((size_t)1, sizeof(H5LD_memb_t))))
|
||||
goto done;
|
||||
|
||||
/* Allocate memory for an array of pointers to member names */
|
||||
if(NULL == (memb->names = (char **)HDcalloc(len, sizeof(char *))))
|
||||
goto done;
|
||||
|
||||
memb->names[j] = fields_ptr;
|
||||
memb->last_tid = -1;
|
||||
cur = fields_ptr;
|
||||
|
||||
/* Continue processing till: not valid or comma encountered or "fields" ended */
|
||||
while(valid && !gotcomma && !end_of_fields) {
|
||||
switch(*fields_ptr) {
|
||||
case '\0': /* end of list */
|
||||
if(gotmember) { /* getting something and end of "fields" */
|
||||
*cur++ = '\0';;
|
||||
memb->names[++j] = NULL;
|
||||
} /* end if */
|
||||
else /* getting nothing but end of list */
|
||||
valid = FALSE;
|
||||
end_of_fields = TRUE;
|
||||
break;
|
||||
|
||||
case '\\': /* escape character */
|
||||
++fields_ptr; /* skip it */
|
||||
if(*fields_ptr == '\0')
|
||||
valid = FALSE;
|
||||
else {
|
||||
*cur++ = *fields_ptr++;
|
||||
gotmember = TRUE;
|
||||
} /* end else */
|
||||
break;
|
||||
|
||||
case '.': /* nested field separator */
|
||||
*fields_ptr++ = *cur++ = '\0';;
|
||||
if(gotmember) {
|
||||
memb->names[++j] = cur;
|
||||
gotmember = FALSE;
|
||||
} /* end if */
|
||||
else
|
||||
valid = FALSE;
|
||||
break;
|
||||
|
||||
case ',': /* field separator */
|
||||
*fields_ptr++ = *cur++ = '\0';;
|
||||
if(gotmember) {
|
||||
memb->names[++j] = NULL;
|
||||
gotmember = FALSE;
|
||||
} /* end if */
|
||||
else
|
||||
valid = FALSE;
|
||||
gotcomma = TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
*cur++ = *fields_ptr++;
|
||||
gotmember = TRUE;
|
||||
break;
|
||||
} /* end switch */
|
||||
} /* while (valid && !gotcomma && !end_of_fields) */
|
||||
|
||||
/* If valid, put into listv and continue processing further info */
|
||||
if(valid) {
|
||||
listv[nfields++] = memb;
|
||||
if(H5LD_construct_info(memb, par_tid) < 0)
|
||||
goto done;
|
||||
} /* end if */
|
||||
else {
|
||||
if(memb)
|
||||
HDfree(memb);
|
||||
goto done;
|
||||
} /* end else */
|
||||
} /* while !end_of_fields */
|
||||
|
||||
/* Indicate success */
|
||||
ret_value = nfields;
|
||||
|
||||
done:
|
||||
listv[nfields] = NULL;
|
||||
if(ret_value == FAIL)
|
||||
H5LD_clean_vector(listv);
|
||||
|
||||
return(ret_value);
|
||||
} /* H5LD_construct_vector() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5LD_get_dset_dims
|
||||
*
|
||||
* Purpose: To return the current size for each dimension of the
|
||||
* dataset's dataspace
|
||||
*
|
||||
* Return: Success: 0
|
||||
* Failure: negative value
|
||||
*
|
||||
* Programmer: Vailin Choi; March 2010
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5LD_get_dset_dims(hid_t did, hsize_t *cur_dims)
|
||||
{
|
||||
hid_t sid = -1; /* Dataspace ID */
|
||||
herr_t ret_value = FAIL; /* Return Value */
|
||||
|
||||
/* Verify parameter */
|
||||
if(cur_dims == NULL)
|
||||
goto done;
|
||||
|
||||
/* Get the dataset's dataspace */
|
||||
if((sid = H5Dget_space(did)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Get the current dimension size */
|
||||
if(H5Sget_simple_extent_dims(sid, cur_dims, NULL) < 0)
|
||||
goto done;
|
||||
|
||||
/* Indicate success */
|
||||
ret_value = SUCCEED;
|
||||
|
||||
done:
|
||||
H5E_BEGIN_TRY {
|
||||
H5Sclose(sid);
|
||||
} H5E_END_TRY;
|
||||
|
||||
return(ret_value);
|
||||
} /* H5LD_get_dset_dims() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5LD_get_dset_type_size
|
||||
*
|
||||
* Purpose: To return the size of the dataset's datatype in bytes
|
||||
* null "fields": return the size of the dataset's datatype
|
||||
* non-null "fields": return the size of the dataset's datatype
|
||||
* with respect to the selection in "fields"
|
||||
*
|
||||
* Return: Success: size of the dataset's datatype
|
||||
* Failure: 0 (valid datatypes are never zero size)
|
||||
*
|
||||
* Programmer: Vailin Choi; March 2010
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static size_t
|
||||
H5LD_get_dset_type_size(hid_t did, const char *fields)
|
||||
{
|
||||
hid_t dset_tid = -1; /* Dataset's type identifier */
|
||||
hid_t tid = -1; /* Native Type identifier */
|
||||
H5LD_memb_t **listv = NULL; /* Vector for storing information in "fields" */
|
||||
char *dup_fields = NULL; /* A copy of "fields" */
|
||||
size_t ret_value = 0; /* Return value */
|
||||
|
||||
/* Get the datatype of the dataset */
|
||||
if((dset_tid = H5Dget_type(did)) < 0)
|
||||
goto done;
|
||||
if((tid = H5Tget_native_type(dset_tid, H5T_DIR_DEFAULT)) < 0)
|
||||
goto done;
|
||||
|
||||
if(fields == NULL) /* If no "fields" is specified */
|
||||
ret_value = H5Tget_size(tid);
|
||||
else { /* "fields" are specified */
|
||||
size_t len; /* Estimate the number of comma-separated fields in "fields" */
|
||||
size_t tot = 0; /* Data type size of all the fields in "fields" */
|
||||
int n = 0, num = 0; /* Local index variables */
|
||||
|
||||
HDassert(fields && *fields);
|
||||
|
||||
/* Should be a compound datatype if "fields" exists */
|
||||
if(H5Tget_class(dset_tid) != H5T_COMPOUND)
|
||||
goto done;
|
||||
|
||||
/* Get a copy of "fields" */
|
||||
if(NULL == (dup_fields = HDstrdup(fields)))
|
||||
goto done;
|
||||
|
||||
/* Allocate memory for a list of H5LD_memb_t pointers to store "fields" info */
|
||||
len = (HDstrlen(fields) / 2) + 2;
|
||||
if(NULL == (listv = (H5LD_memb_t **)HDcalloc(len, sizeof(H5LD_memb_t *))))
|
||||
goto done;
|
||||
|
||||
/* Process and store info for "fields" */
|
||||
if((num = H5LD_construct_vector(dup_fields, listv/*OUT*/, tid)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Sum up the size of all the datatypes in "fields" */
|
||||
for(n = 0; n < num; n++)
|
||||
tot += listv[n]->last_tsize;
|
||||
|
||||
/* Clean up the vector of H5LD_memb_t structures */
|
||||
H5LD_clean_vector(listv);
|
||||
|
||||
/* Return the total size */
|
||||
ret_value = tot;
|
||||
} /* end else */
|
||||
|
||||
done:
|
||||
H5E_BEGIN_TRY
|
||||
H5Tclose(tid);
|
||||
H5Tclose(dset_tid);
|
||||
H5E_END_TRY
|
||||
|
||||
/* Free the array of H5LD_memb_t pointers */
|
||||
if(listv)
|
||||
HDfree(listv);
|
||||
|
||||
/* Free memory */
|
||||
if(dup_fields)
|
||||
HDfree(dup_fields);
|
||||
|
||||
return(ret_value);
|
||||
} /* H5LD_get_dset_type_size() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5LD_get_dset_elmts
|
||||
*
|
||||
* Purpose: To retrieve selected data from the dataset
|
||||
*
|
||||
* Return: Success: 0
|
||||
* Failure: negative
|
||||
*
|
||||
* Programmer: Vailin Choi; August 2010
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims,
|
||||
const char *fields, void *buf)
|
||||
{
|
||||
hid_t dtid = -1, tid = -1; /* Dataset type id */
|
||||
hid_t sid = -1, mid = -1; /* Dataspace and memory space id */
|
||||
hssize_t snum_elmts; /* Number of dataset elements in the selection (signed) */
|
||||
hsize_t num_elmts; /* Number of dataset elements in the selection */
|
||||
hsize_t start[H5S_MAX_RANK];/* Starting offset */
|
||||
hsize_t count[H5S_MAX_RANK];/* ??offset */
|
||||
H5LD_memb_t **listv = NULL; /* Vector for storing information in "fields" */
|
||||
char *dup_fields = NULL; /* A copy of "fields" */
|
||||
char *sav_buf = NULL; /* Saved pointer temporary buffer */
|
||||
unsigned ctr; /* Counter for # of curr_dims > prev_dims */
|
||||
int ndims; /* Number of dimensions for the dataset */
|
||||
int i; /* Local index variable */
|
||||
herr_t ret_value = FAIL; /* Return value */
|
||||
|
||||
/* Verify parameters */
|
||||
if(prev_dims == NULL || cur_dims == NULL || buf == NULL)
|
||||
goto done;
|
||||
|
||||
/* Get dataset's dataspace */
|
||||
if((sid = H5Dget_space(did)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Get the number of dimensions */
|
||||
if((ndims = H5Sget_simple_extent_ndims(sid)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Verify that cur_dims must have one dimension whose size is greater than prev_dims */
|
||||
HDmemset(start, 0, sizeof start);
|
||||
HDmemset(count, 0, sizeof count);
|
||||
ctr = 0;
|
||||
for(i = 0; i < ndims; i++)
|
||||
if(cur_dims[i] > prev_dims[i]) {
|
||||
++ctr;
|
||||
count[i] = cur_dims[i] - prev_dims[i];
|
||||
start[i] = prev_dims[i];
|
||||
} /* end if */
|
||||
else { /* < or = */
|
||||
start[i] = 0;
|
||||
count[i] = MIN(prev_dims[i], cur_dims[i]);
|
||||
} /* end else */
|
||||
if(!ctr)
|
||||
goto done;
|
||||
|
||||
if(ctr == 1) { /* changes for only one dimension */
|
||||
/* Make the selection in the dataset based on "cur_dims" and "prev_dims" */
|
||||
if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
|
||||
goto done;
|
||||
} /* end if */
|
||||
else { /* changes for more than one dimensions */
|
||||
HDmemset(start, 0, sizeof start);
|
||||
|
||||
/* Make the selection in the dataset based on "cur_dims" and "prev_dims" */
|
||||
if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, NULL, cur_dims, NULL) < 0)
|
||||
goto done;
|
||||
if(H5Sselect_hyperslab(sid, H5S_SELECT_NOTB, start, NULL, prev_dims, NULL) < 0)
|
||||
goto done;
|
||||
} /* end else */
|
||||
|
||||
/* Get the number of elements in the selection */
|
||||
if(0 == (snum_elmts = H5Sget_select_npoints(sid)))
|
||||
goto done;
|
||||
num_elmts = (hsize_t)snum_elmts;
|
||||
|
||||
/* Create the memory space for the selection */
|
||||
if((mid = H5Screate_simple(1, &num_elmts, NULL)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Get the native datatype size */
|
||||
if((dtid = H5Dget_type(did)) < 0)
|
||||
goto done;
|
||||
if((tid = H5Tget_native_type(dtid, H5T_DIR_DEFAULT)) < 0)
|
||||
goto done;
|
||||
|
||||
if(fields == NULL) { /* nothing in "fields" */
|
||||
/* Read and store all the elements in "buf" */
|
||||
if(H5Dread(did, tid, mid, sid, H5P_DEFAULT, buf) < 0)
|
||||
goto done;
|
||||
} /* end if */
|
||||
else { /* "fields" is specified */
|
||||
unsigned char *buf_p = (unsigned char *)buf; /* Pointer to the destination buffer */
|
||||
char *tmp_buf; /* Temporary buffer for data read */
|
||||
size_t tot_tsize; /* Total datatype size */
|
||||
size_t len; /* Estimate the number of comma-separated fields in "fields" */
|
||||
|
||||
/* should be a compound datatype if "fields" exists */
|
||||
if(H5Tget_class(tid) != H5T_COMPOUND)
|
||||
goto done;
|
||||
|
||||
/* Get the total size of the dataset's datatypes */
|
||||
if(0 == (tot_tsize = H5LD_get_dset_type_size(did, NULL)))
|
||||
goto done;
|
||||
|
||||
/* Allocate memory for reading in the elements in the dataset selection */
|
||||
if(NULL == (sav_buf = tmp_buf = (char *)HDcalloc((size_t)num_elmts, tot_tsize)))
|
||||
goto done;
|
||||
|
||||
/* Read the dataset elements in the selection */
|
||||
if(H5Dread(did, tid, mid, sid, H5P_DEFAULT, tmp_buf) < 0)
|
||||
goto done;
|
||||
|
||||
/* Make a copy of "fields" */
|
||||
if(NULL == (dup_fields = HDstrdup(fields)))
|
||||
goto done;
|
||||
|
||||
/* Allocate memory for the vector of H5LD_memb_t pointers */
|
||||
len = (HDstrlen(fields) / 2) + 2;
|
||||
if(NULL == (listv = (H5LD_memb_t **)HDcalloc(len, sizeof(H5LD_memb_t *))))
|
||||
goto done;
|
||||
|
||||
/* Process and store information for "fields" */
|
||||
if(H5LD_construct_vector(dup_fields, listv, tid) < 0)
|
||||
goto done;
|
||||
|
||||
/* Copy data for each dataset element in the selection */
|
||||
for(i = 0; i < (int)num_elmts; i++) {
|
||||
int j; /* Local index variable */
|
||||
|
||||
/* Copy data for "fields" to the input buffer */
|
||||
for(j = 0; listv[j] != NULL; j++) {
|
||||
HDmemcpy(buf_p, tmp_buf + listv[j]->tot_offset, listv[j]->last_tsize);
|
||||
buf_p += listv[j]->last_tsize;
|
||||
} /* end for */
|
||||
tmp_buf += tot_tsize;
|
||||
} /* end for */
|
||||
|
||||
/* Clean up the vector of H5LD_memb_t structures */
|
||||
H5LD_clean_vector(listv);
|
||||
} /* end else */
|
||||
|
||||
/* Indicate success */
|
||||
ret_value = SUCCEED;
|
||||
|
||||
done:
|
||||
H5E_BEGIN_TRY
|
||||
H5Tclose(dtid);
|
||||
H5Tclose(tid);
|
||||
H5Sclose(sid);
|
||||
H5Sclose(mid);
|
||||
H5E_END_TRY
|
||||
|
||||
/* Free the array of H5LD_memb_t pointers */
|
||||
if(listv)
|
||||
HDfree(listv);
|
||||
|
||||
/* Free memory */
|
||||
if(dup_fields)
|
||||
HDfree(dup_fields);
|
||||
if(sav_buf)
|
||||
HDfree(sav_buf);
|
||||
|
||||
return(ret_value);
|
||||
} /* H5LD_get_dset_elmts() */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Public functions
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5LDget_dset_dims
|
||||
*
|
||||
* Purpose: To retrieve the current dimension sizes for a dataset
|
||||
*
|
||||
* Return: Success: 0
|
||||
* Failure: negative value
|
||||
*
|
||||
* Programmer: Vailin Choi; March 2010
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5LDget_dset_dims(hid_t did, hsize_t *cur_dims)
|
||||
{
|
||||
return(H5LD_get_dset_dims(did, cur_dims));
|
||||
} /* H5LDget_dset_dims() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5LDget_dset_type_size
|
||||
*
|
||||
* Purpose: To return the size in bytes of the datatype for the dataset
|
||||
*
|
||||
* Return: Success: size in bytes of the dataset's datatype
|
||||
* Failure: 0 (valid datatypes are never zero size)
|
||||
*
|
||||
* Programmer: Vailin Choi; March 2010
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
size_t
|
||||
H5LDget_dset_type_size(hid_t did, const char *fields)
|
||||
{
|
||||
return(H5LD_get_dset_type_size(did, fields));
|
||||
} /* H5LDget_dset_type_size() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5LDget_dset_elmts
|
||||
*
|
||||
* Purpose: To retrieve selected data from the dataset
|
||||
*
|
||||
* Return: Success: 0
|
||||
* Failure: negative value
|
||||
*
|
||||
* Programmer: Vailin Choi; March 2010
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5LDget_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims, const char *fields, void *buf)
|
||||
{
|
||||
return(H5LD_get_dset_elmts(did, prev_dims, cur_dims, fields, buf) );
|
||||
} /* H5LDget_dset_elmts() */
|
||||
|
||||
49
hl/src/H5LDprivate.h
Normal file
49
hl/src/H5LDprivate.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5LDprivate_H
|
||||
#define _H5LDprivate_H
|
||||
|
||||
/* High-level library internal header file */
|
||||
#include "H5HLprivate2.h"
|
||||
#include "H5LDpublic.h"
|
||||
|
||||
/* Store information for a field in <list_of_fields> for a compound data type */
|
||||
/*
|
||||
* Note: This data structure is used by both H5LD.c and hl/tools/h5watch
|
||||
* This declaration is repeated in tools/lib/h5tools_str.c
|
||||
*/
|
||||
typedef struct H5LD_memb_t {
|
||||
size_t tot_offset;
|
||||
size_t last_tsize;
|
||||
hid_t last_tid;
|
||||
char **names;
|
||||
} H5LD_memb_t;
|
||||
|
||||
/*
|
||||
* Note that these two private routines are called by hl/tools/h5watch.
|
||||
* Have considered the following options:
|
||||
* 1) Repeat the coding in both H5LD.c and h5watch
|
||||
* 2) Make these public routines
|
||||
* 3) Break the rule "to avoid tools calling private routines in the library"
|
||||
* #1: not good for maintenance
|
||||
* #2: these two routines are too specific to be made as public routines
|
||||
* Decide to do #3 at this point of time after some discussion.
|
||||
*/
|
||||
void H5LD_clean_vector(H5LD_memb_t *listv[]);
|
||||
int H5LD_construct_vector(char *fields, H5LD_memb_t *listv[], hid_t par_tid);
|
||||
|
||||
#endif /* end _H5LDprivate_H */
|
||||
|
||||
33
hl/src/H5LDpublic.h
Normal file
33
hl/src/H5LDpublic.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5LDpublic_H
|
||||
#define _H5LDpublic_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
H5_HLDLL herr_t H5LDget_dset_dims(hid_t did, hsize_t *cur_dims);
|
||||
H5_HLDLL size_t H5LDget_dset_type_size(hid_t did, const char *fields);
|
||||
H5_HLDLL herr_t H5LDget_dset_elmts(hid_t did, const hsize_t *prev_dims,
|
||||
const hsize_t *cur_dims, const char *fields, void *buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _H5LDpublic_H */
|
||||
|
||||
@@ -3248,7 +3248,7 @@ out:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static
|
||||
H5_ATTR_PURE static
|
||||
hbool_t H5TB_find_field(const char *field, const char *field_list)
|
||||
{
|
||||
const char *start = field_list;
|
||||
|
||||
@@ -31,12 +31,12 @@ lib_LTLIBRARIES=libhdf5_hl.la
|
||||
libhdf5_hl_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS)
|
||||
|
||||
# List sources to include in the HDF5 HL Library.
|
||||
libhdf5_hl_la_SOURCES=H5DO.c H5DS.c H5IM.c H5LT.c H5LTanalyze.c H5LTparse.c H5PT.c H5TB.c
|
||||
libhdf5_hl_la_SOURCES=H5DO.c H5DS.c H5IM.c H5LT.c H5LTanalyze.c H5LTparse.c H5PT.c H5TB.c H5LD.c
|
||||
|
||||
# HDF5 HL library depends on HDF5 Library.
|
||||
libhdf5_hl_la_LIBADD=$(LIBHDF5)
|
||||
|
||||
# Public header files (to be installed)
|
||||
include_HEADERS=hdf5_hl.h H5DOpublic.h H5IMpublic.h H5LTpublic.h H5TBpublic.h H5DSpublic.h H5PTpublic.h
|
||||
include_HEADERS=hdf5_hl.h H5DOpublic.h H5IMpublic.h H5LTpublic.h H5TBpublic.h H5DSpublic.h H5PTpublic.h H5LDpublic.h
|
||||
|
||||
include $(top_srcdir)/config/conclude.am
|
||||
|
||||
1450
hl/src/Makefile.in
Normal file
1450
hl/src/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
@@ -28,6 +28,7 @@
|
||||
#include "H5IMpublic.h" /* image */
|
||||
#include "H5TBpublic.h" /* table */
|
||||
#include "H5PTpublic.h" /* packet table */
|
||||
#include "H5LDpublic.h" /* lite dataset */
|
||||
|
||||
#endif /*H5_INCLUDE_HL*/
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#
|
||||
# Copyright by The HDF Group.
|
||||
# Copyright by the Board of Trustees of the University of Illinois.
|
||||
# All rights reserved.
|
||||
@@ -29,7 +28,8 @@ LDADD=$(LIBH5_HL) $(LIBH5TEST) $(LIBHDF5)
|
||||
|
||||
# Test programs. These are our main targets. They should be listed in the
|
||||
# order to be executed, generally most specific tests to least specific tests.
|
||||
TEST_PROG=test_lite test_image test_file_image test_table test_ds test_packet test_dset_opt
|
||||
TEST_PROG=test_lite test_image test_file_image test_table test_ds test_packet test_dset_opt \
|
||||
test_ld test_dset_append
|
||||
check_PROGRAMS=$(TEST_PROG)
|
||||
|
||||
# These programs generate test files for the tests. They don't need to be
|
||||
@@ -37,7 +37,7 @@ check_PROGRAMS=$(TEST_PROG)
|
||||
# them in a conditional causes automake to generate rules so that they
|
||||
# can be built by hand. They can also be built by specifying
|
||||
# --enable-build-all at configure time.
|
||||
BUILD_ALL_PROGS=gen_test_ds
|
||||
BUILD_ALL_PROGS=gen_test_ds gen_test_ld
|
||||
|
||||
if BUILD_ALL_CONDITIONAL
|
||||
noinst_PROGRAMS=$(BUILD_ALL_PROGS)
|
||||
@@ -47,6 +47,6 @@ endif
|
||||
CHECK_CLEANFILES+=combine_tables[1-2].h5 test_ds[1-9].h5 test_ds10.h5 \
|
||||
test_image[1-3].h5 file_img[1-2].h5 test_lite[1-4].h5 test_table.h5 \
|
||||
test_packet_table.h5 test_packet_compress.h5 test_detach.h5 \
|
||||
test_dectris.h5
|
||||
test_dectris.h5 test_append.h5
|
||||
|
||||
include $(top_srcdir)/config/conclude.am
|
||||
|
||||
1553
hl/test/Makefile.in
Normal file
1553
hl/test/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
379
hl/test/gen_test_ld.c
Normal file
379
hl/test/gen_test_ld.c
Normal file
@@ -0,0 +1,379 @@
|
||||
#include "hdf5.h"
|
||||
#include "H5LDprivate.h"
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/*
|
||||
* WATCH.h5: file with various types of datasets for testing--
|
||||
*
|
||||
* The following datasets are chunked, H5D_ALLOC_TIME_INCR, max. dimensional setting:
|
||||
* DSET_ONE: one-dimensional dataset
|
||||
* DSET_TWO: two-dimensional dataset
|
||||
* DSET_CMPD: one-dimensional dataset with compound type
|
||||
* DSET_CMPD_ESC: one-dimensional dataset with compound type and member names with
|
||||
* escape/separator characters
|
||||
* DSET_CMPD_TWO: two-dimensional dataset with compound type
|
||||
*
|
||||
* The following datasets are one-dimensional, chunked, max. dimension setting:
|
||||
* DSET_ALLOC_EARLY: dataset with H5D_ALLOC_TIME_EARLY
|
||||
* DSET_ALLOC_LATE: dataset H5D_ALLOC_TIME_LATE
|
||||
*
|
||||
* The following datasets are one-dimensional:
|
||||
* DSET_NONE: fixed dimension setting, contiguous, H5D_ALLOC_TIME_LATE
|
||||
* DSET_NOMAX: fixed dimension setting, chunked, H5D_ALLOC_TIME_INCR
|
||||
*/
|
||||
#define ONE_DIMS0 10
|
||||
#define MAX_ONE_DIMS0 100
|
||||
|
||||
#define DSET_ONE "DSET_ONE"
|
||||
#define DSET_NONE "DSET_NONE"
|
||||
#define DSET_NOMAX "DSET_NOMAX"
|
||||
#define DSET_ALLOC_LATE "DSET_ALLOC_LATE"
|
||||
#define DSET_ALLOC_EARLY "DSET_ALLOC_EARLY"
|
||||
#define DSET_CMPD "DSET_CMPD"
|
||||
#define DSET_CMPD_ESC "DSET_CMPD_ESC"
|
||||
#define DSET_NULL "DSET_NULL"
|
||||
#define DSET_SCALAR "DSET_SCALAR"
|
||||
|
||||
#define TWO_DIMS0 4
|
||||
#define TWO_DIMS1 10
|
||||
#define MAX_TWO_DIMS0 60
|
||||
#define MAX_TWO_DIMS1 100
|
||||
|
||||
#define DSET_TWO "DSET_TWO"
|
||||
#define DSET_CMPD_TWO "DSET_CMPD_TWO"
|
||||
|
||||
#define CHUNK_SIZE 2
|
||||
|
||||
#define FILE "test_ld.h5"
|
||||
|
||||
/* Data structures for datasets with compound types */
|
||||
typedef struct sub22_t {
|
||||
unsigned int a;
|
||||
unsigned int b;
|
||||
unsigned int c;
|
||||
} sub22_t;
|
||||
|
||||
typedef struct sub2_t {
|
||||
unsigned int a;
|
||||
sub22_t b;
|
||||
unsigned int c;
|
||||
} sub2_t;
|
||||
|
||||
typedef struct sub4_t {
|
||||
unsigned int a;
|
||||
unsigned int b;
|
||||
} sub4_t;
|
||||
|
||||
typedef struct set_t {
|
||||
unsigned int field1;
|
||||
sub2_t field2;
|
||||
double field3;
|
||||
sub4_t field4;
|
||||
} set_t;
|
||||
|
||||
/*
|
||||
**************************************************************************************
|
||||
*
|
||||
* Create a dataset with the given input parameters
|
||||
* Write to the dataset with the given "data"
|
||||
*
|
||||
**************************************************************************************
|
||||
*/
|
||||
static int
|
||||
generate_dset(hid_t fid, const char *dname, int ndims, hsize_t *dims,
|
||||
hsize_t *maxdims, hid_t dtid, void *data)
|
||||
{
|
||||
hid_t dcpl = -1; /* Dataset creation property */
|
||||
hid_t did = -1; /* Dataset id */
|
||||
hid_t sid = -1; /* Dataspace id */
|
||||
int i; /* Local index variable */
|
||||
|
||||
/* Create the dataspace */
|
||||
if((sid = H5Screate_simple(ndims, dims, maxdims)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Set up dataset's creation properties */
|
||||
if(!HDstrcmp(dname, DSET_NONE))
|
||||
dcpl = H5P_DEFAULT;
|
||||
else {
|
||||
hsize_t chunk_dims[H5S_MAX_RANK]; /* Dimension sizes for chunks */
|
||||
|
||||
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
||||
goto done;
|
||||
for(i = 0; i < ndims; i++)
|
||||
chunk_dims[i] = CHUNK_SIZE;
|
||||
if(H5Pset_chunk(dcpl, ndims, chunk_dims) < 0)
|
||||
goto done;
|
||||
} /* end else */
|
||||
|
||||
if(!HDstrcmp(dname, DSET_ALLOC_LATE)) {
|
||||
if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE) < 0)
|
||||
goto done;
|
||||
} /* end if */
|
||||
else if(!HDstrcmp(dname, DSET_ALLOC_EARLY)) {
|
||||
if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0)
|
||||
goto done;
|
||||
} /* end if */
|
||||
|
||||
/* Create the dataset */
|
||||
if((did = H5Dcreate2(fid, dname, dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Write to the dataset */
|
||||
if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
|
||||
goto done;
|
||||
|
||||
/* Closing */
|
||||
if(H5Pclose(dcpl) < 0)
|
||||
goto done;
|
||||
if(H5Sclose(sid) < 0)
|
||||
goto done;
|
||||
if(H5Dclose(did) < 0)
|
||||
goto done;
|
||||
|
||||
return(SUCCEED);
|
||||
|
||||
done:
|
||||
H5E_BEGIN_TRY
|
||||
H5Sclose(sid);
|
||||
H5Pclose(dcpl);
|
||||
H5Dclose(did);
|
||||
H5E_END_TRY
|
||||
|
||||
return(FAIL);
|
||||
} /* generate_dset() */
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
hid_t fid; /* File id */
|
||||
hid_t fapl; /* File access property list */
|
||||
hsize_t cur_dims[1]; /* Dimension sizes */
|
||||
hsize_t max_dims[1]; /* Maximum dimension sizes */
|
||||
hsize_t cur2_dims[2]; /* Current dimension sizes */
|
||||
hsize_t max2_dims[2]; /* Maximum dimension sizes */
|
||||
hid_t set_tid, esc_set_tid; /* Compound type id */
|
||||
hid_t sub22_tid; /* Compound type id */
|
||||
hid_t sub2_tid, esc_sub2_tid; /* Compound type id */
|
||||
hid_t sub4_tid, esc_sub4_tid; /* Compound type id */
|
||||
hid_t null_did, null_sid; /* H5S_NULL dataset & dataspace ids */
|
||||
hid_t scalar_did, scalar_sid; /* H5S_SCALAR dataset & dataspace ids */
|
||||
int one_data[ONE_DIMS0]; /* Buffer for data */
|
||||
int two_data[TWO_DIMS0*TWO_DIMS1]; /* Buffer for data */
|
||||
set_t one_cbuf[ONE_DIMS0]; /* Buffer for data with compound type */
|
||||
set_t two_cbuf[TWO_DIMS0*TWO_DIMS1]; /* Buffer for data with compound type */
|
||||
int i; /* Local index variable */
|
||||
|
||||
/* Create a file access property list */
|
||||
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Set to use latest library format */
|
||||
if((H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Create a file */
|
||||
if((fid = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Initialization for one-dimensional dataset */
|
||||
cur_dims[0] = ONE_DIMS0;
|
||||
max_dims[0] = MAX_ONE_DIMS0;
|
||||
for(i = 0; i < ONE_DIMS0; i++)
|
||||
one_data[i] = i;
|
||||
|
||||
/* Generate DSET_ONE, DSET_NONE, DSET_NOMAX, DSET_ALLOC_LATE, DSET_EARLY */
|
||||
if(generate_dset(fid, DSET_ONE, 1, cur_dims, max_dims, H5T_NATIVE_INT, one_data) < 0)
|
||||
goto done;
|
||||
if(generate_dset(fid, DSET_NONE, 1, cur_dims, NULL, H5T_NATIVE_INT, one_data) < 0)
|
||||
goto done;
|
||||
if(generate_dset(fid, DSET_NOMAX, 1, cur_dims, NULL, H5T_NATIVE_INT, one_data) < 0)
|
||||
goto done;
|
||||
if(generate_dset(fid, DSET_ALLOC_LATE, 1, cur_dims, max_dims, H5T_NATIVE_INT, one_data) < 0)
|
||||
goto done;
|
||||
if(generate_dset(fid, DSET_ALLOC_EARLY, 1, cur_dims, max_dims, H5T_NATIVE_INT, one_data) < 0)
|
||||
goto done;
|
||||
|
||||
/* Initialization for two-dimensional dataset */
|
||||
cur2_dims[0] = TWO_DIMS0;
|
||||
cur2_dims[1] = TWO_DIMS1;
|
||||
max2_dims[0] = MAX_TWO_DIMS0;
|
||||
max2_dims[1] = MAX_TWO_DIMS1;
|
||||
|
||||
for(i = 0; i < (TWO_DIMS0 * TWO_DIMS1); i++)
|
||||
two_data[i] = i;
|
||||
|
||||
/* Generate DSET_TWO */
|
||||
if(generate_dset(fid, DSET_TWO, 2, cur2_dims, max2_dims, H5T_NATIVE_INT, two_data) < 0)
|
||||
goto done;
|
||||
|
||||
/* Initialization for one-dimensional compound typed dataset */
|
||||
cur_dims[0] = ONE_DIMS0;
|
||||
max_dims[0] = MAX_ONE_DIMS0;
|
||||
|
||||
for (i = 0; i < ONE_DIMS0; i++) {
|
||||
one_cbuf[i].field1 = 1;
|
||||
one_cbuf[i].field2.a = 2;
|
||||
one_cbuf[i].field2.c = 4;
|
||||
one_cbuf[i].field2.b.a = 20;
|
||||
one_cbuf[i].field2.b.b = 40;
|
||||
one_cbuf[i].field2.b.c = 80;
|
||||
one_cbuf[i].field3 = 3.0f;
|
||||
one_cbuf[i].field4.a = 4;
|
||||
one_cbuf[i].field4.b = 8;
|
||||
} /* end for */
|
||||
|
||||
/* Create the compound type */
|
||||
if((sub22_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub22_t))) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub22_tid, "a", HOFFSET(sub22_t, a), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub22_tid, "b", HOFFSET(sub22_t, b), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub22_tid, "c", HOFFSET(sub22_t, c), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
|
||||
if((sub2_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub2_t))) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub2_tid, "a", HOFFSET(sub2_t, a), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub2_tid, "b", HOFFSET(sub2_t, b), sub22_tid) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub2_tid, "c", HOFFSET(sub2_t, c), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
|
||||
if((sub4_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub4_t))) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub4_tid, "a", HOFFSET(sub4_t, a), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub4_tid, "b", HOFFSET(sub4_t, b), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
|
||||
if((set_tid = H5Tcreate(H5T_COMPOUND, sizeof(set_t))) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(set_tid, "field1", HOFFSET(set_t, field1), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(set_tid, "field2", HOFFSET(set_t, field2), sub2_tid) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(set_tid, "field3", HOFFSET(set_t, field3), H5T_NATIVE_DOUBLE) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(set_tid, "field4", HOFFSET(set_t, field4), sub4_tid) < 0)
|
||||
goto done;
|
||||
|
||||
/* Create the compound type with escape/separator characters */
|
||||
if((esc_sub2_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub2_t))) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_sub2_tid, ".a", HOFFSET(sub2_t, a), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_sub2_tid, ",b", HOFFSET(sub2_t, b), sub22_tid) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_sub2_tid, "\\c", HOFFSET(sub2_t, c), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
|
||||
if((esc_sub4_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub4_t))) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_sub4_tid, "a.", HOFFSET(sub4_t, a), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_sub4_tid, "b,", HOFFSET(sub4_t, b), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
|
||||
if((esc_set_tid = H5Tcreate(H5T_COMPOUND, sizeof(set_t))) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_set_tid, "field,1", HOFFSET(set_t, field1), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_set_tid, "field2.", HOFFSET(set_t, field2), esc_sub2_tid) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_set_tid, "field\\3", HOFFSET(set_t, field3), H5T_NATIVE_DOUBLE) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_set_tid, "field4,", HOFFSET(set_t, field4), esc_sub4_tid) < 0)
|
||||
goto done;
|
||||
|
||||
/* Generate DSET_CMPD, DSET_CMPD_ESC */
|
||||
if(generate_dset(fid, DSET_CMPD, 1, cur_dims, max_dims, set_tid, one_cbuf) < 0)
|
||||
goto done;
|
||||
if(generate_dset(fid, DSET_CMPD_ESC, 1, cur_dims, max_dims, esc_set_tid, one_cbuf) < 0)
|
||||
goto done;
|
||||
|
||||
/* Initialization for two-dimensional compound typed dataset */
|
||||
cur2_dims[0] = TWO_DIMS0;
|
||||
cur2_dims[1] = TWO_DIMS1;
|
||||
max2_dims[0] = MAX_TWO_DIMS0;
|
||||
max2_dims[0] = MAX_TWO_DIMS1;
|
||||
|
||||
for (i = 0; i < (TWO_DIMS0 * TWO_DIMS1); i++) {
|
||||
two_cbuf[i].field1 = 1;
|
||||
two_cbuf[i].field2.a = 2;
|
||||
two_cbuf[i].field2.c = 4;
|
||||
two_cbuf[i].field2.b.a = 20;
|
||||
two_cbuf[i].field2.b.b = 40;
|
||||
two_cbuf[i].field2.b.c = 80;
|
||||
two_cbuf[i].field3 = 3.0f;
|
||||
two_cbuf[i].field4.a = 4;
|
||||
two_cbuf[i].field4.b = 8;
|
||||
} /* end for */
|
||||
|
||||
/* Generate DSET_CMPD_TWO */
|
||||
if(generate_dset(fid, DSET_CMPD_TWO, 2, cur2_dims, max2_dims, set_tid, two_cbuf) < 0)
|
||||
goto done;
|
||||
|
||||
/* Create NULL dataspace */
|
||||
if((null_sid = H5Screate(H5S_NULL)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Create the NULL dataset */
|
||||
if((null_did = H5Dcreate2(fid, DSET_NULL, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Create SCALAR dataspace */
|
||||
if((scalar_sid = H5Screate(H5S_SCALAR)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Create the SCALAR dataset */
|
||||
if((scalar_did = H5Dcreate2(fid, DSET_SCALAR, H5T_NATIVE_INT, scalar_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Closing */
|
||||
if(H5Dclose(scalar_did) < 0) goto done;
|
||||
if(H5Sclose(scalar_sid) < 0) goto done;
|
||||
|
||||
if(H5Dclose(null_did) < 0) goto done;
|
||||
if(H5Sclose(null_sid) < 0) goto done;
|
||||
|
||||
if(H5Tclose(sub22_tid) < 0) goto done;
|
||||
if(H5Tclose(sub2_tid) < 0) goto done;
|
||||
if(H5Tclose(sub4_tid) < 0) goto done;
|
||||
if(H5Tclose(set_tid) < 0) goto done;
|
||||
if(H5Tclose(esc_sub2_tid) < 0) goto done;
|
||||
if(H5Tclose(esc_sub4_tid) < 0) goto done;
|
||||
if(H5Tclose(esc_set_tid) < 0) goto done;
|
||||
|
||||
if(H5Pclose(fapl) < 0) goto done;
|
||||
if(H5Fclose(fid) < 0) goto done;
|
||||
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
done:
|
||||
H5E_BEGIN_TRY
|
||||
H5Tclose(sub22_tid);
|
||||
H5Tclose(sub2_tid);
|
||||
H5Tclose(sub4_tid);
|
||||
H5Tclose(set_tid);
|
||||
H5Tclose(esc_sub2_tid);
|
||||
H5Tclose(esc_sub4_tid);
|
||||
H5Tclose(esc_set_tid);
|
||||
|
||||
H5Dclose(null_did);
|
||||
H5Sclose(null_sid);
|
||||
H5Dclose(scalar_did);
|
||||
H5Sclose(scalar_sid);
|
||||
|
||||
H5Pclose(fapl);
|
||||
H5Fclose(fid);
|
||||
H5E_END_TRY
|
||||
|
||||
exit(EXIT_FAILURE);
|
||||
} /* main() */
|
||||
|
||||
1196
hl/test/test_dset_append.c
Normal file
1196
hl/test/test_dset_append.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,7 @@
|
||||
#define CHUNK_NX 4
|
||||
#define CHUNK_NY 4
|
||||
|
||||
#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s))*1.001F)+12)
|
||||
#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s))*(double)1.001F)+12)
|
||||
|
||||
/* Temporary filter IDs used for testing */
|
||||
#define H5Z_FILTER_BOGUS1 305
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
|
||||
#define RANK 2
|
||||
|
||||
/* For superblock version 0, 1: the offset to "file consistency flags" is 20 with size of 4 bytes */
|
||||
/* The file consistency flags is the "status_flags" field in H5F_super_t */
|
||||
/* Note: the offset and size will be different when using superblock version 2 for the test file */
|
||||
#define SUPER_STATUS_FLAGS_OFF_V0_V1 20
|
||||
#define SUPER_STATUS_FLAGS_SIZE_V0_V1 4
|
||||
|
||||
/* Test of file image operations.
|
||||
|
||||
The following code provides a means to thoroughly test the file image
|
||||
@@ -214,10 +220,32 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
|
||||
else
|
||||
VERIFY(*core_buf_ptr_ptr != buf_ptr[i], "vfd buffer and user buffer should be different");
|
||||
|
||||
/* test whether the contents of the user buffer and driver buffer */
|
||||
/* are equal. */
|
||||
if (HDmemcmp(*core_buf_ptr_ptr, buf_ptr[i], (size_t)buf_size[i]) != 0)
|
||||
FAIL_PUTS_ERROR("comparison of vfd and user buffer failed");
|
||||
/*
|
||||
* When the vfd and user buffers are different and H5LT_FILE_IMAGE_OPEN_RW is enabled,
|
||||
* status_flags in the superblock needs to be cleared in the vfd buffer for
|
||||
* the comparison to proceed as expected. The user buffer as returned from H5Fget_file_image()
|
||||
* has already cleared status_flags. The superblock's status_flags is used for the
|
||||
* implementation of file locking.
|
||||
*/
|
||||
if(input_flags[i] & H5LT_FILE_IMAGE_OPEN_RW && !(input_flags[i] & H5LT_FILE_IMAGE_DONT_COPY)) {
|
||||
|
||||
void *tmp_ptr = HDmalloc((size_t)buf_size[i]);
|
||||
/* Copy vfd buffer to a temporary buffer */
|
||||
HDmemcpy(tmp_ptr, (void *)*core_buf_ptr_ptr, (size_t)buf_size[i]);
|
||||
/* Clear status_flags in the superblock for the vfd buffer: file locking is using status_flags */
|
||||
HDmemset((uint8_t *)tmp_ptr + SUPER_STATUS_FLAGS_OFF_V0_V1, (int)0, (size_t)SUPER_STATUS_FLAGS_SIZE_V0_V1);
|
||||
/* Does the comparision */
|
||||
if(HDmemcmp(tmp_ptr, buf_ptr[i], (size_t)buf_size[i]) != 0)
|
||||
FAIL_PUTS_ERROR("comparison of TMP vfd and user buffer failed");
|
||||
/* Free the temporary buffer */
|
||||
if(tmp_ptr) HDfree(tmp_ptr);
|
||||
} else {
|
||||
|
||||
/* test whether the contents of the user buffer and driver buffer */
|
||||
/* are equal. */
|
||||
if (HDmemcmp(*core_buf_ptr_ptr, buf_ptr[i], (size_t)buf_size[i]) != 0)
|
||||
FAIL_PUTS_ERROR("comparison of vfd and user buffer failed");
|
||||
}
|
||||
} /* end else */
|
||||
} /* end for */
|
||||
|
||||
|
||||
1430
hl/test/test_ld.c
Normal file
1430
hl/test/test_ld.c
Normal file
File diff suppressed because it is too large
Load Diff
BIN
hl/test/test_ld.h5
Normal file
BIN
hl/test/test_ld.h5
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -21,7 +21,9 @@
|
||||
|
||||
include $(top_srcdir)/config/commence.am
|
||||
|
||||
CONFIG=ordered
|
||||
|
||||
# All subdirectories
|
||||
SUBDIRS=gif2h5
|
||||
SUBDIRS=gif2h5 h5watch
|
||||
|
||||
include $(top_srcdir)/config/conclude.am
|
||||
|
||||
1385
hl/tools/Makefile.in
Normal file
1385
hl/tools/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
1455
hl/tools/gif2h5/Makefile.in
Normal file
1455
hl/tools/gif2h5/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
44
hl/tools/h5watch/Makefile.am
Normal file
44
hl/tools/h5watch/Makefile.am
Normal file
@@ -0,0 +1,44 @@
|
||||
#
|
||||
# Copyright by The HDF Group.
|
||||
# Copyright by the Board of Trustees of the University of Illinois.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
# terms governing use, modification, and redistribution, is contained in
|
||||
# the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
# of the source code distribution tree; Copyright.html can be found at the
|
||||
# root level of an installed copy of the electronic HDF5 document set and
|
||||
# is linked from the top-level documents page. It can also be found at
|
||||
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
|
||||
# access to either file, you may request a copy from help@hdfgroup.org.
|
||||
##
|
||||
## Makefile.am
|
||||
## Run automake to generate a Makefile.in from this file.
|
||||
#
|
||||
# HDF5 Library Makefile(.in)
|
||||
#
|
||||
|
||||
include $(top_srcdir)/config/commence.am
|
||||
|
||||
# Include src and tools/lib directories
|
||||
AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/src
|
||||
|
||||
# These are our main targets, the tools
|
||||
TEST_SCRIPT=testh5watch.sh
|
||||
check_SCRIPTS=$(TEST_SCRIPT)
|
||||
SCRIPT_DEPEND=swmr_check_compat_vfd$(EXEEXT) extend_dset$(EXEEXT) h5watch$(EXEEXT)
|
||||
|
||||
bin_PROGRAMS=h5watch
|
||||
noinst_PROGRAMS=swmr_check_compat_vfd h5watchgentest extend_dset
|
||||
|
||||
# Add h5watch specific linker flags here
|
||||
h5watch_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
|
||||
|
||||
# Programs all depend on the hdf5 library, the tools library, and the HL
|
||||
# library.
|
||||
LDADD=$(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5)
|
||||
#
|
||||
CHECK_CLEANFILES+=*.h5
|
||||
DISTCLEANFILES=testh5watch.sh
|
||||
|
||||
include $(top_srcdir)/config/conclude.am
|
||||
1458
hl/tools/h5watch/Makefile.in
Normal file
1458
hl/tools/h5watch/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
489
hl/tools/h5watch/extend_dset.c
Normal file
489
hl/tools/h5watch/extend_dset.c
Normal file
@@ -0,0 +1,489 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include "H5HLprivate2.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
/*
|
||||
* Extending datasets in WATCH.h5 generated by h5watchgentest.c
|
||||
*/
|
||||
#define DSET_ONE "DSET_ONE"
|
||||
#define DSET_TWO "DSET_TWO"
|
||||
#define DSET_CMPD "DSET_CMPD"
|
||||
#define DSET_CMPD_ESC "DSET_CMPD_ESC"
|
||||
#define DSET_CMPD_TWO "DSET_CMPD_TWO"
|
||||
#define DSET_ALLOC_LATE "DSET_ALLOC_LATE"
|
||||
#define DSET_ALLOC_EARLY "DSET_ALLOC_EARLY"
|
||||
|
||||
/* The message sent by this process (extend_dset) to the test script to start "h5watch" */
|
||||
#define WRITER_MESSAGE "writer_message"
|
||||
/* The message received from the test script to start extending dataset */
|
||||
#define READER_MESSAGE "reader_message"
|
||||
/* Message timeout in seconds */
|
||||
#define MESSAGE_TIMEOUT 300
|
||||
|
||||
/* Size of data buffer */
|
||||
#define TEST_BUF_SIZE 100
|
||||
|
||||
/*
|
||||
* Test variations (incremental) for one-dimensional dataset:
|
||||
* Varies from 10->13->12->12->1->3
|
||||
*/
|
||||
#define ONE_NTESTS 5
|
||||
int one_tests[ONE_NTESTS] = {3, -1, 0, -11, 2};
|
||||
|
||||
/*
|
||||
* Test variations (incremental) for two-dimensional dataset:
|
||||
* Varies from {4,10}->{6,12}->{8,1}->{10,1}->
|
||||
* {3,3}->{2,2}->{1,2}->
|
||||
* {1,4}->{1,3}->{1,3}
|
||||
*/
|
||||
#define TWO_NTESTS 9
|
||||
int two_tests[TWO_NTESTS][2] = { {2, 2}, {2, -11}, {2, 0},
|
||||
{-7, 2}, {-1, -1}, {-1, 0},
|
||||
{0, 2}, {0, -1}, {0, 0}
|
||||
};
|
||||
|
||||
static int extend_dset_two(const char *file, char *dname);
|
||||
static int extend_dset_one(const char *file, char *dname);
|
||||
void send_message(const char *file);
|
||||
static int wait_message(const char *file);
|
||||
|
||||
|
||||
/* Data structures for datasets with compound data type */
|
||||
typedef struct sub22_t {
|
||||
unsigned int a;
|
||||
unsigned int b;
|
||||
unsigned int c;
|
||||
} sub22_t;
|
||||
|
||||
typedef struct sub2_t {
|
||||
unsigned int a;
|
||||
sub22_t b;
|
||||
unsigned int c;
|
||||
} sub2_t;
|
||||
|
||||
typedef struct sub4_t {
|
||||
unsigned int a;
|
||||
unsigned int b;
|
||||
} sub4_t;
|
||||
|
||||
typedef struct set_t {
|
||||
unsigned int field1;
|
||||
sub2_t field2;
|
||||
double field3;
|
||||
sub4_t field4;
|
||||
} set_t;
|
||||
|
||||
/*
|
||||
* To send a message by creating the file.
|
||||
*/
|
||||
void
|
||||
send_message(const char *file)
|
||||
{
|
||||
FILE *id;
|
||||
|
||||
id = fopen(file, "w+");
|
||||
fclose(id);
|
||||
} /* send_message() */
|
||||
|
||||
/*
|
||||
*
|
||||
* Repeatedly check for the message file.
|
||||
* It will stop when the file exists or exceeds the timeout limit.
|
||||
*/
|
||||
static int
|
||||
wait_message(const char *file)
|
||||
{
|
||||
FILE *id; /* File pointer */
|
||||
time_t t0, t1; /* Time info */
|
||||
|
||||
/* Start timer */
|
||||
time(&t0);
|
||||
|
||||
/* Wait for message from test script to start work */
|
||||
while((id = fopen(file, "r")) == NULL) {
|
||||
/* Get current time */
|
||||
time(&t1);
|
||||
/*
|
||||
* Determine time difference--
|
||||
* if waiting too long for the message, then it is
|
||||
* unlikely the message will get sent, then fail rather
|
||||
* than loop forever.
|
||||
*/
|
||||
if(difftime(t1, t0) > MESSAGE_TIMEOUT)
|
||||
goto done;
|
||||
}
|
||||
|
||||
fclose(id);
|
||||
unlink(file);
|
||||
return(SUCCEED);
|
||||
|
||||
done:
|
||||
return(FAIL);
|
||||
} /* wait_message() */
|
||||
|
||||
/*
|
||||
***********************************************************************
|
||||
*
|
||||
* Extending a two-dimensional dataset:
|
||||
* dims[0] dims[1]
|
||||
* ------- -------
|
||||
* case #1: increase increase
|
||||
* case #2: increase decrease
|
||||
* case #3: increase same
|
||||
* case #4: decrease increase
|
||||
* case #5: decrease decrease (no action)
|
||||
* case #6: decrease same (no action)
|
||||
* case #7: same increase
|
||||
* case #8: same decrease (no action)
|
||||
* case #9: same same (no action)
|
||||
*
|
||||
* two_tests[TWO_NTESTS][2] = { {2,2}, {2,-11}, {2,0},
|
||||
* {-7,2}, {-1,-1}, {-1,0},
|
||||
* {0,2}, {0,-1}, {0,0} }
|
||||
* varies from {4,10}->{6,12}->{8,1}->{10,1}->
|
||||
* {3,3}->{2,2}->{1,2}->
|
||||
* {1,4}->{1,3}->{1,3}
|
||||
***********************************************************************
|
||||
*/
|
||||
static int
|
||||
extend_dset_two(const char *file, char *dname)
|
||||
{
|
||||
hid_t fid = -1; /* file id */
|
||||
hid_t fapl = -1; /* file access property list id */
|
||||
hid_t did = -1; /* dataset id */
|
||||
hid_t sid = -1; /* dataspace id */
|
||||
hid_t dtid = -1; /* dataset's datatype id */
|
||||
int ndims; /* # of dimension sizes */
|
||||
unsigned i, j; /* local index variable */
|
||||
hsize_t ext_dims[2]; /* new dimension sizes after extension */
|
||||
hsize_t cur_dims[2]; /* current dimension sizes */
|
||||
size_t dtype_size; /* size of the dataset's datatype */
|
||||
unsigned num_elmts; /* number of elements in the dataset */
|
||||
int ibuf[TEST_BUF_SIZE]; /* buffer for storing retrieved elements (integer) */
|
||||
set_t cbuf[TEST_BUF_SIZE]; /* buffer for storing retrieved elemnets (compound) */
|
||||
|
||||
/* Create a copy of file access property list */
|
||||
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
|
||||
return -1;
|
||||
|
||||
/* Set to use the latest library format */
|
||||
if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
|
||||
return -1;
|
||||
|
||||
/* Open the file and dataset with SWMR write */
|
||||
if((fid = H5Fopen(file, H5F_ACC_RDWR|H5F_ACC_SWMR_WRITE, fapl)) < 0)
|
||||
goto done;
|
||||
|
||||
if((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Send message to the test script to start "h5watch" */
|
||||
send_message(WRITER_MESSAGE);
|
||||
|
||||
if((sid = H5Dget_space(did)) < 0)
|
||||
goto done;
|
||||
|
||||
if((ndims = H5Sget_simple_extent_ndims(sid)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Get the size of the dataset's datatype */
|
||||
if((dtype_size = H5LDget_dset_type_size(did, NULL)) == 0)
|
||||
goto done;
|
||||
|
||||
/* Get the dataset's data type */
|
||||
if((dtid = H5Tget_native_type(H5Dget_type(did), H5T_DIR_DEFAULT)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Wait for message from the test script to start extending dataset */
|
||||
if(wait_message(READER_MESSAGE) < 0)
|
||||
goto done;
|
||||
|
||||
/* Loop through different variations of extending the dataset */
|
||||
for(i = 0; i < TWO_NTESTS; i++) {
|
||||
|
||||
/* sleep to emulate about 2 seconds of application operation */
|
||||
sleep(2);
|
||||
|
||||
/* Get current dimension sizes */
|
||||
if(H5LDget_dset_dims(did, cur_dims) < 0)
|
||||
goto done;
|
||||
|
||||
/* Set up the new extended dimension sizes */
|
||||
ext_dims[0] = cur_dims[0] + (hsize_t)two_tests[i][0];
|
||||
ext_dims[1] = cur_dims[1] + (hsize_t)two_tests[i][1];
|
||||
|
||||
/* Extend the dataset */
|
||||
if(H5Dset_extent(did, ext_dims) < 0)
|
||||
goto done;
|
||||
|
||||
num_elmts = 1;
|
||||
for(j = 0; j < (unsigned)ndims; j++)
|
||||
num_elmts *= (unsigned)ext_dims[j];
|
||||
|
||||
/* Compound type */
|
||||
if(!HDstrcmp(dname, DSET_CMPD_TWO)) {
|
||||
|
||||
HDmemset(cbuf, 0, sizeof(cbuf));
|
||||
for(j = 0; j < num_elmts; j++) {
|
||||
cbuf[j].field1 = i + 1;
|
||||
cbuf[j].field2.a = i + 1;
|
||||
cbuf[j].field2.c = i + 1;
|
||||
cbuf[j].field2.b.a = i + 1;
|
||||
cbuf[j].field2.b.b = i + 1;
|
||||
cbuf[j].field2.b.c = i + 1;
|
||||
cbuf[j].field3 = i + 1;
|
||||
cbuf[j].field4.a = i + 1;
|
||||
cbuf[j].field4.b = i + 1;
|
||||
}
|
||||
|
||||
/* Write to the dataset */
|
||||
if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, cbuf) < 0)
|
||||
goto done;
|
||||
} else { /* Integer type */
|
||||
HDmemset(ibuf, 0, sizeof(ibuf));
|
||||
for(j = 0; j < num_elmts; j++)
|
||||
ibuf[j] = (int)(i + 1);
|
||||
|
||||
/* Write to the dataset */
|
||||
if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf) < 0)
|
||||
goto done;
|
||||
}
|
||||
|
||||
if(H5Dflush(did) < 0)
|
||||
goto done;
|
||||
|
||||
} /* end for TWO_NTESTS */
|
||||
|
||||
/* Closing */
|
||||
if(H5Tclose(dtid) < 0) goto done;
|
||||
if(H5Dclose(did) < 0) goto done;
|
||||
if(H5Pclose(fapl) < 0) goto done;
|
||||
if(H5Fclose(fid) < 0) goto done;
|
||||
|
||||
return(SUCCEED);
|
||||
|
||||
done:
|
||||
H5E_BEGIN_TRY
|
||||
H5Tclose(dtid);
|
||||
H5Dclose(did);
|
||||
H5Pclose(fapl);
|
||||
H5Fclose(fid);
|
||||
H5E_END_TRY
|
||||
|
||||
return(FAIL);
|
||||
|
||||
} /* extend_dset_two() */
|
||||
|
||||
/*
|
||||
***********************************************************************
|
||||
*
|
||||
* Extending a one-dimensional dataset
|
||||
* Test cases:
|
||||
* #1: increase
|
||||
* #2: decrease
|
||||
* #3: same
|
||||
* #4: decrease
|
||||
* #5: increase
|
||||
*
|
||||
* one_tests[ONE_NTESTS] = {3, -1, 0, -11, 2}
|
||||
* varies from 10->13->12->12->1->3
|
||||
*
|
||||
***********************************************************************
|
||||
*/
|
||||
static int
|
||||
extend_dset_one(const char *file, char *dname)
|
||||
{
|
||||
hid_t fid = -1; /* file id */
|
||||
hid_t fapl = -1; /* file access property list id */
|
||||
hid_t did = -1; /* dataset id */
|
||||
hid_t dtid = -1; /* dataset's datatype id */
|
||||
hid_t sid = -1; /* dataspace id */
|
||||
hid_t mid = -1; /* memory space id */
|
||||
unsigned i, j; /* local index variable */
|
||||
int ibuf[TEST_BUF_SIZE]; /* buffer for storing retrieved elements (integer) */
|
||||
set_t cbuf[TEST_BUF_SIZE]; /* buffer for storing retrieved elemnets (compound) */
|
||||
hsize_t cur_dims[1]; /* current dimension sizes */
|
||||
hsize_t ext_dims[1]; /* new dimension sizes after extension */
|
||||
hsize_t offset[1]; /* starting offsets of appended data */
|
||||
hsize_t count[1]; /* dimension sizes of appended data */
|
||||
size_t dtype_size; /* size of the dataset's datatype */
|
||||
|
||||
/* Create a copy of file access property list */
|
||||
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
|
||||
return -1;
|
||||
/* Set to use the latest library format */
|
||||
if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
|
||||
return -1;
|
||||
|
||||
/* Open the file and dataset with SWMR write */
|
||||
if((fid = H5Fopen(file, H5F_ACC_RDWR|H5F_ACC_SWMR_WRITE, fapl)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Send message to the test script to start "h5watch" */
|
||||
send_message(WRITER_MESSAGE);
|
||||
|
||||
if((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Get size of the dataset's datatype */
|
||||
if((dtype_size = H5LDget_dset_type_size(did, NULL)) == 0)
|
||||
goto done;
|
||||
|
||||
/* Get dataset's datatype */
|
||||
if((dtid = H5Tget_native_type(H5Dget_type(did), H5T_DIR_DEFAULT)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Wait for message from the test script to start extending dataset */
|
||||
wait_message(READER_MESSAGE);
|
||||
|
||||
/* Loop through different variations of extending the dataset */
|
||||
for(i = 0; i < ONE_NTESTS; i++) {
|
||||
|
||||
/* sleep to emulate about 2 seconds of application operation */
|
||||
sleep(2);
|
||||
|
||||
/* Get current dimension sizes */
|
||||
if(H5LDget_dset_dims(did, cur_dims) < 0)
|
||||
goto done;
|
||||
|
||||
/* Set up the new extended dimension sizes */
|
||||
ext_dims[0] = cur_dims[0] + (hsize_t)one_tests[i];
|
||||
|
||||
/* Extend the dataset */
|
||||
if(H5Dset_extent(did, ext_dims) < 0)
|
||||
goto done;
|
||||
|
||||
/* Write to the new appended region of the dataset */
|
||||
if(one_tests[i] > 0) {
|
||||
|
||||
/* Select the extended region */
|
||||
offset[0] = cur_dims[0];
|
||||
count[0] = (hsize_t)one_tests[i];
|
||||
if((sid = H5Dget_space(did)) < 0)
|
||||
goto done;
|
||||
if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
|
||||
goto done;
|
||||
|
||||
/* Set up memory space and get dataset's datatype */
|
||||
if((mid = H5Screate_simple(1, count, NULL)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Initialize data for the extended region of the dataset */
|
||||
/* Compound type */
|
||||
if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) {
|
||||
HDmemset(cbuf, 0, sizeof(cbuf));
|
||||
for(j = 0; j < (unsigned)one_tests[i]; j++) {
|
||||
cbuf[j].field1 = j + 1;
|
||||
cbuf[j].field2.a = j + 2;
|
||||
cbuf[j].field2.b.a = j + 2;
|
||||
cbuf[j].field2.b.b = j + 2;
|
||||
cbuf[j].field2.b.c = j + 2;
|
||||
cbuf[j].field2.c = j + 2;
|
||||
|
||||
cbuf[j].field3 = j + 3;
|
||||
|
||||
cbuf[j].field4.a = j + 4;
|
||||
cbuf[j].field4.b = j + 4;
|
||||
} /* end for */
|
||||
|
||||
/* Write to the extended region of the dataset */
|
||||
if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, cbuf) < 0)
|
||||
goto done;
|
||||
} else { /* Integer type */
|
||||
for(j = 0; j < (unsigned)one_tests[i]; j++)
|
||||
ibuf[j] = (int)j;
|
||||
|
||||
/* Write to the extended region of the dataset */
|
||||
if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, ibuf) < 0)
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Closing */
|
||||
if(H5Sclose(sid) < 0) goto done;
|
||||
if(H5Sclose(mid) < 0) goto done;
|
||||
} /* end if */
|
||||
|
||||
if(H5Dflush(did) < 0)
|
||||
goto done;
|
||||
|
||||
} /* end for ONE_NTESTS */
|
||||
|
||||
/* Closing */
|
||||
if(H5Tclose(dtid) < 0) goto done;
|
||||
if(H5Dclose(did) < 0) goto done;
|
||||
if(H5Pclose(fapl) < 0) goto done;
|
||||
if(H5Fclose(fid) < 0) goto done;
|
||||
|
||||
return(SUCCEED);
|
||||
|
||||
done:
|
||||
H5E_BEGIN_TRY
|
||||
H5Sclose(sid);
|
||||
H5Sclose(mid);
|
||||
H5Tclose(dtid);
|
||||
H5Dclose(did);
|
||||
H5Pclose(fapl);
|
||||
H5Fclose(fid);
|
||||
H5E_END_TRY
|
||||
|
||||
return(FAIL);
|
||||
} /* extend_dset_one() */
|
||||
|
||||
/* Usage: extend_dset xx.h5 dname */
|
||||
int
|
||||
main(int argc, const char *argv[])
|
||||
{
|
||||
char *dname = NULL;
|
||||
char *fname = NULL;
|
||||
|
||||
if(argc != 3) {
|
||||
fprintf(stderr, "Should have file name and dataset name to be extended...\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Get the dataset name to be extended */
|
||||
fname = strdup(argv[1]);
|
||||
dname = strdup(argv[2]);
|
||||
|
||||
if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) {
|
||||
if(extend_dset_one(fname, dname) < 0)
|
||||
goto done;
|
||||
} else if(!HDstrcmp(dname, DSET_ONE) ||
|
||||
!HDstrcmp(dname, DSET_ALLOC_LATE) ||
|
||||
!HDstrcmp(dname, DSET_ALLOC_EARLY)) {
|
||||
if(extend_dset_one(fname, dname) < 0)
|
||||
goto done;
|
||||
} else if(!HDstrcmp(dname, DSET_TWO) || !HDstrcmp(dname, DSET_CMPD_TWO)) {
|
||||
if(extend_dset_two(fname, dname) < 0)
|
||||
goto done;
|
||||
} else {
|
||||
fprintf(stdout, "Dataset cannot be extended...\n");
|
||||
goto done;
|
||||
}
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
done:
|
||||
if(dname) HDfree(dname);
|
||||
if(fname) HDfree(fname);
|
||||
exit(EXIT_FAILURE);
|
||||
} /* main() */
|
||||
977
hl/tools/h5watch/h5watch.c
Normal file
977
hl/tools/h5watch/h5watch.c
Normal file
@@ -0,0 +1,977 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <float.h>
|
||||
|
||||
#include "h5tools.h"
|
||||
#include "h5tools_dump.h"
|
||||
#include "H5LDprivate.h"
|
||||
|
||||
/*
|
||||
* Note: This tool used private routine
|
||||
*/
|
||||
#define PROGRAMNAME "h5watch" /* Name of tool */
|
||||
#define FIELD_SEP "," /* nested field separator */
|
||||
#define DEFAULT_RETRY 50 /* number of times to try opening the file */
|
||||
|
||||
|
||||
/*
|
||||
* Note:(see comments in hl/src/H5LDprivate.h)
|
||||
* This tool uses private routines H5LD_construct_vector()and H5LD_clean_vector()
|
||||
* This tool uses H5LD_memb_t data structure declared in H5LDprivate.h
|
||||
*/
|
||||
|
||||
const char *progname = "h5watch"; /* tool name */
|
||||
static char *g_list_of_fields = NULL; /* command line input for "list_of_fields" */
|
||||
static char *g_dup_fields = NULL; /* copy of "list_of_fields" */
|
||||
static H5LD_memb_t **g_listv = NULL; /* vector info for "list_of_fields" */
|
||||
|
||||
static hbool_t g_monitor_size_only = FALSE; /* monitor changes in dataset dimension sizes */
|
||||
static unsigned g_polling_interval = 1; /* polling interval to check appended data */
|
||||
static hbool_t g_label = FALSE; /* label compound values */
|
||||
static int g_display_width = 80; /* output width in characters */
|
||||
static hbool_t g_simple_output = FALSE; /* make output more machine-readable */
|
||||
static unsigned g_retry = DEFAULT_RETRY; /* # of times to try opening the file if somehow file is unstable */
|
||||
static hbool_t g_display_hex = FALSE; /* display data in hexadecimal format : LATER */
|
||||
|
||||
static herr_t doprint(hid_t did, hsize_t *start, hsize_t *block, int rank);
|
||||
static herr_t slicendump(hid_t did, hsize_t *prev_dims, hsize_t *cur_dims,
|
||||
hsize_t *start, hsize_t *block, int rank, int subrank);
|
||||
static herr_t monitor_dataset(hid_t fid, char *dsetname);
|
||||
static herr_t process_cmpd_fields(hid_t fid, char *dsetname);
|
||||
static herr_t check_dataset(hid_t fid, char *dsetname);
|
||||
static void leave(int ret);
|
||||
static void usage(const char *prog);
|
||||
static void parse_command_line(int argc, const char *argv[]);
|
||||
|
||||
|
||||
/*
|
||||
* Command-line options: The user can only specify long-named parameters.
|
||||
* The long-named ones can be partially spelled. When
|
||||
* adding more, make sure that they don't clash with each other.
|
||||
*/
|
||||
static const char *s_opts ="?";
|
||||
static struct long_options l_opts[] = {
|
||||
{ "help", no_arg, 'h' },
|
||||
{ "hel", no_arg, 'h' },
|
||||
{ "dim", no_arg, 'd' },
|
||||
{ "di", no_arg, 'd' },
|
||||
{ "label", no_arg, 'l' },
|
||||
{ "labe", no_arg, 'l' },
|
||||
{ "lab", no_arg, 'l' },
|
||||
{ "la", no_arg, 'l' },
|
||||
{ "simple", no_arg, 'S' },
|
||||
{ "simpl", no_arg, 'S' },
|
||||
{ "simp", no_arg, 'S' },
|
||||
{ "sim", no_arg, 'S' },
|
||||
{ "si", no_arg, 'S' },
|
||||
{ "hexdump", no_arg, 'x' },
|
||||
{ "hexdum", no_arg, 'x' },
|
||||
{ "hexdu", no_arg, 'x' },
|
||||
{ "hexd", no_arg, 'x' },
|
||||
{ "hex", no_arg, 'x' },
|
||||
{ "width", require_arg, 'w' },
|
||||
{ "widt", require_arg, 'w' },
|
||||
{ "wid", require_arg, 'w' },
|
||||
{ "wi", require_arg, 'w' },
|
||||
{ "polling", require_arg, 'p' },
|
||||
{ "pollin", require_arg, 'p' },
|
||||
{ "polli", require_arg, 'p' },
|
||||
{ "poll", require_arg, 'p' },
|
||||
{ "pol", require_arg, 'p' },
|
||||
{ "po", require_arg, 'p' },
|
||||
{ "fields", require_arg, 'f' },
|
||||
{ "field", require_arg, 'f' },
|
||||
{ "fiel", require_arg, 'f' },
|
||||
{ "fie", require_arg, 'f' },
|
||||
{ "fi", require_arg, 'f' },
|
||||
{ "version", no_arg, 'V' },
|
||||
{ "versio", no_arg, 'V' },
|
||||
{ "versi", no_arg, 'V' },
|
||||
{ "vers", no_arg, 'V' },
|
||||
{ "ver", no_arg, 'V' },
|
||||
{ "ve", no_arg, 'V' },
|
||||
{ NULL, 0, '\0' }
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: doprint()
|
||||
*
|
||||
* Purpose: Prepare to print the dataset's appended data.
|
||||
* Call the tools library routine h5tools_dump_dset() to do the printing.
|
||||
* (This routine is mostly copied from dump_dataset_values() in tools/h5ls/h5ls.c
|
||||
* and modified accordingly).
|
||||
*
|
||||
* Return: 0 on success; negative on failure
|
||||
*
|
||||
* Programmer: Vailin Choi; August 2010
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
doprint(hid_t did, hsize_t *start, hsize_t *block, int rank)
|
||||
{
|
||||
h5tools_context_t ctx; /* print context */
|
||||
h5tool_format_t info; /* Format info for the tools library */
|
||||
static char fmt_double[16], fmt_float[16]; /* Format info */
|
||||
struct subset_t subset; /* Subsetting info */
|
||||
hsize_t ss_start[H5S_MAX_RANK]; /* Info for hyperslab */
|
||||
hsize_t ss_stride[H5S_MAX_RANK]; /* Info for hyperslab */
|
||||
hsize_t ss_block[H5S_MAX_RANK]; /* Info for hyperslab */
|
||||
hsize_t ss_count[H5S_MAX_RANK]; /* Info for hyperslab */
|
||||
int i; /* Local index variable */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
/* Subsetting information for the tools library printing routines */
|
||||
subset.start.data = ss_start;
|
||||
subset.stride.data = ss_stride;
|
||||
subset.block.data = ss_block;
|
||||
subset.count.data = ss_count;
|
||||
|
||||
/* Initialize subsetting information */
|
||||
for(i = 0; i < rank; i++) {
|
||||
subset.stride.data[i] = 1;
|
||||
subset.count.data[i] = 1;
|
||||
subset.start.data[i] = start[i];
|
||||
subset.block.data[i] = block[i];
|
||||
}
|
||||
|
||||
HDmemset(&ctx, 0, sizeof(ctx));
|
||||
|
||||
/* Set to all default values and then override */
|
||||
HDmemset(&info, 0, sizeof info);
|
||||
|
||||
if(g_simple_output) {
|
||||
info.idx_fmt = "";
|
||||
info.line_ncols = 65535; /*something big*/
|
||||
info.line_per_line = 1;
|
||||
info.line_multi_new = 0;
|
||||
info.line_pre = " ";
|
||||
info.line_cont = " ";
|
||||
|
||||
info.arr_pre = "";
|
||||
info.arr_suf = "";
|
||||
info.arr_sep = " ";
|
||||
|
||||
info.cmpd_pre = "";
|
||||
info.cmpd_suf = "";
|
||||
info.cmpd_sep = " ";
|
||||
|
||||
/* The "fields" selected by the user */
|
||||
info.cmpd_listv = (const struct H5LD_memb_t **)g_listv;
|
||||
|
||||
if(g_label) info.cmpd_name = "%s=";
|
||||
|
||||
info.elmt_suf1 = " ";
|
||||
info.str_locale = ESCAPE_HTML;
|
||||
|
||||
} else {
|
||||
info.idx_fmt = "(%s)";
|
||||
if(!g_display_width) {
|
||||
info.line_ncols = 65535;
|
||||
info.line_per_line = 1;
|
||||
}
|
||||
else
|
||||
info.line_ncols = (unsigned)g_display_width;
|
||||
|
||||
info.line_multi_new = 1;
|
||||
|
||||
/* The "fields" selected by the user */
|
||||
info.cmpd_listv = (const struct H5LD_memb_t **)g_listv;
|
||||
if(g_label) info.cmpd_name = "%s=";
|
||||
info.line_pre = " %s ";
|
||||
info.line_cont = " %s ";
|
||||
info.str_repeat = 8;
|
||||
}
|
||||
|
||||
/* Floating point types should display full precision */
|
||||
sprintf(fmt_float, "%%1.%dg", FLT_DIG);
|
||||
info.fmt_float = fmt_float;
|
||||
sprintf(fmt_double, "%%1.%dg", DBL_DIG);
|
||||
info.fmt_double = fmt_double;
|
||||
|
||||
info.dset_format = "DSET-%s ";
|
||||
info.dset_hidefileno = 0;
|
||||
|
||||
info.obj_format = "-%lu:"H5_PRINTF_HADDR_FMT;
|
||||
info.obj_hidefileno = 0;
|
||||
|
||||
info.dset_blockformat_pre = "%sBlk%lu: ";
|
||||
info.dset_ptformat_pre = "%sPt%lu: ";
|
||||
|
||||
info.line_indent = "";
|
||||
|
||||
if(g_display_hex) {
|
||||
/* Print all data in hexadecimal format if the `-x' or `--hexdump'
|
||||
* command line switch was given. */
|
||||
info.raw = TRUE;
|
||||
}
|
||||
|
||||
/* Print the values. */
|
||||
if((ret_value = h5tools_dump_dset(stdout, &info, &ctx, did, &subset)) < 0)
|
||||
error_msg("unable to print data\n");
|
||||
|
||||
HDfprintf(stdout, "\n");
|
||||
|
||||
return(ret_value);
|
||||
|
||||
} /* doprint() */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: slicendump
|
||||
*
|
||||
* Purpose: To dump the slice for each dimension
|
||||
* For example: prev_dims[2] = {5, 4}; cur_dims[2] = {7, 8}
|
||||
* This routine will dump data as follows:
|
||||
* {0, 3} to {0, 7} (1x4 elements)
|
||||
* {1, 3} to {0, 7} (1x4 elements)
|
||||
* {2, 3} to {0, 7} (1x4 elements)
|
||||
* {3, 3} to {0, 7} (1x4 elements)
|
||||
* {4, 3} to {0, 7} (1x4 elements)
|
||||
* {5, 0} to {6, 7} (2x8 elements)
|
||||
*
|
||||
* Return: Non-negative on success
|
||||
* Negative on failure
|
||||
*
|
||||
* Programmer: Vailin Choi; August 2010
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
slicendump(hid_t did, hsize_t *prev_dims, hsize_t *cur_dims, hsize_t *start, hsize_t *block, int rank, int subrank)
|
||||
{
|
||||
int i; /* Local index variable */
|
||||
int ind; /* Index for the current rank */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
ind = rank - subrank;
|
||||
|
||||
if((subrank - 1) > 0) {
|
||||
/* continue onto the next dimension */
|
||||
for (i = 0; i < (hssize_t)MIN(prev_dims[ind], cur_dims[ind]); i++){
|
||||
start[ind] = (hsize_t)i;
|
||||
if((ret_value = slicendump(did, prev_dims, cur_dims, start, block, rank, subrank-1)) < 0)
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
/* this dimension remains the same or shrinking */
|
||||
if(cur_dims[ind] <= prev_dims[ind])
|
||||
goto done;
|
||||
|
||||
/* select first the slice for the faster changing dimension */
|
||||
/* select later the whole slice for the slower changing dimension */
|
||||
start[ind] = prev_dims[ind];
|
||||
block[ind] = cur_dims[ind] - prev_dims[ind];
|
||||
|
||||
for(i = ind + 1; i < rank; i++){
|
||||
start[i] = 0;
|
||||
block[i] = cur_dims[i];
|
||||
}
|
||||
|
||||
/* Print the appended data */
|
||||
ret_value = doprint(did, start, block, rank);
|
||||
|
||||
done:
|
||||
return(ret_value);
|
||||
} /* slicendump() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: monitor_dataset
|
||||
*
|
||||
* Purpose: To poll a dataset periodically for changes in dimension sizes.
|
||||
* For dataset with unchanged and/or decreased dimension sizes:
|
||||
* it just prints the dimension size changes
|
||||
* For dataset with increase in at least one of its dimension sizes:
|
||||
* it will print the new appended data to the dataset
|
||||
*
|
||||
* Return: Non-negative on success: dataset can be monitored
|
||||
* Negative on failure: dataset cannot be monitored
|
||||
*
|
||||
* Programmer: Vailin Choi; August 2010
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
monitor_dataset(hid_t fid, char *dsetname)
|
||||
{
|
||||
hid_t did; /* dataset id */
|
||||
hid_t sid; /* dataspace id */
|
||||
int ndims; /* # of dimensions in the dataspace */
|
||||
int i, u; /* local index variable */
|
||||
hsize_t prev_dims[H5S_MAX_RANK]; /* current dataspace dimensions */
|
||||
hsize_t cur_dims[H5S_MAX_RANK]; /* previous dataspace dimensions */
|
||||
herr_t ret_value = SUCCEED; /* return value */
|
||||
|
||||
HDfprintf(stdout, "Monitoring dataset %s...\n", dsetname);
|
||||
|
||||
/* Open the dataset for minitoring */
|
||||
if((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) {
|
||||
error_msg("error in opening dataset \"%s\"\n", dsetname);
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
if((sid = H5Dget_space(did)) < 0) {
|
||||
error_msg("error in getting dataspace id for dataset \"%s\"\n", dsetname);
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Get the dataset's dimension sizes */
|
||||
if((ndims = H5Sget_simple_extent_dims(sid, prev_dims, NULL)) < 0) {
|
||||
error_msg("unable to get dimensions sizes for \"%s\"\n", dsetname);
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
while(1) {
|
||||
|
||||
/* Refreshes the dataset */
|
||||
if(H5Drefresh(did) < 0) {
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Get the dataset's current dimension sizes */
|
||||
if(H5LDget_dset_dims(did, cur_dims) < 0) {
|
||||
error_msg("unable to get dimension sizes for \"%s\"\n", dsetname);
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Check the dimension sizes */
|
||||
for(i = 0; i < ndims; i++)
|
||||
if(cur_dims[i] != prev_dims[i])
|
||||
break;
|
||||
|
||||
/* at least one dimension has changed */
|
||||
if(i != ndims) {
|
||||
/* Printing changes in dimension sizes */
|
||||
for(u = 0; u < ndims; u++) {
|
||||
HDfprintf(stdout, "dimension %u: %Hu->%Hu", (unsigned)u, prev_dims[u], cur_dims[u]);
|
||||
if(cur_dims[u] > prev_dims[u])
|
||||
HDfprintf(stdout, " (increases)\n");
|
||||
else if(cur_dims[u] < prev_dims[u])
|
||||
HDfprintf(stdout, " (decreases)\n");
|
||||
else
|
||||
HDfprintf(stdout, " (unchanged)\n");
|
||||
}
|
||||
|
||||
/* Printing elements appended to the dataset if there is */
|
||||
if(!g_monitor_size_only) {
|
||||
|
||||
/* See if at least one dimension size has increased */
|
||||
for(u = 0; u < ndims; u++) {
|
||||
int j;
|
||||
hsize_t start[H5S_MAX_RANK];
|
||||
hsize_t block[H5S_MAX_RANK];
|
||||
|
||||
/* Print the new appended data to the dataset */
|
||||
if(cur_dims[u] > prev_dims[u]) {
|
||||
HDfprintf(stdout, " Data:\n");
|
||||
|
||||
for(j = 0; j < ndims; j++) {
|
||||
start[j] = 0;
|
||||
block[j] = 1;
|
||||
}
|
||||
|
||||
if((ret_value = slicendump(did, prev_dims, cur_dims, start, block, ndims, ndims)) < 0)
|
||||
goto done;
|
||||
break;
|
||||
}
|
||||
} /* end for */
|
||||
}
|
||||
HDfflush(stdout);
|
||||
}
|
||||
|
||||
/* Save the current dimension sizes */
|
||||
HDmemcpy(prev_dims, cur_dims, (size_t)ndims * sizeof(hsize_t));
|
||||
|
||||
/* Sleep before next monitor */
|
||||
HDsleep(g_polling_interval);
|
||||
} /* end while */
|
||||
|
||||
done:
|
||||
/* Closing */
|
||||
H5E_BEGIN_TRY
|
||||
H5Dclose(did);
|
||||
H5E_END_TRY
|
||||
|
||||
return(ret_value);
|
||||
} /* monitor_dataset() */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: process_cmpd_fields
|
||||
*
|
||||
* Purpose: To check whether the fields selected in "g_list_of_fields"
|
||||
* are valid fields associated with the dataset.
|
||||
*
|
||||
* Return: 0 on success; negative on failure
|
||||
*
|
||||
* Programmer: Vailin Choi; August 2010
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
process_cmpd_fields(hid_t fid, char *dsetname)
|
||||
{
|
||||
hid_t did=-1; /* dataset id */
|
||||
hid_t dtid=-1, tid=-1; /* dataset's data type id */
|
||||
size_t len; /* number of comma-separated fields in "g_list_of_fields" */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
HDassert(g_list_of_fields && *g_list_of_fields);
|
||||
|
||||
/* Open the dataset */
|
||||
if((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) {
|
||||
error_msg("error in opening dataset \"%s\"\n", dsetname);
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Get the dataset's datatype */
|
||||
if(((dtid = H5Dget_type(did)) < 0) || (tid = H5Tget_native_type(dtid, H5T_DIR_DEFAULT)) < 0) {
|
||||
error_msg("error in getting dataset's datatype\n");
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Check to make sure that the dataset's datatype is compound type */
|
||||
if(H5Tget_class(dtid) != H5T_COMPOUND) {
|
||||
error_msg("dataset should be compound type for <list_of_fields>\n");
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Make a copy of "g_list_of_fields" */
|
||||
if((g_dup_fields = HDstrdup(g_list_of_fields)) == NULL) {
|
||||
error_msg("error in duplicating g_list_of_fields\n");
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Estimate the number of comma-separated fields in "g_list of_fields" */
|
||||
len = HDstrlen(g_list_of_fields)/2 + 2;
|
||||
|
||||
/* Allocate memory for a list vector of H5LD_memb_t structures to store "g_list_of_fields" info */
|
||||
if((g_listv = (H5LD_memb_t **)HDcalloc(len, sizeof(H5LD_memb_t *))) == NULL) {
|
||||
error_msg("error in allocating memory for H5LD_memb_t\n");
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Process and store info for "g_listv" */
|
||||
if(H5LD_construct_vector(g_dup_fields, g_listv, tid) < 0) {
|
||||
error_msg("error in processing <list_of_fields>\n");
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Will free memory for g_listv and g_dup_fields when exiting from h5watch */
|
||||
done:
|
||||
/* Closing */
|
||||
H5E_BEGIN_TRY
|
||||
H5Tclose(dtid);
|
||||
H5Tclose(tid);
|
||||
H5Dclose(did);
|
||||
H5E_END_TRY
|
||||
return(ret_value);
|
||||
} /* process_cmpd_fields() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: check_dataset
|
||||
*
|
||||
* Purpose: To check whether a dataset can be monitored:
|
||||
A chunked dataset with unlimited or max. dimension setting
|
||||
*
|
||||
* Return: Non-negative on success: dataset can be monitored
|
||||
* Negative on failure: dataset cannot be monitored
|
||||
*
|
||||
* Programmer: Vailin Choi; August 2010
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
check_dataset(hid_t fid, char *dsetname)
|
||||
{
|
||||
hid_t did=-1; /* Dataset id */
|
||||
hid_t dcp=-1; /* Dataset creation property */
|
||||
hid_t sid=-1; /* Dataset's dataspace id */
|
||||
int ndims; /* # of dimensions in the dataspace */
|
||||
unsigned u; /* Local index variable */
|
||||
hsize_t cur_dims[H5S_MAX_RANK]; /* size of dataspace dimensions */
|
||||
hsize_t max_dims[H5S_MAX_RANK]; /* maximum size of dataspace dimensions */
|
||||
hbool_t unlim_max_dims = FALSE; /* whether dataset has unlimited or max. dimension setting */
|
||||
void *edata;
|
||||
H5E_auto2_t func;
|
||||
H5D_layout_t layout;
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
/* Disable error reporting */
|
||||
H5Eget_auto2(H5E_DEFAULT, &func, &edata);
|
||||
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
|
||||
|
||||
/* Open the dataset */
|
||||
if((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) {
|
||||
error_msg("unable to open dataset \"%s\"\n", dsetname);
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Get dataset's creation property list */
|
||||
if((dcp = H5Dget_create_plist(did)) < 0) {
|
||||
error_msg("unable to get dataset's creation property list \"%s\"\n", dsetname);
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Query dataset's layout; the layout should be chunked or virtual */
|
||||
if((layout = H5Pget_layout(dcp)) < 0) {
|
||||
error_msg("unable to get dataset layout \"%s\"\n", dsetname);
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
if(layout != H5D_CHUNKED && layout != H5D_VIRTUAL) {
|
||||
error_msg("\"%s\" should be a chunked or virtual dataset\n", dsetname);
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
HDmemset(cur_dims, 0, sizeof cur_dims);
|
||||
HDmemset(max_dims, 0, sizeof max_dims);
|
||||
|
||||
/* Get dataset's dataspace */
|
||||
if((sid = H5Dget_space(did)) < 0) {
|
||||
error_msg("can't get dataset's dataspace\"%s\"\n", dsetname);
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Get dimension size of dataset's dataspace */
|
||||
if((ndims = H5Sget_simple_extent_dims(sid, cur_dims, max_dims)) < 0) {
|
||||
error_msg("can't get dataspace dimensions for dataset \"%s\"\n", dsetname);
|
||||
ret_value = FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Check whether dataset has unlimited dimension or max. dimension setting */
|
||||
for(u = 0; u < (unsigned)ndims; u++)
|
||||
if(max_dims[u] == H5S_UNLIMITED || cur_dims[u] != max_dims[u]) {
|
||||
unlim_max_dims = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
if(!unlim_max_dims) {
|
||||
error_msg("\"%s\" should have unlimited or max. dimension setting\n", dsetname);
|
||||
ret_value = FAIL;
|
||||
}
|
||||
|
||||
done:
|
||||
H5Eset_auto2(H5E_DEFAULT, func, edata);
|
||||
|
||||
/* Closing */
|
||||
H5E_BEGIN_TRY
|
||||
H5Sclose(sid);
|
||||
H5Pclose(dcp);
|
||||
H5Dclose(did);
|
||||
H5E_END_TRY
|
||||
|
||||
return(ret_value);
|
||||
} /* check_dataset() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: leave
|
||||
*
|
||||
* Purpose: Close the H5 Tools library and exit
|
||||
*
|
||||
* Return: Does not return
|
||||
*
|
||||
* Programmer: Vailin Choi; August 2010
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
leave(int ret)
|
||||
{
|
||||
h5tools_close();
|
||||
|
||||
exit(ret);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: usage
|
||||
*
|
||||
* Purpose: Print the usage message about h5watch (only long options)
|
||||
*
|
||||
* Return: void
|
||||
*
|
||||
* Programmer: Vailin Choi; August 2010
|
||||
*
|
||||
* Modifications:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
usage(const char *prog)
|
||||
{
|
||||
HDfflush(stdout);
|
||||
HDfprintf(stdout, "Usage: %s [OPTIONS] [OBJECT]\n", prog);
|
||||
HDfprintf(stdout, "\n");
|
||||
HDfprintf(stdout, " OPTIONS\n");
|
||||
HDfprintf(stdout, " --help Print a usage message and exit.\n");
|
||||
HDfprintf(stdout, " --version Print version number and exit.\n");
|
||||
HDfprintf(stdout, " --label Label members of compound typed dataset.\n");
|
||||
HDfprintf(stdout, " --simple Use a machine-readable output format.\n");
|
||||
HDfprintf(stdout, " --dim Monitor changes in size of dataset dimensions only.\n");
|
||||
HDfprintf(stdout, " --width=N Set the number of columns to N for output.\n");
|
||||
HDfprintf(stdout, " A value of 0 sets the number of columns to the\n");
|
||||
HDfprintf(stdout, " maximum (65535). The default width is 80 columns.\n");
|
||||
HDfprintf(stdout, " --polling=N Set the polling interval to N (in seconds) when the\n");
|
||||
HDfprintf(stdout, " dataset will be checked for appended data. The default\n");
|
||||
HDfprintf(stdout, " polling interval is 1.\n");
|
||||
HDfprintf(stdout, " --fields=<list_of_fields>\n");
|
||||
HDfprintf(stdout, " Display data for the fields specified in <list_of_fields>\n");
|
||||
HDfprintf(stdout, " for a compound data type. <list_of_fields> can be\n");
|
||||
HDfprintf(stdout, " specified as follows:\n");
|
||||
HDfprintf(stdout, " 1) A comma-separated list of field names in a\n");
|
||||
HDfprintf(stdout, " compound data type. \",\" is the separator\n");
|
||||
HDfprintf(stdout, " for field names while \".\" is the separator\n");
|
||||
HDfprintf(stdout, " for a nested field.\n");
|
||||
HDfprintf(stdout, " 2) A single field name in a compound data type.\n");
|
||||
HDfprintf(stdout, " Can use this option multiple times.\n");
|
||||
HDfprintf(stdout, " Note that backslash is the escape character to avoid\n");
|
||||
HDfprintf(stdout, " characters in field names that conflict with the tool's\n");
|
||||
HDfprintf(stdout, " separators.\n");
|
||||
HDfprintf(stdout, "\n");
|
||||
HDfprintf(stdout, " OBJECT is specified as [<filename>/<path_to_dataset>/<dsetname>]\n");
|
||||
HDfprintf(stdout, " <filename> Name of the HDF5 file. It may be preceded by path\n");
|
||||
HDfprintf(stdout, " separated by slashes to the specified HDF5 file.\n");
|
||||
HDfprintf(stdout, " <path_to_dataset> Path separated by slashes to the specified dataset\n");
|
||||
HDfprintf(stdout, " <dsetname> Name of the dataset\n");
|
||||
HDfprintf(stdout, "\n");
|
||||
HDfprintf(stdout, " User can end the h5watch process by ctrl-C (SIGINT) or kill the process (SIGTERM).\n");
|
||||
|
||||
} /* usage() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: parse_command_line
|
||||
*
|
||||
* Purpose: Parse the command line for h5watch (take only long options)
|
||||
*
|
||||
* Return: Success: Set the corresponding command flags and return void
|
||||
* Failure: Exits program with EXIT_FAILURE value.
|
||||
*
|
||||
* Programmer: Vailin Choi; August 2010
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
parse_command_line(int argc, const char *argv[])
|
||||
{
|
||||
int opt; /* Command line option */
|
||||
int tmp;
|
||||
|
||||
/* no arguments */
|
||||
if (argc == 1) {
|
||||
usage(h5tools_getprogname());
|
||||
leave(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* parse command line options */
|
||||
while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) {
|
||||
switch ((char)opt) {
|
||||
case '?':
|
||||
case 'h': /* --help */
|
||||
usage(h5tools_getprogname());
|
||||
leave(EXIT_SUCCESS);
|
||||
|
||||
case 'V': /* --version */
|
||||
print_version(progname);
|
||||
leave(EXIT_SUCCESS);
|
||||
break;
|
||||
|
||||
case 'w': /* --width=N */
|
||||
g_display_width = (int)HDstrtol(opt_arg, NULL, 0);
|
||||
if(g_display_width < 0) {
|
||||
usage(h5tools_getprogname());
|
||||
leave(EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'd': /* --dim */
|
||||
g_monitor_size_only = TRUE;
|
||||
break;
|
||||
|
||||
case 'S': /* --simple */
|
||||
g_simple_output = TRUE;
|
||||
break;
|
||||
|
||||
case 'l': /* --label */
|
||||
g_label = TRUE;
|
||||
break;
|
||||
|
||||
case 'p': /* --polling=N */
|
||||
/* g_polling_interval = HDstrtod(opt_arg, NULL); */
|
||||
if((tmp = (int)HDstrtol(opt_arg, NULL, 10)) <= 0) {
|
||||
usage(h5tools_getprogname());
|
||||
leave(EXIT_FAILURE);
|
||||
}
|
||||
g_polling_interval = (unsigned)tmp;
|
||||
break;
|
||||
|
||||
case 'f': /* --fields=<list_of_fields> */
|
||||
if(g_list_of_fields == NULL) {
|
||||
if((g_list_of_fields = HDstrdup(opt_arg)) == NULL) {
|
||||
error_msg("memory allocation failed (file %s:line %d)\n",
|
||||
__FILE__, __LINE__);
|
||||
leave(EXIT_FAILURE);
|
||||
}
|
||||
} else {
|
||||
char *str;
|
||||
|
||||
if((str = HDstrdup(opt_arg)) == NULL) {
|
||||
error_msg("memory allocation failed (file %s:line %d)\n",
|
||||
__FILE__, __LINE__);
|
||||
leave(EXIT_FAILURE);
|
||||
}
|
||||
if((g_list_of_fields = (char *)HDrealloc(g_list_of_fields, HDstrlen(g_list_of_fields) + HDstrlen(str) + 2)) == NULL) {
|
||||
error_msg("memory allocation failed (file %s:line %d)\n",
|
||||
__FILE__, __LINE__);
|
||||
leave(EXIT_FAILURE);
|
||||
|
||||
}
|
||||
HDstrcat(g_list_of_fields, FIELD_SEP);
|
||||
HDstrcat(g_list_of_fields, str);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
usage(h5tools_getprogname());
|
||||
leave(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* check for object to be processed */
|
||||
if (argc <= opt_ind) {
|
||||
error_msg("missing dataset name\n");
|
||||
usage(h5tools_getprogname());
|
||||
leave(EXIT_FAILURE);
|
||||
}
|
||||
} /* parse_command_line() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: catch_signal
|
||||
*
|
||||
* Purpose: The signal handler to catch the signals:
|
||||
* SIGTERM and SIGINT and exit from h5watch
|
||||
*
|
||||
* Return: No return
|
||||
*
|
||||
* Programmer: Vailin Choi; November 2014
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void catch_signal(int H5_ATTR_UNUSED signo)
|
||||
{
|
||||
/* Exit from h5watch */
|
||||
leave(EXIT_SUCCESS);
|
||||
|
||||
} /* catch_signal() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: main
|
||||
*
|
||||
* Purpose: h5watch
|
||||
*
|
||||
* Return: Success: 0
|
||||
* Failure: 1
|
||||
*
|
||||
* Programmer: Vailin Choi; August 2010
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
main(int argc, const char *argv[])
|
||||
{
|
||||
char drivername[50];
|
||||
char *fname = NULL;
|
||||
char *dname = NULL;
|
||||
void *edata;
|
||||
H5E_auto2_t func;
|
||||
char *x;
|
||||
hid_t fid = -1;
|
||||
hid_t fapl = -1;
|
||||
|
||||
/* Set up tool name and exit status */
|
||||
h5tools_setprogname(PROGRAMNAME);
|
||||
h5tools_setstatus(EXIT_SUCCESS);
|
||||
|
||||
/* Disable error reporting */
|
||||
H5Eget_auto2(H5E_DEFAULT, &func, &edata);
|
||||
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
|
||||
|
||||
/* Initialize h5tools lib */
|
||||
h5tools_init();
|
||||
|
||||
/* To exit from h5watch for SIGTERM signal */
|
||||
if(HDsignal(SIGTERM, catch_signal) == SIG_ERR) {
|
||||
error_msg("An error occurred while setting a signal handler.\n");
|
||||
leave(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* To exit from h5watch for SIGINT signal */
|
||||
if(HDsignal(SIGINT, catch_signal) == SIG_ERR) {
|
||||
error_msg("An error occurred while setting a signal handler.\n");
|
||||
leave(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* parse command line options */
|
||||
parse_command_line(argc, argv);
|
||||
|
||||
if(argc <= opt_ind) {
|
||||
error_msg("missing dataset name\n");
|
||||
usage(h5tools_getprogname());
|
||||
leave(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Mostly copied from tools/h5ls coding & modified accordingly */
|
||||
/*
|
||||
* [OBJECT] is specified as
|
||||
* [<filename>/<path_to_dataset>/<dsetname>]
|
||||
*
|
||||
* Example: ../dir1/foo/bar/dset
|
||||
* \_________/\______/
|
||||
* file obj
|
||||
*
|
||||
* The dichotomy is determined by calling H5Fopen() repeatedly until it
|
||||
* succeeds. The first call uses the entire name and each subsequent call
|
||||
* chops off the last component. If we reach the beginning of the name
|
||||
* then there must have been something wrong with the file (perhaps it
|
||||
* doesn't exist).
|
||||
*/
|
||||
if((fname = HDstrdup(argv[opt_ind])) == NULL) {
|
||||
error_msg("memory allocation failed (file %s:line %d)\n",
|
||||
__FILE__, __LINE__);
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Create a copy of file access property list */
|
||||
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
|
||||
return -1;
|
||||
|
||||
/* Set to use the latest library format */
|
||||
if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
|
||||
return -1;
|
||||
|
||||
do {
|
||||
while(fname && *fname) {
|
||||
fid = h5tools_fopen(fname, H5F_ACC_RDONLY|H5F_ACC_SWMR_READ, fapl, NULL, drivername, sizeof drivername);
|
||||
|
||||
if(fid >= 0) {
|
||||
HDfprintf(stdout, "Opened \"%s\" with %s driver.\n", fname, drivername);
|
||||
break; /*success*/
|
||||
} /* end if */
|
||||
|
||||
/* Shorten the file name; lengthen the object name */
|
||||
x = dname;
|
||||
dname = HDstrrchr(fname, '/');
|
||||
if(x)
|
||||
*x = '/';
|
||||
if(!dname)
|
||||
break;
|
||||
*dname = '\0';
|
||||
} /* end while */
|
||||
/* Try opening the file again if somehow unstable */
|
||||
} while(g_retry-- > 0 && fid == FAIL);
|
||||
|
||||
if(fid < 0) {
|
||||
error_msg("unable to open file \"%s\"\n", fname);
|
||||
if(fname) HDfree(fname);
|
||||
if(fapl >= 0) H5Pclose(fapl);
|
||||
leave(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if(!dname) {
|
||||
error_msg("no dataset specified\n");
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
} else {
|
||||
*dname = '/';
|
||||
x = dname;
|
||||
if((dname = HDstrdup(dname)) == NULL) {
|
||||
error_msg("memory allocation failed (file %s:line %d)\n",
|
||||
__FILE__, __LINE__);
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
} else {
|
||||
*x = '\0';
|
||||
/* Validate dataset */
|
||||
if(check_dataset(fid, dname) < 0)
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
/* Validate input "fields" */
|
||||
else if(g_list_of_fields && *g_list_of_fields)
|
||||
if(process_cmpd_fields(fid, dname) < 0)
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
/* If everything is fine, start monitoring the datset */
|
||||
if(h5tools_getstatus() != EXIT_FAILURE)
|
||||
if(monitor_dataset(fid, dname) < 0)
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
|
||||
/* Free spaces */
|
||||
if(fname) HDfree(fname);
|
||||
if(dname) HDfree(dname);
|
||||
if(g_list_of_fields) HDfree(g_list_of_fields);
|
||||
if(g_listv) {
|
||||
H5LD_clean_vector(g_listv);
|
||||
HDfree(g_listv);
|
||||
}
|
||||
if(g_dup_fields) HDfree(g_dup_fields);
|
||||
|
||||
/* Close the file access property list */
|
||||
if(fapl >= 0 && H5Pclose(fapl) < 0) {
|
||||
error_msg("unable to close file access property list\n");
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Close the file */
|
||||
if(H5Fclose(fid) < 0) {
|
||||
error_msg("unable to close file\n");
|
||||
h5tools_setstatus(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
H5Eset_auto2(H5E_DEFAULT, func, edata);
|
||||
/* exit */
|
||||
leave(h5tools_getstatus());
|
||||
} /* main() */
|
||||
355
hl/tools/h5watch/h5watchgentest.c
Normal file
355
hl/tools/h5watch/h5watchgentest.c
Normal file
@@ -0,0 +1,355 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include "hdf5.h"
|
||||
#include "H5HLprivate2.h"
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
* WATCH.h5: file with various types of datasets for testing--
|
||||
*
|
||||
* The following datasets are chunked, H5D_ALLOC_TIME_INCR, max. dimensional setting:
|
||||
* DSET_ONE: one-dimensional dataset
|
||||
* DSET_TWO: two-dimensional dataset
|
||||
* DSET_CMPD: one-dimensional dataset with compound type
|
||||
* DSET_CMPD_ESC: one-dimensional dataset with compound type and member names with
|
||||
* escape/separator characters
|
||||
* DSET_CMPD_TWO: two-dimensional dataset with compound type
|
||||
*
|
||||
* The following datasets are one-dimensional, chunked, max. dimension setting:
|
||||
* DSET_ALLOC_EARLY: dataset with H5D_ALLOC_TIME_EARLY
|
||||
* DSET_ALLOC_LATE: dataset H5D_ALLOC_TIME_LATE
|
||||
*
|
||||
* The following datasets are one-dimensional:
|
||||
* DSET_NONE: fixed dimension setting, contiguous, H5D_ALLOC_TIME_LATE
|
||||
* DSET_NOMAX: fixed dimension setting, chunked, H5D_ALLOC_TIME_INCR
|
||||
*/
|
||||
#define ONE_DIMS0 10
|
||||
#define MAX_ONE_DIMS0 100
|
||||
|
||||
#define DSET_ONE "DSET_ONE"
|
||||
#define DSET_NONE "DSET_NONE"
|
||||
#define DSET_NOMAX "DSET_NOMAX"
|
||||
#define DSET_ALLOC_LATE "DSET_ALLOC_LATE"
|
||||
#define DSET_ALLOC_EARLY "DSET_ALLOC_EARLY"
|
||||
#define DSET_CMPD "DSET_CMPD"
|
||||
#define DSET_CMPD_ESC "DSET_CMPD_ESC"
|
||||
|
||||
#define TWO_DIMS0 4
|
||||
#define TWO_DIMS1 10
|
||||
#define MAX_TWO_DIMS0 60
|
||||
#define MAX_TWO_DIMS1 100
|
||||
|
||||
#define DSET_TWO "DSET_TWO"
|
||||
#define DSET_CMPD_TWO "DSET_CMPD_TWO"
|
||||
|
||||
#define CHUNK_SIZE 2
|
||||
|
||||
#define FILE "WATCH.h5"
|
||||
|
||||
/* Data structures for datasets with compound types */
|
||||
typedef struct sub22_t {
|
||||
unsigned int a;
|
||||
unsigned int b;
|
||||
unsigned int c;
|
||||
} sub22_t;
|
||||
|
||||
typedef struct sub2_t {
|
||||
unsigned int a;
|
||||
sub22_t b;
|
||||
unsigned int c;
|
||||
} sub2_t;
|
||||
|
||||
typedef struct sub4_t {
|
||||
unsigned int a;
|
||||
unsigned int b;
|
||||
} sub4_t;
|
||||
|
||||
typedef struct set_t {
|
||||
unsigned int field1;
|
||||
sub2_t field2;
|
||||
double field3;
|
||||
sub4_t field4;
|
||||
} set_t;
|
||||
|
||||
/*
|
||||
**************************************************************************************
|
||||
*
|
||||
* Create a dataset with the given input parameters
|
||||
* Write to the dataset with the given "data"
|
||||
*
|
||||
**************************************************************************************
|
||||
*/
|
||||
static int
|
||||
generate_dset(hid_t fid, const char *dname, int ndims, hsize_t *dims, hsize_t *maxdims, hid_t dtid, void *data)
|
||||
{
|
||||
hid_t dcpl=-1; /* Dataset creation property */
|
||||
hid_t did=-1; /* Dataset id */
|
||||
hid_t sid=-1; /* Dataspace id */
|
||||
int i; /* Local index variable */
|
||||
hsize_t chunk_dims[H5S_MAX_RANK]; /* Dimension sizes for chunks */
|
||||
|
||||
/* Create the dataspace */
|
||||
if((sid = H5Screate_simple(ndims, dims, maxdims)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Set up dataset's creation properties */
|
||||
if(!HDstrcmp(dname, DSET_NONE))
|
||||
dcpl = H5P_DEFAULT;
|
||||
else {
|
||||
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
||||
goto done;
|
||||
for(i = 0; i < ndims; i++)
|
||||
chunk_dims[i] = CHUNK_SIZE;
|
||||
if(H5Pset_chunk(dcpl, ndims, chunk_dims) < 0)
|
||||
goto done;
|
||||
}
|
||||
|
||||
if(!HDstrcmp(dname, DSET_ALLOC_LATE)) {
|
||||
if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE) < 0)
|
||||
goto done;
|
||||
} else if(!HDstrcmp(dname, DSET_ALLOC_EARLY)) {
|
||||
if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0)
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Create the dataset */
|
||||
if((did = H5Dcreate2(fid, dname, dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Write to the dataset */
|
||||
if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
|
||||
goto done;
|
||||
|
||||
/* Closing */
|
||||
if(H5Pclose(dcpl) < 0) goto done;
|
||||
if(H5Sclose(sid) < 0) goto done;
|
||||
if(H5Dclose(did) < 0) goto done;
|
||||
|
||||
return(SUCCEED);
|
||||
|
||||
done:
|
||||
H5E_BEGIN_TRY
|
||||
H5Sclose(sid);
|
||||
H5Pclose(dcpl);
|
||||
H5Dclose(did);
|
||||
H5E_END_TRY
|
||||
|
||||
return(FAIL);
|
||||
} /* generate_dset() */
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
hid_t fid=-1; /* File id */
|
||||
hid_t fapl=-1; /* File access property list id */
|
||||
hsize_t cur_dims[1]; /* Dimension sizes */
|
||||
hsize_t max_dims[1]; /* Maximum dimension sizes */
|
||||
hsize_t cur2_dims[2]; /* Current dimension sizes */
|
||||
hsize_t max2_dims[2]; /* Maximum dimension sizes */
|
||||
hid_t set_tid=-1, esc_set_tid=-1; /* Compound type id */
|
||||
hid_t sub22_tid=-1; /* Compound type id */
|
||||
hid_t sub2_tid=-1, esc_sub2_tid=-1; /* Compound type id */
|
||||
hid_t sub4_tid=-1, esc_sub4_tid=-1; /* Compound type id */
|
||||
int one_data[ONE_DIMS0]; /* Buffer for data */
|
||||
int two_data[TWO_DIMS0*TWO_DIMS1]; /* Buffer for data */
|
||||
set_t one_cbuf[ONE_DIMS0]; /* Buffer for data with compound type */
|
||||
set_t two_cbuf[TWO_DIMS0*TWO_DIMS1]; /* Buffer for data with compound type */
|
||||
int i; /* Local index variable */
|
||||
|
||||
/* Create a copy of file access property list */
|
||||
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
|
||||
return -1;
|
||||
/* Set to use the latest library format */
|
||||
if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
|
||||
return -1;
|
||||
|
||||
/* Create a file with the latest format */
|
||||
if((fid = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
|
||||
goto done;
|
||||
|
||||
/* Initialization for one-dimensional dataset */
|
||||
cur_dims[0] = ONE_DIMS0;
|
||||
max_dims[0] = MAX_ONE_DIMS0;
|
||||
for(i = 0; i < ONE_DIMS0; i++)
|
||||
one_data[i] = i;
|
||||
|
||||
/* Generate DSET_ONE, DSET_NONE, DSET_NOMAX, DSET_ALLOC_LATE, DSET_EARLY */
|
||||
if(generate_dset(fid, DSET_ONE, 1, cur_dims, max_dims, H5T_NATIVE_INT, one_data) < 0)
|
||||
goto done;
|
||||
if(generate_dset(fid, DSET_NONE, 1, cur_dims, NULL, H5T_NATIVE_INT, one_data) < 0)
|
||||
goto done;
|
||||
if(generate_dset(fid, DSET_NOMAX, 1, cur_dims, NULL, H5T_NATIVE_INT, one_data) < 0)
|
||||
goto done;
|
||||
if(generate_dset(fid, DSET_ALLOC_LATE, 1, cur_dims, max_dims, H5T_NATIVE_INT, one_data) < 0)
|
||||
goto done;
|
||||
if(generate_dset(fid, DSET_ALLOC_EARLY, 1, cur_dims, max_dims, H5T_NATIVE_INT, one_data) < 0)
|
||||
goto done;
|
||||
|
||||
/* Initialization for two-dimensional dataset */
|
||||
cur2_dims[0] = TWO_DIMS0;
|
||||
cur2_dims[1] = TWO_DIMS1;
|
||||
max2_dims[0] = MAX_TWO_DIMS0;
|
||||
max2_dims[1] = MAX_TWO_DIMS1;
|
||||
|
||||
for(i = 0; i < (TWO_DIMS0 * TWO_DIMS1); i++)
|
||||
two_data[i] = i;
|
||||
|
||||
/* Generate DSET_TWO */
|
||||
if(generate_dset(fid, DSET_TWO, 2, cur2_dims, max2_dims, H5T_NATIVE_INT, two_data) < 0)
|
||||
goto done;
|
||||
|
||||
/* Initialization for one-dimensional compound typed dataset */
|
||||
cur_dims[0] = ONE_DIMS0;
|
||||
max_dims[0] = MAX_ONE_DIMS0;
|
||||
|
||||
for (i = 0; i < ONE_DIMS0; i++) {
|
||||
one_cbuf[i].field1 = 1;
|
||||
one_cbuf[i].field2.a = 2;
|
||||
one_cbuf[i].field2.c = 4;
|
||||
one_cbuf[i].field2.b.a = 20;
|
||||
one_cbuf[i].field2.b.b = 40;
|
||||
one_cbuf[i].field2.b.c = 80;
|
||||
one_cbuf[i].field3 = 3.0F;
|
||||
one_cbuf[i].field4.a = 4;
|
||||
one_cbuf[i].field4.b = 8;
|
||||
}
|
||||
|
||||
/* Create the compound type */
|
||||
if((sub22_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub22_t))) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub22_tid, "a", HOFFSET(sub22_t, a), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub22_tid, "b", HOFFSET(sub22_t, b), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub22_tid, "c", HOFFSET(sub22_t, c), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
|
||||
if((sub2_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub2_t))) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub2_tid, "a", HOFFSET(sub2_t, a), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub2_tid, "b", HOFFSET(sub2_t, b), sub22_tid) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub2_tid, "c", HOFFSET(sub2_t, c), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
|
||||
if((sub4_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub4_t))) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub4_tid, "a", HOFFSET(sub4_t, a), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(sub4_tid, "b", HOFFSET(sub4_t, b), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
|
||||
if((set_tid = H5Tcreate(H5T_COMPOUND, sizeof(set_t))) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(set_tid, "field1", HOFFSET(set_t, field1), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(set_tid, "field2", HOFFSET(set_t, field2), sub2_tid) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(set_tid, "field3", HOFFSET(set_t, field3), H5T_NATIVE_DOUBLE) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(set_tid, "field4", HOFFSET(set_t, field4), sub4_tid) < 0)
|
||||
goto done;
|
||||
|
||||
/* Create the compound type with escape/separator characters */
|
||||
if((esc_sub2_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub2_t))) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_sub2_tid, ".a", HOFFSET(sub2_t, a), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_sub2_tid, ",b", HOFFSET(sub2_t, b), sub22_tid) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_sub2_tid, "\\K", HOFFSET(sub2_t, c), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
|
||||
if((esc_sub4_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub4_t))) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_sub4_tid, "a.", HOFFSET(sub4_t, a), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_sub4_tid, "b,", HOFFSET(sub4_t, b), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
|
||||
if((esc_set_tid = H5Tcreate(H5T_COMPOUND, sizeof(set_t))) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_set_tid, "field,1", HOFFSET(set_t, field1), H5T_NATIVE_INT) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_set_tid, "field2.", HOFFSET(set_t, field2), esc_sub2_tid) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_set_tid, "field\\3", HOFFSET(set_t, field3), H5T_NATIVE_DOUBLE) < 0)
|
||||
goto done;
|
||||
if(H5Tinsert(esc_set_tid, "field4,", HOFFSET(set_t, field4), esc_sub4_tid) < 0)
|
||||
goto done;
|
||||
|
||||
/* Generate DSET_CMPD, DSET_CMPD_ESC */
|
||||
if(generate_dset(fid, DSET_CMPD, 1, cur_dims, max_dims, set_tid, one_cbuf) < 0)
|
||||
goto done;
|
||||
if(generate_dset(fid, DSET_CMPD_ESC, 1, cur_dims, max_dims, esc_set_tid, one_cbuf) < 0)
|
||||
goto done;
|
||||
|
||||
/* Initialization for two-dimensional compound typed dataset */
|
||||
cur2_dims[0] = TWO_DIMS0;
|
||||
cur2_dims[1] = TWO_DIMS1;
|
||||
max2_dims[0] = MAX_TWO_DIMS0;
|
||||
max2_dims[0] = MAX_TWO_DIMS1;
|
||||
|
||||
for (i = 0; i < (TWO_DIMS0 * TWO_DIMS1); i++) {
|
||||
two_cbuf[i].field1 = 1;
|
||||
two_cbuf[i].field2.a = 2;
|
||||
two_cbuf[i].field2.c = 4;
|
||||
two_cbuf[i].field2.b.a = 20;
|
||||
two_cbuf[i].field2.b.b = 40;
|
||||
two_cbuf[i].field2.b.c = 80;
|
||||
two_cbuf[i].field3 = 3.0F;
|
||||
two_cbuf[i].field4.a = 4;
|
||||
two_cbuf[i].field4.b = 8;
|
||||
}
|
||||
|
||||
/* Generate DSET_CMPD_TWO */
|
||||
if(generate_dset(fid, DSET_CMPD_TWO, 2, cur2_dims, max2_dims, set_tid, two_cbuf) < 0)
|
||||
goto done;
|
||||
|
||||
/* Closing */
|
||||
if(H5Tclose(sub22_tid) < 0) goto done;
|
||||
if(H5Tclose(sub2_tid) < 0) goto done;
|
||||
if(H5Tclose(sub4_tid) < 0) goto done;
|
||||
if(H5Tclose(set_tid) < 0) goto done;
|
||||
if(H5Tclose(esc_sub2_tid) < 0) goto done;
|
||||
if(H5Tclose(esc_sub4_tid) < 0) goto done;
|
||||
if(H5Tclose(esc_set_tid) < 0) goto done;
|
||||
if(H5Pclose(fapl) < 0) goto done;
|
||||
if(H5Fclose(fid) < 0) goto done;
|
||||
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
done:
|
||||
H5E_BEGIN_TRY
|
||||
H5Tclose(sub22_tid);
|
||||
H5Tclose(sub2_tid);
|
||||
H5Tclose(sub4_tid);
|
||||
H5Tclose(set_tid);
|
||||
H5Tclose(esc_sub2_tid);
|
||||
H5Tclose(esc_sub4_tid);
|
||||
H5Tclose(esc_set_tid);
|
||||
H5Pclose(fapl);
|
||||
H5Fclose(fid);
|
||||
H5E_END_TRY
|
||||
|
||||
exit(EXIT_FAILURE);
|
||||
} /* main() */
|
||||
59
hl/tools/h5watch/swmr_check_compat_vfd.c
Normal file
59
hl/tools/h5watch/swmr_check_compat_vfd.c
Normal file
@@ -0,0 +1,59 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/* Purpose: This is a small program that checks if the HDF5_DRIVER
|
||||
* environment variable is set to a value that supports SWMR.
|
||||
*
|
||||
* It is intended for use in shell scripts.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "H5private.h"
|
||||
|
||||
/* This file needs to access the file driver testing code */
|
||||
#define H5FD_FRIEND /*suppress error about including H5FDpkg */
|
||||
#define H5FD_TESTING
|
||||
#include "H5FDpkg.h" /* File drivers */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: main
|
||||
*
|
||||
* Purpose: Inspects the HDF5_DRIVER environment variable, which
|
||||
* determines the VFD that the test harness will use with
|
||||
* the majority of the tests.
|
||||
*
|
||||
* Return: VFD supports SWMR: EXIT_SUCCESS
|
||||
*
|
||||
* VFD does not support SWMR
|
||||
* or failure: EXIT_FAILURE
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
char *driver = NULL;
|
||||
|
||||
driver = HDgetenv("HDF5_DRIVER");
|
||||
|
||||
if(H5FD_supports_swmr_test(driver))
|
||||
return EXIT_SUCCESS;
|
||||
else
|
||||
return EXIT_FAILURE;
|
||||
|
||||
} /* end main() */
|
||||
|
||||
395
hl/tools/h5watch/testh5watch.sh.in
Normal file
395
hl/tools/h5watch/testh5watch.sh.in
Normal file
@@ -0,0 +1,395 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Copyright by The HDF Group.
|
||||
# Copyright by the Board of Trustees of the University of Illinois.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
# terms governing use, modification, and redistribution, is contained in
|
||||
# the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
# of the source code distribution tree; Copyright.html can be found at the
|
||||
# root level of an installed copy of the electronic HDF5 document set and
|
||||
# is linked from the top-level documents page. It can also be found at
|
||||
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
|
||||
# access to either file, you may request a copy from help@hdfgroup.org.
|
||||
#
|
||||
# Tests for the h5watch tool
|
||||
#
|
||||
|
||||
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
|
||||
# supports SWMR.
|
||||
./swmr_check_compat_vfd
|
||||
rc=$?
|
||||
if [[ $rc != 0 ]] ; then
|
||||
echo
|
||||
echo "The VFD specified by the HDF5_DRIVER environment variable"
|
||||
echo "does not support SWMR."
|
||||
echo
|
||||
echo "h5watch tests skipped"
|
||||
echo
|
||||
exit 0
|
||||
fi
|
||||
|
||||
H5WATCH=h5watch # The tool name
|
||||
H5WATCH_BIN=`pwd`/$H5WATCH # The path of H5WATCH
|
||||
EXTEND_DSET=extend_dset # Routine to extend the dataset when watching
|
||||
EXTEND_BIN=`pwd`/$EXTEND_DSET # The path of EXTEND_DSET
|
||||
#
|
||||
EXIT_SUCCESS=0
|
||||
EXIT_FAILURE=1
|
||||
#
|
||||
GEN_TEST=h5watchgentest # Generate HDF5 file with various datasets
|
||||
GEN_TEST_BIN=`pwd`/$GEN_TEST # Path of the binary GEN_TEST
|
||||
WATCHFILE=`pwd`/WATCH.h5 # The HDF5 file generated to test h5watch
|
||||
TESTFILE=TEST.h5 # The temporary file (a copy of WATCH.h5) used by tests
|
||||
#
|
||||
# These 3 defines should be the same as the defines in ./extend_dset.c
|
||||
WRITER_MESSAGE=writer_message # The message file created by the "extend" process
|
||||
READER_MESSAGE=reader_message # The message file created by the "watch" process
|
||||
MESSAGE_TIMEOUT=300 # Message timeout length in secs
|
||||
#
|
||||
CMP='cmp -s'
|
||||
DIFF='diff -c'
|
||||
NLINES=20 # Max. lines of output to display if test fails
|
||||
#
|
||||
# Mac OS: just to make sure echo "backslash backslash" behaves properly
|
||||
if test `uname -s` = 'Darwin'; then
|
||||
ECHO='/bin/echo'
|
||||
else
|
||||
ECHO='echo'
|
||||
fi
|
||||
#
|
||||
# Global variables
|
||||
nerrors=0
|
||||
verbose=yes
|
||||
|
||||
# The build (current) directory might be different than the source directory.
|
||||
if test -z "$srcdir"; then
|
||||
srcdir=.
|
||||
fi
|
||||
test -d ../testfiles || mkdir ../testfiles
|
||||
|
||||
# Print a line-line message left justified in a field of 70 characters
|
||||
# beginning with the word "Testing".
|
||||
TESTING() {
|
||||
SPACES=" "
|
||||
$ECHO "Testing $* $SPACES" |cut -c1-70 |tr -d '\012'
|
||||
}
|
||||
|
||||
#
|
||||
# Overall algorithm:
|
||||
#
|
||||
# Run a test and print PASSED or FAILED
|
||||
# If a test did not return with the expected return code,
|
||||
# increment the `nerrors' global variable and (if $verbose is set) display up to $NLINES
|
||||
# lines of the actual output from the test.
|
||||
# If the test did return the expected code,
|
||||
# compare the actual output with the expected output;
|
||||
# If the outputs are the same, print PASSED,
|
||||
# Otherwise print FAILED and the difference between the two outputs.
|
||||
# The output files are not removed if $HDF5_NOCLEANUP has a non-zero value.
|
||||
#
|
||||
#
|
||||
# TOOLTEST():
|
||||
#
|
||||
# Arguments:
|
||||
#
|
||||
# $1 -- expected output
|
||||
# $2 -- expected return code
|
||||
# $3 and on -- arguments for h5watch
|
||||
TOOLTEST() {
|
||||
expect="$srcdir/../testfiles/$1"
|
||||
actual="../testfiles/`basename $1 .ddl`.out"
|
||||
actual_err="../testfiles/`basename $1 .ddl`.err"
|
||||
shift
|
||||
retvalexpect=$1
|
||||
shift
|
||||
# Run test.
|
||||
# Stderr is included in stdout so that the diff can detect
|
||||
# any unexpected output from that stream too.
|
||||
TESTING $H5WATCH $@
|
||||
(
|
||||
$ECHO "#############################"
|
||||
$ECHO " output for '$H5WATCH $@'"
|
||||
$ECHO "#############################"
|
||||
$RUNSERIAL $H5WATCH_BIN "$@"
|
||||
) > $actual 2>$actual_err
|
||||
exitcode=$?
|
||||
cat $actual_err >> $actual
|
||||
if [ $exitcode -ne $retvalexpect ]; then
|
||||
$ECHO "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
if [ yes = "$verbose" ]; then
|
||||
$ECHO "test returned with exit code $exitcode"
|
||||
$ECHO "test output: (up to $NLINES lines)"
|
||||
head -$NLINES $actual
|
||||
$ECHO "***end of test output***"
|
||||
$ECHO ""
|
||||
fi
|
||||
elif $CMP $expect $actual; then
|
||||
$ECHO " PASSED"
|
||||
else
|
||||
$ECHO "*FAILED*"
|
||||
$ECHO " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
fi
|
||||
|
||||
# Clean up output file
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
rm -f $actual $actual_err
|
||||
fi
|
||||
}
|
||||
#
|
||||
#
|
||||
#
|
||||
# TEST_WATCH():
|
||||
#
|
||||
# Arguments:
|
||||
# $1 -- the specified dataset to watch and to extend
|
||||
# $2 -- the options to h5watch (can be NULL)
|
||||
# $3 -- expected output from watching the object
|
||||
#
|
||||
TEST_WATCH() {
|
||||
cp $WATCHFILE $TESTFILE # Copy the file being watched/extended to a temporary file
|
||||
actual="../testfiles/`basename $3 .ddl`.out" # The actual output
|
||||
expect="$srcdir/../testfiles/$3" # The expected output
|
||||
#
|
||||
# Set up options and object to h5watch
|
||||
if test -z "$2"; then
|
||||
OBJ="$TESTFILE/$1" # Empty options, just object to h5watch
|
||||
else
|
||||
OBJ="$2 $TESTFILE/$1" # Options + object to h5watch
|
||||
fi
|
||||
rm -f $WRITER_MESSAGE # Remove the file just to be sure
|
||||
rm -f $READER_MESSAGE # Remove the file just to be sure
|
||||
#
|
||||
$EXTEND_BIN $TESTFILE $1 & # Extend the dataset; put in background
|
||||
extend_pid=$! # Get "extend" process ID
|
||||
#
|
||||
# Wait for message from "extend_dset" process to start h5watch--
|
||||
# To wait for the writer message file or till the maximum # of seconds is reached
|
||||
# This performs similar function as the routine h5_wait_message() in test/h5test.c
|
||||
mexist=0 # Indicate whether the message file is found
|
||||
t0=`date +%s` # Get current time in seconds
|
||||
difft=0 # Initialize the time difference
|
||||
while [ $difft -lt $MESSAGE_TIMEOUT ] ; # Loop till message times out
|
||||
do
|
||||
t1=`date +%s` # Get current time in seconds
|
||||
difft=`expr $t1 - $t0` # Calculate the time difference
|
||||
if [ -e $WRITER_MESSAGE ]; then # If message file is found:
|
||||
mexist=1 # indicate the message file is found
|
||||
rm $WRITER_MESSAGE # remove the message file
|
||||
break # get out of the while loop
|
||||
fi
|
||||
done;
|
||||
#
|
||||
# If message file from "extend" process is found--
|
||||
# start h5watch
|
||||
# send message to "extend" process to start work
|
||||
# wait for "extend" process to complete, then kill h5watch
|
||||
# determine test result
|
||||
# If message file from "extend" process is not found--
|
||||
# there is some problem; the test fails
|
||||
#
|
||||
if test $mexist -eq 0; then
|
||||
$ECHO "*FAILED*"
|
||||
$ECHO "Problem with extend_dset...this test failed."
|
||||
else
|
||||
#
|
||||
# Run h5watch; put in background; collect output to a file
|
||||
TESTING $H5WATCH $OBJ
|
||||
head -n 3 $expect > $actual # copy the first 3 lines from $expect (just the command line)
|
||||
$RUNSERIAL $H5WATCH_BIN $2 "$TESTFILE/$1" >> $actual &
|
||||
watch_pid=$! # Get h5watch process ID
|
||||
cp /dev/null $READER_MESSAGE # Send message to "extend" process to start work
|
||||
wait $extend_pid # Wait for "extend" process to complete
|
||||
extend_exit=$? # Collect "extend" process' exit code
|
||||
sleep 1 # Sleep to make sure output is flushed
|
||||
kill $watch_pid # Kill h5watch
|
||||
wait $watch_pid # Wait for "h5watch" process to complete
|
||||
#
|
||||
if [ $extend_exit -ne 0 ]; then # Error returned from "extend" process
|
||||
$ECHO "*FAILED*"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
if [ yes = "$verbose" ]; then
|
||||
$ECHO "extend test returned with exit code $extend_exit"
|
||||
$ECHO "test output: (up to $NLINES lines)"
|
||||
head -$NLINES $actual
|
||||
$ECHO "***end of test output***"
|
||||
$ECHO ""
|
||||
fi
|
||||
elif $CMP $expect $actual; then # Compare actual output with expected output
|
||||
$ECHO " PASSED"
|
||||
else
|
||||
$ECHO "*FAILED*" # Actual and expected outputs are different
|
||||
$ECHO " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
if test yes = "$verbose"; then
|
||||
$DIFF $expect $actual |sed 's/^/ /'
|
||||
fi
|
||||
fi
|
||||
#
|
||||
# Cleaning
|
||||
rm -f $TESTFILE
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
rm -f $actual
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
### T H E T E S T S ###
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
#################################################################################################
|
||||
# #
|
||||
# WATCH.h5: file with various types of datasets for testing-- #
|
||||
# The following datasets are chunked, H5D_ALLOC_TIME_INCR, max. dimensional setting: #
|
||||
# DSET_ONE: one-dimensional dataset #
|
||||
# DSET_TWO: two-dimensional dataset #
|
||||
# DSET_CMPD: one-dimensional dataset with compound type #
|
||||
# DSET_CMPD_ESC: one-dimensional dataset with compound type & escape/separator characters #
|
||||
# DSET_CMPD_TWO: two-dimensional dataset with compound type #
|
||||
# #
|
||||
# The following datasets are one-dimensional, chunked, max. dimension setting: #
|
||||
# DSET_ALLOC_EARLY: dataset with H5D_ALLOC_TIME_EARLY #
|
||||
# DSET_ALLOC_LATE: dataset H5D_ALLOC_TIME_LATE #
|
||||
# #
|
||||
# The following datasets are one-dimensional: #
|
||||
# DSET_NONE: fixed dimension setting, contiguous, H5D_ALLOC_TIME_LATE #
|
||||
# DSET_NOMAX: fixed dimension setting, chunked, H5D_ALLOC_TIME_INCR #
|
||||
# #
|
||||
#################################################################################################
|
||||
#
|
||||
#
|
||||
#################################################################################################
|
||||
# #
|
||||
# Tests on expected failures: #
|
||||
# Invalid file name #
|
||||
# Unable to find dataset, invalid dataset #
|
||||
# DSET_NONE and DSET_NOMAX #
|
||||
# Invalid input to options --width and --polling #
|
||||
# Invalid field names for -f option #
|
||||
# #
|
||||
#################################################################################################
|
||||
#
|
||||
# Generate file with various types of datasets
|
||||
$GEN_TEST_BIN
|
||||
# Test on --help options
|
||||
TOOLTEST w-help1.ddl 0 --help
|
||||
#
|
||||
# Tests on expected failures
|
||||
TOOLTEST w-err-dset1.ddl 1 WATCH.h5
|
||||
TOOLTEST w-err-dset2.ddl 1 WATCH.h5/group/DSET_CMPD
|
||||
TOOLTEST w-err-dset-none.ddl 1 WATCH.h5/DSET_NONE
|
||||
TOOLTEST w-err-dset-nomax.ddl 1 WATCH.h5/DSET_NOMAX
|
||||
TOOLTEST w-err-file.ddl 1 ../WATCH.h5/DSET_CMPD
|
||||
TOOLTEST w-err-width.ddl 1 --width=-8 WATCH.h5/DSET_ONE
|
||||
TOOLTEST w-err-poll.ddl 1 --polling=-8 WATCH.h5/DSET_ONE
|
||||
TOOLTEST w-err-poll0.ddl 1 --polling=0 WATCH.h5/DSET_ONE
|
||||
#
|
||||
# Tests on invalid field names via --fields option for a compound typed dataset: DSET_CMPD
|
||||
TOOLTEST w-err-cmpd1.ddl 1 --fields=fieldx WATCH.h5/DSET_CMPD
|
||||
TOOLTEST w-err-cmpd2.ddl 1 --fields=field1,field2. WATCH.h5/DSET_CMPD
|
||||
TOOLTEST w-err-cmpd3.ddl 1 --fields=field1,field2, WATCH.h5/DSET_CMPD
|
||||
TOOLTEST w-err-cmpd4.ddl 1 --fields=field1,field2.b.k WATCH.h5/DSET_CMPD
|
||||
TOOLTEST w-err-cmpd5.ddl 1 --fields=field1 --fields=field2.b.k WATCH.h5/DSET_CMPD
|
||||
#
|
||||
echo "DONE WITH 1st SET OF TESTS"
|
||||
#
|
||||
#
|
||||
#
|
||||
#################################
|
||||
# Tests without options #
|
||||
#################################
|
||||
#
|
||||
# Generate file WATCH.h5 with various types of datasets,
|
||||
$GEN_TEST_BIN
|
||||
#
|
||||
# Watching and extending: (TEST.h5 is a copy of WATCH.h5)
|
||||
# TEST.h5/DSET_ONE
|
||||
# TEST.h5/DSET_ALLOC_EARLY
|
||||
# TEST.h5/DSET_ALLOC_LATE
|
||||
# TEST.h5/DSET_CMPD
|
||||
# TEST.h5/DSET_TWO
|
||||
# TEST.h5/DSET_CMPD_TWO
|
||||
# TEST.h5/DSET_CMPD_ESC
|
||||
#
|
||||
TEST_WATCH DSET_ONE '' w-ext-one.ddl
|
||||
TEST_WATCH DSET_ALLOC_EARLY '' w-ext-early.ddl
|
||||
TEST_WATCH DSET_ALLOC_LATE '' w-ext-late.ddl
|
||||
TEST_WATCH DSET_CMPD '' w-ext-cmpd.ddl
|
||||
TEST_WATCH DSET_TWO '' w-ext-two.ddl
|
||||
TEST_WATCH DSET_CMPD_TWO '' w-ext-cmpd-two.ddl
|
||||
TEST_WATCH DSET_CMPD_ESC '' w-ext-cmpd-esc.ddl
|
||||
#
|
||||
echo "DONE WITH 2nd SET OF TESTS"
|
||||
#
|
||||
#
|
||||
#
|
||||
#################################
|
||||
# Tests on --fields option #
|
||||
#################################
|
||||
#
|
||||
# Watching and extending: (TEST.h5 is a copy of WATCH.h5)
|
||||
# TEST.h5/DSET_CMPD with --fields=field1,field2
|
||||
# TEST.h5/DSET_CMPD with --fields=field2.b,field4
|
||||
# TEST.h5/DSET_CMPD with --fields=field2.b.a --fields=field2.c
|
||||
TEST_WATCH DSET_CMPD --fields=field1,field2 w-ext-cmpd-f1.ddl
|
||||
TEST_WATCH DSET_CMPD --fields=field2.b,field4 w-ext-cmpd-f2.ddl
|
||||
TEST_WATCH DSET_CMPD '--fields=field2.b.a --fields=field2.c' w-ext-cmpd-ff3.ddl
|
||||
#
|
||||
#
|
||||
# TEST.h5/DSET_CMP_TWO with --fields=field1,field2
|
||||
# TEST.h5/DSET_CMPD_TWO with --fields=field2.b --fields=field4
|
||||
# TEST.h5/DSET_CMPD_TWO with --fields=field2.b.a,field2.c
|
||||
TEST_WATCH DSET_CMPD_TWO --fields=field1,field2 w-ext-cmpd-two-f1.ddl
|
||||
TEST_WATCH DSET_CMPD_TWO '--fields=field2.b --fields=field4' w-ext-cmpd-two-ff2.ddl
|
||||
TEST_WATCH DSET_CMPD_TWO --fields=field2.b.a,field2.c w-ext-cmpd-two-f3.ddl
|
||||
#
|
||||
#
|
||||
# TEST.h5/DSET_CMPD_ESC with --fields=field\,1,field2\.
|
||||
# TEST.h5/DSET_CMPD_ESC with --fields=field2\..\,b --fields=field4\,
|
||||
# TEST.h5/DSET_CMPD_ESC with --fields=field2\..\,b.a,field2\..\\K
|
||||
TEST_WATCH DSET_CMPD_ESC '--fields=field\,1,field2\.' w-ext-cmpd-esc-f1.ddl
|
||||
TEST_WATCH DSET_CMPD_ESC '--fields=field2\..\,b --fields=field4\,' w-ext-cmpd-esc-ff2.ddl
|
||||
TEST_WATCH DSET_CMPD_ESC '--fields=field2\..\,b.a,field2\..\\K' w-ext-cmpd-esc-f3.ddl
|
||||
#
|
||||
#
|
||||
echo "DONE WITH 3rd SET OF TESTS"
|
||||
#
|
||||
#
|
||||
#
|
||||
#################################################
|
||||
# Tests on options: #
|
||||
# --dim #
|
||||
# --width, --label, --simple, --help #
|
||||
#################################################
|
||||
#
|
||||
# Watching and extending: (TEST.h5 is a copy of WATCH.h5)
|
||||
# TEST.h5/DSET_ONE with -d option
|
||||
# TEST.h5/DSET_TWO with --dim option
|
||||
# TEST.h5/DSET_TWO with --width=60 option
|
||||
# TEST.h5/DSET_CMPD with --label option
|
||||
# TEST.h5/DSET_ONE with --simple option
|
||||
TEST_WATCH DSET_ONE --dim w-ext-one-d.ddl
|
||||
TEST_WATCH DSET_TWO --dim w-ext-two-d.ddl
|
||||
TEST_WATCH DSET_TWO --width=30 w-ext-two-width.ddl
|
||||
TEST_WATCH DSET_CMPD --label w-ext-cmpd-label.ddl
|
||||
TEST_WATCH DSET_ONE --simple w-ext-one-simple.ddl
|
||||
#
|
||||
echo "DONE WITH 4th SET OF TESTS"
|
||||
#
|
||||
#
|
||||
#
|
||||
if test $nerrors -eq 0 ; then
|
||||
$ECHO "All h5watch tests passed."
|
||||
exit $EXIT_SUCCESS
|
||||
else
|
||||
$ECHO "h5watch tests failed with $nerrors errors."
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
5
hl/tools/testfiles/w-err-cmpd1.ddl
Normal file
5
hl/tools/testfiles/w-err-cmpd1.ddl
Normal file
@@ -0,0 +1,5 @@
|
||||
#############################
|
||||
output for 'h5watch --fields=fieldx WATCH.h5/DSET_CMPD'
|
||||
#############################
|
||||
Opened "WATCH.h5" with sec2 driver.
|
||||
h5watch error: error in processing <list_of_fields>
|
||||
5
hl/tools/testfiles/w-err-cmpd2.ddl
Normal file
5
hl/tools/testfiles/w-err-cmpd2.ddl
Normal file
@@ -0,0 +1,5 @@
|
||||
#############################
|
||||
output for 'h5watch --fields=field1,field2. WATCH.h5/DSET_CMPD'
|
||||
#############################
|
||||
Opened "WATCH.h5" with sec2 driver.
|
||||
h5watch error: error in processing <list_of_fields>
|
||||
5
hl/tools/testfiles/w-err-cmpd3.ddl
Normal file
5
hl/tools/testfiles/w-err-cmpd3.ddl
Normal file
@@ -0,0 +1,5 @@
|
||||
#############################
|
||||
output for 'h5watch --fields=field1,field2, WATCH.h5/DSET_CMPD'
|
||||
#############################
|
||||
Opened "WATCH.h5" with sec2 driver.
|
||||
h5watch error: error in processing <list_of_fields>
|
||||
5
hl/tools/testfiles/w-err-cmpd4.ddl
Normal file
5
hl/tools/testfiles/w-err-cmpd4.ddl
Normal file
@@ -0,0 +1,5 @@
|
||||
#############################
|
||||
output for 'h5watch --fields=field1,field2.b.k WATCH.h5/DSET_CMPD'
|
||||
#############################
|
||||
Opened "WATCH.h5" with sec2 driver.
|
||||
h5watch error: error in processing <list_of_fields>
|
||||
5
hl/tools/testfiles/w-err-cmpd5.ddl
Normal file
5
hl/tools/testfiles/w-err-cmpd5.ddl
Normal file
@@ -0,0 +1,5 @@
|
||||
#############################
|
||||
output for 'h5watch --fields=field1 --fields=field2.b.k WATCH.h5/DSET_CMPD'
|
||||
#############################
|
||||
Opened "WATCH.h5" with sec2 driver.
|
||||
h5watch error: error in processing <list_of_fields>
|
||||
5
hl/tools/testfiles/w-err-dset-nomax.ddl
Normal file
5
hl/tools/testfiles/w-err-dset-nomax.ddl
Normal file
@@ -0,0 +1,5 @@
|
||||
#############################
|
||||
output for 'h5watch WATCH.h5/DSET_NOMAX'
|
||||
#############################
|
||||
Opened "WATCH.h5" with sec2 driver.
|
||||
h5watch error: "/DSET_NOMAX" should have unlimited or max. dimension setting
|
||||
5
hl/tools/testfiles/w-err-dset-none.ddl
Normal file
5
hl/tools/testfiles/w-err-dset-none.ddl
Normal file
@@ -0,0 +1,5 @@
|
||||
#############################
|
||||
output for 'h5watch WATCH.h5/DSET_NONE'
|
||||
#############################
|
||||
Opened "WATCH.h5" with sec2 driver.
|
||||
h5watch error: "/DSET_NONE" should be a chunked or virtual dataset
|
||||
5
hl/tools/testfiles/w-err-dset1.ddl
Normal file
5
hl/tools/testfiles/w-err-dset1.ddl
Normal file
@@ -0,0 +1,5 @@
|
||||
#############################
|
||||
output for 'h5watch WATCH.h5'
|
||||
#############################
|
||||
Opened "WATCH.h5" with sec2 driver.
|
||||
h5watch error: no dataset specified
|
||||
5
hl/tools/testfiles/w-err-dset2.ddl
Normal file
5
hl/tools/testfiles/w-err-dset2.ddl
Normal file
@@ -0,0 +1,5 @@
|
||||
#############################
|
||||
output for 'h5watch WATCH.h5/group/DSET_CMPD'
|
||||
#############################
|
||||
Opened "WATCH.h5" with sec2 driver.
|
||||
h5watch error: unable to open dataset "/group/DSET_CMPD"
|
||||
4
hl/tools/testfiles/w-err-file.ddl
Normal file
4
hl/tools/testfiles/w-err-file.ddl
Normal file
@@ -0,0 +1,4 @@
|
||||
#############################
|
||||
output for 'h5watch ../WATCH.h5/DSET_CMPD'
|
||||
#############################
|
||||
h5watch error: unable to open file "../WATCH.h5/DSET_CMPD"
|
||||
38
hl/tools/testfiles/w-err-poll.ddl
Normal file
38
hl/tools/testfiles/w-err-poll.ddl
Normal file
@@ -0,0 +1,38 @@
|
||||
#############################
|
||||
output for 'h5watch --polling=-8 WATCH.h5/DSET_ONE'
|
||||
#############################
|
||||
Usage: h5watch [OPTIONS] [OBJECT]
|
||||
|
||||
OPTIONS
|
||||
--help Print a usage message and exit.
|
||||
--version Print version number and exit.
|
||||
--label Label members of compound typed dataset.
|
||||
--simple Use a machine-readable output format.
|
||||
--dim Monitor changes in size of dataset dimensions only.
|
||||
--width=N Set the number of columns to N for output.
|
||||
A value of 0 sets the number of columns to the
|
||||
maximum (65535). The default width is 80 columns.
|
||||
--polling=N Set the polling interval to N (in seconds) when the
|
||||
dataset will be checked for appended data. The default
|
||||
polling interval is 1.
|
||||
--fields=<list_of_fields>
|
||||
Display data for the fields specified in <list_of_fields>
|
||||
for a compound data type. <list_of_fields> can be
|
||||
specified as follows:
|
||||
1) A comma-separated list of field names in a
|
||||
compound data type. "," is the separator
|
||||
for field names while "." is the separator
|
||||
for a nested field.
|
||||
2) A single field name in a compound data type.
|
||||
Can use this option multiple times.
|
||||
Note that backslash is the escape character to avoid
|
||||
characters in field names that conflict with the tool's
|
||||
separators.
|
||||
|
||||
OBJECT is specified as [<filename>/<path_to_dataset>/<dsetname>]
|
||||
<filename> Name of the HDF5 file. It may be preceded by path
|
||||
separated by slashes to the specified HDF5 file.
|
||||
<path_to_dataset> Path separated by slashes to the specified dataset
|
||||
<dsetname> Name of the dataset
|
||||
|
||||
User can end the h5watch process by ctrl-C (SIGINT) or kill the process (SIGTERM).
|
||||
38
hl/tools/testfiles/w-err-poll0.ddl
Normal file
38
hl/tools/testfiles/w-err-poll0.ddl
Normal file
@@ -0,0 +1,38 @@
|
||||
#############################
|
||||
output for 'h5watch --polling=0 WATCH.h5/DSET_ONE'
|
||||
#############################
|
||||
Usage: h5watch [OPTIONS] [OBJECT]
|
||||
|
||||
OPTIONS
|
||||
--help Print a usage message and exit.
|
||||
--version Print version number and exit.
|
||||
--label Label members of compound typed dataset.
|
||||
--simple Use a machine-readable output format.
|
||||
--dim Monitor changes in size of dataset dimensions only.
|
||||
--width=N Set the number of columns to N for output.
|
||||
A value of 0 sets the number of columns to the
|
||||
maximum (65535). The default width is 80 columns.
|
||||
--polling=N Set the polling interval to N (in seconds) when the
|
||||
dataset will be checked for appended data. The default
|
||||
polling interval is 1.
|
||||
--fields=<list_of_fields>
|
||||
Display data for the fields specified in <list_of_fields>
|
||||
for a compound data type. <list_of_fields> can be
|
||||
specified as follows:
|
||||
1) A comma-separated list of field names in a
|
||||
compound data type. "," is the separator
|
||||
for field names while "." is the separator
|
||||
for a nested field.
|
||||
2) A single field name in a compound data type.
|
||||
Can use this option multiple times.
|
||||
Note that backslash is the escape character to avoid
|
||||
characters in field names that conflict with the tool's
|
||||
separators.
|
||||
|
||||
OBJECT is specified as [<filename>/<path_to_dataset>/<dsetname>]
|
||||
<filename> Name of the HDF5 file. It may be preceded by path
|
||||
separated by slashes to the specified HDF5 file.
|
||||
<path_to_dataset> Path separated by slashes to the specified dataset
|
||||
<dsetname> Name of the dataset
|
||||
|
||||
User can end the h5watch process by ctrl-C (SIGINT) or kill the process (SIGTERM).
|
||||
38
hl/tools/testfiles/w-err-width.ddl
Normal file
38
hl/tools/testfiles/w-err-width.ddl
Normal file
@@ -0,0 +1,38 @@
|
||||
#############################
|
||||
output for 'h5watch --width=-8 WATCH.h5/DSET_ONE'
|
||||
#############################
|
||||
Usage: h5watch [OPTIONS] [OBJECT]
|
||||
|
||||
OPTIONS
|
||||
--help Print a usage message and exit.
|
||||
--version Print version number and exit.
|
||||
--label Label members of compound typed dataset.
|
||||
--simple Use a machine-readable output format.
|
||||
--dim Monitor changes in size of dataset dimensions only.
|
||||
--width=N Set the number of columns to N for output.
|
||||
A value of 0 sets the number of columns to the
|
||||
maximum (65535). The default width is 80 columns.
|
||||
--polling=N Set the polling interval to N (in seconds) when the
|
||||
dataset will be checked for appended data. The default
|
||||
polling interval is 1.
|
||||
--fields=<list_of_fields>
|
||||
Display data for the fields specified in <list_of_fields>
|
||||
for a compound data type. <list_of_fields> can be
|
||||
specified as follows:
|
||||
1) A comma-separated list of field names in a
|
||||
compound data type. "," is the separator
|
||||
for field names while "." is the separator
|
||||
for a nested field.
|
||||
2) A single field name in a compound data type.
|
||||
Can use this option multiple times.
|
||||
Note that backslash is the escape character to avoid
|
||||
characters in field names that conflict with the tool's
|
||||
separators.
|
||||
|
||||
OBJECT is specified as [<filename>/<path_to_dataset>/<dsetname>]
|
||||
<filename> Name of the HDF5 file. It may be preceded by path
|
||||
separated by slashes to the specified HDF5 file.
|
||||
<path_to_dataset> Path separated by slashes to the specified dataset
|
||||
<dsetname> Name of the dataset
|
||||
|
||||
User can end the h5watch process by ctrl-C (SIGINT) or kill the process (SIGTERM).
|
||||
14
hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl
Normal file
14
hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl
Normal file
@@ -0,0 +1,14 @@
|
||||
#############################
|
||||
output for 'h5watch --fields=field\,1,field2\. TEST.h5/DSET_CMPD_ESC'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_CMPD_ESC...
|
||||
dimension 0: 10->13 (increases)
|
||||
Data:
|
||||
(10) {1, {2, {2, 2, 2}, 2}}, {2, {3, {3, 3, 3}, 3}},
|
||||
(12) {3, {4, {4, 4, 4}, 4}}
|
||||
dimension 0: 13->12 (decreases)
|
||||
dimension 0: 12->1 (decreases)
|
||||
dimension 0: 1->3 (increases)
|
||||
Data:
|
||||
(1) {1, {2, {2, 2, 2}, 2}}, {2, {3, {3, 3, 3}, 3}}
|
||||
13
hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl
Normal file
13
hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl
Normal file
@@ -0,0 +1,13 @@
|
||||
#############################
|
||||
output for 'h5watch --fields=field2\..\,b.a,field2\..\\K TEST.h5/DSET_CMPD_ESC'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_CMPD_ESC...
|
||||
dimension 0: 10->13 (increases)
|
||||
Data:
|
||||
(10) {{{2}}, {2}}, {{{3}}, {3}}, {{{4}}, {4}}
|
||||
dimension 0: 13->12 (decreases)
|
||||
dimension 0: 12->1 (decreases)
|
||||
dimension 0: 1->3 (increases)
|
||||
Data:
|
||||
(1) {{{2}}, {2}}, {{{3}}, {3}}
|
||||
14
hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl
Normal file
14
hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl
Normal file
@@ -0,0 +1,14 @@
|
||||
#############################
|
||||
output for 'h5watch --fields=field2\..\,b --fields=field4\, TEST.h5/DSET_CMPD_ESC'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_CMPD_ESC...
|
||||
dimension 0: 10->13 (increases)
|
||||
Data:
|
||||
(10) {{{2, 2, 2}}, {4, 4}}, {{{3, 3, 3}}, {5, 5}}, {{{4, 4, 4}}, {6,
|
||||
(12) 6}}
|
||||
dimension 0: 13->12 (decreases)
|
||||
dimension 0: 12->1 (decreases)
|
||||
dimension 0: 1->3 (increases)
|
||||
Data:
|
||||
(1) {{{2, 2, 2}}, {4, 4}}, {{{3, 3, 3}}, {5, 5}}
|
||||
16
hl/tools/testfiles/w-ext-cmpd-esc.ddl
Normal file
16
hl/tools/testfiles/w-ext-cmpd-esc.ddl
Normal file
@@ -0,0 +1,16 @@
|
||||
#############################
|
||||
output for 'h5watch TEST.h5/DSET_CMPD_ESC'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_CMPD_ESC...
|
||||
dimension 0: 10->13 (increases)
|
||||
Data:
|
||||
(10) {1, {2, {2, 2, 2}, 2}, 3, {4, 4}},
|
||||
(11) {2, {3, {3, 3, 3}, 3}, 4, {5, 5}},
|
||||
(12) {3, {4, {4, 4, 4}, 4}, 5, {6, 6}}
|
||||
dimension 0: 13->12 (decreases)
|
||||
dimension 0: 12->1 (decreases)
|
||||
dimension 0: 1->3 (increases)
|
||||
Data:
|
||||
(1) {1, {2, {2, 2, 2}, 2}, 3, {4, 4}}, {2, {3, {3, 3, 3}, 3}, 4, {5,
|
||||
(2) 5}}
|
||||
14
hl/tools/testfiles/w-ext-cmpd-f1.ddl
Normal file
14
hl/tools/testfiles/w-ext-cmpd-f1.ddl
Normal file
@@ -0,0 +1,14 @@
|
||||
#############################
|
||||
output for 'h5watch --fields=field1,field2 TEST.h5/DSET_CMPD'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_CMPD...
|
||||
dimension 0: 10->13 (increases)
|
||||
Data:
|
||||
(10) {1, {2, {2, 2, 2}, 2}}, {2, {3, {3, 3, 3}, 3}},
|
||||
(12) {3, {4, {4, 4, 4}, 4}}
|
||||
dimension 0: 13->12 (decreases)
|
||||
dimension 0: 12->1 (decreases)
|
||||
dimension 0: 1->3 (increases)
|
||||
Data:
|
||||
(1) {1, {2, {2, 2, 2}, 2}}, {2, {3, {3, 3, 3}, 3}}
|
||||
14
hl/tools/testfiles/w-ext-cmpd-f2.ddl
Normal file
14
hl/tools/testfiles/w-ext-cmpd-f2.ddl
Normal file
@@ -0,0 +1,14 @@
|
||||
#############################
|
||||
output for 'h5watch --fields=field2.b,field4 TEST.h5/DSET_CMPD'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_CMPD...
|
||||
dimension 0: 10->13 (increases)
|
||||
Data:
|
||||
(10) {{{2, 2, 2}}, {4, 4}}, {{{3, 3, 3}}, {5, 5}}, {{{4, 4, 4}}, {6,
|
||||
(12) 6}}
|
||||
dimension 0: 13->12 (decreases)
|
||||
dimension 0: 12->1 (decreases)
|
||||
dimension 0: 1->3 (increases)
|
||||
Data:
|
||||
(1) {{{2, 2, 2}}, {4, 4}}, {{{3, 3, 3}}, {5, 5}}
|
||||
13
hl/tools/testfiles/w-ext-cmpd-ff3.ddl
Normal file
13
hl/tools/testfiles/w-ext-cmpd-ff3.ddl
Normal file
@@ -0,0 +1,13 @@
|
||||
#############################
|
||||
output for 'h5watch --fields=field2.b.a --fields=field2.c TEST.h5/DSET_CMPD'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_CMPD...
|
||||
dimension 0: 10->13 (increases)
|
||||
Data:
|
||||
(10) {{{2}}, {2}}, {{{3}}, {3}}, {{{4}}, {4}}
|
||||
dimension 0: 13->12 (decreases)
|
||||
dimension 0: 12->1 (decreases)
|
||||
dimension 0: 1->3 (increases)
|
||||
Data:
|
||||
(1) {{{2}}, {2}}, {{{3}}, {3}}
|
||||
21
hl/tools/testfiles/w-ext-cmpd-label.ddl
Normal file
21
hl/tools/testfiles/w-ext-cmpd-label.ddl
Normal file
@@ -0,0 +1,21 @@
|
||||
#############################
|
||||
output for 'h5watch --label TEST.h5/DSET_CMPD'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_CMPD...
|
||||
dimension 0: 10->13 (increases)
|
||||
Data:
|
||||
(10) {field1=1, field2={a=2, b={a=2, b=2, c=2}, c=2}, field3=3,
|
||||
(10) field4={a=4, b=4}},
|
||||
(11) {field1=2, field2={a=3, b={a=3, b=3, c=3}, c=3}, field3=4,
|
||||
(11) field4={a=5, b=5}},
|
||||
(12) {field1=3, field2={a=4, b={a=4, b=4, c=4}, c=4}, field3=5,
|
||||
(12) field4={a=6, b=6}}
|
||||
dimension 0: 13->12 (decreases)
|
||||
dimension 0: 12->1 (decreases)
|
||||
dimension 0: 1->3 (increases)
|
||||
Data:
|
||||
(1) {field1=1, field2={a=2, b={a=2, b=2, c=2}, c=2}, field3=3,
|
||||
(1) field4={a=4, b=4}},
|
||||
(2) {field1=2, field2={a=3, b={a=3, b=3, c=3}, c=3}, field3=4,
|
||||
(2) field4={a=5, b=5}}
|
||||
50
hl/tools/testfiles/w-ext-cmpd-two-f1.ddl
Normal file
50
hl/tools/testfiles/w-ext-cmpd-two-f1.ddl
Normal file
@@ -0,0 +1,50 @@
|
||||
#############################
|
||||
output for 'h5watch --fields=field1,field2 TEST.h5/DSET_CMPD_TWO'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_CMPD_TWO...
|
||||
dimension 0: 4->6 (increases)
|
||||
dimension 1: 10->12 (increases)
|
||||
Data:
|
||||
(0,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}
|
||||
(1,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}
|
||||
(2,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}
|
||||
(3,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}
|
||||
(4,0) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}},
|
||||
(4,2) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}},
|
||||
(4,4) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}},
|
||||
(4,6) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}},
|
||||
(4,8) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}},
|
||||
(4,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}},
|
||||
(5,0) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}},
|
||||
(5,2) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}},
|
||||
(5,4) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}},
|
||||
(5,6) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}},
|
||||
(5,8) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}},
|
||||
(5,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}
|
||||
dimension 0: 6->8 (increases)
|
||||
dimension 1: 12->1 (decreases)
|
||||
Data:
|
||||
(6,0) {2, {2, {2, 2, 2}, 2}},
|
||||
(7,0) {2, {2, {2, 2, 2}, 2}}
|
||||
dimension 0: 8->10 (increases)
|
||||
dimension 1: 1->1 (unchanged)
|
||||
Data:
|
||||
(8,0) {3, {3, {3, 3, 3}, 3}},
|
||||
(9,0) {3, {3, {3, 3, 3}, 3}}
|
||||
dimension 0: 10->3 (decreases)
|
||||
dimension 1: 1->3 (increases)
|
||||
Data:
|
||||
(0,1) {4, {4, {4, 4, 4}, 4}}, {4, {4, {4, 4, 4}, 4}}
|
||||
(1,1) {4, {4, {4, 4, 4}, 4}}, {4, {4, {4, 4, 4}, 4}}
|
||||
(2,1) {4, {4, {4, 4, 4}, 4}}, {4, {4, {4, 4, 4}, 4}}
|
||||
dimension 0: 3->2 (decreases)
|
||||
dimension 1: 3->2 (decreases)
|
||||
dimension 0: 2->1 (decreases)
|
||||
dimension 1: 2->2 (unchanged)
|
||||
dimension 0: 1->1 (unchanged)
|
||||
dimension 1: 2->4 (increases)
|
||||
Data:
|
||||
(0,2) {7, {7, {7, 7, 7}, 7}}, {7, {7, {7, 7, 7}, 7}}
|
||||
dimension 0: 1->1 (unchanged)
|
||||
dimension 1: 4->3 (decreases)
|
||||
44
hl/tools/testfiles/w-ext-cmpd-two-f3.ddl
Normal file
44
hl/tools/testfiles/w-ext-cmpd-two-f3.ddl
Normal file
@@ -0,0 +1,44 @@
|
||||
#############################
|
||||
output for 'h5watch --fields=field2.b.a,field2.c TEST.h5/DSET_CMPD_TWO'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_CMPD_TWO...
|
||||
dimension 0: 4->6 (increases)
|
||||
dimension 1: 10->12 (increases)
|
||||
Data:
|
||||
(0,10) {{{1}}, {1}}, {{{1}}, {1}}
|
||||
(1,10) {{{1}}, {1}}, {{{1}}, {1}}
|
||||
(2,10) {{{1}}, {1}}, {{{1}}, {1}}
|
||||
(3,10) {{{1}}, {1}}, {{{1}}, {1}}
|
||||
(4,0) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}},
|
||||
(4,4) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}},
|
||||
(4,8) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}},
|
||||
(5,0) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}},
|
||||
(5,4) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}},
|
||||
(5,8) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}
|
||||
dimension 0: 6->8 (increases)
|
||||
dimension 1: 12->1 (decreases)
|
||||
Data:
|
||||
(6,0) {{{2}}, {2}},
|
||||
(7,0) {{{2}}, {2}}
|
||||
dimension 0: 8->10 (increases)
|
||||
dimension 1: 1->1 (unchanged)
|
||||
Data:
|
||||
(8,0) {{{3}}, {3}},
|
||||
(9,0) {{{3}}, {3}}
|
||||
dimension 0: 10->3 (decreases)
|
||||
dimension 1: 1->3 (increases)
|
||||
Data:
|
||||
(0,1) {{{4}}, {4}}, {{{4}}, {4}}
|
||||
(1,1) {{{4}}, {4}}, {{{4}}, {4}}
|
||||
(2,1) {{{4}}, {4}}, {{{4}}, {4}}
|
||||
dimension 0: 3->2 (decreases)
|
||||
dimension 1: 3->2 (decreases)
|
||||
dimension 0: 2->1 (decreases)
|
||||
dimension 1: 2->2 (unchanged)
|
||||
dimension 0: 1->1 (unchanged)
|
||||
dimension 1: 2->4 (increases)
|
||||
Data:
|
||||
(0,2) {{{7}}, {7}}, {{{7}}, {7}}
|
||||
dimension 0: 1->1 (unchanged)
|
||||
dimension 1: 4->3 (decreases)
|
||||
50
hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl
Normal file
50
hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl
Normal file
@@ -0,0 +1,50 @@
|
||||
#############################
|
||||
output for 'h5watch --fields=field2.b --fields=field4 TEST.h5/DSET_CMPD_TWO'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_CMPD_TWO...
|
||||
dimension 0: 4->6 (increases)
|
||||
dimension 1: 10->12 (increases)
|
||||
Data:
|
||||
(0,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}
|
||||
(1,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}
|
||||
(2,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}
|
||||
(3,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}
|
||||
(4,0) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}},
|
||||
(4,2) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}},
|
||||
(4,4) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}},
|
||||
(4,6) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}},
|
||||
(4,8) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}},
|
||||
(4,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}},
|
||||
(5,0) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}},
|
||||
(5,2) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}},
|
||||
(5,4) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}},
|
||||
(5,6) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}},
|
||||
(5,8) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}},
|
||||
(5,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}
|
||||
dimension 0: 6->8 (increases)
|
||||
dimension 1: 12->1 (decreases)
|
||||
Data:
|
||||
(6,0) {{{2, 2, 2}}, {2, 2}},
|
||||
(7,0) {{{2, 2, 2}}, {2, 2}}
|
||||
dimension 0: 8->10 (increases)
|
||||
dimension 1: 1->1 (unchanged)
|
||||
Data:
|
||||
(8,0) {{{3, 3, 3}}, {3, 3}},
|
||||
(9,0) {{{3, 3, 3}}, {3, 3}}
|
||||
dimension 0: 10->3 (decreases)
|
||||
dimension 1: 1->3 (increases)
|
||||
Data:
|
||||
(0,1) {{{4, 4, 4}}, {4, 4}}, {{{4, 4, 4}}, {4, 4}}
|
||||
(1,1) {{{4, 4, 4}}, {4, 4}}, {{{4, 4, 4}}, {4, 4}}
|
||||
(2,1) {{{4, 4, 4}}, {4, 4}}, {{{4, 4, 4}}, {4, 4}}
|
||||
dimension 0: 3->2 (decreases)
|
||||
dimension 1: 3->2 (decreases)
|
||||
dimension 0: 2->1 (decreases)
|
||||
dimension 1: 2->2 (unchanged)
|
||||
dimension 0: 1->1 (unchanged)
|
||||
dimension 1: 2->4 (increases)
|
||||
Data:
|
||||
(0,2) {{{7, 7, 7}}, {7, 7}}, {{{7, 7, 7}}, {7, 7}}
|
||||
dimension 0: 1->1 (unchanged)
|
||||
dimension 1: 4->3 (decreases)
|
||||
70
hl/tools/testfiles/w-ext-cmpd-two.ddl
Normal file
70
hl/tools/testfiles/w-ext-cmpd-two.ddl
Normal file
@@ -0,0 +1,70 @@
|
||||
#############################
|
||||
output for 'h5watch TEST.h5/DSET_CMPD_TWO'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_CMPD_TWO...
|
||||
dimension 0: 4->6 (increases)
|
||||
dimension 1: 10->12 (increases)
|
||||
Data:
|
||||
(0,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(0,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}
|
||||
(1,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(1,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}
|
||||
(2,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(2,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}
|
||||
(3,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(3,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}
|
||||
(4,0) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(4,1) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(4,2) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(4,3) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(4,4) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(4,5) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(4,6) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(4,7) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(4,8) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(4,9) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(4,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(4,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(5,0) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(5,1) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(5,2) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(5,3) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(5,4) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(5,5) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(5,6) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(5,7) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(5,8) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(5,9) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(5,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}},
|
||||
(5,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}
|
||||
dimension 0: 6->8 (increases)
|
||||
dimension 1: 12->1 (decreases)
|
||||
Data:
|
||||
(6,0) {2, {2, {2, 2, 2}, 2}, 2, {2, 2}},
|
||||
(7,0) {2, {2, {2, 2, 2}, 2}, 2, {2, 2}}
|
||||
dimension 0: 8->10 (increases)
|
||||
dimension 1: 1->1 (unchanged)
|
||||
Data:
|
||||
(8,0) {3, {3, {3, 3, 3}, 3}, 3, {3, 3}},
|
||||
(9,0) {3, {3, {3, 3, 3}, 3}, 3, {3, 3}}
|
||||
dimension 0: 10->3 (decreases)
|
||||
dimension 1: 1->3 (increases)
|
||||
Data:
|
||||
(0,1) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}},
|
||||
(0,2) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}}
|
||||
(1,1) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}},
|
||||
(1,2) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}}
|
||||
(2,1) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}},
|
||||
(2,2) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}}
|
||||
dimension 0: 3->2 (decreases)
|
||||
dimension 1: 3->2 (decreases)
|
||||
dimension 0: 2->1 (decreases)
|
||||
dimension 1: 2->2 (unchanged)
|
||||
dimension 0: 1->1 (unchanged)
|
||||
dimension 1: 2->4 (increases)
|
||||
Data:
|
||||
(0,2) {7, {7, {7, 7, 7}, 7}, 7, {7, 7}},
|
||||
(0,3) {7, {7, {7, 7, 7}, 7}, 7, {7, 7}}
|
||||
dimension 0: 1->1 (unchanged)
|
||||
dimension 1: 4->3 (decreases)
|
||||
16
hl/tools/testfiles/w-ext-cmpd.ddl
Normal file
16
hl/tools/testfiles/w-ext-cmpd.ddl
Normal file
@@ -0,0 +1,16 @@
|
||||
#############################
|
||||
output for 'h5watch TEST.h5/DSET_CMPD'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_CMPD...
|
||||
dimension 0: 10->13 (increases)
|
||||
Data:
|
||||
(10) {1, {2, {2, 2, 2}, 2}, 3, {4, 4}},
|
||||
(11) {2, {3, {3, 3, 3}, 3}, 4, {5, 5}},
|
||||
(12) {3, {4, {4, 4, 4}, 4}, 5, {6, 6}}
|
||||
dimension 0: 13->12 (decreases)
|
||||
dimension 0: 12->1 (decreases)
|
||||
dimension 0: 1->3 (increases)
|
||||
Data:
|
||||
(1) {1, {2, {2, 2, 2}, 2}, 3, {4, 4}}, {2, {3, {3, 3, 3}, 3}, 4, {5,
|
||||
(2) 5}}
|
||||
13
hl/tools/testfiles/w-ext-early.ddl
Normal file
13
hl/tools/testfiles/w-ext-early.ddl
Normal file
@@ -0,0 +1,13 @@
|
||||
#############################
|
||||
output for 'h5watch TEST.h5/DSET_ALLOC_EARLY'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_ALLOC_EARLY...
|
||||
dimension 0: 10->13 (increases)
|
||||
Data:
|
||||
(10) 0, 1, 2
|
||||
dimension 0: 13->12 (decreases)
|
||||
dimension 0: 12->1 (decreases)
|
||||
dimension 0: 1->3 (increases)
|
||||
Data:
|
||||
(1) 0, 1
|
||||
13
hl/tools/testfiles/w-ext-late.ddl
Normal file
13
hl/tools/testfiles/w-ext-late.ddl
Normal file
@@ -0,0 +1,13 @@
|
||||
#############################
|
||||
output for 'h5watch TEST.h5/DSET_ALLOC_LATE'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_ALLOC_LATE...
|
||||
dimension 0: 10->13 (increases)
|
||||
Data:
|
||||
(10) 0, 1, 2
|
||||
dimension 0: 13->12 (decreases)
|
||||
dimension 0: 12->1 (decreases)
|
||||
dimension 0: 1->3 (increases)
|
||||
Data:
|
||||
(1) 0, 1
|
||||
9
hl/tools/testfiles/w-ext-one-d.ddl
Normal file
9
hl/tools/testfiles/w-ext-one-d.ddl
Normal file
@@ -0,0 +1,9 @@
|
||||
#############################
|
||||
output for 'h5watch --dim TEST.h5/DSET_ONE'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_ONE...
|
||||
dimension 0: 10->13 (increases)
|
||||
dimension 0: 13->12 (decreases)
|
||||
dimension 0: 12->1 (decreases)
|
||||
dimension 0: 1->3 (increases)
|
||||
16
hl/tools/testfiles/w-ext-one-simple.ddl
Normal file
16
hl/tools/testfiles/w-ext-one-simple.ddl
Normal file
@@ -0,0 +1,16 @@
|
||||
#############################
|
||||
output for 'h5watch --simple TEST.h5/DSET_ONE'
|
||||
#############################
|
||||
Opened "TEST.h5" with sec2 driver.
|
||||
Monitoring dataset /DSET_ONE...
|
||||
dimension 0: 10->13 (increases)
|
||||
Data:
|
||||
0
|
||||
1
|
||||
2
|
||||
dimension 0: 13->12 (decreases)
|
||||
dimension 0: 12->1 (decreases)
|
||||
dimension 0: 1->3 (increases)
|
||||
Data:
|
||||
0
|
||||
1
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user