Skip to content

Commit

Permalink
Merge pull request #206 from ComputationalRadiationPhysics/dev
Browse files Browse the repository at this point in the history
Release 1.3.0: openPMD Types and h5py
  • Loading branch information
f-schmitt-zih committed Nov 12, 2015
2 parents e20653c + 722f6bd commit 985e30a
Show file tree
Hide file tree
Showing 57 changed files with 2,059 additions and 360 deletions.
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ script:
# compile and run tests/
- cmake -DWITH_MPI=$SPLASHMPI $SRC/tests
- make

after_script:
# run tests
- $SRC/tests/run_tests $BUILD
- $SRC/tests/run_parallel_tests $BUILD

Expand All @@ -42,6 +41,7 @@ before_script:
- lsb_release -a
- echo "$SRC"
- ls -hal $SRC
- ls -hal /usr/include
# PPA providing hdf5 >= 1.8.6 and OpenMPI >= 1.5.1
# -> remove legacy hdf5 and mpi packages/deps from travis
- sudo apt-get remove -qq libhdf5* libopenmpi* openmpi-bin
Expand All @@ -58,4 +58,12 @@ before_script:
- sudo apt-get install -qq -f libboost-program-options-dev
- sudo apt-get -t o=LP-PPA-james-page-openmpi install -q -f $APTMPI
- sudo apt-get -t o=LP-PPA-axel-huebl-libsplash install -q -f $APTHDF5
- sudo apt-get install python-numpy cython
- sudo -H pip install --upgrade pip
# numpy and cython should be already satisfied
- export HDF5_DIR=/usr
- export C_INCLUDE_PATH=/usr/lib/openmpi/include
- pip install --user h5py
- python -c "import numpy; print(numpy.version.version)"
- python -c "import h5py; print(h5py.version.version)"
- mkdir -p $BUILD ~/lib
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,53 @@
Change Log for libSplash
================================================================

Release 1.3.0
-------------
**Date:** 2015-11-12

This release adds functionality for users to fulfill formatting for
`openPMD`. Support for array attributes, strings/chars, bools and
further `h5py` compatibility have been added. Additionally, read
functionality has improved by new meta calls to determine type
and size of a data set before reading.
The internal format was increased to version 3.3

**New Features**

- bool types are now h5py compatible #153 #198
- new interface `readMeta` in `DataCollector`s to determine type
and size before reading #203
- new interfaces for `DataCollector`s `writeGlobalAttribute` to support
arrays via HDF5 simple data spaces (h5py compatible) #170 #171
- `splashVersion` and `splashFormat` are now written to `/header` #183
- header define `SPLASH_HDF5_VERSION` remembers HDF5 version of build #177
- `char`s, fixed and variable length `string` support added #167


**Interface Changes**

- `ParallelDataCollector::writeGlobalAttribute` now writes to `/` instead of
`/custom` (`SerialDataCollector` unchanged) #182


**Misc**

- term "iteration" is now consequently preferred over
"time step" #157 #187 #188 #204
- public includes do not throw on `-Wshadow` any more #201
- `/header/compression` attribute in new bool representation #199
- CMake:
- shared library detection refactored #192
- FindHDF5 shipped with version support (pre CMake 3.3.0) #176 #169
- doxygen project name updated #178
- `DataSpace` refactored: prefer `DSP_DIM_MAX` over magic numbers #175
- test scripts
- CI (travis) false-positive fixed #172
- output improved #166
- warn on missing dir argument #185
- `INSTALL.md` now in project's root directory #158


Release 1.2.4
-------------
**Date:** 2015-01-25
Expand Down
49 changes: 31 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2013-2014 Felix Schmitt, Axel Huebl
# Copyright 2013-2015 Felix Schmitt, Axel Huebl
#
# This file is part of libSplash.
#
Expand Down Expand Up @@ -39,6 +39,9 @@ PROJECT(libSplash)
SET(CMAKE_PREFIX_PATH "/usr/lib/x86_64-linux-gnu/" "$ENV{MPI_ROOT}"
"$ENV{HDF5_ROOT}")

