Re: [gem5-users] Expanding Disk Image for FS Mode

2019-04-20 Thread Seeley, Justin P
Thank you Ciro.

Are you aware of a way to install a program like you would normally on linux 
using something like:
$ sudo apt-get install r-base

but for a partition in a disk image, so that everything is set up correctly on 
the disk image I am using for gem5? I cannot just copy over my R binary from my 
host machine to the mounted disk image because there are dependencies and 
libraries all over the place that were set by the original installation.

I was thinking I would have to either mount the image in some way to do this or 
change my PATH?

Justin

On Apr 20, 2019, at 4:49 AM, Ciro Santilli 
mailto:ciro.santi...@arm.com>> wrote:

Since this question is mostly gem5 agnostic, I would also recommend thoroughly 
searching Stack Exchange as well, e.g.: 
https://superuser.com/questions/693158/can-i-expand-the-size-of-a-file-based-disk-image

Another thing you might be able to do is to put your additions on a separate 
image as mentioned at: 
https://stackoverflow.com/questions/55603929/question-about-transferring-files-to-arm-linux-in-gem5-full-system-mode

It is also worth noting that QEMU's qcow2 disk image format allows for sparse 
images, allowing to create a humongous image that takes up little disk space. 
It would be awesome if we added support for it in gem5 at some point. Ubuntu's 
convenient cloud images are distributed like that for example.



From: gem5-users 
mailto:gem5-users-boun...@gem5.org>> on behalf of 
Seeley, Justin P mailto:jpsee...@wpi.edu>>
Sent: Tuesday, April 16, 2019 7:31:45 PM
To: gem5-users@gem5.org
Subject: [gem5-users] Expanding Disk Image for FS Mode

Hello,

I am using the X86 disk image from:
http://gem5.org/Download

I am trying to get full system mode working, so I use an R script as a 
benchmark.

This requires me to edit the disk image by:
1. Copying over my R scripts
2. Installing R
3. Installing Rscript

I can easily copy over my R scripts by just copying them over to the mounted 
disk image.

However, installing R and Rscript is not so easy. The disk image does not have 
enough room to install them, so I have been trying to expand the disk image to 
no success. I get the following for this disk image.

> e2fsck -f linux-x86.img
e2fsck 1.44.1 (24-Mar-2018)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open linux-x86.img

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 
 or
e2fsck -b 32768 

Found a dos partition table in linux-x86.img


I am able to increase the disk size with:
> sudo dd if=/dev/zero bs=1M count=400 >>  linux-x86.img

But because of this superblock issue resize2fs does not work.

Has anyone had any luck expanding the X86 disk image for gem5? It seems strange 
the disk image from the gem5 source has this superblock issue.

Thank you,
Justin

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.

___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Spurious remote gdb connections

2019-04-20 Thread Subhankar Pal
I will try it out. I appreciate the help.

-- 
Subhankar Pal

On April 20, 2019 at 4:40:41 PM, Pouya Fotouhi (pfoto...@ucdavis.edu) wrote:

Subhankar,

As Gabe mentioned, you should simply disable listeners (set
--remote-gdb-port=0 with your gem5 binary) IF you are not inspecting your
simulations during their execution time.

Best,

On Sat, Apr 20, 2019 at 10:58 AM Subhankar Pal  wrote:

> Could someone please help with this issue?
>
> --
> Subhankar Pal
>
> On March 31, 2019 at 10:42:22 AM, Subhankar Pal (s...@umich.edu) wrote:
>
> Hi,
>
> I am running simulations on a modified se.py multi-CPU config on the Arm
> ISA. I am running custom benchmarks coded in C++. For some of my
> long-running benchmarks, I see remote gdb “attach” and “detach” prints as
> follows. The OS seems to deschedule the gem5 process when the remote gdb is
> attached. I am not sure why this is happening, since I am not using gdb
> with gem5. If it’s relevant, I have other gem5 processes running
> concurrently on the same machine.
>
> info: Entering event queue @ 275769376000.  Starting simulation...
> 1310556846000: system.remote_gdb: remote gdb attached
> warn: Couldn't read data from debugger.
> 1310560831000: system.remote_gdb: remote gdb detached
> 1310565082000: system.remote_gdb: remote gdb attached
> warn: Couldn't read data from debugger.
> 1310565906000: system.remote_gdb: remote gdb detached
> 1436849751000: system.remote_gdb: remote gdb attached
> warn: Couldn't read data from debugger.
> 1437182151000: system.remote_gdb: remote gdb detached
> 1438075461000: system.remote_gdb: remote gdb attached
>
> Please let me know if you have seen this before and/or have a solution.
> Thank you!
>
> --
> Subhankar Pal  |  Computer Science & Engineering  |  University of Michigan
>
> ___
> 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] Spurious remote gdb connections

2019-04-20 Thread Pouya Fotouhi
Subhankar,

