[mpich-discuss] How can I debug MPI program
Pavan Balaji
balaji at mcs.anl.gov
Fri Jul 29 10:20:48 CDT 2011
Ok, great. Note that in my example below I split out the two processes,
so you can decide which one you want to attach gdb to.
-- Pavan
On 07/29/2011 09:52 AM, clara wrote:
> Thank you so much.
>
> I use the below commandline and can debug now.
> mpiexec -n 2 xterm -e gdb cg.S.2
>
>
> On Thu, Jul 28, 2011 at 9:44 AM, Pavan Balaji<balaji at mcs.anl.gov> wrote:
>>
>> On 07/28/2011 12:15 AM, clara wrote:
>>>
>>> I see. I find mpich2-1.2 supports -gdb, doesn't it?
>>
>> mpich2-1.2 had MPD as the default process manager. That was changed to Hydra
>> in 1.3 and mpd deprecated.
>>
>>> Btw, for the current hydra process manager, we can use totalview to
>>> debug program, don't you?
>>
>> Yes, totalview, ddt, ddd are all fine. The native gdb itself is supported as
>> well. You can even use it as:
>>
>> % mpiexec -n 1 xterm -e gdb cg.S.2 : -n 1 xterm -e gdb cg.S.2
>>
>> The "-gdb" option within mpd, on the other hand, isn't the native gdb. MPD
>> had its own gdb terminal implemented internally which used to manage many
>> independent native gdb's. That option is currently not available (till we
>> add it).
>>
>> -- Pavan
>>
>> --
>> Pavan Balaji
>> http://www.mcs.anl.gov/~balaji
>>
--
Pavan Balaji
http://www.mcs.anl.gov/~balaji
More information about the mpich-discuss
mailing list