Skip to content

Commit

Permalink
Fail test with fewer than 0.5 * alloc_limit
Browse files Browse the repository at this point in the history
We currently print out when the allocations are lower than the hardcoded
limit, but we don't enforce changing this. This commit adds a second
test that fails when the measured allocations are fewer than 50 % of the
ones saved in the file
  • Loading branch information
Sbozzolo committed Dec 1, 2023
1 parent a9a35c5 commit 63dc36f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion perf/flame.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ end

# https://github.com/CliMA/ClimaAtmos.jl/issues/827
@testset "Allocations limit" begin
@test allocs allocs_limit[job_id] * buffer
@test 0.5 * allocs_limit[job_id] * buffer <=
allocs
allocs_limit[job_id] * buffer
end

import ClimaComms
Expand Down

0 comments on commit 63dc36f

Please sign in to comment.