Using Nsight Eclipse Edition 10.2 to debug a plain C++ code using gdb 7.11.1.
The code uses a pragma call to OpenMP for forking a for-loop.
The following is a minimal working example,
where a simple array q
is filled with values of another variable p
:
#pragma omp parallel for schedule (static)
for(int p=pstart; p<pend; p++){
const unsigned i = id[p];
if(start <= i && i < end)
q[i - start] = p;
}
In debug mode I would want use the step-in function (classically F5) to follow how the array q
gets filled in with p
's. However, that steps over the for loop altogether, and resumes where the parallel threads join again.
Is there a way to force stepping into a pragma directive/openMP loop?