Discussion:
problem in restoring from checkpoint at instruction number after updating gem5
(too old to reply)
Negar Miralaei
2013-08-02 13:07:06 UTC
Permalink
Hi,

I updated the gem5 on my machine after 2 months! I'm trying to put a
checkpoint at a particular instruction number, and then restoring from
that checkpoint, but I received an error! I could run the same command
before updating gem5. Here is the commands and the error. Did I miss any
other options on the command line?

checkpoint:
build/ARM/gem5.fast 0 -d system/disks/CPU2000/output/bzip2_source/
configs/example/se.py --bench bzip2_source
--checkpoint-dir=system/disks/CPU2000/output/bzip2_source/
--max-checkpoints=1 --at-instruction --take-checkpoints 2200000000

restore:
build/ARM/gem5.fast -d system/disks/CPU2000/output/bzip2_source/
configs/example/se.py --bench bzip2_source
--checkpoint-dir=system/disks/CPU2000/output/bzip2_source/
--at-instruction --checkpoint-restore=2200000000

error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/local/scratch/nm537/GEM5/gem5-v2/gem5/src/python/m5/main.py",
line 387, in main
exec filecode in scope
File "configs/example/se.py", line 243, in <module>
Simulation.run(options, root, system, FutureClass)
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/configs/common/Simulation.py",
line 414, in run
cpt_starttick, checkpoint_dir = findCptDir(options, cptdir, testsys)
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/configs/common/Simulation.py",
line 159, in findCptDir
return cpt_starttick, checkpoint_dir
UnboundLocalError: local variable 'cpt_starttick' referenced before
assignment

