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.
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.
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).