[gem5-users] To add branch prediction in timing simple cpu

2022-06-23 Thread Jeena Samuel
Hi,
Did anyone know how to add branch prediction in TimingSimpleCPU. The branch
prediction is defined in the base.cc but I don't know how to connect it
with the TimingSimpleCPU. Please help me with this.

Thank you
Jeena Samuel
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: O3CPU "panic: Is stalled should have been cleared by stalling load!" when simulating for >5Billion insts, SE and FS, AARCH64

2022-06-23 Thread Jason Lowe-Power
Hi Norbert,

This is going to be a tough bug to track down! I would suggest enabling the
Exec debug flag (and maybe some others for the O3CPU) and using
--debug-start and starting the debug dumping a billion ticks or so before
the error happens. Hopefully, you can then trace back what is causing the
error. My bet is that there is some specific sequence of instructions which
is causing this.

This isn't an error I've seen before, so it's going to take some digging :).

Cheers,
Jason

On Thu, Jun 23, 2022 at 5:52 AM Norbertas Kremeris <
norbertas.kreme...@huawei.com> wrote:

> Hello all,
>
>
>
> I’m looking for some help regarding failing simulations. My host system is
> running Ubuntu 20.04 x86, and the gem5 source version is v21.2.1.1
>
>
>
> I have started running long simulations, and ran into a problem with the
> O3CPU model. I seem to have no issues running up to around 5 Billion
> instructions, some binaries up to 10 Billion, but not a single binary up to
> 20Billion, because the O3CPU model terminates the gem5 simulations with the
> following error:
>
>
>
> build/ARM/cpu/o3/lsq_unit.cc:1018: panic: Is stalled should have been
> cleared by stalling load!
>
>
>
> This happens both in full system and in syscall emulation. I am using
> aarch64. This does not happen with atomic or timing cpu variants.
>
>
>
> I am trying to run a select number of spec2017 benchmarks, namely
>
> 507.cactuBSSN_r, 607.cactuBSSN_s, 638.imagick_s, 500.perlbench_r_param3,
> 502.gcc_r_param4, 641.leela_s
>
>
>
> Out of all of the above benchmarks, all successfully run up to 5B, image
> magic is the only one that runs up to 10B, and none of them run up to 20B
> instructions, and this is the same case for both FS and SE simulations.
>
>
>
> The O3 model code in question is in src/cpu/o3/lsq_unit.cc, but I don’t
> know enough to try and debug this issue:
>
>
>
> 1014 // I don't think this can happen.  It should have been cleared
>
> 1015 // by the stalling load.
>
> 1016 if (isStalled() &&
>
> 1017 storeQueue.back().instruction()->seqNum ==
> stallingStoreIsn) {
>
> 1018 panic("Is stalled should have been cleared by stalling
> load!\n");
>
> 1019 stalled = false;
>
> 1020 stallingStoreIsn = 0;
>
> 1021 }
>
>
>
> Below are the details of some example simulation runs that fail, alongside
> the full stderr output.
>
>
>
> Aarch64 Full System (restoring from checkpoint made with atomic cpu):
>
> Config: configs/example/fs.py
>
> System args:
>
>--mem-size="8000MB" \
>
> --cpu-type="O3CPU" \
>
> --restore-with-cpu="O3CPU" \
>
> --caches \
>
> --l2cache \
>
> -I="100" \
>
>
>
> Error:
>
> build/ARM/cpu/o3/lsq_unit.cc:1018: panic: Is stalled should have been
> cleared by stalling load!
>
> Memory Usage: 8979848 KBytes
>
> Program aborted at tick 5929446216500
>
> --- BEGIN LIBC BACKTRACE ---
>
>
> /work/a00558011/gem5-internal/build/ARM/gem5.fast(+0x1a94570)[0x55a0cd625570]
>
>
> /work/a00558011/gem5-internal/build/ARM/gem5.fast(+0x1aa8f4e)[0x55a0cd639f4e]
>
> /lib/x86_64-linux-gnu/libpthread.so.0(+0x143c0)[0x7f70b6d913c0]
>
> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f70b5f3703b]
>
> /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f70b5f16859]
>
>
> /work/a00558011/gem5-internal/build/ARM/gem5.fast(+0x576a35)[0x55a0cc107a35]
>
>
> /work/a00558011/gem5-internal/build/ARM/gem5.fast(+0xb2c153)[0x55a0cc6bd153]
>
>
> /work/a00558011/gem5-internal/build/ARM/gem5.fast(+0xb0dd36)[0x55a0cc69ed36]
>
>
> /work/a00558011/gem5-internal/build/ARM/gem5.fast(+0xb0eaa3)[0x55a0cc69faa3]
>
>
> /work/a00558011/gem5-internal/build/ARM/gem5.fast(+0xb0ffbe)[0x55a0cc6a0fbe]
>
>
> /work/a00558011/gem5-internal/build/ARM/gem5.fast(+0xaedc7f)[0x55a0cc67ec7f]
>
>
> /work/a00558011/gem5-internal/build/ARM/gem5.fast(+0x1a9ca68)[0x55a0cd62da68]
>
>
> /work/a00558011/gem5-internal/build/ARM/gem5.fast(+0x1abf564)[0x55a0cd650564]
>
>
> /work/a00558011/gem5-internal/build/ARM/gem5.fast(+0x1ac022e)[0x55a0cd65122e]
>
>
> /work/a00558011/gem5-internal/build/ARM/gem5.fast(+0xb92c22)[0x55a0cc723c22]
>
>
> /work/a00558011/gem5-internal/build/ARM/gem5.fast(+0xa6a1cd)[0x55a0cc5fb1cd]
>
> /lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x2a8738)[0x7f70b7048738]
>
>
> /lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x8dd8)[0x7f70b6e1df48]
>
>
> /lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x8fb)[0x7f70b6f6ae3b]
>
>
> /lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x94)[0x7f70b7048114]
>
> /lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x74d6d)[0x7f70b6e14d6d]
>
>
> /lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x7d86)[0x7f70b6e1cef6]
>
> /lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x8006b)[0x7f70b6e2006b]
>
> /lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x74d6d)[0x7f70b6e14d6d]
>
>
> /lib/x86_64-linux-gnu/libpython3.8.s

