Hi Hoa Nguyen,

Sorry for the late reply. I pulled the develop branch and tried again,
instead of stat error, I got this:

panic: panic condition !intRequestPort.isConnected() occurred: Int port not
connected to anything!
Memory Usage: 11476436 KBytes
Program aborted at tick 0
--- BEGIN LIBC BACKTRACE ---
./build/X86/gem5.opt(_Z15print_backtracev+0x2c)[0x561d7657e35c]
./build/X86/gem5.opt(_Z12abortHandleri+0x4a)[0x561d7659155a]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x128a0)[0x7ff1febaa8a0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7ff1fc9c9f47]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7ff1fc9cb8b1]
./build/X86/gem5.opt(+0x5b8a5f)[0x561d7541ea5f]
./build/X86/gem5.opt(_ZN6X86ISA10Interrupts4initEv+0xf4)[0x561d7608d574]
./build/X86/gem5.opt(+0xcd45a6)[0x561d75b3a5a6]
./build/X86/gem5.opt(+0x6221f9)[0x561d754881f9]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(_PyCFunction_FastCallDict+0x20a)[0x7ff1fefca58a]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17bec8)[0x7ff1fef32ec8]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x4ec3)[0x7ff1fef39303]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17a803)[0x7ff1fef31803]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17c2aa)[0x7ff1fef332aa]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x4ec3)[0x7ff1fef39303]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17ba0f)[0x7ff1fef32a0f]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(PyEval_EvalCodeEx+0x3e)[0x7ff1fef334ce]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(PyEval_EvalCode+0x1b)[0x7ff1fef3424b]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x18855d)[0x7ff1fef3f55d]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(_PyCFunction_FastCallDict+0x1bb)[0x7ff1fefca53b]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17c1ec)[0x7ff1fef331ec]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x4ec3)[0x7ff1fef39303]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17ba0f)[0x7ff1fef32a0f]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17c0fc)[0x7ff1fef330fc]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x4ec3)[0x7ff1fef39303]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17ba0f)[0x7ff1fef32a0f]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(PyEval_EvalCodeEx+0x3e)[0x7ff1fef334ce]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(PyEval_EvalCode+0x1b)[0x7ff1fef3424b]
/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(PyRun_StringFlags+0x8b)[0x7ff1fef0584b]
./build/X86/gem5.opt(_Z6m5MainiPPc+0x1e7)[0x561d7658fed7]
./build/X86/gem5.opt(main+0x4b)[0x561d753f10db]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7ff1fc9acb97]
--- END LIBC BACKTRACE ---
Aborted (core dumped)

It seems to be the python API has changed in the develop branch, I'm not
sure what to change. My python config file is attached to the email.

Vào Th 6, 13 thg 11, 2020 vào lúc 13:39 Hoa Nguyen <hoangu...@ucdavis.edu>
đã viết:

