----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/3072/#review7072 -----------------------------------------------------------
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? - Andreas Sandberg On Aug. 24, 2015, 7:55 a.m., Steve Reinhardt wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/3072/ > ----------------------------------------------------------- > > (Updated Aug. 24, 2015, 7:55 a.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
