The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: 64bits and memory problem
Replies: 18   Last Post: Oct 2, 2013 5:39 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
James Tursa

Posts: 2,326
Registered: 8/5/09
Re: 64bits and memory problem
Posted: Oct 14, 2009 4:52 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"ste me" <> wrote in message <hb5bq3$frt$>...
> I recently shifted to Ubuntu@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

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.