Skip to content

Commit f2d1255

Browse files
Relax allocatin tests for v1.11
1 parent 3e00302 commit f2d1255

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/time_evolution/time_evolution.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,16 +213,16 @@ struct DiscreteLindbladJumpCallback <: LindbladJumpCallbackType end
213213
ContinuousLindbladJumpCallback(; interp_points::Int = 10) = ContinuousLindbladJumpCallback(interp_points)
214214

215215
function _check_tlist(tlist, T::Type)
216-
tlist = convert(Vector{T}, tlist) # Convert it to support GPUs and avoid type instabilities for OrdinaryDiffEq.jl
216+
tlist2 = convert(Vector{T}, tlist) # Convert it to support GPUs and avoid type instabilities for OrdinaryDiffEq.jl
217217

218218
# Check if the list of times is not empty
219-
isempty(tlist) && throw(ArgumentError("The list of times must not be empty."))
219+
isempty(tlist2) && throw(ArgumentError("The list of times must not be empty."))
220220
# Check if the list of times is sorted
221-
!issorted(tlist) && throw(ArgumentError("The list of times must be sorted."))
221+
!issorted(tlist2) && throw(ArgumentError("The list of times must be sorted."))
222222
# Check if the list of times is unique
223-
length(tlist) != length(unique(tlist)) && throw(ArgumentError("The list of times must be unique."))
223+
length(tlist2) != length(unique(tlist2)) && throw(ArgumentError("The list of times must be unique."))
224224

225-
return tlist
225+
return tlist2
226226
end
227227

228228
#######################################

test/core-test/time_evolution.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777

7878
allocs_tot = @allocations sesolve(H, ψ0, tlist, saveat = [tlist[end]], progress_bar = Val(false)) # Warm-up
7979
allocs_tot = @allocations sesolve(H, ψ0, tlist, saveat = [tlist[end]], progress_bar = Val(false))
80-
@test allocs_tot < 100
80+
@test allocs_tot < 112
8181
end
8282

8383
@testset "Type Inference sesolve" begin
@@ -288,21 +288,21 @@
288288

289289
allocs_tot = @allocations mesolve(L, ψ0, tlist, e_ops = e_ops, progress_bar = Val(false)) # Warm-up
290290
allocs_tot = @allocations mesolve(L, ψ0, tlist, e_ops = e_ops, progress_bar = Val(false))
291-
@test allocs_tot < 210
291+
@test allocs_tot < 219
292292

293293
allocs_tot = @allocations mesolve(L, ψ0, tlist, saveat = [tlist[end]], progress_bar = Val(false)) # Warm-up
294294
allocs_tot = @allocations mesolve(L, ψ0, tlist, saveat = [tlist[end]], progress_bar = Val(false))
295-
@test allocs_tot < 120
295+
@test allocs_tot < 133
296296

297297
allocs_tot = @allocations mesolve(L_td, ψ0, tlist, e_ops = e_ops, progress_bar = Val(false), params = p) # Warm-up
298298
allocs_tot = @allocations mesolve(L_td, ψ0, tlist, e_ops = e_ops, progress_bar = Val(false), params = p)
299-
@test allocs_tot < 210
299+
@test allocs_tot < 219
300300

301301
allocs_tot =
302302
@allocations mesolve(L_td, ψ0, tlist, progress_bar = Val(false), saveat = [tlist[end]], params = p) # Warm-up
303303
allocs_tot =
304304
@allocations mesolve(L_td, ψ0, tlist, progress_bar = Val(false), saveat = [tlist[end]], params = p)
305-
@test allocs_tot < 120
305+
@test allocs_tot < 133
306306
end
307307

308308
@testset "Memory Allocations (mcsolve)" begin

0 commit comments

Comments
 (0)