bugGNU Octave - Bugs: bug #46134, error: out of memory or dimension...

 
 

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

Submitter:  mjang <mjang>
Submitted:  Tue 06 Oct 2015 04:43:32 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Works For Me Assigned to:  None
Originator Name:  Mallikarjun Open/Closed:  * Closed
Release:  * 4.0.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 29 Apr 2016 09:45:10 PM UTC, comment #3: 

I am able to execute the given command in a 64-bit-index build of Octave. If you need help figuring out how to build Octave for 64-bit integer indexing, please consult the documentation or the help mailing list.

Mike Miller <mtmiller>
Group Member
Sat 31 Oct 2015 04:50:40 PM UTC, comment #2: 

What you could try is to build a 64-bit indexing Octave with mxe-octave, with an mxe-octave configure statement along the lines in comment #13, #26 and #27 of this bug report:
https://savannah.gnu.org/bugs/index.php?43319
(and you'll have to add an installation directory prefix as well in the configure command).

That way one keeps the 64-bit indexing libraries and Octave separate from the system-supplied libs (that are usually 32-bit indexing).

Philip Nienhuis <philipnienhuis>
Group Member
Tue 06 Oct 2015 11:24:12 AM UTC, comment #1: 

I also struggle with 64-bit builds. The problem seems to be that your underlying BLAS wasn't compiled with the same flags as you did with Octave.

The configure error refers to the test m4/ax_blas_f77_func.m4 there the Fortran program, I call it "test.f" here:


      program main

      integer n,nn(3)
      real s,a(1),b(1),sdot
      a(1) = 1.0
      b(1) = 1.0
c Generate -2**33 + 1, if possible
      n = 2
      n = -4 * (n ** 30)
      print *, "n = ", n
      n = n + 1
      print *, "n = ", n
      if (n >= 0) goto 1
c This means we're on 64-bit integers. Check whether the BLAS is, too.
      s = sdot(n,a,1,b,1)
      print *, "s = ", s
      if (s .ne. 0.0) stop 1
    1 continue
c We may be on 32-bit integers, and the BLAS on 64 bits. This is almost bound
c to have already failed, but just in case, we'll check.
      nn(1) = -1
      nn(2) = 1
      nn(3) = -1
      s = sdot(nn(2),a,1,b,1)
      if (s .ne. 1.0) stop 1

      end


gets executed. The intention of the code is the following:

- You create n = -2^32+1 (the documentation is wrong!), too big for int32 and get an integer overflow to a positive value. On a int64 platform you get n = -2^32+1.

- Then the idea, I guess, is the LAPACK-Routine sdot ( http://www.netlib.org/lapack/explore-html/d0/d16/sdot_8f_source.html ) should return 0.0 if the input value is smaller than 0, means int64 was handed over correctly, no integer overflows occurred and so on...

Thus, compiling "test.f" and linking my 32-bit BLAS from my Linux distributor yields:


$ gfortran -fdefault-integer-8 bla.f -o test -lblas && ./test
 n =           -4294967296
 n =           -4294967295
 s =    1.00000000
STOP 1

$ gfortran test.f -o test -lblas && ./test
 n =            0
 n =            1


Maybe try out the Fortran program. If you know a solution, let me know.

Kai Torben Ohlhus <siko1056>
Group Member
Tue 06 Oct 2015 04:43:32 AM UTC, original submission:  

I can confirm that there is an issue making the 64-bit build of version 4 (from ftp://ftp.gnu.org/gnu/octave).
3.8.2 however builds ok for 64-bit and GUI (octave --force-gui).

 

>> a = zeros (1024*1024*1024*3, 1, 'int8');

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

we run (./configure --prefix=/prog/rdtoolbox/octave/versions/3.8.1-RHEL6 --enable-openmp --enable-64 F77_INTEGER_8_FLAG=-fdefault-integer-8) this command. As a result we end up with the below error. To fix the below error we followed the instruction provided in the site (http://wiki.octave.org/MXE).
=========================
configure: error: BLAS doesn't seem to support 64-bit integers. This is incompatible with --enable-64.
=========================

mjang <mjang>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by mjang (Submitted the item)
  • -email is unavailable- added by mjang
  • -email is unavailable- added by mjang
  • -email is unavailable- added by mjang
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-29 mtmiller StatusConfirmed Works For Me
        Open/ClosedOpen Closed
    2015-10-06 siko1056 StatusNone Confirmed
    2015-10-06 mjang Carbon-Copy- Added -email is unavailable-
        Carbon-Copy- Added -email is unavailable-
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code