Skip to content

Commit

Permalink
libpressio version 0.19.2
Browse files Browse the repository at this point in the history
Minor Feature:

+ Added build option for docker containers for Fedora and Ubuntu.
  This will ease the use of installing and using the library for users
  wishing to target using this platform

Bug Fix:

+ Previously, there was an undocumented dependancy on SWIG version
  3.0.12 or later which would cause build failures when using the python
  bindings.  This has been corrected by adding appropriate documentation
  to the README file.
  • Loading branch information
robertu94 committed Nov 4, 2019
1 parent 545888f commit 138c709
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 3 deletions.
22 changes: 21 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
project(libpressio VERSION "0.19.1" LANGUAGES CXX C)
project(libpressio VERSION "0.19.2" LANGUAGES CXX C)

#correct was to set a default build type
# https://blog.kitware.com/cmake-and-the-default-build-type/
Expand Down Expand Up @@ -211,5 +211,25 @@ if(BUILD_DOCS)
${PROJECT_SOURCE_DIR}/include
COMMENT "Generate Documenation"
)

option(BUILD_DOCKER_CONTAINERS "build docker containers for testing" OFF)
if(BUILD_DOCKER_CONTAINERS)

foreach(CONTAINER Fedora Ubuntu18.04)
set(BuildSentinel ${CMAKE_BINARY_DIR}/${CONTAINER}-built)
set(Dockerfile docker/Dockerfile-${CONTAINER})
string(TOLOWER "libpressio-${CONTAINER}" CONTAINER_TAG)
add_custom_command(OUTPUT ${BuildSentinel}
COMMAND docker build -t ${CONTAINER_TAG} -f ${Dockerfile} .
COMMAND touch ${BuildSentinel}
MAIN_DEPENDENCY ${Dockerfile}
DEPENDS SZ
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "DOCKER ${Dockerfile}"
)
list(APPEND DOCKER_CONTAINERS ${BuildSentinel})
endforeach()
add_custom_target(docker DEPENDS ${DOCKER_CONTAINERS} COMMENT "building docker containers")
endif()

endif()
2 changes: 1 addition & 1 deletion COPYRIGHT.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Copyright © 2019 , UChicago Argonne, LLC
All Rights Reserved
[libpressio, Version 0.19.1]
[libpressio, Version 0.19.2]
Robert Underwood
Argonne National Laboratory

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ Libpressio additionally optionally requires:
+ `numpy` version `1.14.5` or later and its dependencies to provide the python bindings
+ `Doxygen` version 1.8.15 or later to generate documentation
+ `HDF5` version 1.10.0 or later for HDF5 data support
+ `swig` version 3.0.12 or later for python support

You can also use the provided `Dockerfile` in `./docker` to get a working libpressio install. Doing so requires installing `docker` version 17.05 or higher or other build tool that supports this version of Dockerfile syntax or later.
You can also use the provided `Dockerfile`s in `./docker` to get a working libpressio install. Doing so requires installing `docker` version 17.05 or higher or other build tool that supports this version of Dockerfile syntax or later.


## Configuring LibPressio
Expand Down
File renamed without changes.
64 changes: 64 additions & 0 deletions docker/Dockerfile-Ubuntu18.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
FROM ubuntu:18.04 as builder
#contrary to the Filesystem Hierarchy Standard,
#warning ubuntu does not allow libraries to be installed in /usr/lib, use /usr/local instead
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y doxygen graphviz libhdf5-dev g++ git swig ninja-build libzstd-dev pkg-config \
libfftw3-dev python3-dev python3-numpy wget zlib1g-dev && \
wget -O cmake.sh https://github.com/Kitware/CMake/releases/download/v3.14.6/cmake-3.14.6-Linux-x86_64.sh && \
sh cmake.sh --skip-licence --exclude-subdir --prefix=/usr/local && \
apt clean -y
RUN git clone https://github.com/LLNL/zfp /src/zfp && \
git clone https://github.com/disheng222/sz /src/sz && \
git clone https://github.com/CODARcode/MGARD /src/mgard && \
git clone https://github.com/CODARcode/libpressio /src/libpressio && \
mkdir -p /src/autotuning && \
cd /src/sz && \
mkdir build && \
cd build && \
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -G Ninja && \
cmake --build . && \
ninja install && \
cd /src/zfp && \
mkdir build && \
cd build && \
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_TESTING=OFF -G Ninja && \
cmake --build . && \
ninja install && \
cd /src/mgard && \
mkdir build && \
cd build && \
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_TESTING=OFF -G Ninja && \
cmake --build . && \
ninja install
RUN cd /src/libpressio && \
mkdir build && \
cd build && \
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_TESTS=ON -DLIBPRESSIO_HAS_MGARD=ON -DBUILD_PYTHON_WRAPPER=ON -G Ninja && \
cmake --build . && \
CTEST_OUTPUT_ON_FAILURE=1 ctest . && \
ninja install &&\
echo done



FROM ubuntu:18.04
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y zlib1g libfftw3-dev libhdf5-dev libzstd-dev python3-numpy libstdc++-7-dev libpython3.6 &&\
apt-get clean -y
COPY --from=builder /usr/local/lib/libSZ.so* \
/usr/local/lib/liblibpressio.so* \
/usr/local/lib/libzfp.so* \
/usr/local/lib/libmgard.so* \
/usr/local/lib/
COPY --from=builder /usr/local/include/libpressio \
/usr/local/include/sz \
/usr/local/include/zfp* \
/usr/local/include/mgard* \
/usr/local/include/
COPY --from=builder /usr/local/bin/sz /usr/bin/
COPY --from=builder /usr/lib/python3/dist-packages/*pressio* /usr/lib/python3/dist-packages/
RUN ldconfig


0 comments on commit 138c709

Please sign in to comment.