Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-user] Eclipse PTP : debugging with OpenMP and switching between threads

Hi,

For running/debugging an OpenMP program on your local machine (the one running Eclipse), using the C/C+ Application launch configuration (which is provided by the CDT project) like you are doing is probably the best way. Note that when you set a breakpoint using the CDT debugger, make sure you use a C/C++ Breakpoint, not a Parallel Breakpoint (which have different icons). You can change this by right clicking on the left-hand marker bar in the editor (the one where breakpoints are shown) and selecting Breakpoint Type>C/C++ Breakpoint.

I believe you should be able to see the thread stack and control a thread like a process. However, thread support is entirely dependent on the version of gdb you have installed. Later versions of gdb provide better thread support than earlier versions. If you have questions about debugging using the CDT debugger, you should direct these to the CDT mailing list/forum.

For running/debugging a mixed MPI + OpenMP application, you should use one of the PTP resource managers that matches your system configuration. Your debugging capability will vary depending on the type of runtime system and resource manager you have on the machine. 

Regards,
Greg

On Jan 16, 2012, at 7:00 AM, Franck Houssen wrote:

Hello,

I use Ubuntu 11.10 and my version of Eclipse is : Eclipse IDE for Parallel Application Developers, Version: Indigo Service Release 1, Build id: 20110916-0149.

I am new to Eclipse. I created a makefile project (with debug flag : g++ -g -openmp) to compile an OpenMP program : compiling is OK (and run outside eclipse in an xterm is OK).
I have 2 questions about running / debugging OpenMP in Eclipse :
  1. To run a simple OpenMP project, am I supposed to create a "local" or a "parallel" application configuration ? My understanding is that when using only OpenMP (as I do here) local configuration are the one to use, but, when using both OpenMPI + OpenMP parallel configuration are the one to use (because of MPI). Am I right ? If not, which kind of resource manager should be created to handle OpenMP (I have no OpenMP resource manager available) ?
  2. When debugging a simple OpenMP project, is possible to switch between threads (at the same time, current line code may not be the same for each thread) ? I believed it could be possible to follow OpenMP threads in the same way that it is possible to follow OpenMPI processus : is this possible ? As point 1 mentions it, I use a local configuration and -g when compiling to enable accessing thread stack : when debugging I see the 4 threads of my PC but I can only access the main thread (see attached pictures - threads 2 and 3 behave like thread 4 : impossible to access any level of the thread stack)


Regards,


FH

<DebugThread1.png><DebugThread4.png>_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-user


Back to the top