Re: out of memory or dimension too large for Octave's index type

"Jiang, Yanda [E CPE]" <[email protected]> Wed, 26 Oct 2022 22:51:00 +0000
Newsgroups gmane.comp.gnu.octave.general
Message-ID <BYAPR04MB52889E66E900D8D08CFE86A1C6309@BYAPR04MB5288.namprd04.prod.outlook.com>
Hi Nick,


Is there any way to increase intmax of Octave? In other words, from 32bit to 64 bit.


Best,
Yanda
________________________________
From: Nicholas Jankowski <[email protected]>
Sent: Wednesday, October 26, 2022 12:52 PM
To: Octave help <[email protected]>; Jiang, Yanda [E CPE] <[email protected]>; Markus Mützel <[email protected]>
Subject: Re: out of memory or dimension too large for Octave's index type


Bf and Bbus are sparse. But I guess the inverse of Bbus is not sparse anymore. Will it be different?
And is this an Octave problem or computer problem?

it is a known issue that certain operations on sparse arrays result in full arrays. just to confirm, you gave the line:

 sparse(Bf(:, noref)) / sparse(Bbus(noslack, noref))

so they are both already sparse, you're just recasting them as sparse again to ensure that the output of your indexing call remains sparse? my understanding is that indexing operations on sparse arrays stay sparse whether they result in larger or smaller arrays, so the 'sparse' function calls there shouldn't be necessary.

I also believe the matrix division preserves sparseness.  that seems to be the case with some simple tests at least.

is H already sparse?  you're inserting sparse data into an existing array. maybe that's triggering the full conversion?


----------
We are transitioning to a web based forum
for community help discussions at
https://octave.discourse.group/c/help