Problem with Nvidia Cuda on Mac

Richard de Lhorbe
Richard de Lhorbe
Joined: 15 Dec 05
Posts: 46
Credit: 9582921864
RAC: 1228967
Topic 194852

I have been struggling to get a new GTX285 GPU card to work on a Power Mac with BOINC. While the system recognized the graphics card as existing on the system with no problem, BOINC would not recognize there was a GPU present with the 2.3.1a_ma driver (as recommended on the Einstein CUDA page), nor with the latest 3.0.14_ma driver recently taking it's place on Nvidia's driver page. However, the most recent OSX upgrade that came out this week (i.e. the 10.6.3 upgrade) causes the card to be finally recognized by BOINC with the 3.0.14 driver (but not with the 2.3.1a_ma driver).

So now with the card recognized, when checked off in the Preferences dialog box to use the GPU, BOINC happily began downloading Einstein CUDA work units. However every single one crashed out with a computation error within a second or so of starting. One example can be found for WU number 71743135, task 168875547 .... I am not sure how to read the results on the Task Details page, but the stderr out section seems to indicate that a library is missing .... ? Looking forward to some of the experts out there suggesting something.

2 x 3 GHz Quad core Mac, 16 Gb memory, running OSX 10.6.3, GPU card has 1024 Mb RAM

Thanks, Richard

Gary Roberts
Gary Roberts
Moderator
Joined: 9 Feb 05
Posts: 5883
Credit: 119044254828
RAC: 24869547

Problem with Nvidia Cuda on Mac

Quote:
... the stderr out section seems to indicate that a library is missing .... ?


Exactly!

In fact, it tells you the library name it is having problems with and the reason (the library image could not be found)

dyld: Library not loaded: @rpath/libcufft.dylib
  Referenced from: /Library/Application Support/BOINC Data/slots/9/../../projects/einstein.phys.uwm.edu/einsteinbinary_ABP2_5.11_i686-apple-darwin__ABP2cuda23
  Reason: image not found

In a situation like this, why not stick the library name (libcufft.dylib) into google and see what you get. Now I know absolutely less than nothing about Macs and OS X but it seems to me that the very first hit contains the solution to your problem. Here is a partial quote. You should google it for yourself to get all the details on how to fix the linking.

Quote:
I've seen that many libraries in /usr/local/cuda/lib are installed in
wrong way. Instead of changing your DYLD_LIBRARY_PATH it is better to
fix linking with the "install_name_tool" command. As example consider
libcufft.dylib:
....
....


I'm assuming from the actual words used in the quote that the missing library is actually installed in a location that your DYLD_LIBRARY_PATH environment variable is not pointing to. A quick and dirty fix would be to extend the definition of DYLD_LIBRARY_PATH to include the directory where the missing library is actually located. You should be able to find it easily with a search for the library name on your host. However since someone has actually gone to the trouble of documenting the proper fix, you should probably follow the instructions if they apply to your situation.

Cheers,
Gary.

Richard de Lhorbe
Richard de Lhorbe
Joined: 15 Dec 05
Posts: 46
Credit: 9582921864
RAC: 1228967

Hi Gary Thanks for your

Message 97563 in response to message 97562

Hi Gary

Thanks for your response. It turns out after a lot of digging that I do not seem to have the libcufft.dylib file installed at all, nor can I find out where it is supposed to some from. I have installed all three Nvidia software packages for the Mac, the drivers, the toolkit and the SDK, but none apparently come with this file. I have found quite a few .dylib files associated with Nvidia on the hard drive, I have run the make command on the SDK files and it has compiled a "simplecufft" application but that is not the same as a full FFT file. If anyone can tell me where it is supposed to be sourced from, it would be very useful. So far the Nvidia message board has not had anyone respond to my question on this. Perhaps one of the install routines was supposed to install this library and didn't, but they all claim to have successfully installed. I am completely stuck right now .....

Regards
Richard