Thanks
Negar
Fulya Kaplan
2013-08-02 13:21:36 UTC
Permalink
Hi Negar,
If I am not wrong, --checkpoint-restore does not take the instruction
number as a parameter. If you have only 1 checkpoint in your checkpoint
directory which you restore from, you should have --checkpoint-restore=1.
With your current command, it may be searching for the 2200000000th
checkpoint in that directory.
Best,
Fulya
Post by Negar Miralaei
Hi,
I updated the gem5 on my machine after 2 months! I'm trying to put a
checkpoint at a particular instruction number, and then restoring from that
checkpoint, but I received an error! I could run the same command before
updating gem5. Here is the commands and the error. Did I miss any other
options on the command line?
build/ARM/gem5.fast 0 -d system/disks/CPU2000/output/**bzip2_source/
configs/example/se.py --bench bzip2_source --checkpoint-dir=system/disks/*
*CPU2000/output/bzip2_source/ --max-checkpoints=1 --at-instruction
--take-checkpoints 2200000000
build/ARM/gem5.fast -d system/disks/CPU2000/output/**bzip2_source/
configs/example/se.py --bench bzip2_source --checkpoint-dir=system/disks/*
*CPU2000/output/bzip2_source/ --at-instruction --checkpoint-restore=**
2200000000
File "<string>", line 1, in <module>
File "/local/scratch/nm537/GEM5/**gem5-v2/gem5/src/python/m5/**main.py",
line 387, in main
exec filecode in scope
File "configs/example/se.py", line 243, in <module>
Simulation.run(options, root, system, FutureClass)
File "/local/scratch/nm537/GEM5/**gem5-v2/gem5/configs/common/**Simulation.py",
line 414, in run
cpt_starttick, checkpoint_dir = findCptDir(options, cptdir, testsys)
File "/local/scratch/nm537/GEM5/**gem5-v2/gem5/configs/common/**Simulation.py",
line 159, in findCptDir
return cpt_starttick, checkpoint_dir
UnboundLocalError: local variable 'cpt_starttick' referenced before
assignment
Thanks
Negar
______________________________**_________________
gem5-users mailing list
http://m5sim.org/cgi-bin/**mailman/listinfo/gem5-users<http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users>
Negar Miralaei
2013-08-02 13:29:03 UTC
Permalink
Hi Fulya,

Thanks for your reply. When you use the --at-instruction option on the
command line, gem5 will consider the restore point as the instruction
number. However, using the --checkpoint-restore=1 is not working either!
There is a bug in the function findCptDir in se.py, which should be
fixed (previously, there wasn't any problem using this option).

Cheers
Negar
Post by Fulya Kaplan
Hi Negar,
If I am not wrong, --checkpoint-restore does not take the instruction
number as a parameter. If you have only 1 checkpoint in your
checkpoint directory which you restore from, you should have
--checkpoint-restore=1. With your current command, it may be searching
for the 2200000000th checkpoint in that directory.
Best,
Fulya
Hi,
I updated the gem5 on my machine after 2 months! I'm trying to put
a checkpoint at a particular instruction number, and then
restoring from that checkpoint, but I received an error! I could
run the same command before updating gem5. Here is the commands
and the error. Did I miss any other options on the command line?
build/ARM/gem5.fast 0 -d system/disks/CPU2000/output/bzip2_source/
configs/example/se.py --bench bzip2_source
--checkpoint-dir=system/disks/CPU2000/output/bzip2_source/
--max-checkpoints=1 --at-instruction --take-checkpoints 2200000000
build/ARM/gem5.fast -d system/disks/CPU2000/output/bzip2_source/
configs/example/se.py --bench bzip2_source
--checkpoint-dir=system/disks/CPU2000/output/bzip2_source/
--at-instruction --checkpoint-restore=2200000000
File "<string>", line 1, in <module>
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/src/python/m5/main.py",
line 387, in main
exec filecode in scope
File "configs/example/se.py", line 243, in <module>
Simulation.run(options, root, system, FutureClass)
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/configs/common/Simulation.py",
line 414, in run
cpt_starttick, checkpoint_dir = findCptDir(options, cptdir, testsys)
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/configs/common/Simulation.py",
line 159, in findCptDir
return cpt_starttick, checkpoint_dir
UnboundLocalError: local variable 'cpt_starttick' referenced
before assignment
Thanks
Negar
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Negar Miralaei
2013-08-02 13:31:03 UTC
Permalink
correction: findCptDir is in Simulation.py!
Post by Negar Miralaei
Hi Fulya,
Thanks for your reply. When you use the --at-instruction option on the
command line, gem5 will consider the restore point as the instruction
number. However, using the --checkpoint-restore=1 is not working
either! There is a bug in the function findCptDir in se.py, which
should be fixed (previously, there wasn't any problem using this option).
Cheers
Negar
Post by Fulya Kaplan
Hi Negar,
If I am not wrong, --checkpoint-restore does not take the instruction
number as a parameter. If you have only 1 checkpoint in your
checkpoint directory which you restore from, you should have
--checkpoint-restore=1. With your current command, it may be
searching for the 2200000000th checkpoint in that directory.
Best,
Fulya
Hi,
I updated the gem5 on my machine after 2 months! I'm trying to
put a checkpoint at a particular instruction number, and then
restoring from that checkpoint, but I received an error! I could
run the same command before updating gem5. Here is the commands
and the error. Did I miss any other options on the command line?
build/ARM/gem5.fast 0 -d
system/disks/CPU2000/output/bzip2_source/ configs/example/se.py
--bench bzip2_source
--checkpoint-dir=system/disks/CPU2000/output/bzip2_source/
--max-checkpoints=1 --at-instruction --take-checkpoints 2200000000
build/ARM/gem5.fast -d system/disks/CPU2000/output/bzip2_source/
configs/example/se.py --bench bzip2_source
--checkpoint-dir=system/disks/CPU2000/output/bzip2_source/
--at-instruction --checkpoint-restore=2200000000
File "<string>", line 1, in <module>
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/src/python/m5/main.py",
line 387, in main
exec filecode in scope
File "configs/example/se.py", line 243, in <module>
Simulation.run(options, root, system, FutureClass)
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/configs/common/Simulation.py",
line 414, in run
cpt_starttick, checkpoint_dir = findCptDir(options, cptdir, testsys)
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/configs/common/Simulation.py",
line 159, in findCptDir
return cpt_starttick, checkpoint_dir
UnboundLocalError: local variable 'cpt_starttick' referenced
before assignment
Thanks
Negar
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Joel Hestness
2013-08-02 17:42:12 UTC
Permalink
Hey Negar and Nithesh,
It looks like this is related to the change I made a couple weeks ago to
add support for specifying maximum simulation ticks (changeset
9816:971507cbbe65 http://repo.gem5.org/gem5/rev/971507cbbe65). I have an
idea for a temporary quick-fix for you, and I'll try to get it to you this
afternoon. If you don't want to wait for a fix, you could consider rolling
your repo back to changeset 9815:3b3b94536547:

% hg update -r 9815
Then rebuild.

Sorry for any inconvenience,
Joel
Post by Negar Miralaei
correction: findCptDir is in Simulation.py!
Hi Fulya,
Thanks for your reply. When you use the --at-instruction option on the
command line, gem5 will consider the restore point as the instruction
number. However, using the --checkpoint-restore=1 is not working either!
There is a bug in the function findCptDir in se.py, which should be fixed
(previously, there wasn't any problem using this option).
Cheers
Negar
Hi Negar,
If I am not wrong, --checkpoint-restore does not take the instruction
number as a parameter. If you have only 1 checkpoint in your checkpoint
directory which you restore from, you should have --checkpoint-restore=1.
With your current command, it may be searching for the 2200000000th
checkpoint in that directory.
Best,
Fulya
Post by Negar Miralaei
Hi,
I updated the gem5 on my machine after 2 months! I'm trying to put a
checkpoint at a particular instruction number, and then restoring from that
checkpoint, but I received an error! I could run the same command before
updating gem5. Here is the commands and the error. Did I miss any other
options on the command line?
build/ARM/gem5.fast 0 -d system/disks/CPU2000/output/bzip2_source/
configs/example/se.py --bench bzip2_source
--checkpoint-dir=system/disks/CPU2000/output/bzip2_source/
--max-checkpoints=1 --at-instruction --take-checkpoints 2200000000
build/ARM/gem5.fast -d system/disks/CPU2000/output/bzip2_source/
configs/example/se.py --bench bzip2_source
--checkpoint-dir=system/disks/CPU2000/output/bzip2_source/ --at-instruction
--checkpoint-restore=2200000000
File "<string>", line 1, in <module>
File "/local/scratch/nm537/GEM5/gem5-v2/gem5/src/python/m5/main.py",
line 387, in main
exec filecode in scope
File "configs/example/se.py", line 243, in <module>
Simulation.run(options, root, system, FutureClass)
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/configs/common/Simulation.py", line
414, in run
cpt_starttick, checkpoint_dir = findCptDir(options, cptdir, testsys)
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/configs/common/Simulation.py", line
159, in findCptDir
return cpt_starttick, checkpoint_dir
UnboundLocalError: local variable 'cpt_starttick' referenced before
assignment
Thanks
Negar
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
_______________________________________________
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
--
Joel Hestness
PhD Student, Computer Architecture
Dept. of Computer Science, University of Wisconsin - Madison
http://pages.cs.wisc.edu/~hestness/
Nithesh Kurella
2013-08-02 19:57:30 UTC
Permalink
Hi Joel

Thanks for your prompt reply and attention towards the problem. Is the Fast
forward problem also because of the same change?

Regards
Nithesh Kurella
Post by Joel Hestness
Hey Negar and Nithesh,
It looks like this is related to the change I made a couple weeks ago to
add support for specifying maximum simulation ticks (changeset
9816:971507cbbe65 http://repo.gem5.org/gem5/rev/971507cbbe65). I have an
idea for a temporary quick-fix for you, and I'll try to get it to you this
afternoon. If you don't want to wait for a fix, you could consider rolling
% hg update -r 9815
Then rebuild.
Sorry for any inconvenience,
Joel
Post by Negar Miralaei
correction: findCptDir is in Simulation.py!
Hi Fulya,
Thanks for your reply. When you use the --at-instruction option on the
command line, gem5 will consider the restore point as the instruction
number. However, using the --checkpoint-restore=1 is not working either!
There is a bug in the function findCptDir in se.py, which should be fixed
(previously, there wasn't any problem using this option).
Cheers
Negar
Hi Negar,
If I am not wrong, --checkpoint-restore does not take the instruction
number as a parameter. If you have only 1 checkpoint in your checkpoint
directory which you restore from, you should have --checkpoint-restore=1.
With your current command, it may be searching for the 2200000000th
checkpoint in that directory.
Best,
Fulya
Post by Negar Miralaei
Hi,
I updated the gem5 on my machine after 2 months! I'm trying to put a
checkpoint at a particular instruction number, and then restoring from that
checkpoint, but I received an error! I could run the same command before
updating gem5. Here is the commands and the error. Did I miss any other
options on the command line?
build/ARM/gem5.fast 0 -d system/disks/CPU2000/output/bzip2_source/
configs/example/se.py --bench bzip2_source
--checkpoint-dir=system/disks/CPU2000/output/bzip2_source/
--max-checkpoints=1 --at-instruction --take-checkpoints 2200000000
build/ARM/gem5.fast -d system/disks/CPU2000/output/bzip2_source/
configs/example/se.py --bench bzip2_source
--checkpoint-dir=system/disks/CPU2000/output/bzip2_source/ --at-instruction
--checkpoint-restore=2200000000
File "<string>", line 1, in <module>
File "/local/scratch/nm537/GEM5/gem5-v2/gem5/src/python/m5/main.py",
line 387, in main
exec filecode in scope
File "configs/example/se.py", line 243, in <module>
Simulation.run(options, root, system, FutureClass)
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/configs/common/Simulation.py", line
414, in run
cpt_starttick, checkpoint_dir = findCptDir(options, cptdir, testsys)
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/configs/common/Simulation.py", line
159, in findCptDir
return cpt_starttick, checkpoint_dir
UnboundLocalError: local variable 'cpt_starttick' referenced before
assignment
Thanks
Negar
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
_______________________________________________
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
--
Joel Hestness
PhD Student, Computer Architecture
Dept. of Computer Science, University of Wisconsin - Madison
http://pages.cs.wisc.edu/~hestness/
Joel Hestness
2013-08-02 20:17:32 UTC
Permalink
Hi guys,
Attached is a patch to side-step the max tick setting, which should get
you running again. To apply it:

% cd <gem5_directory>
% hg qimport <path_to>/minor_fix_for_maxticks
% hg qpush
Then rebuild

@Nithesh: I'm not able to replicate the fast-forwarding bug that you're
experiencing, but skimming through the code that was changed in changeset
9816, it doesn't look like that would have caused the problem.

Joel
Post by Nithesh Kurella
Hi Joel
Thanks for your prompt reply and attention towards the problem. Is the
Fast forward problem also because of the same change?
Regards
Nithesh Kurella
Post by Joel Hestness
Hey Negar and Nithesh,
It looks like this is related to the change I made a couple weeks ago
to add support for specifying maximum simulation ticks (changeset
9816:971507cbbe65 http://repo.gem5.org/gem5/rev/971507cbbe65). I have
an idea for a temporary quick-fix for you, and I'll try to get it to you
this afternoon. If you don't want to wait for a fix, you could consider
% hg update -r 9815
Then rebuild.
Sorry for any inconvenience,
Joel
Post by Negar Miralaei
correction: findCptDir is in Simulation.py!
Hi Fulya,
Thanks for your reply. When you use the --at-instruction option on the
command line, gem5 will consider the restore point as the instruction
number. However, using the --checkpoint-restore=1 is not working either!
There is a bug in the function findCptDir in se.py, which should be fixed
(previously, there wasn't any problem using this option).
Cheers
Negar
Hi Negar,
If I am not wrong, --checkpoint-restore does not take the instruction
number as a parameter. If you have only 1 checkpoint in your checkpoint
directory which you restore from, you should have --checkpoint-restore=1.
With your current command, it may be searching for the 2200000000th
checkpoint in that directory.
Best,
Fulya
Post by Negar Miralaei
Hi,
I updated the gem5 on my machine after 2 months! I'm trying to put a
checkpoint at a particular instruction number, and then restoring from that
checkpoint, but I received an error! I could run the same command before
updating gem5. Here is the commands and the error. Did I miss any other
options on the command line?
build/ARM/gem5.fast 0 -d system/disks/CPU2000/output/bzip2_source/
configs/example/se.py --bench bzip2_source
--checkpoint-dir=system/disks/CPU2000/output/bzip2_source/
--max-checkpoints=1 --at-instruction --take-checkpoints 2200000000
build/ARM/gem5.fast -d system/disks/CPU2000/output/bzip2_source/
configs/example/se.py --bench bzip2_source
--checkpoint-dir=system/disks/CPU2000/output/bzip2_source/ --at-instruction
--checkpoint-restore=2200000000
File "<string>", line 1, in <module>
File "/local/scratch/nm537/GEM5/gem5-v2/gem5/src/python/m5/main.py",
line 387, in main
exec filecode in scope
File "configs/example/se.py", line 243, in <module>
Simulation.run(options, root, system, FutureClass)
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/configs/common/Simulation.py", line
414, in run
cpt_starttick, checkpoint_dir = findCptDir(options, cptdir, testsys)
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/configs/common/Simulation.py", line
159, in findCptDir
return cpt_starttick, checkpoint_dir
UnboundLocalError: local variable 'cpt_starttick' referenced before
assignment
Thanks
Negar
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
_______________________________________________
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
--
Joel Hestness
PhD Student, Computer Architecture
Dept. of Computer Science, University of Wisconsin - Madison
http://pages.cs.wisc.edu/~hestness/
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
--
Joel Hestness
PhD Student, Computer Architecture
Dept. of Computer Science, University of Wisconsin - Madison
http://pages.cs.wisc.edu/~hestness/
Negar Miralaei
2013-08-02 20:26:44 UTC
Permalink
Hi Joel,

Many thanks for the patch. However I'm not able to test it until Monday,
I hope it solves the problem.

Cheers
Negar
Post by Joel Hestness
Hi guys,
Attached is a patch to side-step the max tick setting, which should
% cd <gem5_directory>
% hg qimport <path_to>/minor_fix_for_maxticks
% hg qpush
Then rebuild
@Nithesh: I'm not able to replicate the fast-forwarding bug that
you're experiencing, but skimming through the code that was changed in
changeset 9816, it doesn't look like that would have caused the problem.
Joel
Hi Joel
Thanks for your prompt reply and attention towards the problem. Is
the Fast forward problem also because of the same change?
Regards
Nithesh Kurella
On Fri, Aug 2, 2013 at 1:42 PM, Joel Hestness
Hey Negar and Nithesh,
It looks like this is related to the change I made a couple
weeks ago to add support for specifying maximum simulation
ticks (changeset 9816:971507cbbe65
http://repo.gem5.org/gem5/rev/971507cbbe65). I have an idea
for a temporary quick-fix for you, and I'll try to get it to
you this afternoon. If you don't want to wait for a fix, you
could consider rolling your repo back to changeset
% hg update -r 9815
Then rebuild.
Sorry for any inconvenience,
Joel
On Fri, Aug 2, 2013 at 8:31 AM, Negar Miralaei
correction: findCptDir is in Simulation.py!
Post by Negar Miralaei
Hi Fulya,
Thanks for your reply. When you use the --at-instruction
option on the command line, gem5 will consider the
restore point as the instruction number. However, using
the --checkpoint-restore=1 is not working either! There
is a bug in the function findCptDir in se.py, which
should be fixed (previously, there wasn't any problem
using this option).
Cheers
Negar
Post by Fulya Kaplan
Hi Negar,
If I am not wrong, --checkpoint-restore does not take
the instruction number as a parameter. If you have only
1 checkpoint in your checkpoint directory which you
restore from, you should have --checkpoint-restore=1.
With your current command, it may be searching for the
2200000000th checkpoint in that directory.
Best,
Fulya
On Fri, Aug 2, 2013 at 9:07 AM, Negar Miralaei
Hi,
I updated the gem5 on my machine after 2 months! I'm
trying to put a checkpoint at a particular
instruction number, and then restoring from that
checkpoint, but I received an error! I could run the
same command before updating gem5. Here is the
commands and the error. Did I miss any other options
on the command line?
build/ARM/gem5.fast 0 -d
system/disks/CPU2000/output/bzip2_source/
configs/example/se.py --bench bzip2_source
--checkpoint-dir=system/disks/CPU2000/output/bzip2_source/
--max-checkpoints=1 --at-instruction
--take-checkpoints 2200000000
build/ARM/gem5.fast -d
system/disks/CPU2000/output/bzip2_source/
configs/example/se.py --bench bzip2_source
--checkpoint-dir=system/disks/CPU2000/output/bzip2_source/
--at-instruction --checkpoint-restore=2200000000
File "<string>", line 1, in <module>
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/src/python/m5/main.py",
line 387, in main
exec filecode in scope
File "configs/example/se.py", line 243, in <module>
Simulation.run(options, root, system, FutureClass)
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/configs/common/Simulation.py",
line 414, in run
cpt_starttick, checkpoint_dir =
findCptDir(options, cptdir, testsys)
File
"/local/scratch/nm537/GEM5/gem5-v2/gem5/configs/common/Simulation.py",
line 159, in findCptDir
return cpt_starttick, checkpoint_dir
UnboundLocalError: local variable 'cpt_starttick'
referenced before assignment
Thanks
Negar
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
--
Joel Hestness
PhD Student, Computer Architecture
Dept. of Computer Science, University of Wisconsin - Madison
http://pages.cs.wisc.edu/~hestness/
<http://pages.cs.wisc.edu/%7Ehestness/>
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
--
Joel Hestness
PhD Student, Computer Architecture
Dept. of Computer Science, University of Wisconsin - Madison
http://pages.cs.wisc.edu/~hestness/
<http://pages.cs.wisc.edu/%7Ehestness/>
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Loading...