# own modules for find_packages
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ ${CMAKE_MODULE_PATH})

#-------------------------------------------------------------------------------

# install prefix
Expand Down Expand Up @@ -70,18 +73,17 @@ MESSAGE(STATUS "Building libSplash version ${SPLASH_VERSION}")
#-------------------------------------------------------------------------------

# HDF5 is required package
FIND_PACKAGE(HDF5 REQUIRED)
FIND_PACKAGE(HDF5 1.8.6 REQUIRED)
INCLUDE_DIRECTORIES(SYSTEM ${HDF5_INCLUDE_DIR})

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

#-------------------------------------------------------------------------------

Expand Down Expand Up @@ -109,7 +111,7 @@ ENDIF(NOT SPLASH_RELEASE)
SET(SPLASH_LIBS z ${HDF5_LIBRARIES})

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

# build libsplash shared (if shared HDF5 is used)
IF(HDF5_IS_STATIC)
IF(NOT HDF5_HAS_SHARED)
MESSAGE(WARNING "Skipping dynamic libSplash because HDF5 library is static")
ELSE(HDF5_IS_STATIC)
ELSE()
ADD_LIBRARY(splash SHARED ${LIBRARY_SOURCES})
TARGET_LINK_LIBRARIES(splash ${SPLASH_LIBS})
ENDIF(HDF5_IS_STATIC)
ENDIF()

# build libsplash static
ADD_LIBRARY(splash_static STATIC ${LIBRARY_SOURCES})
SET_TARGET_PROPERTIES(splash_static PROPERTIES OUTPUT_NAME splash)
TARGET_LINK_LIBRARIES (splash_static ${SPLASH_LIBS})

# install libs
IF(NOT HDF5_IS_STATIC)
IF(HDF5_HAS_SHARED)
INSTALL(TARGETS splash LIBRARY DESTINATION lib)
ENDIF(NOT HDF5_IS_STATIC)
ENDIF()

INSTALL(TARGETS splash_static ARCHIVE DESTINATION lib)

Expand All @@ -169,8 +171,15 @@ INSTALL(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/include/."
PATTERN ".svn" EXCLUDE
PATTERN ".git" EXCLUDE
PATTERN "splash_*.h" EXCLUDE
PATTERN "version.hpp" EXCLUDE
)

# version.hpp file with SPLASH_HDF5_VERSION set accordingly
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/src/include/splash/version.hpp
${CMAKE_CURRENT_BINARY_DIR}/splash/version.hpp )
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/splash/version.hpp
DESTINATION include/splash)

# install correct splash header file
# (will be executed after the POST_BUILD copies of splash.h)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/splash/splash.h
Expand Down Expand Up @@ -210,7 +219,11 @@ OPTION(WITH_TOOLS "enable splashtools" ON)
IF(WITH_TOOLS)
MESSAGE(STATUS "Building splashtools")

SET(TOOLS_LIBS ${TOOLS_LIBS} splash_static)
IF(HDF5_HAS_SHARED)
SET(TOOLS_LIBS ${TOOLS_LIBS} splash)
ELSE()
SET(TOOLS_LIBS ${TOOLS_LIBS} splash_static)
ENDIF()
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

# MPI for tools
Expand Down
3 changes: 2 additions & 1 deletion doc/INSTALL.md → INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ To use the CMakeLists.txt file which comes with the source code, you must have
The splashtools and some tests also require an **MPI 2.2** compatible MPI library,
e.g. **OpenMPI 1.5.1** or higher.

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


Compiling
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Licences can be found in [GPL](COPYING) or [LGPL](COPYING.LESSER), respectively.
Install
-------

See our notes in [INSTALL.md](doc/INSTALL.md).
See our notes in [INSTALL.md](INSTALL.md).


Usage
Expand Down
Loading

0 comments on commit 985e30a

Please sign in to comment.