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 >> - 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)[0xb05 >>> d >>> 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)[0x7efd24261c82] >>> >>> ../../tools/gem5/build/ARM/gem5.opt(_ZN15TimingSimpleCPU14suspendCon >>> t >>> e >>> xtEs+0x335)[0xfe1035] >>> >>> ../../tools/gem5/build/ARM/gem5.opt(_Z13exitGroupFuncP11SyscallDesci >>> P >>> 1 >>> 1LiveProcessP13ThreadContext+0x57)[0xb85677] >>> >>> ../../tools/gem5/build/ARM/gem5.opt(_ZN11SyscallDesc9doSyscallEiP11L >>> i >>> v >>> eProcessP13ThreadContext+0xa8)[0xb8afe8] >>> >>> ../../tools/gem5/build/ARM/gem5.opt(_ZN11LiveProcess7syscallElP13Thr >>> e >>> a >>> dContext+0x49)[0xb7bc09] >>> >>> ../../tools/gem5/build/ARM/gem5.opt(_ZN6ArmISA14SupervisorCall6invok >>> e >>> E >>> P13ThreadContextRK14RefCountingPtrI10StaticInstE+0x6a)[0xd8317a] >>> >>> ../../tools/gem5/build/ARM/gem5.opt(_ZN13BaseSimpleCPU9advancePCERKS >>> t >>> 1 0shared_ptrI9FaultBaseE+0x104)[0xfe27a4] >>> >>> ../../tools/gem5/build/ARM/gem5.opt(_ZN15TimingSimpleCPU11advanceIns >>> t E RKSt10shared_ptrI9FaultBaseE+0x39)[0xfded49] >>> >>> ../../tools/gem5/build/ARM/gem5.opt(_ZN15TimingSimpleCPU14completeIf >>> e >>> t >>> chEP6Packet+0x1d9)[0xfdf149] >>> >>> ../../tools/gem5/build/ARM/gem5.opt(_ZN10EventQueue10serviceOneEv+0x >>> b >>> 1 >>> )[0xb14a21] >>> >>> ../../tools/gem5/build/ARM/gem5.opt(_Z9doSimLoopP10EventQueue+0x50)[ >>> 0 >>> x >>> 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+0x7 >>> 8 >>> 5 >>> 2)[0x7efd25800772] >>> >>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85 >>> c >>> ) >>> [0x7efd2593705c] >>> >>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6 >>> f >>> f >>> d)[0x7efd257fff1d] >>> >>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7 >>> 1 >>> 2 >>> 4)[0x7efd25800044] >>> >>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7 >>> 1 >>> 2 >>> 4)[0x7efd25800044] >>> >>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85 >>> c >>> ) >>> [0x7efd2593705c] >>> >>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x19)[ >>> 0 >>> x >>> 7efd257f8da9] >>> >>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6 >>> 1 >>> 3 >>> b)[0x7efd257ff05b] >>> >>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85 >>> c >>> ) >>> [0x7efd2593705c] >>> >>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6 >>> f >>> f >>> d)[0x7efd257fff1d] >>> >>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85 >>> c >>> ) >>> [0x7efd2593705c] >>> >>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x19)[ >>> 0 >>> x >>> 7efd257f8da9] >>> >>> /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 >> >> _______________________________________________ >> 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 > _______________________________________________ > 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 _______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users