As Gabe mentioned, you should simply disable listeners (set
--remote-gdb-port=0 with your gem5 binary) IF you are not inspecting your
simulations during their execution time.

Best,

On Sat, Apr 20, 2019 at 10:58 AM Subhankar Pal  wrote:

> Could someone please help with this issue?
>
> --
> Subhankar Pal
>
> On March 31, 2019 at 10:42:22 AM, Subhankar Pal (s...@umich.edu) wrote:
>
> Hi,
>
> I am running simulations on a modified se.py multi-CPU config on the Arm
> ISA. I am running custom benchmarks coded in C++. For some of my
> long-running benchmarks, I see remote gdb “attach” and “detach” prints as
> follows. The OS seems to deschedule the gem5 process when the remote gdb is
> attached. I am not sure why this is happening, since I am not using gdb
> with gem5. If it’s relevant, I have other gem5 processes running
> concurrently on the same machine.
>
> info: Entering event queue @ 275769376000.  Starting simulation...
> 1310556846000: system.remote_gdb: remote gdb attached
> warn: Couldn't read data from debugger.
> 1310560831000: system.remote_gdb: remote gdb detached
> 1310565082000: system.remote_gdb: remote gdb attached
> warn: Couldn't read data from debugger.
> 1310565906000: system.remote_gdb: remote gdb detached
> 1436849751000: system.remote_gdb: remote gdb attached
> warn: Couldn't read data from debugger.
> 1437182151000: system.remote_gdb: remote gdb detached
> 1438075461000: system.remote_gdb: remote gdb attached
>
> Please let me know if you have seen this before and/or have a solution.
> Thank you!
>
> --
> Subhankar Pal  |  Computer Science & Engineering  |  University of Michigan
>
> ___
> 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] Spurious remote gdb connections

2019-04-20 Thread Subhankar Pal
Could someone please help with this issue?

-- 
Subhankar Pal

On March 31, 2019 at 10:42:22 AM, Subhankar Pal (s...@umich.edu) wrote:

Hi,

I am running simulations on a modified se.py multi-CPU config on the Arm
ISA. I am running custom benchmarks coded in C++. For some of my
long-running benchmarks, I see remote gdb “attach” and “detach” prints as
follows. The OS seems to deschedule the gem5 process when the remote gdb is
attached. I am not sure why this is happening, since I am not using gdb
with gem5. If it’s relevant, I have other gem5 processes running
concurrently on the same machine.

info: Entering event queue @ 275769376000.  Starting simulation...
1310556846000: system.remote_gdb: remote gdb attached
warn: Couldn't read data from debugger.
1310560831000: system.remote_gdb: remote gdb detached
1310565082000: system.remote_gdb: remote gdb attached
warn: Couldn't read data from debugger.
1310565906000: system.remote_gdb: remote gdb detached
1436849751000: system.remote_gdb: remote gdb attached
warn: Couldn't read data from debugger.
1437182151000: system.remote_gdb: remote gdb detached
1438075461000: system.remote_gdb: remote gdb attached

Please let me know if you have seen this before and/or have a solution.
Thank you!

-- 
Subhankar Pal  |  Computer Science & Engineering  |  University of Michigan
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Error during gem5 full system simulation with DerivO3CPU

2019-04-20 Thread Abhishek Singh
Use an older commit
It solves the problem

On Sat, Apr 20, 2019 at 1:48 PM ABHISHEK BHATTACHARYYA <
abhattach...@wisc.edu> wrote:

> Hi
>
> I am trying to run a full system simulation with DerivO3CPU and a mesh
> interconnect model from garnet2.0. However, the simulation fails giving the
> following error message. Any idea what can be wrong?
>
> build/X86_MESI_Two_Level/mem/packet.hh:1047: T* Packet::getPtr() [with T =
> unsigned char]: Assertion `flags.isSet(STATIC_DATA|DYNAMIC_DATA)' failed.
>
> Regards,
>
>
> Abhishek Bhattacharyya
>
> *Graduate Research Assistant*
>
> *Electrical and Computer Engineering Department*
>
> *University of Wisconsin-Madison*
> ___
> 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

[gem5-users] Error during gem5 full system simulation with DerivO3CPU

2019-04-20 Thread ABHISHEK BHATTACHARYYA
Hi

I am trying to run a full system simulation with DerivO3CPU and a mesh 
interconnect model from garnet2.0. However, the simulation fails giving the 
following error message. Any idea what can be wrong?

build/X86_MESI_Two_Level/mem/packet.hh:1047: T* Packet::getPtr() [with T = 
unsigned char]: Assertion `flags.isSet(STATIC_DATA|DYNAMIC_DATA)' failed.


Regards,


Abhishek Bhattacharyya

Graduate Research Assistant

Electrical and Computer Engineering Department

University of Wisconsin-Madison
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Debug prints in FS mode using script

