From: ste me on
I recently shifted to Ubuntu(a)64bits and I have a problem with Matlab r2009a&memory.

The code makes use of a C file which is compiled via
>mex name.c

In a 32bits architecture everything is fine.
Under 64 bits the file is correctly compiled, but the programs stops with the error
Function "mxGetIr_700" is obsolete in file "compat32.cpp", line
282.
(64-bit mex files using sparse matrices must be rebuilt with the
"-largeArrayDims" option. See the R2006b release notes for more
details.)

I then compiled using the suggested option:

>mex -largeArrayDims name.c

and in this case I have an "out of memory" error.

The system has 4Gb of RAM, 4Gb of swap and the system monitor gives about 1Gb of used RAM while running Matlab...so I guess the problem is related to the quantity of ram allocated to Matlab.

Any idea?
From: Stan Bischof on
ste me <mail.plutus(a)gmail.com> wrote:
> I recently shifted to Ubuntu(a)64bits and I have a problem with Matlab
> r2009a&memory.
>
> The code makes use of a C file which is compiled via
>>mex name.c
>
> In a 32bits architecture everything is fine. Under 64 bits the file is
> correctly compiled, but the programs stops with the error

Perhaps a silly question - but are you running the 64-bit
version of Matlab?

Stan
From: James Tursa on
"ste me" <mail.plutus(a)gmail.com> wrote in message <hb5bq3$frt$1(a)fred.mathworks.com>...
> I recently shifted to Ubuntu(a)64bits and I have a problem with Matlab r2009a&memory.
>
> The code makes use of a C file which is compiled via
> >mex name.c
>
> In a 32bits architecture everything is fine.
> Under 64 bits the file is correctly compiled, but the programs stops with the error
> Function "mxGetIr_700" is obsolete in file "compat32.cpp", line
> 282.
> (64-bit mex files using sparse matrices must be rebuilt with the
> "-largeArrayDims" option. See the R2006b release notes for more
> details.)
>
> I then compiled using the suggested option:
>
> >mex -largeArrayDims name.c

Just using the -largeArrayDims flag doesn't fix the code for 64-bit. For example, if your name.c code is using int for array sizes instead of mwSize, mwSignedIndex, etc. etc. then the code will not work if any of those are passed by reference to a function (i.e., passing an address of an int to a routine that is expecting the address of an 8-byte unsigned integer for a size will obviously not work). The function would get garbage when it dereferenced the pointer, and if subsequently used as an agument for a memory allocation I could see how you might get an "out of memory" error. How large is your code ... short enough to post?

James Tursa
From: ste me on
I am of course using the 64bits version of Matlab ;)

concerning the C code, it's not mine but it's a routine found on the internet. Before posting here, I contacted the author of the routine who confirmed to me that the code should also work under the 64bits architecture.

I'll ask the author of the code to intervene here..
From: Sebastiaan on
"ste me" <mail.plutus(a)gmail.com> wrote in message <hb5e8b$oli$1(a)fred.mathworks.com>...
> I am of course using the 64bits version of Matlab ;)
>
> concerning the C code, it's not mine but it's a routine found on the internet. Before posting here, I contacted the author of the routine who confirmed to me that the code should also work under the 64bits architecture.
>
> I'll ask the author of the code to intervene here..

I believe it worked until 2008a or so...