out of curiosity, what is the use case for this?  Many exit causes
would cause the simulator to exit immediately when resuming from a
checkpoint.

  Nate

On Wed, Nov 18, 2009 at 6:05 PM, Brad Beckmann <[email protected]> wrote:
> changeset 463aab78c057 in /z/repo/m5
> details: http://repo.m5sim.org/m5?cmd=changeset;node=463aab78c057
> description:
>        m5: Added option to take a checkpoint at the end of simulation
>
> diffstat:
>
> 2 files changed, 6 insertions(+)
> configs/common/Options.py    |    3 +++
> configs/common/Simulation.py |    3 +++
>
> diffs (23 lines):
>
> diff -r db802ee94eb6 -r 463aab78c057 configs/common/Options.py
> --- a/configs/common/Options.py Wed Nov 18 13:55:58 2009 -0800
> +++ b/configs/common/Options.py Wed Nov 18 13:55:58 2009 -0800
> @@ -53,6 +53,9 @@
>     help="Place all checkpoints in this absolute directory")
>  parser.add_option("-r", "--checkpoint-restore", action="store", type="int",
>     help="restore from checkpoint <N>")
> +parser.add_option("--checkpoint-at-end", action="store_true",
> +                  help="take a checkpoint at end of run")
> +
>
>  # CPU Switching - default switch model goes from a checkpoint
>  # to a timing simple CPU with caches to warm up, then to detailed CPU for
> diff -r db802ee94eb6 -r 463aab78c057 configs/common/Simulation.py
> --- a/configs/common/Simulation.py      Wed Nov 18 13:55:58 2009 -0800
> +++ b/configs/common/Simulation.py      Wed Nov 18 13:55:58 2009 -0800
> @@ -374,3 +374,6 @@
>         exit_cause = exit_event.getCause()
>     print 'Exiting @ cycle %i because %s' % (m5.curTick(), exit_cause)
>
> +    if options.checkpoint_at_end:
> +        m5.checkpoint(root, joinpath(cptdir, "cpt.%d"))
> +
> _______________________________________________
> m5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/m5-dev
>
>
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to