[Ns-developers] ns-3.4 : Random Variables
Mathieu Lacage
mathieu.lacage at sophia.inria.fr
Wed Feb 25 02:21:45 PST 2009
I fixed a small build error and removed the dead SeedManager::CheckSeed
(uint32_t[6]) function. The attached patch removes the env var support
from rng-stream.cc (-87 LOCs) to use the one in global-value.cc. I
tested it with:
NS_GLOBAL_VALUE='RngSeed=1;RngRun=1' ./waf --regression
NS_GLOBAL_VALUE='RngSeed=1;RngRun=2' ./waf --regression
NS_GLOBAL_VALUE='RngSeed=2;RngRun=1' ./waf --regression
NS_GLOBAL_VALUE='RngSeed=2;RngRun=2' ./waf --regression
and:
[mlacage at diese ns-3-dev]$ NS_GLOBAL_VALUE='RngSeed=3;RngRun=2' ./build/optimized/examples/csma-raw-ip-socket --RngSeed=2 --RngRun=3
seed=2, run=3
[mlacage at diese ns-3-dev]$ NS_GLOBAL_VALUE='RngSeed=3;RngRun=2' ./build/optimized/examples/csma-raw-ip-socket --RngSeed=2
seed=2, run=2
[mlacage at diese ns-3-dev]$ NS_GLOBAL_VALUE='RngSeed=3;RngRun=2' ./build/optimized/examples/csma-raw-ip-socket
seed=3, run=2
[mlacage at diese ns-3-dev]$
with this patch:
[mlacage at diese ns-3-dev]$ hg diff examples/csma-raw-ip-socket.cc
diff -r c35796bc0b4b examples/csma-raw-ip-socket.cc
--- a/examples/csma-raw-ip-socket.cc Wed Feb 25 11:00:50 2009 +0100
+++ b/examples/csma-raw-ip-socket.cc Wed Feb 25 11:15:07 2009 +0100
@@ -57,6 +57,10 @@
CommandLine cmd;
cmd.Parse (argc, argv);
+ std::cout << "seed=" << SeedManager::GetSeed ()
+ << ", run=" << SeedManager::GetRun () << std::endl;
+
+
// Here, we will explicitly create four nodes.
NS_LOG_INFO ("Create nodes.");
NodeContainer c;
I am fairly confident about this patch: would you mind apply it or do
you want me to do more testing ?
Mathieu
On Tue, 2009-02-24 at 15:00 -0500, Raj Bhattacharjea wrote:
> On Tue, Feb 24, 2009 at 12:14 PM, Raj Bhattacharjea <raj.b at gatech.edu> wrote:
> > I hit some minor snags just as I was finalizing things last night.
> > The tree here has the current code:
> > http://code.nsnam.org/raj/ns-3-rng-changes/
> >
> > Which I am cleaning up for running through the regression suite and merge.
>
> The tree is being put through its paces on the ns-regression machine.
> As soon as I get the email from the system telling me it is done and
> passed, I will push the tree into ns-3-dev.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p
Type: text/x-patch
Size: 4199 bytes
Desc: not available
Url : http://mailman.isi.edu/pipermail/ns-developers/attachments/20090225/cea2d3ac/p.bin
More information about the Ns-developers
mailing list