Hi Advani,

I needed to run the parsec with garnet in Full System mode while ago. Since new 
gem5 standard library (https://www.gem5.org/documentation/gem5-stdlib/overview) 
does not support garnet at the moment, I had to go with fs.py (which is 
deprecated in current version of gem5). Here are the steps you need to take to 
run parsec in FS mode with garnet interconnection.


  1.  Create disk image with parsec benchmarks or use one from gem5 resources 
(https://resources.gem5.org/).
  2.  Download a compatible raw linux kernel from gem5 resources.
  3.  If you need to fasten up the FS mode simulation you need to bootup linux 
with KVMCPU to fast-forward your simulation and then switch to detailed CPU 
model when gem5 specific annotation for start of Region of Interest 
(m5_roi_begin()) is found,
     *   Your host machine should support KVM virtualization for this and you 
need to setup KVM. For KVM setup you can use this tutorial  
(https://www.gem5.org/documentation/general_docs/using_kvm/) or any other 
independent tutorial for KVM setup.
     *   Example run with KVM and parsec using gem5 standard library can be 
found here 
(https://github.com/hansikaweerasena/gem5-n/blob/kvm-fs/configs/example/gem5_library/x86-parsec-benchmarks.py),
 but this cannot be used with garnet without extending gem5 standard library to 
support garnet.
  4.  Create run script for readfile_contents to run parsec benchmark after 
linux bootup.
  5.  Run fs.py with the configuration you need.

I was able to do these steps and run parsec benchmark with garnet in full 
system mode upto 64 cores. Following are the links and scripts I used, you may 
need to change them according to your requirement.


  1.  I used the prebuilt X86 parsec disk image from gem5 resources : 
https://resources.gem5.org/resources/x86-parsec?version=1.0.0
  2.  For linux kernel I used vmlinux-4.4.186
  3.  Example modification I done to support the KVM switch on ROI start can be 
found here 
(https://github.com/hansikaweerasena/gem5-n/blob/kvm-fs/configs/common/Simulation.py).
 You can use as it is or modify as you need.
  4.  Example rcs script can be found here : 
https://github.com/hansikaweerasena/gem5-n/blob/kvm-fs/scripts/parsec.rcS
  5.  Finally, this is an example command to run parsec on FS mode with garnet.

./build/X86/gem5.opt configs/example/fs.py --disk-image=dist/parsec.img 
--kernel=dist/vmlinux-4.4.186 --num-cpus=4 --num-dirs=4 --cpu-type=X86KvmCPU 
--cpu-clock=2GHz --caches --l1d_size=16kB --l1i_size=16kB --l2cache 
--num-l2cache=4 --mem-type=SimpleMemory --mem-size=3GB --ruby --network=garnet 
--topology=Mesh_XY --mesh-rows=2 --script=scripts/parsec.rcS

I think this may help you to proceed, feel free to ask any questions if you’re 
not clear of the steps.

Regards,
Hansika Weerasena
Research Assistant,
University of Florida


From: Advani Chacha via gem5-users <gem5-users@gem5.org>
Date: Wednesday, August 9, 2023 at 3:44 PM
To: gem5-users@gem5.org <gem5-users@gem5.org>
Cc: Advani Chacha <advanicha...@gmail.com>
Subject: [gem5-users] Running garnet on gem5.
[External Email]
Hi everyone,
I'm trying to use 'garnet' network in gem5 and use Parsec as the benchmarking 
tool. I've build the gem5 for X86 and also done all the steps for 
parsec-benchmark as mentioned in the tutorial at 
https://gem5.org/documentation/gem5art/tutorials/parsec-tutorial
I want to do a full-system simulation. The issue is that, now I don't know how 
to proceed further.

I tried to search on google, but either the tutorials are for the garnet 
version 2.0 or they are for synthetic traffic. Some of the sites are not live, 
so when using the wayback version I'm not able to download the files that 
they've suggested as part of the tutorial.

Any help would be appreciated.

Regards,
Advani

_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org

Reply via email to