[mpich-discuss] too many communicators

Jim Dinan dinan at mcs.anl.gov
Thu Dec 13 09:40:23 CST 2012


Hi Jack,

It sounds like your application, or maybe the solver, is leaking 
communicators somewhere.  If you configure with --enable-g=handlealloc 
(or --enable-g=all), MPICH will issue warnings about leaked MPI objects 
when your program exits.

  ~Jim.

On 12/12/12 6:47 PM, Dave Goodell wrote:
> On Dec 13, 2012, at 5:23 AM GMT+09:00, Jack Lee wrote:
>
>> What I'd like to determine first is whether fault is on my side (e.g. perhaps I'm not calling the clean-up routines properly). Is there a way to find out how many context id's are in use at a given point?
>
> If your MPICH was configured with "--enable-g=log" (or a superset thereof, such as "=all"), then you can add the following prototype into your application and invoke this function to get a string showing the current bit-vector state on a given process:
>
> ----8<----
> static char *MPIR_ContextMaskToStr(void);
> ----8<----
>
> see src/mpi/comm/commutil.c for more insight into how this works and what it's actually telling you.  This wiki node also has some useful (and only slightly stale) information:
>
> http://wiki.mpich.org/mpich/index.php/Communicators_and_Context_IDs
>
> I wish I had a better option for you, but without just rolling up your sleeves and hacking on the MPICH code, this is about as good as you're likely to get.
>
> The next best approach would probably be to trap all the communicator creation/destruction calls that you can think of (see the MPI-2.2 standard, chapter 6) via the PMPI_ profiling interface and log the invocations to look for a mismatch.
>
> -Dave
>
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>



More information about the discuss mailing list