> Hi Duc Anh,
>
> Can you please confirm that this change,
> https://gem5-review.googlesource.com/c/public/gem5/+/36296, fixes the
> stats error?
>
> Regards,
> Hoa Nguyen
>
> On 11/12/20, Hoa Nguyen <hoangu...@ucdavis.edu> wrote:
> > Hi Duc Anh,
> >
> > I think the stats error is related to this change,
> > https://gem5-review.googlesource.com/c/public/gem5/+/36296.
> >
> > The stats bug should be resolved when you cherry-pick that change.
> >
> > Hopefully we can add the SMT feature and fix the multicore DerivO3 bug by
> > the next release.
> >
> > Regarding the SMT feature, I don't know whether it works correctly (we
> > don't know how the actual hardware the apic id) for X86, but I remember
> > that this relation chain (
> > https://gem5-review.googlesource.com/c/public/gem5/+/35837) does work.
> >
> > Regards,
> > Hoa Nguyen
> >
> > On Thu, Nov 12, 2020, 2:39 AM Đức Anh <daut...@gmail.com> wrote:
> >
> >> Hi Hoa Nguyen,
> >>
> >> A bit sad when some features I want will only be supported from 20.2
> >> version (SMT, multicore DerivO3CPU). Do the gem5 team have any plan on
> >> when
> >> the next version will be released?
> >>
> >> About the stats error, I use the same version and cmd as the first
> email.
> >> I will retype it here for convenience.
> >> Cmd: `./build/X86/gem5.opt configs/tutorial/two_core.py`
> >> gem5 version 20.1
> >> gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
> >> python 2.7.17
> >>
> >> The error log:
> >> gem5.opt: build/X86/base/stats/group.cc:115: void
> >> Stats::Group::addStatGroup(const char*, Stats::Group*): Assertion
> >> `statGroups.find(name) == statGroups.end()' failed.
> >> Program aborted at tick 0
> >> --- BEGIN LIBC BACKTRACE ---
> >> ./build/X86/gem5.opt(_Z15print_backtracev+0x2c)[0x5565d4f4958c]
> >> ./build/X86/gem5.opt(_Z12abortHandleri+0x4a)[0x5565d4f5c0aa]
> >> /lib/x86_64-linux-gnu/libpthread.so.0(+0x128a0)[0x7f51a53c58a0]
> >> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f51a39a1f47]
> >> /lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f51a39a38b1]
> >> /lib/x86_64-linux-gnu/libc.so.6(+0x3042a)[0x7f51a399342a]
> >> /lib/x86_64-linux-gnu/libc.so.6(+0x304a2)[0x7f51a39934a2]
> >>
> >>
> ./build/X86/gem5.opt(_ZN5Stats5Group12addStatGroupEPKcPS0_+0x16f)[0x5565d526a44f]
> >> ./build/X86/gem5.opt(_ZN5Stats5GroupC2EPS0_PKc+0xe8)[0x5565d526a908]
> >>
> >>
> ./build/X86/gem5.opt(_ZN11ThreadState16ThreadStateStatsC2EP7BaseCPUPS_+0x65)[0x5565d5335fc5]
> >>
> >>
> ./build/X86/gem5.opt(_ZN11ThreadStateC1EP7BaseCPUsP7Process+0x44)[0x5565d5336324]
> >>
> >>
> ./build/X86/gem5.opt(_ZN13O3ThreadStateI9O3CPUImplEC2EP9FullO3CPUIS0_EiP7Process+0x2f)[0x5565d515ed7f]
> >>
> >>
> ./build/X86/gem5.opt(_ZN9FullO3CPUI9O3CPUImplEC1EP16DerivO3CPUParams+0x1a48)[0x5565d516d0d8]
> >>
> ./build/X86/gem5.opt(_ZN16DerivO3CPUParams6createEv+0x44)[0x5565d5137f94]
> >> ./build/X86/gem5.opt(+0xda6583)[0x5565d55bc583]
> >> ./build/X86/gem5.opt(+0x6ac8b9)[0x5565d4ec28b9]
> >>
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(_PyCFunction_FastCallDict+0x20a)[0x7f51a57e558a]
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17bec8)[0x7f51a574dec8]
> >>
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x4ec3)[0x7f51a5754303]
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17a803)[0x7f51a574c803]
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17c2be)[0x7f51a574e2be]
> >>
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x4ec3)[0x7f51a5754303]
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17a803)[0x7f51a574c803]
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17c2be)[0x7f51a574e2be]
> >>
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x4ec3)[0x7f51a5754303]
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17a803)[0x7f51a574c803]
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17c2aa)[0x7f51a574e2aa]
> >>
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x4ec3)[0x7f51a5754303]
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x17ba0f)[0x7f51a574da0f]
> >>
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(PyEval_EvalCodeEx+0x3e)[0x7f51a574e4ce]
> >>
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(PyEval_EvalCode+0x1b)[0x7f51a574f24b]
> >>
> /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0(+0x18855d)[0x7f51a575a55d]
> >> --- END LIBC BACKTRACE ---
> >> Aborted (core dumped)
> >>
> >> Best regards,
> >> Duc Anh
> >>
> >> Vào Th 4, 11 thg 11, 2020 vào lúc 23:32 Hoa Nguyen <
> >> hoangu...@ucdavis.edu> đã viết:
> >>
> >>> Hi Duc Anh,
> >>>
> >>> I assume you want to enable SMT for X86. SMT for X86 has yet to be
> >>> supported, but there is progress on this recently. You can keep track
> >>> of the development via JIRA ticket
> >>> (https://gem5.atlassian.net/browse/GEM5-332) and via this relation
> >>> change (https://gem5-review.googlesource.com/c/public/gem5/+/35837).
> >>>
> >>> Regarding the stats error, can you be a little bit more specific about
> >>> the version of gem5 that you're using and the command that you used?
> >>> Are they the same as the ones in the first email
> >>> (https://www.mail-archive.com/gem5-users@gem5.org/msg18678.html)?
> >>>
> >>> Regards,
> >>> Hoa Nguyen
> >>>
> >>> On 11/10/20, Đức Anh via gem5-users <gem5-users@gem5.org> wrote:
> >>> > Hi Ayaz,
> >>> >
> >>> > Thanks for the help. I guess if we don't share anything between the
> >>> cores
> >>> > then it will be the multi-processor platform, right? Btw, how to
> >>> > enable
> >>> > SMT? I looked through the se.py then look like you only need to use
> >>> > DerivO3CPU and just pass an array of the process in. However, I got
> >>> > this
> >>> > error
> >>> > `gem5.opt: build/X86/base/stats/group.cc:115: void
> >>> > Stats::Group::addStatGroup(const char*, Stats::Group*): Assertion
> >>> > `statGroups.find(name) == statGroups.end()' failed.`
> >>> > What is the correct way to do this?
> >>> >
> >>> > Best regards,
> >>> > Duc Anh
> >>> >
> >>> > Vào Th 3, 10 thg 11, 2020 vào lúc 00:01 Ayaz Akram <
> >>> yazak...@ucdavis.edu>
> >>> > đã viết:
> >>> >
> >>> >> Hi Duc,
> >>> >>
> >>> >> By passing  a list of CPUs to the system.cpu (as in the attached
> >>> >> Python
> >>> >> script), you are creating a multicore CPU (CPU here refers to a
> >>> >> core).
> >>> >> Secondly, if your CPU has SMT enabled, you should be able to pass
> >>> >> multiple
> >>> >> processes to the workload option.
> >>> >>
> >>> >> Btw, there is already a JIRA issue created for the problem you are
> >>> >> running
> >>> >> into: https://gem5.atlassian.net/browse/GEM5-803
> >>> >>
> >>> >> -Ayaz
> >>> >>
> >>> >> On Mon, Nov 9, 2020 at 2:18 AM Đức Anh via gem5-users
> >>> >> <gem5-users@gem5.org>
> >>> >> wrote:
> >>> >>
> >>> >>> Hello all,
> >>> >>>
> >>> >>> I am trying to create a system having multiple CPUs by passing a
> >>> >>> list
> >>> of
> >>> >>> CPU to the system.cpu. So far it works with TimingSimpleCPU, but
> for
> >>> the
> >>> >>> DerivO3CPU it crashes. I include the crash log, the python config
> >>> file,
> >>> >>> and
> >>> >>> the C workload file. I am using gem5 20.1, pulled from the stable
> >>> >>> branch, gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04), python
> >>> 2.7.17.
> >>> >>> The
> >>> >>> command line I use is:
> >>> >>> ./build/X86/gem5.opt configs/tutorial/two_core.py
> >>> >>> The 2 binary files for 2 workloads are almost the same, I just
> >>> >>> change
> >>> >>> the
> >>> >>> text in printf, and the number of loops.
> >>> >>>
> >>> >>> I also wonder that by passing a list of CPU to the system.cpu, am I
> >>> >>> creating a system is 1 multicore CPU or a system with multiple
> >>> separate
> >>> >>> CPU? And how to pass multiple workloads on 1 CPU? I saw it accept a
> >>> >>> list,
> >>> >>> but it throws an error if I pass a list with more than 1 workload.
> >>> >>>
> >>> >>> Best regards,
> >>> >>> Duc Anh
> >>> >>> _______________________________________________
> >>> >>> gem5-users mailing list -- gem5-users@gem5.org
> >>> >>> To unsubscribe send an email to gem5-users-le...@gem5.org
> >>> >>> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
> >>> >>
> >>> >>
> >>> >
> >>>
> >>
> >
>
from collections import namedtuple
import m5
from m5.objects import *
from caches import *

