gpgpu-sim / gpgpu-sim_distribution

GPGPU-Sim provides a detailed simulation model of contemporary NVIDIA GPUs running CUDA and/or OpenCL workloads. It includes support for features such as TensorCores and CUDA Dynamic Parallelism as well as a performance visualization tool, AerialVisoin, and an integrated energy model, GPUWattch.
Other
1.07k stars 500 forks source link

dev branch builds but gpgpusim does not run #82

Open ayusha93 opened 5 years ago

ayusha93 commented 5 years ago

I'm trying to run some simulations on gpgpu-sim. I'm using the dev branch that supports some of the newer CUDA versions. The build succeeds but when I try to run a program, the CUDA calls go to the system installation of CUDA instead of GPGPU-Sim. No errors or warnings are thrown. I have copied config files to the folder where I run the program from. No modifications were made to the config files from the tested_configs folder.

I'm using nvidia-docker (nvidia/cuda:9.1-devel) and have installed all the dependencies. Environment setup and build are successful.

My $PATH is /root/gpgpu-sim_distribution/bin/:usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin My $CUDA_INSTALL_PATH is /usr/local/cuda

Any help would be highly appreciated

skoppula commented 5 years ago

I'm getting a similar issue!

tgrogers commented 5 years ago

This is likely because your application binaries are statically linking the system cuda libcudart.so file and not attempting to dynamically link gpgpusim's libcudart.so. From the readme:

Step 3: Run

Before we run, we need to make sure the application's executable file is dynamically linked to CUDA runtime library. This can be done during compilation of your program by introducing the nvcc flag "--cudart shared" in makefile (quotes should be excluded).

To confirm the same, type the follwoing command:

ldd

You should see that your application is using libcudart.so file in GPGPUSim directory.

On Tue, Nov 20, 2018 at 3:50 PM Skanda Koppula notifications@github.com wrote:

I'm getting a similar issue!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gpgpu-sim/gpgpu-sim_distribution/issues/82#issuecomment-440424817, or mute the thread https://github.com/notifications/unsubscribe-auth/AD9McR7YWvbOEgFzcVyORrTzKR59laghks5uxGsfgaJpZM4YXaaL .

-- Tim Rogers Assistant Professor Purdue University https://engineering.purdue.edu/tgrogers

skoppula commented 5 years ago

Thanks for the reply. When I check ldd <application>, I do see that libcudart.so.9 is pointing to the GPGPUSim cuda9000/release/ directory, as expected.

When I use CUDA8, this problem does not occur, so using that as a temporary workaround for now.

tgrogers commented 5 years ago

This is possibly just a 9.0 issue. Have you tried 9.1?

Sent from my iPhone

On Nov 21, 2018, at 10:00, Skanda Koppula notifications@github.com wrote:

Thanks for the reply. When I check ldd , I see that libcudart.so.9 is pointing to the GPGPUSim cuda9000/release/ directory, as expected.

When I use CUDA8, this problem does not occur, so using that as a temporary workaround for now.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

ayusha1993 commented 5 years ago

Thanks. It works with 9.1. Recompiling with "--cudart shared" solved the issue for me

chenglimin commented 5 years ago

will the dev branch not work with cuda-9.0? I encountered "libcudart.so.9.0: version `libcudart.so.9.0' not found (required by ./CN)",but the libcudart.so.9.0 really exist in the LD_LIBRARY_PATH that I have set.Do I need to install CUDA-9.1 to make the dev branch work?

brad-mengchi commented 5 years ago

will the dev branch not work with cuda-9.0? I encountered "libcudart.so.9.0: version `libcudart.so.9.0' not found (required by ./CN)",but the libcudart.so.9.0 really exist in the LD_LIBRARY_PATH that I have set.Do I need to install CUDA-9.1 to make the dev branch work?

I think CUDA-9.1 will work.

gangmul12 commented 5 years ago

i'm not sure but i solved this issue by fixing "linux-so-version.txt". Originally "linux-so-version.txt" indicates "libcudart.so.9.1" but i changed it to "lincudart.so.9.0" then it worked.

tgrogers commented 5 years ago

Yes that should work - you can actually add multiple versions in that .txt so that one compiled .so can be run with a bunch of different versions of CUDA.

On Thu, Mar 7, 2019 at 11:35 PM gangmul12 notifications@github.com wrote:

i'm not sure but i solved this issue by fixing "linux-so-version.txt". Originally "linux-so-version.txt" indicates "libcudart.so.9.1" but i changed it to "lincudart.so.9.0" then it worked.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gpgpu-sim/gpgpu-sim_distribution/issues/82#issuecomment-470801874, or mute the thread https://github.com/notifications/unsubscribe-auth/AD9MccVP1S55G99jmgRbgseh6k_x-E2Eks5vUeiGgaJpZM4YXaaL .

-- Tim Rogers Assistant Professor Purdue University https://engineering.purdue.edu/tgrogers