Skip to content

Commit

Permalink
Fix static blosc2 build (#4093)
Browse files Browse the repository at this point in the history
* blosc2: require >=2.10.1
This is needed to simplify our dependency to Blosc2, supporting
prior to 2.10.1 requires us to support to types of blosc2 cmake
dependencies (CONFIG and MODULE) and code this per each version.
* compress: Address blosc2 compress warnings in Windows
* ci: use blosc2 in builds
  • Loading branch information
vicentebolea authored Mar 25, 2024
1 parent aab3bf2 commit 44e4478
Show file tree
Hide file tree
Showing 44 changed files with 79 additions and 147 deletions.
31 changes: 13 additions & 18 deletions cmake/DetectOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -72,31 +72,26 @@ find_package(Threads REQUIRED)

# Blosc2
if(ADIOS2_USE_Blosc2 STREQUAL AUTO)
# Prefect CONFIG mode
find_package(Blosc2 2.4 CONFIG QUIET)
if(NOT Blosc2_FOUND)
find_package(Blosc2 2.4 MODULE QUIET)
endif()
find_package(Blosc2 2.10.1 QUIET)
elseif(ADIOS2_USE_Blosc2)
# Prefect CONFIG mode
find_package(Blosc2 2.4 CONFIG)
if(NOT Blosc2_FOUND)
find_package(Blosc2 2.4 MODULE REQUIRED)
endif()
find_package(Blosc2 2.10.1)
endif()
if(Blosc2_FOUND)
set(ADIOS2_HAVE_Blosc2 TRUE)
if(TARGET Blosc2::blosc2_shared)
set(Blosc2_shlib_available ON)
set(blosc2_shlib_available ON)
endif()

set(adios2_blosc2_tgt Blosc2::Blosc2)
if (Blosc2_VERSION VERSION_GREATER_EQUAL 2.10.1)
if (Blosc2_shlib_available AND ADIOS2_Blosc2_PREFER_SHARED)
set(adios2_blosc2_tgt Blosc2::blosc2_shared)
else()
set(adios2_blosc2_tgt Blosc2::blosc2_static)
endif()
if(TARGET Blosc2::blosc2_static)
set(blosc2_slib_available ON)
endif()

if (blosc2_shlib_available AND (NOT blosc2_slib_available OR ADIOS2_Blosc2_PREFER_SHARED))
set(adios2_blosc2_tgt Blosc2::blosc2_shared)
elseif(blosc2_slib_available)
set(adios2_blosc2_tgt Blosc2::blosc2_static)
else()
message(FATAL_ERROR "Blosc2 cmake package found but no targets exists inside it.")
endif()

add_library(adios2_blosc2 ALIAS ${adios2_blosc2_tgt})
Expand Down
91 changes: 0 additions & 91 deletions cmake/FindBlosc2.cmake

This file was deleted.

5 changes: 5 additions & 0 deletions cmake/adios2-config-common.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ else()
endif()

if(NOT @BUILD_SHARED_LIBS@)
set(ADIOS2_HAVE_Blosc2 @ADIOS2_HAVE_Blosc2@)
if(ADIOS2_HAVE_Blosc2)
find_dependency(Blosc2 2.10.1)
endif()

set(ADIOS2_HAVE_BZip2 @ADIOS2_HAVE_BZip2@)
if(ADIOS2_HAVE_BZip2)
find_dependency(BZip2)
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ascent-xl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ADIOS2_USE_SST:BOOL=ON
ADIOS2_USE_ZeroMQ:STRING=OFF
ADIOS2_USE_ZFP:BOOL=OFF
ADIOS2_USE_SZ:BOOL=OFF
ADIOS2_USE_Blosc:BOOL=OFF
ADIOS2_USE_Blosc2:BOOL=OFF
CMAKE_C_COMPILER_LAUNCHER=ccache
CMAKE_CXX_COMPILER_LAUNCHER=ccache
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-crusher-cray.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ADIOS2_USE_SST:BOOL=ON
ADIOS2_USE_ZeroMQ:STRING=OFF
ADIOS2_USE_ZFP:BOOL=OFF
ADIOS2_USE_SZ:BOOL=OFF
ADIOS2_USE_Blosc:BOOL=OFF
ADIOS2_USE_Blosc2:BOOL=OFF
CMAKE_C_COMPILER_LAUNCHER=ccache
CMAKE_CXX_COMPILER_LAUNCHER=ccache
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/cmake/ci-el7-spack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
Expand All @@ -22,7 +22,7 @@ ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
ADIOS2_USE_ZeroMQ:STRING=ON
ADIOS2_USE_ZFP:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_DataSpaces:BOOL=OFF
ADIOS2_USE_EXTERNAL_DEPENDENCIES:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-el8-icc-mpich.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=OFF
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_DataSpaces:BOOL=OFF
ADIOS2_USE_Fortran:BOOL=OFF
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-el8-icc-ompi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_DataSpaces:BOOL=OFF
ADIOS2_USE_Fortran:BOOL=OFF
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-el8-icc-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=OFF
ADIOS2_USE_Blosc2:BOOL=OFF
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_DataSpaces:BOOL=OFF
ADIOS2_USE_Fortran:BOOL=OFF
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-el8-oneapi-mpich.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=OFF
ADIOS2_USE_Blosc2:BOOL=OFF
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_DataSpaces:BOOL=OFF
ADIOS2_USE_Fortran:BOOL=OFF
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-el8-oneapi-ompi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=OFF
ADIOS2_USE_Blosc2:BOOL=OFF
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_DataSpaces:BOOL=OFF
ADIOS2_USE_Fortran:BOOL=OFF
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-el8-oneapi-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=OFF
ADIOS2_USE_Blosc2:BOOL=OFF
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_DataSpaces:BOOL=OFF
ADIOS2_USE_Fortran:BOOL=OFF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ADIOS2_BUILD_EXAMPLES:BOOL=OFF
ADIOS2_USE_AWSSDK:STRING=OFF
ADIOS2_USE_Blosc2:STRING=OFF
ADIOS2_USE_Blosc:BOOL=OFF
ADIOS2_USE_Blosc2:BOOL=OFF
ADIOS2_USE_BZip2:BOOL=OFF
ADIOS2_USE_Catalyst:STRING=OFF
ADIOS2_USE_CUDA:STRING=OFF
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-clang10-mpich.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(dashboard_cache "
BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-clang10-ompi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(dashboard_cache "
BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-clang10-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(dashboard_cache "
BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-clang6-mpich.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(dashboard_cache "
BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-clang6-ompi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(dashboard_cache "
BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-clang6-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(dashboard_cache "
BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-clang6-static-ompi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BUILD_TESTING:BOOL=OFF
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-gcc10-mpich.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-gcc10-ompi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-gcc10-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-gcc11-mpich.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-gcc11-ompi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-gcc11-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-gcc8-mpich.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-gcc8-ompi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-gcc8-serial-codeql.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BUILD_TESTING:BOOL=ON
ADIOS2_BUILD_EXAMPLES:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_Blosc2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
Expand Down
Loading

0 comments on commit 44e4478

Please sign in to comment.