option = namedtuple('option', ('l1i_size', 'l1d_size', 'l2_size'))('128MB', '128MB', '512MB')

def createCPU(l2bus, membus):
    # create the CPU
    cpu = DerivO3CPU(numThreads = 2)

    # create L1 cache
    cpu.icache = L1ICache(option)
    cpu.dcache = L1DCache(option)

    cpu.icache.connectCPU(cpu)
    cpu.dcache.connectCPU(cpu)

    # connect to shared cache level 2 bus
    cpu.icache.connectBus(l2bus)
    cpu.dcache.connectBus(l2bus)

    # create and connect interrupt port
    cpu.createInterruptController()
    cpu.interrupts[0].pio = membus.mem_side_ports
    cpu.interrupts[0].int_requestor = membus.cpu_side_ports
    cpu.interrupts[0].int_responder = membus.mem_side_ports

    return cpu

def createProcess(pid, cmd):
    process = Process(pid = pid)
    process.cmd = cmd

    return process

# The System object, root of all other component
system = System()

# Enable SMT
system.multi_thread = True

# set up the clock and the voltage
# It seems like the frequency is the same for all cpu
system.clk_domain = SrcClockDomain()
system.clk_domain.clock = '1GHz'
system.clk_domain.voltage_domain = VoltageDomain()

