Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions external/versions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ set(TA_INSTALL_EIGEN_URL_HASH SHA256=b4c198460eba6f28d34894e3a5710998818515104d6
set(TA_INSTALL_EIGEN_PREVIOUS_URL_HASH MD5=b9e98a200d2455f06db9c661c5610496)

set(TA_TRACKED_MADNESS_URL https://github.com/m-a-d-n-e-s-s/madness.git CACHE STRING "GIT_REPOSITORY for cloning MADNESS source")
set(TA_TRACKED_MADNESS_TAG f7aa1401e CACHE STRING "GIT_TAG (branch or hash) for cloning MADNESS")
set(TA_TRACKED_MADNESS_PREVIOUS_TAG 7d8aaf9d51981e4accf4d84742270d1473f8ca2e)
set(TA_TRACKED_MADNESS_TAG 666765ca6 CACHE STRING "GIT_TAG (branch or hash) for cloning MADNESS")
set(TA_TRACKED_MADNESS_PREVIOUS_TAG f7aa1401e)
set(TA_TRACKED_MADNESS_VERSION 0.10.1)
set(TA_TRACKED_MADNESS_PREVIOUS_VERSION 0.10.1)

Expand Down
18 changes: 18 additions & 0 deletions src/TiledArray/array_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,24 @@ class ArrayImpl : public TensorImpl<Policy>,
// wait for all DelayedSet's to vanish
world.await([&]() { return (pimpl->num_live_ds() == 0); }, true);

// Fast path when invoked from inside the fence's deferred-cleanup
// phase: the global-termination protocol has already established
// global quiescence (no in-flight AM, all ranks at the same point),
// and symmetric collective use of `defer_deleter_to_next_fence()`
// guarantees every rank has this same pimpl in its deferred list
// and so reaches this same delete in lockstep. The cross-rank
// lazy_sync handshake below is therefore redundant; it would also
// schedule a lazy_sync_children task on this world's taskq that the
// fence cannot drain (do_cleanup runs after the drain loop) and
// that would later be run by some unrelated fence -- against freed
// state if this world is destroyed before then (e.g. einsum's
// per-Hadamard sub-Worlds).
if (world.gop.is_in_do_cleanup()) {
delete pimpl;
cleanup_counter_--;
return;
}

try {
world.gop.lazy_sync(id, [pimpl]() {
delete pimpl;
Expand Down
Loading