Skip to content

Commit 1e8e81b

Browse files
Add broken allocation tests
1 parent b521958 commit 1e8e81b

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

test/Spaces/distributed/ddss2.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ include("ddss_setup.jl")
3535
yarr2 = parent(y2)
3636

3737
Spaces.weighted_dss!(y0) # current DSS
38+
p = @allocated Spaces.weighted_dss!(y0) # current DSS
39+
@test_broken p == 0
40+
3841
Spaces.weighted_dss2!(y2) # DSS2
42+
p = @allocated Spaces.weighted_dss2!(y2)
43+
@test_broken p == 0
3944
#=
4045
[18.5, 5.0, 9.5, 18.5, 5.0, 9.5, 18.5, 5.0, 9.5, 9.5, 14.0, 18.5, 9.5, 14.0, 18.5, 9.5, 14.0, 18.5,
4146
18.5, 23.0, 27.5, 18.5, 23.0, 27.5, 18.5, 23.0, 27.5, 27.5, 32.0, 18.5, 27.5, 32.0, 18.5, 27.5, 32.0, 18.5]
@@ -59,8 +64,14 @@ end
5964
y0 = init_state.(Fields.local_geometry_field(space), Ref(nothing))
6065
yx = copy(y0)
6166
y2 = deepcopy(y0)
67+
6268
Spaces.weighted_dss!(y0)
69+
p = @allocated Spaces.weighted_dss!(y0)
70+
@test_broken p == 0
71+
6372
Spaces.weighted_dss2!(y2)
73+
p = @allocated Spaces.weighted_dss2!(y2)
74+
@test_broken p == 0
6475

6576
@test yx y0
6677
@test yx y2

test/Spaces/distributed/ddss3.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,15 @@ partition numbers
7070

7171
y2 = deepcopy(y0)
7272
yarr2 = parent(y2)
73+
7374
Spaces.weighted_dss!(y0)
75+
p = @allocated Spaces.weighted_dss!(y0)
76+
@test_broken p == 0
77+
7478
Spaces.weighted_dss2!(y2)
79+
p = @allocated Spaces.weighted_dss2!(y2)
80+
@test_broken p == 0
81+
7582
#! format: off
7683
if pid == 1
7784
@test yarr[:] == [1.0, 2.0, 6.5, 4.0, 5.0, 9.5, 22.0, 23.0, 27.5, 6.5, 11.0, 15.5, 9.5, 14.0, 18.5, 27.5, 32.0, 34.25,

test/Spaces/distributed/ddss4.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,15 @@ include("ddss_setup.jl")
1919

2020
y2 = deepcopy(y0)
2121
yarr2 = parent(y2)
22+
2223
Spaces.weighted_dss!(y0)
24+
p = @allocated Spaces.weighted_dss!(y0)
25+
@test_broken p == 0
26+
2327
Spaces.weighted_dss2!(y2)
28+
p = @allocated Spaces.weighted_dss2!(y2)
29+
@test_broken p == 0
30+
2431
passed = 0
2532
#=
2633
output from single process run:

0 commit comments

Comments
 (0)