Running Benchmarks on Full System Mode

3,305 views
Skip to first unread message

DAVESH SHINGARI

unread,
Oct 30, 2014, 11:43:54 PM10/30/14
to gem5-g...@googlegroups.com
Hi Joel

I was able to run benchmark Rodinia and also Full System emulation.

The webpage says "Syscall emulation mode is limited to simulating benchmarks that call a restricted subset of system calls implemented in gem5. However, gem5-gpu also support full-system simulation, which allows for booting an operating system and running multiprocess and multithreaded workloads."

How to run those workloads and are there any provided in the repository.


Joel Hestness

unread,
Nov 4, 2014, 10:46:11 AM11/4/14
to DAVESH SHINGARI, gem5-gpu developers
Hi Davesh,
  To run benchmarks in full-system mode, they will need to be on a disk image accessible from the simulated system (i.e. the disk must be mounted by Linux or Android). You could put the benchmarks on the disk image that you're booting from if there is space. To run the benchmarks, you'll either need to use the gem5 terminal, or pass a bash-like (.rcS) script parameter to the simulation that will be executed. Check out our PARSEC on M5 tech report for details and tools for using these run scripts to run benchmarks on the disk.

  Joel


--
  Joel Hestness
  PhD Candidate, Computer Architecture
  Dept. of Computer Science, University of Wisconsin - Madison
  http://pages.cs.wisc.edu/~hestness/

DAVESH SHINGARI

unread,
Nov 4, 2014, 3:51:15 PM11/4/14
to gem5-g...@googlegroups.com, shingar...@gmail.com
Hi Joel

Thanks.
I mounted the rodinia benchmark on the x86root.img. But when I execute following:

(none) home # ./benchmarks/benchmarks/rodinia/backprop/gem5_fusion_backprop -o "16"
16"enchmarks/benchmarks/rodinia/backprop/gem5_fusion_backprop -o "
FATAL: kernel too old
gem5_fusion_bac[810]: segfault at 00002b8dc298dde0 rip 000000000041be87 rsp 00007fffffa60910 error 4
Segmentation fault

So i thought of compiling the same
(none) backprop # make gem5_fusion
make gem5_fusion
make: Warning: File `Makefile' has modification time 9e+07 s in the future
make: *** No rule to make target `gem5_fusion'.  Stop.

So what should be the way for this.
NOTE: all the above steps are being run on simulated x86 machine running on Gem5-GPU.

Joel Hestness

unread,
Nov 8, 2014, 9:46:01 PM11/8/14
to DAVESH SHINGARI, gem5-gpu developers
Hi Davesh,

I mounted the rodinia benchmark on the x86root.img. But when I execute following:

(none) home # ./benchmarks/benchmarks/rodinia/backprop/gem5_fusion_backprop -o "16"
16"enchmarks/benchmarks/rodinia/backprop/gem5_fusion_backprop -o "
FATAL: kernel too old
gem5_fusion_bac[810]: segfault at 00002b8dc298dde0 rip 000000000041be87 rsp 00007fffffa60910 error 4
Segmentation fault

  Unfortunately, I'm not sure what might be going on here. If you're not already, I'd recommend using the 2.6.28.4 kernel image on the PARSEC on M5 site (http://www.cs.utexas.edu/~parsec_m5/). We've been using gem5-gpu x86 FS simulation pretty extensively, so it's surprising that you're running into a 'kernel too old' error.


So i thought of compiling the same
(none) backprop # make gem5_fusion
make gem5_fusion
make: Warning: File `Makefile' has modification time 9e+07 s in the future
make: *** No rule to make target `gem5_fusion'.  Stop.

  The Makefile target is gem5-fusion with a '-' rather than '_'.


  Joel



On Tuesday, November 4, 2014 8:46:11 AM UTC-7, Joel Hestness wrote:
Hi Davesh,
  To run benchmarks in full-system mode, they will need to be on a disk image accessible from the simulated system (i.e. the disk must be mounted by Linux or Android). You could put the benchmarks on the disk image that you're booting from if there is space. To run the benchmarks, you'll either need to use the gem5 terminal, or pass a bash-like (.rcS) script parameter to the simulation that will be executed. Check out our PARSEC on M5 tech report for details and tools for using these run scripts to run benchmarks on the disk.

  Joel