2019-04-20 Thread ABHISHEK BHATTACHARYYA
Thanks, Jason.

From: gem5-users  on behalf of Jason Lowe-Power 

Sent: Monday, April 15, 2019 6:35 PM
To: gem5 users mailing list
Subject: Re: [gem5-users] Debug prints in FS mode using script

That's ticks. You would have to divide by the cycle time to get cycles.

curCycle() should be curTick()/cyclePeriod() (cyclePeriod is the ticks per 
cycle. E.g., 500 for 2 GHz). See 
https://gem5.googlesource.com/public/gem5/+/refs/heads/master/src/sim/clocked_object.hh#65.

Jason

On Mon, Apr 15, 2019 at 1:47 PM ABHISHEK BHATTACHARYYA 
mailto:abhattach...@wisc.edu>> wrote:
Thanks, Jason. I followed your advice and I can see my debug prints now. 
However, I have one more question.

Do the debug prints here print out the ticks or cycles on the left 
(underlined)? If ticks, then how can I get the cycle value? I see there were 
similar questions asked earlier but I didn't understand the explanations 
provided. What does the call curCycle() return? I used it but the value 
returned matches the value on the left side of the print statements below.

500: system.ruby.l1_cntrl0: MESI_Two_Level-L1cache.sm:537: Issue GETS address: 
0x7
78000: system.ruby.l1_cntrl0: MESI_Two_Level-L1cache.sm:845: Load complete 
address: 0x7

Regards,
Abhishek Bhattcharyya

From: gem5-users 
mailto:gem5-users-boun...@gem5.org>> on behalf of 
Jason Lowe-Power mailto:ja...@lowepower.com>>
Sent: Monday, April 15, 2019 11:12 AM
To: gem5 users mailing list
Subject: Re: [gem5-users] Debug prints in FS mode using script

Hi Abhishek,

Check --debug-help. You probably want --debug-file= and you may want 
--debug-start= when debugging Ruby protocols in FS mode. I've also found 
it useful to use a named pipe for the debug file and pipe it though `tail` to 
get only the last n lines (where n is usually megabytes to gigabytes).

PS: Using the Ruby random tester is a way to debug protocol issues without 
having to wait for hours (days if you have tracing on) for Linux to boot.

Cheers,
Jason

On Mon, Apr 15, 2019 at 9:01 AM ABHISHEK BHATTACHARYYA 
mailto:abhattach...@wisc.edu>> wrote:
Hi

I am running a full system simulation of gem5 with parsec benchmarks using an 
rcs script. I have added new debug prints to the gem5 code to trace RubySlicc 
request and response actions. How do I redirect the debug prints to a new file 
and collect the trace in this case?

Thanks,
Abhishek Bhattacharyya


Regards,


Abhishek Bhattacharyya

Graduate Research Assistant

Electrical and Computer Engineering Department

University of Wisconsin-Madison

___
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
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Expanding Disk Image for FS Mode

2019-04-20 Thread Ciro Santilli
Since this question is mostly gem5 agnostic, I would also recommend thoroughly 
searching Stack Exchange as well, e.g.: 
https://superuser.com/questions/693158/can-i-expand-the-size-of-a-file-based-disk-image

Another thing you might be able to do is to put your additions on a separate 
image as mentioned at: 
https://stackoverflow.com/questions/55603929/question-about-transferring-files-to-arm-linux-in-gem5-full-system-mode

It is also worth noting that QEMU's qcow2 disk image format allows for sparse 
images, allowing to create a humongous image that takes up little disk space. 
It would be awesome if we added support for it in gem5 at some point. Ubuntu's 
convenient cloud images are distributed like that for example.



From: gem5-users  on behalf of Seeley, Justin P 

Sent: Tuesday, April 16, 2019 7:31:45 PM
To: gem5-users@gem5.org
Subject: [gem5-users] Expanding Disk Image for FS Mode

Hello,

I am using the X86 disk image from:
http://gem5.org/Download

I am trying to get full system mode working, so I use an R script as a 
benchmark.

This requires me to edit the disk image by:
1. Copying over my R scripts
2. Installing R
3. Installing Rscript

I can easily copy over my R scripts by just copying them over to the mounted 
disk image.

However, installing R and Rscript is not so easy. The disk image does not have 
enough room to install them, so I have been trying to expand the disk image to 
no success. I get the following for this disk image.

> e2fsck -f linux-x86.img
e2fsck 1.44.1 (24-Mar-2018)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open linux-x86.img

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 
 or
e2fsck -b 32768 

Found a dos partition table in linux-x86.img


I am able to increase the disk size with:
> sudo dd if=/dev/zero bs=1M count=400 >>  linux-x86.img

But because of this superblock issue resize2fs does not work.

Has anyone had any luck expanding the X86 disk image for gem5? It seems strange 
the disk image from the gem5 source has this superblock issue.

Thank you,
Justin

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.
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users