Path: news.mathworks.com!not-for-mail
From: "Steven_Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: 64bits and memory problem
Date: Mon, 16 Sep 2013 11:30:21 -0400
Organization: MathWorks
Lines: 53
Message-ID: <l1786e$rr4$1@newscl01ah.mathworks.com>
References: <hb5bq3$frt$1@fred.mathworks.com> <hb5dlg$g5k$1@fred.mathworks.com> <l16gve$ln0$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: ah-slord.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain;
	format=flowed;
	charset="utf-8";
	reply-type=response
Content-Transfer-Encoding: 7bit
X-Trace: newscl01ah.mathworks.com 1379345422 28516 172.28.147.189 (16 Sep 2013 15:30:22 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 16 Sep 2013 15:30:22 +0000 (UTC)
In-Reply-To: <l16gve$ln0$1@newscl01ah.mathworks.com>
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8089.726
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726
Xref: news.mathworks.com comp.soft-sys.matlab:802505



"Jagvaral " <selmee006@gmail.com> wrote in message 
news:l16gve$ln0$1@newscl01ah.mathworks.com...
> "James Tursa" wrote in message <hb5dlg$g5k$1@fred.mathworks.com>...
>> "ste me" <mail.plutus@gmail.com> wrote in message 
>> <hb5bq3$frt$1@fred.mathworks.com>...
>> > 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
>
> Hi, I have exactly the same problem as you mention. First, I add 
> '-largeArrayDims' option but it caused another problem saying that out of 
> memory. How can I fix this problem? Do you think it is because of matlab 
> version? I really need help please.

Read the suggestions in this section of the documentation:

http://www.mathworks.com/help/matlab/matlab_prog/resolving-out-of-memory-errors.html

-- 
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on 
http://www.mathworks.com