[Ns-developers] ns-3.4 : Random Variables
Raj Bhattacharjea
raj.b at gatech.edu
Fri Feb 20 14:45:44 PST 2009
To move forward, let's remove the SetSeed method in question. The
functionality it provides will still be exported via the attributes
system and the command line. I have an implementation in mind, where
the GlobalValue g_rngSeed will initialize from either the command
line, or default to a value. This will require shuffling around
Mathieu's code a bit.
This brings up the more general question of how to put environment
variables into the mix of attributes/GlobalValues; currently we can
override Attribute defaults using Config::SetDefault, or by passing
--ns3::AttributeName=value on the command line; perhaps in the future
we should come up with a general way to specify how these values
should hook into a environment variables automatically, since this
kind of behavior might be desired. More on this later.
I expect this last round of random variables changes will be done and
merged by Monday. I'll follow up then about the bugs to fix for
ns-3.4
On Thu, Feb 19, 2009 at 1:36 AM, Mathieu Lacage
<mathieu.lacage at sophia.inria.fr> wrote:
> On Wed, 2009-02-18 at 15:42 -0500, Raj Bhattacharjea wrote:
>
>> I apologize for delaying the merge while I fiddled with understanding
>> the issues, and for not addressing the list sooner. The question I
>> have which remains is: are we sure that the changes to the RNG output
>> behavior that tree above introduces are consistent with the changes to
>> the seeding behavior? Or, are there some subtle bugs? I can't shake
>
> yes.
>
>> the feeling that there is something fishy with the seeding behavior.
>> For example:
>>
>> SeedManager::SetSeed(seeds) exists, and calls
>> RngStream::SetPackageSeed, which calls
>> RngStream::EnsureGlobalInitialized, which might recursively call
>> RngStream::SetPackageSeed with values read from the environment
>> variables (and different from what I passed into SeedManager::SetSeed
>> to begin with). I am just plum puzzled by this behavior.
>
> Well, then, just propose a different behavior and implementation. As far
> as I am concerned, if you want to merge asap, removing
> SeedManager::SetSeed altogether would be fine with me if it made you
> more comfortable about the API behavior. Since this patch is on the
> release critical path, this is what I would personally do as a RM.
>
>> Also, should applying this changeset:
>> http://code.nsnam.org/raj/ns-3-rng-changes/rev/debf1a8a96d3
>> To the tip of ns-3-dev change the regression output? Is it only for
>
> yes.
>
>> the users of GetSingleValue?
>
> yes, it was the case when I looked at this.
>
> regards,
> Mathieu
>
>
--
Raj Bhattacharjea
Georgia Institute of Technology
School of Electrical and Computer Engineering
Ph.D. Candidate
Systems Analyst
404.894.2955
More information about the Ns-developers
mailing list