# setup memory simulation
system.mem_mode = 'timing'
system.mem_ranges = [AddrRange('8GB')]

# create L2 bus
system.l2bus = L2XBar()

# create the system wide bus
system.membus = SystemXBar()

# create 2 cpus
# system.cpu = [createCPU(system.l2bus, system.membus), createCPU(system.l2bus, system.membus)]
system.cpu = [createCPU(system.l2bus, system.membus)]

# create L2 Cache
system.l2cache = L2Cache(option)
system.l2cache.connectCPUSideBus(system.l2bus)
system.l2cache.connectMemSideBus(system.membus)

system.system_port = system.membus.cpu_side_ports

# Create a DDR3 memory controller and connect it to the membus
system.mem_ctrl = MemCtrl()
system.mem_ctrl.dram = DDR3_1600_8x8()
system.mem_ctrl.dram.range = system.mem_ranges[0]
system.mem_ctrl.port = system.membus.mem_side_ports

# create the process workload for the cpu
system.cpu[0].workload = [createProcess(100, ['tests/test-progs/hello/bin/hello']), createProcess(200, ['tests/test-progs/hello/bin/x86/linux/hello'])]
system.cpu[0].createThreads()

# # create the process workload for the cpu
# system.cpu[1].workload = [createProcess(200, ['tests/test-progs/hello/bin/x86/linux/hello'])]
# system.cpu[1].createThreads()

# create the root and start the system
root = Root(full_system = False, system = system)
m5.instantiate()

print("Beginning simulation")
exit_event = m5.simulate()

print('Exiting @ tick {} because {}'.format(m5.curTick(), exit_event.getCause()))
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to