library problems
Hiya,

I'm having a little problem which is really frustrating me. My installation of CUDA all goes to plan. The examples work great. deviceQuery runs fine, as does bandwidthTest. However when I try to run a program I have written it gives me the error:

dyld: Library not loaded: @rpath/libcudart.dylib
Referenced from : /blah/blah
Reason: image not found
Trace/BPT trap

All my path variables are set up correctly. I have checked. I am compiling simply by nvcc blah.cu -o blah

The same code works on my other machine without problems. What could the problem be here?

Thanks
Hiya,



I'm having a little problem which is really frustrating me. My installation of CUDA all goes to plan. The examples work great. deviceQuery runs fine, as does bandwidthTest. However when I try to run a program I have written it gives me the error:



dyld: Library not loaded: @rpath/libcudart.dylib

Referenced from : /blah/blah

Reason: image not found

Trace/BPT trap



All my path variables are set up correctly. I have checked. I am compiling simply by nvcc blah.cu -o blah



The same code works on my other machine without problems. What could the problem be here?



Thanks

#1
Posted 04/04/2011 12:09 PM   
When you say "All my path variables are set up correctly", does that mean DYLD_LIBRARY_PATH includes where the toolkit libraries installed? (should be /usr/local/cuda/lib by default)
When you say "All my path variables are set up correctly", does that mean DYLD_LIBRARY_PATH includes where the toolkit libraries installed? (should be /usr/local/cuda/lib by default)

#2
Posted 04/04/2011 12:25 PM   
[quote name='avidday' date='04 April 2011 - 12:25 PM' timestamp='1301919925' post='1219019']
When you say "All my path variables are set up correctly", does that mean DYLD_LIBRARY_PATH includes where the toolkit libraries installed? (should be /usr/local/cuda/lib by default)
[/quote]

Correct. and $PATH usr/local/cuda/bin
[quote name='avidday' date='04 April 2011 - 12:25 PM' timestamp='1301919925' post='1219019']

When you say "All my path variables are set up correctly", does that mean DYLD_LIBRARY_PATH includes where the toolkit libraries installed? (should be /usr/local/cuda/lib by default)





Correct. and $PATH usr/local/cuda/bin

#3
Posted 04/04/2011 12:38 PM   
[quote name='Ferguzz' date='04 April 2011 - 08:38 AM' timestamp='1301920683' post='1219022']
Correct. and $PATH usr/local/cuda/bin
[/quote]

I am facing a similar problem on both linux and mac osx.
[quote name='Ferguzz' date='04 April 2011 - 08:38 AM' timestamp='1301920683' post='1219022']

Correct. and $PATH usr/local/cuda/bin





I am facing a similar problem on both linux and mac osx.

#4
Posted 04/07/2011 06:40 AM   
[quote name='Ferguzz' date='04 April 2011 - 03:09 PM' timestamp='1301918989' post='1219015']
Hiya,

I'm having a little problem which is really frustrating me. My installation of CUDA all goes to plan. The examples work great. deviceQuery runs fine, as does bandwidthTest. However when I try to run a program I have written it gives me the error:

dyld: Library not loaded: @rpath/libcudart.dylib
Referenced from : /blah/blah
Reason: image not found
Trace/BPT trap

All my path variables are set up correctly. I have checked. I am compiling simply by nvcc blah.cu -o blah

The same code works on my other machine without problems. What could the problem be here?

Thanks
[/quote]

Also for big projects mixing c/c++ and cuda I build using the common.mk that the CUDA sdk provides. It is a very nice engine and you can customize it with new flags. It is a great way for building your code. I am surprised that people are not using it as a reference as it is or build from it a new common file.

Cheers,
Alexander.
[quote name='Ferguzz' date='04 April 2011 - 03:09 PM' timestamp='1301918989' post='1219015']

Hiya,



I'm having a little problem which is really frustrating me. My installation of CUDA all goes to plan. The examples work great. deviceQuery runs fine, as does bandwidthTest. However when I try to run a program I have written it gives me the error:



dyld: Library not loaded: @rpath/libcudart.dylib

Referenced from : /blah/blah

Reason: image not found

Trace/BPT trap



All my path variables are set up correctly. I have checked. I am compiling simply by nvcc blah.cu -o blah



The same code works on my other machine without problems. What could the problem be here?



Thanks





Also for big projects mixing c/c++ and cuda I build using the common.mk that the CUDA sdk provides. It is a very nice engine and you can customize it with new flags. It is a great way for building your code. I am surprised that people are not using it as a reference as it is or build from it a new common file.



Cheers,

Alexander.

Dr. Alexander Agathos Degree in Maths, PhD in Computer Science (specialization in Computer Graphics)

Researcher in HPC, Department of Mathematics and Informatics, West University of Timisoara, Romania.

[email="agalex@iit.demokritos.gr"]Email[/email]

Website

--------------------
A famous researcher in parallelism said : Parallelism is a great problem. The basic question is though are you part of the solution or part of the problem?

The challenges of parallel computing are simple to enumerate : expose lots of parallelism and minimize communication (said another way : maximize locality)

The more complicated you present a subject the less you have really mastered it...Albert Einstein.

#5
Posted 04/07/2011 10:34 PM   
Hi
I got the same problem in the samples.

The installations of all the parts ( Driver, Toolkit, SDK) went fine, but i suppose i failed in " setting my path variables correctly ".
I red about this two commands :

export PATH=/usr/local/cuda/bin:$PATH
export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:$DYLD_LIBRARY_PATH

where i should be before executing them?
should i complete theme in some way for my own document tree ?

How can I place them in ~/.bash_profile since I do not have any?
Should i create it ?

Thanks in advance for your help, I'm just a student, but I have been fascinated by this argument and I'd like to practice.
Forgive me for my bad english, but I'm Italian. :D

Marco
Hi

I got the same problem in the samples.



The installations of all the parts ( Driver, Toolkit, SDK) went fine, but i suppose i failed in " setting my path variables correctly ".

I red about this two commands :



export PATH=/usr/local/cuda/bin:$PATH

export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:$DYLD_LIBRARY_PATH



where i should be before executing them?

should i complete theme in some way for my own document tree ?



How can I place them in ~/.bash_profile since I do not have any?

Should i create it ?



Thanks in advance for your help, I'm just a student, but I have been fascinated by this argument and I'd like to practice.

Forgive me for my bad english, but I'm Italian. :D



Marco

#6
Posted 07/06/2011 10:38 PM   
Yes, just create a file in your home directory called .bash_profile, put the export commands in there then run "source .bash_profile" and you should be up and running.
Yes, just create a file in your home directory called .bash_profile, put the export commands in there then run "source .bash_profile" and you should be up and running.

#7
Posted 07/13/2011 08:29 PM   
(deleted)
(deleted)

#8
Posted 11/22/2011 10:26 AM   
Stop messing with scripts and "export" commands. Just tell the binary where to look, with install_name_tool. I do, and my CUDA programs (full application bundles) are double-clickable, with no script editing needed (for running it, that is - building is another matter).

Is there an install_name_tool or similar for Linux?
Stop messing with scripts and "export" commands. Just tell the binary where to look, with install_name_tool. I do, and my CUDA programs (full application bundles) are double-clickable, with no script editing needed (for running it, that is - building is another matter).



Is there an install_name_tool or similar for Linux?

#9
Posted 11/23/2011 09:17 AM   
Scroll To Top