Skip to content
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

LMDIF failing due to numerical instability #455

Closed
rdemaria opened this issue Jul 28, 2017 · 4 comments
Closed

LMDIF failing due to numerical instability #455

rdemaria opened this issue Jul 28, 2017 · 4 comments

Comments

@rdemaria
Copy link
Contributor

We have an example that returns this error message

call: 4 Penalty function = 0.24802178E-03
call: 9 Penalty function = 0.24262925E-03
call: 13 Penalty function = 0.24118050E-03
Maximum Iteration exceeded in HQR2, increase MAXITER: 150
Unable to find eigenvalues for matrix:
1.955019 118.250905 -0.002977 -0.405826 0.000000 -1.248031
-0.050003 -2.512961 0.000109 0.004085 0.000000 0.047542
-0.021011 -0.370349 -2.808226 208.566941 0.000000 -0.476444
-0.000286 -0.006570 -0.035093 2.250267 0.000000 -0.006737
-0.030547 -2.485026 -0.002193 0.347135 1.000000 -9.042964
0.000000 0.000000 0.000000 0.000000 0.000000 1.000000

+-+-+- fatal: LASEIG Unable to find eigenvalues for matrix

STOP 1

This is strange since the matrix looks innocent.

@rdemaria
Copy link
Contributor Author

Same file with version 5.02.00 gives

Initial Penalty Function = 0.34334641E-01

call: 4 Penalty function = 0.24802178E-03
call: 9 Penalty function = 0.24262925E-03
call: 13 Penalty function = 0.24118050E-03
call: 35 Penalty function = 0.24118050E-03
++++++++++ LMDIF ended: converged without success
call: 35 Penalty function = 0.24118050E-03

Please note that up to calls 13 results are identical.

@rdemaria
Copy link
Contributor Author

Sample file is /afs/cern.ch/user/r/rdemaria/public/forfrederik/hl10_injection_chrom_20_oct_-5_B4.44

Please contact Frederik or Pascal for follow-ups and additional sample files.

It cannot be simplified for obvious reasons, since it is impossible to reproduce the same numerical conditions.

@tpersson
Copy link
Contributor

tpersson commented Jul 30, 2017 via email

@tpersson
Copy link
Contributor

tpersson commented Aug 9, 2017

Hi,
The calculation of the eigenvalues are done using an iterative algorithm. I don't know why it failed on this matrix. Before it had 150 as maximum iteration, this is now increased to 250 (but even 200 works fine). The eigenvalue I receive for the matrix are consistent with what I get from Octave (see below).
The mask seem to run fine now and I talked to Pascal that the new version is committed to the master and in case there is any other problems they would let us know. I will close this issue for now but in case there is some other issues please let us know.

cheers
Tobias


From Madx

-0.28560087625336017 0.95834865236163191i
-0.28560087625336017 -0.95834865236163191i
-0.27234930479082209 0.96219844947897903i
-0.27234930479082209 -0.96219844947897903i
From Octave
-0.285601 + 0.958391i
-0.285601 - 0.958391i
-0.272349 + 0.962187i
-0.272349 - 0.962187i

@tpersson tpersson closed this as completed Aug 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants