Skip to content
Snippets Groups Projects
Commit 0dfcb57b authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Fix memory leak.

parent 46c851c8
No related branches found
No related tags found
No related merge requests found
......@@ -690,7 +690,7 @@ int * commInqNodeSizes ( void )
// collective call
void commDefCommsIO ( void )
{
MPI_Group groupGlob, currGroupIO;
MPI_Group groupGlob;
int collID, * ranks, i, currIORank;
char name[MAXCOMMIONAME];
......@@ -718,6 +718,7 @@ void commDefCommsIO ( void )
{
currIORank = info->nodeMap[collID];
* ( ranks + info->nProcsModel ) = currIORank;
MPI_Group currGroupIO;
xmpi ( MPI_Group_incl ( groupGlob, info->nProcsModel + 1,
ranks, &currGroupIO ));
xmpi ( MPI_Comm_create ( info->commGlob, currGroupIO,
......@@ -732,6 +733,7 @@ void commDefCommsIO ( void )
sprintf ( &name[8], "%d", collID );
xmpi ( MPI_Comm_set_name ( info->commsIO[collID], name ));
}
xmpi(MPI_Group_free(&currGroupIO));
}
if ( ddebug >= 2 )
......@@ -743,7 +745,6 @@ void commDefCommsIO ( void )
xdebugComm ( &info->commCalc );
}
xmpi ( MPI_Group_free ( &currGroupIO ));
xmpi ( MPI_Group_free ( &groupGlob ));
free ( ranks );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment