Skip to content

Conversation

@AdmiralKarl
Copy link

Description

In the DomainDecomposition constructor, initMPIGridDims is executed, creating a new communicator with topology information.
When the function DomainDecomposition::readXML is executed, initMPIGridDims is executed a second time, creating another communicator. Since the original communicator is never released, this results in a memory leak.

To fix the problem, a variable was created that indicates whether a communicator has already been created. If this is the case, the previous communicator is then deleted.

Related Pull Requests

none

Resolved Issues

none

How Has This Been Tested?

The program was tested both in cases where initMPIGridDims was executed a second time and in cases where this did not happen, with test code inserted to ensure that the communicator is now created and released correctly.

Documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant