Skip to content

Commit 43c0b8a

Browse files
author
f-schmitt-zih
committed
Merge pull request #137 from ComputationalRadiationPhysics/dev
Release 1.2.1: Non-Extensible Data Sets
2 parents 5b76dfa + 08678f6 commit 43c0b8a

File tree

8 files changed

+41
-13
lines changed

8 files changed

+41
-13
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
Change Log for libSplash
22
================================================================
33

4+
Release 1.2.1
5+
-------------
6+
**Date:** 2014-06-20
7+
8+
This release contains a minor improvement in the data format.
9+
The internal format was increased to version 2.1 (which is
10+
backwards compatible to all 2.x formated files).
11+
12+
**Misc**
13+
14+
- parallel simple data test re-enabled #130
15+
- data sets: use fixed size (non-extensible) by default,
16+
use `H5F_UNLIMTED` only in append mode #135
17+
- update install notes #134
18+
19+
420
Release 1.2.0
521
-------------
622
**Date:** 2014-04-30

doc/INSTALL.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ Requirements
88
using the command
99
`$ git clone git@github.com:ComputationalRadiationPhysics/libSplash.git`
1010

11-
Building libSplash **requires HDF5 in version 1.8.6** or higher with **shared library support**
12-
(`--enable-shared`).
13-
However, we recommend that you use HDF5 1.8.11 or newer for best support and results.
11+
Building libSplash **requires HDF5 in version 1.8.6** or higher.
12+
For **MPI based parallel output** configure HDF5 with `--enable-parallel`.
1413

1514
To use the CMakeLists.txt file which comes with the source code, you must have
1615
**CMake version 2.8.5** or higher installed.

src/DCDataSet.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ namespace splash
194194
}
195195

196196
void DCDataSet::create(const CollectionType& colType,
197-
hid_t group, const Dimensions size, uint32_t ndims, bool compression)
197+
hid_t group, const Dimensions size, uint32_t ndims,
198+
bool compression, bool extensible)
198199
throw (DCException)
199200
{
200201
log_msg(2, "DCDataSet::create (%s, size %s)", name.c_str(), size.toString().c_str());
@@ -222,7 +223,12 @@ namespace splash
222223
{
223224
hsize_t *max_dims = new hsize_t[ndims];
224225
for (size_t i = 0; i < ndims; ++i)
225-
max_dims[i] = H5F_UNLIMITED;
226+
{
227+
if (extensible)
228+
max_dims[i] = H5F_UNLIMITED;
229+
else
230+
max_dims[i] = getPhysicalSize()[i];
231+
}
226232

227233
dataspace = H5Screate_simple(ndims, getPhysicalSize().getPointer(), max_dims);
228234

src/ParallelDataCollector.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,9 @@ namespace splash
917917

918918
DCParallelDataSet dataset(name);
919919
// always create dataset but write data only if all dimensions > 0
920-
dataset.create(datatype, group, globalSize, ndims, this->options.enableCompression);
920+
// not extensible
921+
dataset.create(datatype, group, globalSize, ndims,
922+
this->options.enableCompression, false);
921923
dataset.write(srcSelect, globalOffset, data);
922924
dataset.close();
923925
}
@@ -1017,8 +1019,9 @@ namespace splash
10171019
group.openCreate(handles.get(id), group_path);
10181020

10191021
DCParallelDataSet dataset(dset_name.c_str());
1020-
// create the empty dataset
1021-
dataset.create(type, group.getHandle(), globalSize, ndims, this->options.enableCompression);
1022+
// create the empty extensible dataset
1023+
dataset.create(type, group.getHandle(), globalSize, ndims,
1024+
this->options.enableCompression, true);
10221025
dataset.close();
10231026
}
10241027

src/SerialDataCollector.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,9 @@ namespace splash
807807

808808
DCDataSet dataset(name);
809809
// always create dataset but write data only if all dimensions > 0 and data available
810-
dataset.create(datatype, group, select.count, ndims, this->enableCompression);
810+
// not extensible
811+
dataset.create(datatype, group, select.count, ndims,
812+
this->enableCompression, false);
811813
if (data && (select.count.getScalarSize() > 0))
812814
dataset.write(select, Dimensions(0, 0, 0), data);
813815
dataset.close();
@@ -824,7 +826,8 @@ namespace splash
824826
if (!dataset.open(group))
825827
{
826828
Dimensions data_size(count, 1, 1);
827-
dataset.create(datatype, group, data_size, 1, this->enableCompression);
829+
// create dataset extensible
830+
dataset.create(datatype, group, data_size, 1, this->enableCompression, true);
828831

829832
if (count > 0)
830833
dataset.write(Selection(data_size,

src/include/splash/core/DCDataSet.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ namespace splash
8989
* @param size target size
9090
* @param ndims number of dimensions
9191
* @param compression enables transparent compression on the data
92+
* @param extensible enable the dataset to be extensible
9293
*/
9394
void create(const CollectionType& colType, hid_t group, const Dimensions size,
94-
uint32_t ndims, bool compression) throw (DCException);
95+
uint32_t ndims, bool compression, bool extensible) throw (DCException);
9596

9697
/**
9798
* Create an object reference

src/include/splash/version.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
* changes in the minor number have to be backwards compatible
3232
*/
3333
#define SPLASH_FILE_FORMAT_MAJOR 2
34-
#define SPLASH_FILE_FORMAT_MINOR 0
34+
#define SPLASH_FILE_FORMAT_MINOR 1
3535

3636
#endif /* VERSION_HPP */

tests/run_parallel_tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function testMPI()
2525
fi
2626
}
2727

28-
#testMPI ./Parallel_SimpleDataTest.cpp.out 8 "Testing simple data read/write (parallel)..."
28+
testMPI ./Parallel_SimpleDataTest.cpp.out 8 "Testing simple data read/write (parallel)..."
2929

3030
testMPI ./Parallel_ListFilesTest.cpp.out 1 "Testing list files (parallel)..."
3131

0 commit comments

Comments
 (0)