Re: Repeating simulations
Klaus Muller <kgmuller <at> xs4all.nl>
2007-05-09 13:47:55 GMT
Hi Mike!
Your research area looks very interesting, and I hope SimPy contributes well
as a tool.
As to a list where to announce your project/application area of SimPy, I
suggest using the SimPy wiki http://www.mcs.vuw.ac.nz/cgi-bin/wiki/SimPy.
Cheers,
Klaus
> -----Original Message-----
> From: simpy-users-bounces <at> lists.sourceforge.net
> [mailto:simpy-users-bounces <at> lists.sourceforge.net] On Behalf
> Of Michael McCracken
> Sent: Tuesday, May 01, 2007 2:04 AM
> To: Klaus Muller
> Cc: simpy-users <at> lists.sourceforge.net
> Subject: Re: [Simpy-users] Repeating simulations
>
> Klaus, Thanks. I think this pattern will work for me.
>
> To answer your question about the research, I'm using SimPy
> to study productivity in High-Performance Computing. We
> simulate the steps a user takes to complete a computational
> science experiment, including waiting in a batch queue and
> transferring data over a network. The idea is to provide
> better estimates of overal time-to-solution for HPC users' projects.
>
> I cited SimPy in a recently submitted paper, and if there's a
> listing of projects using SimPy somewhere, I'd be happy to
> add my use to it.
> It's been very important in keeping my own research productivity high.
>
> Thanks,
> -mike
>
> On 4/26/07, Klaus Muller <kgmuller <at> xs4all.nl> wrote:
> > Mike,
> > Your problem identification is correct: to reset the simulation
> > environment for a new run, you need to reset all globals
> which can be
> > assigned to in a run. This includes all Store, Level, and Resource
> > instances. Thus, the pattern for a run must be something like:
> >
> > initialize()
> > #initialize all global variables
> > #make and activate at least one Process
> > simulate(until=endtime)
> >
> > Don't forget, class variables are also globals:
> >
> > class Car(Process):
> > nrCars=0
> > . . . .
> >
> > What is your research about?
> >
> > Klaus Müller
> >
> >
> > > -----Original Message-----
> > > From: simpy-users-bounces <at> lists.sourceforge.net
> > > [mailto:simpy-users-bounces <at> lists.sourceforge.net] On Behalf Of
> > > Michael McCracken
> > > Sent: Thursday, April 26, 2007 7:17 PM
> > > To: simpy-users <at> lists.sourceforge.net
> > > Subject: [Simpy-users] Repeating simulations
> > >
> > > Hi, I have a SimPy simulation I'm using for my research, and I'm
> > > running into a problem with running multiple simulations
> in the same
> > > program.
> > >
> > > I started out with one simulation run that looked like this:
> > > - initialize()
> > > - create Process subclass objects and tallies
> > > - simulate()
> > >
> > > And I wanted to extend that to do many simulations in one
> execution,
> > > so now I have something like this:
> > >
> > > simulations = [{},{},...] # dicts of config values
> > >
> > > if __name__ == "__main__":
> > > for sim in simulations:
> > > runSimulation(sim)
> > >
> > > def runSimulation(sim):
> > > initialize()
> > > # create Process subclass objects and tallies
> > > simulate(until=bignum)
> > >
> > > I still have some globals - a few Store objects are global, and I
> > > think that must be where the problem is. What happens is that
> > > sometimes earlier instances of the Process objects get
> involved in
> > > later simulations.
> > >
> > > I guess I'd assumed that once their simulation was done,
> they would
> > > be deleted, or at least not active anymore, but it
> appears that they
> > > are still around and active, even if you re-call initialize().
> > > (Which makes sense looking at the source, since
> initialize() doesn't
> > > do very much).
> > >
> > > So, my question is - is this a pattern that should work,
> and I just
> > > need to add a step (maybe manually deleting the Process
> objects, or
> > > getting rid of all globals and creating new stores for each
> > > simulation run), or is there a better way to get this behavior?
> > >
> > > The ultimate goal is just to run a bunch of simulations
> at once with
> > > many parameters and get some statistics about the simulation time
> > > over all of them, and some other measures.
> > >
> > > Thanks!
> > > -mike
> > >
> > > --
> > > Michael McCracken
> > > UCSD CSE PhD Candidate
> > > research: http://www.cse.ucsd.edu/~mmccrack/
> > > misc: http://michael-mccracken.net/wp/
> > >
> > > --------------------------------------------------------------
> > > -----------
> > > This SF.net email is sponsored by DB2 Express Download
> DB2 Express C
> > > - the FREE version of DB2 express and take control of
> your XML. No
> > > limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > _______________________________________________
> > > Simpy-users mailing list
> > > Simpy-users <at> lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/simpy-users
> > >
> >
> >
>
>
> --
> Michael McCracken
> UCSD CSE PhD Candidate
> research: http://www.cse.ucsd.edu/~mmccrack/
> misc: http://michael-mccracken.net/wp/
>
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by DB2 Express Download DB2
> Express C - the FREE version of DB2 express and take control
> of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Simpy-users mailing list
> Simpy-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/simpy-users
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/