New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Version 3.9.0] Infinite loop in slasq3 #384
Comments
Do you think this used to work in earlier versions ? AFAIK none of the slasq functions was modified since at least 3.7.0. From your description it is looping as TAU never gets small enough ? |
Sorry, I only verified on 3.9.0 so far for this is the only version at hand. |
Would you happen to have a complete reproducer for this, in particular with the values contained in the array z ? I cannot reproduce the problem with the data you provided and a random z, |
if dmin is nan it should be set to some legit erroneous value; would prevent infinity. |
I thought about this as well, but if I am correct about the rules for comparing against NaN this is probably not the problem. |
No infinite loop using 4b3c7c2 to build the code: PROGRAM testSLASQ3
IMPLICIT NONE
* .. Scalar Arguments ..
LOGICAL IEEE
INTEGER I0, ITER, N0, NDIV, NFAIL, PP, TTYPE
REAL DESIG, DMIN, DMIN1, DMIN2, DN, DN1, DN2, G,
& QMAX, SIGMA, TAU
* .. Array Arguments ..
REAL Z( 64 )
* .. Subroutines ..
EXTERNAL SLASQ3
PARAMETER ( IEEE=.FALSE. )
PARAMETER ( I0 = 3 )
PARAMETER ( QMAX = 1.0 )
ITER=1
N0=16
NDIV=2
NFAIL=4
PP=1
TTYPE=-1
DESIG=0.2
DMIN1=0.1
DMIN2=0.1
DN=1.0
DN1=1.0
DN2=1.0
G=1.0
TAU=1.0
Z = (/0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,
& 0.1,0.2,0.3,0.4,0.5,0.6,
& 0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,
& 0.1,0.2,0.3,0.4,0.5,0.6,
& 0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,
& 0.1,0.2,0.3,0.4,0.5,0.6,
& 0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,
& 0.1,0.2,0.3,0.4,0.5,0.6/)
CALL SLASQ3( I0, N0, Z, PP, DMIN, SIGMA, DESIG, QMAX, NFAIL,
& ITER, NDIV, IEEE, TTYPE, DMIN1, DMIN2, DN, DN1,
& DN2, G, TAU )
END PROGRAM testSLASQ3 |
Based on @weslleyspereira post, let us close this issue then. |
When input parameters to "slasq3" follows below pattern:
i0 =3, n0=16, pp=1,desig=0.2f, qmax=0.2f, nfail=4,iter=1, ndiv = 2, ieee = 0, ttype = -1
this function falls into infinite loop in-between code line 332 ~ 362.
100% reproduce.
The text was updated successfully, but these errors were encountered: