Trixi.jl
Trixi.jl copied to clipboard
Trixi displays local, and not global, number of elements / DOFs
When doing parallel computations with Trixi, I noticed that the local number of elements or degrees of freedom, and not the global number, is printed.
For example:
mpiexec() do cmd
run(`$cmd -n 2 $(Base.julia_cmd()) -e 'using Trixi; trixi_include("Trixi.jl/examples/p4est_2d_dgsem/elixir_euler_sedov.jl")'`)
end
runs a 2D P4est example with 256 elements and 6400 DOFs on 2 processes, and the output is:
[...]
│ SemidiscretizationHyperbolic │
[...]
│ total #DOFs: ……………………………………………… 3200 │
[...]
│ P4estMesh{2, Float64} │
[...]
│ current #cells: ……………………………………… 128 │
Likewise the analysis callback prints:
[...]
#DOF: 3200 alloc'd memory: 343.208 MiB
#elements: 128
[...]
I would have expected to see the global number. So, this is just a question whether displaying the local number is intended.
I think both numbers would be interesting. @sloede?
I have stumbled across this issue before as well. Thus I agree, it would be great if we could show the global counts instead of the rank 0 counts in the aforementioned locations. Would you be willing to create a PR for this, @bgeihe? I'd be happy to assist in case of questions.
Sure!
But to clarify: Show global numbers instead of local ones? OR Show global and local numbers?
To me, showing only the global numbers makes more sense. I am not sure exactly how much information one can gain from only knowing the local number of elements/DOFs on rank 0 🤷♂️