Logo by Pauldelbrot - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. April 26, 2024, 12:13:00 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: OpenCL on the Mac ?  (Read 5505 times)
0 Members and 1 Guest are viewing this topic.
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« on: May 26, 2010, 11:45:16 PM »

Is anyone here doing OpenCL on the Mac ?

It's something I hope to do when I finally get around to getting a Mac and I'd appreciate any information on the subject.
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
aluminumstudios
Conqueror
*******
Posts: 135


« Reply #1 on: May 27, 2010, 12:31:04 AM »

I have an old Macbook with integrated Intel video, so I can't get any GPU acceleration sad, but i have tinkered with running OpenCL code because the code can use the CPU cores instead.

I downloaded Apple's "Hello World" OpenCL example and opened it in XCode:  http://developer.apple.com/mac/library/samplecode/OpenCL_Hello_World_Example/Introduction/Intro.html

I then started pasting in code from my Buddhabrot software and rewrote one of the simple orbit processing functions as an openCL function as a test (that was trivial, but changing my iteration function to a highly parallel opencl function will take a lot of work.)

It seems pretty easy to do, but my current code runs sooooooooo much faster than the opencl code on the CPU.  Also, Macbooks and iMacs GPUs only support single precision.  I'm not in a market for a Mac Pro at the moment, so the best bet for my project is to keep my threaded CPU code running.

I also tinkered with Nvidia CUDA (using the emulator mode of their compiler since once again, my old MacBook has integrated Intel GPU).  CUDA code seemed a little more simple and less tedious than OpenCL code.  It was easier for me to get that written and working ,but for a serious programer there might not be a difference.
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #2 on: May 27, 2010, 12:52:19 AM »

Thanks for that.

I'm saving for a MacPro since I've decided to avoid Microsoft products at all cost from now on smiley
Ultra Fractal is now the only reason for me to need a Windows OS - and maybe that's not for much longer wink
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
aluminumstudios
Conqueror
*******
Posts: 135


« Reply #3 on: May 27, 2010, 03:38:28 AM »

With Parallels or VMware (and maybe other virtual machine software), you can easily boot Windows on a Mac while MacOS continues to run.  You would have no problem doing this to run Ultrafractal and there isn't a performance hit from doing this (other than the large amount of memory usage and any active processes sharing the CPU cores - aside from this Windows runs at full native speed.)

While I also choose to not be reliant on Microsoft for the majority of my computing, I do boot into XP once in a while to run a few apps and utilities that I like evil.
Logged
KRAFTWERK
Global Moderator
Fractal Senior
******
Posts: 1439


Virtual Surreality


WWW
« Reply #4 on: May 27, 2010, 09:15:57 AM »

Thanks for that.

I'm saving for a MacPro since I've decided to avoid Microsoft products at all cost from now on smiley
Ultra Fractal is now the only reason for me to need a Windows OS - and maybe that's not for much longer wink


This is a post that makes me very happy David! Right move!
Looking forward to see what you can do when you are no longer on the dark side! smiley
And on the same day that this happened:
http://gizmodo.com/5548460/apple-is-now-bigger-than-microsoft-the-most-valuable-tech-company-in-the-world
« Last Edit: May 27, 2010, 12:13:53 PM by KRAFTWERK » Logged

subblue
Conqueror
*******
Posts: 116



WWW
« Reply #5 on: May 27, 2010, 10:34:26 AM »

Apple actually released an OpenCL demo of the Quaternion Julia set fractal renderer as part of one of their demo apps. I've not actually had chance to investigate it further.

I think I'm going to look down this route first though: http://www.fractalforums.com/programming/qt-plus-opencl-qtopencl as the cross platform approach of Qt appeals more.
Logged

www.subblue.com - a blog exploring mathematical and generative graphics
ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #6 on: May 27, 2010, 02:24:11 PM »

You should take a look at Apple's "Grand Central", that use openCL.
Logged

often times... there are other approaches which are kinda crappy until you put them in the context of parallel machines
(en) http://www.blog-gpgpu.com/ , (fr) http://www.keru.org/ ,
Sysadmin & DBA @ http://www.over-blog.com/
hobold
Fractal Bachius
*
Posts: 573


« Reply #7 on: May 28, 2010, 06:20:47 PM »

My next Mac will be OpenCL capable, but I am still waiting for an update of the MacPro line of models before I make a decision what to buy. The OpenCL support is not yet persuasive on the Mac, but Apple seems to be busy providing OpenCL drivers for more and more of the currently available GPUs.

Oh, and I second the recommendation to take a look at rand Central Dispatch. It doesn't make the hard problems easy, but it makes the easy stuff trivial. With GCD I multithreaded some arbitrary precision mandelbrot renderer in maybe two hours. Doing the same with Posix threads took me two days of trial and error ... in both cases I started with zero knowledge of the respective APIs.
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
OpenCL? Mandelbulb Implementation JColyer 2 3318 Last post January 19, 2010, 03:48:36 AM
by JColyer
QT + OpenCL = QtOpenCL Programming ker2x 1 7616 Last post May 27, 2010, 10:31:26 AM
by subblue
Buddhabrot animation using OpenCL Movies Showcase (Rate My Movie) amarzo 3 4750 Last post August 07, 2011, 11:34:48 PM
by A Noniem
Mandelbulber and OpenCL Mandelbulber Buddhi 12 10715 Last post November 16, 2011, 11:04:25 AM
by Loadus
Java OpenCL Mandelbox program. Multi Platform gg92507 2 8006 Last post January 18, 2013, 04:47:48 PM
by knighty

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.147 seconds with 24 queries. (Pretty URLs adds 0.01s, 2q)