[mpich-discuss] Problems with MPI_Pcontrol and MPE2

chan at mcs.anl.gov chan at mcs.anl.gov
Wed Apr 14 13:13:18 CDT 2010


Hi Brian,

MPE logging needs to know that the user program makes communicator
creation calls, e.g. MPI_Comm_create/MPI_Comm_split/MPI_Comm_dup,....
otherwise any subsequent MPI calls that uses these communicators
can't be logged by MPE.  There is a mechanism in MPE that bypasses
the actual logging but still keeps track of communicator 
creation/destruction.  It is likely the mechanism has bug.
Do you have a small program that shows your use of communicators
so I can make sure whatever fixes that I applied will solve your
problem ?

PS. Thanks for spending time to track down the problem.

A.Chan
----- "Brian Wainscott" <brian at lstc.com> wrote:

> 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
> 
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss


More information about the mpich-discuss mailing list