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: Markus Mützel
Subject: Re: out of memory or dimension too large for Octave's index type
Date: Wed, 26 Oct 2022 11:37:04 +0200

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]