MAC OS X 32-bit CUDA App
log in

Advanced search

Message boards : Number crunching : MAC OS X 32-bit CUDA App

1 · 2 · 3 · 4 . . . 10 · Next
Author Message
Profile Slicker
Volunteer moderator
Project administrator
Project developer
Project tester
Project scientist
Avatar
Send message
Joined: 11 Jun 09
Posts: 2525
Credit: 740,580,099
RAC: 1
Message 4912 - Posted: 30 Dec 2009, 18:19:33 UTC

I think I have a working MAC OS X CUDA app. The problem is that the CUDA drivers for MAC are only 32-bit, so it won't run on Leopard or Snow Leopard if you have a 64-bit processor because BOINC won't recognize the GPU if running 64-bit and there is no way to force BOINC to install the 32-bit version since it is a universal installer.

So....does anyone out there have a 32-bit MAC running OS X 10.5.2 or higher that has a CUDA card? If not, I'll just consider this a learning experience and wait for nVidia to developer 64-bit CUDA drivers.

Profile Paul D. Buck
Volunteer tester
Send message
Joined: 30 Aug 09
Posts: 412
Credit: 185,735,226
RAC: 0
Message 5081 - Posted: 2 Jan 2010, 0:57:46 UTC - in response to Message 4912.
Last modified: 2 Jan 2010, 1:00:35 UTC

Well, based on a note on the alpha board I decided to give it a shot. Sadly, the 2.3.1a version does not seem to give me any install options of use and 6.10.24 does not see the CUDA card so I am caught in the Snow Leopard 64 bit trap it seems.

On the other hand ... SL is supposed to have OpenCL and OpenGL natively. Looking in profiler they are both listed OpenGL as universal 1.6.5 and OpenCL as Intel version 12...

Might you have better luck with OpenCL version of the application?

I know UCB says that there is no uniqueness to OpenCL but in that no one has tried yet to make an OpenCL application on BOINC I think that is a little bit too glib of an assumption.

{edit}
I found this download page with Mac OS listed at the bottom... you have to answer a get your e-mail bogus survey to get there ... open cl downloads

Profile Paul D. Buck
Volunteer tester
Send message
Joined: 30 Aug 09
Posts: 412
Credit: 185,735,226
RAC: 0
Message 5087 - Posted: 2 Jan 2010, 2:17:41 UTC

Sent a note to Jon ...

bottom line is that I could not get it to run ... my suggestion to him was that we consider making it a 32-bit exe and see if SL will run it in a 32-bit space and thereby find the driver...

Also, I will note that I failed with the standalone CUDA because it also did not find the lib file ... that may or may not be related to the issue of 32 vs 64 bit execution spaces ...

Profile Gipsel
Volunteer moderator
Project developer
Project tester
Send message
Joined: 2 Jul 09
Posts: 279
Credit: 77,516,587
RAC: 76,639
Message 5090 - Posted: 2 Jan 2010, 2:59:24 UTC - in response to Message 5081.

I know UCB says that there is no uniqueness to OpenCL but in that no one has tried yet to make an OpenCL application on BOINC

GPUGrid has done a very small scale alpha test of an OpenCL application ;). But it failed quite badly, afaik.

Profile Slicker
Volunteer moderator
Project administrator
Project developer
Project tester
Project scientist
Avatar
Send message
Joined: 11 Jun 09
Posts: 2525
Credit: 740,580,099
RAC: 1
Message 5108 - Posted: 2 Jan 2010, 13:20:09 UTC - in response to Message 5087.

Sent a note to Jon ...

bottom line is that I could not get it to run ... my suggestion to him was that we consider making it a 32-bit exe and see if SL will run it in a 32-bit space and thereby find the driver...

Also, I will note that I failed with the standalone CUDA because it also did not find the lib file ... that may or may not be related to the issue of 32 vs 64 bit execution spaces ...


