The first step is to build the Full System Gem5, so you will need to write the variables in a file. You may use some different values, more information about them is here. I have used an ALPHA system (because the disks and binaries are provided for this platform) and MESI_CMP_directory for coherence. You have to put the file on gem5/build/variables/ALPHA_FS.
The command to build the system is:
scons ./build/ALPHA_FS/gem5.opt -j 8
The parameter j indicates how many processes should the compiler use. If you have enough RAM and processors you can put as many as you want. Obviously it will compile faster if you give more resources to the compiler.
The next step is to download everything that we need, if you download this file you will have everything. The files which I packed together are available here and here. The content of the file is:
PARSEC/
binaries/
console
ts_osfpal
vmlinux
disks/
linux-bigswap2.img
linux-parsec-2-1-m5.img
Then we have to modify two files as indicated at http://www.m5sim.org/PARSEC_benchmarks. The first one is gem5/configs/common/SysPaths.py and we have to change this line:
path = [ ’/dist/m5/system’, ’<complete path to your disks and binaries directory>’ ]
So we will write the path to our directory PARSEC.
The second file we have to modify is gem5/configs/common/Benchmarks.py. There we have to write the name of our linux image:
return env.get(’LINUX_IMAGE’, disk(’linux-parsec-2-1-m5.img’))
Then we need a scrip to run some benchmarks, I have used the one provided at http://www.m5sim.org/PARSEC_benchmarks#Running_PARSEC_in_gem5 you can download it here.
Finally you can run gem5 and it will (should) work like a charm:
./build/ALPHA_FS/gem5.opt ./configs/example/fs.py --script=../PARSEC/runscript.rcS
It will run the blackscholes benchmark.
If you want to run other benchmarks may you use the script generator available at http://www.cs.utexas.edu/~parsec_m5/
If you want to run other benchmarks may you use the script generator available at http://www.cs.utexas.edu/~parsec_m5/
Great guide with one mistake ;) scons ./build/ALPH_FS/gem5.opt -j 8 should be scons ./build/ALPHA_FS/gem5.opt -j 8
ReplyDeleteFixed!
DeleteThanks!
Hi , nice work ,
ReplyDeleteI found here : http://www.mail-archive.com/gem5-users@gem5.org/msg06695.html
that you had the same problem as me to run splash2 with ruby : I am getting this
fatal: Ruby functional read failed for address 0x101c80
@ cycle 778631500
[recvFunctional:build/ALPHA/mem/ruby/system/RubyPort.cc, line 260]
Memory Usage: 116032 KBytes
it only works with 1 cpu , I need to make it run with 4 cpus on a mesh topology , Help!!
how to run a benchmark with input arguments in gem5 SE mode
DeleteI'm learning how to running PARSEC on gem5, however the official guide omit some detail steps and I don't know how to do.
ReplyDeleteThis guide help me a lot!
Thank you
Great work!
ReplyDeleteThe information given in the GEM5 website is quite vague.
Im gonna try to run PARSEC following your indications.
On the other hand, I also need to run it with the X86 ISA, and I have seen that DISK Image for it is also in the website. Could I run it with x86 ISA following the same indications? Thanks a lot :D
Thank you. i got some result.
ReplyDeletethough i am interested in running with x86 like Thudor.
Can you put your output file. so we can verify whether out results are correct or not?
I could build the system for x86 but I got 1 error:
ReplyDeletearch/x86/mt.hh: No such file or directory
This seems to happens because x86 do not support "inOrder" CPU model, so in the file called ALPHA_FS (X86_FS in my case), use:
CPU_MODELS = 'AtomicSimpleCPU,O3CPU,TimingSimpleCPU'
Hey Thudor,
DeleteThank you for reply i made X86_FS file
CPU_MODELS = 'AtomicSimpleCPU,O3CPU,TimingSimpleCPU'
SS_COMPATIBLE_FP = True
PROTOCOL = 'MESI_CMP_directory'
FULL_SYSTEM = True
TARGET_ISA = 'x86'
and changed
gem5/configs/common/SysPaths.py
and
gem5/configs/common/Benchmarks.py. 'x86root-parsec.img' in TARGET_ISA = x86
I am getting error like
[akt0001@EB245-mhealth3parsec_x86]$gem5x86.opt ../configs/example/fs.py --script=./runscript.rcS
gem5 Simulator System. http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.
gem5 compiled Jul 6 2013 16:46:21
gem5 started Feb 20 2014 13:14:21
gem5 executing on EB245-mhealth3
command line: /home/opt/gem5/build/X86/gem5.opt ../configs/example/fs.py --script=./runscript.rcS
warning: add_child('terminal'): child 'terminal' already has parent
Global frequency set at 1000000000000 ticks per second
info: No kernel set for full system simulation. Assuming you know what you're doing
0: rtc: Real-time clock set to Sun Jan 1 00:00:00 2012
Listening for com_1 connection on port 3456
warn: Reading current count from inactive timer.
0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000
fatal: No kernel to load.
@ cycle 0
[initState:build/X86/arch/x86/system.cc, line 118]
Memory Usage: 351840 KBytes
I have rechecked and put the kernel vmlinux in the binaries file
if you can give some guidance
I am getting some results and than stuck after getting this result
ReplyDeletePl. guide.
[bash]$gem5ALPHA_FS.opt configs/example/fs.py --script=runscript.rcS
gem5 Simulator System. http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.
gem5 compiled Feb 18 2014 16:37:43
gem5 started Feb 19 2014 09:27:48
gem5 executing on EB245-mhealth3
command line: /home/opt/gem5/build/ALPHA_FS/gem5.opt configs/example/fs.py --script=runscript.rcS
Global frequency set at 1000000000000 ticks per second
info: kernel located at: /home/akt0001/GEM5/parsec/binaries/vmlinux
Listening for system connection on port 3456
0: system.tsunami.io.rtc: Real-time clock set to Thu Jan 1 00:00:00 2009
warn: CoherentBus system.membus has no snooping ports attached!
0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000
**** REAL SIMULATION ****
info: Entering event queue @ 0. Starting simulation...
warn: Prefetch instructions in Alpha do not do anything
warn: Prefetch instructions in Alpha do not do anything
warn: Prefetch instructions in Alpha do not do anything
warn: subs/sud f11,f10,f14: non-standard trapping mode not supported
...
warn: cvtts/sud f0,f3: non-standard trapping mode not supported
Hi Amrish and Juan,
DeleteHow long does it take to finish running this example? I also stuck at this line for a while.
Checked the "system.termial" file in m5out, and the last line is "[HOOKS] EnteringROI".
Were you able to make progress beyond this? I am stuck at same place!
Deletehow to run benchmark in gem5?
DeleteHi Amrish,
ReplyDeleteWere you able to get past the above error? I am kinda stuck at the same place.
Thanks,
Hi guys,
ReplyDeletein dorder to avoid the "no kernel to load" error you can just specified the path to your kernel while executing with: --kernel=path/to/vmlinux
My complete command line:
./build/X86_FS/gem5.opt ./configs/example/fs.py --cpu-type=X86KvmCPU --num-cpus=1 --caches --l2cache --num-l2caches=1 --num-l3caches=1 --l1d_size=32kB --l1i_size=32kB --l2_size=356kB --l3_size=8192kB --l1d_assoc=8 --l1i_assoc=8 --l2_assoc=8 --l3_assoc=16 --kernel=/home/amartinez/gem5/PARSEC_GEM5_x86/PARSEC_blog/parsec/binaries/vmlinux --script=./PARSEC_GEM5_x86/runscript.rcS
:P
Hey Pushkar Nandkar, - I have done same as Thudor.
ReplyDeleteHey Thudor,
I want to compile splash benchmark in SE mode
i have compile splash2 benchmark.with m5thread for X86.
and running radix with simsmall input
gem5x86.opt ../../configs/example/se.py --l2cache --l1d_size=32kB
--l1d_assoc=4 --l1i_size=32Kb --l1i_assoc=4 --l2_size=256kB
--l2_assoc=8 --cacheline_size=64 --num-cpus=4
--cmd=/opt/m5thread_X86/splash2/radix/radix --options="-p4-t -r1024
-n262144 -m524288" --cpu-type=timing
my benchmark is running for now more than 48 hours. I am just
wondering if things are working correct. or just i am doing some thing
wrong. if any of you have gone through this experience pl. share.
or if i am not doing something correct pl. guide.
if you have got some thing insight pl. share.
A.K.T
Hi Amrish,
ReplyDeletesorry for late answer, I forgot to check this blog!
Your command looks quite right to me but I have never tried to run a binary in SE mode. Maybe it just take so long to finish, simulations are usually **very** slow since they have to simulate several cores in one. By this time, it should have finished, has it?
On the other hand, I am having problem generating the scripts with the scriptGenerator (http://www.cs.utexas.edu/~parsec_m5/writescripts.pl)
It is just not generating any output. Have you tried it?
Keep in touch :D
Alberto
I found the problem with the writescrips.ps
DeleteI didnt have the inputsets.txt file. A GEM5 user sent it to me, it is this one:
I upload it to mega:
https://mega.co.nz/#!CFwUCY4T!SyKaRQ_3O5hxRrRjUaMDdE-GJGNE9o-NFKbtejFcRmk
Hey... keep the work, please... we need quality tutorials on gem5. thanks
ReplyDeleteI am trying to run PARSEC on gem5 as explained in the blog. I am too stuck at the point where simulation says "warn: cvtts/sud f0,f3: non-standard trapping mode not supported" OR terminal output "[HOOKS] Entering ROI". The simulation is stuck here. This is the same issue as mentioned here: http://gem5user.blogspot.com/2013/02/running-parsec-benchmarks-on-gem5.html?showComment=1392824426289#c3381152990051750715
ReplyDeleteCould someone help me understand and solve the issue?
I've to do course project in Computer Architecture and topic is relative study of various cache coherence protocol.
ReplyDeleteI want to run splash-2 suit on gem5. please someone describe how I run it on gem5
I got problem while executing following command
ReplyDeletecommand:-
build/ALPHA_FS/gem5.opt configs/example/fs.py -n 4 --mem-size=1GB --script=ferret_4c_simsmall_ckpts.rcS --cpu-type=detailed --caches --checkpoint-restore=1
Aborted at:
warn: subt/sud f29,f12,f22: non-standard trapping mode not supported
warn: addt/sud f24,f27,f28: non-standard trapping mode not supported
gem5.opt: build/ALPHA_FS/cpu/base.cc:690: bool AddressMonitor::doMonitor(PacketPtr): Assertion `pkt->req->hasPaddr()' failed.
Program aborted at cycle 2319337374750
Aborted (core dumped)
please suggest .
Hi . Where can I get a disk image containing pre-compiled binaries for parsec (or any benchmarks) for running in ARM ISA ? If not, can anyone kindly guide me on how to correctly create a new disk image and installing the benchmarks. I did this but I got a kernel panic error when I ran FS simulation meaning that my disk image was broken/corrupt..Thanks
ReplyDeleteThe download link broken now. Can someone post new link
ReplyDeleteHello,
ReplyDeleteI try the link from "The first step is to build the Full System Gem5, so you will need to write the variables in a file. You may use some different values, more information about them is here. "... but it has not existed anymore? Are there any substitute that links!?
Many thanks!
sorry, I mean from this "The next step is to download everything that we need, if you download this file you will have everything. " thanks!
DeleteHi,
ReplyDeleteIam trying to run gem5 with parsec benchmark with following command
build/X86_MESI_Two_Level/gem5.opt configs/example/fs.py --ruby --disk-image=/home/manik/X86_fsi/disks/x86root-parsec.img --cpu-type=TimingSimpleCPU --num-cpus=4 --caches --l2cache --l1d_size=32kB --l1i_size=32kB --l1d_assoc=4 --l1i_assoc=4 --l2_size=4MB --l2_assoc=16 --kernel=x86_64-vmlinux-2.6.28.4-smp --script=/home/manik/runScript/blackscholes_1c_simsmall.rcS
but I am getting some error as mentioned below
Traceback (most recent call last):
File "", line 1, in
File "build/X86_MESI_Two_Level/python/m5/main.py", line 457, in main
exec(filecode, scope)
File "configs/example/fs.py", line 383, in
Simulation.run(options, root, test_sys, FutureClass)
File "/home/manik/gem5/configs/common/Simulation.py", line 726, in run
exit_event = benchCheckpoints(options, maxtick, cptdir)
File "/home/manik/gem5/configs/common/Simulation.py", line 269, in benchCheckpoints
exit_event = m5.simulate(maxtick - m5.curTick())
File "build/X86_MESI_Two_Level/python/m5/simulate.py", line 180, in simulate
return _m5.event.simulate(*args, **kwargs)
RuntimeError: bad_function_call
Can someone help in resolving this ?
Thanks
The next step is to download everything that we need, if you download this file you will have everything ...the link cited here isnt working
ReplyDelete"The next step is to download everything that we need, if you download this file you will have everything. The files which I packed together are available 'here' and 'here' ". The second link is not working and "The next step is to download everything that we need, if you download this file you will have everything" ...the link cited here is also not working. So we unable to download all the required files. Can you please suggest where can we download these files from?
ReplyDelete