Skip to content

Commit

Permalink
4.10.11 BUG FIX
Browse files Browse the repository at this point in the history
GM spotted a bug in mt_random/d/c_grnd_{1..7}.
The bug skipped first line in dimensions 2 and 3 (for rank>1).
Fixed.

Co-authored-by: Giacomo Mazza <[email protected]>
  • Loading branch information
aamaricci and GiacMazza committed Jun 4, 2024
1 parent 4330f3b commit cd11c16
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions src/SF_RANDOM/random_mt.f90
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ subroutine d_grnd_2(A)
real(8),dimension(:,:) :: A
integer :: i1,i2
do i1=1,size(A,1)
do i2=2,size(A,2)
do i2=1,size(A,2)
A(i1,i2) = mersenne()
enddo
enddo
Expand All @@ -125,8 +125,8 @@ subroutine d_grnd_3(A)
real(8),dimension(:,:,:) :: A
integer :: i1,i2,i3
do i1=1,size(A,1)
do i2=2,size(A,2)
do i3=2,size(A,3)
do i2=1,size(A,2)
do i3=1,size(A,3)
A(i1,i2,i3) = mersenne()
enddo
enddo
Expand All @@ -137,8 +137,8 @@ subroutine d_grnd_4(A)
real(8),dimension(:,:,:,:) :: A
integer :: i1,i2,i3,i4
do i1=1,size(A,1)
do i2=2,size(A,2)
do i3=2,size(A,3)
do i2=1,size(A,2)
do i3=1,size(A,3)
do i4=1,size(A,4)
A(i1,i2,i3,i4) = mersenne()
enddo
Expand All @@ -151,8 +151,8 @@ subroutine d_grnd_5(A)
real(8),dimension(:,:,:,:,:) :: A
integer :: i1,i2,i3,i4,i5
do i1=1,size(A,1)
do i2=2,size(A,2)
do i3=2,size(A,3)
do i2=1,size(A,2)
do i3=1,size(A,3)
do i4=1,size(A,4)
do i5=1,size(A,5)
A(i1,i2,i3,i4,i5) = mersenne()
Expand All @@ -167,8 +167,8 @@ subroutine d_grnd_6(A)
real(8),dimension(:,:,:,:,:,:) :: A
integer :: i1,i2,i3,i4,i5,i6
do i1=1,size(A,1)
do i2=2,size(A,2)
do i3=2,size(A,3)
do i2=1,size(A,2)
do i3=1,size(A,3)
do i4=1,size(A,4)
do i5=1,size(A,5)
do i6=1,size(A,6)
Expand All @@ -186,8 +186,8 @@ subroutine d_grnd_7(A)
real(8),dimension(:,:,:,:,:,:,:) :: A
integer :: i1,i2,i3,i4,i5,i6,i7
do i1=1,size(A,1)
do i2=2,size(A,2)
do i3=2,size(A,3)
do i2=1,size(A,2)
do i3=1,size(A,3)
do i4=1,size(A,4)
do i5=1,size(A,5)
do i6=1,size(A,6)
Expand Down Expand Up @@ -223,7 +223,7 @@ subroutine c_grnd_2(A)
complex(8),dimension(:,:) :: A
integer :: i1,i2
do i1=1,size(A,1)
do i2=2,size(A,2)
do i2=1,size(A,2)
A(i1,i2) = dcmplx(mersenne(),mersenne())
enddo
enddo
Expand All @@ -233,8 +233,8 @@ subroutine c_grnd_3(A)
complex(8),dimension(:,:,:) :: A
integer :: i1,i2,i3
do i1=1,size(A,1)
do i2=2,size(A,2)
do i3=2,size(A,3)
do i2=1,size(A,2)
do i3=1,size(A,3)
A(i1,i2,i3) = dcmplx(mersenne(),mersenne())
enddo
enddo
Expand All @@ -245,8 +245,8 @@ subroutine c_grnd_4(A)
complex(8),dimension(:,:,:,:) :: A
integer :: i1,i2,i3,i4
do i1=1,size(A,1)
do i2=2,size(A,2)
do i3=2,size(A,3)
do i2=1,size(A,2)
do i3=1,size(A,3)
do i4=1,size(A,4)
A(i1,i2,i3,i4) = dcmplx(mersenne(),mersenne())
enddo
Expand All @@ -259,8 +259,8 @@ subroutine c_grnd_5(A)
complex(8),dimension(:,:,:,:,:) :: A
integer :: i1,i2,i3,i4,i5
do i1=1,size(A,1)
do i2=2,size(A,2)
do i3=2,size(A,3)
do i2=1,size(A,2)
do i3=1,size(A,3)
do i4=1,size(A,4)
do i5=1,size(A,5)
A(i1,i2,i3,i4,i5) = dcmplx(mersenne(),mersenne())
Expand All @@ -275,8 +275,8 @@ subroutine c_grnd_6(A)
complex(8),dimension(:,:,:,:,:,:) :: A
integer :: i1,i2,i3,i4,i5,i6
do i1=1,size(A,1)
do i2=2,size(A,2)
do i3=2,size(A,3)
do i2=1,size(A,2)
do i3=1,size(A,3)
do i4=1,size(A,4)
do i5=1,size(A,5)
do i6=1,size(A,6)
Expand All @@ -294,8 +294,8 @@ subroutine c_grnd_7(A)
complex(8),dimension(:,:,:,:,:,:,:) :: A
integer :: i1,i2,i3,i4,i5,i6,i7
do i1=1,size(A,1)
do i2=2,size(A,2)
do i3=2,size(A,3)
do i2=1,size(A,2)
do i3=1,size(A,3)
do i4=1,size(A,4)
do i5=1,size(A,5)
do i6=1,size(A,6)
Expand Down

0 comments on commit cd11c16

Please sign in to comment.