On Thu, Oct 30, 2014 at 10:43 PM, DAVESH SHINGARI <shingar...@gmail.com> wrote:
Hi Joel

I was able to run benchmark Rodinia and also Full System emulation.

The webpage says "Syscall emulation mode is limited to simulating benchmarks that call a restricted subset of system calls implemented in gem5. However, gem5-gpu also support full-system simulation, which allows for booting an operating system and running multiprocess and multithreaded workloads."

How to run those workloads and are there any provided in the repository.





--
  Joel Hestness
  PhD Candidate, Computer Architecture
  Dept. of Computer Science, University of Wisconsin - Madison
  http://pages.cs.wisc.edu/~hestness/

DAVESH SHINGARI

unread,
Nov 10, 2014, 12:26:46 PM11/10/14
to gem5-g...@googlegroups.com, shingar...@gmail.com
Hi Joel

Thanks, I was not using that kernel. I have same doubts regarding that. I was following the following steps:

/gem5-gpu/gem5# mkdir full_system_images

/gem5-gpu/gem5/full_system_images# wget http://www.m5sim.org/dist/current/x86/x86-system.tar.bz2

/gem5-gpu/gem5/full_system_images# ls

x86-system.tar.bz2

ro/gem5-gpu/gem5/full_system_images# tar jxf x86-system.tar.bz2

/gem5-gpu/gem5/full_system_images# echo "export M5_PATH=/home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/" >> ~/.bashrc

/gem5-gpu/gem5/full_system_images# wget www.m5sim.org/dist/current/m5_system_2.0b3.tar.bz2

root@espresso:/home/dshingar/Simulators/gem5-gpu/gem5/full_system_images# ls

binaries  disks  m5_system_2.0b3.tar.bz2  x86-system.tar.bz2


/gem5-gpu/gem5/full_system_images# tar jxf m5_system_2.0b3.tar.bz2

/gem5-gpu/gem5/full_system_images# cd m5_system_2.0b3/

/gem5-gpu/gem5/full_system_images/m5_system_2.0b3# cd disks/

/gem5-gpu/gem5/full_system_images/m5_system_2.0b3/disks# ls

linux-bigswap2.img  linux-latest.img

/gem5-gpu/gem5/full_system_images/m5_system_2.0b3/disks# cd ../../

/gem5-gpu/gem5/full_system_images# cp m5_system_2.0b3/disks/linux-bigswap2.img disks/

/gem5-gpu/gem5/full_system_images# cd disks/

/gem5-gpu/gem5/full_system_images/disks# mv linux-x86.img x86root.img


Now as per your suggestion I need to download the kernel from http://www.cs.utexas.edu/~parsec_m5/. But after downloading and placing it in binaries, I still get error for previous version of kernel:


/gem5-gpu/gem5# build/VI_hammer/gem5.opt ../gem5-gpu/configs/fs_fusion.py
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 compiled Oct 30 2014 20:41:50
gem5 started Nov 10 2014 10:19:49
gem5 executing on espresso
command line: build/VI_hammer/gem5.opt ../gem5-gpu/configs/fs_fusion.py
Warning: Only block size currently supported is 128B. Defaulting to 128.
Using template and command line options for gpgpusim.config
Global frequency set at 1000000000000 ticks per second
warn: system.ruby.network adopting orphan SimObject param 'int_links'
warn: system.ruby.network adopting orphan SimObject param 'ext_links'
info: kernel located at: /home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/binaries/x86_64-vmlinux-2.6.22.9
fatal: Could not load kernel file /home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/binaries/x86_64-vmlinux-2.6.22.9

 @ tick 0
[System:build/VI_hammer/sim/system.cc, line 129]
Memory Usage: 2252364 KBytes
Program aborted at tick 0
Aborted (core dumped)


One more thing.

From where should complete set of binaries be downloaded as in what should be present in binaries and disk directory of full_system_images.

DAVESH SHINGARI

unread,
Dec 1, 2014, 2:34:32 PM12/1/14
to gem5-g...@googlegroups.com, shingar...@gmail.com
Hi Joel

I downloaded the whole gem5-gpu package again and made a fresh build. But still I am getting the error.

