[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] problem when running nam
On Tue, 5 Jun 2001, Shuju Wu wrote:
> Thanks, and please check this: (I'm not good at Unix)
>
> 1. I got that error message because I telnet from my
> workstation to a faster processor in the same system,
> and used EXPRORT DISPLAY. If I run NAM in my workstation,
> then it works.
You probably need to check the shell you are using right now and figure
out the right environment variable setups.
>
> 2. I'm not working on mobile simulations, but I used
> the on-off traffic generator, where random numbers are
> used.
the ON/OFF periods are generated according to a certain random
distribution (exponential or pareto), and that's why random number is
generated.
-chen xuan
>
> Wu
>
>
> On Tue, 5 Jun 2001, Lloyd Wood wrote:
>
> > On Tue, 5 Jun 2001, Shuju Wu wrote:
> >
> > > It's in the all-in-one package, in both 2.1b6
> > > and 2.1b7 this happens now. But a year ago,
> > > I used 2.1b6, there was no this problem.
> > > (all on Solaris). Someone please, help me.
> >
> > Any changes in version(s) of Solaris? Of your compiler?
> > My best guess is that you're doing mobility simulations,
> > and that in nam:
> >
> > [~nam]$ grep random\(\) *.cc
> > anetmodel.cc: ((Random::random()&0xffff)/32768.0 - 1.0);
> > anetmodel.cc: ((Random::random()&0xffff)/32768.0 - 1.0);
> > random.cc:random() GCC_THROW
> > random.cc: printf("random() called in ns.\nRandom is not portable,
> > please use Random::uniform() instead.\n");
> >
> > is causing your problem. (That error message needs fixing to
> > indicate whether ns or nam...)
> >
> > In ns there's still:
> >
> > mobilenode.cc: dX_ = (double) Random::random();
> > mobilenode.cc: dY_ = (double) Random::random();
> >
> > which is odd after all, Random::uniform() returns a double anyway, and
> > I've never even heard of uniform_positive_int().
> >
> > static int random() { return rng()->uniform_positive_int(); }
> > static double uniform() { return rng()->uniform_double();}
> >
> > Code says:
> >
> > void
> > MobileNode::random_direction()
> > {
> > /* this code isn't used anymore -dam 1/22/98 */
> >
> > so why is it there?
> >
> > Edit, recompile, report how you get on.
> >
> > L.
> >
> > > > > Can anyone help me with this?
> > > > > after I generate out.nam file and ran NAM,
> > > > > an error message said:
> > > > >
> > > > > random() called in ns.
> > > > > Random is not portable, please use Random::uniform() instead.
> > > > > Abort
> >
> > <[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>
> >
> >
>
--
Xuan Chen
USC/ISI