Re: [gem5-users] Multi-threading on ARM timing CPU

2018-04-20 Thread Ciro Santilli
On Fri, Apr 20, 2018 at 12:12 AM, Singh, G. <g.si...@tue.nl> wrote:
> Hi Ciro,
> I feel its something with SE mode maybe.
> Now I tried to run on a latest git repository and I get syscall unimplemented 
> errors. I tried to work around by changing "unimplemented" to "ignore" in 
> process.cc. But then I get different syscall error.
>
> I am compiling the code on an arm server with just -fopenmp and -static 
> flags. Am I missing something?
>

Ah OK, I'm not yet familiar with the config files and didn't look into
your config in detail, I didn't see you are in SE mode.

When asking SE questions, it is a good idea to put that on the title ;-)

Threading is quirky / does not work in SE mode, see links at:
https://github.com/cirosantilli-work/gem5-issues/issues/5

I myself have never been able to get it running from se.py due to:
https://stackoverflow.com/questions/48959349/how-to-solve-fatal-kernel-too-old-when-running-gem5-in-syscall-emulation-se-m

> Best
> Gagan
>
> -Original Message-
> From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of Ciro 
> Santilli
> Sent: Friday, 20 April 2018 00:22
> To: gem5 users mailing list <gem5-users@gem5.org>
> Subject: Re: [gem5-users] Multi-threading on ARM timing CPU
>
> On Thu, Apr 19, 2018 at 11:08 PM, Singh, G. <g.si...@tue.nl> wrote:
>> Hi Ciro,
>>
>> Sorry for the late response. I had a lot of trouble setting up linux kernel 
>> module on my server.
>> Indeed it works there.
>>
>> But I have added NVMain with gem5 on my system. So I was hoping if can fix 
>> this issue on my setup.
>> I am still trying to figure out why it keeps on failing.
>>
>
> No problem, I provided that mainly as a working baseline, so now you can diff 
> out the working setup with yours to find the problem more easily :-)
>
> Also consider the docker setup if you are having installation
> difficulties: 
> https://github.com/cirosantilli/linux-kernel-module-cheat/tree/36cffd5c1a6e081194610d1d77a43a863f1d1157#docker
>
>> My gem5 version is a mercurial directory.
>> This the summary I get
>>
>> parent: 11775:0eadb0b6e9de tip
>>
>>
>> Best
>> Gagan
>> -----Original Message-
>> From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of
>> Ciro Santilli
>> Sent: Tuesday, 17 April 2018 14:41
>> To: gem5 users mailing list <gem5-users@gem5.org>
>> Subject: Re: [gem5-users] Multi-threading on ARM timing CPU
>>
>> On Tue, Apr 17, 2018 at 10:15 AM, Singh, G. <g.si...@tue.nl> wrote:
>>> Hi,
>>>
>>> Please find enclosed the script file and the program code for matrix 
>>> multiplication which I tried.
>>>
>>
>> Thanks.
>>
>> Which disk image / kernel are you using?
>>
>> I have produced a working fs.py aarch64 example at:
>> https://github.com/cirosantilli/linux-kernel-module-cheat/tree/singh-m
>> m#gem5-getting-started (use the singh-mm branch I've created)
>>
>> Build and run with:
>>
>> ./configure -g && ./build -a aarch64 -g && ./run -a aarch64 -c 4 -g --
>> --cpu-type=TimingSimpleCPU
>>
>> which uses 4 cores and TimingSimpleCPU.
>>
>> After boot finishes, run your benchmark inside the guest with:
>>
>> /MM.out
>>
>> It completes without errors.
>>
>> The setup also worked on arm instead of aarch64, but my arm setup is running 
>> very slowly for some reason which I don't understand yet:
>> https://github.com/cirosantilli/linux-kernel-module-cheat/tree/02b433e
>> 3ee8edb129c1e286a37ed2c8a8170fefe#benchmark-linux-kernel-boot
>> so just use the aarch64 one if you can.
>>
>> You will also likely want to enable compiler optimizations as
>> described at:
>> https://github.com/cirosantilli/linux-kernel-module-cheat/tree/02b433e
>> 3ee8edb129c1e286a37ed2c8a8170fefe#enable-compiler-optimizations
>> but I haven't tested it with that setup.
>>
>>> On running gem5 binary with --version option I get "Gem5.opt 2.0".
>>>
>>
>> Please provide the actual git SHA from git log, --version is not updated 
>> often and therefore too imprecise.
>>
>>> I tried running a simple hello world program with se.py and got the
>>> same error. This is the command line I used for it
>>> ../gem5/build/ARM/gem5.opt ../gem5/configs/example/se.py
>>> --cpu-type=TimingSimpleCPU --num-cpus=4 --num-work-ids=3 -c hello3
>>> --caches --l1d_size=2kB --l1i_size=2kB --l2cache --l2_size=2kB
>>>
>>> But if I use DerivO3CPU it works fine.
>>>

