Re: [gem5-users] Full System X86 restoring from checkpoint questions

2019-08-30 Thread Pouya Fotouhi
Hi Abhishek,

Do you have your binary (hello_world) on your disk image? To be more
precise, was the binary on the disk image when you took the checkpoint?

Best,

On Fri, Aug 30, 2019 at 8:26 AM Abhishek Singh <
abhishek.singh199...@gmail.com> wrote:

> Hello Everyone,
>
> I have created the checkpoint for booting up Linux image.
> My command line is
> """
>
> build/X86/gem5.opt
> --outdir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
> --stats-file=common_checkpoint_chkpt.simout
> --dump-config=common_checkpoint_chkpt.ini --redirect-stderr
> --stderr-file=common_checkpoint_chkpt.e configs/example/fs.py
> --checkpoint-dir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
> --disk-image=/home/abs218/gem5_dir_local/gem5_bl_fs/intel.img
> --kernel=/home/abs218/new_fs/gem5/linux-4.8.13/vmlinux
> --script=./common_checkpoint.rcS --caches --l2cache
>
>
> """
>
> my common_checkpoint.rcS is
>
> """
>
> #!/bin/sh
>
> /sbin/m5 checkpoint
>
> echo "Done :D"
>
> /sbin/m5 exit
>
>
> """
>
> I wanted to use this checkpoint and try to run a hello_world benchmark.
> So I modify my common_checkpoint.rcS script to
> """
>
> #!/bin/sh
>
> ./hello_world
>
> echo "Done :D"
>
> /sbin/m5 exit
>
> """
> And my gem5 command line is
> """
> ./build/X86/gem5.opt
> --outdir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
> --stats-file=common_checkpoint_chkpt_restore.simout
> --dump-config=common_checkpoint_chkpt_restore.ini configs/example/fs.py
> --checkpoint-restore=1
> --checkpoint-dir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
> --restore-with-cpu=AtomicSimpleCPU --cpu-type=DerivO3CPU --caches --l2cache
> --disk-image=/home/abs218/gem5_dir_local/gem5_bl_fs/intel.img
> --kernel=/home/abs218/new_fs/gem5/linux-4.8.13/vmlinux
> --script=./common_checkpoint.rcS
> """
> But my "system.pc.com_1.device" output after restoring  is
> ""
>
> Done :D
> ""
> That is, it did not run the hello_world program!
>
> I have made no changes to gem5, the commit I am using is "
> 2a98a994df296f818b05da90ba073d879562da04"
>
>
> My question is:
> Is it not possible to create a common checkpoint and then run the
> benchmark using that checkpoint?
> Are my steps incorrect to create or restore from the checkpoint?
>
>
>
>
> Best regards,
>
> Abhishek
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users



-- 
Pouya Fotouhi
PhD Candidate
Department of Electrical and Computer Engineering
University of California, Davis
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Full System X86 restoring from checkpoint questions

2019-08-30 Thread Jason Lowe-Power
Hi Abhishek,

Check out the hack back script for an example on how to create a common
checkpoint:
https://gem5.googlesource.com/public/gem5/+/master/configs/boot/hack_back_ckpt.rcS

On Fri, Aug 30, 2019 at 8:26 AM Abhishek Singh <
abhishek.singh199...@gmail.com> wrote:

