Coder Social home page Coder Social logo

Comments (8)

i7mist avatar i7mist commented on August 25, 2024

I'll look into this issue. Could you tell me what OS you are using?

from ramulator.

Mappouras avatar Mappouras commented on August 25, 2024

Linux 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

from ramulator.

i7mist avatar i7mist commented on August 25, 2024

Hi, I figure that it is because ramulator requires clang or gcc-5 to compile, which will add -fomit-frame-pointer when -O3 is enabled. mcount unable to keep track of the calling graph when frame pointer is not available so the program crashes.

a workaround is to add '-fno-omit-frame-pointer' to both CCFLAGS and CXXFLAGS

from ramulator.

Mappouras avatar Mappouras commented on August 25, 2024

Thanks for your response i7mist. I tried that solution but it did not help. I still get the same warnings/errors that lead to a segmentation fault :(

from ramulator.

i7mist avatar i7mist commented on August 25, 2024

I think it's not those warnings that lead to a segmentation fault. Those warnings are because some variables are not used when assert and debug print are not compiled (like in gem5.prof)

Could you give me more information? How did you add those flags and where did the segfault happen exactly? (can you use gdb to see the backtrace when the program crashes?) Besides, I suggest you set Werror=False in src/SConscript instead of removing Wall, so that you can still know what warning exists in your code. If all of them are about unused variable then just ignore them is fine.

from ramulator.

Mappouras avatar Mappouras commented on August 25, 2024

The problem is that I dont have direct access to the machine I am working on and gdb is not installed. I will ask the supervisor to install it for me but that may take a while.

All the warnings I get are the ones I mentioned above. I got them with the exact way you just described.

I just tried to remove the -O3 flags to disable any optimizations and the problem seems to be resolved (I can run the hello world test...). However I am worried that the full system simulation will take for ever with out the optimizations.

The flags you mentioned I inserted them in the /path/to/gem5/SConstruct in lines 545 and 557 as follow
line 545: main.Append(CCFLAGS=['-fno-strict-aliasing','-fno-omit-frame-pointer'])
line 557: main.Append(CXXFLAGS=['-std=c++11', '-stdlib=libstdc++','-fno-omit-frame-pointer'])

from ramulator.

i7mist avatar i7mist commented on August 25, 2024

If you only worried about simulation speed, I think remove -pg can also solve this problem and you can remain -O3... gem5.perf and gem5.fast are compiled with -O3 without -pg

The way you added these flags seems to be correct... I don't have other ideas about what's happening temporarily... Another suggestion for you to test whether these flags will work is to write a very simple c++ program and compile it with clang++ -pg -O3 and clang++ -pg -O3 -fno-omit-frame-pointer respectively. See whether the former will cause a segfault and whether the latter will resolve it.

from ramulator.

Mappouras avatar Mappouras commented on August 25, 2024

Apparently I was not using the latest patch version for gem5. The latest updates (01/23/2016) seem to not have this issue

from ramulator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.