Skip to content

Commit 5b76dfa

Browse files
committed
Merge pull request #126 from ComputationalRadiationPhysics/topic-release1.2
Topic release1.2
2 parents 8fda315 + 84f4b01 commit 5b76dfa

Some content is hidden

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

50 files changed

+1871
-1274
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ compiler:
1010

1111
env:
1212
global:
13-
- SPLASH_ROOT=~/lib/splash
1413
- BUILD=~/buildTmp
1514
- SRC=$TRAVIS_BUILD_DIR
1615
matrix:
@@ -21,8 +20,10 @@ env:
2120
script:
2221
- cd $BUILD
2322
# compile libSplash and install
24-
- cmake -DTOOLS_MPI=$SPLASHMPI -DCMAKE_INSTALL_PREFIX=~/lib/splash $SRC
25-
- make install
23+
- cmake -DTOOLS_MPI=$SPLASHMPI $SRC
24+
- make package
25+
- sudo dpkg -i libsplash*.deb
26+
- ls -hal /usr/share/pyshared/
2627
- rm -rf $BUILD/*
2728
# compile examples/
2829
- cmake -DWITH_MPI=$SPLASHMPI $SRC/examples

CHANGELOG.md

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

4+
Release 1.2.0
5+
-------------
6+
**Date:** 2014-04-30
7+
8+
**New Features**
9+
10+
- splash2xdmf python script to create XDMF descriptions for libSplash files
11+
with domain information
12+
- allow to read/write attributes at groups
13+
14+
15+
**Interface Changes**
16+
17+
- major interface change: simplified interfaces as most read/write routines
18+
now use a Selection class for describe the source layout
19+
- local domain offsets are now exclusive, i.e. do not include the
20+
global domain offset
21+
- changed file format version to 2.0
22+
- add a finalize() call to ParallelDataCollector to free MPI resources
23+
24+
25+
**Bug Fixes**
26+
27+
- fix automatic chunking algorithm
28+
- only use HDF5 hyperslaps if necessary for improved performance
29+
- fix bug in getMaxID and getEntryIDs for ParallelDataCollector
30+
31+
32+
433
Release 1.1.1
534
-------------
635
**Date:** 2014-02-20

CMakeLists.txt

Lines changed: 130 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#
2-
# Copyright 2013 Felix Schmitt, Axel Huebl
2+
# Copyright 2013-2014 Felix Schmitt, Axel Huebl
33
#
44
# This file is part of libSplash.
55
#
66
# libSplash is free software: you can redistribute it and/or modify
77
# it under the terms of of either the GNU General Public License or
88
# the GNU Lesser General Public License as published by
99
# the Free Software Foundation, either version 3 of the License, or
10-
# (at your option) any later version.
10+
# (at your option) any later version.
11+
#
1112
# libSplash is distributed in the hope that it will be useful,
1213
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1314
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -198,6 +199,10 @@ ELSE(HDF5_IS_PARALLEL)
198199
)
199200
ENDIF(HDF5_IS_PARALLEL)
200201

202+
# install python scripts
203+
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/tools/splash2xdmf.py
204+
DESTINATION share/pyshared)
205+
201206
#-------------------------------------------------------------------------------
202207

203208
# build tools
@@ -239,8 +244,131 @@ IF(WITH_TOOLS)
239244

240245
#install tools
241246
INSTALL(TARGETS splashtools RUNTIME DESTINATION bin)
247+
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/tools/splash2xdmf.py DESTINATION bin)
242248
ENDIF(WITH_TOOLS)
243249

250+
#-------------------------------------------------------------------------------
251+
252+
# Packaging
253+
# Reference for variables: http://www.cmake.org/Wiki/CMake:CPackConfiguration
254+
255+
SET(CPACK_GENERATOR "DEB;TGZ;TBZ2;ZIP")
256+
257+
SET(CPACK_PACKAGE_NAME "libsplash") # lower case required (debian policy)
258+
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
259+
"Simple Parallel file output Library for Accumulating Simulation data using Hdf5")
260+
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
261+
SET(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
262+
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
263+
# a valid email is required - happy spamming :)
264+
SET(CPACK_PACKAGE_CONTACT "Felix Schmitt <felix.schmitt@zih.tu-dresden.de>")
265+
SET(CPACK_PACKAGE_VENDOR "ZIH and HZDR")
266+
# CPACK_PACKAGING_INSTALL_PREFIX : default is "/usr" for deb and rpm
267+
268+
SET(CPACK_PACKAGE_VERSION_MAJOR "${SPLASH_VERSION_MAJOR}")
269+
SET(CPACK_PACKAGE_VERSION_MINOR "${SPLASH_VERSION_MINOR}")
270+
SET(CPACK_PACKAGE_VERSION_PATCH "${SPLASH_VERSION_PATCH}")
271+
SET(CPACK_PACKAGE_VERSION
272+
"${SPLASH_VERSION_MAJOR}.${SPLASH_VERSION_MINOR}.${SPLASH_VERSION_PATCH}")
273+
274+
# from `dpkg --print-architecture`
275+
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
276+
CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
277+
SET(SPLASH_ARCHITECTURE "amd64")
278+
ELSE()
279+
SET(SPLASH_ARCHITECTURE "i386")
280+
ENDIF()
281+
282+
# probably only required by NSIS
283+
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
284+
285+
# ship (strip) all found executables
286+
SET(CPACK_STRIP_FILES ON)
287+
# do not ship source files (packed in a weird absolute dir)
288+
SET(CPACK_SOURCE_STRIP_FILES OFF)
289+
#SET(CPACK_PACKAGE_EXECUTABLES "MyExecutable" "My Executable") # only required by NSIS
290+
291+
# try to detect used MPI flavor
292+
SET(MPI_FLAVOR "FLAVOR-NOTFOUND")
293+
IF(HDF5_IS_PARALLEL OR TOOLS_MPI)
294+
SET(MPI_FLAVOR "openmpi")
295+
SET(MPI_FLAVOR_BIN "openmpi-bin")
296+
SET(MPI_FLAVOR_MINVERSION 1.5.1)
297+
STRING(FIND "${MPI_C_LIBRARIES}" "libmpich" MPI_FLAVOR_POS)
298+
IF(${MPI_FLAVOR_POS} GREATER -1)
299+
SET(MPI_FLAVOR "mpich2")
300+
SET(MPI_FLAVOR_BIN "mpich2")
301+
SET(MPI_FLAVOR_MINVERSION 1.4.1)
302+
ENDIF(${MPI_FLAVOR_POS} GREATER -1)
303+
ENDIF(HDF5_IS_PARALLEL OR TOOLS_MPI)
304+
305+
# package name containing all necessary information for feature identification
306+
# inspect .deb meta data (like version) with dpkg --info <package>.deb
307+
IF(NOT HDF5_IS_PARALLEL)
308+
SET(SPLASH_PACKAGE_EXTRA_PREFIX "-serial")
309+
ENDIF(NOT HDF5_IS_PARALLEL)
310+
IF(MPI_FLAVOR)
311+
SET(SPLASH_PACKAGE_EXTRA_PREFIX
312+
"${SPLASH_PACKAGE_EXTRA_PREFIX}-${MPI_FLAVOR}")
313+
ENDIF(MPI_FLAVOR)
314+
IF(NOT SPLASH_RELEASE)
315+
SET(SPLASH_PACKAGE_DEBUG "-dbg")
316+
ENDIF(NOT SPLASH_RELEASE)
317+
318+
SET(CPACK_PACKAGE_FILE_NAME
319+
"${CPACK_PACKAGE_NAME}${SPLASH_PACKAGE_EXTRA_PREFIX}-${SPLASH_ARCHITECTURE}${SPLASH_PACKAGE_DEBUG}"
320+
)
321+
322+
# DEB specific ----------------------------------------------------------------
323+
# package relation policy at
324+
# http://www.debian.org/doc/debian-policy/ch-relationships.html
325+
326+
# default values that are already set in a fine and noble manner
327+
# CPACK_DEBIAN_PACKAGE_MAINTAINER <- CPACK_PACKAGE_CONTACT
328+
# CPACK_DEBIAN_PACKAGE_NAME <- CPACK_PACKAGE_NAME
329+
# CPACK_DEBIAN_PACKAGE_VERSION <- CPACK_PACKAGE_VERSION
330+
# CPACK_DEBIAN_PACKAGE_DESCRIPTION <- CPACK_PACKAGE_DESCRIPTION_SUMMARY
331+
# CPACK_DEBIAN_PACKAGE_SECTION : default is "devel"
332+
# CPACK_DEBIAN_PACKAGE_PRIORITY : default is "optional"
333+
# CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA : pos/pre inst/rm scripts
334+
335+
# from `dpkg --print-architecture`
336+
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${SPLASH_ARCHITECTURE}") # default is i386
337+
338+
# the dev packages are a little bit too much, but since there is a lack of
339+
# convenient named meta packages we use them to trigger the dependencies
340+
IF(HDF5_IS_PARALLEL)
341+
SET(CPACK_DEBIAN_PACKAGE_DEPENDS
342+
"libhdf5-${MPI_FLAVOR}-dev (>= 1.8.6)"
343+
)
344+
SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS
345+
"${MPI_FLAVOR_BIN} (>= ${MPI_FLAVOR_MINVERSION})"
346+
)
347+
ELSE(HDF5_IS_PARALLEL)
348+
SET(CPACK_DEBIAN_PACKAGE_DEPENDS
349+
"libhdf5-serial-dev (>= 1.8.6)"
350+
)
351+
IF(TOOLS_MPI)
352+
SET(CPACK_DEBIAN_PACKAGE_DEPENDS
353+
"${CPACK_DEBIAN_PACKAGE_DEPENDS}, lib${MPI_FLAVOR}-dev (>= ${MPI_FLAVOR_MINVERSION})"
354+
)
355+
SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS
356+
"${MPI_FLAVOR_BIN} (>= ${MPI_FLAVOR_MINVERSION})"
357+
)
358+
ENDIF(TOOLS_MPI)
359+
ENDIF(HDF5_IS_PARALLEL)
360+
361+
# CPACK_DEBIAN_PACKAGE_SUGGESTS
362+
# deb-src support
363+
# DEBIAN_PACKAGE_BUILDS_DEPENDS : not implemented by cmake yet
364+
365+
# END: DEB specific -----------------------------------------------------------
244366

367+
# create or creates specific library names
368+
# libsplash.so -> libsplash.so.1
369+
# libsplash.so.1 -> libsplash.so.1.1
370+
# libsplash.so.1.1 -> libsplash.so.1.1.0
245371

372+
# has to be included after all vars are set
373+
INCLUDE(CPack)
246374

doc/INSTALL.md

Lines changed: 55 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,39 +25,80 @@ Compiling
2525
---------
2626

2727
To **compile libSplash**, it is recommended to create a new build folder and execute
28-
`$ cmake -DCMAKE_INSTALL_PREFIX=<INSTALL PATH> <CMakeLists.txt-PATH>`
28+
```bash
29+
cmake -DCMAKE_INSTALL_PREFIX=<INSTALL PATH> <CMakeLists.txt-PATH>
30+
```
2931

3032
Than run `$ make install` to build and install libSplash library and binaries to the chosen
3133
installation directory. This will build libSplash as an shared object library (libsplash.so)
3234
as well as all tools.
3335

3436
If you do not want to build splashtools, pass `-DWITH_TOOLS=OFF` to your cmake command.
35-
To enable MPI parallel splashtools, pass `-DTOOLS_MPI=ON` to your cmake command.
37+
To disable MPI parallel splashtools, pass `-DTOOLS_MPI=OFF` to your cmake command.
3638

3739
By default, the RELEASE version is built. To create libSplash with DEBUG symbols,
3840
pass `-DSPLASH_RELEASE=OFF` to your cmake command.
3941
To see verbose internal (!) HDF5 debug output, pass `-DDEBUG_VERBOSE=ON`
4042
to your cmake command line.
4143

42-
Afterwards, please add `<INSTALL PATH>/bin` to your `$PATH` environment variable and
43-
`<INSTALL PATH>/lib` to your `$LD_LIBRARY_PATH`.
44-
Setting an additional environment variable `export SPLASH_ROOT=<INSTALL PATH>` will
45-
help finding the installed libraries with CMake scripts.
44+
Afterwards, configure your environment variables:
45+
```bash
46+
# helps finding the installed library, e.g. with CMake scripts
47+
export SPLASH_ROOT=<INSTALL PATH>
48+
# provides command line access to our tools
49+
export PATH=$SPLASH_ROOT/bin:$PATH
50+
# path for the linker
51+
export LD_LIBRARY_PATH=$SPLASH_ROOT/lib:$LD_LIBRARY_PATH
52+
# provides our python modules, e.g. for xdmf creation
53+
export PYTHONPATH=$SPLASH_ROOT/bin:$PYTHONPATH
54+
```
4655

4756

48-
Linking
49-
-------
57+
Linking to your Project
58+
-----------------------
5059

5160
To use libSplash in your project, you must link against the created shared object library
5261
libsplash.so or against the statically linked archive libsplash.a.
5362

5463
Because we are linking to HDF5, the following **external dependencies** must be linked:
55-
- `-lhdf5`
56-
- `-lpthread`
57-
- `-lz`
58-
- `-lrt`
59-
- `-ldl`
60-
- `-lm`
64+
- `-lhdf5`, `-lpthread`, `-lz`, `-lrt`, `-ldl`, `-lm`
65+
66+
If you are using CMake you can download our `FindSplash.cmake` module with
67+
```bash
68+
wget https://raw.githubusercontent.com/ComputationalRadiationPhysics/picongpu/dev/src/cmake/FindSplash.cmake
69+
# read the documentation
70+
cmake -DCMAKE_MODULE_PATH=. --help-module FindSplash | less
71+
```
72+
73+
and use the following lines in your `CMakeLists.txt`:
74+
```cmake
75+
# this example will require at least CMake 2.8.5
76+
cmake_minimum_required(VERSION 2.8.5)
77+
78+
# add path to FindSplash.cmake, e.g. in the directory in cmake/
79+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/)
80+
81+
# find libSplash installation
82+
# optional: prefer static libraries over shared ones (but do not force them)
83+
set(Splash_USE_STATIC_LIBS ON)
84+
85+
# optional: specifiy (minimal) version, require Splash and specific components, e.g.
86+
# (Splash 1.1.1 REQUIRED COMPONENTS PARALLEL)
87+
find_package(Splash)
88+
89+
if(Splash_FOUND)
90+
# where to find headers (-I includes for compiler)
91+
include_directories(SYSTEM ${Splash_INCLUDE_DIRS})
92+
# additional compiler flags (-DFOO=bar)
93+
add_definitions(${Splash_DEFINITIONS})
94+
# libraries to link against
95+
set(LIBS ${LIBS} ${Splash_LIBRARIES})
96+
endif(Splash_FOUND)
97+
98+
# add_executable(yourBinary ${SOURCES})
99+
# ...
100+
# target_link_libraries(yourBinary ${LIBS})
101+
```
61102

62103
Tests
63104
-----

doc/img/domains_parallel.jpg

-349 Bytes
Loading

doc/img/domains_serial.jpg

-1017 Bytes
Loading

doc/img/src/domains_parallel.odg

-931 Bytes
Binary file not shown.

doc/img/src/domains_serial.odg

-990 Bytes
Binary file not shown.

doc/manual/UserManual.pdf

635 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)