Trixi.jl
Trixi.jl copied to clipboard
Allocations for Julia built-in @threads in contrast to Polyester @batch
If we use the Julia built-in @threads
instead of the Polyester.jl
by out-commenting the relevant section
https://github.com/trixi-framework/Trixi.jl/blob/3d899bc3a301bdc40fc57afb95ea9e88ab10c459/src/auxiliary/auxiliary.jl#L227-L235
instead of https://github.com/trixi-framework/Trixi.jl/blob/3d899bc3a301bdc40fc57afb95ea9e88ab10c459/src/auxiliary/auxiliary.jl#L245-L247
there are allocations in several elixirs, see a CI run from a hot-fix aimed PR., with very severe ones for the parabolic parts.
Related: https://github.com/trixi-framework/Trixi.jl/issues/1766 and https://github.com/JuliaSIMD/Polyester.jl/issues/128
Does Threads.@threads :static
help at all?
Does
Threads.@threads :static
help at all?
I.e.,
Threads.@threads :static $(expr)
?
As a for loop annotation - e.g., Threads.@threads :static for ...
.
It seemed to do pretty well compared to Polyester in some of my experiments.
Hm interesting, I should be able to change the PR relatively quickly.
Hm, this is not really looking good: https://github.com/trixi-framework/Trixi.jl/pull/1768
:static
is required to make it correct (see https://github.com/trixi-framework/Trixi.jl/pull/1768#discussion_r1420161554) but I would not expect to see a difference in allocations