-
Notifications
You must be signed in to change notification settings - Fork 74
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
Polynomials.fit causing LinearAlgebra.LAPACKException error on one computer #244
Comments
Can you share some data? I'm guessing it is causing issues with the |
Thanks for replying. I attached the data as a CSV file in the ZIP archive below: When the issue occurs the script is fitting a 4th order polynomial for y ~ f(x). However here's the catch:
I tried but failed to reproduce the problem using a shorter script. Maybe I will try again by deleting part of the script bit by bit carefully, but that'll take some time. : -( |
I'm not sure where to go here. I can run this all ok:
The small leading coefficient might suggest some possible numeric issue, but I wouldn't expect it. Is the computer older hardware or some exotic hardware? |
I'm also puzzled. It only happens on this computer. It's a new computer with Intel core i9-9900k CPU, pretty standard stuff. Another PC with the same CPU model does not have this issue. Just when I am trying to re-produce the error by trimming down the script, another odd thing happened: the raw data was loaded from a bigger CSV file separately. That CSV reading never had issues. But just now Julia started to complain that CSV file is "not a valid file". I tried restarting Julia with no avail. Finally I restarted my editor AND terminal (which is simply Sublime Text with Terminus). And when I run exactly the same script, CSV file reading is normal again! This new computer is actually a gaming machine purchased from Amazon. Link below: Would that make any difference? E.g. would gaming machine builders do any tweaks (overclocking?) that make the system unstable? But I don't have such weird problems other than in Julia... This may not be a bug for the Polynomials.jl package anymore. I also posted this question at discourse.julialang.org |
Let's see if someone has a good idea. If it is something to address in Polynomials, please ping me. |
One more discovery: it seems to be related to PyPlot. If I comment out the plotting code (regardless if PyPlot is imported or not), the weird errors for both Polynomials.fit() and CSV.read() go away! I tried setting ENV["PYTHON"] to an ActivePython 3.7 installation instead of the MiniConda Python coming with Julia, then rebuilding PyCall. The errors still appear when I am doing the plots but disappear when I am not. I do use PyPlot a lot so the problem is not resolved yet, but at least there is a very clear clue now. |
Whoa, never would of guessed that one. Good luck tracking this down. Please reopen if it comes back this way. |
Just to follow up. A workaround has been found for my computer: install MKL.jl Please refer to this issue at PyPlot.jl for details. |
This is a very strange problem that I can reproduce every time with the original code, but I am not able to create a minimal example to reproduce it. And so far I only noticed this problem on one of my Windows 10 64-bit computers.
When I call Polynomials.fit to do a polynomial fit, some call would lead to a LinearAlgebra.LAPACKException(3) or (4) error.
If I save the data in a file, and do the same fit with the same data loaded in an REPL, or put that in a simple function inside a short script, the fit will work fine.
Not all the call to the polynomial fit function causes this problem - some number of fits can work before the problem shows up. However, it's very consistent which call causes this problem.
In one script a 1st order fit already leads to this issue; in another 1st order fits works, but a 4th order fit leads to the error.
Again, only one machine shows this problem, but the CPU is just a common Intel i9-9900K, and another machine with the same CPU and same Julia and Polynomials versions doesn't have this problem.
I tried completely removing and reinstalling Julia with all packages, but the problem persisted.
The versions: Julia v1.4.2, Polynomials.jl v1.1.3.
The full error message:
The text was updated successfully, but these errors were encountered: