> The Python RNG is Mersenne Twister just like the one in src/base > (http://docs.python.org/library/random.html). Ok. I'm alright with using the builtin one then, I just want a single "m5" way to seed the RNG. I was looking at random.i and all that it's really there for is setting the seed. I guess I mislead you in previous conversations (since I hadn't gone back and looked at the code before) and I never exposed the RNG itself.
> My issue right now is that the current random.i prevents you from using the > official python random module, which is just plain broken. I don't > understand why it is broken; you'd think that having it in the m5.internal > package would prevent them from interacting, but it doesn't. I'm 99% sure that it's not random.py that is coliding but _random.so is colliding with the C++ module that swig generates which is also called _random. My recollection is that there's no easy way to change that. We could try to figure out a way to change SWIG_name (which we used to do), but I think that will break the automatically generated random.py. Another option is if we change all of the module names from internal.foo to _m5_foo. Those are much less likely to collide. > It could be fixed by renaming or (better) figuring out why the package > isolation isn't working, but if all we have are hypotheses about possible > scenarios where it might be useful in the future, and a recognition that > even if the interference problem is fixed it might not be adequate, then I > think we should just get rid of it now, and when someone actually has a need > then we can put in something that addresses the actual problem at hand. We must at least keep a mechanism for seeding. My guess is that the best thing to do is stop having an internal subpackage and prepending all internal stuff with _internal or _m5 or somethign like that. I could of course keep the old names by mucking with importer.py Nate _______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev