[MPICH] test/mpi/comm/cmfree.c
Rajeev Thakur
thakur at mcs.anl.gov
Thu Jul 12 17:29:57 CDT 2007
Correction! The test is ok as it is. The comm_split is on a different
communicator. And a comm_free is called at the very end of the program if
comm != null.
Rajeev
> -----Original Message-----
> From: Rajeev Thakur [mailto:thakur at mcs.anl.gov]
> Sent: Thursday, July 12, 2007 5:22 PM
> To: 'Toon Knapen'; 'mpich-discuss at mcs.anl.gov'
> Subject: RE: [MPICH] test/mpi/comm/cmfree.c
>
> Good catch. MPI_Comm_free is collective, so it must be called
> by everyone. Just adding it to the else statements doesn't
> work because the communicator is used there after
> MPI_Comm_split, which is also collective. And you can't
> interleave collectives.
>
> We will fix it somehow or remove the test.
>
> Rajeev
>
>
> > -----Original Message-----
> > From: owner-mpich-discuss at mcs.anl.gov
> > [mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of Toon Knapen
> > Sent: Thursday, July 12, 2007 6:51 AM
> > To: mpich-discuss at mcs.anl.gov
> > Subject: [MPICH] test/mpi/comm/cmfree.c
> >
> > Hi all,
> >
> > IMO test/mpi/comm/cmfree.c in mpich2-1.0.5p4 there is one
> > MPI_Comm_free
> > missing.
> >
> > On line 29, there is a `MPI_Comm_dup(MPI_COMM_WORLD,&comm)`.
> > However the
> > comm that gets created here is only freed if 'rank == dest'
> > on line 54.
> > In all ranks that are not equal to 'dest', the communicator
> > is never freed.
> >
> > Of course, this is not an error (just a leak) but wanted to
> > let you know
> > nevertheless,
> >
> > toon
> >
> >
>
More information about the mpich-discuss
mailing list