Re: [gem5-users] Multi-threading on ARM timing CPU

2018-04-19 Thread Singh, G.
Hi Ciro,
I feel its something with SE mode maybe.
Now I tried to run on a latest git repository and I get syscall unimplemented 
errors. I tried to work around by changing "unimplemented" to "ignore" in 
process.cc. But then I get different syscall error. 

I am compiling the code on an arm server with just -fopenmp and -static flags. 
Am I missing something?

Best 
Gagan

-Original Message-
From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of Ciro Santilli
Sent: Friday, 20 April 2018 00:22
To: gem5 users mailing list <gem5-users@gem5.org>
Subject: Re: [gem5-users] Multi-threading on ARM timing CPU

On Thu, Apr 19, 2018 at 11:08 PM, Singh, G. <g.si...@tue.nl> wrote:
> Hi Ciro,
>
> Sorry for the late response. I had a lot of trouble setting up linux kernel 
> module on my server.
> Indeed it works there.
>
> But I have added NVMain with gem5 on my system. So I was hoping if can fix 
> this issue on my setup.
> I am still trying to figure out why it keeps on failing.
>

No problem, I provided that mainly as a working baseline, so now you can diff 
out the working setup with yours to find the problem more easily :-)

Also consider the docker setup if you are having installation
difficulties: 
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/36cffd5c1a6e081194610d1d77a43a863f1d1157#docker

> My gem5 version is a mercurial directory.
> This the summary I get
>
> parent: 11775:0eadb0b6e9de tip
>
>
> Best
> Gagan
> -Original Message-
> From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of 
> Ciro Santilli
> Sent: Tuesday, 17 April 2018 14:41
> To: gem5 users mailing list <gem5-users@gem5.org>
> Subject: Re: [gem5-users] Multi-threading on ARM timing CPU
>
> On Tue, Apr 17, 2018 at 10:15 AM, Singh, G. <g.si...@tue.nl> wrote:
>> Hi,
>>
>> Please find enclosed the script file and the program code for matrix 
>> multiplication which I tried.
>>
>
> Thanks.
>
> Which disk image / kernel are you using?
>
> I have produced a working fs.py aarch64 example at:
> https://github.com/cirosantilli/linux-kernel-module-cheat/tree/singh-m
> m#gem5-getting-started (use the singh-mm branch I've created)
>
> Build and run with:
>
> ./configure -g && ./build -a aarch64 -g && ./run -a aarch64 -c 4 -g -- 
> --cpu-type=TimingSimpleCPU
>
> which uses 4 cores and TimingSimpleCPU.
>
> After boot finishes, run your benchmark inside the guest with:
>
> /MM.out
>
> It completes without errors.
>
> The setup also worked on arm instead of aarch64, but my arm setup is running 
> very slowly for some reason which I don't understand yet:
> https://github.com/cirosantilli/linux-kernel-module-cheat/tree/02b433e
> 3ee8edb129c1e286a37ed2c8a8170fefe#benchmark-linux-kernel-boot
> so just use the aarch64 one if you can.
>
> You will also likely want to enable compiler optimizations as 
> described at: 
> https://github.com/cirosantilli/linux-kernel-module-cheat/tree/02b433e
> 3ee8edb129c1e286a37ed2c8a8170fefe#enable-compiler-optimizations
> but I haven't tested it with that setup.
>
>> On running gem5 binary with --version option I get "Gem5.opt 2.0".
>>
>
> Please provide the actual git SHA from git log, --version is not updated 
> often and therefore too imprecise.
>
>> I tried running a simple hello world program with se.py and got the 
>> same error. This is the command line I used for it 
>> ../gem5/build/ARM/gem5.opt ../gem5/configs/example/se.py 
>> --cpu-type=TimingSimpleCPU --num-cpus=4 --num-work-ids=3 -c hello3 
>> --caches --l1d_size=2kB --l1i_size=2kB --l2cache --l2_size=2kB
>>
>> But if I use DerivO3CPU it works fine.
>>
>> Best
>> Gagan
>>
>> -Original Message-
>> From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of 
>> Ciro Santilli
>> Sent: Tuesday, 17 April 2018 10:04
>> To: gem5 users mailing list <gem5-users@gem5.org>
>> Subject: Re: [gem5-users] Multi-threading on ARM timing CPU
>>
>> On Tue, Apr 17, 2018 at 8:10 AM, Singh, G. <g.si...@tue.nl> wrote:
>>> Hi All,
>>>
>>>
>>>
>>> I am trying to run a simple multi-threaded program on ARM processor 
>>> with 4 cpu's and 4 threads.
>>>
>>> This program works perfectly for DerivO3CPU but the same program on 
>>> timing model gives the errors given
>>>
>>> below.  Actually I get the correct result but the program run does 
>>> not complete.
>>>
>>
>> Please provide the following:
>>
>> - gem5 version (git SHA)
>> - full gem5 command line
>