Simulators/gem5-gpu/gem5# build/VI_hammer/gem5.opt ../gem5-gpu/configs/fs_fusion.py --disk-image=/home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/x86root-parsec.img --kernel=/home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/x86_64-vmlinux-2.6.28.4-smp

gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 compiled Dec  1 2014 12:15:50
gem5 started Dec  1 2014 12:20:23
gem5 executing on espresso
command line: build/VI_hammer/gem5.opt ../gem5-gpu/configs/fs_fusion.py --disk-image=/home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/x86root-parsec.img --kernel=/home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/x86_64-vmlinux-2.6.28.4-smp

Warning: Only block size currently supported is 128B. Defaulting to 128.
Using template and command line options for gpgpusim.config
Global frequency set at 1000000000000 ticks per second
warn: system.ruby.network adopting orphan SimObject param 'int_links'
warn: system.ruby.network adopting orphan SimObject param 'ext_links'
info: kernel located at: /home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/x86_64-vmlinux-2.6.28.4-smp
      0: rtc: Real-time clock set to Sun Jan  1 00:00:00 2012
panic: Error opening /home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/disks/linux-bigswap2.img
 @ tick 0
[open:build/VI_hammer/dev/disk_image.cc, line 79]
Memory Usage: 2319996 KBytes

Program aborted at tick 0
Aborted (core dumped)

