Sorry for being so stubborn Hoa, should I try to compile openmp statically or not, cause when I compile dynamically I get the "Someone allocated physical memory..."error, while the "syscall not implemented" appears when I use the statically built one. I tried redirecting the /proc directory since it is a kernel call for the statically built binary, but im not sure if i'm doing it correctly.
I tried to use FS simulation but my machine takes like 1hr to boot up, and am in kind of a hurry. Also the results I get in FS, i can't make sanse of. And yes, I think (not sure) that the syscall is important for my duty is to study how multithreading improves an specific algorithm. Any pointers would be truly apreciated, Felipe On 4/29/22, Hoa Nguyen <hoangu...@ucdavis.edu> wrote: > Hi Felipe, > > gem5 does not have that system call implemented. > > I just realized that you are using openmp, which should not be built > statically. > > There are a few options, > 1. You can modify system.redirect_paths to add RedirectPath objects. You > can get a few examples by doing grep for RedirectPath in configs/. > If you're using configs/example/se.py, you can use --redirects > /lib=/usr/lib/somepath. However, I'm not sure if it's working. > 2. You can do full system simulation. gem5-resources is a good resource for > this. https://www.gem5.org/documentation/general_docs/gem5_resources/ > 3. If that syscall is not important for your application, then you can tell > gem5 not to fail for that specific syscall. You can do that check in this > function > https://gem5.googlesource.com/public/gem5/+/refs/heads/stable/src/sim/syscall_emul.cc#65 > > Regards, > Hoa Nguyen > > On Fri, Apr 29, 2022 at 4:24 PM Felipe Vega <felipe.veg...@ug.uchile.cl> > wrote: > >> Hi Hoa, >> Using the -static flag results in an output warning of: Using 'dlopen' >> in statically linked applications requires the shared libraries from >> the glibc version used for linking. Then on simulation: "fatal: >> syscall sched_getaffinity (#123) unimplemented". >> >> On 4/29/22, Hoa Nguyen <hoangu...@ucdavis.edu> wrote: >> > Hi, >> > >> > If it is an option in your case, you can compile the workload >> > statically >> by >> > adding "--static" to the gcc command. >> > >> > Regards, >> > Hoa Nguyen >> > >> > On Fri, Apr 29, 2022, 15:50 Felipe Vega <felipe.veg...@ug.uchile.cl> >> wrote: >> > >> >> Hi Boris, >> >> >> >> sorry I forgot some details: >> >> >> >> $ riscv64-unknown-elf-gcc helloworld.c -o binario.riscv ---> compiles >> and >> >> run. >> >> The thing the helloworld I use includes "#include<omp.h>" because my >> >> true workload needs this library. >> >> $ riscv64-unknown-elf-gcc helloworld.c -fopenmp -o binario.riscv ---> >> >> won't compile >> >> $ riscv64-unknown-linux-gnu-gcc helloworld.c -fopenmp -o binario.riscv >> >> ---> compiles >> >> if no interp-dir present ---> complains "failed to open >> >> /lib/ld-linux-riscv64-lpd64d.so.1" >> >> with interp-dir ---> complains "Someone allocated physical memory >> >> ..." >> >> >> >> >> >> The output of file is: >> >> binario.riscv: ELF 64-bit LSB executable, UCB RISC-V, RVC, >> >> double-float ABI, version 1 (SYSV), dynamically linked, interpreter >> >> /lib/ld-linux-riscv64-lp64d.so.1, for GNU/Linux 4.15.0, with >> >> debug_info, not stripped >> >> >> >> I'm not shure what flags for objdump would be helpful and I don't want >> >> to clutter this message. Please let me know if you need it. >> >> >> >> Thanks for answering, >> >> Felipe >> >> >> >> On 4/29/22, Boris Shingarov <shinga...@labware.com> wrote: >> >> > Felipe, >> >> > >> >> > What do `file` and `riscv-linux-gnu-objdump` (or whatever your >> >> > cross-toolchain calls objdump) say about `binario.riscv`? I don't >> know >> >> > where that "--interp-dir sysroot" in your output came from, but it >> >> > smells like we are dealing with dynamic-ELF here and I suggest you >> >> > start >> >> > from the much simpler static-ELF first. What happens if you invoke >> gcc >> >> > manually with something like >> >> > >> >> > riscv-linux-gnu-gcc -o binario.riscv helloworld.c >> >> > >> >> > does that work? >> >> > >> >> > Regards, >> >> > >> >> > Boris >> >> > >> >> > On 4/29/22 02:12, Felipe Vega wrote: >> >> >> Hi, >> >> >> >> >> >> I know it might be a basic question, and I've seen it asked in >> similar >> >> >> form but can't find (understand, really) the answer. I'm trying to >> run >> >> >> a simple program in SE mode using the GNU cross compiler toolchain. >> >> >> When i run it i get the following output: >> >> >> >> >> >> ------------------------------------------------------------------------------------------- >> >> >> gem5 version 21.2.1.0 >> >> >> gem5 compiled Apr 23 2022 01:10:08 >> >> >> gem5 started Apr 29 2022 01:34:49 >> >> >> gem5 executing on fvAIO, pid 32017 >> >> >> command line: build/RISCV/gem5.opt configs/example/se.py >> >> >> --interp-dir >> >> >> /opt/riscv/sysroot/ --cmd ../../versionC/c/binario.riscv >> >> >> >> >> >> Setting the interpreter path to: /opt/riscv/sysroot/ >> >> >> For dynamically linked applications you might still need to setup >> >> >> the >> >> >> --redirects so that libraries are found >> >> >> >> >> >> Global frequency set at 1000000000000 ticks per second >> >> >> warn: No dot file generated. Please install pydot to generate the >> >> >> dot >> >> >> file and pdf. >> >> >> build/RISCV/mem/mem_interface.cc:791: warn: DRAM device capacity >> (8192 >> >> >> Mbytes) does not match the address range assigned (512 Mbytes) >> >> >> 0: system.remote_gdb: listening for remote gdb on port 7000 >> >> >> **** REAL SIMULATION **** >> >> >> build/RISCV/sim/simulate.cc:194: info: Entering event queue @ 0. >> >> >> Starting simulation... >> >> >> build/RISCV/sim/mem_state.cc:443: info: Increasing stack size by >> >> >> one >> >> >> page. >> >> >> build/RISCV/sim/mem_state.cc:99: panic: Someone allocated physical >> >> >> memory at VA 0x4000000000000000 without creating a VMA! >> >> >> >> ----------------------------------------------------------------------- >> >> >> >> >> >> I get this output even when I use a "Hello World" program. >> >> >> Browsing on the project folders I found examples of compilation for >> >> >> x86 using docker, so I tried to run it using gcc and the Makefile >> >> >> found in the project, and again the gcc (v 11.2.0) doesn't work but >> >> >> the docker version does. >> >> >> >> >> >> Is this the issue, do I have to compile the RISCV version using a >> >> >> similar method, in which case how can I do that? Am I missing >> >> >> something obvious? Sorry if its too RTFM but I really don't >> >> >> understand? >> >> >> _______________________________________________ >> >> >> gem5-users mailing list -- gem5-users@gem5.org >> >> >> To unsubscribe send an email to gem5-users-le...@gem5.org >> >> > >> >> _______________________________________________ >> >> gem5-users mailing list -- gem5-users@gem5.org >> >> To unsubscribe send an email to gem5-users-le...@gem5.org >> >> >> > >> _______________________________________________ >> gem5-users mailing list -- gem5-users@gem5.org >> To unsubscribe send an email to gem5-users-le...@gem5.org >> > _______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org