help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Jiang, Yanda [E CPE]
Subject: Re: out of memory or dimension too large for Octave's index type
Date: Wed, 26 Oct 2022 14:32:47 +0000

Hi Markus,


Thanks for your reply.
That issue has been resolved.
Then how about this below one? (nbr and nb are very large). I encountered the same problem as before.
H = sparse(zeros(nbr, nb));


Best,
Yanda

From: Markus Mützel <markus.muetzel@gmx.de>
Sent: Wednesday, October 26, 2022 4:37 AM
To: Jiang, Yanda [E CPE] <yandaj@iastate.edu>
Cc: help@octave.org <help@octave.org>
Subject: Re: out of memory or dimension too large for Octave's index type
 
Am 26. Oktober 2022 um 07:06 Uhr schrieb "Jiang, Yanda [E CPE]":
> Dear Sir/Madam,


> I am a phd student who is using octave for my research work.
> While running my code, I got this error message. 
>

> After hours of investigation, I believe the reason is one matrix is 232100*71368.
> Do you have any method to solve this problem?


For the future: Please don't use images of text. Paste the text directly instead.


I'm guessing your input to `glpk` is sparse. Line 507 of `glpk.m` uses:
  if (any (! isfinite (A(:))))
    error ("glpk: The values in A must be finite");
  endif

`isfinite (A(:))` creates a sparse Boolean matrix. However, it is likely not sparsely populated which might be the cause for the memory issue.

Does it work if you edit that file and change the above lines to the following?
  if (any (isinf (A(:))) || any (isnan(A(:))))
    error ("glpk: The values in A must be finite");
  endif


Alternatively, try:
  if (any (any (! isfinite (A))))
    error ("glpk: The values in A must be finite");
  endif


Markus

reply via email to

[Prev in Thread] Current Thread [Next in Thread]