Hi Norbertas,

On 8/25/22 13:34, Norbertas Kremeris wrote:
Hi All,

I am trying to use the warm up and standard switch functionality as described 
in the se.py help, but most of the newer gem5 version tags that I’ve built and 
tried don’t work with these parameters.  I am trying to do this using the ARM 
architecture as follows:

/shared/gem5/build/ARM/gem5.opt /shared/gem5/configs/example/se.py 
--cmd=test_arm --caches --warmup-insts 100000 --standard-switch 100000 
--cpu-type DerivO3CPU

Below are the gem5 versions I have tried to to use:

Master(25/08/2022): “gem5 has encountered a segmentation fault!”
22.0.0.2: “gem5 has encountered a segmentation fault!”
22.0.0.1: “gem5 has encountered a segmentation fault!”
21.2.1.1: “gem5 has encountered a segmentation fault!”
21.0.0.0: Runs OK
21.0.1.0: Runs OK
20.1.0.5: Runs OK
20.0.x.x fails to build altogether.

Host system: Ubuntu 20.04, gcc 10.3.0, x86_64.
A full copy of the segmentation fault on 22.0.0.2 is available at the bottom of 
this post.


Thanks for reporting this. I have provided a fix with the following patch:


https://gem5-review.googlesource.com/c/public/gem5/+/62915


Is this a known bug on newer versions?

I believe I read somewhere before that examples/se.py is to be deprecared with 
gem5-stdlib being the way to move forward, so should I stop using se.py 
altogether and move to gem5-stdlib instead? From a quick glance, I can’t find 
any documentation on the gem5-stdlib alternatives to “-I”, “—standard-switch”, 
“—warmup-insts”, the only way to switch cpu’s seems to be adding m5 exit call 
to the workload source code and rebuilding, which I can’t do.


There's really nothing extraordinary provided by the standard-switch option. It 
is simply few lines of python code generating default cpu types and 
initializing them (it does not even perform any switching, which is set up at a 
later stage).

You can honestly take your example script and provide the same functionalities 
by copying what the option is doing. The switching doesn't require to modify 
the workload source code; you can just switch from python via the m5.switchCpus 
function by passing as an argument the list of switching cpus


Any info regarding this issue would be very appreciated – thanks in advance!

Norbert K.




Please let me know if it works


Kind Regards


Giacomo




Full gem5 segfault log:

/shared/gem5-latest/build/ARM/gem5.opt 
/shared/gem5-latest/configs/example/se.py --caches --warmup-insts 10000 
--standard-switch 4000000 --cpu-type DerivO3CPU –cmd testbin
gem5 Simulator System.  https://www.gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 22.0.0.2
gem5 compiled Aug 25 2022 18:39:04
gem5 started Aug 25 2022 20:27:42
gem5 executing on xx, pid 3220019
command line: /shared/gem5-latest/build/ARM/gem5.opt 
/shared/gem5-latest/configs/example/se.py --caches --warmup-insts 10000 
--standard-switch 4000000 --cpu-type DerivO3CPU --cmd testbin

Global frequency set at 1000000000000 ticks per second
build/ARM/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) 
does not match the address range assigned (512 Mbytes)
build/ARM/arch/arm/linux/se_workload.cc:73: warn: Unknown operating system; 
assuming Linux.
gem5 has encountered a segmentation fault!

--- BEGIN LIBC BACKTRACE ---
/shared/gem5-latest/build/ARM/gem5.opt(+0x18ca940)[0x555811af2940]
/shared/gem5-latest/build/ARM/gem5.opt(+0x18f4e45)[0x555811b1ce45]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420)[0x7f90df258420]
/shared/gem5-latest/build/ARM/gem5.opt(+0x6d64be)[0x5558108fe4be]
/shared/gem5-latest/build/ARM/gem5.opt(+0x6caad4)[0x5558108f2ad4]
/shared/gem5-latest/build/ARM/gem5.opt(+0x6c3686)[0x5558108eb686]
/shared/gem5-latest/build/ARM/gem5.opt(+0x6c5904)[0x5558108ed904]
/shared/gem5-latest/build/ARM/gem5.opt(+0x4411c4)[0x5558106691c4]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x2a8738)[0x7f90df511738]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyObject_MakeTpCall+0xab)[0x7f90df511b1b]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x2a8de0)[0x7f90df511de0]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x74d6d)[0x7f90df2ddd6d]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x7d86)[0x7f90df2e5ef6]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x8006b)[0x7f90df2e906b]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x2a8daa)[0x7f90df511daa]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x74d6d)[0x7f90df2ddd6d]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x7d86)[0x7f90df2e5ef6]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x8006b)[0x7f90df2e906b]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x2a8daa)[0x7f90df511daa]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x74d6d)[0x7f90df2ddd6d]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x7d86)[0x7f90df2e5ef6]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x8fb)[0x7f90df433e3b]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x94)[0x7f90df511114]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x74d6d)[0x7f90df2ddd6d]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x7d86)[0x7f90df2e5ef6]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x8fb)[0x7f90df433e3b]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x94)[0x7f90df511114]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x74d6d)[0x7f90df2ddd6d]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x7d86)[0x7f90df2e5ef6]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x8fb)[0x7f90df433e3b]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(PyEval_EvalCodeEx+0x42)[0x7f90df4341c2]
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0(PyEval_EvalCode+0x1f)[0x7f90df4345af]
--- END LIBC BACKTRACE ---
Segmentation fault



_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org<mailto:gem5-users@gem5.org>
To unsubscribe send an email to 
gem5-users-le...@gem5.org<mailto:gem5-users-le...@gem5.org>


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
To unsubscribe send an email to gem5-users-le...@gem5.org

Reply via email to