Re: [gem5-users] Multi-threading on ARM timing CPU

2018-04-19 Thread Ciro Santilli
On Thu, Apr 19, 2018 at 11:08 PM, Singh, G. <g.si...@tue.nl> wrote:
> Hi Ciro,
>
> Sorry for the late response. I had a lot of trouble setting up linux kernel 
> module on my server.
> Indeed it works there.
>
> But I have added NVMain with gem5 on my system. So I was hoping if can fix 
> this issue on my setup.
> I am still trying to figure out why it keeps on failing.
>

No problem, I provided that mainly as a working baseline, so now you
can diff out the working setup with yours to find the problem more
easily :-)

Also consider the docker setup if you are having installation
difficulties: 
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/36cffd5c1a6e081194610d1d77a43a863f1d1157#docker

> My gem5 version is a mercurial directory.
> This the summary I get
>
> parent: 11775:0eadb0b6e9de tip
>
>
> Best
> Gagan
> -Original Message-
> From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of Ciro 
> Santilli
> Sent: Tuesday, 17 April 2018 14:41
> To: gem5 users mailing list <gem5-users@gem5.org>
> Subject: Re: [gem5-users] Multi-threading on ARM timing CPU
>
> On Tue, Apr 17, 2018 at 10:15 AM, Singh, G. <g.si...@tue.nl> wrote:
>> Hi,
>>
>> Please find enclosed the script file and the program code for matrix 
>> multiplication which I tried.
>>
>
> Thanks.
>
> Which disk image / kernel are you using?
>
> I have produced a working fs.py aarch64 example at:
> https://github.com/cirosantilli/linux-kernel-module-cheat/tree/singh-mm#gem5-getting-started
> (use the singh-mm branch I've created)
>
> Build and run with:
>
> ./configure -g && ./build -a aarch64 -g && ./run -a aarch64 -c 4 -g -- 
> --cpu-type=TimingSimpleCPU
>
> which uses 4 cores and TimingSimpleCPU.
>
> After boot finishes, run your benchmark inside the guest with:
>
> /MM.out
>
> It completes without errors.
>
> The setup also worked on arm instead of aarch64, but my arm setup is running 
> very slowly for some reason which I don't understand yet:
> https://github.com/cirosantilli/linux-kernel-module-cheat/tree/02b433e3ee8edb129c1e286a37ed2c8a8170fefe#benchmark-linux-kernel-boot
> so just use the aarch64 one if you can.
>
> You will also likely want to enable compiler optimizations as described at: 
> https://github.com/cirosantilli/linux-kernel-module-cheat/tree/02b433e3ee8edb129c1e286a37ed2c8a8170fefe#enable-compiler-optimizations
> but I haven't tested it with that setup.
>
>> On running gem5 binary with --version option I get "Gem5.opt 2.0".
>>
>
> Please provide the actual git SHA from git log, --version is not updated 
> often and therefore too imprecise.
>
>> I tried running a simple hello world program with se.py and got the
>> same error. This is the command line I used for it
>> ../gem5/build/ARM/gem5.opt ../gem5/configs/example/se.py
>> --cpu-type=TimingSimpleCPU --num-cpus=4 --num-work-ids=3 -c hello3
>> --caches --l1d_size=2kB --l1i_size=2kB --l2cache --l2_size=2kB
>>
>> But if I use DerivO3CPU it works fine.
>>
>> Best
>> Gagan
>>
>> -Original Message-
>> From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of
>> Ciro Santilli
>> Sent: Tuesday, 17 April 2018 10:04
>> To: gem5 users mailing list <gem5-users@gem5.org>
>> Subject: Re: [gem5-users] Multi-threading on ARM timing CPU
>>
>> On Tue, Apr 17, 2018 at 8:10 AM, Singh, G. <g.si...@tue.nl> wrote:
>>> Hi All,
>>>
>>>
>>>
>>> I am trying to run a simple multi-threaded program on ARM processor
>>> with 4 cpu's and 4 threads.
>>>
>>> This program works perfectly for DerivO3CPU but the same program on
>>> timing model gives the errors given
>>>
>>> below.  Actually I get the correct result but the program run does
>>> not complete.
>>>
>>
>> Please provide the following:
>>
>> - gem5 version (git SHA)
>> - full gem5 command line
>> - how to obtain the required blobs (rootfs, dtb, etc.)
>>
>> What program are you running? Does it fail on every multithreaded program, 
>> or just this partiular one? Can you produce a minimal single C file example 
>> that also fails and give us the source?
>>
>>>
>>>
>>> Also, is there an option to simulate multithreaded code with each
>>> thread on different processor using se.py?
>>>
>>
>> Please ask one question per email in the future to make answers more
>> reusable for other people. ;-) (I don't know the answer to this one
>> yet)
>>
>>> Right