I have a MAC OS X 32-bit CUDA app that actually runs. The only problem is that BOINC won't run it since BOINC won't acknowledge a CUDA card on a 64-bit platform. So, unless someone built a Hackintosh with a Celeron or other non-x64 chip, I don't think there is a MAC out there that is 32-bit but has a CUDA card capably of crunching.

As far as OpenCL goes, I've also done some research on that. From what I've read, while OS X comes with OpenCL, the ability to use it is very, very limited. Only a couple GPUs and none of the new ones. Maybe Snow Leopard changed that, I don't know. But many of the posts I read were from some pretty miffed MAC users complaining about how MAC is supposed to be so cutting edge, but there are lots of CUDA and CAL apps and no OpenCL apps because the OpenCL was more a marketing gimmick than complete release.

I've never torn into a G4 box. Will it support a PCI, AGP, or PCI-e graphics card? Will OS X have drivers if I can? I'll find out tomorrow when I get in to work -- if they haven't thrown them out already.

Claggy
Send message
Joined: 27 Sep 09
Posts: 288
Credit: 14,320,498
RAC: 0
Message 5140 - Posted: 2 Jan 2010, 17:53:46 UTC

I'm tempted to post to the Boinc_Alpha list asking them to a 32bit installer,
or get the 64bit client to see and use 32bit Cuda,
but it'll be better if it came from you.

Claggy

Profile Slicker
Volunteer moderator
Project administrator
Project developer
Project tester
Project scientist
Avatar
Send message
Joined: 11 Jun 09
Posts: 2525
Credit: 740,580,099
RAC: 1
Message 5168 - Posted: 3 Jan 2010, 1:05:47 UTC - in response to Message 5140.

I'm tempted to post to the Boinc_Alpha list asking them to a 32bit installer,
or get the 64bit client to see and use 32bit Cuda,
but it'll be better if it came from you.

Claggy


I posted to the boinc_dev group and DA responded that he is considering a 32-bit installer option in addition to the universal installer if nVidia doesn't come out with 64-bit drivers soon. I don't know what the definition of soon is though.

Claggy
Send message
Joined: 27 Sep 09
Posts: 288
Credit: 14,320,498
RAC: 0
Message 5347 - Posted: 7 Jan 2010, 12:52:52 UTC - in response to Message 5168.

I'm tempted to post to the Boinc_Alpha list asking them to a 32bit installer,
or get the 64bit client to see and use 32bit Cuda,
but it'll be better if it came from you.

Claggy


I posted to the boinc_dev group and DA responded that he is considering a 32-bit installer option in addition to the universal installer if nVidia doesn't come out with 64-bit drivers soon. I don't know what the definition of soon is though.

Charlie has released Mac BOINC 6.10.26,

http://boinc.berkeley.edu/dl/?C=M;O=D/

Claggy

Profile Slicker
Volunteer moderator
Project administrator
Project developer
Project tester
Project scientist
Avatar
Send message
Joined: 11 Jun 09
Posts: 2525
Credit: 740,580,099
RAC: 1
Message 5349 - Posted: 7 Jan 2010, 15:32:52 UTC
Last modified: 7 Jan 2010, 15:34:26 UTC

Per the announcement on the boinc_dev mailing list from Charlie Fenton:


I have posted the 6.10.26 release of BOINC for Macintosh for testing.
This is a Mac-only release whose primary purpose is to implement CUDA capability on the Mac. You can download it from http://boinc.berkeley.edu/download_all.php.

Previous versions of BOINC included a client in the form of a universal binary containing 3 architectures: PowerPC, Intel 32-bit and Intel 64-bit. The Mac OS automatically chose the best one for each system.

Unfortunately, the CUDA libraries have not worked with 64-bit applications yet. So we eliminated the 64-bit client; the universal binary now contains only the PowerPC and Intel 32-bit architectures.
This allows us to link with the CUDA libraries on Intel Macs. The Intel 32-bit client determines at run time whether the Mac is 64-bit capable; if so, it requests 64-bit project applications (in addition to 32-bit project applications.)

