Script throws singular matrix warning on remote cluster but not on laptop

I am running a script which contains a recursive least squares algorithm, requiring the inversion of a matrix. When I run this script on my own machine at home it works, occasionally throwing the "nearly singular matrix" warning (which I simply turn off) but never the "Matrix is singular to working precision" one and the coefficients calculated by the RLS algorithm converge to sensible values. However, when I attempt to run the same script on a remote cluster I keep getting the "Matrix is singular to working precision" warning and the algorithm does not converge.
The scripts I run are 100% identical, the only difference being that one is run on my laptop and the other one on the cluster. One notable difference is that the highest version of Matlab available on the cluster is 2016b while on my laptop I have 2019b. Does anyone have any idea why I might be running into this issue?

 Réponse acceptée

There have been updates to lapack since the earlier release.
Also I suggest checking whether one of the two is running AMD processors and the other is Intel.

1 commentaire

Thanks. Processors are Intel in both cases.
At the end of the day this seems to be an issue of computational accuracy which is either linked to updates between 2016 and 2019 or differences between processor models.
Was able to find a relatively simple quick fix, namely to move to ridge regression, which avoids the problem of the matrix becoming singular.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by