From 44b7916cf64276fcb8995af41a0c87113e353256 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 16 Jun 2021 12:36:15 -0700 Subject: [PATCH 1/6] Wheels: Blosc Pthread --- library_builders.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/library_builders.sh b/library_builders.sh index 1eb450b577..9d40b7d5b7 100755 --- a/library_builders.sh +++ b/library_builders.sh @@ -92,10 +92,6 @@ function build_adios2 { if [ "$(uname -s)" = "Linux" ] then EVPATH_ZPL="ON" - # ADIOS 2.7.1 & Blosc 1.20.1/1.21.0 - # /usr/local/lib/libblosc.a(blosc.c.o): In function `blosc_init.part.9': - # blosc.c:(.text+0x43e): undefined reference to `pthread_atfork' - export LDFLAGS="-pthread" else # ZPL in EVPATH disabled because it does not build with older macOS # https://github.com/GTkorvo/evpath/issues/47 @@ -137,7 +133,14 @@ function build_blosc { cd build-c-blosc PY_BIN=$(which python) CMAKE_BIN="$(${PY_BIN} -m pip show cmake 2>/dev/null | grep Location | cut -d' ' -f2)/cmake/data/bin/" - PATH=${CMAKE_BIN}:${PATH} cmake -DDEACTIVATE_SNAPPY=ON -DBUILD_SHARED=OFF -DBUILD_TESTS=OFF -DBUILD_BENCHMARKS=OFF -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} ../c-blosc-* + PATH=${CMAKE_BIN}:${PATH} cmake \ + -DDEACTIVATE_SNAPPY=ON \ + -DBUILD_SHARED=OFF \ + -DBUILD_TESTS=OFF \ + -DBUILD_BENCHMARKS=OFF \ + -DTHREADS_PREFER_PTHREAD_FLAG=ON \ + -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} \ + ../c-blosc-* make -j${CPU_COUNT} make install cd - From 5d52fbd9ce9915db311f2bc68d23432648445ec5 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 16 Jun 2021 12:51:20 -0700 Subject: [PATCH 2/6] blosc/ADIOS2: show flags --- library_builders.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library_builders.sh b/library_builders.sh index 9d40b7d5b7..d5d2a42a21 100755 --- a/library_builders.sh +++ b/library_builders.sh @@ -110,6 +110,7 @@ function build_adios2 { -DADIOS2_RUN_INSTALL_TEST=OFF \ -DEVPATH_USE_ZPL_ENET=${EVPATH_ZPL} \ -DHDF5_USE_STATIC_LIBRARIES:BOOL=ON \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_DISABLE_FIND_PACKAGE_LibFFI=TRUE \ -DCMAKE_DISABLE_FIND_PACKAGE_BISON=TRUE \ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} ../ADIOS2-* @@ -139,6 +140,7 @@ function build_blosc { -DBUILD_TESTS=OFF \ -DBUILD_BENCHMARKS=OFF \ -DTHREADS_PREFER_PTHREAD_FLAG=ON \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} \ ../c-blosc-* make -j${CPU_COUNT} From e43141d96fed7a4c45d91e09b943e020fc2ec2a2 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 16 Jun 2021 14:41:17 -0700 Subject: [PATCH 3/6] Unix: Patch Blosc (Pthreads) --- library_builders.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/library_builders.sh b/library_builders.sh index d5d2a42a21..2b8e28c63d 100755 --- a/library_builders.sh +++ b/library_builders.sh @@ -56,6 +56,7 @@ function install_buildessentials { python -m pip install -U pip setuptools wheel python -m pip install -U scikit-build python -m pip install -U cmake + python -m pip install -U "patch==1.*" touch buildessentials-stamp } @@ -130,6 +131,12 @@ function build_blosc { file c-blosc*.tar.gz tar -xzf c-blosc*.tar.gz rm c-blosc*.tar.gz + + # Patch PThread Propagation + curl -sLo blosc-pthread.patch \ + https://patch-diff.githubusercontent.com/raw/Blosc/c-blosc/pull/318.patch + python -m patch -p 1 -d c-blosc-1.21.0 blosc-pthread.patch + mkdir build-c-blosc cd build-c-blosc PY_BIN=$(which python) @@ -139,7 +146,6 @@ function build_blosc { -DBUILD_SHARED=OFF \ -DBUILD_TESTS=OFF \ -DBUILD_BENCHMARKS=OFF \ - -DTHREADS_PREFER_PTHREAD_FLAG=ON \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} \ ../c-blosc-* From 0063880aeb005a7fb67010fd10ee6f14f583de63 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 16 Jun 2021 19:08:53 -0700 Subject: [PATCH 4/6] ADIOS2: Prefer CONFIG mode for Blosc The self-written find-module does not search for pthreads yet. https://github.com/ornladios/ADIOS2/pull/2768 --- library_builders.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/library_builders.sh b/library_builders.sh index 2b8e28c63d..4c6ce62e0d 100755 --- a/library_builders.sh +++ b/library_builders.sh @@ -114,6 +114,7 @@ function build_adios2 { -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_DISABLE_FIND_PACKAGE_LibFFI=TRUE \ -DCMAKE_DISABLE_FIND_PACKAGE_BISON=TRUE \ + -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} ../ADIOS2-* make -j${CPU_COUNT} From 7491ab5cc85ba1572fe8f578a35cecad3745e729 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 16 Jun 2021 19:53:20 -0700 Subject: [PATCH 5/6] ADIOS2: Patch FindBlosc.cmake (Threads) Fix the FindBlosc.cmake logic to search properly for threads. --- library_builders.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library_builders.sh b/library_builders.sh index 4c6ce62e0d..5e8b7c39e9 100755 --- a/library_builders.sh +++ b/library_builders.sh @@ -86,6 +86,12 @@ function build_adios2 { file adios2*.tar.gz tar -xzf adios2*.tar.gz rm adios2*.tar.gz + + # Patch PThread Propagation + curl -sLo adios-pthread.patch \ + https://patch-diff.githubusercontent.com/raw/ornladios/ADIOS2/pull/2768.patch + python -m patch -p 1 -d ADIOS2-2.7.1 adios-pthread.patch + mkdir build-ADIOS2 cd build-ADIOS2 PY_BIN=$(which python) @@ -114,7 +120,6 @@ function build_adios2 { -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_DISABLE_FIND_PACKAGE_LibFFI=TRUE \ -DCMAKE_DISABLE_FIND_PACKAGE_BISON=TRUE \ - -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} ../ADIOS2-* make -j${CPU_COUNT} From 1a71ea366bd5e9176e68f37b0355f2322bb17a37 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 16 Jun 2021 21:18:26 -0700 Subject: [PATCH 6/6] setup.py: bump version to 0.13.4.post1 --- .github/workflows/build.yml | 2 +- .travis.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 10cdbd2ca0..24aed066cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,7 +74,7 @@ jobs: uses: suisei-cn/actions-download-file@v1 id: setupversion with: - url: "https://gist.githubusercontent.com/ax3l/ee247f0705f918f8b4e325075230f015/raw/8357643c15b99d9048505a729c398312ddd8f152/setupversion.patch" + url: "https://gist.githubusercontent.com/ax3l/4db2f1744e0e28e6c013ee4e752b3cb7/raw/324bdb60894d51608a48890573654e10e1b1c3a0/setupversion.patch" target: src/.patch/ - name: Apply Patch diff --git a/.travis.yml b/.travis.yml index 81226a527f..14d8381d9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,7 +81,7 @@ install: before_script: - mkdir -p src/.patch - cd src/.patch - - curl -sOL https://gist.githubusercontent.com/ax3l/ee247f0705f918f8b4e325075230f015/raw/8357643c15b99d9048505a729c398312ddd8f152/setupversion.patch + - curl -sOL https://gist.githubusercontent.com/ax3l/4db2f1744e0e28e6c013ee4e752b3cb7/raw/324bdb60894d51608a48890573654e10e1b1c3a0/setupversion.patch - cd .. - python3 -m patch .patch/setupversion.patch - cd ..