> Hello Everyone,
>
> I have created the checkpoint for booting up Linux image.
> My command line is
> """
>
> build/X86/gem5.opt
> --outdir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
> --stats-file=common_checkpoint_chkpt.simout
> --dump-config=common_checkpoint_chkpt.ini --redirect-stderr
> --stderr-file=common_checkpoint_chkpt.e configs/example/fs.py
> --checkpoint-dir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
> --disk-image=/home/abs218/gem5_dir_local/gem5_bl_fs/intel.img
> --kernel=/home/abs218/new_fs/gem5/linux-4.8.13/vmlinux
> --script=./common_checkpoint.rcS --caches --l2cache
>
>
> """
>
> my common_checkpoint.rcS is
>
> """
>
> #!/bin/sh
>
> /sbin/m5 checkpoint
>
> echo "Done :D"
>
> /sbin/m5 exit
>
>
> """
>
> I wanted to use this checkpoint and try to run a hello_world benchmark.
> So I modify my common_checkpoint.rcS script to
> """
>
> #!/bin/sh
>
> ./hello_world
>
> echo "Done :D"
>
> /sbin/m5 exit
>
> """
> And my gem5 command line is
> """
> ./build/X86/gem5.opt
> --outdir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
> --stats-file=common_checkpoint_chkpt_restore.simout
> --dump-config=common_checkpoint_chkpt_restore.ini configs/example/fs.py
> --checkpoint-restore=1
> --checkpoint-dir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
> --restore-with-cpu=AtomicSimpleCPU --cpu-type=DerivO3CPU --caches --l2cache
> --disk-image=/home/abs218/gem5_dir_local/gem5_bl_fs/intel.img
> --kernel=/home/abs218/new_fs/gem5/linux-4.8.13/vmlinux
> --script=./common_checkpoint.rcS
> """
> But my "system.pc.com_1.device" output after restoring  is
> ""
>
> Done :D
> ""
> That is, it did not run the hello_world program!
>
> I have made no changes to gem5, the commit I am using is "
> 2a98a994df296f818b05da90ba073d879562da04"
>
>
> My question is:
> Is it not possible to create a common checkpoint and then run the
> benchmark using that checkpoint?
> Are my steps incorrect to create or restore from the checkpoint?
>
>
>
>
> Best regards,
>
> Abhishek
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Full System X86 restoring from checkpoint questions

2019-08-30 Thread Abhishek Singh
Hi Pouya and Jason,
Yes the binary is present.
My question is it necessary to run the binary after the checkpoint command
that is after “/sbin/m5 checkpoint”
And if yes why?

On Fri, Aug 30, 2019 at 12:30 PM Pouya Fotouhi  wrote:

> Hi Abhishek,
>
> Do you have your binary (hello_world) on your disk image? To be more
> precise, was the binary on the disk image when you took the checkpoint?
>
> Best,
>
> On Fri, Aug 30, 2019 at 8:26 AM Abhishek Singh <
> abhishek.singh199...@gmail.com> wrote:
>
>> Hello Everyone,
>>
>> I have created the checkpoint for booting up Linux image.
>> My command line is
>> """
>>
>> build/X86/gem5.opt
>> --outdir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
>> --stats-file=common_checkpoint_chkpt.simout
>> --dump-config=common_checkpoint_chkpt.ini --redirect-stderr
>> --stderr-file=common_checkpoint_chkpt.e configs/example/fs.py
>> --checkpoint-dir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
>> --disk-image=/home/abs218/gem5_dir_local/gem5_bl_fs/intel.img
>> --kernel=/home/abs218/new_fs/gem5/linux-4.8.13/vmlinux
>> --script=./common_checkpoint.rcS --caches --l2cache
>>
>>
>> """
>>
>> my common_checkpoint.rcS is
>>
>> """
>>
>> #!/bin/sh
>>
>> /sbin/m5 checkpoint
>>
>> echo "Done :D"
>>
>> /sbin/m5 exit
>>
>>
>> """
>>
>> I wanted to use this checkpoint and try to run a hello_world benchmark.
>> So I modify my common_checkpoint.rcS script to
>> """
>>
>> #!/bin/sh
>>
>> ./hello_world
>>
>> echo "Done :D"
>>
>> /sbin/m5 exit
>>
>> """
>> And my gem5 command line is
>> """
>> ./build/X86/gem5.opt
>> --outdir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
>> --stats-file=common_checkpoint_chkpt_restore.simout
>> --dump-config=common_checkpoint_chkpt_restore.ini configs/example/fs.py
>> --checkpoint-restore=1
>> --checkpoint-dir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
>> --restore-with-cpu=AtomicSimpleCPU --cpu-type=DerivO3CPU --caches --l2cache
>> --disk-image=/home/abs218/gem5_dir_local/gem5_bl_fs/intel.img
>> --kernel=/home/abs218/new_fs/gem5/linux-4.8.13/vmlinux
>> --script=./common_checkpoint.rcS
>> """
>> But my "system.pc.com_1.device" output after restoring  is
>> ""
>>
>> Done :D
>> ""
>> That is, it did not run the hello_world program!
>>
>> I have made no changes to gem5, the commit I am using is "
>> 2a98a994df296f818b05da90ba073d879562da04"
>>
>>
>> My question is:
>> Is it not possible to create a common checkpoint and then run the
>> benchmark using that checkpoint?
>> Are my steps incorrect to create or restore from the checkpoint?
>>
>>
>>
>>
>> Best regards,
>>
>> Abhishek
>>
> ___
>> gem5-users mailing list
>> gem5-users@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
>
>
> --
> Pouya Fotouhi
> PhD Candidate
> Department of Electrical and Computer Engineering
> University of California, Davis
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Full System X86 restoring from checkpoint questions

