Go Back   TechArena Community > Hardware > Monitor & Video Cards
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Where to install libcudart.dylib for deploying CUDA on Mac OS?

Monitor & Video Cards


Reply
 
Thread Tools Search this Thread
  #1  
Old 21-05-2010
Member
 
Join Date: Apr 2010
Posts: 77
Where to install libcudart.dylib for deploying CUDA on Mac OS?
  

I want to ship libcudart.dylib with my software, but I am facing trouble for deciding where I have to install it. The library is having the following path
Quote:
@rpath/libcudart.dylib
That I believe that the linker is going to search for this in the usual library path. But according to me it is really a bad idea for me to install cudart in my system. What will happen if I ship the 2.3 runtime, and few other applications that come along and then installs the 2.2 runtime, or vice versa?
I just need to have any one effectively ship a cuda application to the end user on Mac or libcudart.dylib install location.


Last edited by Amuda : 21-05-2010 at 10:24 AM.
Reply With Quote
  #2  
Old 21-05-2010
Member
 
Join Date: May 2008
Posts: 1,470
Re: How to ship CUDA on Mac OS X?

You can put that in application directory, and then add the path to the DYLD_LIBRARY_PATH. But you have to take care because it is fragile, especially when you software is a plug-in. The host application will do thing to the library path that you have to control over. If anyone install cudart in /usr/lib then it can be easily found before you copy, can create any problem.
Reply With Quote
  #3  
Old 21-05-2010
Member
 
Join Date: May 2006
Posts: 2,319
Re: How to ship CUDA on Mac OS X?

If you are using third party libs, then you can do the following thing for ensuring that your copy will use the private copy of the library.
1. First you have to create a copy of the library in application directory.
2. Make sure to use the install_name_tool for changing the baked in path, hence it also point to application directory.
3. Do not forget to link against the copy in place of the original
Reply With Quote
  #4  
Old 21-05-2010
Member
 
Join Date: Dec 2007
Posts: 1,547
Re: How to ship CUDA on Mac OS X?

Shipping libcudart.dylib from the cuda toolkit with the help of your application is obviously is the perfect method. You must install them into a place that is related to your application’s installation directory rather than to any complete path in the system for the perfect reason that you have given. I will suggest linking with these libraries in this manner that the application binary contains references in the application bundle that look like this.
Quote:
@executable_path/../Library/libcudart.dylib
@executable_path/../Library/libcufft.dylib
Reply With Quote
  #5  
Old 21-05-2010
Member
 
Join Date: Dec 2007
Posts: 1,711
Re: How to ship CUDA on Mac OS X?

According to me you are absolutely correct on the install_name_tools is the technique to set this up, through install_name_tool for changing the LC_ID_DYLIB for the libraries for redistributing purpose. The whole process will look like this.
For changing this for libcudart.dylib after copying this to a new place.
Quote:
> install_name_tool -id "@executable_path/../Library/libcudart.dylib" libcudart.dylib
For verifying that this will work and you have use the otool –D command.
Quote:
> otool -D libcudart.dylib
libcudart.dylib:
@executable_path/../Library/libcudart.dylib
Reply With Quote
Reply

  TechArena Community > Hardware > Monitor & Video Cards
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Where to install libcudart.dylib for deploying CUDA on Mac OS?"
Thread Thread Starter Forum Replies Last Post
Audacity unable to open libmp3lame.dylib Esmond Ivers Windows Software 3 11-03-2012 07:20 PM
Audacity 1.3.14 is not able to open libmp3lame.dylib Woodward Windows Software 6 09-03-2012 09:49 PM
From where i can get ibSystem.B.dylib in OS X Lion Rustagi Operating Systems 8 28-11-2011 09:16 PM
Deploying MSI's with WSUS 3.0?? VauGhna Server Update Service 2 24-01-2010 07:06 AM


All times are GMT +5.5. The time now is 12:30 AM.