From 80e56eebd3e7bc6f7b9486f3a7c75dca5ad766fd Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Sat, 17 Jul 2021 23:57:52 +0300 Subject: [PATCH 01/12] hwloc: add libpciaccess-devel make dependency --- .../patches/00-get-area-memlocation.patch | 18 ++++++++++++++++++ srcpkgs/hwloc/template | 8 +++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/hwloc/patches/00-get-area-memlocation.patch diff --git a/srcpkgs/hwloc/patches/00-get-area-memlocation.patch b/srcpkgs/hwloc/patches/00-get-area-memlocation.patch new file mode 100644 index 000000000000..e398a80e046d --- /dev/null +++ b/srcpkgs/hwloc/patches/00-get-area-memlocation.patch @@ -0,0 +1,18 @@ +diff --git a/tests/hwloc/hwloc_get_area_memlocation.c b/tests/hwloc/hwloc_get_area_memlocation.c +index 498dfae..999d95b 100644 +--- a/tests/hwloc/hwloc_get_area_memlocation.c ++++ b/tests/hwloc/hwloc_get_area_memlocation.c +@@ -34,11 +34,13 @@ int main(void) + assert(buffer); + printf("buffer %p length %d\n", buffer, LEN); + ++ fprintf(stderr, "Before memloation\nerr == %i, errno == %s\n", err, strerror(errno)); + err = hwloc_get_area_memlocation(topology, buffer, LEN, set, HWLOC_MEMBIND_BYNODESET); + if (err < 0 && errno == ENOSYS) { + fprintf(stderr, "hwloc_get_area_memlocation() failed with ENOSYS, aborting\n"); + goto out_with_buffer; + } ++ fprintf(stderr, "After memlocation\nerr == %i, errno == %s\n", err, strerror(errno)); + assert(!err); + hwloc_bitmap_asprintf(&s, set); + printf("address %p length %d allocated in nodeset %s\n", buffer, LEN, s); diff --git a/srcpkgs/hwloc/template b/srcpkgs/hwloc/template index 818db269cebb..6eec662d0d6e 100644 --- a/srcpkgs/hwloc/template +++ b/srcpkgs/hwloc/template @@ -1,10 +1,12 @@ # Template file for 'hwloc' pkgname=hwloc version=2.5.0 -revision=1 +revision=2 build_style=gnu-configure hostmakedepends="pkg-config" -makedepends="cairo-devel ncurses-devel libxml2-devel eudev-libudev-devel" +makedepends="cairo-devel ncurses-devel libxml2-devel libpciaccess-devel eudev-libudev-devel" +checkdepends="tar" +make_check_args="VERBOSE=1" short_desc="Portable abstraction of hierarchical hardware architectures" maintainer="Leah Neukirchen " license="BSD-3-Clause" @@ -31,7 +33,7 @@ libhwloc_package() { libhwloc-devel_package() { short_desc+=" - development files" - depends="libhwloc>=${version}_${revision}" + depends="${makedepends} libhwloc>=${version}_${revision}" pkg_install() { vmove usr/include vmove usr/share/man/man3 From 14ad1bfa40be1eda08bfe91cc01002ad33830459 Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Mon, 5 Jul 2021 02:50:26 +0300 Subject: [PATCH 02/12] tbb: update to 2021.3.0. --- common/shlibs | 6 +- srcpkgs/tbb/patches/00-hwloc-2.5.patch | 367 +++++++++++++++++++ srcpkgs/tbb/patches/01-hwloc-pkgconfig.patch | 52 +++ srcpkgs/tbb/patches/hostname-usage.patch | 11 - srcpkgs/tbb/patches/musl.patch | 4 +- srcpkgs/tbb/template | 63 +--- 6 files changed, 433 insertions(+), 70 deletions(-) create mode 100644 srcpkgs/tbb/patches/00-hwloc-2.5.patch create mode 100644 srcpkgs/tbb/patches/01-hwloc-pkgconfig.patch delete mode 100644 srcpkgs/tbb/patches/hostname-usage.patch diff --git a/common/shlibs b/common/shlibs index a7afbf2a56f7..6b7ca5fbc249 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2376,12 +2376,10 @@ libanthy-unicode.so.0 libanthy-unicode-1.0.0.20201109_1 libanthydic-unicode.so.0 libanthy-unicode-1.0.0.20201109_1 libanthyinput-unicode.so.0 libanthy-unicode-1.0.0.20201109_1 libanthygobject-1.0.so.5 ibus-anthy-1.5.6_1 -libtbbmalloc_proxy_debug.so.2 tbb-4.3_1 libtbbmalloc_proxy.so.2 tbb-4.3_1 libtbbmalloc.so.2 tbb-4.3_1 -libtbb_debug.so.2 tbb-4.3_1 -libtbb.so.2 tbb-4.3_1 -libtbbmalloc_debug.so.2 tbb-4.3_1 +libtbb.so.12 tbb-2021.3.0_1 +libtbbbind_2_5.so.3 tbb-2021.3.0_1 libembree.so.2 embree-2.5.1_1 libgtkimageview.so.0 gtkimageview-1.6.4_1 libgoocanvas-2.0.so.9 goocanvas-2.0.4_1 diff --git a/srcpkgs/tbb/patches/00-hwloc-2.5.patch b/srcpkgs/tbb/patches/00-hwloc-2.5.patch new file mode 100644 index 000000000000..9c4c9285c71d --- /dev/null +++ b/srcpkgs/tbb/patches/00-hwloc-2.5.patch @@ -0,0 +1,367 @@ +Adjusted by Artur Sinila + +From e96dbf4b48e689ab810b0428d0858a6abc2c83bd Mon Sep 17 00:00:00 2001 +From: Ivan Kochin +Date: Thu, 1 Jul 2021 15:07:39 +0300 +Subject: [PATCH] Upgrade from HWLOC 2.4 to HWLOC 2.5 (#448) + +* Upgrade from HWLOC 2.4 to HWLOC 2.5 +* Introduce tbbbind_2_5 library +* Remove tbbbind_2_4 library +* Use the HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING topology flag (introduces as a part of HWLOC 2.5) to restrict topology discovering to process binding +* Fix testing on Linux +* Apply review comments +* Improve wording: variable -> substring +* Use right tbbbind version for incompatible hwlocs test +* Rework option semantic +* Update README.md for CMake +* Rework readme +* Update cmake/README.md + +Signed-off-by: Kochin, Ivan + +Co-authored-by: Aleksei Fedotov +--- + CMakeLists.txt | 3 ++- + cmake/README.md | 11 +++++--- + cmake/hwloc_detection.cmake | 9 ++++--- + src/tbb/governor.cpp | 4 +-- + src/tbbbind/CMakeLists.txt | 2 +- + src/tbbbind/tbb_bind.cpp | 23 +++++++++++----- + test/CMakeLists.txt | 30 ++++++++++----------- + test/common/common_arena_constraints.h | 37 ++++++++++++++++++++++---- + 8 files changed, 82 insertions(+), 37 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 34a23d400..301899aca 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -100,6 +100,7 @@ option(TBB_NO_APPCONTAINER "Apply /APPCONTAINER:NO (for testing binaries for Win + option(TBB4PY_BUILD "Enable tbb4py build" OFF) + option(TBB_CPF "Enable preview features of the library" OFF) + option(TBB_FIND_PACKAGE "Enable search for external oneTBB using find_package instead of build from sources" OFF) ++option(TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH "Disable HWLOC automatic search by pkg-config tool" OFF) + + if (NOT DEFINED BUILD_SHARED_LIBS) + set(BUILD_SHARED_LIBS ON) +@@ -195,7 +196,7 @@ else() + add_subdirectory(src/tbbmalloc) + add_subdirectory(src/tbbmalloc_proxy) + if (APPLE) +- message(STATUS "TBBBind build target is disabled due to unsupported environment") ++ message(STATUS "TBBBind build targets are disabled due to unsupported environment") + else() + add_subdirectory(src/tbbbind) + endif() +diff --git a/cmake/README.md b/cmake/README.md +index 36fc303f9..b58c2ff6a 100644 +--- a/cmake/README.md ++++ b/cmake/README.md +@@ -13,6 +13,7 @@ TBB4PY_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) P + TBB_CPF:BOOL - Enable preview features of the library (OFF by default) + TBB_INSTALL_VARS:BOOL - Enable auto-generated vars installation(packages generated by `cpack` and `make install` will also include the vars script)(OFF by default) + TBB_VALGRIND_MEMCHECK:BOOL - Enable scan for memory leaks using Valgrind (OFF by default) ++TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH - Disable HWLOC automatic search by pkg-config tool (OFF by default) + ``` + + ## Configure, build and test +@@ -42,9 +43,9 @@ Some useful options: + + #### TBBBind library configuration + +-The TBBbind library has two versions: `tbbbind` and `tbbbind_2_0`. Each of these versions is linked with corresponding HWLOC library version: `tbbbind` links with HWLOC 1.11.x , `tbbbind_2_0` links with HWLOC 2.x. ++The TBBbind library has three versions: `tbbbind`, `tbbbind_2_0` and `tbbbind_2_5`. Each of these versions is linked with corresponding HWLOC library version: `tbbbind` links with HWLOC 1.11.x , `tbbbind_2_0` links with HWLOC 2.1-2.4, `tbbbind_2_5` links with HWLOC 2.5 and later. + +-To enable the TBBBind library build or special tests that performed inside the HWLOC environment, please specify the following CMake variables: ++The search for a suitable version of the HWLOC library is enabled by default, but if you want to use a specific version of the library, you can specify the path to it manually using the following CMake variables: + + - `CMAKE_HWLOC__LIBRARY_PATH` - path to the corresponding HWLOC version shared library on Linux or path to `.lib` file on Windows. + - `CMAKE_HWLOC__INCLUDE_PATH` - path to the corresponding HWLOC version includes directory. +@@ -52,7 +53,11 @@ To enable the TBBBind library build or special tests that performed inside the H + Windows requires one additional variable for correct TBBBind library building: + - `CMAKE_HWLOC__DLL_PATH` - path to the corresponding HWLOC version `.dll` file. + +-`HWLOC_VER` variable used above can be replaced with one of the two values: `1_11` for the `tbbbind` library configuration and `2` for the `tbbbind_2_0` library configuration. ++`HWLOC_VER` substring used above can be replaced with one of the three values: `1_11` for the `tbbbind` library configuration, `2` for the `tbbbind_2_0`, and `2_5` for the `tbbbind_2_5` library configuration. ++ ++If you specify variables for several TBBBind versions, then building process for all of these versions will be performed during single build session. ++ ++Specify the `TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH` to disable HWLOC libraries automatic search. + + ### Build + +diff --git a/cmake/hwloc_detection.cmake b/cmake/hwloc_detection.cmake +index e1eeca5fa..de7f3c047 100644 +--- a/cmake/hwloc_detection.cmake ++++ b/cmake/hwloc_detection.cmake +@@ -12,7 +12,7 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-list(APPEND HWLOC_REQUIRED_VERSIONS 1_11 2 2_4) ++list(APPEND HWLOC_REQUIRED_VERSIONS 1_11 2 2_5) + + foreach(hwloc_version ${HWLOC_REQUIRED_VERSIONS}) + if (NOT WIN32) +@@ -55,10 +56,10 @@ if (NOT HWLOC_TARGET_EXPLICITLY_DEFINED AND + if (HWLOC_FOUND) + if (HWLOC_VERSION VERSION_LESS 2) + set(TBBBIND_LIBRARY_NAME tbbbind) +- elseif(HWLOC_VERSION VERSION_LESS 2.4) ++ elseif(HWLOC_VERSION VERSION_LESS 2.5) + set(TBBBIND_LIBRARY_NAME tbbbind_2_0) + else() +- set(TBBBIND_LIBRARY_NAME tbbbind_2_4) ++ set(TBBBIND_LIBRARY_NAME tbbbind_2_5) + endif() + endif() + endif() +diff --git a/src/tbb/governor.cpp b/src/tbb/governor.cpp +index bf4e402d1..b842e075f 100644 +--- a/src/tbb/governor.cpp ++++ b/src/tbb/governor.cpp +@@ -362,7 +362,7 @@ static const unsigned LinkTableSize = sizeof(TbbBindLinkTable) / sizeof(dynamic_ + + #define TBBBIND_NAME LIBRARY_PREFIX "tbbbind" DEBUG_SUFFIX LIBRARY_EXTENSION + #define TBBBIND_2_0_NAME LIBRARY_PREFIX "tbbbind_2_0" DEBUG_SUFFIX LIBRARY_EXTENSION +-#define TBBBIND_2_4_NAME LIBRARY_PREFIX "tbbbind_2_4" DEBUG_SUFFIX LIBRARY_EXTENSION ++#define TBBBIND_2_5_NAME LIBRARY_PREFIX "tbbbind_2_5" DEBUG_SUFFIX LIBRARY_EXTENSION + #endif /* _WIN32 || _WIN64 || __linux__ */ + + // Representation of system hardware topology information on the TBB side. +@@ -389,7 +389,7 @@ const char* load_tbbbind_shared_object() { + GetNativeSystemInfo(&si); + if (si.dwNumberOfProcessors > 32) return nullptr; + #endif /* _WIN32 && !_WIN64 */ +- for (const auto& tbbbind_version : {TBBBIND_2_4_NAME, TBBBIND_2_0_NAME, TBBBIND_NAME}) { ++ for (const auto& tbbbind_version : {TBBBIND_2_5_NAME, TBBBIND_2_0_NAME, TBBBIND_NAME}) { + if (dynamic_link(tbbbind_version, TbbBindLinkTable, LinkTableSize)) { + return tbbbind_version; + } +diff --git a/src/tbbbind/CMakeLists.txt b/src/tbbbind/CMakeLists.txt +index 029893751..e5cdbf8bb 100644 +--- a/src/tbbbind/CMakeLists.txt ++++ b/src/tbbbind/CMakeLists.txt +@@ -99,7 +99,7 @@ if (NOT DEFINED HWLOC_TARGET_EXPLICITLY_DEFINED AND DEFINED HWLOC_LIBRARIES) + else() + tbbbind_build(tbbbind HWLOC::hwloc_1_11) + tbbbind_build(tbbbind_2_0 HWLOC::hwloc_2 ) +- tbbbind_build(tbbbind_2_4 HWLOC::hwloc_2_4 ) ++ tbbbind_build(tbbbind_2_5 HWLOC::hwloc_2_5 ) + endif() + + +diff --git a/src/tbbbind/tbb_bind.cpp b/src/tbbbind/tbb_bind.cpp +index 97be308c7..88c956acb 100644 +--- a/src/tbbbind/tbb_bind.cpp ++++ b/src/tbbbind/tbb_bind.cpp +@@ -34,7 +34,8 @@ + #pragma GCC diagnostic pop + #endif + +-#define __HWLOC_HYBRID_CPUS_INTERFACES_PRESENT (HWLOC_API_VERSION >= 0x20400) ++#define __TBBBIND_HWLOC_HYBRID_CPUS_INTERFACES_PRESENT (HWLOC_API_VERSION >= 0x20400) ++#define __TBBBIND_HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING_PRESENT (HWLOC_API_VERSION >= 0x20500) + + // Most of hwloc calls returns negative exit code on error. + // This macro tracks error codes that are returned from the hwloc interfaces. +@@ -85,6 +86,16 @@ class platform_topology { + // Parse topology + if ( hwloc_topology_init( &topology ) == 0 ) { + initialization_state = topology_allocated; ++#if __TBBBIND_HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING_PRESENT ++ if ( groups_num == 1 && ++ hwloc_topology_set_flags(topology, ++ HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM | ++ HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING ++ ) != 0 ++ ) { ++ return; ++ } ++#endif + if ( hwloc_topology_load( topology ) == 0 ) { + initialization_state = topology_loaded; + } +@@ -135,7 +146,7 @@ class platform_topology { + numa_indexes_list.resize(numa_nodes_count); + hwloc_obj_t node_buffer; + hwloc_bitmap_foreach_begin(i, process_node_affinity_mask) { +- node_buffer = hwloc_get_obj_by_type(topology, HWLOC_OBJ_NUMANODE, i); ++ node_buffer = hwloc_get_numanode_obj_by_os_index(topology, i); + numa_indexes_list[counter] = static_cast(node_buffer->logical_index); + + if ( numa_indexes_list[counter] > max_numa_index ) { +@@ -150,7 +161,7 @@ class platform_topology { + numa_affinity_masks_list.resize(max_numa_index + 1); + int index = 0; + hwloc_bitmap_foreach_begin(i, process_node_affinity_mask) { +- node_buffer = hwloc_get_obj_by_type(topology, HWLOC_OBJ_NUMANODE, i); ++ node_buffer = hwloc_get_numanode_obj_by_os_index(topology, i); + index = static_cast(node_buffer->logical_index); + + hwloc_cpuset_t& current_mask = numa_affinity_masks_list[index]; +@@ -168,7 +179,7 @@ class platform_topology { + core_types_indexes_list.push_back(-1); + return; + } +-#if __HWLOC_HYBRID_CPUS_INTERFACES_PRESENT ++#if __TBBBIND_HWLOC_HYBRID_CPUS_INTERFACES_PRESENT + __TBB_ASSERT(hwloc_get_api_version() >= 0x20400, "Hybrid CPUs support interfaces required HWLOC >= 2.4"); + // Parsing the hybrid CPU topology + int core_types_number = hwloc_cpukinds_get_nr(topology, 0); +@@ -196,9 +207,9 @@ class platform_topology { + } + } + } +-#else /*!__HWLOC_HYBRID_CPUS_INTERFACES_PRESENT*/ ++#else /*!__TBBBIND_HWLOC_HYBRID_CPUS_INTERFACES_PRESENT*/ + bool core_types_parsing_broken{true}; +-#endif /*__HWLOC_HYBRID_CPUS_INTERFACES_PRESENT*/ ++#endif /*__TBBBIND_HWLOC_HYBRID_CPUS_INTERFACES_PRESENT*/ + + if (core_types_parsing_broken) { + for (auto& core_type_mask : core_types_affinity_masks_list) { +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index bdae9e2b1..c2b9d6dba 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -275,9 +275,9 @@ function(tbb_add_tbbbind_test) + FAIL_REGULAR_EXPRESSION "Status:.*FAILURE" + ) + +- if (TARGET HWLOC::hwloc_2_4 AND NOT HWLOC_2_4_TESTS_STATUS_SHOWN) +- message(STATUS "HWLOC 2.4 dependent tests were enabled.") +- set(HWLOC_2_4_TESTS_STATUS_SHOWN TRUE PARENT_SCOPE) ++ if (TARGET HWLOC::hwloc_2_5 AND NOT HWLOC_2_5_TESTS_STATUS_SHOWN) ++ message(STATUS "HWLOC 2.5 dependent tests were enabled.") ++ set(HWLOC_2_5_TESTS_STATUS_SHOWN TRUE PARENT_SCOPE) + endif() + + if (TARGET HWLOC::hwloc_2 AND NOT HWLOC_2_TESTS_STATUS_SHOWN) +@@ -291,22 +291,22 @@ function(tbb_add_tbbbind_test) + endif() + + list(APPEND HWLOC_TEST_CASES +- hwloc_2_4 ++ hwloc_2_5 + hwloc_2 + hwloc_1_11 +- hwloc_2_4_hwloc_2 +- hwloc_2_4_hwloc_1_11 ++ hwloc_2_5_hwloc_2 ++ hwloc_2_5_hwloc_1_11 + hwloc_2_hwloc_1_11 +- hwloc_2_4_hwloc_2_hwloc_1_11 ++ hwloc_2_5_hwloc_2_hwloc_1_11 + ) + +- list(APPEND HWLOC_TEST_CASE_0_VARS tbbbind_2_4 "hwloc_2_4") ++ list(APPEND HWLOC_TEST_CASE_0_VARS tbbbind_2_5 "hwloc_2_5") + list(APPEND HWLOC_TEST_CASE_1_VARS tbbbind_2 "hwloc_2") + list(APPEND HWLOC_TEST_CASE_2_VARS tbbbind "hwloc_1_11") +- list(APPEND HWLOC_TEST_CASE_3_VARS tbbbind_2_4 "hwloc_2_4,hwloc_2") +- list(APPEND HWLOC_TEST_CASE_4_VARS tbbbind_2_4 "hwloc_2_4,hwloc_1_11") ++ list(APPEND HWLOC_TEST_CASE_3_VARS tbbbind_2_5 "hwloc_2_5,hwloc_2") ++ list(APPEND HWLOC_TEST_CASE_4_VARS tbbbind_2_5 "hwloc_2_5,hwloc_1_11") + list(APPEND HWLOC_TEST_CASE_5_VARS tbbbind_2 "hwloc_2,hwloc_1_11") +- list(APPEND HWLOC_TEST_CASE_6_VARS tbbbind_2_4 "hwloc_2_4,hwloc_2,hwloc_1_11") ++ list(APPEND HWLOC_TEST_CASE_6_VARS tbbbind_2_5 "hwloc_2_5,hwloc_2,hwloc_1_11") + + foreach(TEST_CASE ${HWLOC_TEST_CASES}) + list(FIND HWLOC_TEST_CASES ${TEST_CASE} TEST_CASE_INDEX) +@@ -331,7 +331,7 @@ endfunction() + # Copy libraries to test folder to make it visible during tests execution if external TBB is tested. + # TODO: check and update for multi-config generators. + if (TBB_FOUND) +- list(APPEND _tbb_test_components tbb tbbmalloc tbbmalloc_proxy tbbbind tbbbind_2_0 tbbbind_2_4) ++ list(APPEND _tbb_test_components tbb tbbmalloc tbbmalloc_proxy tbbbind tbbbind_2_0 tbbbind_2_5) + foreach(_component ${_tbb_test_components}) + if (TARGET TBB::${_component}) + get_property(${_component}_lib_file_location TARGET TBB::${_component} PROPERTY LOCATION) +@@ -593,6 +593,6 @@ if (NOT "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "mips") + tbb_add_test(SUBDIR tbbmalloc NAME test_malloc_new_handler DEPENDENCIES TBB::tbbmalloc_proxy) + endif() + +-unset(HWLOC_2_4_TESTS_STATUS_SHOWN) ++unset(HWLOC_2_5_TESTS_STATUS_SHOWN) + unset(HWLOC_2_TESTS_STATUS_SHOWN) + unset(HWLOC_1_11_TESTS_STATUS_SHOWN) +diff --git a/test/common/common_arena_constraints.h b/test/common/common_arena_constraints.h +index 2a0b1ea97..5efc71082 100644 +--- a/test/common/common_arena_constraints.h ++++ b/test/common/common_arena_constraints.h +@@ -38,9 +38,26 @@ + + #if (_WIN32 || _WIN64) && __TBB_HWLOC_VALID_ENVIRONMENT + #include +-int get_processors_groups_count() { return GetActiveProcessorGroupCount(); } ++int get_processors_group_count() { ++ SYSTEM_INFO si; ++ GetNativeSystemInfo(&si); ++ DWORD_PTR pam, sam, m = 1; ++ GetProcessAffinityMask( GetCurrentProcess(), &pam, &sam ); ++ int nproc = 0; ++ for ( std::size_t i = 0; i < sizeof(DWORD_PTR) * CHAR_BIT; ++i, m <<= 1 ) { ++ if ( pam & m ) ++ ++nproc; ++ } ++ // Setting up processor groups in case the process does not restrict affinity mask and more than one processor group is present ++ if ( nproc == (int)si.dwNumberOfProcessors ) { ++ // The process does not have restricting affinity mask and multiple processor groups are possible ++ return (int)GetActiveProcessorGroupCount(); ++ } else { ++ return 1; ++ } ++} + #else +-int get_processors_groups_count() { return 1; } ++int get_processors_group_count() { return 1; } + #endif + + //TODO: Write a test that checks for memory leaks during dynamic link/unlink of TBBbind. +@@ -69,6 +86,7 @@ int get_processors_groups_count() { return 1; } + #endif + + #define __HWLOC_HYBRID_CPUS_INTERFACES_PRESENT (HWLOC_API_VERSION >= 0x20400) ++#define __HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING_PRESENT (HWLOC_API_VERSION >= 0x20500) + // At this moment the hybrid CPUs HWLOC interfaces returns unexpected results on some Windows machines + // in the 32-bit arch mode. + #define __HWLOC_HYBRID_CPUS_INTERFACES_VALID (!_WIN32 || _WIN64) +@@ -153,9 +171,18 @@ class system_info { + + system_info() { + hwloc_require_ex(hwloc_topology_init, &topology); ++#if __HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING_PRESENT ++ if ( get_processors_group_count() == 1 ) { ++ REQUIRE( ++ hwloc_topology_set_flags(topology, ++ HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM | ++ HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING) == 0 ++ ); ++ } ++#endif + hwloc_require_ex(hwloc_topology_load, topology); + +- if ( get_processors_groups_count() > 1 ) { ++ if ( get_processors_group_count() > 1 ) { + process_cpuset = hwloc_bitmap_dup(hwloc_topology_get_complete_cpuset(topology)); + } else { + process_cpuset = hwloc_bitmap_alloc(); +@@ -434,7 +461,7 @@ system_info::affinity_mask get_arena_affinity(tbb::task_arena& ta) { + barrier.wait(); + tbb::spin_mutex::scoped_lock lock(affinity_mutex); + system_info::affinity_mask thread_affinity = system_info::allocate_current_affinity_mask(); +- if (get_processors_groups_count() == 1) { ++ if (get_processors_group_count() == 1) { + REQUIRE_MESSAGE(hwloc_bitmap_isequal(thread_affinity, arena_affinity), + "Threads have different masks on machine without several processors groups."); + } +@@ -532,7 +559,7 @@ constraints_container generate_constraints_variety() { + } + + // Some constraints may cause unexpected behavior, which would be fixed later. +- if (get_processors_groups_count() > 1) { ++ if (get_processors_group_count() > 1) { + for(auto it = results.begin(); it != results.end(); ++it) { + if (it->max_threads_per_core != tbb::task_arena::automatic + && (it->numa_id == tbb::task_arena::automatic || tbb::info::numa_nodes().size() == 1) diff --git a/srcpkgs/tbb/patches/01-hwloc-pkgconfig.patch b/srcpkgs/tbb/patches/01-hwloc-pkgconfig.patch new file mode 100644 index 000000000000..279ebc4397cd --- /dev/null +++ b/srcpkgs/tbb/patches/01-hwloc-pkgconfig.patch @@ -0,0 +1,52 @@ +Based on https://github.com/oneapi-src/oneTBB/pull/498 +Tweaked a bit to work on `v2021.3.0` + +diff --git a/src/tbbbind/CMakeLists.txt b/src/tbbbind/CMakeLists.txt +index e5cdbf8bb..a4033210a 100644 +--- a/src/tbbbind/CMakeLists.txt ++++ b/src/tbbbind/CMakeLists.txt +@@ -37,6 +37,10 @@ function(tbbbind_build TBBBIND_NAME REQUIRED_HWLOC_TARGET) + $ + ${HWLOC_INCLUDE_DIRS} # pkg-config defined + ) ++ target_link_directories(${TBBBIND_NAME} ++ PRIVATE ++ ${HWLOC_LIBRARY_DIRS} # pkg-config defined ++ ) + + target_compile_options(${TBBBIND_NAME} + PRIVATE +@@ -69,7 +69,6 @@ function(tbbbind_build TBBBIND_NAME REQUIRED_HWLOC_TARGET) + PRIVATE + ${TBB_LIB_LINK_FLAGS} + ${TBB_COMMON_LINK_FLAGS} +- ${HWLOC_LIBRARY_DIRS} # pkg-config defined + ) + else() + target_link_libraries(${TBBBIND_NAME} +@@ -76,7 +76,6 @@ function(tbbbind_build TBBBIND_NAME REQUIRED_HWLOC_TARGET) + PRIVATE + ${TBB_LIB_LINK_FLAGS} + ${TBB_COMMON_LINK_FLAGS} +- ${HWLOC_LIBRARY_DIRS} # pkg-config defined + ) + endif() + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index b768759d5..3eb8357e6 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -258,7 +258,12 @@ function(tbb_add_tbbbind_test) + ) + set_property( + TARGET ${_tbbbind_test_NAME} +- PROPERTY LINK_LIBRARIES ${HWLOC_LIBRARY_DIRS} ${HWLOC_LIBRARIES} ++ PROPERTY LINK_LIBRARIES ${HWLOC_LIBRARIES} ++ APPEND ++ ) ++ set_property( ++ TARGET ${_tbbbind_test_NAME} ++ PROPERTY LINK_DIRECTORIES ${HWLOC_LIBRARY_DIRS} + APPEND + ) + set_property( diff --git a/srcpkgs/tbb/patches/hostname-usage.patch b/srcpkgs/tbb/patches/hostname-usage.patch deleted file mode 100644 index 4aefeff192b5..000000000000 --- a/srcpkgs/tbb/patches/hostname-usage.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/build/version_info_linux.sh -+++ b/build/version_info_linux.sh -@@ -20,7 +20,7 @@ - - # Script used to generate version info string - echo "#define __TBB_VERSION_STRINGS(N) \\" --echo '#N": BUILD_HOST'"\t\t"`hostname -s`" ("`uname -m`")"'" ENDL \' -+echo '#N": BUILD_HOST'"\t\t"`hostname`" ("`uname -m`")"'" ENDL \' - # find OS name in *-release and issue* files by filtering blank lines and lsb-release content out - echo '#N": BUILD_OS'"\t\t"`lsb_release -sd 2>/dev/null | grep -ih '[a-z] ' - /etc/*release /etc/issue 2>/dev/null | head -1 | sed -e 's/["\\\\]//g'`'" ENDL \' - echo '#N": BUILD_KERNEL'"\t"`uname -srv`'" ENDL \' diff --git a/srcpkgs/tbb/patches/musl.patch b/srcpkgs/tbb/patches/musl.patch index a8867eb53793..ec89c6a95fc6 100644 --- a/srcpkgs/tbb/patches/musl.patch +++ b/srcpkgs/tbb/patches/musl.patch @@ -1,5 +1,5 @@ ---- a/src/tbbmalloc/proxy.cpp 2018-10-17 14:05:31.311723013 +0200 -+++ b/src/tbbmalloc/proxy.cpp 2018-10-17 14:06:32.972726194 +0200 +--- a/src/tbbmalloc_proxy/proxy.cpp 2018-10-17 14:05:31.311723013 +0200 ++++ b/src/tbbmalloc_proxy/proxy.cpp 2018-10-17 14:06:32.972726194 +0200 @@ -28,6 +28,7 @@ // of aligned_alloc as required by new C++ standard, this makes it hard to // redefine aligned_alloc here. However, running on systems with new libc diff --git a/srcpkgs/tbb/template b/srcpkgs/tbb/template index aeef6ebdd061..47655829f744 100644 --- a/srcpkgs/tbb/template +++ b/srcpkgs/tbb/template @@ -1,76 +1,33 @@ # Template file for 'tbb' pkgname=tbb -version=2020.U3 +version=2021.3.0 revision=1 -# version rewrite: 2017_U7 (upstream) => 2017.7 (xbps) -_ver=${version/./_} -wrksrc="oneTBB-${_ver}" -build_style=gnu-makefile -hostmakedepends="cmake" +wrksrc="oneTBB-${version}" +build_style=cmake +makedepends="libhwloc-devel libgomp-devel" short_desc="Intel Threading Building Blocks" maintainer="Andrea Brancaleoni " license="Apache-2.0" homepage="https://www.threadingbuildingblocks.org" -distfiles="https://github.com/oneapi-src/oneTBB/archive/${_ver}.tar.gz" -checksum=2103cc6238c935664f87680618f6684d57501d4a2fa8ea8f6c97ad6ff7dc722a - -case "$XBPS_TARGET_MACHINE" in - x86_64*) - make_build_args="arch=intel64" - ;; - i686*) - make_build_args="arch=ia32" - ;; - armv7l*) - make_build_args="arch=armv7" - ;; - aarch64*) - make_build_args="arch=arm64" - ;; - ppc64*) - make_build_args="arch=ppc64" - ;; - ppc*) - make_build_args="arch=ppc32" - ;; - *) - # make sure to fall back instead of letting host uname control it - make_build_args="arch=generic" - ;; -esac - -post_extract() { - sed -i 's|CPLUS = g..|CPLUS = $(CXX)|g' build/linux.gcc.inc - sed -i 's|CONLY = gcc|CONLY = $(CC)|g' build/linux.gcc.inc +distfiles="https://github.com/oneapi-src/oneTBB/archive/v${version}.tar.gz" +checksum=8f616561603695bbb83871875d2c6051ea28f8187dbe59299961369904d1d49e +pre_patch() { # alternative might be: # https://git.alpinelinux.org/cgit/aports/tree/testing/libtbb/glibc-struct-mallinfo.patch if [ "$XBPS_TARGET_LIBC" = "musl" ]; then vsed -e "s@#define MALLOC_UNIXLIKE_OVERLOAD_ENABLED __linux__@@" \ - -i src/tbbmalloc/proxy.h + -i src/tbbmalloc_proxy/proxy.h fi } -do_install() { - vmkdir usr/lib - vcopy build/linux_*/*.so* usr/lib - vmkdir usr/include/tbb - vcopy include/tbb/* usr/include/tbb - - cmake \ - -DINSTALL_DIR=$DESTDIR/usr/lib/cmake/TBB \ - -DSYSTEM_NAME=Linux \ - -DLIB_REL_PATH=../.. \ - -DINC_REL_PATH=../../../include \ - -P cmake/tbb_config_installer.cmake -} - tbb-devel_package() { depends="${sourcepkg}>=${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/include - vmove "usr/lib/*.so" vmove usr/lib/cmake + vmove usr/lib/pkgconfig + vmove usr/lib/*.so } } From 58ac9ae5d54bd2e3523233976b54cefef4e7f6b7 Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Sun, 18 Jul 2021 18:29:38 +0300 Subject: [PATCH 03/12] OpenSubdiv: update to 3.4.4. --- srcpkgs/OpenSubdiv/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/OpenSubdiv/template b/srcpkgs/OpenSubdiv/template index b7a5e16efbcf..dfbf29cc1a52 100644 --- a/srcpkgs/OpenSubdiv/template +++ b/srcpkgs/OpenSubdiv/template @@ -1,6 +1,6 @@ # Template file for 'OpenSubdiv' pkgname=OpenSubdiv -version=3.4.3 +version=3.4.4 revision=1 wrksrc="OpenSubdiv-${version//./_}" build_style=cmake @@ -13,7 +13,7 @@ maintainer="John " license="Apache-2.0" homepage="http://graphics.pixar.com/opensubdiv/docs/intro.html" distfiles="https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${version//./_}.tar.gz" -checksum=7b22eb27d636ab0c1e03722c7a5a5bd4f11664ee65c9b48f341a6d0ce7f36745 +checksum=20d49f80a2b778ad4d01f091ad88d8c2f91cf6c7363940c6213241ce6f1048fb if [ "$CROSS_BUILD" ]; then hostmakedepends+=" OpenSubdiv" From 0cce9a9c569c8ead61a5c61995fa4b3c87fe6100 Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Sun, 18 Jul 2021 18:29:38 +0300 Subject: [PATCH 04/12] PrusaSlicer: update to 2.3.3. --- srcpkgs/PrusaSlicer/patches/cross.patch | 11 ----------- srcpkgs/PrusaSlicer/template | 4 ++-- 2 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 srcpkgs/PrusaSlicer/patches/cross.patch diff --git a/srcpkgs/PrusaSlicer/patches/cross.patch b/srcpkgs/PrusaSlicer/patches/cross.patch deleted file mode 100644 index d64a450d9e9f..000000000000 --- a/srcpkgs/PrusaSlicer/patches/cross.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/avrdude/CMakeLists.txt 2020-06-04 09:19:26.017251215 +0200 -+++ b/src/avrdude/CMakeLists.txt 2020-06-04 09:19:36.468250771 +0200 -@@ -83,7 +83,7 @@ add_executable(avrdude-conf-gen conf-gen - add_custom_command( - DEPENDS avrdude-conf-gen ${CMAKE_CURRENT_SOURCE_DIR}/avrdude-slic3r.conf - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/avrdude-slic3r.conf.h -- COMMAND $ avrdude-slic3r.conf avrdude_slic3r_conf ${CMAKE_CURRENT_BINARY_DIR}/avrdude-slic3r.conf.h -+ COMMAND avrdude-conf-gen avrdude-slic3r.conf avrdude_slic3r_conf ${CMAKE_CURRENT_BINARY_DIR}/avrdude-slic3r.conf.h - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - ) - diff --git a/srcpkgs/PrusaSlicer/template b/srcpkgs/PrusaSlicer/template index dd0e76cb8017..a93832ac02e4 100644 --- a/srcpkgs/PrusaSlicer/template +++ b/srcpkgs/PrusaSlicer/template @@ -1,6 +1,6 @@ # Template file for 'PrusaSlicer' pkgname=PrusaSlicer -version=2.3.0 +version=2.3.3 revision=1 wrksrc="PrusaSlicer-version_${version}" build_style=cmake @@ -16,7 +16,7 @@ maintainer="Jasper Chan " license="GPL-3.0-or-later" homepage="https://www.prusa3d.com/prusaslicer/" distfiles="https://github.com/prusa3d/Prusaslicer/archive/version_${version}.tar.gz" -checksum=cd3bac5e29b5441fc4690f28cd7b1064e97dc00207bbdc88f7bd7832308d6ca5 +checksum=deda209505f740ac3d6f59cb2a960f4df908269ee09bd30cd4edb9fc472d29ac nocross="https://build.voidlinux.org/builders/armv7l_builder/builds/25230/steps/shell_3/logs/stdio" Slic3rPE_package() { From 6e51deb8106170ac686ebfd2205f6d89524968ad Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Sun, 18 Jul 2021 18:29:39 +0300 Subject: [PATCH 05/12] blender: update to 2.93.1. --- srcpkgs/blender/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/blender/template b/srcpkgs/blender/template index af946c2b7999..8318317c82bf 100644 --- a/srcpkgs/blender/template +++ b/srcpkgs/blender/template @@ -1,6 +1,6 @@ # Template file for 'blender' pkgname=blender -version=2.93.0 +version=2.93.1 revision=1 archs="x86_64* ppc64*" build_style="cmake" From 9c32dd199aad6d41af4197a4cdedcb3d05b136fd Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Sun, 18 Jul 2021 18:29:39 +0300 Subject: [PATCH 06/12] embree: update to 3.13.0. --- srcpkgs/embree/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/embree/template b/srcpkgs/embree/template index 575b9bcb401c..b6f376d30efa 100644 --- a/srcpkgs/embree/template +++ b/srcpkgs/embree/template @@ -1,8 +1,8 @@ # Template file for 'embree' pkgname=embree -version=2.17.7 -revision=2 -archs="x86_64" +version=3.13.0 +revision=1 +archs="x86_64*" build_style=cmake configure_args="-DTBB_ROOT=/usr -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF" hostmakedepends="ispc" From c7ee6b56ca53aee247edf115de88f3181b96c2bd Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Sat, 24 Jul 2021 03:34:43 +0300 Subject: [PATCH 07/12] openimageio: update to 2.2.16.0. --- srcpkgs/openimageio/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/openimageio/template b/srcpkgs/openimageio/template index de8e1cd04409..3bfdd4e0ed1e 100644 --- a/srcpkgs/openimageio/template +++ b/srcpkgs/openimageio/template @@ -1,11 +1,11 @@ # Template file for 'openimageio' pkgname=openimageio -version=2.2.15.1 +version=2.2.16.0 revision=1 wrksrc="oiio-Release-${version}" build_style=cmake configure_args="-DUSE_OPENGL=0 -DUSE_QT=0 -DUSE_PYTHON=0 -DOIIO_BUILD_TESTS=1 - -DSTOP_ON_WARNING=0 -DUSE_STD_REGEX_EXITCODE=0" + -DSTOP_ON_WARNING=0 -DUSE_STD_REGEX_EXITCODE=0 -DCMAKE_CXX_STANDARD=14" hostmakedepends="pkg-config git" makedepends="boost-devel giflib-devel libraw-devel libopenjpeg-devel libwebp-devel libjpeg-turbo-devel tiff-devel libpng-devel libopenexr-devel freetype-devel @@ -17,7 +17,7 @@ license="BSD-3-Clause" homepage="https://sites.google.com/site/openimageio/home" changelog="https://raw.githubusercontent.com/OpenImageIO/oiio/release/CHANGES.md" distfiles="https://github.com/OpenImageIO/oiio/archive/Release-${version}.tar.gz" -checksum=f222c6b51a40aabbc80ddf4055535be9af1ffa907452fa6d1ffa7674854aab17 +checksum=d1a59f32dbba3ba71ad2e62e107034d1c5287bca1b0696474e927d504cd05ef4 # Runs checks even for features we disabled. make_check=no From 749df30055fcbdae12bdad23247bef55f9f9ee14 Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Sun, 18 Jul 2021 18:29:40 +0300 Subject: [PATCH 08/12] openimagedenoise: update to 1.4.1. --- srcpkgs/openimagedenoise/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/openimagedenoise/template b/srcpkgs/openimagedenoise/template index c73913b4e9d7..14055aff1c27 100644 --- a/srcpkgs/openimagedenoise/template +++ b/srcpkgs/openimagedenoise/template @@ -1,6 +1,6 @@ # Template file for 'openimagedenoise' pkgname=openimagedenoise -version=1.4.0 +version=1.4.1 revision=1 archs="x86_64*" wrksrc=oidn-${version} From e30cd818f3f1d503a5efd5ec5bab1dc9c64794a5 Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Sun, 18 Jul 2021 18:29:40 +0300 Subject: [PATCH 09/12] openvdb: update to 8.1.0. --- common/shlibs | 2 +- srcpkgs/openvdb/patches/00-tbb-2021.patch | 1320 +++++++++++++++++++++ srcpkgs/openvdb/template | 16 +- 3 files changed, 1325 insertions(+), 13 deletions(-) create mode 100644 srcpkgs/openvdb/patches/00-tbb-2021.patch diff --git a/common/shlibs b/common/shlibs index 6b7ca5fbc249..2a7acdb253a7 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3883,7 +3883,7 @@ libjanet.so.1.16 janet-1.16.0_1 libOpenImageDenoise.so.1 openimagedenoise-1.3.0_1 libcbang0.so cbang-1.6.0_3 libblosc.so.1 c-blosc-1.17.1_1 -libopenvdb.so.7.0 openvdb-7.0.0_1 +libopenvdb.so.8.1 openvdb-8.1.0_1 libAlembic.so.1.7 alembic-1.7.13_1 libmodsecurity.so.3 modsecurity-3.0.4_1 libraven.so.0 budgie-desktop-10.5.1_1 diff --git a/srcpkgs/openvdb/patches/00-tbb-2021.patch b/srcpkgs/openvdb/patches/00-tbb-2021.patch new file mode 100644 index 000000000000..271104af3df9 --- /dev/null +++ b/srcpkgs/openvdb/patches/00-tbb-2021.patch @@ -0,0 +1,1320 @@ +https://github.com/AcademySoftwareFoundation/openvdb/pull/1027 +Should be dropped after 8.1.1 release. + +diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake +index d41436b1c..06de2b3f3 100644 +--- a/cmake/FindTBB.cmake ++++ b/cmake/FindTBB.cmake +@@ -169,8 +169,22 @@ find_path(Tbb_INCLUDE_DIR tbb/tbb_stddef.h + PATH_SUFFIXES ${CMAKE_INSTALL_INCLUDEDIR} include + ) + +-if(EXISTS "${Tbb_INCLUDE_DIR}/tbb/tbb_stddef.h") +- file(STRINGS "${Tbb_INCLUDE_DIR}/tbb/tbb_stddef.h" ++set(_tbb_version_file "${Tbb_INCLUDE_DIR}/tbb/tbb_stddef.h") ++ ++if(NOT EXISTS ${_tbb_version_file}) ++ # From TBB 2021, tbb_stddef is removed and the directory include/tbb is ++ # simply an alias for include/oneapi/tbb. Try and find the version header ++ # in oneapi/tbb ++ find_path(Tbb_INCLUDE_DIR oneapi/tbb/version.h ++ ${_FIND_TBB_ADDITIONAL_OPTIONS} ++ PATHS ${_TBB_INCLUDE_SEARCH_DIRS} ++ PATH_SUFFIXES ${CMAKE_INSTALL_INCLUDEDIR} include ++ ) ++ set(_tbb_version_file "${Tbb_INCLUDE_DIR}/oneapi/tbb/version.h") ++endif() ++ ++if(EXISTS ${_tbb_version_file}) ++ file(STRINGS ${_tbb_version_file} + _tbb_version_major_string REGEX "#define TBB_VERSION_MAJOR " + ) + string(REGEX REPLACE "#define TBB_VERSION_MAJOR" "" +@@ -178,7 +192,7 @@ if(EXISTS "${Tbb_INCLUDE_DIR}/tbb/tbb_stddef.h") + ) + string(STRIP "${_tbb_version_major_string}" Tbb_VERSION_MAJOR) + +- file(STRINGS "${Tbb_INCLUDE_DIR}/tbb/tbb_stddef.h" ++ file(STRINGS ${_tbb_version_file} + _tbb_version_minor_string REGEX "#define TBB_VERSION_MINOR " + ) + string(REGEX REPLACE "#define TBB_VERSION_MINOR" "" +@@ -192,6 +206,8 @@ if(EXISTS "${Tbb_INCLUDE_DIR}/tbb/tbb_stddef.h") + set(Tbb_VERSION ${Tbb_VERSION_MAJOR}.${Tbb_VERSION_MINOR}) + endif() + ++unset(_tbb_version_file) ++ + # ------------------------------------------------------------------------ + # Search for TBB lib DIR + # ------------------------------------------------------------------------ +diff --git a/openvdb/openvdb/CMakeLists.txt b/openvdb/openvdb/CMakeLists.txt +index 88543df3a..929fe94d1 100644 +--- a/openvdb/openvdb/CMakeLists.txt ++++ b/openvdb/openvdb/CMakeLists.txt +@@ -437,6 +437,10 @@ set(OPENVDB_LIBRARY_UTIL_INCLUDE_FILES + util/Util.h + ) + ++set(OPENVDB_LIBRARY_THREAD_INCLUDE_FILES ++ thread/Threading.h ++) ++ + # @todo CMake >= 3.12, use an object library to consolidate shared/static + # builds. There are limitations with earlier versions of CMake when used with + # imported targets. +@@ -592,3 +596,4 @@ install(FILES ${OPENVDB_LIBRARY_POINTS_INCLUDE_FILES} DESTINATION ${OPENVDB_INST + install(FILES ${OPENVDB_LIBRARY_TOOLS_INCLUDE_FILES} DESTINATION ${OPENVDB_INSTALL_INCLUDEDIR}/tools) + install(FILES ${OPENVDB_LIBRARY_TREE_INCLUDE_FILES} DESTINATION ${OPENVDB_INSTALL_INCLUDEDIR}/tree) + install(FILES ${OPENVDB_LIBRARY_UTIL_INCLUDE_FILES} DESTINATION ${OPENVDB_INSTALL_INCLUDEDIR}/util) ++install(FILES ${OPENVDB_LIBRARY_THREAD_INCLUDE_FILES} DESTINATION ${OPENVDB_INSTALL_INCLUDEDIR}/thread) +diff --git a/openvdb/openvdb/cmd/openvdb_render.cc b/openvdb/openvdb/cmd/openvdb_render.cc +index ee5b737c5..2c9831ba3 100644 +--- a/openvdb/openvdb/cmd/openvdb_render.cc ++++ b/openvdb/openvdb/cmd/openvdb_render.cc +@@ -19,7 +19,14 @@ + #include + #include + #include +-#include ++ ++// tbb/task_scheduler_init.h was removed in TBB 2021. The best construct to swap ++// to is tbb/global_control (for executables). global_control was only officially ++// added in TBB 2019U4 but exists in 2018 as a preview feature. To avoid more ++// compile time branching (as we still support 2018), we use it in 2018 too by ++// enabling the below define. ++#define TBB_PREVIEW_GLOBAL_CONTROL 1 ++#include + #include + + #include +@@ -606,8 +613,12 @@ main(int argc, char *argv[]) + } + + try { +- tbb::task_scheduler_init schedulerInit( +- (opts.threads == 0) ? tbb::task_scheduler_init::automatic : opts.threads); ++ std::unique_ptr control; ++ if (opts.threads > 0) { ++ // note, opts.threads == 0 means use all threads (default), so don't ++ // manually create a tbb::global_control in this case ++ control.reset(new tbb::global_control(tbb::global_control::max_allowed_parallelism, opts.threads)); ++ } + + openvdb::initialize(); + +diff --git a/openvdb/openvdb/io/Queue.cc b/openvdb/openvdb/io/Queue.cc +index ef5d2961a..20ff1a0c1 100644 +--- a/openvdb/openvdb/io/Queue.cc ++++ b/openvdb/openvdb/io/Queue.cc +@@ -5,20 +5,22 @@ + /// @author Peter Cucka + + #include "Queue.h" +- + #include "File.h" + #include "Stream.h" +-#include +-#include ++#include "openvdb/Exceptions.h" ++#include "openvdb/util/logging.h" ++ + #include +-#include +-#include // for tbb::this_tbb_thread::sleep() +-#include ++#include ++ ++#include + #include // for std::max() + #include + #include + #include + #include ++#include ++ + + namespace openvdb { + OPENVDB_USE_VERSION_NAMESPACE +@@ -28,18 +30,19 @@ namespace io { + namespace { + + // Abstract base class for queuable TBB tasks that adds a task completion callback +-class Task: public tbb::task ++class Task + { + public: + Task(Queue::Id id): mId(id) {} +- ~Task() override {} ++ virtual ~Task() {} + + Queue::Id id() const { return mId; } + + void setNotifier(Queue::Notifier& notifier) { mNotify = notifier; } ++ virtual void execute() const = 0; + + protected: +- void notify(Queue::Status status) { if (mNotify) mNotify(this->id(), status); } ++ void notify(Queue::Status status) const { if (mNotify) mNotify(this->id(), status); } + + private: + Queue::Id mId; +@@ -48,7 +51,7 @@ class Task: public tbb::task + + + // Queuable TBB task that writes one or more grids to a .vdb file or an output stream +-class OutputTask: public Task ++class OutputTask : public Task + { + public: + OutputTask(Queue::Id id, const GridCPtrVec& grids, const Archive& archive, +@@ -56,10 +59,10 @@ class OutputTask: public Task + : Task(id) + , mGrids(grids) + , mArchive(archive.copy()) +- , mMetadata(metadata) +- {} ++ , mMetadata(metadata) {} ++ ~OutputTask() override {} + +- tbb::task* execute() override ++ void execute() const override + { + Queue::Status status = Queue::FAILED; + try { +@@ -69,10 +72,8 @@ class OutputTask: public Task + if (const char* msg = e.what()) { + OPENVDB_LOG_ERROR(msg); + } +- } catch (...) { +- } ++ } catch (...) {} + this->notify(status); +- return nullptr; // no successor to this task + } + + private: +@@ -94,7 +95,6 @@ struct Queue::Impl + /// @todo Provide more information than just "succeeded" or "failed"? + using StatusMap = tbb::concurrent_hash_map; + +- + Impl() + : mTimeout(Queue::DEFAULT_TIMEOUT) + , mCapacity(Queue::DEFAULT_CAPACITY) +@@ -159,12 +159,15 @@ struct Queue::Impl + + bool canEnqueue() const { return mNumTasks < Int64(mCapacity); } + +- void enqueue(Task& task) ++ void enqueue(OutputTask& task) + { +- tbb::tick_count start = tbb::tick_count::now(); ++ auto start = std::chrono::steady_clock::now(); + while (!canEnqueue()) { +- tbb::this_tbb_thread::sleep(tbb::tick_count::interval_t(0.5/*sec*/)); +- if ((tbb::tick_count::now() - start).seconds() > double(mTimeout)) { ++ std::this_thread::sleep_for(/*0.5s*/std::chrono::milliseconds(500)); ++ auto duration = std::chrono::duration_cast( ++ std::chrono::steady_clock::now() - start); ++ const double seconds = double(duration.count()) / 1000.0; ++ if (seconds > double(mTimeout)) { + OPENVDB_THROW(RuntimeError, + "unable to queue I/O task; " << mTimeout << "-second time limit expired"); + } +@@ -173,7 +176,10 @@ struct Queue::Impl + std::placeholders::_1, std::placeholders::_2); + task.setNotifier(notify); + this->setStatus(task.id(), Queue::PENDING); +- tbb::task::enqueue(task); ++ ++ // get the global task arena ++ tbb::task_arena arena(tbb::task_arena::attach{}); ++ arena.enqueue([task = std::move(task)] { task.execute(); }); + ++mNumTasks; + } + +@@ -204,7 +210,7 @@ Queue::~Queue() + /// (e.g., by keeping a static registry of queues that also dispatches + /// or blocks notifications)? + while (mImpl->mNumTasks > 0) { +- tbb::this_tbb_thread::sleep(tbb::tick_count::interval_t(0.5/*sec*/)); ++ std::this_thread::sleep_for(/*0.5s*/std::chrono::milliseconds(500)); + } + } + +@@ -290,16 +296,8 @@ Queue::Id + Queue::writeGridVec(const GridCPtrVec& grids, const Archive& archive, const MetaMap& metadata) + { + const Queue::Id taskId = mImpl->mNextId++; +- // From the "GUI Thread" chapter in the TBB Design Patterns guide +- OutputTask* task = +- new(tbb::task::allocate_root()) OutputTask(taskId, grids, archive, metadata); +- try { +- mImpl->enqueue(*task); +- } catch (openvdb::RuntimeError&) { +- // Destroy the task if it could not be enqueued, then rethrow the exception. +- tbb::task::destroy(*task); +- throw; +- } ++ OutputTask task(taskId, grids, archive, metadata); ++ mImpl->enqueue(task); + return taskId; + } + +diff --git a/openvdb/openvdb/math/Coord.h b/openvdb/openvdb/math/Coord.h +index 504b5e9a4..2e9cfed5d 100644 +--- a/openvdb/openvdb/math/Coord.h ++++ b/openvdb/openvdb/math/Coord.h +@@ -13,8 +13,7 @@ + #include "Math.h" + #include "Vec3.h" + +-namespace tbb { class split; } // forward declaration +- ++#include // for tbb::split + + namespace openvdb { + OPENVDB_USE_VERSION_NAMESPACE +diff --git a/openvdb/openvdb/points/PointSample.h b/openvdb/openvdb/points/PointSample.h +index a122cc4fb..27ec3fb29 100644 +--- a/openvdb/openvdb/points/PointSample.h ++++ b/openvdb/openvdb/points/PointSample.h +@@ -10,8 +10,9 @@ + #ifndef OPENVDB_POINTS_POINT_SAMPLE_HAS_BEEN_INCLUDED + #define OPENVDB_POINTS_POINT_SAMPLE_HAS_BEEN_INCLUDED + +-#include +-#include ++#include "openvdb/util/NullInterrupter.h" ++#include "openvdb/thread/Threading.h" ++#include "openvdb/tools/Interpolation.h" + + #include "PointDataGrid.h" + #include "PointAttribute.h" +@@ -19,7 +20,6 @@ + #include + #include + +- + namespace openvdb { + OPENVDB_USE_VERSION_NAMESPACE + namespace OPENVDB_VERSION_NAME { +@@ -299,7 +299,7 @@ class PointDataSampler + using TargetHandleT = AttributeWriteHandle; + + if (util::wasInterrupted(interrupter)) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + return; + } + +diff --git a/openvdb/openvdb/thread/Threading.h b/openvdb/openvdb/thread/Threading.h +new file mode 100644 +index 000000000..0c3b356e3 +--- /dev/null ++++ b/openvdb/openvdb/thread/Threading.h +@@ -0,0 +1,54 @@ ++// Copyright Contributors to the OpenVDB Project ++// SPDX-License-Identifier: MPL-2.0 ++// ++/// @file Threading.h ++ ++#ifndef OPENVDB_THREAD_THREADING_HAS_BEEN_INCLUDED ++#define OPENVDB_THREAD_THREADING_HAS_BEEN_INCLUDED ++ ++#include "openvdb/version.h" ++ ++/// @note tbb/blocked_range.h is the ONLY include that persists from TBB 2020 ++/// to TBB 2021 that itself includes the TBB specific version header files. ++/// In TBB 2020, the version header was called tbb/stddef.h. In 2021, it's ++/// called tbb/version.h. We include tbb/blocked_range.h here to indirectly ++/// access the version defines in a consistent way so that downstream ++/// software doesn't need to provide compile time defines. ++#include ++#include ++#include ++ ++namespace openvdb { ++OPENVDB_USE_VERSION_NAMESPACE ++namespace OPENVDB_VERSION_NAME { ++namespace thread { ++ ++inline bool cancelGroupExecution() ++{ ++ // @note 12000 was the 2021.1-beta05 release. The 2021.1-beta08 release ++ // introduced current_context(). ++#if TBB_INTERFACE_VERSION >= 12002 ++ auto ctx = tbb::task::current_context(); ++ return ctx ? ctx->cancel_group_execution() : false; ++#else ++ return tbb::task::self().cancel_group_execution(); ++#endif ++} ++ ++inline bool isGroupExecutionCancelled() ++{ ++ // @note 12000 was the 2021.1-beta05 release. The 2021.1-beta08 release ++ // introduced current_context(). ++#if TBB_INTERFACE_VERSION >= 12002 ++ auto ctx = tbb::task::current_context(); ++ return ctx ? ctx->is_group_execution_cancelled() : false; ++#else ++ return tbb::task::self().is_cancelled(); ++#endif ++} ++ ++} // namespace thread ++} // namespace OPENVDB_VERSION_NAME ++} // namespace openvdb ++ ++#endif // OPENVDB_THREAD_THREADING_HAS_BEEN_INCLUDED +diff --git a/openvdb/openvdb/tools/Composite.h b/openvdb/openvdb/tools/Composite.h +index 6bc170bf7..88ff86f9f 100644 +--- a/openvdb/openvdb/tools/Composite.h ++++ b/openvdb/openvdb/tools/Composite.h +@@ -24,7 +24,6 @@ + #include + #include + #include +-#include + + #include + #include +diff --git a/openvdb/openvdb/tools/Diagnostics.h b/openvdb/openvdb/tools/Diagnostics.h +index 694d2155f..e5844e448 100644 +--- a/openvdb/openvdb/tools/Diagnostics.h ++++ b/openvdb/openvdb/tools/Diagnostics.h +@@ -11,14 +11,17 @@ + #ifndef OPENVDB_TOOLS_DIAGNOSTICS_HAS_BEEN_INCLUDED + #define OPENVDB_TOOLS_DIAGNOSTICS_HAS_BEEN_INCLUDED + +-#include +-#include +-#include +-#include +-#include +-#include ++#include "openvdb/Grid.h" ++#include "openvdb/math/Math.h" ++#include "openvdb/math/Vec3.h" ++#include "openvdb/math/Stencils.h" ++#include "openvdb/math/Operators.h" ++#include "openvdb/tree/LeafManager.h" ++#include "openvdb/thread/Threading.h" ++ + #include + #include ++ + #include // for std::isnan(), std::isfinite() + #include + #include +@@ -26,7 +29,6 @@ + #include + #include + +- + namespace openvdb { + OPENVDB_USE_VERSION_NAMESPACE + namespace OPENVDB_VERSION_NAME { +@@ -1160,13 +1162,13 @@ InactiveVoxelValues::operator()(const tbb::blocked_range& rang + { + typename TreeType::LeafNodeType::ValueOffCIter iter; + +- for (size_t n = range.begin(); n < range.end() && !tbb::task::self().is_cancelled(); ++n) { ++ for (size_t n = range.begin(); n < range.end() && !thread::isGroupExecutionCancelled(); ++n) { + for (iter = mLeafArray.leaf(n).cbeginValueOff(); iter; ++iter) { + mInactiveValues.insert(iter.getValue()); + } + + if (mInactiveValues.size() > mNumValues) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + } + } + } +@@ -1250,14 +1252,14 @@ template + inline void + InactiveTileValues::operator()(IterRange& range) + { +- for (; range && !tbb::task::self().is_cancelled(); ++range) { ++ for (; range && !thread::isGroupExecutionCancelled(); ++range) { + typename TreeType::ValueOffCIter iter = range.iterator(); + for (; iter; ++iter) { + mInactiveValues.insert(iter.getValue()); + } + + if (mInactiveValues.size() > mNumValues) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + } + } + } +diff --git a/openvdb/openvdb/tools/Filter.h b/openvdb/openvdb/tools/Filter.h +index 408c75541..b70212520 100644 +--- a/openvdb/openvdb/tools/Filter.h ++++ b/openvdb/openvdb/tools/Filter.h +@@ -14,21 +14,24 @@ + #ifndef OPENVDB_TOOLS_FILTER_HAS_BEEN_INCLUDED + #define OPENVDB_TOOLS_FILTER_HAS_BEEN_INCLUDED + +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#include "openvdb/Types.h" ++#include "openvdb/Grid.h" ++#include "openvdb/math/Math.h" ++#include "openvdb/math/Stencils.h" ++#include "openvdb/math/Transform.h" ++#include "openvdb/tree/NodeManager.h" ++#include "openvdb/tree/LeafManager.h" ++#include "openvdb/util/NullInterrupter.h" ++#include "openvdb/util/Util.h" ++#include "openvdb/thread/Threading.h" + #include "Interpolation.h" ++ ++#include ++#include ++ + #include // for std::max() + #include + #include +-#include + + namespace openvdb { + OPENVDB_USE_VERSION_NAMESPACE +@@ -833,7 +836,7 @@ inline bool + Filter::wasInterrupted() + { + if (util::wasInterrupted(mInterrupter)) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + return true; + } + return false; +diff --git a/openvdb/openvdb/tools/GridOperators.h b/openvdb/openvdb/tools/GridOperators.h +index 31305a1ab..78fafead9 100644 +--- a/openvdb/openvdb/tools/GridOperators.h ++++ b/openvdb/openvdb/tools/GridOperators.h +@@ -9,14 +9,15 @@ + #ifndef OPENVDB_TOOLS_GRID_OPERATORS_HAS_BEEN_INCLUDED + #define OPENVDB_TOOLS_GRID_OPERATORS_HAS_BEEN_INCLUDED + +-#include +-#include +-#include +-#include +-#include ++#include "openvdb/Grid.h" ++#include "openvdb/math/Operators.h" ++#include "openvdb/util/NullInterrupter.h" ++#include "openvdb/thread/Threading.h" ++#include "openvdb/tree/LeafManager.h" ++#include "openvdb/tree/ValueAccessor.h" + #include "ValueTransformer.h" // for tools::foreach() +-#include + ++#include + + namespace openvdb { + OPENVDB_USE_VERSION_NAMESPACE +@@ -383,7 +384,9 @@ class GridOperator + /// TBB threads only! + void operator()(const typename LeafManagerT::LeafRange& range) const + { +- if (util::wasInterrupted(mInterrupt)) tbb::task::self().cancel_group_execution(); ++ if (util::wasInterrupted(mInterrupt)) { ++ thread::cancelGroupExecution(); ++ } + + for (typename LeafManagerT::LeafRange::Iterator leaf=range.begin(); leaf; ++leaf) { + for (typename OutLeafT::ValueOnIter value=leaf->beginValueOn(); value; ++value) { +diff --git a/openvdb/openvdb/tools/LevelSetMeasure.h b/openvdb/openvdb/tools/LevelSetMeasure.h +index efe19074d..59969cdcf 100644 +--- a/openvdb/openvdb/tools/LevelSetMeasure.h ++++ b/openvdb/openvdb/tools/LevelSetMeasure.h +@@ -8,18 +8,21 @@ + #ifndef OPENVDB_TOOLS_LEVELSETMEASURE_HAS_BEEN_INCLUDED + #define OPENVDB_TOOLS_LEVELSETMEASURE_HAS_BEEN_INCLUDED + +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#include "openvdb/Types.h" ++#include "openvdb/Grid.h" ++#include "openvdb/tree/LeafManager.h" ++#include "openvdb/tree/ValueAccessor.h" ++#include "openvdb/math/Math.h" ++#include "openvdb/math/FiniteDifference.h" ++#include "openvdb/math/Operators.h" ++#include "openvdb/math/Stencils.h" ++#include "openvdb/util/NullInterrupter.h" ++#include "openvdb/thread/Threading.h" ++ + #include + #include + #include ++ + #include + + namespace openvdb { +@@ -329,7 +332,7 @@ inline bool + LevelSetMeasure::checkInterrupter() + { + if (util::wasInterrupted(mInterrupter)) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + return false; + } + return true; +diff --git a/openvdb/openvdb/tools/LevelSetTracker.h b/openvdb/openvdb/tools/LevelSetTracker.h +index cbdc267e8..bfc8004e7 100644 +--- a/openvdb/openvdb/tools/LevelSetTracker.h ++++ b/openvdb/openvdb/tools/LevelSetTracker.h +@@ -12,24 +12,26 @@ + #ifndef OPENVDB_TOOLS_LEVEL_SET_TRACKER_HAS_BEEN_INCLUDED + #define OPENVDB_TOOLS_LEVEL_SET_TRACKER_HAS_BEEN_INCLUDED + +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#include "openvdb/Types.h" ++#include "openvdb/Grid.h" ++#include "openvdb/math/Math.h" ++#include "openvdb/math/FiniteDifference.h" ++#include "openvdb/math/Operators.h" ++#include "openvdb/math/Stencils.h" ++#include "openvdb/math/Transform.h" ++#include "openvdb/util/NullInterrupter.h" ++#include "openvdb/thread/Threading.h" ++#include "openvdb/tree/ValueAccessor.h" ++#include "openvdb/tree/LeafManager.h" + #include "ChangeBackground.h"// for changeLevelSetBackground + #include "Morphology.h"//for dilateActiveValues + #include "Prune.h"// for pruneLevelSet ++ ++#include ++ + #include + #include + +- + namespace openvdb { + OPENVDB_USE_VERSION_NAMESPACE + namespace OPENVDB_VERSION_NAME { +@@ -383,7 +385,7 @@ LevelSetTracker:: + checkInterrupter() + { + if (util::wasInterrupted(mInterrupter)) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + return false; + } + return true; +diff --git a/openvdb/openvdb/tools/MeshToVolume.h b/openvdb/openvdb/tools/MeshToVolume.h +index 6643c8f05..de3406eda 100644 +--- a/openvdb/openvdb/tools/MeshToVolume.h ++++ b/openvdb/openvdb/tools/MeshToVolume.h +@@ -16,12 +16,13 @@ + #ifndef OPENVDB_TOOLS_MESH_TO_VOLUME_HAS_BEEN_INCLUDED + #define OPENVDB_TOOLS_MESH_TO_VOLUME_HAS_BEEN_INCLUDED + +-#include // for OPENVDB_HAS_CXX11 +-#include +-#include // for GodunovsNormSqrd +-#include // for closestPointOnTriangleToPoint +-#include +-#include ++#include "openvdb/Platform.h" // for OPENVDB_HAS_CXX11 ++#include "openvdb/Types.h" ++#include "openvdb/math/FiniteDifference.h" // for GodunovsNormSqrd ++#include "openvdb/math/Proximity.h" // for closestPointOnTriangleToPoint ++#include "openvdb/util/NullInterrupter.h" ++#include "openvdb/util/Util.h" ++#include "openvdb/thread/Threading.h" + + #include "ChangeBackground.h" + #include "Prune.h" // for pruneInactive and pruneLevelSet +@@ -33,7 +34,7 @@ + #include + #include + #include +-#include ++#include + + #include // for std::sort() + #include // for std::isfinite(), std::isnan() +@@ -1132,7 +1133,7 @@ inline void + fillArray(ValueType* array, const ValueType val, const size_t length) + { + const auto grainSize = std::max( +- length / tbb::task_scheduler_init::default_num_threads(), 1024); ++ length / tbb::this_task_arena::max_concurrency(), 1024); + const tbb::blocked_range range(0, length, grainSize); + tbb::parallel_for(range, FillArray(array, val), tbb::simple_partitioner()); + } +@@ -1989,7 +1990,7 @@ class VoxelizePolygons + for (size_t n = range.begin(), N = range.end(); n < N; ++n) { + + if (this->wasInterrupted()) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + break; + } + +@@ -2143,7 +2144,7 @@ class VoxelizePolygons + + while (!coordList.empty()) { + if (interrupter && interrupter->wasInterrupted()) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + break; + } + for (Int32 pass = 0; pass < 1048576 && !coordList.empty(); ++pass) { +diff --git a/openvdb/openvdb/tools/Morphology.h b/openvdb/openvdb/tools/Morphology.h +index 736982ef5..0a1e71009 100644 +--- a/openvdb/openvdb/tools/Morphology.h ++++ b/openvdb/openvdb/tools/Morphology.h +@@ -24,7 +24,7 @@ + #include "openvdb/tree/ValueAccessor.h" + #include "openvdb/tree/LeafManager.h" + +-#include ++#include + #include + #include + +@@ -726,7 +726,7 @@ void Morphology::dilateVoxels(const size_t iter, + } + + // @note this grain size is used for optimal threading +- const size_t numThreads = size_t(tbb::task_scheduler_init::default_num_threads()); ++ const size_t numThreads = size_t(tbb::this_task_arena::max_concurrency()); + const size_t subTreeSize = math::Max(size_t(1), array.size()/(2*numThreads)); + + // perform recursive dilation to sub trees +diff --git a/openvdb/openvdb/tools/ParticlesToLevelSet.h b/openvdb/openvdb/tools/ParticlesToLevelSet.h +index 739af2b69..f9c19911c 100644 +--- a/openvdb/openvdb/tools/ParticlesToLevelSet.h ++++ b/openvdb/openvdb/tools/ParticlesToLevelSet.h +@@ -62,19 +62,23 @@ + #ifndef OPENVDB_TOOLS_PARTICLES_TO_LEVELSET_HAS_BEEN_INCLUDED + #define OPENVDB_TOOLS_PARTICLES_TO_LEVELSET_HAS_BEEN_INCLUDED + +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#include "openvdb/Types.h" ++#include "openvdb/Grid.h" ++#include "openvdb/math/Math.h" ++#include "openvdb/math/Transform.h" ++#include "openvdb/tree/LeafManager.h" ++#include "openvdb/util/logging.h" ++#include "openvdb/util/NullInterrupter.h" ++#include "openvdb/thread/Threading.h" ++ + #include "Composite.h" // for csgUnion() + #include "PointPartitioner.h" + #include "Prune.h" + #include "SignedFloodFill.h" ++ ++#include ++#include ++ + #include + #include + #include +@@ -738,7 +742,7 @@ struct ParticlesToLevelSet::Raster + for (Coord c = lo; c.x() <= hi.x(); ++c.x()) { + //only check interrupter every 32'th scan in x + if (!(count++ & ((1<<5)-1)) && util::wasInterrupted(mParent.mInterrupter)) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + return false; + } + const Real x2 = math::Pow2(c.x() - P[0]); +@@ -804,7 +808,7 @@ struct ParticlesToLevelSet::Raster + // Densely fill the remaining regions. + for (const auto& bbox: padding) { + if (util::wasInterrupted(mParent.mInterrupter)) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + return false; + } + const Coord &bmin = bbox.min(), &bmax = bbox.max(); +diff --git a/openvdb/openvdb/tools/PointAdvect.h b/openvdb/openvdb/tools/PointAdvect.h +index 12b1177ad..e487bfb3e 100644 +--- a/openvdb/openvdb/tools/PointAdvect.h ++++ b/openvdb/openvdb/tools/PointAdvect.h +@@ -10,16 +10,19 @@ + #ifndef OPENVDB_TOOLS_POINT_ADVECT_HAS_BEEN_INCLUDED + #define OPENVDB_TOOLS_POINT_ADVECT_HAS_BEEN_INCLUDED + +-#include +-#include // min +-#include // Vec3 types and version number +-#include // grid +-#include ++#include "openvdb/openvdb.h" ++#include "openvdb/Types.h" // Vec3 types and version number ++#include "openvdb/Grid.h" // grid ++#include "openvdb/math/Math.h" // min ++#include "openvdb/util/NullInterrupter.h" ++#include "openvdb/thread/Threading.h" + #include "Interpolation.h" // sampling + #include "VelocityFields.h" // VelocityIntegrator ++ + #include // threading + #include // threading + #include // for cancel ++ + #include + + +@@ -167,7 +170,7 @@ class PointAdvect + void operator() (const tbb::blocked_range &range) const + { + if (mInterrupter && mInterrupter->wasInterrupted()) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + } + + VelocityFieldIntegrator velField(*mVelGrid); +@@ -307,7 +310,7 @@ class ConstrainedPointAdvect + void operator() (const tbb::blocked_range &range) const + { + if (mInterrupter && mInterrupter->wasInterrupted()) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + } + + VelocityIntegratorType velField(*mVelGrid); +diff --git a/openvdb/openvdb/tools/PointIndexGrid.h b/openvdb/openvdb/tools/PointIndexGrid.h +index e9ebf96f7..b2e378a79 100644 +--- a/openvdb/openvdb/tools/PointIndexGrid.h ++++ b/openvdb/openvdb/tools/PointIndexGrid.h +@@ -16,6 +16,7 @@ + #ifndef OPENVDB_TOOLS_POINT_INDEX_GRID_HAS_BEEN_INCLUDED + #define OPENVDB_TOOLS_POINT_INDEX_GRID_HAS_BEEN_INCLUDED + ++#include "openvdb/thread/Threading.h" + #include "PointPartitioner.h" + + #include +@@ -355,7 +356,7 @@ struct ValidPartitioningOp + void operator()(LeafT &leaf, size_t /*leafIndex*/) const + { + if ((*mHasChanged)) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + return; + } + +diff --git a/openvdb/openvdb/tools/PointPartitioner.h b/openvdb/openvdb/tools/PointPartitioner.h +index ccf50ab05..f7f6fc13d 100644 +--- a/openvdb/openvdb/tools/PointPartitioner.h ++++ b/openvdb/openvdb/tools/PointPartitioner.h +@@ -23,7 +23,7 @@ + + #include + #include +-#include ++#include + + #include + #include // for std::isfinite() +@@ -764,7 +764,7 @@ inline void binAndSegment( + using IndexPairListMap = std::map; + using IndexPairListMapPtr = std::shared_ptr; + +- size_t numTasks = 1, numThreads = size_t(tbb::task_scheduler_init::default_num_threads()); ++ size_t numTasks = 1, numThreads = size_t(tbb::this_task_arena::max_concurrency()); + if (points.size() > (numThreads * 2)) numTasks = numThreads * 2; + else if (points.size() > numThreads) numTasks = numThreads; + +diff --git a/openvdb/openvdb/tools/PointsToMask.h b/openvdb/openvdb/tools/PointsToMask.h +index 592ab7a15..8a276fb04 100644 +--- a/openvdb/openvdb/tools/PointsToMask.h ++++ b/openvdb/openvdb/tools/PointsToMask.h +@@ -46,14 +46,18 @@ + #ifndef OPENVDB_TOOLS_POINTSTOMASK_HAS_BEEN_INCLUDED + #define OPENVDB_TOOLS_POINTSTOMASK_HAS_BEEN_INCLUDED + ++ ++#include "openvdb/openvdb.h" // for MaskGrid ++#include "openvdb/Grid.h" ++#include "openvdb/Types.h" ++#include "openvdb/util/NullInterrupter.h" ++#include "openvdb/thread/Threading.h" ++ + #include + #include + #include + #include +-#include // for MaskGrid +-#include +-#include +-#include ++ + #include + + +@@ -150,7 +154,7 @@ class PointsToMask + bool interrupt() const + { + if (mInterrupter && util::wasInterrupted(mInterrupter)) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + return true; + } + return false; +diff --git a/openvdb/openvdb/tools/VolumeAdvect.h b/openvdb/openvdb/tools/VolumeAdvect.h +index e7eec740e..f38eaa9c2 100644 +--- a/openvdb/openvdb/tools/VolumeAdvect.h ++++ b/openvdb/openvdb/tools/VolumeAdvect.h +@@ -13,15 +13,18 @@ + #ifndef OPENVDB_TOOLS_VOLUME_ADVECT_HAS_BEEN_INCLUDED + #define OPENVDB_TOOLS_VOLUME_ADVECT_HAS_BEEN_INCLUDED + +-#include +-#include +-#include +-#include ++#include "openvdb/Types.h" ++#include "openvdb/math/Math.h" ++#include "openvdb/util/NullInterrupter.h" ++#include "openvdb/thread/Threading.h" + #include "Interpolation.h"// for Sampler + #include "VelocityFields.h" // for VelocityIntegrator + #include "Morphology.h"//for dilateActiveValues + #include "Prune.h"// for prune + #include "Statistics.h" // for extrema ++ ++#include ++ + #include + + +@@ -294,7 +297,7 @@ class VolumeAdvection + bool interrupt() const + { + if (mInterrupter && util::wasInterrupted(mInterrupter)) { +- tbb::task::self().cancel_group_execution(); ++ thread::cancelGroupExecution(); + return true; + } + return false; +diff --git a/openvdb/openvdb/tools/VolumeToMesh.h b/openvdb/openvdb/tools/VolumeToMesh.h +index a834dd3b3..a446f806a 100644 +--- a/openvdb/openvdb/tools/VolumeToMesh.h ++++ b/openvdb/openvdb/tools/VolumeToMesh.h +@@ -18,7 +18,7 @@ + #include + #include + #include +-#include ++#include + + #include // for std::isfinite() + #include +@@ -388,7 +388,7 @@ inline void + fillArray(ValueType* array, const ValueType& val, const size_t length) + { + const auto grainSize = std::max( +- length / tbb::task_scheduler_init::default_num_threads(), 1024); ++ length / tbb::this_task_arena::max_concurrency(), 1024); + const tbb::blocked_range range(0, length, grainSize); + tbb::parallel_for(range, FillArray(array, val), tbb::simple_partitioner()); + } +diff --git a/openvdb/openvdb/unittest/TestCoord.cc b/openvdb/openvdb/unittest/TestCoord.cc +index be1c24ced..148690041 100644 +--- a/openvdb/openvdb/unittest/TestCoord.cc ++++ b/openvdb/openvdb/unittest/TestCoord.cc +@@ -2,9 +2,9 @@ + // SPDX-License-Identifier: MPL-2.0 + + #include ++#include + + #include +-#include // for tbb::split + + #include + #include +diff --git a/openvdb/openvdb/unittest/TestFile.cc b/openvdb/openvdb/unittest/TestFile.cc +index 8074166d2..053448f30 100644 +--- a/openvdb/openvdb/unittest/TestFile.cc ++++ b/openvdb/openvdb/unittest/TestFile.cc +@@ -13,8 +13,11 @@ + #include + #include + #include "util.h" // for unittest_util::makeSphere() ++ + #include +-#include // for tbb::this_tbb_thread::sleep() ++ ++#include ++#include + #include // for std::sort() + #include // for remove() and rename() + #include +@@ -2345,12 +2348,14 @@ TEST_F(TestFile, testAsync) + helper.insert(id, filename); + } + +- tbb::tick_count start = tbb::tick_count::now(); ++ auto start = std::chrono::steady_clock::now(); + while (!helper.ids.empty()) { +- if ((tbb::tick_count::now() - start).seconds() > 60) break; // time out after 1 minute ++ auto duration = std::chrono::duration_cast( ++ std::chrono::steady_clock::now() - start); ++ if (size_t(duration.count()) > 60) break; // time out after 1 minute + + // Wait one second for tasks to complete. +- tbb::this_tbb_thread::sleep(tbb::tick_count::interval_t(1.0/*sec*/)); ++ std::this_thread::sleep_for(std::chrono::seconds(1)); + + // Poll each task in the pending map. + std::set ids = helper.ids; // iterate over a copy +@@ -2380,7 +2385,7 @@ TEST_F(TestFile, testAsync) + helper.insert(id, filename); + } + while (!queue.empty()) { +- tbb::this_tbb_thread::sleep(tbb::tick_count::interval_t(1.0/*sec*/)); ++ std::this_thread::sleep_for(std::chrono::seconds(1)); + } + } + { +@@ -2405,7 +2410,7 @@ TEST_F(TestFile, testAsync) + EXPECT_THROW(queue.write(grids, io::Stream(file2)), openvdb::RuntimeError); + + while (!queue.empty()) { +- tbb::this_tbb_thread::sleep(tbb::tick_count::interval_t(1.0/*sec*/)); ++ std::this_thread::sleep_for(std::chrono::seconds(1)); + } + } + } +diff --git a/openvdb/openvdb/unittest/TestUtil.cc b/openvdb/openvdb/unittest/TestUtil.cc +index 70e7df5f7..6b2204771 100644 +--- a/openvdb/openvdb/unittest/TestUtil.cc ++++ b/openvdb/openvdb/unittest/TestUtil.cc +@@ -8,7 +8,6 @@ + + #include + +-#include + #include + #include + #include +diff --git a/openvdb/openvdb/unittest/TestValueAccessor.cc b/openvdb/openvdb/unittest/TestValueAccessor.cc +index fd2dd5d81..5c1cbb18b 100644 +--- a/openvdb/openvdb/unittest/TestValueAccessor.cc ++++ b/openvdb/openvdb/unittest/TestValueAccessor.cc +@@ -6,6 +6,7 @@ + + #include + #include ++#include + + #include + +@@ -378,22 +379,21 @@ TEST_F(TestValueAccessor, testMultithreadedAccessor) + //using AccessorT = openvdb::tree::ValueAccessor; + + // Task to perform multiple reads through a shared accessor +- struct ReadTask: public tbb::task { ++ struct ReadTask { + AccessorT& acc; + ReadTask(AccessorT& c): acc(c) {} +- tbb::task* execute() ++ void execute() + { + for (int i = -MAX_COORD; i < MAX_COORD; ++i) { + ASSERT_DOUBLES_EXACTLY_EQUAL(double(i), acc.getValue(openvdb::Coord(i))); + } +- return nullptr; + } + }; + // Task to perform multiple writes through a shared accessor +- struct WriteTask: public tbb::task { ++ struct WriteTask { + AccessorT& acc; + WriteTask(AccessorT& c): acc(c) {} +- tbb::task* execute() ++ void execute() + { + for (int i = -MAX_COORD; i < MAX_COORD; ++i) { + float f = acc.getValue(openvdb::Coord(i)); +@@ -401,26 +401,20 @@ TEST_F(TestValueAccessor, testMultithreadedAccessor) + acc.setValue(openvdb::Coord(i), float(i)); + ASSERT_DOUBLES_EXACTLY_EQUAL(float(i), acc.getValue(openvdb::Coord(i))); + } +- return nullptr; + } + }; + // Parent task to spawn multiple parallel read and write tasks +- struct RootTask: public tbb::task { ++ struct RootTask { + AccessorT& acc; + RootTask(AccessorT& c): acc(c) {} +- tbb::task* execute() ++ void execute() + { +- ReadTask* r[3]; WriteTask* w[3]; ++ tbb::task_group tasks; + for (int i = 0; i < 3; ++i) { +- r[i] = new(allocate_child()) ReadTask(acc); +- w[i] = new(allocate_child()) WriteTask(acc); ++ tasks.run([&] { ReadTask r(acc); r.execute(); }); ++ tasks.run([&] { WriteTask w(acc); w.execute(); }); + } +- set_ref_count(6 /*children*/ + 1 /*wait*/); +- for (int i = 0; i < 3; ++i) { +- spawn(*r[i]); spawn(*w[i]); +- } +- wait_for_all(); +- return nullptr; ++ tasks.wait(); + } + }; + +@@ -432,8 +426,8 @@ TEST_F(TestValueAccessor, testMultithreadedAccessor) + } + + // Run multiple read and write tasks in parallel. +- RootTask& root = *new(tbb::task::allocate_root()) RootTask(acc); +- tbb::task::spawn_root_and_wait(root); ++ RootTask root(acc); ++ root.execute(); + + #undef MAX_COORD + } +diff --git a/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Rasterize_Points.cc b/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Rasterize_Points.cc +index 0e1b4d855..6d9bb528b 100644 +--- a/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Rasterize_Points.cc ++++ b/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Rasterize_Points.cc +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -786,7 +787,7 @@ struct ConstructCandidateVoxelMask + for (size_t n = range.begin(), N = range.end(); n != N; ++n) { + + if (this->wasInterrupted()) { +- tbb::task::self().cancel_group_execution(); ++ openvdb::thread::cancelGroupExecution(); + break; + } + +@@ -2092,7 +2093,7 @@ struct RasterizePoints + for (size_t n = range.begin(), N = range.end(); n != N; ++n) { + + if (this->wasInterrupted()) { +- tbb::task::self().cancel_group_execution(); ++ openvdb::thread::cancelGroupExecution(); + break; + } + +diff --git a/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Sample_Points.cc b/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Sample_Points.cc +index 757fdc8c6..dbee74b32 100644 +--- a/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Sample_Points.cc ++++ b/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Sample_Points.cc +@@ -16,13 +16,11 @@ + #include + + #include // for box sampler ++#include + #include + #include + #include // for MultiGroupFilter + +-#include // for timing +-#include // for cancel +- + #include + #include + #include +@@ -38,6 +36,7 @@ + #include + #include + #include ++#include + + + +@@ -327,7 +326,7 @@ class PointSampler + { + + if (mInterrupter->wasInterrupted()) { +- tbb::task::self().cancel_group_execution(); ++ openvdb::thread::cancelGroupExecution(); + } + const GridType& grid = UTvdbGridCast(mGrid); + // task local grid accessor +@@ -481,7 +480,7 @@ SOP_OpenVDB_Sample_Points::Cache::cookVDBSop(OP_Context& context) + int numUnnamedGrids = 0; + + // start time +- tbb::tick_count time_start = tbb::tick_count::now(); ++ auto time_start = std::chrono::steady_clock::now(); + UT_AutoInterrupt progress("Sampling from VDB grids"); + + for (hvdb::VdbPrimCIterator it(bGdp, group); it; ++it) { +@@ -706,15 +705,16 @@ SOP_OpenVDB_Sample_Points::Cache::cookVDBSop(OP_Context& context) + } + } + +- // timing: end time +- tbb::tick_count time_end = tbb::tick_count::now(); +- + if (verbose) { ++ // timing: end time ++ auto duration = std::chrono::duration_cast( ++ std::chrono::steady_clock::now() - time_start); ++ const double seconds = double(duration.count()) / 1000.0; + std::cout << "Sampling " << nPoints + nVDBPoints << " points in " + << numVectorGrids << " vector grid" << (numVectorGrids == 1 ? "" : "s") + << " and " << numScalarGrids << " scalar grid" + << (numScalarGrids == 1 ? "" : "s") +- << " took " << (time_end - time_start).seconds() << " seconds\n " ++ << " took " << seconds << " seconds\n " + << (threaded ? "threaded" : "non-threaded") << std::endl; + } + +diff --git a/openvdb_maya/openvdb_maya/OpenVDBPlugin.cc b/openvdb_maya/openvdb_maya/OpenVDBPlugin.cc +index 3d559f8cc..d63ed1591 100644 +--- a/openvdb_maya/openvdb_maya/OpenVDBPlugin.cc ++++ b/openvdb_maya/openvdb_maya/OpenVDBPlugin.cc +@@ -47,11 +47,8 @@ struct NodeInfo { + + typedef std::vector NodeList; + +-typedef tbb::mutex Mutex; +-typedef Mutex::scoped_lock Lock; +- + // Declare this at file scope to ensure thread-safe initialization. +-Mutex sRegistryMutex; ++std::mutex sRegistryMutex; + + NodeList * gNodes = NULL; + +@@ -70,7 +67,7 @@ NodeRegistry::NodeRegistry(const MString& typeName, const MTypeId& typeId, + node.type = type; + node.classification = classification; + +- Lock lock(sRegistryMutex); ++ std::lock_guard lock(sRegistryMutex); + + if (!gNodes) { + OPENVDB_START_THREADSAFE_STATIC_WRITE +@@ -85,7 +82,7 @@ NodeRegistry::NodeRegistry(const MString& typeName, const MTypeId& typeId, + void + NodeRegistry::registerNodes(MFnPlugin& plugin, MStatus& status) + { +- Lock lock(sRegistryMutex); ++ std::lock_guard lock(sRegistryMutex); + + if (gNodes) { + for (size_t n = 0, N = gNodes->size(); n < N; ++n) { +@@ -109,7 +106,7 @@ NodeRegistry::registerNodes(MFnPlugin& plugin, MStatus& status) + void + NodeRegistry::deregisterNodes(MFnPlugin& plugin, MStatus& status) + { +- Lock lock(sRegistryMutex); ++ std::lock_guard lock(sRegistryMutex); + + if (gNodes) { + for (size_t n = 0, N = gNodes->size(); n < N; ++n) { +diff --git a/openvdb_maya/openvdb_maya/OpenVDBUtil.h b/openvdb_maya/openvdb_maya/OpenVDBUtil.h +index b58bd6f2c..6a04b1eaf 100644 +--- a/openvdb_maya/openvdb_maya/OpenVDBUtil.h ++++ b/openvdb_maya/openvdb_maya/OpenVDBUtil.h +@@ -14,8 +14,7 @@ + #include + #include + #include // printBytes +- +-#include ++#include + + #include + #include +@@ -40,6 +39,7 @@ + #include + #include + #include ++#include + + + //////////////////////////////////////// +@@ -116,11 +116,15 @@ insertFrameNumber(std::string& str, const MTime& time, int numberingScheme = 0); + + struct Timer + { +- Timer() : mStamp(tbb::tick_count::now()) { } ++ Timer() : mStamp(std::chrono::steady_clock::now()) { } + +- void reset() { mStamp = tbb::tick_count::now(); } ++ void reset() { mStamp = std::chrono::steady_clock::now(); } + +- double seconds() const { return (tbb::tick_count::now() - mStamp).seconds(); } ++ double seconds() const { ++ auto duration = std::chrono::duration_cast( ++ std::chrono::steady_clock::now() - mStamp); ++ return double(duration.count()) / 1000.0; ++ } + + std::string elapsedTime() const { + double sec = seconds(); +@@ -128,7 +132,7 @@ struct Timer + } + + private: +- tbb::tick_count mStamp; ++ std::chrono::time_point mStamp; + }; + + +diff --git a/pendingchanges/tbb2021.txt b/pendingchanges/tbb2021.txt +new file mode 100644 +index 000000000..8109c2552 +--- /dev/null ++++ b/pendingchanges/tbb2021.txt +@@ -0,0 +1,6 @@ ++Improvements: ++ - Moved from the deprecated TBB task scheduler to TBB arenas. Various methods now respect the TBB arena state they were invoked from. ++ - Introduced a new thread/Threading.h header to consolidate calls to third-party threading methods. ++ ++Build: ++ - Added support for TBB 2021. diff --git a/srcpkgs/openvdb/template b/srcpkgs/openvdb/template index 72fde5bc6375..d420a3ee5f5d 100644 --- a/srcpkgs/openvdb/template +++ b/srcpkgs/openvdb/template @@ -1,26 +1,18 @@ # Template file for 'openvdb' pkgname=openvdb -version=7.0.0 +version=8.1.0 revision=1 build_style=cmake configure_args="-DOPENVDB_BUILD_VDB_VIEW=1" hostmakedepends="pkg-config" -makedepends="boost-devel tbb-devel ilmbase-devel libopenexr-devel c-blosc-devel glfw-devel" +makedepends="boost-devel tbb-devel ilmbase-devel libopenexr-devel c-blosc-devel + glfw-devel jemalloc-devel" short_desc="Sparse volume data structure and tools" maintainer="Orphaned " license="MPL-2.0" homepage="https://openvdb.org" distfiles="https://github.com/AcademySoftwareFoundation/openvdb/archive/v${version}.tar.gz" -checksum=97bc8ae35ef7ccbf49a4e25cb73e8c2eccae6b235bac86f2150707efcd1e910d - -if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then - makedepends+=" libatomic-devel" -fi - -post_patch() { - [ "$XBPS_TARGET_NO_ATOMIC8" ] || return 0 - vsed -i 's,ZLIB::ZLIB,ZLIB::ZLIB atomic,' openvdb/CMakeLists.txt -} +checksum=3e09d47331429be7409a3a3c27fdd3c297f96d31d2153febe194e664a99d6183 post_install() { vlicense LICENSE From 2e8bbc914059136d80d389577aed357a9af4672d Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Sun, 18 Jul 2021 18:29:40 +0300 Subject: [PATCH 10/12] paraview: update to 5.9.1. --- srcpkgs/paraview/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/paraview/template b/srcpkgs/paraview/template index 20a7f5589677..e6c3941ce90a 100644 --- a/srcpkgs/paraview/template +++ b/srcpkgs/paraview/template @@ -1,7 +1,7 @@ # Template file for 'paraview' pkgname=paraview -version=5.8.1 -revision=3 +version=5.9.1 +revision=1 wrksrc=ParaView-v${version} build_style=cmake configure_args="-DCMAKE_PREFIX_PATH=${XBPS_CROSS_BASE}/usr From 3e3eef017eebd9aa1f5627c0b4657b92e54cab9c Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Sun, 18 Jul 2021 18:29:39 +0300 Subject: [PATCH 11/12] occt: revbump due to tbb update --- srcpkgs/occt/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template index 9298edc76e08..006f89ebb8ce 100644 --- a/srcpkgs/occt/template +++ b/srcpkgs/occt/template @@ -2,7 +2,7 @@ pkgname=occt reverts=7.5.0_1 version=7.4.0p1 -revision=3 +revision=4 _gittag="V${version//./_}" wrksrc=occt-${_gittag} build_style=cmake From 21a3aad6b15f931dd2bb9e60982fa3fdf9806817 Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Sat, 24 Jul 2021 18:05:52 +0300 Subject: [PATCH 12/12] hwloc --- srcpkgs/hwloc/patches/00-get-area-memlocation.patch | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/srcpkgs/hwloc/patches/00-get-area-memlocation.patch b/srcpkgs/hwloc/patches/00-get-area-memlocation.patch index e398a80e046d..092157e45cd3 100644 --- a/srcpkgs/hwloc/patches/00-get-area-memlocation.patch +++ b/srcpkgs/hwloc/patches/00-get-area-memlocation.patch @@ -1,12 +1,21 @@ diff --git a/tests/hwloc/hwloc_get_area_memlocation.c b/tests/hwloc/hwloc_get_area_memlocation.c -index 498dfae..999d95b 100644 +index 498dfae..8d77cf7 100644 --- a/tests/hwloc/hwloc_get_area_memlocation.c +++ b/tests/hwloc/hwloc_get_area_memlocation.c +@@ -8,7 +8,7 @@ + #include + #include + +-#define LEN 1048576 ++#define LEN 1024 + + int main(void) + { @@ -34,11 +34,13 @@ int main(void) assert(buffer); printf("buffer %p length %d\n", buffer, LEN); -+ fprintf(stderr, "Before memloation\nerr == %i, errno == %s\n", err, strerror(errno)); ++ fprintf(stderr, "Before memlocation\nerr == %i, errno == %s\n", err, strerror(errno)); err = hwloc_get_area_memlocation(topology, buffer, LEN, set, HWLOC_MEMBIND_BYNODESET); if (err < 0 && errno == ENOSYS) { fprintf(stderr, "hwloc_get_area_memlocation() failed with ENOSYS, aborting\n");