Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!r27g2000yqn.googlegroups.com!not-for-mail
From: James <jfaghm@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: 64bits and memory problem
Date: Mon, 29 Mar 2010 10:28:44 -0700 (PDT)
Organization: http://groups.google.com
Lines: 34
Message-ID: <494aa791-8b11-4a6c-88c2-f1848260885d@r27g2000yqn.googlegroups.com>
References: <hif89a$p3q$1@fred.mathworks.com> <1712131673.21252.1264004162359.JavaMail.root@gallium.mathforum.org> 
	<hn3ovm$hi2$1@fred.mathworks.com>
NNTP-Posting-Host: 128.101.35.88
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1269883725 15091 127.0.0.1 (29 Mar 2010 17:28:45 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 29 Mar 2010 17:28:45 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: r27g2000yqn.googlegroups.com; posting-host=128.101.35.88; 
	posting-account=ucf7kAoAAABpP_iRONvkiyzOPYlBa0zl
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) 
	AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7,gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:621588

Hi Evan,
The problem is probably b/c you're on a Linux or Mac and they gcc,
which is slightly more finicky than other compilers. You need to
modify the lines in the Gibbs Sampler code where they randomly
generate a number and add "ULL" (without quotes). So a problematic
line such as the one below becomes (notice the ULL after 4294967296)
i_pick = i_start + (int) ( (double) randomMT() * (double) nauthors /
(double) (4294967296 + 1.0) );
i_pick = i_start + (int) ( (double) randomMT() * (double) nauthors /
(double) (4294967296ULL + 1.0) );

I am assuming you have a 32-bit machine.
James

On Mar 8, 4:08 pm, "evan Rosen" <emro...@stanford.edu> wrote:
> James <hyn...@cs.tcd.ie> wrote in message <1712131673.21252.1264004162359.JavaMail.r...@gallium.mathforum.org>...
> > Hi guys,
>
> > Thanks for the replies.
>
> > I managed to solve this problem by simply converting all problematic mwIndex* arrays to int* arrays.
>
> > Took me about a day, but at least it works now.
>
> I was looking through this discussion due to an issue with the Griffiths andSteyverstopic modelingtoolboxand your errors look almost identical to mine.  I am trying to use the GibbsSamplerLDA function and I thought I'd see if were possible to use your updated version or at least give me some pointers.
>
> thanks