Skip to content

Fix/periodic trace

Daniel Lindblad requested to merge fix/PeriodicTrace into master

Fix MPI Issue in DisContField::FindPeriodicTrace which previously caused 'out of memory' issues for very large core counts.

Previous implementation allocated memory NRanks * NPeriodicFaces doubles to distribute local information to all processes using MPI_Sum. New implementation allocates memory NPeriodicFaces doubles to distribute local information to all processes using MPI_Max.

It is worth noting that both the new and old implementation are somewhat sub-optimal. The new implementation simply gives processes that are not part of the periodic boundary access to the same information that processes on the periodic boundary already have. But it could be that processes which are not on the periodic boundary doesn't need this information in the first place, yielding both the new and the old implementation redundant. Testing whether this is necessary is however hard, since enough MPI processes must be launched to ensure that some of them do not participate in the periodic boundary. If all processes participate in the periodic boundary, the routine that is currently implemented is redundant.

Edited by Daniel Lindblad

Merge request reports