Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

OpenMP and debugging problem

jirina
New Contributor I
562 Views

I am using Visual Studio 2008 and Intel Fortran 11.0.039 [IA-32]. I have a code which reads:

*dec$ if defined (_OPENMP_)
*$omp parallel if ( enableOpenMP ) num_threads ( threads ) default ( shared )
*$omp& private
*$omp& ( i, j, k )

*$omp do
*dec$ end if
do i=2,nx-1

do j=2,ny-1
do k=2,nz-1

if ( type(i,j,k).eq.-3 ) then

...

If _OPENMP_ is specified as the preprocessor definition and I set a breakpoint to the line with the if statement, the debugger shows that i, j and k are 0. The logical variable enableOpenMP is .FALSE. . If I remove the preprocessor definition _OPENMP_ from project's properties and disable processing OpenMP directives, the debugger shows i, j and k equal to 2 when the breakpoint is hit for the first time.

Does this mean that there is a potential problem with debugging programs which use OpenMP?

0 Kudos
0 Replies
Reply