[gem5-users] Re: _pid 100 is already used: Error gem5 - running benchmark

2022-06-23 Thread Jason Lowe-Power
Hi Syam,

The error is that in *SE mode* you have to manually specify the PID for
each process when you are creating the processes in Python. However, I
think you're going to run into many problems trying to simulate such a
large system/workload in SE mode. For instance, I seriously doubt 3GB is
enough RAM for 64 copies of namd.

We are working towards deprecating se/fs.py because they do not support the
flexibility required for different kinds of simulations. I would suggest
looking into extending the standard library with a new board to model your
system. Right now, we don't have any prebuilt boards at this scale, but
adding one is relatively straightforward. You can find documentation on the
standard library on the website, in our recent ISCA tutorial (see our
youtube channel), and we'll have more in a couple of weeks.

Cheers,
Jason

On Thu, Jun 23, 2022 at 9:01 AM Syam Sankar  wrote:

> Hi all
>
>
> I downloaded a new version of gem5 repo*(gem5 version 22.0.0.1)*
> I could build it with the following command:
>
> *python3 `which scons` build/X86/gem5.fast RUBY=true
> PROTOCOL=MESI_Two_Level  -j 8*
>
> I was trying to execute a *CPU2017 Benchmark* program on an 8X8 Core
> system with the command as follows:
>
>
> build/X86/gem5.fast configs/example/se.py  --num-cpus=64 --num-dirs=64
>  --sys-clock=2GHz --topology=Mesh_XY --mesh-rows=8 --ruby --num-l2caches=64
> --network=garnet   --caches --mem-type=DDR3_1600_8x8 --mem-size=3GB
>  --routing-algorithm=1 -F 1000 -W 1000 -I 5000
> --bench=namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd
>
>
>  But, the execution is ended with an error:
>
>
> *build/X86/sim/process.cc:141: fatal: fatal condition !ret_pair.second
> occurred: _pid 100 is already used*
>
> ...
> ..
> ..
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (64 Mbytes)
> build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
> Mbytes) does not match the address range assigned (

[gem5-users] _pid 100 is already used: Error gem5 - running benchmark

2022-06-23 Thread Syam Sankar
Hi all


I downloaded a new version of gem5 repo*(gem5 version 22.0.0.1)*
I could build it with the following command:

*python3 `which scons` build/X86/gem5.fast RUBY=true
PROTOCOL=MESI_Two_Level  -j 8*

I was trying to execute a *CPU2017 Benchmark* program on an 8X8 Core system
with the command as follows:


build/X86/gem5.fast configs/example/se.py  --num-cpus=64 --num-dirs=64
 --sys-clock=2GHz --topology=Mesh_XY --mesh-rows=8 --ruby --num-l2caches=64
--network=garnet   --caches --mem-type=DDR3_1600_8x8 --mem-size=3GB
 --routing-algorithm=1 -F 1000 -W 1000 -I 5000
--bench=namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd-namd


 But, the execution is ended with an error:


*build/X86/sim/process.cc:141: fatal: fatal condition !ret_pair.second
occurred: _pid 100 is already used*

...
..
..
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
build/X86/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (64 Mbytes)
*build/X86/sim/process.cc:141: fatal: fatal condition !ret_pair.second
occurred: _pid 100 is already used*
Memory Usage: 3393456 KBytes

*My machine:* *Ubuntu 20.04.4 LTS, [11th Gen Intel® Core™ i5-1135G7 @
2.40GHz × 8]*


Please help to solve this issue

Regards
Syam

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