bugGNU Octave - Bugs: bug #42116, "out of memory or dimension...

 
 

bug #42116: "out of memory or dimension too large" regression going from 3.6.3 to 3.8.1

Submitted by:  Paul Jakma <paul>
Submitted on:  Mon 14 Apr 2014 01:44:31 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.8.1Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 24 Apr 2014 04:34:06 PM UTC, comment #4:

The error in 3.8.1 is actually a better result than silently overflowing and returning a negative number for the number of elements. On the other hand, code that interacts with sparse matrices needs to be very sensitive to the fact that numel() may overflow. In a lot of sparse code it is better to look at nnz rather than numel. I made that change in spy.m on the stable branch in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/3994a1c2b994). It will be a parto of the 3.8.2 bug fix release, or you can just grab the spy.m from the Mercurial repository and replace your local version with the new one.

Rik <rik5>
Project Administrator
Mon 14 Apr 2014 02:09:22 PM UTC, comment #3:

oops that should have been 50e3 not 50e4 in the previous post.

Carlo de Falco <cdf>
Project Member
Mon 14 Apr 2014 02:08:22 PM UTC, comment #2:

On the other hand I agree that

should return 50e4
and

should return 50e4^4 = 2.5000e+11
rather than fail.

so this looks like a bug not a regression
because the current result may be wrong but
the older one was just as bad.

Carlo de Falco <cdf>
Project Member
Mon 14 Apr 2014 01:58:57 PM UTC, comment #1:

I don't think getting an answer which is a negative real number as the answer to

is any better than getting an error message,
why do you think that behavior was better than the current one?

Carlo de Falco <cdf>
Project Member
Mon 14 Apr 2014 01:44:31 PM UTC, original submission:

I'm working with 64k × 64k sparse matrices. In 3.6.3 I was able to manipulate and plot these in ways which now sometimes cause errors in 3.8.1. E.g.:

> spy(asgraphs{1}.adj)

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

If I run numel(nonzeros(..)) on my smaller and larger graphs I get 83226 and 324616. Both these graphs I can 'spy' in 3.6.3. With 3.8.1 however, even the smaller gives the above error.

Further information, requested on #octave:

3.6.3:
octave 1> y=speye(50000); numel(y)
ans = -1.7950e+09
octave:2> octave_config_info.USE_64_BIT_IDX_T
ans = false

3.8.1:
octave:1> y=speye(50000); numel(y)
error: out of memory or dimension too large for Octave's index type
octave:1> octave_config_info.USE_64_BIT_IDX_T
ans = no

Paul Jakma <paul>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by cdf (Posted a comment)
  • -unavailable- added by paul (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 24 Apr 2014 04:34:06 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 14 Apr 2014 02:08:22 PM UTCcdfItem GroupRegression=>Incorrect Result

    Back to the top


    Powered by Savane 3.1-cleanup1