I ran into problems using the function dot_product with 64 bit.
See the following testprogram:
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