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

"Stack trace terminated abnormally": what does this mean?

MR
Beginner
6,536 Views

Hi,

running a code compiled with -check all I see various warnings concerning the creation of some temporaries (I know about them and I am fine with them) and somehow interspersed in the ouput various lines saying

Stack trace terminated abnormally.

What does this mean? Notice that I do see a traceback for the warnings, but this line has no traceback.

I am using "Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0 Build 20141023"

Thank you, Marco

0 Kudos
9 Replies
MR
Beginner
6,536 Views

I should add that the stack trace message disappears if I complie with

ifort -check all -check noarg_temp_created

 

0 Kudos
MR
Beginner
6,536 Views

Oh, yet another remark: the message appears when warnings are emitted *and* I compile with -pg; without pg the warnings are emitted with no stack trace message.

0 Kudos
Steven_L_Intel1
Employee
6,536 Views

The message generally means that the stack has been corrupted. The message disappears because you turned off the run-time check that caused the traceback to be emitted. So maybe the profiling is corrupting the stack. Can you provide a test case we can look at?

0 Kudos
MR
Beginner
6,536 Views

Steve, thank you for the xplanation. Unfortunately it is not so easy isolating a test case, but I will see if I can come up with something.

Anyway, if I understand you correctly it is not a message which is pointing at some problem in my code, at least not directly, right?

Marco

0 Kudos
Steven_L_Intel1
Employee
6,536 Views

Not directly - but possibly indirectly.

0 Kudos
MR
Beginner
6,536 Views

Hi, so here is an example; the muber of warnings must be large in order to see the "Stack trace terminated abnormally.", hence the loop.

To see the problem, -pg is required:

$ ifort -g -O0 -check all -pg test.f90 -o test

$ ifort -V
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0 Build 20141023

module m
implicit none
contains

 subroutine ws(x)
  integer, intent(in) :: x(3)
   write(*,*) "The sum is ", sum(x)
 end subroutine ws

end module m

program p
 use m
 implicit none

 integer :: i, z(3)

 z = (/ 1 , 2 , 3 /)

 do i=1,1000 ! this upper bound must be large to see the problem
   call ws( z( (/ 3 , 2 , 1 /) ) )
 enddo

end program p

 

0 Kudos
MR
Beginner
6,536 Views

Hi, since I see no reply, which is very unusual on this forum, I thought maybe I could bring this up again. Can anybody reproduce the problem?

Thank you, Marco

0 Kudos
Steven_L_Intel1
Employee
6,536 Views

No, I can't, even with the exact command you specify.

0 Kudos
MR
Beginner
6,536 Views

OK, thanks, than it must be related somehow to my setup.

Marco

0 Kudos
Reply