The only other side effect of this change is that the benchmarks had been run using 64-bit Intel instructions when available; now they will always use 32-bit instructions. But the difference is small.
And most project applications are 32-bit, so the 32-bit benchmarks are probably a more accurate estimate of performance.


http://boinc.thesonntags.com/collatz/download/collatz_2.01_i686-apple-darwin__cuda.bz2

Note: An app info is needed for the above and will likely require both the app and the cuda runtime to be referenced.

I also have a feeling that I either need to include the libcudart.dylib with the app or a link is needed (ln -s etc. ) from the project folder to the actual location. What I don't know is if I include the CUDA 2.2 runtime with the app and someone has the 2.3 installed, will it still work?

Blackbird
Send message
Joined: 7 Jan 10
Posts: 9
Credit: 879,378
RAC: 0
Message 5372 - Posted: 7 Jan 2010, 21:35:12 UTC

For whatever it's worth, I currently am running the 64 bit Boinc 6.10.26 on Mac OS 10.6.2 and it now recognizes my GPU. If you need a Beta tester, I'm game.

Profile Paul D. Buck
Volunteer tester
Send message
Joined: 30 Aug 09
Posts: 412
Credit: 185,735,226
RAC: 0
Message 5375 - Posted: 7 Jan 2010, 22:11:31 UTC - in response to Message 5349.
Last modified: 7 Jan 2010, 22:27:52 UTC

http://boinc.thesonntags.com/collatz/download/collatz_2.01_i686-apple-darwin__cuda.bz2

Note: An app info is needed for the above and will likely require both the app and the cuda runtime to be referenced.

I also have a feeling that I either need to include the libcudart.dylib with the app or a link is needed (ln -s etc. ) from the project folder to the actual location. What I don't know is if I include the CUDA 2.2 runtime with the app and someone has the 2.3 installed, will it still work?

Earlier today I tried to get some work with the app info I got from Jon and was unable to get any. Removed the app info for ha ha and still got nothing. Since my account is set to only use GPU this does not bode well... I think that there is still something mis-configured on the server...

{edit}
While I am thinking on it, should this not show up on the optimized applications page?

{edit2}
This I think may be the issue, I am getting this in the sched request:

<app_version>
<app_name>collatz</app_name>
<version_num>201</version_num>
<platform>x86_64-apple-darwin</platform>
<avg_ncpus>1.000000</avg_ncpus>
<max_ncpus>1.000000</max_ncpus>
<flops>3632766880.069285</flops>
</app_version>

even with the app info as:

<app_info>
<app>
<name>collatz</name>
<user_friendly_name>collatz</user_friendly_name>
</app>
<file_info>
<name>collatz_2.01_i686-apple-darwin__cuda</name>
<executable/>
</file_info>
<app_version>
<app_name>collatz</app_name>
<version_num>201</version_num>
<file_ref>
<file_name>collatz_2.01_i686-apple-darwin__cuda</file_name>
<main_program/>
</file_ref>
</app_version>
</app_info>

Could there be an error in the Mac version of BOINC that does not handle the mapping right? Or is this the wrong app info?

Profile Slicker
Volunteer moderator
Project administrator
Project developer
Project tester
Project scientist
Avatar
Send message
Joined: 11 Jun 09
Posts: 2525
Credit: 740,580,099
RAC: 1
Message 5381 - Posted: 8 Jan 2010, 1:03:04 UTC

Lots of questions... this is pretty much trial and error to figure this one out as I do not have a MAC with a CUDA card, and I am far from an expert in OS X or even Linux.

Have you been able to successfully run a standalone test WU?

If yes, does BOINC 6.10.26 acknowledge that you have a CUDA capable coprocessor?

If yes, with sched_op_debug enabled, is it asking for CUDA GPU work?

If yes, what is your host id? I might be able to grep the logs and figure out why it isn't sending any work.

Lastly, I know that the app requires the CUDA runtime. The question is how to make that available. One option is via a setenv and the other is to distribute the dylib with the app. I have no idea yet which is needed.

