I want to debug a c++ code with Netbeans. I can use the debugger in sequential mode but I dont know how to debug it when I want to run it in parallel. I would be grateful if anyone help me on this problem.

  • $\begingroup$ What kind of parallel, threads, MPI, something else? $\endgroup$ – Bill Barth Nov 28 '14 at 18:05
  • $\begingroup$ I use MPI for parallelism. $\endgroup$ – Nazi Nov 29 '14 at 2:08

Debugging MPI programs is not easy. I used NetBeans for a while until I had to use distributed parallel programming a lot as the convenience of having this particular IDE decreased significantly.

For debugging parallel codes, usually, a special tool like TotalView or DDT is used. However, that detaches from IDE.

Some people have success with Eclipse Parallel Tools Platform (PTP). That brings a parallel debugger closer to the IDE.

However, that does not answer your specific question. In Netbeans, you would certainly be able to compile and run the code by changing the path to the compiler and run command accordingly. Unfortunately, the debugger is not attached. Technically, one can attach a serial debugger (say, gdb) to an MPI code. But NetBeans (in March 2018) does not have a plugin, like Eclipse PTP, to support an interface to it, even if user magically does the attachment of the debugger to the running code.

BTW, the following FAQ on open-mpi.org provides you with a lot of answers on MPI debugging, including ways to attach gdb to your MPI code (Q6).

| cite | improve this answer | |
  • $\begingroup$ Seconding the use of TotalView where you have access to it and gdb where you don't $\endgroup$ – sssssssssssss Mar 16 '18 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.