Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADIOS2 v2.9+ Uses Blosc2 #84

Merged
merged 4 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-linux.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-osx.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 13 additions & 4 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .scripts/run_docker_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 11 additions & 4 deletions .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions .scripts/run_win_build.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion recipe/build-libadios.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ cmake ^
-DBUILD_TESTING=OFF ^
-DADIOS2_USE_MPI=OFF ^
-DADIOS2_BUILD_EXAMPLES=OFF ^
-DADIOS2_USE_Blosc=ON ^
-DADIOS2_Blosc2_PREFER_SHARED=ON ^
-DADIOS2_USE_Blosc2=ON ^
-DADIOS2_USE_BZip2=ON ^
-DADIOS2_USE_Fortran=OFF ^
-DADIOS2_USE_HDF5=ON ^
Expand Down
2 changes: 2 additions & 0 deletions recipe/build-libadios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ cmake \
-B build \
-GNinja \
-DADIOS2_BUILD_EXAMPLES=OFF \
-DADIOS2_Blosc2_PREFER_SHARED=ON \
-DADIOS2_USE_Blosc2=ON \
-DADIOS2_HAVE_ZFP_CUDA=OFF \
-DADIOS2_INSTALL_GENERATE_CONFIG=OFF \
-DADIOS2_RUN_INSTALL_TEST=ON \
Expand Down
5 changes: 3 additions & 2 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set name = "adios2" %}
{% set version = "2.9.2" %}
{% set sha256 = "78309297c82a95ee38ed3224c98b93d330128c753a43893f63bbe969320e4979" %}
{% set build = 0 %}
{% set build = 1 %}

# ensure mpi is defined (needed for conda-smithy recipe-lint)
{% set mpi = mpi or 'nompi' %}
Expand Down Expand Up @@ -32,6 +32,7 @@ source:
sha256: {{ sha256 }}
patches:
- python-exclude-from-all.patch
- rmFindBlosc2.patch

build:
number: {{ build }}
Expand Down Expand Up @@ -89,7 +90,7 @@ outputs:
# TODO: Could NOT find ZeroMQ (missing: ZeroMQ_LIBRARY) on Windows
- zeromq >=4.1 # [not win]
- bzip2
- blosc
- c-blosc2
- libpng
- zfp 0.5 # CMake rejects zfp 1.0.0
- zlib
Expand Down
107 changes: 107 additions & 0 deletions recipe/rmFindBlosc2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
From 0cb1a9104c663928e629e168100e7276923ac82b Mon Sep 17 00:00:00 2001
From: Axel Huebl <[email protected]>
Date: Thu, 9 Nov 2023 16:41:08 -0800
Subject: [PATCH] Remove cmake/FindBlosc2.cmake

---
cmake/FindBlosc2.cmake | 91 ------------------------------------------
1 file changed, 91 deletions(-)
delete mode 100644 cmake/FindBlosc2.cmake

diff --git a/cmake/FindBlosc2.cmake b/cmake/FindBlosc2.cmake
deleted file mode 100644
index 10762297cc..0000000000
--- a/cmake/FindBlosc2.cmake
+++ /dev/null
@@ -1,91 +0,0 @@
-#------------------------------------------------------------------------------#
-# Distributed under the OSI-approved Apache License, Version 2.0. See
-# accompanying file Copyright.txt for details.
-#------------------------------------------------------------------------------#
-#
-# FindBLOSC22
-# -----------
-#
-# Try to find the BLOSC2 library
-#
-# This module defines the following variables:
-#
-# BLOSC2_FOUND - System has BLOSC2
-# BLOSC2_INCLUDE_DIRS - The BLOSC2 include directory
-# BLOSC2_LIBRARIES - Link these to use BLOSC2
-# BLOSC2_VERSION - Version of the BLOSC2 library to support
-#
-# and the following imported targets:
-# Blosc2::Blosc2 - The core BLOSC2 library
-#
-# You can also set the following variable to help guide the search:
-# BLOSC2_ROOT - The install prefix for BLOSC2 containing the
-# include and lib folders
-# Note: this can be set as a CMake variable or an
-# environment variable. If specified as a CMake
-# variable, it will override any setting specified
-# as an environment variable.
-
-if(NOT BLOSC2_FOUND)
- if((NOT BLOSC2_ROOT) AND (DEFINED ENV{BLOSC2_ROOT}))
- set(BLOSC2_ROOT "$ENV{BLOSC2_ROOT}")
- endif()
- if(BLOSC2_ROOT)
- set(BLOSC2_INCLUDE_OPTS HINTS ${BLOSC2_ROOT}/include NO_DEFAULT_PATHS)
- set(BLOSC2_LIBRARY_OPTS
- HINTS ${BLOSC2_ROOT}/lib ${BLOSC2_ROOT}/lib64
- NO_DEFAULT_PATHS
- )
- endif()
- if(WIN32) # uses a Unix-like library prefix on Windows
- set(BLOSC2_LIBRARY_OPTS
- libblosc2 ${BLOSC2_LIBRARY_OPTS}
- )
- endif()
-
- find_path(BLOSC2_INCLUDE_DIR blosc2.h ${BLOSC2_INCLUDE_OPTS})
- find_library(BLOSC2_LIBRARY NAMES blosc2 ${BLOSC2_LIBRARY_OPTS})
- if(BLOSC2_INCLUDE_DIR)
- file(STRINGS ${BLOSC2_INCLUDE_DIR}/blosc2.h _ver_string
- REGEX [=[BLOSC2_VERSION_STRING +"[^"]*"]=]
- )
- if(_ver_string MATCHES [=[BLOSC2_VERSION_STRING +"([0-9]+.[0-9]+.[0-9]+)]=])
- set(BLOSC2_VERSION ${CMAKE_MATCH_1})
- endif()
- endif()
-
- # Blosc2 depends on pthreads
- set(THREADS_PREFER_PTHREAD_FLAG TRUE)
- if(WIN32)
- # try to use the system library
- find_package(Threads)
- if(NOT Threads_FOUND)
- message(STATUS "Blosc2: used the internal pthread library for win32 systems.")
- set(BLOSC2_LIBRARIES)
- else()
- set(BLOSC2_LIBRARIES Threads::Threads)
- endif()
- else()
- find_package(Threads REQUIRED)
- set(BLOSC2_LIBRARIES Threads::Threads)
- endif()
-
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(Blosc2
- FOUND_VAR BLOSC2_FOUND
- VERSION_VAR BLOSC2_VERSION
- REQUIRED_VARS BLOSC2_LIBRARY BLOSC2_INCLUDE_DIR
- )
- if(BLOSC2_FOUND)
- set(BLOSC2_INCLUDE_DIRS ${BLOSC2_INCLUDE_DIR})
- set(BLOSC2_LIBRARIES ${BLOSC2_LIBRARY})
- if(BLOSC2_FOUND AND NOT TARGET Blosc2::Blosc2)
- add_library(Blosc2::Blosc2 UNKNOWN IMPORTED)
- set_target_properties(Blosc2::Blosc2 PROPERTIES
- IMPORTED_LOCATION "${BLOSC2_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${BLOSC2_INCLUDE_DIR}"
- INTERFACE_LINK_LIBRARIES "${BLOSC2_LIBRARIES}"
- )
- endif()
- endif()
-endif()