I followed the instructions mentioned on gem5 page (http://www.mail-archive.com/gem5-users%40gem5.org/msg07594.html) and downloaded the image from http://www.cs.utexas.edu/~parsec_m5/
My folder contains following files:
Simulators/gem5-gpu/gem5/full_system_images# ls
x86_64-vmlinux-2.6.28.4-smp  x86root-parsec.img

What am I missing?

Moreover, when I tried wget www.m5sim.org/dist/current/m5_system_2.0b3.tar.bz2 and extracted linux-bigswap2.img and gave the build, then error came:
panic: Error opening /home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/disks/linux-bigswap2.img

Please suggest, what all files are needed and from where to get it.

"Stamatis Kavvadias (Σταμάτης Καββαδίας)"

unread,
Dec 1, 2014, 6:35:15 PM12/1/14
to gem5-g...@googlegroups.com
Hi,

    You probably need to create sub-folders in your full_system_images/ folder:
one named "binaries" where you should put the kernel and
one named "disks" where you should put the disk images.

You also need to put the path to (and including) full_system_images to the
'M5_PATH' environment variable or in gem5/configs/SysPath.py (under
"except KeyError:"). But it seems you have done that...

Finally, for x86 full system simulation you will need the
linux-bigswap2.img
that appears in the error. You can create a swap image file or get it zipped
along with the disk image and kernel with:

wget http://www.m5sim.org/dist/current/m5_system_2.0b3.tar.bz2

Unzipping (tar jxvf) creates
"disks" and "binaries" folders.

I hope this helps,

Stamatis


-- 


Stamatis Kavvadias, PhD

Research Associate
TEI Crete, Greece
Message has been deleted

DAVESH SHINGARI

unread,
Dec 2, 2014, 7:07:24 PM12/2/14
to gem5-g...@googlegroups.com
Hi

I think there is lot of confusion created because of the way I asked the question. So I am summarizing the same. I think this way it will be better to understand and narrow the problem.

STEP 1:

tar jxf x86-system.tar.bz2

Creates 2 folder with binaries and disks.

Binaries

|>x86_64-vmlinux-2.6.22.9

|> x86_64-vmlinux-2.6.22.9.smp

Disk

|>linux-x86.img


When I run then error comes:

----------------------ERROR------------------------

info: kernel located at: /home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/binaries/x86_64-vmlinux-2.6.22.9

panic: Error opening /home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/disks/x86root.img



STEP 2:

tar jxf m5_system_2.0b3.tar.bz2

Creates folder with 2 sub-folders name binaries and disks

Binaries

|>console  

|>ts_osfpal  

|>vmlinux

Disk

|>linux-bigswap2.img  

|>linux-latest.img


Now I remove the previous binaries and disk folder, and when I copy only these to the full_system_images folder and run then error comes:

----------------------ERROR------------------------

info: kernel located at: /home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/binaries/x86_64-vmlinux-2.6.22.9

fatal: Could not load kernel file /home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/binaries/x86_64-vmlinux-2.6.22.9



STEP 3:

Now when both are present that is binaries and disk folders extracted from x86-system.tar.bz2 and m5_system_2.0b3.tar.bz2, then on running error comes:

----------------------ERROR------------------------

info: kernel located at: /home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/binaries/x86_64-vmlinux-2.6.22.9

     0: rtc: Real-time clock set to Sun Jan  1 00:00:00 2012

panic: Error opening /home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/disks/x86root.img



STEP 4:

So, now I renamed the linux-x86.img to x86root.img in the disk folder.

Now the run is successful.


STEP 5:

Now as per suggestion of Joel, I tried changing the kernel to  2.6.28.4

wget http://www.cs.utexas.edu/~parsec_m5/x86_64-vmlinux-2.6.28.4-smp

I moved it to binaries folder and now on running with explicit mentioning of parameter --kernel=./full_system_images/binaries/x86_64-vmlinux-2.6.28.4-smp

----------------------ERROR------------------------

info: kernel located at: /home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/binaries/./full_system_images/binaries/x86_64-vmlinux-2.6.28.4-smp

fatal: Could not load kernel file /home/dshingar/Simulators/gem5-gpu/gem5/full_system_images/binaries/./full_system_images/binaries/x86_64-vmlinux-2.6.28.4-smp


STEP 6:

Now I downloaded the Parsec Image as wget http://www.cs.utexas.edu/~parsec_m5/x86root-parsec.img.bz2

After extracting, I copied the same to disk folder and renamed it to x86root.img and now on running it is success, but the kernel used it is 2.6.22.9. I want to know how to use the 2.6.28.4 kernel. Disk image is fine but kernel binary is creating problem.

"Stamatis Kavvadias (Σταμάτης Καββαδίας)"

unread,
Dec 3, 2014, 12:09:06 AM12/3/14
to gem5-g...@googlegroups.com
Sorry Davesh,

    Why are you providing paths to --kernel and --disk-image ??? You must not.
You need to put the files under "binaries" and "disks" subfolders of where your
M5_PATH environment variable points. For simplicity, put all kernels from any
download to the same "binaries" folder and all disk images (including swap file
images) to the "disks" subfolder.
    Also, why are you trying to use a disk image you do not have and then rename
the image to match what argument you use with --disk-image??? You should change
the argument, to match the existing disk image (the same is true for kernels).
    Finally, when providing error messages, include the command line used to run
the simulator, so we can make sense of the error.
    Check the permissions in files/dirs descending from
$M5_PATH/ in case there is
some problem (does not seem to be the case).
    To use
x86_64-vmlinux-2.6.28.4-smp just specify --kernel=x86_64-vmlinux-2.6.28.4-smp,
as long as it is in $M5_PATH/binaries/

Regards,

Stamatis


DAVESH SHINGARI

unread,
Dec 3, 2014, 12:46:13 PM12/3/14
to gem5-g...@googlegroups.com
Hello Stamatis

Thanks for the suggestion. You were right. I was doing a silly mistake. The permission of the kernel binary was causing problem in opening the same. After I changed the permission, error was gone.
The reason I am specifying the kernel as parameter '--kernel'  because the binaries folder has 2 kernel, and I need specifically the 2.6.28.4 as it supports execution of benchamrks in full system mode ( I was running into some problem in 2.6.22.9 in fs mode, so Joel told to use this version).
The reason I am changing the disk name to x86root.img is because I read it on a post on gem5 forum. I think explicitly passing disk image as parameter with original name would solve same purpose.


I will summarize so that other users can get help (if they get struck):
The command I am using is
command line: build/VI_hammer/gem5.opt ../gem5-gpu/configs/fs_fusion.py --kernel=/***PATH***/gem5-gpu/gem5/full_system_images/x86_64-vmlinux-2.6.28.4-smp
The contents of my binaries and disk folder are as follows:

Binaries:
  • console 
  • ts_osfpal 
  • vmlinux 
  • x86_64-vmlinux-2.6.22.9 
  • x86_64-vmlinux-2.6.22.9.smp 
  • x86_64-vmlinux-2.6.28.4-smp

Disk:

  • linux-bigswap2.img 
  • linux-latest.img 
  • x86root.img
And the path and steps are mentioned in previous threads.
Thanks all for help. Highly appreciated.
...

Abhishek Tyagi

unread,
Feb 4, 2016, 6:10:59 AM2/4/16
to gem5-gpu Developers List
HI davesh,
I have followed all the steps mentioned above in the discussion but i am still not able to run the PARSEC benchmark in FS. I have some questions regarding the same;
1. Why do you have a linux-lates.img file in disk folder. If it is not present will it affect the simulation?

2. I ran the following FS and got some errors. 

abhishek@abhishek-Inspiron-3542:~/gem5-stable$ echo $M5_PATH
/home/abhishek/PARSEC_images/
abhishek@abhishek-Inspiron-3542:~/gem5-stable$ ./build/X86/gem5.opt ./configs/example/fs.py --kernel=x86_64-vmlinux-2.6.28.4-smp --num-cpus=16 --caches --l2cache --num-l2caches=1 --l1d_size=32kB --l1i_size=32kB --l2_size=356kB 
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 compiled Jan 30 2016 11:01:55
gem5 started Feb  4 2016 16:37:13
gem5 executing on abhishek-Inspiron-3542
command line: ./build/X86/gem5.opt ./configs/example/fs.py --kernel=x86_64-vmlinux-2.6.28.4-smp --num-cpus=16 --caches --l2cache --num-l2caches=1 --l1d_size=32kB --l1i_size=32kB --l2_size=356kB

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/abhishek/gem5-stable/src/python/m5/main.py", line 388, in main
    exec filecode in scope
  File "./configs/example/fs.py", line 327, in <module>
    test_sys = build_test_system(np)
  File "./configs/example/fs.py", line 96, in build_test_system
    options.ruby, cmdline=cmdline)
  File "/home/abhishek/gem5-stable/configs/common/FSConfig.py", line 624, in makeLinuxX86System
    self.kernel = binary('x86_64-vmlinux-2.6.22.9')
  File "/home/abhishek/gem5-stable/configs/common/SysPaths.py", line 49, in binary
    return searchpath(binary.path, filename)
  File "/home/abhishek/gem5-stable/configs/common/SysPaths.py", line 41, in searchpath
    raise IOError, "Can't find file '%s' on path." % filename
