|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
KL Guest
|
Posted: Mon Dec 04, 2006 1:11 pm Post subject: Problem “Automatic_Array”: |
|
|
Dear Paul,
I am not sure whether this is an error. But it seems that automatic arrays are not given correctly by SDBG. When the first program “Automatic-Array” stops, the correct values for dx(1) and dx(2) are printed. However, SDBG gives the values
! dx(1):6.611741e-37
! dx(2):Invalid floating point number
I have run the program with FTN95 Version 4.7 and a bat file:
del comp.lis
del *.obj
del *.exe
ftn95 Automatic_Array.f95 /Checkmate /underflow /Link >> comp.lis
sdbg Automatic_Array.exe
The first program is:
Winapp
Program Automatic_Array
Implicit None
Integer , Parameter :: m = 3
Real , Dimension ( m, m ) :: B
Real , Dimension ( m ) :: x
Integer :: n
B = 1.
x = 2.
n = 2
Call subB
! #########
Contains
Subroutine SubB
Implicit None
! dx is an automatic array
Real , Dimension (n) :: dx
dx (1:n) = - MatMul ( B (1:n, 1:n), x (1:n) )
! The following statement gives the right answer:
write (*,*) 'dx = ', dx
! However, sdgb gives
! dx(1): 6.611741e-37
! dx(2): Invalid floating point number
stop
End Subroutine SubB
End Program Automatic_Array
The second program is similar and shows the same effect:
Winapp
Program Automatic_Array
Interface
Subroutine SubB ( x )
Implicit None
Real , Dimension ( :: x
End Subroutine SubB
End Interface
Implicit None
Integer , Parameter :: m = 3
Real , Dimension ( m ) :: x
Integer :: n
x = 2.
n = 2
Call SubB ( x (1:n) )
! #########
End Program Automatic_Array
Subroutine SubB ( x )
Implicit None
Real , Dimension ( :: x
Real , Dimension (size(x)) :: dx ! dx is an automatic array
dx = x * 0.5
! The following statement gives the right answer:
write (*,*) 'dx = ', dx
! However, sdgb gives
! dx(1): 6.611738e-37
! dx(2): Invalid floating point number
stop
End Subroutine SubB
Best regards
Klaus Lassmann |
|
Back to top |
|
|
Robert
Joined: 29 Nov 2006 Posts: 445 Location: Manchester
|
Posted: Tue Dec 05, 2006 1:13 am Post subject: |
|
|
Klaus
There have been fixes to SDBG and FTN95 that address this sort of problem. The issue may well be fixed in 4.91 (or 5.00). You could download the personal edition to confirm. |
|
Back to top |
|
|
KL Guest
|
Posted: Thu Dec 07, 2006 11:11 am Post subject: |
|
|
Dear Robert,
how can I get a personal edition?
Best Regards
Klaus Lassmann |
|
Back to top |
|
|
KL Guest
|
Posted: Thu Dec 14, 2006 10:47 am Post subject: Download Personal Edition |
|
|
Dear Robert,
I have managed to download the personal edition.
Klaus |
|
Back to top |
|
|
KL Guest
|
Posted: Mon Dec 18, 2006 10:28 am Post subject: Automatic Array |
|
|
I have run the problem with FTN95 v5.0. The problem still exists.
Klaus Lassmann |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|