Re: [gem5-users] Multi-threading on ARM timing CPU

2018-04-19 Thread Singh, G.
Hi Ciro,

Sorry for the late response. I had a lot of trouble setting up linux kernel 
module on my server. 
Indeed it works there.

But I have added NVMain with gem5 on my system. So I was hoping if can fix this 
issue on my setup.
I am still trying to figure out why it keeps on failing.

My gem5 version is a mercurial directory. 
This the summary I get

parent: 11775:0eadb0b6e9de tip


Best
Gagan
-Original Message-
From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of Ciro Santilli
Sent: Tuesday, 17 April 2018 14:41
To: gem5 users mailing list <gem5-users@gem5.org>
Subject: Re: [gem5-users] Multi-threading on ARM timing CPU

On Tue, Apr 17, 2018 at 10:15 AM, Singh, G. <g.si...@tue.nl> wrote:
> Hi,
>
> Please find enclosed the script file and the program code for matrix 
> multiplication which I tried.
>

Thanks.

Which disk image / kernel are you using?

I have produced a working fs.py aarch64 example at:
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/singh-mm#gem5-getting-started
(use the singh-mm branch I've created)

Build and run with:

./configure -g && ./build -a aarch64 -g && ./run -a aarch64 -c 4 -g -- 
--cpu-type=TimingSimpleCPU

which uses 4 cores and TimingSimpleCPU.

After boot finishes, run your benchmark inside the guest with:

/MM.out

It completes without errors.

The setup also worked on arm instead of aarch64, but my arm setup is running 
very slowly for some reason which I don't understand yet:
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/02b433e3ee8edb129c1e286a37ed2c8a8170fefe#benchmark-linux-kernel-boot
so just use the aarch64 one if you can.

You will also likely want to enable compiler optimizations as described at: 
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/02b433e3ee8edb129c1e286a37ed2c8a8170fefe#enable-compiler-optimizations
but I haven't tested it with that setup.

> On running gem5 binary with --version option I get "Gem5.opt 2.0".
>

Please provide the actual git SHA from git log, --version is not updated often 
and therefore too imprecise.

> I tried running a simple hello world program with se.py and got the 
> same error. This is the command line I used for it 
> ../gem5/build/ARM/gem5.opt ../gem5/configs/example/se.py 
> --cpu-type=TimingSimpleCPU --num-cpus=4 --num-work-ids=3 -c hello3 
> --caches --l1d_size=2kB --l1i_size=2kB --l2cache --l2_size=2kB
>
> But if I use DerivO3CPU it works fine.
>
> Best
> Gagan
>
> -Original Message-
> From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of 
> Ciro Santilli
> Sent: Tuesday, 17 April 2018 10:04
> To: gem5 users mailing list <gem5-users@gem5.org>
> Subject: Re: [gem5-users] Multi-threading on ARM timing CPU
>
> On Tue, Apr 17, 2018 at 8:10 AM, Singh, G. <g.si...@tue.nl> wrote:
>> Hi All,
>>
>>
>>
>> I am trying to run a simple multi-threaded program on ARM processor 
>> with 4 cpu's and 4 threads.
>>
>> This program works perfectly for DerivO3CPU but the same program on 
>> timing model gives the errors given
>>
>> below.  Actually I get the correct result but the program run does 
>> not complete.
>>
>
> Please provide the following:
>
> - gem5 version (git SHA)
> - full gem5 command line
> - how to obtain the required blobs (rootfs, dtb, etc.)
>
> What program are you running? Does it fail on every multithreaded program, or 
> just this partiular one? Can you produce a minimal single C file example that 
> also fails and give us the source?
>
>>
>>
>> Also, is there an option to simulate multithreaded code with each 
>> thread on different processor using se.py?
>>
>
> Please ask one question per email in the future to make answers more 
> reusable for other people. ;-) (I don't know the answer to this one
> yet)
>
>> Right now I am writing a new script file.
>>
>>
>>
>> gem5.opt: build/ARM/cpu/simple/timing.cc:237: virtual void
>> TimingSimpleCPU::suspendContext(ThreadID): Assertion `_status == 
>> BaseSimpleCPU::Running' failed.
>>
>> Program aborted at tick 4576216124000
>>
>> --- BEGIN LIBC BACKTRACE ---
>>
>> ../../tools/gem5/build/ARM/gem5.opt(_Z15print_backtracev+0x28)[0xb05d
>> 2
>> 8]
>>
>> ../../tools/gem5/build/ARM/gem5.opt(_Z12abortHandleri+0x46)[0xb24396]
>>
>> /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7efd25543390]
>>
>> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7efd24269428]
>>
>> /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7efd2426b02a]
>>
>> /lib/x86_64-linux-gnu/libc.so.6(+0x2dbd7)[0x7efd24261bd7]
>>
>> /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7ef

Re: [gem5-users] Multi-threading on ARM timing CPU

2018-04-17 Thread Ciro Santilli
On Tue, Apr 17, 2018 at 10:15 AM, Singh, G. <g.si...@tue.nl> wrote:
> Hi,
>
> Please find enclosed the script file and the program code for matrix 
> multiplication which I tried.
>

Thanks.

Which disk image / kernel are you using?

I have produced a working fs.py aarch64 example at:
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/singh-mm#gem5-getting-started
(use the singh-mm branch I've created)

Build and run with:

./configure -g && ./build -a aarch64 -g && ./run -a aarch64 -c 4 -g --
--cpu-type=TimingSimpleCPU

which uses 4 cores and TimingSimpleCPU.

After boot finishes, run your benchmark inside the guest with:

/MM.out

It completes without errors.

The setup also worked on arm instead of aarch64, but my arm setup is
running very slowly for some reason which I don't understand yet:
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/02b433e3ee8edb129c1e286a37ed2c8a8170fefe#benchmark-linux-kernel-boot
so just use the aarch64 one if you can.

You will also likely want to enable compiler optimizations as
described at: 
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/02b433e3ee8edb129c1e286a37ed2c8a8170fefe#enable-compiler-optimizations
but I haven't tested it with that setup.

> On running gem5 binary with --version option I get
> "Gem5.opt 2.0".
>

Please provide the actual git SHA from git log, --version is not
updated often and therefore too imprecise.

> I tried running a simple hello world program with se.py and got the same 
> error. This is the command line I used for it
> ../gem5/build/ARM/gem5.opt ../gem5/configs/example/se.py 
> --cpu-type=TimingSimpleCPU --num-cpus=4 --num-work-ids=3 -c hello3 --caches 
> --l1d_size=2kB --l1i_size=2kB --l2cache --l2_size=2kB
>
> But if I use DerivO3CPU it works fine.
>
> Best
> Gagan
>
> -Original Message-
> From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of Ciro 
> Santilli
> Sent: Tuesday, 17 April 2018 10:04
> To: gem5 users mailing list <gem5-users@gem5.org>
> Subject: Re: [gem5-users] Multi-threading on ARM timing CPU
>
> On Tue, Apr 17, 2018 at 8:10 AM, Singh, G. <g.si...@tue.nl> wrote:
>> Hi All,
>>
>>
>>
>> I am trying to run a simple multi-threaded program on ARM processor
>> with 4 cpu's and 4 threads.
>>
>> This program works perfectly for DerivO3CPU but the same program on
>> timing model gives the errors given
>>
>> below.  Actually I get the correct result but the program run does not
>> complete.
>>
>
> Please provide the following:
>
> - gem5 version (git SHA)
> - full gem5 command line
> - how to obtain the required blobs (rootfs, dtb, etc.)
>
> What program are you running? Does it fail on every multithreaded program, or 
> just this partiular one? Can you produce a minimal single C file example that 
> also fails and give us the source?
>
>>
>>
>> Also, is there an option to simulate multithreaded code with each
>> thread on different processor using se.py?
>>
>
> Please ask one question per email in the future to make answers more reusable 
> for other people. ;-) (I don't know the answer to this one
> yet)
>
>> Right now I am writing a new script file.
>>
>>
>>
>> gem5.opt: build/ARM/cpu/simple/timing.cc:237: virtual void
>> TimingSimpleCPU::suspendContext(ThreadID): Assertion `_status ==
>> BaseSimpleCPU::Running' failed.
>>
>> Program aborted at tick 4576216124000
>>
>> --- BEGIN LIBC BACKTRACE ---
>>
>> ../../tools/gem5/build/ARM/gem5.opt(_Z15print_backtracev+0x28)[0xb05d2
>> 8]
>>
>> ../../tools/gem5/build/ARM/gem5.opt(_Z12abortHandleri+0x46)[0xb24396]
>>
>> /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7efd25543390]
>>
>> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7efd24269428]
>>
>> /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7efd2426b02a]
>>
>> /lib/x86_64-linux-gnu/libc.so.6(+0x2dbd7)[0x7efd24261bd7]
>>
>> /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7efd24261c82]
>>
>> ../../tools/gem5/build/ARM/gem5.opt(_ZN15TimingSimpleCPU14suspendConte
>> xtEs+0x335)[0xfe1035]
>>
>> ../../tools/gem5/build/ARM/gem5.opt(_Z13exitGroupFuncP11SyscallDesciP1
>> 1LiveProcessP13ThreadContext+0x57)[0xb85677]
>>
>> ../../tools/gem5/build/ARM/gem5.opt(_ZN11SyscallDesc9doSyscallEiP11Liv
>> eProcessP13ThreadContext+0xa8)[0xb8afe8]
>>
>> ../../tools/gem5/build/ARM/gem5.opt(_ZN11LiveProcess7syscallElP13Threa
>> dContext+0x49)[0xb7bc09]
>>
>> ../../tools/gem5/build/ARM/gem5.opt(_ZN6ArmISA14SupervisorCall6invokeE
>> P13ThreadContextRK14RefCou

Re: [gem5-users] Multi-threading on ARM timing CPU

2018-04-17 Thread Singh, G.
Hi,

Please find enclosed the script file and the program code for matrix 
multiplication which I tried.

On running gem5 binary with --version option I get
"Gem5.opt 2.0".

I tried running a simple hello world program with se.py and got the same error. 
This is the command line I used for it
../gem5/build/ARM/gem5.opt ../gem5/configs/example/se.py 
--cpu-type=TimingSimpleCPU --num-cpus=4 --num-work-ids=3 -c hello3 --caches 
--l1d_size=2kB --l1i_size=2kB --l2cache --l2_size=2kB 

But if I use DerivO3CPU it works fine.

Best
Gagan

-Original Message-
From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of Ciro Santilli
Sent: Tuesday, 17 April 2018 10:04
To: gem5 users mailing list <gem5-users@gem5.org>
Subject: Re: [gem5-users] Multi-threading on ARM timing CPU

On Tue, Apr 17, 2018 at 8:10 AM, Singh, G. <g.si...@tue.nl> wrote:
> Hi All,
>
>
>
> I am trying to run a simple multi-threaded program on ARM processor 
> with 4 cpu's and 4 threads.
>
> This program works perfectly for DerivO3CPU but the same program on 
> timing model gives the errors given
>
> below.  Actually I get the correct result but the program run does not 
> complete.
>

Please provide the following:

- gem5 version (git SHA)
- full gem5 command line
- how to obtain the required blobs (rootfs, dtb, etc.)

What program are you running? Does it fail on every multithreaded program, or 
just this partiular one? Can you produce a minimal single C file example that 
also fails and give us the source?

>
>
> Also, is there an option to simulate multithreaded code with each 
> thread on different processor using se.py?
>

Please ask one question per email in the future to make answers more reusable 
for other people. ;-) (I don't know the answer to this one
yet)

