From d5cbd040e9ef4d26bb31b42bd8b1e75664795727 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Fri, 21 Jun 2024 09:21:34 -0400 Subject: [PATCH 1/2] bump MADNESS tag to pull in https://github.com/m-a-d-n-e-s-s/madness/pull/541 needed to build with C++20 --- INSTALL.md | 2 +- external/versions.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index f8ad366009..b0705e6f1e 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -43,7 +43,7 @@ Both methods are supported. However, for most users we _strongly_ recommend to b - [Range-V3](https://github.com/ericniebler/range-v3.git) -- a Ranges library that served as the basis for Ranges component of C++20 and later. - [BTAS](http://github.com/ValeevGroup/BTAS), tag 4e8f5233aa7881dccdfcc37ce07128833926d3c2 . If usable BTAS installation is not found, TiledArray will download and compile BTAS from source. *This is the recommended way to compile BTAS for all users*. -- [MADNESS](https://github.com/m-a-d-n-e-s-s/madness), tag 3d0ae2fad1b97e347ca6dd98b9f1b9e74e629f52 . +- [MADNESS](https://github.com/m-a-d-n-e-s-s/madness), tag 96ac90e8f193ccfaf16f346b4652927d2d362e75 . Only the MADworld runtime and BLAS/LAPACK C API component of MADNESS is used by TiledArray. If usable MADNESS installation is not found, TiledArray will download and compile MADNESS from source. *This is the recommended way to compile MADNESS for all users*. diff --git a/external/versions.cmake b/external/versions.cmake index 11b3d4ac3e..8443052d37 100644 --- a/external/versions.cmake +++ b/external/versions.cmake @@ -11,8 +11,8 @@ set(TA_INSTALL_EIGEN_PREVIOUS_VERSION 3.3.7) set(TA_INSTALL_EIGEN_URL_HASH SHA256=b4c198460eba6f28d34894e3a5710998818515104d6e74e5cc331ce31e46e626) set(TA_INSTALL_EIGEN_PREVIOUS_URL_HASH MD5=b9e98a200d2455f06db9c661c5610496) -set(TA_TRACKED_MADNESS_TAG 3d0ae2fad1b97e347ca6dd98b9f1b9e74e629f52) -set(TA_TRACKED_MADNESS_PREVIOUS_TAG 8788aea9758bfe6479cc23d39e6c77b7528009db) +set(TA_TRACKED_MADNESS_TAG 96ac90e8f193ccfaf16f346b4652927d2d362e75) +set(TA_TRACKED_MADNESS_PREVIOUS_TAG 3d0ae2fad1b97e347ca6dd98b9f1b9e74e629f52) set(TA_TRACKED_MADNESS_VERSION 0.10.1) set(TA_TRACKED_MADNESS_PREVIOUS_VERSION 0.10.1) From e3485f4ca55f582ad08de495c1d9ed5c4deef045 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Fri, 21 Jun 2024 09:23:45 -0400 Subject: [PATCH 2/2] std::shared_ptr::unique() removed in C++20 https://en.cppreference.com/w/cpp/memory/shared_ptr/unique --- src/TiledArray/dist_array.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TiledArray/dist_array.h b/src/TiledArray/dist_array.h index c6d6cddb79..2caa7e321d 100644 --- a/src/TiledArray/dist_array.h +++ b/src/TiledArray/dist_array.h @@ -634,7 +634,7 @@ class DistArray : public madness::archive::ParallelSerializableObject { /// Checks if this is a unique handle to the implementation object /// \return true if this is a unique handle to the implementation object - bool is_unique() const { return pimpl_.unique(); } + bool is_unique() const { return pimpl_.use_count() == 1; } /// Wait for lazy tile cleanup @@ -1952,7 +1952,7 @@ DistArray replicated(const DistArray& a) { // Put the replicator pointer in the deferred cleanup object so it will // be deleted at the end of the next fence. - TA_ASSERT(replicator.unique()); // Required for deferred_cleanup + TA_ASSERT(replicator.use_count() == 1); // Required for deferred_cleanup madness::detail::deferred_cleanup(world, replicator); return result;