IOError: Can't find file 'x86_64-vmlinux-2.6.22.9' on path.


We can see that $M5_PATH has been set to the folder containing the disk images and binaries. I have specifically mentioned in the command the version of kerenl i am using but it says that it can not find the kernel 2.6.22.9 instead. What am i doing wrong here.

Any help is appreciated. 

Joel Hestness

unread,
Feb 4, 2016, 11:48:52 AM2/4/16
to Abhishek Tyagi, gem5-gpu Developers List
Hi,
  It appears that the --kernel= option may not be hooked up for x86. In fact, in the call trace that you pasted here, it shows that the FSConfig script (/home/abhishek/gem5-stable/configs/common/FSConfig.py) is trying to execute the hard coded binary specification to set self.kernel = binary('x86_64-vmlinux-2.6.22.9'). You might need to tweak FSConfig.py to either use your provided command line option, or to simply hard code the kernel that you want it to use.

  Joel

Davesh Shingari

unread,
Feb 4, 2016, 12:25:16 PM2/4/16
to Abhishek Tyagi, gem5-gpu Developers List, Joel Hestness
Hi Abhishek

Joel is right. I have encountered this problem and I can't recollect how I resolved this. You need to look at FSConfig for sure. And my suggestion is to try editing SysPath.py. I used something like this:
except KeyError:
           path = [ '/home/***/gem5-stable/system', '/home/***/gem5-stable/system/disks' ]

And you can also try giving full absolute path in the command line.
--
Have a great day!

Thanks and Warm Regards
Davesh Shingari
Master's in Computer Engineering [EE]
Arizona State University

TwilighT

unread,
Mar 7, 2022, 5:41:03 AM3/7/22
to gem5-gpu Developers List
Hello shingar...
would you please tell m emore detail about running full system emulation in gem5gpu
i want to run chai but sth is unclear for me
thanks regard
Reply all
Reply to author
Forward
0 new messages