Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29236 Discussions

IFC 8.1 EM64T version under 64 bit Linux - a bug

mrpresident0002
Beginner
705 Views
rpm -aq | grep intel
intel-iforte8-8.1-024

ifort -O2 -assume byterecl -c genrotv.f90

The subroutine is below. When 'vectin' and 'vectout' are the same, the 'vectout' is incorrect due to improper rearrangement of the inner loop. 'ddot' is just a BLAS function.

genrotv.f90
********
subroutine genrotv(nat,vectin,vectout)
implicit none
INTEGER, PARAMETER :: DP = kind(0.0d0)
integer :: nat,i
real(kind=DP) :: vectin(3,nat), vectout(3,nat), tmp1, tmp2, dg2, ddot
!
do i=1,nat
tmp1 = vectin(1,i)
tmp2 = vectin(2,i)
vectout(1,i) = tmp2
vectout(2,i) = -tmp1
vectout(3,i) = 0.0d0
enddo
dg2 = DDOT(3*nat,vectout,1,vectout,1)
vectout = vectout*(1.0d0/sqrt(dg2))
return
end subroutine genrotv
***********
0 Kudos
1 Reply
Steven_L_Intel1
Employee
705 Views
Please report all bugs to Intel Premier Support.
0 Kudos
Reply