[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Who calls random()?
On Thu, 19 Aug 1999 18:08:19 EDT, Mikihiro Ueno wrote:
>Dear ns users;
>
>I described my problem on installing the ns and nam in
>
> http://www-mash.cs.berkeley.edu/dist/archive/ns-users/9908/0130.html
>
>but I could not get any suggestions.
>Then I tried to install piece by piece instead of all-in-one.
>I installed all of them successfully. But when I ran nam I got an error message
>"Random is not portable, please use Random::uniform() instead.", again and
>nam didn't start.
>This message was displayed by the function random() in random.cc. So I edited
>random.cc as below.
>
>random()
>{
> printf("random() called in ns.\nRandom is not portable, please use Random::uniform() instead.\n");
> return 1;
> /*abort();*/
>}
To find who's calling the function, run your program in a debugger and
do a backtrace.
Making random return 1 always isn't very random, is it? (Yes, this
will affect your simulations!)
-John Heidemann