Hi, Crio Santilli,

Thank for your kind help. I have tried this minimal program with the
command line as follow:

build/X86/gem5.opt configs/example/se.py -c
../linux-kernel-module-cheat-master/userland/posix/pthread_self.out -o 2
--mem-type=DDR4_2400_8x8 --mem-size=8GB -n 4 --cpu-type=DerivO3CPU --caches
--l1d_size=64kB --l1d_assoc=8 --l1i_size=32kB --l1i_assoc=8 --l2cache
--l2_size=512kB --l2_assoc=16

After the simulation, I can see the statistics for cpu0, cpu1 and cpcu2,
but the statistics for cpu3 are still all 0. And also, after this minimal
program, I tried again with the unmodified code of gem5 with 4 cpus running
spec2006 ebnchmark, but the result is still the same as before, only cpu0
has statistics. other cpu are still 0. The commandline is as follow:

build/X86/gem5.opt --outdir=bzip2/ configs/example/se.py -c
../benchmarks/spec2006/benchspec/CPU2006/401.bzip2/exe/bzip2_base.x86 -o
../benchmarks/spec2006/benchspec/CPU2006/401.bzip2/data/ref/input/control
--mem-type=DDR4_2400_8x8 --mem-size=8GB --num-cpus 4 --cpu-type=DerivO3CPU
--caches --l1d_size=64kB --l1d_assoc=8 --l1i_size=32kB --l1i_assoc=8
--l2cache --l2_size=512kB --l2_assoc=16 --fast-forward=10000000
--maxinsts=10000000

And I have checked the config.ini file after the simulation, the config.ini
file shows that all the cpu3, caches, ports and bus are well connected and
initilized. But eventually the statistics for cpu1, cpu2 and cpu3 are 0. I
am quiet confused about this. Is there any tricks when running spec
benchmark with multi core on se mode.

Best regards.

Shougang

On Sat, Sep 7, 2019 at 10:12 PM Ciro Santilli <ciro.santi...@gmail.com>
wrote:

>
>
> On Sun, Sep 8, 2019 at 12:57 AM yuan <syu...@ncsu.edu> wrote:
>
>> Hi, Ciro Santilli,
>>
>>
>>
>> I have tried the whole afternoon about this minimal c pthread program,
>> but I can not make it run on gem5. Could you please tell me how to compile
>> this minimal program such that it can be feed into gem5 simulator?
>>
>>
>>
>
> On Ubuntu 19.04 as shown at:
> https://stackoverflow.com/questions/53085048/how-to-compile-and-run-an-executable-in-gem5-syscall-emulation-mode-with-se-py/53085049#53085049
>
> gcc -static -o pthread_self.out pthread_self.c -pthread
> build/X86/gem5.opt configs/example/se.py pthread_self.out --num-cpus
> 3 --options 2
>
>
>> Best regards.
>>
>>
>>
>> Yuan
>>
>>
>>
>> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
>> Windows 10
>>
>>
>>
>> *From: *Ciro Santilli <ciro.santi...@gmail.com>
>> *Sent: *Saturday, September 7, 2019 12:51 PM
>> *To: *yuan <syu...@ncsu.edu>; gem5 users mailing list
>> <gem5-users@gem5.org>
>> *Subject: *Re: [gem5-users] Question about muti-processor simulation on
>> se mode
>>
>>
>>
>>
>>
>>
>>
>> On Sat, Sep 7, 2019 at 5:00 PM yuan <syu...@ncsu.edu> wrote:
>>
>> Hi, Ciro Santilli,
>>
>>
>>
>> Thanks for your reply. I have added some print statement in the CPU
>> constructor to dump out the number of threads in each CPU, there are four
>> statement dumped out, I think this means that the thread has already been
>> create for each CPU. And also, in se.py, the “system.cpu[i].createThreads”
>>  is also called four times. Eventually, the stats.txt file has the info of
>> each thread for each CPU, but the statistics is all 0. To test this part, I
>> also tried on unmodified code of gem5, and the results is the same. Only
>> one CPU has statistics.
>>
>>
>>
>>
>>
>> Can you try with the following minimal C pthread program?
>> https://github.com/cirosantilli/linux-kernel-module-cheat/blob/6aa375df2ad3ce2e7d741d09b378503c25547df1/userland/posix/pthread_self.c
>>
>>
>>
>> I ran it on current master spawning 2 threads (3 in total main + 2), and
>> I see stats for CPU 1 and 2, for example:
>>
>>
>>
>> system.cpu1.Branches                              531
>>   # Number of branches fetched
>> system.cpu1.apic_clk_domain.clock                8000
>>   # Clock period in ticks
>> system.cpu1.committedInsts                       2263
>>   # Number of instructions committed
>>
>>
>>
>> Best regards.
>>
>>
>>
>> Yuan
>>
>>
>>
>> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
>> Windows 10
>>
>>
>>
>> *From: *Ciro Santilli <ciro.santi...@gmail.com>
>> *Sent: *Saturday, September 7, 2019 6:32 AM
>> *To: *gem5 users mailing list <gem5-users@gem5.org>; syu...@ncsu.edu
>> *Subject: *Re: [gem5-users] Question about muti-processor simulation on
>> se mode
>>
>>
>>
>>
>>
>>
>>
>> On Sat, Sep 7, 2019 at 1:23 AM yuan <syu...@ncsu.edu> wrote:
>>
>> Hi, all,
>>
>>
>>
>> I am trying to simulate a system with 4 cores, a test command line is as
>> follow:
>>
>> build/X86/gem5.opt configs/example/se.py -n 4 --cpu-type=DerivO3CPU
>> --mem-type=DDR4_2400_8x8 --mem-size=8GB --caches --l1d_size=64kB
>> --l1i_size=32kB --l2cache --l2_size=512kB -c
>> ../spec2006/benchspec/CPU2006/401.bzip2/exe/bzip2_base.x86 -o
>> ../spec2006/benchspec/CPU2006/401.bzip2/data/ref/input/control
>> --fast-forward=10000000 --maxinsts=100000000
>>
>>
>>
>> But eventually, when I look at the stats.txt file, I find that there is
>> only statistics for cpu0, all the statistics for other cpu, including cpu1,
>> cpu2, cpu3 are 0. And also, the private cache statistics are also 0. Does
>> anyone knows what’s wrong with this?
>>
>>
>>
>>
>>
>> Are you sure that your content spawns threads?  se.py spawns threads on
>> separate CPUs, if no threads are spawned then other CPUs have zero stats.
>>
>>
>>
>> Best regards.
>>
>>
>>
>> Shougang
>>
>>
>>
>> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
>> Windows 10
>>
>>
>>
>> _______________________________________________
>> 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

Reply via email to