2019-08-30 Thread Jason Lowe-Power
Hi Abhishek,

You have to use something like the hack back script if you want to change
your script parameter after checkpointing. When you checkpoint, it saves
the state of the system. When you restore, it's restored with *exactly that
state.* I.e., your original rcS file is still on the disk. If you want to
change the rcS file, your original file must call m5 readfile twice. Hence,
the hack back script calls it a second time (the first time is, by
definition, outside of the rcS script).

Jason

On Fri, Aug 30, 2019 at 9:39 AM Abhishek Singh <
abhishek.singh199...@gmail.com> wrote:

> Hi Pouya and Jason,
> Yes the binary is present.
> My question is it necessary to run the binary after the checkpoint command
> that is after “/sbin/m5 checkpoint”
> And if yes why?
>
> On Fri, Aug 30, 2019 at 12:30 PM Pouya Fotouhi 
> wrote:
>
>> Hi Abhishek,
>>
>> Do you have your binary (hello_world) on your disk image? To be more
>> precise, was the binary on the disk image when you took the checkpoint?
>>
>> Best,
>>
>> On Fri, Aug 30, 2019 at 8:26 AM Abhishek Singh <
>> abhishek.singh199...@gmail.com> wrote:
>>
>>> Hello Everyone,
>>>
>>> I have created the checkpoint for booting up Linux image.
>>> My command line is
>>> """
>>>
>>> build/X86/gem5.opt
>>> --outdir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
>>> --stats-file=common_checkpoint_chkpt.simout
>>> --dump-config=common_checkpoint_chkpt.ini --redirect-stderr
>>> --stderr-file=common_checkpoint_chkpt.e configs/example/fs.py
>>> --checkpoint-dir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
>>> --disk-image=/home/abs218/gem5_dir_local/gem5_bl_fs/intel.img
>>> --kernel=/home/abs218/new_fs/gem5/linux-4.8.13/vmlinux
>>> --script=./common_checkpoint.rcS --caches --l2cache
>>>
>>>
>>> """
>>>
>>> my common_checkpoint.rcS is
>>>
>>> """
>>>
>>> #!/bin/sh
>>>
>>> /sbin/m5 checkpoint
>>>
>>> echo "Done :D"
>>>
>>> /sbin/m5 exit
>>>
>>>
>>> """
>>>
>>> I wanted to use this checkpoint and try to run a hello_world benchmark.
>>> So I modify my common_checkpoint.rcS script to
>>> """
>>>
>>> #!/bin/sh
>>>
>>> ./hello_world
>>>
>>> echo "Done :D"
>>>
>>> /sbin/m5 exit
>>>
>>> """
>>> And my gem5 command line is
>>> """
>>> ./build/X86/gem5.opt
>>> --outdir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
>>> --stats-file=common_checkpoint_chkpt_restore.simout
>>> --dump-config=common_checkpoint_chkpt_restore.ini configs/example/fs.py
>>> --checkpoint-restore=1
>>> --checkpoint-dir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
>>> --restore-with-cpu=AtomicSimpleCPU --cpu-type=DerivO3CPU --caches --l2cache
>>> --disk-image=/home/abs218/gem5_dir_local/gem5_bl_fs/intel.img
>>> --kernel=/home/abs218/new_fs/gem5/linux-4.8.13/vmlinux
>>> --script=./common_checkpoint.rcS
>>> """
>>> But my "system.pc.com_1.device" output after restoring  is
>>> ""
>>>
>>> Done :D
>>> ""
>>> That is, it did not run the hello_world program!
>>>
>>> I have made no changes to gem5, the commit I am using is "
>>> 2a98a994df296f818b05da90ba073d879562da04"
>>>
>>>
>>> My question is:
>>> Is it not possible to create a common checkpoint and then run the
>>> benchmark using that checkpoint?
>>> Are my steps incorrect to create or restore from the checkpoint?
>>>
>>>
>>>
>>>
>>> Best regards,
>>>
>>> Abhishek
>>>
>> ___
>>> gem5-users mailing list
>>> gem5-users@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>>
>>
>> --
>> Pouya Fotouhi
>> PhD Candidate
>> Department of Electrical and Computer Engineering
>> University of California, Davis
>> ___
>> gem5-users mailing list
>> gem5-users@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
>
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Full System X86 restoring from checkpoint questions

