- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
***********
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
***********
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page