Julia sum issue

Can you produce a minimum working example?

Are you sure that M_B_DG_400 is zero everywhere? If it isn’t then the sum wouldn’t be zero of course

julia> sum(x*y for x ∈ 0:1, y ∈ 2:3) # one non-zero value for x
5

julia> sum(x*y for x ∈ fill(0, 2), y ∈ 2:3) # x is all zeros
0