Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.
|
|
James
Posts:
1
Registered:
3/29/10
|
|
Re: 64bits and memory problem
Posted:
Mar 29, 2010 1:28 PM
|
|
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
|
|
|
|