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

Annoying debugging behaviour

Antoon
Beginner
938 Views

Hi,

While debugging for some more complex statements in VS2005 you have to press the F10 button (step over)many, many times to complete the F90 statement, looks very strange.

E.g. for statement

fac1s =

float(itime -ictime(ic,ids)) &

/

float(ictime(ic,ids+1)-ictime(ic,ids))

you have to press the F10 button 20(!) times in order to complete it, and arrive at the next statement. It looks as if VS2005 is popping a stack, or what. I know for sure that with my previous IDE - Compaq Vis. Fortran 6.0 as part of Vis. Studio C++ - you only had to hit the button once !

Another strange behaviour is debuggingstatements with whole array assignments (size approx. 300). If you step thru a block with onlywhole assigments using F10 button, it takes many, many seconds to complete each indiv. statement. But, when you define a breakpoint just after the block, it immediately jumps to the breakpoint in a split second ??

As both types of behaviourget rather annoying after some time, I would be nice if it's possible to speed things up !

Txs, Antoon

0 Kudos
4 Replies
Steven_L_Intel1
Employee
938 Views

This sounds like a problem we fixed about a year ago. Which specific version of the compiler are you using? (10.?.???)

0 Kudos
IanH
Honored Contributor III
938 Views

This sounds like a problem we fixed about a year ago. Which specific version of the compiler are you using? (10.?.???)

I see similar to what the OP described with 10.1.024. I thought that was the latest in the 10.1 series, but I see a 10.1.025 was released a few months ago, so I'll download and try that.

Elaborating in my case - I need to whack "Step into" multiple times when entering a subroutine that has array sections in its argument lists - apologies if my terminology is not right - something like "call foo(..., bar(:,:,2), ...)".

I also seem to have to step multiple times to get over some statements that are continued over multiple lines and|or contain certain function calls and|or have array sections and|or have have had a breakpoint (apologies for not being very clear what the criteria is to get this behaviour!).

Stepping off a write statement can sometimes result in whacky jumps to a following close statement. Hit step again and you go back to where you expect to be. This can be fun - unexpected trips to strange destinations are often exciting.

I have previously wondered whether some of this behaviour was intentional - figured there must have been something going on at the assembly level within a statement that people might have wanted to be able to conveniently step to.

Thanks

IanH

0 Kudos
IanH
Honored Contributor III
938 Views

Same behaviour seen with 10.1.025. Example code (big_array being allocatable is important):

[cpp]MODULE It
  IMPLICIT NONE 
CONTAINS
  SUBROUTINE SubA(n1, n2, n3, v1, v2)    
    INTEGER, INTENT(IN) :: n1, n2, n3
    REAL, INTENT(OUT) :: v1(n1,n2,n3), v2(n1,n2,n3)    
    !**** 
    v1 = 1.0    ! These lines takes ages to step over
    v2 = 2.0    
  END SUBROUTINE SubA  
END MODULE It

PROGRAM Test
  USE It
  REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: big_array
  INTEGER, PARAMETER :: n1 = 100, n2 = 100, n3 = 2
  !**** 
  ALLOCATE(big_array(n1,n2,n3,2))
  ! Up to nine presses of F11 (step-in) required to get into SubA, F10 
  ! (step-over) can result in jumping ahead to the write (and then back 
  ! again...)
  CALL SubA( n1, n2, n3,  &
      big_array(:,:,:,1),  &
      big_array(:,:,:,2) )      
  WRITE(*,*) 'Hello world'     
END PROGRAM Test[/cpp]

Build log:

Compiling with Intel Fortran Compiler 10.1.025 [IA-32]...
ifort /nologo /Zi /Od /gen-interfaces /stand:f03 /warn:all /module:"Debug" /object:"Debug" /traceback /check:all /libs:static /threads /dbglibs /c /Qvc8 /Qlocation,link,"C:Program FilesMicrosoft Visual Studio 8VCbin" "C:FortranTestTestFortran.F90"
Linking...
Link /OUT:"DebugFortranTest.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"C:FortranTestdebugfortrantest.exe.intermediate.manifest" /DEBUG /PDB:"C:FortranTestdebugfortrantest.pdb" /SUBSYSTEM:CONSOLE /IMPLIB:"C:FortranTestdebugfortrantest.lib" "DebugTestFortran.obj"
Link: executing 'link'

Embedding manifest...
mt.exe /nologo /outputresource:"C:FortranTestdebugfortrantest.exe;#1" /manifest "C:FortranTestdebugfortrantest.exe.intermediate.manifest"

FortranTest - 0 error(s), 0 warning(s)

I haven't been able to reproduce the jumping from READ (oops I think incorrectly said WRITE in the previous post) statements to CLOSE statments in a minimal sample, but it still seems to happen under 10.1.025.

Thanks,

IanH

0 Kudos
Antoon
Beginner
938 Views
Hi Steven,
I am using this version:
Intel Fortran Compiler Integration for Microsoft Visual Studio 2005, 10.1.3885.2005, Copyright (C) 2002-2007 Intel Corporation
Tx, Antoon

0 Kudos
Reply