error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt

japindado
This topic has been discussed before, but I have read all of the threads and none of them have the answer to my issue, so I am posting here hoping someone can help...  Basically, Octave will not allow the total memory consumed by all variables to exceed ~1.5GB...  My machine runs Windows7 Enterprise N 64-bit on an Intel i7 with 9GB RAM. Any help would be greatly appreciated.

Here is my output/code:

octave:107> ver;memtest()
----------------------------------------------------------------------
GNU Octave Version 3.6.1
GNU Octave License: GNU General Public License
Operating System: unknown
----------------------------------------------------------------------
no packages installed.
iter1,mem16,idx2
iter2,mem32,idx4
iter3,mem64,idx8
iter4,mem128,idx16
iter5,mem256,idx32
iter6,mem512,idx64
iter7,mem1024,idx128
iter8,mem2048,idx256
iter9,mem4096,idx512
iter10,mem8192,idx1024
iter11,mem16384,idx2048
iter12,mem32768,idx4096
iter13,mem65536,idx8192
iter14,mem131072,idx16384
iter15,mem262144,idx32768
iter16,mem524288,idx65536
iter17,mem1048576,idx131072
iter18,mem2097152,idx262144
iter19,mem4194304,idx524288
iter20,mem8388608,idx1048576
iter21,mem16777216,idx2097152
iter22,mem33554432,idx4194304
iter23,mem67108864,idx8388608
iter24,mem134217728,idx16777216
iter25,mem268435456,idx33554432
error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt
octave:107>
==============
function memtest()
clear;
tst=[];
i=0;
while(1)
        i=i+1;
        tst=[ones(1,2^i)];
        fprintf("iter%d,mem%d,idx%d\n",i,sizeof(tst),length(tst));
        fflush(stdout);
end
==============
Reply | Threaded
Open this post in threaded view
|

Re: error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt

marco atzeri-2
On 11/2/2012 7:25 PM, japindado wrote:
> This topic has been discussed before, but I have read all of the threads and
> none of them have the answer to my issue, so I am posting here hoping
> someone can help...  Basically, Octave will not allow the total memory
> consumed by all variables to exceed ~1.5GB...  My machine runs Windows7
> Enterprise N 64-bit on an Intel i7 with 9GB RAM. Any help would be greatly
> appreciated.

I am almost sure the windows version is a 32bit version,
as such no more than 2GB are available for programs and data.

To overcome that limits you need a 64bit version, that I suspect
is available only on some Linux/Unix distro

>
> Here is my output/code:
>
> octave:107> ver;memtest()
> ----------------------------------------------------------------------
> GNU Octave Version 3.6.1
> GNU Octave License: GNU General Public License
> Operating System: unknown
> ----------------------------------------------------------------------
> no packages installed.
> iter1,mem16,idx2
...

> iter24,mem134217728,idx16777216
> iter25,mem268435456,idx33554432
> error: memory exhausted or requested size too large for range of Octave's
> index type -- trying to return to prompt
> octave:107>
> ==============
> function memtest()
> clear;
> tst=[];
> i=0;
> while(1)
> i=i+1;
> tst=[ones(1,2^i)];
> fprintf("iter%d,mem%d,idx%d\n",i,sizeof(tst),length(tst));
> fflush(stdout);
> end
> ==============

why do you need more than 1.5 GB data ?




_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt

Jordi Gutiérrez Hermoso-2
In reply to this post by japindado
On 2 November 2012 14:25, japindado <[hidden email]> wrote:

> This topic has been discussed before, but I have read all of the
> threads and none of them have the answer to my issue, so I am
> posting here hoping someone can help... Basically, Octave will not
> allow the total memory consumed by all variables to exceed ~1.5GB...
> My machine runs Windows7 Enterprise N 64-bit on an Intel i7 with 9GB
> RAM. Any help would be greatly appreciated.

Can you compile and run the following C++ program and report back?

    #include <iostream>

    int main()
    {
      using namespace std;

      size_t n = 2;
      for(size_t i = 0; i < 32; i++)
      {
        try{
          double *x = new double[n];
          delete[] x;
          cout << "iter: " << i
               << " memory: " << sizeof(double)*n
               << " length: " << n
               << endl;
          n *= 2;
        }
        catch (std::bad_alloc) {
          cout << "error: memory exhausted or requested size too large
for range "
               << "of Octave's" << endl
               << "index type -- trying to return to prompt" << endl;
          break;
        }
      }
    }

Thanks,
- Jordi G. H.
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt

Jordi Gutiérrez Hermoso-2
In reply to this post by marco atzeri-2
On 2 November 2012 14:53, marco atzeri <[hidden email]> wrote:

