summaryrefslogtreecommitdiffstats
path: root/c++/examples
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2013-10-01 02:40:32 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2013-10-01 02:40:32 (GMT)
commit85971108372c8ea1331d89092a8049aa68728fdb (patch)
treeff5b78ef9f7726ab8d79bd96d958b287ecbc4000 /c++/examples
parent7fcd636cb37e493665191af5fbc876a6a012158a (diff)
downloadhdf5-85971108372c8ea1331d89092a8049aa68728fdb.zip
hdf5-85971108372c8ea1331d89092a8049aa68728fdb.tar.gz
hdf5-85971108372c8ea1331d89092a8049aa68728fdb.tar.bz2
[svn-r24235] Description:
- Appended h5tutr_ to names of data files to avoid name clashing with existing examples. - Added example dependencies to Makefile.* (pointed out by Allen) Platforms tested: SunOS 5.11 (emu) with gmake Linux/ppc64 (ostrich) Linux/32 2.6 (jam) Linux/64 2.6 (koala)/PGI compilers
Diffstat (limited to 'c++/examples')
-rw-r--r--c++/examples/Makefile.am3
-rw-r--r--c++/examples/Makefile.in3
-rw-r--r--c++/examples/h5tutr_cmprss.cpp2
-rw-r--r--c++/examples/h5tutr_crtatt.cpp2
-rw-r--r--c++/examples/h5tutr_crtdat.cpp2
-rw-r--r--c++/examples/h5tutr_crtgrp.cpp2
-rw-r--r--c++/examples/h5tutr_crtgrpar.cpp2
-rw-r--r--c++/examples/h5tutr_crtgrpd.cpp2
-rw-r--r--c++/examples/h5tutr_extend.cpp3
-rw-r--r--c++/examples/h5tutr_rdwt.cpp14
-rw-r--r--c++/examples/h5tutr_subset.cpp2
11 files changed, 22 insertions, 15 deletions
diff --git a/c++/examples/Makefile.am b/c++/examples/Makefile.am
index f479776..9e616f7 100644
--- a/c++/examples/Makefile.am
+++ b/c++/examples/Makefile.am
@@ -40,6 +40,9 @@ INSTALL_SCRIPT_FILES = run-c++-ex.sh
# Some of the examples depend on files created by running other examples
readdata.chkexe_: create.chkexe_
chunks.chkexe_: extend_ds.chkexe_
+h5tutr_rdwt.chkexe_: h5tutrcrtdat.chkexe
+h5tutrcrtatt.chkexe_: h5tutrcrtdat.chkexe
+h5tutr_crtgrpd.chkexe_: h5tutr_crtgrpar.chkexe
# Tell conclude.am that these are C++ tests.
CXX_API=yes
diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in
index f392787..dee7c11 100644
--- a/c++/examples/Makefile.in
+++ b/c++/examples/Makefile.in
@@ -659,6 +659,9 @@ help:
# Some of the examples depend on files created by running other examples
readdata.chkexe_: create.chkexe_
chunks.chkexe_: extend_ds.chkexe_
+h5tutr_rdwt.chkexe_: h5tutrcrtdat.chkexe
+h5tutrcrtatt.chkexe_: h5tutrcrtdat.chkexe
+h5tutr_crtgrpd.chkexe_: h5tutr_crtgrpar.chkexe
# How to build programs using h5c++
$(EXTRA_PROG): $(H5CPP)
diff --git a/c++/examples/h5tutr_cmprss.cpp b/c++/examples/h5tutr_cmprss.cpp
index 7db73c4..e9c87f1 100644
--- a/c++/examples/h5tutr_cmprss.cpp
+++ b/c++/examples/h5tutr_cmprss.cpp
@@ -31,7 +31,7 @@
#endif // H5_NO_STD
#endif
-const H5std_string FILE_NAME("cmprss.h5");
+const H5std_string FILE_NAME("h5tutr_cmprss.h5");
const H5std_string DATASET_NAME("Compressed_Data");
const int DIM0 = 100;
const int DIM1 = 20;
diff --git a/c++/examples/h5tutr_crtatt.cpp b/c++/examples/h5tutr_crtatt.cpp
index 651dc69..df8ca5a 100644
--- a/c++/examples/h5tutr_crtatt.cpp
+++ b/c++/examples/h5tutr_crtatt.cpp
@@ -27,7 +27,7 @@
using namespace H5;
#endif
-const H5std_string FILE_NAME( "dset.h5" );
+const H5std_string FILE_NAME( "h5tutr_dset.h5" );
const H5std_string DATASET_NAME( "dset" );
const H5std_string ATTR_NAME( "Units" );
diff --git a/c++/examples/h5tutr_crtdat.cpp b/c++/examples/h5tutr_crtdat.cpp
index d7f887e..c767f72 100644
--- a/c++/examples/h5tutr_crtdat.cpp
+++ b/c++/examples/h5tutr_crtdat.cpp
@@ -27,7 +27,7 @@
using namespace H5;
#endif
-const H5std_string FILE_NAME("dset.h5");
+const H5std_string FILE_NAME("h5tutr_dset.h5");
const H5std_string DATASET_NAME("dset");
const int NX = 4; // dataset dimensions
const int NY = 6;
diff --git a/c++/examples/h5tutr_crtgrp.cpp b/c++/examples/h5tutr_crtgrp.cpp
index bbafd10..3db4e72 100644
--- a/c++/examples/h5tutr_crtgrp.cpp
+++ b/c++/examples/h5tutr_crtgrp.cpp
@@ -31,7 +31,7 @@
#endif // H5_NO_STD
#endif
-const H5std_string FILE_NAME("group.h5");
+const H5std_string FILE_NAME("h5tutr_group.h5");
int main(void)
{
diff --git a/c++/examples/h5tutr_crtgrpar.cpp b/c++/examples/h5tutr_crtgrpar.cpp
index d58dff6..f6e031f 100644
--- a/c++/examples/h5tutr_crtgrpar.cpp
+++ b/c++/examples/h5tutr_crtgrpar.cpp
@@ -31,7 +31,7 @@
#endif // H5_NO_STD
#endif
-const H5std_string FILE_NAME("groups.h5");
+const H5std_string FILE_NAME("h5tutr_groups.h5");
int main(void)
{
diff --git a/c++/examples/h5tutr_crtgrpd.cpp b/c++/examples/h5tutr_crtgrpd.cpp
index fdb9108..f0bde52 100644
--- a/c++/examples/h5tutr_crtgrpd.cpp
+++ b/c++/examples/h5tutr_crtgrpd.cpp
@@ -31,7 +31,7 @@
#endif // H5_NO_STD
#endif
-const H5std_string FILE_NAME("groups.h5");
+const H5std_string FILE_NAME("h5tutr_groups.h5");
const H5std_string DATASET_NAME1("/MyGroup/dset1");
const H5std_string DATASET_NAME2("dset2");
const int RANK = 2;
diff --git a/c++/examples/h5tutr_extend.cpp b/c++/examples/h5tutr_extend.cpp
index c3a18d7..432ca5e 100644
--- a/c++/examples/h5tutr_extend.cpp
+++ b/c++/examples/h5tutr_extend.cpp
@@ -31,7 +31,7 @@
#endif // H5_NO_STD
#endif
-const H5std_string FILE_NAME("extend.h5");
+const H5std_string FILE_NAME("h5tutr_extend.h5");
const H5std_string DATASETNAME("ExtendibleArray");
int main (void)
@@ -130,6 +130,7 @@ int main (void)
if (H5D_CHUNKED == prop.getLayout())
rank_chunk = prop.getChunk(rank, chunk_dimsr);
+ cout << "rank chunk = " << rank_chunk << endl;;
memspace = new DataSpace(rank, dimsr, NULL);
dataset->read(rdata, PredType::NATIVE_INT, *memspace, *filespace);
diff --git a/c++/examples/h5tutr_rdwt.cpp b/c++/examples/h5tutr_rdwt.cpp
index e6e45b7..68c28ca 100644
--- a/c++/examples/h5tutr_rdwt.cpp
+++ b/c++/examples/h5tutr_rdwt.cpp
@@ -27,8 +27,8 @@
using namespace H5;
#endif
-const H5std_string FILE_NAME( "dset.h5" );
-const H5std_string DATASET_NAME( "dset" );
+const H5std_string FILE_NAME("h5tutr_dset.h5");
+const H5std_string DATASET_NAME("dset");
const int DIM0 = 4; // dataset dimensions
const int DIM1 = 6;
@@ -52,24 +52,24 @@ int main (void)
Exception::dontPrint();
// Open an existing file and dataset.
- H5File file( FILE_NAME, H5F_ACC_RDWR );
- DataSet dataset = file.openDataSet( DATASET_NAME );
+ H5File file(FILE_NAME, H5F_ACC_RDWR);
+ DataSet dataset = file.openDataSet(DATASET_NAME);
// Write the data to the dataset using default memory space, file
// space, and transfer properties.
- dataset.write( data, PredType::NATIVE_INT );
+ dataset.write(data, PredType::NATIVE_INT);
} // end of try block
// catch failure caused by the H5File operations
- catch( FileIException error )
+ catch(FileIException error)
{
error.printError();
return -1;
}
// catch failure caused by the DataSet operations
- catch( DataSetIException error )
+ catch(DataSetIException error)
{
error.printError();
return -1;
diff --git a/c++/examples/h5tutr_subset.cpp b/c++/examples/h5tutr_subset.cpp
index 77174ab..ad52747 100644
--- a/c++/examples/h5tutr_subset.cpp
+++ b/c++/examples/h5tutr_subset.cpp
@@ -31,7 +31,7 @@
#endif // H5_NO_STD
#endif
-const H5std_string FILE_NAME("subset.h5");
+const H5std_string FILE_NAME("h5tutr_subset.h5");
const H5std_string DATASET_NAME("IntArray");
const int RANK = 2;