2019-08-30 Thread Abhishek Singh
Thank you for the clarification.

On Fri, Aug 30, 2019 at 12:43 PM Jason Lowe-Power 
wrote:

> Hi Abhishek,
>
> You have to use something like the hack back script if you want to change
> your script parameter after checkpointing. When you checkpoint, it saves
> the state of the system. When you restore, it's restored with *exactly that
> state.* I.e., your original rcS file is still on the disk. If you want to
> change the rcS file, your original file must call m5 readfile twice. Hence,
> the hack back script calls it a second time (the first time is, by
> definition, outside of the rcS script).
>
> Jason
>
> On Fri, Aug 30, 2019 at 9:39 AM Abhishek Singh <
> abhishek.singh199...@gmail.com> wrote:
>
>> Hi Pouya and Jason,
>> Yes the binary is present.
>> My question is it necessary to run the binary after the checkpoint
>> command that is after “/sbin/m5 checkpoint”
>> And if yes why?
>>
>> On Fri, Aug 30, 2019 at 12:30 PM Pouya Fotouhi 
>> wrote:
>>
>>> Hi Abhishek,
>>>
>>> Do you have your binary (hello_world) on your disk image? To be more
>>> precise, was the binary on the disk image when you took the checkpoint?
>>>
>>> Best,
>>>
>>> On Fri, Aug 30, 2019 at 8:26 AM Abhishek Singh <
>>> abhishek.singh199...@gmail.com> wrote:
>>>
 Hello Everyone,

 I have created the checkpoint for booting up Linux image.
 My command line is
 """

 build/X86/gem5.opt
 --outdir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
 --stats-file=common_checkpoint_chkpt.simout
 --dump-config=common_checkpoint_chkpt.ini --redirect-stderr
 --stderr-file=common_checkpoint_chkpt.e configs/example/fs.py
 --checkpoint-dir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
 --disk-image=/home/abs218/gem5_dir_local/gem5_bl_fs/intel.img
 --kernel=/home/abs218/new_fs/gem5/linux-4.8.13/vmlinux
 --script=./common_checkpoint.rcS --caches --l2cache


 """

 my common_checkpoint.rcS is

 """

 #!/bin/sh

 /sbin/m5 checkpoint

 echo "Done :D"

 /sbin/m5 exit


 """

 I wanted to use this checkpoint and try to run a hello_world benchmark.
 So I modify my common_checkpoint.rcS script to
 """

 #!/bin/sh

 ./hello_world

 echo "Done :D"

 /sbin/m5 exit

 """
 And my gem5 command line is
 """
 ./build/X86/gem5.opt
 --outdir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
 --stats-file=common_checkpoint_chkpt_restore.simout
 --dump-config=common_checkpoint_chkpt_restore.ini configs/example/fs.py
 --checkpoint-restore=1
 --checkpoint-dir=/home/abs218/gem5_dir_local/gem5_bl_fs/common_checkpoint_chkpt
 --restore-with-cpu=AtomicSimpleCPU --cpu-type=DerivO3CPU --caches --l2cache
 --disk-image=/home/abs218/gem5_dir_local/gem5_bl_fs/intel.img
 --kernel=/home/abs218/new_fs/gem5/linux-4.8.13/vmlinux
 --script=./common_checkpoint.rcS
 """
 But my "system.pc.com_1.device" output after restoring  is
 ""

 Done :D
 ""
 That is, it did not run the hello_world program!

 I have made no changes to gem5, the commit I am using is "
 2a98a994df296f818b05da90ba073d879562da04"


 My question is:
 Is it not possible to create a common checkpoint and then run the
 benchmark using that checkpoint?
 Are my steps incorrect to create or restore from the checkpoint?




 Best regards,

 Abhishek

>>> ___
 gem5-users mailing list
 gem5-users@gem5.org
 http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>
>>>
>>>
>>> --
>>> Pouya Fotouhi
>>> PhD Candidate
>>> Department of Electrical and Computer Engineering
>>> University of California, Davis
>>> ___
>>> gem5-users mailing list
>>> gem5-users@gem5.org
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>>
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users