I have tried adding the MAC CUDA app as a "standard" app so that both the CUDA runtime and the standard CUDA dylibs are included with the app, so you might try removing the app_info and seeing if it downloads all three and gets work. It might, it might not. Links to errors or posts of logs will certainly help if it doesn't.

Profile Slicker
Volunteer moderator
Project administrator
Project developer
Project tester
Project scientist
Avatar
Send message
Joined: 11 Jun 09
Posts: 2525
Credit: 740,580,099
RAC: 1
Message 5382 - Posted: 8 Jan 2010, 1:06:12 UTC

While I am thinking on it, should this not show up on the optimized applications page?


Adding the file to the download folder does not add it to the opt apps page. That is a manual step. Since we don't have a single successful run (yet) I have not added it as an opt app. Right now, I've added the OS X CUDA app as a standard app, but I have no idea of whether it will work or not.

Profile Slicker
Volunteer moderator
Project administrator
Project developer
Project tester
Project scientist
Avatar
Send message
Joined: 11 Jun 09
Posts: 2525
Credit: 740,580,099
RAC: 1
Message 5383 - Posted: 8 Jan 2010, 1:08:14 UTC - in response to Message 5372.

For whatever it's worth, I currently am running the 64 bit Boinc 6.10.26 on Mac OS 10.6.2 and it now recognizes my GPU. If you need a Beta tester, I'm game.


Go ahead and connect to the project and see if it grabs the CUDA app and some work.

Profile Paul D. Buck
Volunteer tester
Send message
Joined: 30 Aug 09
Posts: 412
Credit: 185,735,226
RAC: 0
Message 5391 - Posted: 8 Jan 2010, 8:13:23 UTC

Hmm, started getting work while I took a nap, thats the good news.

Thu Jan 7 23:52:46 2010 Collatz Conjecture Requesting new tasks for CPU
Thu Jan 7 23:52:51 2010 Collatz Conjecture Scheduler request completed: got 1 new tasks
Thu Jan 7 23:52:53 2010 Collatz Conjecture Started download of collatz_1262846624_59265
Thu Jan 7 23:52:54 2010 Collatz Conjecture Finished download of collatz_1262846624_59265
Thu Jan 7 23:57:04 2010 Collatz Conjecture Starting collatz_1262846624_59265_0
Thu Jan 7 23:57:04 2010 Collatz Conjecture Starting task collatz_1262846624_59265_0 using collatz version 201
Thu Jan 7 23:57:05 2010 Collatz Conjecture Computation for task collatz_1262846624_59265_0 finished
Thu Jan 7 23:57:05 2010 Collatz Conjecture Output file collatz_1262846624_59265_0_0 for task collatz_1262846624_59265_0 absent
Thu Jan 7 23:58:08 2010 Collatz Conjecture Sending scheduler request: To report completed tasks.
Thu Jan 7 23:58:08 2010 Collatz Conjecture Reporting 1 completed tasks, requesting new tasks for GPU
Thu Jan 7 23:58:13 2010 Collatz Conjecture Scheduler request completed: got 0 new tasks


The bad?

dyld: Library not loaded: @rpath/libcudart.dylib
Referenced from: /Library/Application Support/BOINC Data/slots/8/../../projects/boinc.thesonntags.com_collatz/collatz_2.01_i686-apple-darwin__cuda
Reason: image not found

So, not finding the file due to a lack of a link?

As to the other questions, the Mac Pro is the one making the requests. I don't know why I was not getting work last night when I posted and why now I am getting tasks off and on. It looks like I was only doing one at a time.

I will try the removal of the app info again and see what happens then ... stand by ... :)

Profile Paul D. Buck
Volunteer tester
Send message
Joined: 30 Aug 09
Posts: 412
Credit: 185,735,226
RAC: 0
Message 5392 - Posted: 8 Jan 2010, 8:24:16 UTC

Removed the app info file and did get the download of the application and the two dylibs, but getting message:

