> On Aug. 28, 2015, 7:21 a.m., Andreas Sandberg wrote:
> > I think this idea makes sense. I was doing something similar when I added 
> > [forking](https://github.com/andysan/gem5/commits/fork), specifically this 
> > [commit](https://github.com/andysan/gem5/commit/cbbba06a4ddbbc6c7571f8b4e92a41e36c9fc038])
> >  adds a similar mechanism for forked child processes. I ended up using 
> > Python's string substitution system and a dictionary with multiple 
> > substitution variables. For PIDs, I would've used something like this: 
> > "m5out.%(pid)s". This has the additional benefit of not clashing with the 
> > shell's substitution system.
> > 
> > I plan to rebase and submit the patches sometime soonish. Would it make 
> > sense to try to consistently use the same type of substitution in both 
> > cases?

Did these patches ever get submitted?  I don't recall seeing them.  Unless 
something is going to change soon, I'd like to submit this patch.

Note that I used '$$' to be consistent with shell syntax, not to clash with 
it... true that it does require quoting if you put it on the command line, but 
it doesn't if you put it in the .m5/options.py file, and it has the advantage 
that it's easy to remember.


- Steve


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3072/#review7072
-----------------------------------------------------------


On Aug. 23, 2015, 11:55 p.m., Steve Reinhardt wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3072/
> -----------------------------------------------------------
> 
> (Updated Aug. 23, 2015, 11:55 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> -------
> 
> Changeset 11060:06c8c441324a
> ---------------------------
> sim: enable adding pid to output directory name
> 
> With a fixed output directory name, running concurrent gem5 jobs
> in the same directory causes jobs to overwrite each other's output.
> Worse, for some upcoming changes where the output directory is
> used to hold redirected file I/O, having concurrent jobs share the
> same directory can cause crashes.
> 
> This patch enables easier generation of unique output directories
> by replacing any occurrence of '$$' in the output directory name
> with the gem5 process ID.  PID-specific output dirs can be enabled
> by default by overriding the 'm5out' default in the user's
> .m5/options.py file, as described in the comment.
> 
> 
> Diffs
> -----
> 
>   src/python/m5/main.py 842f56345a421244a7a8988a5bc4fb1cfbf409ef 
> 
> Diff: http://reviews.gem5.org/r/3072/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Steve Reinhardt
> 
>

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to