Major problem with Cholesky decomposition
Show older comments
Hi all,
I'm having major issues with the chol command. A code I need to run uses Cholesky decomposition and it crashes right at the point where it needs to manipulate a matrix.
Even worse, Matlab yields the following nonsense (see below):

Note that this example comes straight from the chol help file. Any idea why this is happening? I'm using version 2013b. Thanks!
11 Comments
Walter Roberson
on 15 Jul 2018
I wonder... would you happen to be using an AMD Jaguar CPU ?
Mario Solis-Garcia
on 15 Jul 2018
dpb
on 15 Jul 2018
Earliest I have installed is R2014b altho I'd be extremely surprised if it were a generic bug.
Can you either upgrade or try re-install?
Mario Solis-Garcia
on 15 Jul 2018
Walter Roberson
on 16 Jul 2018
I just installed R2013b into a virtual machine to test with, but had no difficulty.
What shows up for
>> which chol(X)
built-in (C:\Program Files\MATLAB\R2013b\toolbox\matlab\matfun\@double\chol) % double method
My virtual machine is Intel Core i7-4771
Mario Solis-Garcia
on 16 Jul 2018
dpb
on 16 Jul 2018
Mario, no chance you can update to a different version altho this is sounding like a unique system-related issue of some short...I think I'd submit a SRQ to TMW official site and see if they've got any ideas...think there's nothing else we can do that can help you.
Christine Tobler
on 16 Jul 2018
This sounds like a weird system-dependent issue. I agree that creating a service request would be best.
Some things that could be interesting to try (not likely to solve the issue, though):
chol(eye(4)); % Does this also error?
[R, p] = chol(pascal(5)) % This will tell us at which row of the input
% matrix CHOL decides that the matrix is not SPD.
Otherwise, I'd think the next steps would be to try to narrow down with which MATLAB versions and which settings you're seeing these issues. Tech Support will be able to help with this.
Mario Solis-Garcia
on 17 Jul 2018
dpb
on 17 Jul 2018
Too bad...since it's builtin pretty clear there's a interaction issue of some sort going on.
Appears only choice other than an upgrade would be to try reversion of any OS upgrades or to upgrade to see if that would somehow magically make the symptom disappear.
Do you have previous knowledge it did work at one time on the specific machine?
Christine Tobler
on 17 Jul 2018
That's too bad. And the "out of memory" message is weird on a whole different level: The only difference between the one-output and two-output calls is that one scalar number is allocated for p. So there's something seriously bad going on with this installation.
I haven't heard of any problems with R2013b and i7 CPUs, but upgrading MATLAB / changing your OS configuation seems like a reasonable idea.
Is Cholesky the only function you're seeing problems with? I'd expect all linear algebra operations / all operations in general to have problems, given how badly Cholesky is doing here.
Answers (1)
Jan
on 15 Jul 2018
Either this is a problem with the called libraries or a user defined function shadows the original one, but contains a bug. Please run:
profile clear
profile('on', '-detail', 'builtin')
chol(pascal(5))
profile report
Do you see any function, which differs from "(built-in function)"?
8 Comments
Mario Solis-Garcia
on 16 Jul 2018
Edited: Mario Solis-Garcia
on 16 Jul 2018
Walter Roberson
on 16 Jul 2018
-detail is not a documented option for profile in R2013b through R2018a
Philip Borghesani
on 16 Jul 2018
-detail is not documented but should do something other then error. If you pasted the code I suggest typing it by hand. One irritating problem is that pasted code frequently has a different character then '-' causing unexpected errors.
Philip Borghesani
on 16 Jul 2018
R2013b is fairly old to run on a current MAC and version of Mac OS X. What type of Mac are you using and what version of Mac OS X?
Walter Roberson
on 16 Jul 2018
Good catch about it being Mac.
I just tried R2013b installed on my Mac, and do not have this difficulty.
If I recall correctly, the first Mac with Core i7 available were late 2012 MacBook Pro. But somewhere I have an app that has a complete catalog, so I will see if I can check.
Walter Roberson
on 16 Jul 2018
... I was close. There was a Core i7 option for MacBook Pro from mid 2010 and for Mac Mini from mid 2011.
Mario Solis-Garcia
on 17 Jul 2018
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


