[mpich-discuss] ctrl-c while running mpiexec -gdb

Darius Buntinas buntinas at mcs.anl.gov
Tue Aug 12 14:24:43 CDT 2008


You didn't show the mpiexec command line, but I'm assuming you used the 
-gdb option to mpiexec when you sent the sigint.

Maybe try giving the '-s' option to mpdsigjob.  Otherwise I'm not sure 
how else to send a process a sigint.

If you only have a few processes and you're running them on a local 
machine you could try running individual gdb instances in separate windows:

mpiexec -n 4 xterm -e gdb demo

-d

On 08/12/2008 02:08 PM, Robert Kubrick wrote:
> I tried this:
> 
> my-computer:~ mycomputer$ mpdlistjobs
> jobid    = 6 at mycomputer.local_57025
> jobalias =
> username = mycomputer
> host     = mycomputer.local
> pid      = 15490
> sid      = 15488
> rank     = 1
> pgm      = demo
> 
> jobid    = 6 at mycomputer.local_57025
> jobalias =
> username = mycomputer
> host     = mycomputer.local
> pid      = 15491
> sid      = 15489
> rank     = 2
> pgm      = demo
> 
> jobid    = 6 at mycomputer.local_57025
> jobalias =
> username = mycomputer
> host     = mycomputer.local
> pid      = 15492
> sid      = 15487
> rank     = 0
> pgm      = demo
> 
> mycomputer:~ mycomputer$ mpdsigjob SIGINT -j 6 at mycomputer.local_57025
> 
> 
> But the SIGINT causes a collective abort:
> 
> rank 1 in job 6  mycomputer.local_57025   caused collective abort of all 
> ranks
>   exit status of rank 1: killed by signal 9
> rank 0 in job 6  mycomputer.local_57025   caused collective abort of all 
> ranks
>   exit status of rank 0: killed by signal 9
> 
> 
> 
> 
> On Aug 12, 2008, at 1:24 PM, Darius Buntinas wrote:
> 
>> When you hit ^C from mpiexec (with or without -gdb), mpiexec will kill 
>> all processes and exit.  To send a SIGINT to the processes themselves, 
>> you would need to use mpdsigjob.  First find the jobid using 
>> mpdlistjobs, then send the SIGINT to the job:
>>
>>   mpdsigjob SIGINT -j jobid
>>
>> Give this a try.
>>
>> -d
>>
>>
>> On 08/12/2008 11:23 AM, Robert Kubrick wrote:
>>> When I run a regular program under gdb, ctrl-c returns control to the 
>>> gdb prompt and I can examine the stack of the interrupted process or 
>>> issue any other gdb command on the current process. When running 
>>> mpiexec -gdb, ctrl-c returns to the shell (thus abandoning the gdb 
>>> session).
>>> On Aug 12, 2008, at 10:52 AM, Rajeev Thakur wrote:
>>>> You should be able to type gdb commands at the prompt returned by 
>>>> mpiexec
>>>> -gdb.
>>>>
>>>> Rajeev
>>>>
>>>>> -----Original Message-----
>>>>> From: owner-mpich-discuss at mcs.anl.gov
>>>>> [mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of Robert Kubrick
>>>>> Sent: Monday, August 11, 2008 10:16 PM
>>>>> To: mpich-discuss at mcs.anl.gov
>>>>> Subject: [mpich-discuss] ctrl-c while running mpiexec -gdb
>>>>>
>>>>> In mpiexec -gdb hitting ctrl-c terminates all the processes
>>>>> of the MPI program. I want to read the stack for one of the
>>>>> MPI process while the program is running, is there a way to
>>>>> let ctrl-c return control to gdb rather then quitting the
>>>>> program alltogether?
>>>>>
>>>>>
>>>>
>>
> 




More information about the mpich-discuss mailing list