|
From: | Mathieu Dubois |
Subject: | Re: Memory exhausted when using \ |
Date: | Sat, 21 Jul 2012 10:08:51 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
Le 21/07/2012 01:52, Martin Helm a écrit :
Am 21.07.2012 01:27, schrieb Martin Helm:The problem seems to be when the value of nz is zero in MSparse<T> B (nr, nc, (nz < maxnz ? nz : maxnz)); Then it crashes later.I replaced MSparse<T> B (nr, nc, (nz < maxnz ? nz : maxnz)); with MSparse<T> B (nr, nc, (nz < maxnz && nz > 0 ? nz : maxnz)); and now it works not only for the test case but also for the memory_exhausted file. (of course only in combination with Jordi's uint64 cast) The fancy output is a printf which I added to see what happens while the \ operator runs octave:4> load memory-exhausted octave:5> x = A\b; maxnz 562093 nr 243458, nc 46008, nz 562093, maxnz 562093 maxnz 11533 nr 243458, nc 1, nz 11533, maxnz 11533 maxnz 3252 nr 3252, nc 46008, nz 3252, maxnz 3252 maxnz 11533 nr 3252, nc 1, nz 0, maxnz 11533 maxnz 3252 nr 3252, nc 3252, nz 3252, maxnz 3252 maxnz 11533 nr 3252, nc 1, nz 0, maxnz 11533 octave:6>
Re-reading Jordi's patch, I'm pretty sure that the correct line is nz=nr*nc.I have corrected that, undo Martin's modification (just to be sure) and re-run octave under gdb. It seems to work (although it take 99 seconds to run).
Martin: maybe your modification is useful. Could you try with nz=nr*nc on line 52 and your nice printf?
I have attached the file sparse-dmsolve.cc.By the way I (again) forgot some m files that are used in the code so function visualizeZ won't work. I have attached the files.
sparse-dmsolve.cc
Description: Text document
visualizeZ.tar.gz
Description: GNU Zip compressed data
[Prev in Thread] | Current Thread | [Next in Thread] |