Jord
Joined: 26 Jan 05
Posts: 2952
Credit: 5893653
RAC: 0

RE: I have installed all

Message 97564 in response to message 97563

Quote:
I have installed all three Nvidia software packages for the Mac, the drivers, the toolkit and the SDK, but none apparently come with this file.


The toolkit has the cufft library.

Richard de Lhorbe
Richard de Lhorbe
Joined: 15 Dec 05
Posts: 46
Credit: 9582921864
RAC: 1228967

Thanks for the reply, I have

Message 97565 in response to message 97564

Thanks for the reply, I have not had a lot of time to fool around with this in the past week but am back at it. I have finally found the library location for libcufft on my hard drive, it is not visible in a normal viewing of the contents using the Mac Finder but if I change directly over to /usr/local/cuda/ then I can see it. Per Gary's earlier suggestion, I Goggled for this library name and found the article at
http://tiker.net/pipermail/pycuda_tiker.net/2008-November/000037.html
which describes that CUDA libraries are often installed incorrectly ... so I followed those directions and changed everything to be pointed in the direction suggested ... BOINC / Einstein still cannot find libcufft, giving me exactly the same error message as before ... see task number 169636055 for one of the most recent error responses. I looks like I still need to use Terminal to send a UNIX command of some sort to direct BOINC / Einstein in the right direction, but am really at a loss of what to do. In looking around, I found some references to a dlopen command which might provide a general dynamic solution, but am not sure how to use it, the directions are totally confusing to a non-progrmmer. I still feel that using the instructions at ticker.net but using the specific path that BOINC wants to see would be best, but I cannot figure out what location BOINC wants ... perhaps I can copy the libcufft files over to another directory that BOINC uses, I don't know if that would work either ... and I am certainly open to any suggestions .... Thanks, Richard

Jord
Joined: 26 Jan 05
Posts: 2952
Credit: 5893653
RAC: 0

I asked the BOINC developer

I asked the BOINC developer for the Macintosh about this, he's answered me that you need to update your BOINC version. BOINC versions pre-6.10.28 will crash all CUDA tasks on the Mac. So go to http://boinc.berkeley.edu/download_all.php and get 6.10.43 (recommended).

The developer says further:

Quote:

CUDA project applications on the Mac should not use any CUDA libraries installed by the user; only the BOINC Client uses these.

BOINC GPU applications send their own libraries to the client and place them in the appropriate project directory, as different applications require different versions of the libraries. They may have a different name initially and be copied into the slot directory with the name changed to the actual library name as needed. For example, on my Mac Einstein's CUFFT library file is in the BOINC Data folder at: ".../BOINC Data/projects/einstein.phys.uwm.edu/libcufft32_23.dylib".

Early versions of BOINC on the Mac did not set up the library search paths properly, so applications could not find the libraries. This was first fixed on BOINC 6.10.27 and 6.10.28.

There is also a back-end update available which refuses to send CUDA work to Mac clients that aren't at least 6.10.28 or above: [trac]changeset:20360[/trac]. Einstein hasn't updated to that update yet, it might be something to think about.

Richard de Lhorbe
Richard de Lhorbe
Joined: 15 Dec 05
Posts: 46
Credit: 9582921864
RAC: 1228967

Thanks for the quick response

Message 97567 in response to message 97566

Thanks for the quick response Jord. I had upgraded to the most recent version of BOINC when I started this journey, which was 6.10.21 at the time. However, following your suggestion I download 6.10.43 just now and so far it all seems to be working .... Hurrah !! I will monitor it through a complete WU and post a final note, but so far so good ..... cheers, Richard

Richard de Lhorbe
Richard de Lhorbe
Joined: 15 Dec 05
Posts: 46
Credit: 9582921864
RAC: 1228967

Final note : tasks are now

Message 97568 in response to message 97567

Final note : tasks are now completing with no problems. Thanks for all your assistance ! Cheers, Richard

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.