Hi Uri, Just to briefly add to what Thomas and Hartmut mentioned-
There is, indeed a command-line option to attach a debugger. Using it, however, isn't completely obvious. Based on some previous direction provided to me by Thomas, attaching a debugger (at least at startup) involves: - invoking the hpx application with the option --hpx:attach-debugger, hpx will suspend execution, entering into a sleep state loop - attach gdb to the applicable process id - identify the correct stack frame containing the suspension routine with a backtrace. Look for hpx::util::attach_debugger (). change to the applicable stack frame - in that stack frame, set variable i = 1 - at this point, set breakpoints and continue and/or step through execution This info should definitely be added to the documentation.... Regards, Michael > -----Original Message----- > From: [email protected] [mailto:hpx-users- > [email protected]] On Behalf Of Thomas Heller > Sent: October-05-16 3:44 PM > To: [email protected]; [email protected] > Subject: Re: [hpx-users] Debug with HPX > > On Mittwoch, 5. Oktober 2016 13:20:39 CEST Hartmut Kaiser wrote: > > Uri, > > > > > I skimmed the HPX manual and paper but didn't see any mention of > > > support for debug. Is there any easy way to attach a debugger in an > > > HPX application to reproduce a problem? > > > > An HPX application is just another executable launched once per HPX > > locality on one of the nodes. Thus the same rules/possibilities apply > > as for any other distributed application. Use whatever debugger you're > > comfortable with. > > > > We have recently started to work on extending gdb with HPX specific > > things (pretty printers, thread management, etc.) but this is in early alpha. > > Parsa Amini is the developer here, I will make sure he responds separately. > > In addition to that, parallel debuggers like DDT tend to work just fine with > HPX (it's just yet another executable after all). We are constantly improving > the debugging experience for HPX. In general, there is a little steeper > learning curve due to the user level threading. > Any feedback on the available debugging support we have is greatly > appreciated. Or any directions you would like to see debugging support to > move to. > > > > > HPX itself has a command line option > > --hpx:attach-debugger=[startup|exception] allowing to stop the process > > in either at startup or in case of an unhandled exception. This might > > be useful to get gdb attached to a life application. > > > Is there any support for logging > > > messages so that a process can be replayed later without bringing up > > > the whole system? > > > > The command line option --hpx:debug-hpx-log=<file> enables logging. > > While this is very verbose it will probably not be sufficient to 'fully replay' > > all of the activity post-mortem. > > Core Dumps can be analyzed post mortem just as fine. > > > > > HTH > > Regards Hartmut > > --------------- > > http://boost-spirit.com > > http://stellar.cct.lsu.edu > > > > > > > > _______________________________________________ > > hpx-users mailing list > > [email protected] > > https://mail.cct.lsu.edu/mailman/listinfo/hpx-users > > > _______________________________________________ > hpx-users mailing list > [email protected] > https://mail.cct.lsu.edu/mailman/listinfo/hpx-users _______________________________________________ hpx-users mailing list [email protected] https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
