Hi

I tried with the checkpoint restore method again with the following
commands:

build/X86/gem5.opt  --outdir=switching_1_10_20.py configs/example/fs.py -n
2 --sep-clock --clock1 1GHz --clock2 1GHz --caches --l1d_size=32kB
--l1i_size=32kB --l1d_assoc=2 --l1i_assoc=2 --l2cache --l2_size=128kB
--l2_assoc=4
--disk-image=/home/namita/gem5_namita/full_system_images/disks/linux-x86.img
--kernel=/home/namita/gem5_namita/full_system_images/binaries/x86_64-vmlinux-2.6.28.4-smp
--script=/home/namita/gem5_namita/configs/boot/abc.rcS

build/X86/gem5.opt --outdir=switching_1_10_20.py  configs/example/fs.py -n
2 --sep-clock --clock1 10GHz --clock2 10GHz   --caches --l1d_size=32kB
--l1i_size=32kB --l1d_assoc=2 --l1i_assoc=2 --l2cache --l2_size=128kB
--l2_assoc=4 --freq-switch --switch-freq=5000000000000
--take-checkpoints=4947187325400,10000000000 --max-checkpoints=2
--checkpoint-restore=1 --restore-with-cpu=detailed
--disk-image=/home/namita/gem5_namita/full_system_images/disks/linux-x86.img
--kernel=/home/namita/gem5_namita/full_system_images/binaries/x86_64-vmlinux-2.6.28.4-smp
--script=/home/namita/gem5_namita/configs/boot/abc.rcS

build/X86/gem5.opt --outdir=switching_1_10_20.py  configs/example/fs.py -n
2 --sep-clock --clock1 20GHz --clock2 20GHz --caches --l1d_size=32kB
--l1i_size=32kB --l1d_assoc=2 --l1i_assoc=2 --l2cache --l2_size=128kB
--l2_assoc=4 --freq-switch --switch-freq=10000000000 --checkpoint-restore=2
--restore-with-cpu=detailed
--disk-image=/home/namita/gem5_namita/full_system_images/disks/linux-x86.img
--kernel=/home/namita/gem5_namita/full_system_images/binaries/x86_64-vmlinux-2.6.28.4-smp
--script=/home/namita/gem5_namita/configs/boot/abc.rcS


with abc.rcS as:
/sbin/m5 checkpoint
/sbin/m5 exit

./thread2.out  ### our example pthread Code
/sbin/m5 exit

But we get the following error at the second checkpoint restore:
Listening for com_1 connection on port 3458
warn: Reading current count from inactive timer.
0: system.remote_gdb.listener: listening for remote gdb #0 on port 7004
0: system.remote_gdb.listener: listening for remote gdb #1 on port 7005
fatal: Can't unserialize 'system.cpu0:_pid'
 @ cycle 348056
[paramIn:build/X86/sim/serialize.cc, line 228]

Kindly provide some pointers to solve this issue.

Regards,
Shivam



On Wed, Oct 16, 2013 at 3:53 PM, Shivam Agarwal <[email protected]
> wrote:

> Hi Andreas,
>
> Thanks for your prompt reply.
>
> I have tried doing it by checkpoint restore method you suggested. But the
> problem is that it always re-starts the execution  from the boot up point.
> This is not what we would like it to be. It should  restore from the point
> of break. Can you please suggest some way for that.
>
>
> Regards,
> Shivam
>
>
>
>
>
> On Wed, Oct 16, 2013 at 2:43 PM, Andreas Hansson 
> <[email protected]>wrote:
>
>>  Hi Shivam,
>>
>>  The parameter is only passed from the Python to the C++ world on object
>> construction. Hence, your change never makes it into the actual C++ objects.
>>
>>  If you checkpoint and restore it should work, as the objects actually
>> get re-created then.
>>
>>  Typically, the DFS would take place inside the simulated system, and
>> not in the orchestrating Python code, thus our choice of API.
>>
>>  I hope that makes it more clear.
>>
>>  Andreas
>>
>>   From: Shivam Agarwal <[email protected]>
>> Reply-To: gem5 users mailing list <[email protected]>
>> Date: Wednesday, 16 October 2013 10:07
>> To: gem5 users mailing list <[email protected]>
>> Subject: [gem5-users] Problem in dynamically changing the cpu clock
>> values
>>
>>   Hi
>> I am trying to change the clock frequencies of the different cores
>> dynamically.
>>
>>  I begin with boot up process in atomic mode and then at checkpoint
>> restore move to detailed mode.  To implement dynamic frequency scaling, I
>> added function in /configs/common/Simulation.py that calls a pre-defined
>> switching function in src/python/simulate.py as shown below:
>>
>>  def switchcpufreq(root, system, f1, f2, num, do_drain=True):
>>     from m5 import options
>>     if do_drain:
>>         drain(system)
>>
>>         system.cpu[0].clock= f1
>> system.cpu[1].clock= f2
>>
>>      if do_drain:
>>         resume(system)
>>
>>  In simulation.py the calling function is :
>>
>>  if options.switch_freq:
>>         m5.stats.dump()
>>         m5.stats.reset()
>>             #warmup instruction count may have already been set
>>         if options.warmup_insts:
>>             exit_event = m5.simulate()
>>         else:
>>             exit_event = m5.simulate(options.switch_freq)
>>         print "Switching CPUfreq @ tick %s" % (m5.curTick())
>>         m5.stats.dump()
>> m5.stats.reset()
>>
>>         m5.switchcpufreq(root, testsys, f1, f2, factor3, factor4, np)
>>
>>  So, the problem here is that it updates the clock frequencies in the
>> simulation.py file but does not reflect it in the simulation output
>> statistics (sim_seconds). I feel that the clock is not getting updated in
>> the C++ Object instantiation.
>>
>>  Kindly help.
>>
>>  Regards
>> Shivam Agarwal
>>
>> -- IMPORTANT NOTICE: The contents of this email and any attachments are
>> confidential and may also be privileged. If you are not the intended
>> recipient, please notify the sender immediately and do not disclose the
>> contents to any other person, use it for any purpose, or store or copy the
>> information in any medium. Thank you.
>>
>> ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ,
>> Registered in England & Wales, Company No: 2557590
>> ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ,
>> Registered in England & Wales, Company No: 2548782
>>
>> _______________________________________________
>> gem5-users mailing list
>> [email protected]
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>
>
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to