fix: ensure that LAPACK RNG state is propagated

This commit is contained in:
Szabolcs Horvát
2023-08-12 12:39:18 +02:00
committed by Franck HOUSSEN
parent 6d625dbf34
commit 0996200c7a
4 changed files with 60 additions and 24 deletions
+15 -6
View File
@@ -156,13 +156,13 @@ c %------------------------%
c | Local Scalars & Arrays |
c %------------------------%
c
logical first, orth
logical first, inits, orth
integer idist, iseed(4), iter, msglvl, jj
Real
& rnorm0
Complex
& cnorm
save first, iseed, iter, msglvl, orth, rnorm0
save first, iseed, inits, iter, msglvl, orth, rnorm0
c
c %----------------------%
c | External Subroutines |
@@ -180,6 +180,12 @@ c
& ccdotc
external ccdotc, scnrm2, slapy2
c
c %-----------------%
c | Data Statements |
c %-----------------%
c
data inits /.true./
c
c %-----------------------%
c | Executable Statements |
c %-----------------------%
@@ -190,10 +196,13 @@ c | Initialize the seed of the LAPACK |
c | random number generator |
c %-----------------------------------%
c
iseed(1) = 1
iseed(2) = 3
iseed(3) = 5
iseed(4) = 7
if (inits) then
iseed(1) = 1
iseed(2) = 3
iseed(3) = 5
iseed(4) = 7
inits = .false.
end if
c
if (ido .eq. 0) then
c
+15 -6
View File
@@ -157,11 +157,11 @@ c %------------------------%
c | Local Scalars & Arrays |
c %------------------------%
c
logical first, orth
logical first, inits, orth
integer idist, iseed(4), iter, msglvl, jj
Double precision
& rnorm0
save first, iseed, iter, msglvl, orth, rnorm0
save first, iseed, inits, iter, msglvl, orth, rnorm0
c
c %----------------------%
c | External Subroutines |
@@ -183,6 +183,12 @@ c %---------------------%
c
intrinsic abs, sqrt
c
c %-----------------%
c | Data Statements |
c %-----------------%
c
data inits /.true./
c
c %-----------------------%
c | Executable Statements |
c %-----------------------%
@@ -193,10 +199,13 @@ c | Initialize the seed of the LAPACK |
c | random number generator |
c %-----------------------------------%
c
iseed(1) = 1
iseed(2) = 3
iseed(3) = 5
iseed(4) = 7
if (inits) then
iseed(1) = 1
iseed(2) = 3
iseed(3) = 5
iseed(4) = 7
inits = .false.
end if
c
if (ido .eq. 0) then
c
+15 -6
View File
@@ -157,11 +157,11 @@ c %------------------------%
c | Local Scalars & Arrays |
c %------------------------%
c
logical first, orth
logical first, inits, orth
integer idist, iseed(4), iter, msglvl, jj
Real
& rnorm0
save first, iseed, iter, msglvl, orth, rnorm0
save first, iseed, inits, iter, msglvl, orth, rnorm0
c
c %----------------------%
c | External Subroutines |
@@ -183,6 +183,12 @@ c %---------------------%
c
intrinsic abs, sqrt
c
c %-----------------%
c | Data Statements |
c %-----------------%
c
data inits /.true./
c
c %-----------------------%
c | Executable Statements |
c %-----------------------%
@@ -193,10 +199,13 @@ c | Initialize the seed of the LAPACK |
c | random number generator |
c %-----------------------------------%
c
iseed(1) = 1
iseed(2) = 3
iseed(3) = 5
iseed(4) = 7
if (inits) then
iseed(1) = 1
iseed(2) = 3
iseed(3) = 5
iseed(4) = 7
inits = .false.
end if
c
if (ido .eq. 0) then
c
+15 -6
View File
@@ -156,13 +156,13 @@ c %------------------------%
c | Local Scalars & Arrays |
c %------------------------%
c
logical first, orth
logical first, inits, orth
integer idist, iseed(4), iter, msglvl, jj
Double precision
& rnorm0
Complex*16
& cnorm
save first, iseed, iter, msglvl, orth, rnorm0
save first, iseed, inits, iter, msglvl, orth, rnorm0
c
c %----------------------%
c | External Subroutines |
@@ -180,6 +180,12 @@ c
& zzdotc
external zzdotc, dznrm2, dlapy2
c
c %-----------------%
c | Data Statements |
c %-----------------%
c
data inits /.true./
c
c %-----------------------%
c | Executable Statements |
c %-----------------------%
@@ -190,10 +196,13 @@ c | Initialize the seed of the LAPACK |
c | random number generator |
c %-----------------------------------%
c
iseed(1) = 1
iseed(2) = 3
iseed(3) = 5
iseed(4) = 7
if (inits) then
iseed(1) = 1
iseed(2) = 3
iseed(3) = 5
iseed(4) = 7
inits = .false.
end if
c
if (ido .eq. 0) then
c