Skip to content

Commit 985e30a

Browse files
author
f-schmitt-zih
committed
Merge pull request #206 from ComputationalRadiationPhysics/dev
Release 1.3.0: openPMD Types and h5py
2 parents e20653c + 722f6bd commit 985e30a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2059
-360
lines changed

.travis.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ script:
3232
# compile and run tests/
3333
- cmake -DWITH_MPI=$SPLASHMPI $SRC/tests
3434
- make
35-
36-
after_script:
35+
# run tests
3736
- $SRC/tests/run_tests $BUILD
3837
- $SRC/tests/run_parallel_tests $BUILD
3938

@@ -42,6 +41,7 @@ before_script:
4241
- lsb_release -a
4342
- echo "$SRC"
4443
- ls -hal $SRC
44+
- ls -hal /usr/include
4545
# PPA providing hdf5 >= 1.8.6 and OpenMPI >= 1.5.1
4646
# -> remove legacy hdf5 and mpi packages/deps from travis
4747
- sudo apt-get remove -qq libhdf5* libopenmpi* openmpi-bin
@@ -58,4 +58,12 @@ before_script:
5858
- sudo apt-get install -qq -f libboost-program-options-dev
5959
- sudo apt-get -t o=LP-PPA-james-page-openmpi install -q -f $APTMPI
6060
- sudo apt-get -t o=LP-PPA-axel-huebl-libsplash install -q -f $APTHDF5
61+
- sudo apt-get install python-numpy cython
62+
- sudo -H pip install --upgrade pip
63+
# numpy and cython should be already satisfied
64+
- export HDF5_DIR=/usr
65+
- export C_INCLUDE_PATH=/usr/lib/openmpi/include
66+
- pip install --user h5py
67+
- python -c "import numpy; print(numpy.version.version)"
68+
- python -c "import h5py; print(h5py.version.version)"
6169
- mkdir -p $BUILD ~/lib

CHANGELOG.md

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

4+
Release 1.3.0
5+
-------------
6+
**Date:** 2015-11-12
7+
8+
This release adds functionality for users to fulfill formatting for
9+
`openPMD`. Support for array attributes, strings/chars, bools and
10+
further `h5py` compatibility have been added. Additionally, read
11+
functionality has improved by new meta calls to determine type
12+
and size of a data set before reading.
13+
The internal format was increased to version 3.3
14+
15+
**New Features**
16+
17+
- bool types are now h5py compatible #153 #198
18+
- new interface `readMeta` in `DataCollector`s to determine type
19+
and size before reading #203
20+
- new interfaces for `DataCollector`s `writeGlobalAttribute` to support
21+
arrays via HDF5 simple data spaces (h5py compatible) #170 #171
22+
- `splashVersion` and `splashFormat` are now written to `/header` #183
23+
- header define `SPLASH_HDF5_VERSION` remembers HDF5 version of build #177
24+
- `char`s, fixed and variable length `string` support added #167
25+
26+
27+
**Interface Changes**
28+
29+
- `ParallelDataCollector::writeGlobalAttribute` now writes to `/` instead of
30+
`/custom` (`SerialDataCollector` unchanged) #182
31+
32+
33+
**Misc**
34+
35+
- term "iteration" is now consequently preferred over
36+
"time step" #157 #187 #188 #204
37+
- public includes do not throw on `-Wshadow` any more #201
38+
- `/header/compression` attribute in new bool representation #199
39+
- CMake:
40+
- shared library detection refactored #192
41+
- FindHDF5 shipped with version support (pre CMake 3.3.0) #176 #169
42+
- doxygen project name updated #178
43+
- `DataSpace` refactored: prefer `DSP_DIM_MAX` over magic numbers #175
44+
- test scripts
45+
- CI (travis) false-positive fixed #172
46+
- output improved #166
47+
- warn on missing dir argument #185
48+
- `INSTALL.md` now in project's root directory #158
49+
50+
451
Release 1.2.4
552
-------------
653
**Date:** 2015-01-25

CMakeLists.txt

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2013-2014 Felix Schmitt, Axel Huebl
2+
# Copyright 2013-2015 Felix Schmitt, Axel Huebl
33
#
44
# This file is part of libSplash.
55
#
@@ -39,6 +39,9 @@ PROJECT(libSplash)
3939
SET(CMAKE_PREFIX_PATH "/usr/lib/x86_64-linux-gnu/" "$ENV{MPI_ROOT}"
4040
"$ENV{HDF5_ROOT}")
4141

42+
# own modules for find_packages
43+
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ ${CMAKE_MODULE_PATH})
44+
4245
#-------------------------------------------------------------------------------
4346

4447
# install prefix
@@ -70,18 +73,17 @@ MESSAGE(STATUS "Building libSplash version ${SPLASH_VERSION}")
7073
#-------------------------------------------------------------------------------
7174

7275
# HDF5 is required package
73-
FIND_PACKAGE(HDF5 REQUIRED)
76+
FIND_PACKAGE(HDF5 1.8.6 REQUIRED)
7477
INCLUDE_DIRECTORIES(SYSTEM ${HDF5_INCLUDE_DIR})
7578