> Right now I am writing a new script file.
>
>
>
> gem5.opt: build/ARM/cpu/simple/timing.cc:237: virtual void
> TimingSimpleCPU::suspendContext(ThreadID): Assertion `_status == 
> BaseSimpleCPU::Running' failed.
>
> Program aborted at tick 4576216124000
>
> --- BEGIN LIBC BACKTRACE ---
>
> ../../tools/gem5/build/ARM/gem5.opt(_Z15print_backtracev+0x28)[0xb05d2
> 8]
>
> ../../tools/gem5/build/ARM/gem5.opt(_Z12abortHandleri+0x46)[0xb24396]
>
> /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7efd25543390]
>
> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7efd24269428]
>
> /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7efd2426b02a]
>
> /lib/x86_64-linux-gnu/libc.so.6(+0x2dbd7)[0x7efd24261bd7]
>
> /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7efd24261c82]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN15TimingSimpleCPU14suspendConte
> xtEs+0x335)[0xfe1035]
>
> ../../tools/gem5/build/ARM/gem5.opt(_Z13exitGroupFuncP11SyscallDesciP1
> 1LiveProcessP13ThreadContext+0x57)[0xb85677]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN11SyscallDesc9doSyscallEiP11Liv
> eProcessP13ThreadContext+0xa8)[0xb8afe8]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN11LiveProcess7syscallElP13Threa
> dContext+0x49)[0xb7bc09]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN6ArmISA14SupervisorCall6invokeE
> P13ThreadContextRK14RefCountingPtrI10StaticInstE+0x6a)[0xd8317a]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN13BaseSimpleCPU9advancePCERKSt1
> 0shared_ptrI9FaultBaseE+0x104)[0xfe27a4]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN15TimingSimpleCPU11advanceInstE
> RKSt10shared_ptrI9FaultBaseE+0x39)[0xfded49]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN15TimingSimpleCPU14completeIfet
> chEP6Packet+0x1d9)[0xfdf149]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN10EventQueue10serviceOneEv+0xb1
> )[0xb14a21]
>
> ../../tools/gem5/build/ARM/gem5.opt(_Z9doSimLoopP10EventQueue+0x50)[0x
> b42020]
>
> ../../tools/gem5/build/ARM/gem5.opt(_Z8simulatem+0x203)[0xb425f3]
>
> ../../tools/gem5/build/ARM/gem5.opt[0x1053802]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x785
> 2)[0x7efd25800772]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85c)
> [0x7efd2593705c]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6ff
> d)[0x7efd257fff1d]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x712
> 4)[0x7efd25800044]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x712
> 4)[0x7efd25800044]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85c)
> [0x7efd2593705c]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x19)[0x
> 7efd257f8da9]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x613
> b)[0x7efd257ff05b]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85c)
> [0x7efd2593705c]
>
> /usr/lib/x86_64-linux-gnu

Re: [gem5-users] Multi-threading on ARM timing CPU

2018-04-17 Thread Ciro Santilli
On Tue, Apr 17, 2018 at 8:10 AM, Singh, G.  wrote:
> Hi All,
>
>
>
> I am trying to run a simple multi-threaded program on ARM processor with 4
> cpu's and 4 threads.
>
> This program works perfectly for DerivO3CPU but the same program on timing
> model gives the errors given
>
> below.  Actually I get the correct result but the program run does not
> complete.
>

Please provide the following:

- gem5 version (git SHA)
- full gem5 command line
- how to obtain the required blobs (rootfs, dtb, etc.)

What program are you running? Does it fail on every multithreaded
program, or just this partiular one? Can you produce a minimal single
C file example that also fails and give us the source?

>
>
> Also, is there an option to simulate multithreaded code with each thread on
> different processor using se.py?
>

Please ask one question per email in the future to make answers more
reusable for other people. ;-) (I don't know the answer to this one
yet)

> Right now I am writing a new script file.
>
>
>
> gem5.opt: build/ARM/cpu/simple/timing.cc:237: virtual void
> TimingSimpleCPU::suspendContext(ThreadID): Assertion `_status ==
> BaseSimpleCPU::Running' failed.
>
> Program aborted at tick 4576216124000
>
> --- BEGIN LIBC BACKTRACE ---
>
> ../../tools/gem5/build/ARM/gem5.opt(_Z15print_backtracev+0x28)[0xb05d28]
>
> ../../tools/gem5/build/ARM/gem5.opt(_Z12abortHandleri+0x46)[0xb24396]
>
> /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7efd25543390]
>
> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7efd24269428]
>
> /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7efd2426b02a]
>
> /lib/x86_64-linux-gnu/libc.so.6(+0x2dbd7)[0x7efd24261bd7]
>
> /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7efd24261c82]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN15TimingSimpleCPU14suspendContextEs+0x335)[0xfe1035]
>
> ../../tools/gem5/build/ARM/gem5.opt(_Z13exitGroupFuncP11SyscallDesciP11LiveProcessP13ThreadContext+0x57)[0xb85677]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN11SyscallDesc9doSyscallEiP11LiveProcessP13ThreadContext+0xa8)[0xb8afe8]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN11LiveProcess7syscallElP13ThreadContext+0x49)[0xb7bc09]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN6ArmISA14SupervisorCall6invokeEP13ThreadContextRK14RefCountingPtrI10StaticInstE+0x6a)[0xd8317a]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN13BaseSimpleCPU9advancePCERKSt10shared_ptrI9FaultBaseE+0x104)[0xfe27a4]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN15TimingSimpleCPU11advanceInstERKSt10shared_ptrI9FaultBaseE+0x39)[0xfded49]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN15TimingSimpleCPU14completeIfetchEP6Packet+0x1d9)[0xfdf149]
>
> ../../tools/gem5/build/ARM/gem5.opt(_ZN10EventQueue10serviceOneEv+0xb1)[0xb14a21]
>
> ../../tools/gem5/build/ARM/gem5.opt(_Z9doSimLoopP10EventQueue+0x50)[0xb42020]
>
> ../../tools/gem5/build/ARM/gem5.opt(_Z8simulatem+0x203)[0xb425f3]
>
> ../../tools/gem5/build/ARM/gem5.opt[0x1053802]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7852)[0x7efd25800772]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85c)[0x7efd2593705c]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6ffd)[0x7efd257fff1d]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7124)[0x7efd25800044]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7124)[0x7efd25800044]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85c)[0x7efd2593705c]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x19)[0x7efd257f8da9]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x613b)[0x7efd257ff05b]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85c)[0x7efd2593705c]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6ffd)[0x7efd257fff1d]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85c)[0x7efd2593705c]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x19)[0x7efd257f8da9]
>
> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyRun_StringFlags+0x76)[0x7efd258731f6]
>
> --- END LIBC BACKTRACE ---
>
> Aborted (core dumped)
>
>
>
> Best
>
> Gagan
>
>
> ___
> 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