[MPICH] Debugging MPICH2 apps on Windows

David Ashton ashton at mcs.anl.gov
Wed Apr 5 12:43:23 CDT 2006


Calin,

1) When you use the environment variables in setmpi2.bat the idea is that
you would start a debugger for each process.  If you do this on more than
one machine then you must modify the environment variable, PMI_ROOT_HOST, to
point to the host where the first process runs.  From inside the debugger,
the root process must call MPI_Init first because it must be waiting for
incoming connections before any of the rest of the processes attempt to
connect.  If you restart any process you must restart all the processes.

2) winconfigure does not support --enable-debugger.  This option is for
debugging queues that are used by third party debuggers like totalview.
Don't set HAVE_DEBUGGER_SUPPORT under Windows because it is not supported.

3) Visual Studio 2005 can debug MPICH2 applications natively.
http://msdn2.microsoft.com/en-us/library/ms164731(en-us,vs.80).aspx

4) If you can modify smpd to use SetProcessWindowStation and
OpenWindowStation, please do so and post the patch.  I've tried this
approach various times without success.  The problem I ran into was that the
security token for the visible console desktop and window station must be
modified to allow access to the process started by the smpd process manager
service.  If you can find a way to marshal these tokens and handles around
please post the information.  Windows has a lot of security stuff preventing
processes in different Windows Stations from accessing each others stuff.

5) Often the best debugger is the printf("msg");fflush(stdout); debugger.

-David Ashton

-----Original Message-----
From: owner-mpich-discuss at mcs.anl.gov
[mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of Calin Iaru
Sent: Wednesday, April 05, 2006 9:50 AM
To: mpich-discuss at mcs.anl.gov
Subject: [MPICH] Debugging MPICH2 apps on Windows

Hi all,


    I have recently encountered some problems debugging MPICH2 
applications. There are a number of ways that parallel debugging can be 
enabled:
    - run as a standalone process via setpmi.bat as described in 
mpich2-doc-windev.pdf
    - run wmpiconfigure.wsf  --enable-debugger and define 
HAVE_DEBUGGER_SUPPORT
    - start each process with mpiexec and have a debugger triggered from 
"Image File Execution Options" registry entry at process startup
All of the above fail. The first one fails even though the two daemons 
are able to communicate. I will look into it.
The second one fails because dbginit.c is not compiled, and is not added 
to the solution by wmpiconfigure.wsf script
The third one, which I use often, does not create a window station so 
the debugger is useless. Maybe, in the future, a Windows switch can be 
passes to mpiexec so that smpd can have the opportunity to create a 
process in a desktop context: OpenWindowStation, 
SetProcessWindowStation, etc

Best regards,
    Calin





More information about the mpich-discuss mailing list