Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: Fwd: [ptp-dev] Question about the process set of ptp debugger

Greg Watson wrote:
Clement,

Can you help out with this? I presume he's using PTP 1.1.

Greg

Begin forwarded message:

From: jiangyangtz <yangtzj@xxxxxxxxxxx>
Date: June 6, 2007 9:55:39 PM MDT
To: <ptp-dev@xxxxxxxxxxx>
Subject: [ptp-dev] Question about the process set of ptp debugger
Reply-To: Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>

Hi all,

Hi Jie,

   What version of ptp are you using now?

Recently I have encounted a confusing problem about the process set operation when dealing with ptp parallel debugger.
 Let me describe the problem first.
I have a parallel job with 4 processes and group process 0,1 and 2 to process set 0. Now I have two process sets: set0 and the Root set. Then I set a line breakpoint on process set0,i.e on process 0,1,2. Everything goes well by now. Then when I try to set a line breakpoints on the Root set, The UI pops a dialog window with the following message: "Error on task:0-3"

I tested on ptp 1.1 version and I didn't get the problem you mentioned.
 What causes this error?
After tracing the execution of "sdm" client, we find that for the second debug request (setting line breakpoint on Root set), there are two responses from sdm client to UI. One response contains process 0,1,2 and the other contains process 3.

If there are two process sets, sdm will send two events to UI.  From
your case, the problem seems on UI side because you still got two events
from sdm.
For the second debug request, when all 4 processs return their replies, sdm client tries to respond t o UI. However, there are two HashEntry entries in the current "r->events" hash table. One entry is for process 0,1,2 and th other entry for process 3. This is caused by the fact that the hash value of the debug message from process 3 is different from the one for process 0,1,2 since the current breakpoint number of process 3 is 1 while the current breakpoint number of process 0,1,2 is 2.
 It is the two hash entries that cause two reponses to UI.

So, does this mean that a process cann't belong to more than 1 process set?
 Or two process sets in a job cann't have common elements?
Or more, it is not allowed to change a process from one process set to another process set duing a debug session?
Even if there are two events from sdm, the breakpoint id should be the same.


For example, UI requested to set breakpoint for process set "root"
(0-3).  "SetBreakpoint" command will be sent to sdm which is contained
process (0-3).  In the first event back, this event only contains
process (0-2).  Then UI will still be waiting until all processes (0-3)
got the event back.  When UI is received the second event, UI will check
whether the process of "SetBreakpoint" command is the same as the
process of the total events back from sdm.  If they are the same, then
UI will set breakpoint on source editor.  If UI does not receive any
event back within a specified time, it will throw a timeout exception.


Each process can be added / removed in a process set in any time.
However, I found a bug on setting breakpoint in a process set.

For example:

for (int i=0; i<10; i++) {
   printf("test a");
   printf("test b");
}

If set0 set a breakpoint on line "test a" and root set a breakpoint on
line "test b", a debugger should stop on line "test a" (0, 1, 2) and
"test b" (3).  If I remove process (1, 2) from set0, then only process
(0) should be stopped on line "test a" on next time.  The bug is that
process (0, 1, 2) still stop on line "test a".   I will fix this problem
on the latest  ptp version.

Regards,
Clement

 Regards,
Jie

通过 Windows Live Spaces 与朋友轻松共享您的生活。 立即尝试!
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev




--
Clement Kam Man Chu
Research Assistant
School of Computer Science & Software Engineering
Monash University, Caulfield Campus
Ph: 61 3 9903 2355





Back to the top