From 937c494bc4ecab316b0aa1d37079ea42bcea93e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawela?= Date: Wed, 6 Mar 2024 20:40:08 +0100 Subject: [PATCH] fix caches --- Project.toml | 1 + src/SpinGlassEngine.jl | 1 - src/contractor.jl | 3 ++- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 154778a3..3712ae40 100644 --- a/Project.toml +++ b/Project.toml @@ -27,6 +27,7 @@ Graphs = "1.9" LabelledGraphs = "0.4.4" Memoization = "0.2" MetaGraphs = "0.7" +ProgressMeter = "1.10" SpinGlassNetworks = "1" SpinGlassTensors = "1" Statistics = "1.7.0" diff --git a/src/SpinGlassEngine.jl b/src/SpinGlassEngine.jl index 51b83c10..a75c46fd 100644 --- a/src/SpinGlassEngine.jl +++ b/src/SpinGlassEngine.jl @@ -7,7 +7,6 @@ using SpinGlassNetworks using CUDA using TensorOperations using TensorCast -using NNlib, NNlibCUDA using MetaGraphs using Memoization using LinearAlgebra, MKL diff --git a/src/contractor.jl b/src/contractor.jl index 7b5e8357..a8b38112 100644 --- a/src/contractor.jl +++ b/src/contractor.jl @@ -535,7 +535,8 @@ Note: The memoization ensures that the dressed MPS is only constructed once for ) where T <: AbstractStrategy ψ = mps(ctr, i+1, indβ) - delete!(Memoization.caches[mps], ((ctr, i+1, indβ), ())) + caches = Memoization.find_caches(mps) + delete!(caches[mps], ((ctr, i+1, indβ), ())) if ctr.onGPU ψ = move_to_CUDA!(ψ) end