Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpgpusim : Aborted (core dumped) When run gpgpusim_simulation. #73

Open
libingict opened this issue May 25, 2018 · 10 comments
Open

gpgpusim : Aborted (core dumped) When run gpgpusim_simulation. #73

libingict opened this issue May 25, 2018 · 10 comments

Comments

@libingict
Copy link

I was trying to run the gpgpu-sim_simulation.

When I was trying to run the benmark ibackprop, the following error pops:

terminate called after throwing an instance of 'std::ios_base::failure[abi:cxx11]'
  what():  basic_ios::clear: iostream error
Aborted (core dumped)

The command I use is following:

/root/gpgpusim-dev/gpgpu-sim_distribution/gpgpu-sim_simulations/util/job_launching/../../benchmarks/bin/4.2/release/backprop-rodinia-2.0-ft 4096 ./data/result-4096.txt

The following are my work environment:

echo $GPGPUSIM_CONFIG

> gcc-4.5.3/cuda-4020/release

echo $GPGPUSIM_ROOT

> /root/gpgpusim-dev/gpgpu-sim_distribution

My cuda version is cudnn 4.2.

nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2012 NVIDIA Corporation
Built on Thu_Apr__5_00:24:31_PDT_2012
Cuda compilation tools, release 4.2, V0.2.1221

Is the error due to my cuda version? Is there anyone know how to fix this issue?

@rohitsakala
Copy link

I am also facing the same error. Any update ?

@tgrogers
Copy link
Collaborator

tgrogers commented Jul 16, 2018 via email

@libingict
Copy link
Author

Hi, @tgrogers

Thanks for your caring. I was using the ubuntu 16 in a docker container and did not try other workloads.
Now I am using gpgpusim on ubuntu 14. I directly downloaded rodinia_2.0.1 from the website and recompiled the benchmark suites.
Then gpgpusim can run and no error occurs.

Here is the OS version:
Distributor ID: Ubuntu Description: Ubuntu 14.04 LTS Release: 14.04 Codename: trusty
The cuda toolkit version
nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2011 NVIDIA Corporation Built on Thu_May_12_11:09:45_PDT_2011 Cuda compilation tools, release 4.0, V0.2.1221
The gcc version
gcc version 4.4.7 (Ubuntu/Linaro 4.4.7-8ubuntu1)
Hope my feedback will be helpful.
Thanks again.

@bfeinberg
Copy link

This likely comes from the change in the string ABI around c++11 discussed here: https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html.

Ubuntu 16.04's c++ standard lib uses the dual ABI but g++ 4.x doesn't know about it you see the crash above. If you attach a debugger you'll see that it occurs in the option_parser and so is completely workload independent.

Luckily the fix is relatively simple. Build gpgpu-sim using g++ 5.x (I've used 5.4 successfully) when using Ubuntu 16.04. This can create a bit of annoyance when working with CUDA 4.0 as 5.4 is above the max version nvcc will allow but you can switch gcc/g++ versions when compiling applications back to 4.x.

@rdevans0
Copy link

Can confirm that I also ran into this issue attempting to compile with gcc-4.8 on Ubuntu 16.04. Solution was to compile with the built in gcc-5.4.0.

@shenjiangqiu
Copy link

Should we add some #if macro to judge the GCC version in OptionParse.cc? That problem may make a lot of trouble the guys new to GPGPUSIM( as to me before)

@HUSTzhaowei
Copy link

Hello guys,I have the same question and I cannot build GPGPUsim successfully with GCC 5.4.0. Is there anyone know how to fix this issue? Thanks!

@shenjiangqiu
Copy link

shenjiangqiu commented Oct 9, 2019 via email

@jayresearch
Copy link

Here is how i have resolved this issue in:
Ubuntu 16.04
built the simulator using
gcc-5.4/g++-5.4
and compiled cuda code using gcc-4.4
The suggestion by bfeinberg worked for me.
I have to resolve the following additional compilation errors:
in file: instructions.cc
replaced: #include<math.h> with #include
replaced: isnan with std::isnan (also in file cuda-math.cc)

Added .str() in the following lines in file cuda_runtime_api.cc
std::cout << "Failed to execute: " << cmd.str() << std::endl;
std::cout << "Trying to parse " << libcodfn.str() << std::endl;
The above error was due to ostream and stringstream mismatch.

best!

@lucmann
Copy link

lucmann commented Mar 29, 2020

@jayresearch I wonder if you still encountered the std::stringstream problems with GCC version < 5 to build the simulator. In fact when I ran make with GCC version 9.2.1, those two std::stringstream object missing .str() issues occurred. It doesn't seem to be the same with the issue libingict posted here, does it? But I really wonder how others get it passed through.

P.S. my OS version Ubuntu 19.10, arch x86_64, cuda 4.2.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants