forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem “Automatic_Array”:

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
KL
Guest





PostPosted: Mon Dec 04, 2006 1:11 pm    Post subject: Problem “Automatic_Array”: Reply with quote

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 (Smile :: 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 (Smile :: 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

PostPosted: Tue Dec 05, 2006 1:13 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
KL
Guest





PostPosted: Thu Dec 07, 2006 11:11 am    Post subject: Reply with quote

Dear Robert,

how can I get a personal edition?

Best Regards

Klaus Lassmann
Back to top
KL
Guest





PostPosted: Thu Dec 14, 2006 10:47 am    Post subject: Download Personal Edition Reply with quote

Dear Robert,

I have managed to download the personal edition.

Klaus
Back to top
KL
Guest





PostPosted: Mon Dec 18, 2006 10:28 am    Post subject: Automatic Array Reply with quote

I have run the problem with FTN95 v5.0. The problem still exists.

Klaus Lassmann
Back to top
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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