Paul,
I have a severe problem with the Silverfrost Win32 Debugger. I am running a very large code with a specific data case. Using just the compiler with standard options gives correct results. However, when using
/checkmate /Full_Debug
the code crashes with the error message
“Error 429, Internal Error: stack pointer corrupt”
I have tried for days to find an error but I could only localize, that obviously –according to the debugger message- an error occurs in an internal subroutine consisting of a single line
dx (1:n) = - MatMul ( B_m1 (1:n, 1:n), F_new (1:n) )
(see the full subroutine below). The two arrays used as input to matmul are defined by the hosting subroutine, where they are dummy arguments. In fact they are array sections defined by the calling subroutine. The bounds reported by the debugger are B_m1 (3919408,356) and F_new (1:92861985) instead of the correct bounds (1:40,1:40) and (1:40), respectively. The elements are – again according to the debugger- either marked as “defined”, as “undefined” or as “Illegal pointer”. None of the numbers reported are correct. The resulting dx is completely wrong.
I have tried to check this internal subprogram by additional output:
Subroutine SolutionA1_dx
Implicit None
write (*,*) Allocated (B_m1)
write (*,*) Allocated (F_new)
write (*,*) 'lower bound index 1= ', lbound (B_m1,1)
write (*,*) 'lower bound index 2= ', lbound (B_m1,2)
write (*,*) 'upper bound index 1= ', ubound (B_m1,1)
write (*,*) 'upper bound index 2= ', ubound (B_m1,2)
write (*,*) 'lower bound index 1= ', lbound (F_new)
write (*,*) 'upper bound index 1= ', ubound (F_new)
write (*,*) B_m1 (1:n, 1:n),
Write (*,*) F_new (1:n)
-1
--- Solution of equation dx = -B * F (Eq. 9.7.19, p. 382)
dx (1:n) = - MatMul ( B_m1 (1:n, 1:n), F_new (1:n) )
Write (*,*)
Write (*,*)
Write (*,*) 'n = ', n
Write (*,*)
Write (*,*) 'dx = ', dx (1:n)
stop
End Subroutine SolutionA1_dx
The output gives completely correct results. The arrays exist, the bounds as well as the numbers are correct.
There is complete disagreement between the output and the debugger results.
I have further moved the statement from the internal subroutine to the hosting subroutine. Again I have tested by output the correct definition of bounds and values of the two input fields to matmul as well as the array dx. Everything is correct. The debugger reports the input arrays with correct values but wrong upper bound: 41 instead of 40. The output of dx reported is completely wrong again.
Has such a behavior been observed elsewhere and what further steps could I do?
Best regards,
- Lassmann