[mpich-discuss] Problems with MPI_Pcontrol and MPE2

Brian Wainscott brian at lstc.com
Mon Apr 12 16:11:00 CDT 2010


I posted previously with the subject "MPE logging with OpenMPI" describing some
issues I was having getting MPI_Pcontrol to work.  Anthony Chan suggested I try
MPICH instead of OpenMPI, which I've finally had time to do.  It also doesn't work.

I looked through the source code for mpe2, and suspect I know the issue, and am
looking for help/confirmation/hopefully a fix or workaround:

According to these comments in log_mpi_core.c (src/mpe2/src/wrappers/src):

 * MPI_Init checks for logging control options and environment variables,
 * and MPI_Pcontrol allows control over logging (allowing the user to
 * turn logging on and off).  Note that some routines are ALWAYS logged;
 * principly, these are the communicator constuction routines (needed to
 * avoid using the "context_id" which may not exist in some MPI
 * implementations).

and this comment:

/*
  level = 1 turns on tracing,
  level = 0 turns it off.

  Still to do: in some cases, must log communicator operations even if
  logging is off.
 */
int MPI_Pcontrol( const int level, ... )

I suspect the problem is related to a conflict with MPI_Pcontrol and certain
communicator construction operations?

If tried modifying the problem I am running, in such a way that it should not
create many (any?) communicators after initialization, and then everything
behaves as I'd like: I can call MPI_Pcontrol(0) early on, and later call
MPI_Pcontrol(1) then MPI_Pcontrol(0), and get one nice window into the execution,
without a LOT of stuff I'm not interested in.

With my original problem, which does create communicators, I call MPI_Pcontrol(0)
right after initialization, then MPI_Pcontrol(1) later, then immediately get this
error:

clog_commset.c:CLOG_CommSet_get_IDs() -
        PMPI_Comm_get_attr() fails!



I tried putting calls to MPI_Pcontrol(1) just before (and MPI_Pcontrol(0) just
after) every call to MPI_COMM_CREATE/MPI_COMM_DUP/MPI_COMM_FREE, but that didn't
work (or maybe I missed one....)  Or maybe this is a red herring, and the smaller
problem ran for some other unrelated reason.

Suggestions of anything else to try?

Does anyone know exactly WHICH calls must always be made?  It should be a simple
matter to ignore the "is_mpilog_on" flag for just a few calls, if that is all
that is needed....I just need to know WHICH ones.

Thanks!

Brian



More information about the mpich-discuss mailing list