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 

Bug in dot_product when compiled with /64

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
Ralf



Joined: 30 Aug 2007
Posts: 50
Location: munich

PostPosted: Fri Mar 10, 2017 10:00 am    Post subject: Bug in dot_product when compiled with /64 Reply with quote

I ran into problems using the function dot_product with 64 bit.

See the following testprogram:

Code:
      program test_dot_product
     
      real :: u(3) = (/ 1.0, 1.0, 0.0 /)
      real :: v(3) = (/ 1.0, 0.0, 0.0 /)
      real :: dotp
           
      dotp = u(1)*v(1) + u(2)*v(2) + u(3)*v(3)
      write(*,*)'Dot Product:',dotp
     
      dotp = dot_product(u,v)
      write(*,*)'dot_product:',dotp
     
      stop
      end

Compiled as 32 bit, both calculations of dotp give the correct answer (1.0),
but compiled with /64 the function dot_product returns a value of 3.0
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Mar 10, 2017 11:03 am    Post subject: Reply with quote

I have noted this as a bug.
A temporary work-around is to use double precision.
Back to top
View user's profile Send private message AIM Address
Andre



Joined: 19 Jan 2017
Posts: 14

PostPosted: Fri Mar 10, 2017 11:14 am    Post subject: Reply with quote

Or just use
Code:
sum(u*v)
instead.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Mar 13, 2017 12:44 pm    Post subject: Reply with quote

This bug has now been fixed in salflibc64.dll.

The fix is included in a new set of DLLs that is available via the following link. Please make sure that you keep a backup of your original Silverfrost DLLs.

https://www.dropbox.com/s/93ikhswrxul5bjn/newDLLs4.zip?dl=0
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 -> 64-bit 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