76-
# check if static version of HDF5 is used
77-
# CMake prefers .so/shared libraries
78-
# if we find a static HDF5 lib in the ${HDF5_LIBRARIES}
79-
# it means there is only a static version installed
80-
SET(HDF5_IS_STATIC ON)
81-
STRING(FIND "${HDF5_LIBRARIES}" "hdf5.a" HDF5_IS_STATIC_POS)
82-
IF(${HDF5_IS_STATIC_POS} EQUAL -1)
83-
SET(HDF5_IS_STATIC OFF)
84-
ENDIF(${HDF5_IS_STATIC_POS} EQUAL -1)
79+
# check if shared version of HDF5 can be used
80+
# CMake prefers .so/shared libraries over static ones
81+
SET(HDF5_HAS_SHARED ON)
82+
STRING(FIND "${HDF5_LIBRARIES}" "hdf5.so" HDF5_HAS_SHARED_POS)
83+
IF(${HDF5_HAS_SHARED_POS} EQUAL -1)
84+
SET(HDF5_HAS_SHARED OFF)
85+
ENDIF()
86+
UNSET(HDF5_HAS_SHARED_POS)
8587

8688
#-------------------------------------------------------------------------------
8789

@@ -109,7 +111,7 @@ ENDIF(NOT SPLASH_RELEASE)
109111
SET(SPLASH_LIBS z ${HDF5_LIBRARIES})
110112

111113
# serial or parallel version of libSplash
112-
SET(SPLASH_CLASSES logging DCAttribute DCDataSet DCGroup HandleMgr SerialDataCollector DomainCollector)
114+
SET(SPLASH_CLASSES logging DCAttribute DCDataSet DCGroup HandleMgr SerialDataCollector DomainCollector SDCHelper)
113115
IF(HDF5_IS_PARALLEL)
114116
#parallel version
115117
MESSAGE(STATUS "Parallel HDF5 found. Building parallel version")
@@ -144,22 +146,22 @@ AUX_SOURCE_DIRECTORY("${CMAKE_CURRENT_SOURCE_DIR}/tools" TOOLS_SOURCES)
144146
#-------------------------------------------------------------------------------
145147

146148
# build libsplash shared (if shared HDF5 is used)
147-
IF(HDF5_IS_STATIC)
149+
IF(NOT HDF5_HAS_SHARED)
148150
MESSAGE(WARNING "Skipping dynamic libSplash because HDF5 library is static")
149-
ELSE(HDF5_IS_STATIC)
151+
ELSE()
150152
ADD_LIBRARY(splash SHARED ${LIBRARY_SOURCES})
151153
TARGET_LINK_LIBRARIES(splash ${SPLASH_LIBS})
152-
ENDIF(HDF5_IS_STATIC)
154+
ENDIF()
153155

154156
# build libsplash static
155157
ADD_LIBRARY(splash_static STATIC ${LIBRARY_SOURCES})
156158
SET_TARGET_PROPERTIES(splash_static PROPERTIES OUTPUT_NAME splash)
157159
TARGET_LINK_LIBRARIES (splash_static ${SPLASH_LIBS})
158160

159161
# install libs
160-
IF(NOT HDF5_IS_STATIC)
162+
IF(HDF5_HAS_SHARED)
161163
INSTALL(TARGETS splash LIBRARY DESTINATION lib)
162-
ENDIF(NOT HDF5_IS_STATIC)
164+
ENDIF()
163165

164166
INSTALL(TARGETS splash_static ARCHIVE DESTINATION lib)
165167

@@ -169,8 +171,15 @@ INSTALL(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/include/."
169171
PATTERN ".svn" EXCLUDE
170172
PATTERN ".git" EXCLUDE
171173
PATTERN "splash_*.h" EXCLUDE
174+
PATTERN "version.hpp" EXCLUDE
172175
)
173176

177+
# version.hpp file with SPLASH_HDF5_VERSION set accordingly
178+
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/src/include/splash/version.hpp
179+
${CMAKE_CURRENT_BINARY_DIR}/splash/version.hpp )
180+
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/splash/version.hpp
181+
DESTINATION include/splash)
182+
174183
# install correct splash header file
175184
# (will be executed after the POST_BUILD copies of splash.h)
176185
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/splash/splash.h
@@ -210,7 +219,11 @@ OPTION(WITH_TOOLS "enable splashtools" ON)
210219
IF(WITH_TOOLS)
211220
MESSAGE(STATUS "Building splashtools")
212221

213-
SET(TOOLS_LIBS ${TOOLS_LIBS} splash_static)
222+
IF(HDF5_HAS_SHARED)
223+
SET(TOOLS_LIBS ${TOOLS_LIBS} splash)
224+
ELSE()
225+
SET(TOOLS_LIBS ${TOOLS_LIBS} splash_static)
226+
ENDIF()
214227
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
215228

216229
# MPI for tools

doc/INSTALL.md renamed to INSTALL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ To use the CMakeLists.txt file which comes with the source code, you must have
1717
The splashtools and some tests also require an **MPI 2.2** compatible MPI library,
1818
e.g. **OpenMPI 1.5.1** or higher.
1919

20-
Tests require the development version of the **CppUnit** library.
20+
Our *tests* require the development version of the **CppUnit** library and
21+
python support for `h5py` & `numpy`.
2122

2223

2324
Compiling

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Licences can be found in [GPL](COPYING) or [LGPL](COPYING.LESSER), respectively.
4646
Install
4747
-------
4848

49-
See our notes in [INSTALL.md](doc/INSTALL.md).
49+
See our notes in [INSTALL.md](INSTALL.md).
5050

5151

5252
Usage

0 commit comments

Comments
 (0)