Bug#657573: r-mathlib: The following code (using rgamma) hangs

2012-01-27 Thread Faheem Mitha
On Fri, 27 Jan 2012, Faheem Mitha wrote: Hi Dirk, After some time spent trying to debug this, I discovered I can make the hang disappear by defining (or possibly redefining) get_seed and set_seed. If I rewrite my example to be instead [snippage] taking the definitions of `get_seed` and

Bug#657573: r-mathlib: The following code (using rgamma) hangs

2012-01-27 Thread Dirk Eddelbuettel
Faheem, I was out last night at the local R user group, so sorry it took four mails for a reply. When I play with your code example, as well as the test.c example from the r-mathlib package, I get it to work easily if I just change the seed: edd@max:/tmp$ cat faheem.cpp #define

Bug#657573: r-mathlib: The following code (using rgamma) hangs

2012-01-27 Thread Dirk Eddelbuettel
Also: edd@max:/tmp$ cat faheem.cpp #define MATHLIB_STANDALONE #include Rmath.h #include iostream using std::cout; using std::endl; int main(void) { set_seed(0, 0); cout one normal norm_rand() endl; } edd@max:/tmp$ g++ -o faheem faheem.cpp -lRmath; ./faheem one normal -inf

Bug#657573: r-mathlib: The following code (using rgamma) hangs

2012-01-26 Thread Faheem Mitha
Package: r-mathlib Version: 2.14.1-1 Severity: normal Hi Dirk, The following C++ code hangs, with both r-mathlib 2.11.1-6 and 2.14.1-1. The problem is the rgamma function, but I have not attempted to debug it. Any idea what is going on here? Thanks. #define MATHLIB_STANDALONE #include Rmath.h

Bug#657573: r-mathlib: The following code (using rgamma) hangs

2012-01-26 Thread Faheem Mitha
On Fri, 27 Jan 2012, Faheem Mitha wrote: Package: r-mathlib Version: 2.14.1-1 Severity: normal Hi Dirk, The following C++ code hangs, with both r-mathlib 2.11.1-6 and 2.14.1-1. The problem is the rgamma function, but I have not attempted to debug it. Any idea what is going on here? Thanks.

Bug#657573: r-mathlib: The following code (using rgamma) hangs

2012-01-26 Thread Faheem Mitha
Hi Dirk, After some time spent trying to debug this, I discovered I can make the hang disappear by defining (or possibly redefining) get_seed and set_seed. If I rewrite my example to be instead ## #define