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 `set_seed` directly from `src/nmath/standalone/sunif.c` then the hang disappears. Now, I used set_seed many times before, and have never needed to do this before.

However, when thinking about this a little more, I realised that though I have used `set_seed` many times, I didn't have any idea where it was defined. I then did a `grep -r set_seed *` in the R sources, and the only definition that came up was the `src/nmath/standalone/sunif.c` one. So, now I'm puzzled. Where is the definition I have been using?

I don't mean to beat this to death, but if there was already a version of set_seed defined, I would have expected the linker to complain about duplicate definitions and it didn't, which is puzzling.

So, to summarize:

set_seed must be defined somewhere in the R sources, since otherwise my code (see my original example) would not have worked.

However, if it was defined, the linker should have given an error when I added a definition, which it didn't.

Also, I can't actually find a definition of set_seed or get_seed in the R sources, aside from src/nmath/standalone/sunif.c, which is an example file.

I must be missing something. Explanations appreciated.

                                                    Regards, Faheem Mitha



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to