dyld: Library not loaded: @rpath/libcudart.dylib
Referenced from: /Library/Application Support/BOINC Data/slots/14/../../projects/boinc.thesonntags.com_collatz/collatz_2.01_i686-apple-darwin__cuda
Reason: image not found

So, still at no link to the dylibs.

Back to NNT so I don't just burn through tasks to no end.

So, it looks like NOT using the app info is working though we are still mis-configured...

Profile Crunch3r
Volunteer moderator
Project developer
Project tester
Avatar
Send message
Joined: 30 Jun 09
Posts: 219
Credit: 7,515,663,568
RAC: 8,898
Message 5398 - Posted: 8 Jan 2010, 15:07:05 UTC - in response to Message 5392.

Removed the app info file and did get the download of the application and the two dylibs, but getting message:

dyld: Library not loaded: @rpath/libcudart.dylib
Referenced from: /Library/Application Support/BOINC Data/slots/14/../../projects/boinc.thesonntags.com_collatz/collatz_2.01_i686-apple-darwin__cuda
Reason: image not found

So, still at no link to the dylibs.

Back to NNT so I don't just burn through tasks to no end.

So, it looks like NOT using the app info is working though we are still mis-configured...


http://forums.nvidia.com/index.php?showtopic=79062
____________

Team BOINC United.Join Science that matters.

Profile Slicker
Volunteer moderator
Project administrator
Project developer
Project tester
Project scientist
Avatar
Send message
Joined: 11 Jun 09
Posts: 2525
Credit: 740,580,099
RAC: 1
Message 5399 - Posted: 8 Jan 2010, 15:55:32 UTC
Last modified: 8 Jan 2010, 15:57:45 UTC

Getting dylib errors? Either create or edit your ~/.bash_profile and make sure you have DYLD_LIBRARY_PATH set. For example:

# sample ~./bash_profile
export CUDA_HOME=/usr/local/cuda
export DYLD_LIBRARY_PATH=$CUDA_HOME/lib:$DYLD_LIBRARY_PATH
export LD_LIBRARY_PATH=$CUDA_HOME/lib:$LD_LIBRARY_PATH
export PATH=$PATH:$CUDA_HOME/bin

Still getting an error after that? There has to be some way to add those environment variables for all processes. From what I've googled, there are many ways to do that. Who the heck invented a plist anyway??? Should it use a .launchd.conf or a plist or /etc/.profile or /etc/.bash_profile or ...? You tell me.

Profile Paul D. Buck
Volunteer tester
Send message
Joined: 30 Aug 09
Posts: 412
Credit: 185,735,226
RAC: 0
Message 5400 - Posted: 8 Jan 2010, 17:07:50 UTC

Um, I am trying to run this under BOINC. No other program that I run under BOINC needs me to do something like this. Besides, creating this under my user, or even root, will not solve the problem as the BOINC processes are run under a different user altogether.

Why can't we add symbolic links to the Collatz dir so that the downloaded files can be used?

Profile Slicker
Volunteer moderator
Project administrator
Project developer
Project tester
Project scientist
Avatar
Send message
Joined: 11 Jun 09
Posts: 2525
Credit: 740,580,099
RAC: 1
Message 5414 - Posted: 9 Jan 2010, 0:15:08 UTC - in response to Message 5400.

Um, I am trying to run this under BOINC. No other program that I run under BOINC needs me to do something like this. Besides, creating this under my user, or even root, will not solve the problem as the BOINC processes are run under a different user altogether.


So, all the other MAC CUDA BOINC apps work OK?

Why can't we add symbolic links to the Collatz dir so that the downloaded files can be used?


I don't know if it will work or not as I don't have a way to test it myself. It can't hurt to give it a try.

1 · 2 · 3 · 4 . . . 10 · Next
Post to thread

Message boards : Number crunching : MAC OS X 32-bit CUDA App


Main page · Your account · Message boards


Copyright © 2018 Jon Sonntag; All rights reserved.