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 

dot_product crashes, bug in FTN95?

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



Joined: 20 Sep 2007
Posts: 2

PostPosted: Wed Oct 03, 2007 8:01 pm    Post subject: dot_product crashes, bug in FTN95? Reply with quote

Hello, there seems to be a problem with the intrinsic dot_product. The following program crashes in the line dp2=dot_product(vector1,sum(matrix,2)), which I think is a legal Fortran statement. Any thoughts?

program dot_product_crash
implicit none
integer, parameter :: wp=selected_real_kind(15)
real(wp) :: matrix(2,2), vector1(2), vector2(2), dp1, dp2

matrix(1,1) = 1.0_wp
matrix(1,2) = 2.0_wp
matrix(2,1) = 3.0_wp
matrix(2,2) = 4.0_wp
vector1(1) = 1.0_wp
vector1(2) = 1.0_wp

! I want to compute the dot product of vector1 and vector2 := sum(matrix,2)

! Method 1: Compute vector2 first
vector2 = sum(matrix,2)
dp1 = dot_product(vector1,vector2)
write(*,*) 'dp1 =', dp1

! Method 2: Compute everything at once
dp2 = dot_product(vector1,sum(matrix,2))
write(*,*) 'dp2 =', dp2


end program dot_product_crash
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Thu Oct 04, 2007 7:16 am    Post subject: Reply with quote

Yes I think you have found an FTN95 bug here.
We will take a look at it.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Sat Dec 22, 2007 4:13 pm    Post subject: Reply with quote

This bug has now been fixed for the next release of FTN95.
Back to top
View user's profile Send private message AIM Address
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