> On 11/2/2012 7:25 PM, japindado wrote:
>>
>> This topic has been discussed before, but I have read all of the threads
>> and
>> none of them have the answer to my issue, so I am posting here hoping
>> someone can help...  Basically, Octave will not allow the total memory
>> consumed by all variables to exceed ~1.5GB...  My machine runs Windows7
>> Enterprise N 64-bit on an Intel i7 with 9GB RAM. Any help would be greatly
>> appreciated.
>
>
> I am almost sure the windows version is a 32bit version,
> as such no more than 2GB are available for programs and data.

This is just a limitation of the Windows binary, right? Not of Octave
itself? Does it suffice to compile a 64-bit binary without following
these instructions?

    http://www.gnu.org/software/octave/doc/interpreter/Compiling-Octave-with-64_002dbit-Indexing.html

- Jordi G. H.
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt

japindado
Hi Jordi -

Thank you for your response with suggestions.

I am not yet sure how to compile on my system.  Pls give me some time days and I will report back to you and the group.  In the meantime, if there is an executable version of 64-bit Octave out there, I could test it more quickly (but so far I have not found one).

Regards,

-Jesus
Reply | Threaded
Open this post in threaded view
|

Re: error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt

japindado
Just an update... I have downloaded and installed the MinGW project from GNU. When trying to compile the suggested program, here's the output.

========================
C:\MinGW\bin>gcc "../../Test/test.c"
../../Test/test.c:1:24: fatal error: iostream: No such file or directory
compilation terminated.

C:\MinGW\bin>
========================

I cannot locate the file iostream.h anywhere, but there is a file C:\MinGW\include\io.h

Any tips?

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt

Jordi Gutiérrez Hermoso-2
On 6 November 2012 07:01, japindado <[hidden email]> wrote:
> Just an update... I have downloaded and installed the MinGW project from GNU.
> When trying to compile the suggested program, here's the output.
>
> ========================
> C:\MinGW\bin>gcc "../../Test/test.c"
> ../../Test/test.c:1:24: fatal error: iostream: No such file or directory
> compilation terminated.

Compiling Octave on Windows is a difficult task that I do not
recommend unless you are willing to undertake a lot of hard work and
are willing to learn something about the C++ and C build process.

Compiling 64-bit indexing version of Octave is even more difficult.

My question about the Octave binary was just if it was  32-bit or a
64-bit binary (this is somewhat independent of the question whether
Octave is built for 32-bit or 64-bit indexing). I believe both
available binaries right now are 32-bit Windows binaries (with 32-bit
indexing), so they will be naturally limited just by virtue of the
compiler that was used to create them.

Perhaps we can build Octave with this to get a 64-bit binary:

    http://mingw-w64.sourceforge.net/

I am not certain of anything I have stated here, since I do not
currently have access to a Windows machine.

- Jordi G. H.
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt

japindado
"My question about the Octave binary was just if it was  32-bit or a 64-bit binary (this is somewhat independent of the question whether Octave is built for 32-bit or 64-bit indexing)."

I'm not sure how to tell.

"I believe both available binaries right now are 32-bit Windows binaries (with 32-bit indexing), so they will be naturally limited just by virtue of the compiler that was used to create them.  Perhaps we can build Octave with this to get a 64-bit binary:  http://mingw-w64.sourceforge.net/"

That would be great.  To get around this problems, I am running 3 instances of Octave and structuring my code with a bunch of config options to control flow, skip over certain sections, and tackle data piece-wice... 2GB for all of the variables in the workspace is too limiting these days.

Thanks a lot again.
Reply | Threaded
Open this post in threaded view
|

Re: error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt

marco atzeri-2
On 11/6/2012 5:30 PM, japindado wrote:

> "My question about the Octave binary was just if it was  32-bit or a 64-bit
> binary (this is somewhat independent of the question whether Octave is built
> for 32-bit or 64-bit indexing)."
>
> I'm not sure how to tell.
>
> "I believe both available binaries right now are 32-bit Windows binaries
> (with 32-bit indexing), so they will be naturally limited just by virtue of
> the compiler that was used to create them.  Perhaps we can build Octave with
> this to get a 64-bit binary:  http://mingw-w64.sourceforge.net/"
>
> That would be great.  To get around this problems, I am running 3 instances
> of Octave and structuring my code with a bunch of config options to control
> flow, skip over certain sections, and tackle data piece-wice... 2GB for all
> of the variables in the workspace is too limiting these days.
>
> Thanks a lot again.
>

main issue is to compile 64bit all the needed libraries.
It will be a major work, requiring substantial manpower

Regards
Marco

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave