[mpich-discuss] too many communicators
goodell at mcs.anl.gov
Wed Dec 12 18:47:19 CST 2012
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:
static char *MPIR_ContextMaskToStr(void);
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:
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.
More information about the discuss