I'm making mandelbrot fractals in C using Xcode and I want to use parallel computing but everything I've tried so far doesn't work. Such as This Question and other how to guides. Whats the easiest way to use frameworks such as mpi.h to run my program in parallel?
-
This appears to be simply a duplicate of stackoverflow.com/questions/9388621/… which you linked to. Saying "I tried this and it doesn't work" is not a good question, because it gives potential answerers no idea about what might have gone wrong.– Greg HewgillCommented Jan 16, 2013 at 0:41
-
Those are complicated instructions and I was hoping to get more simple step by step instructions. I'm only 16 so I'm still new to c programming and really want to optimise my Mandelbrot generator but I can't follow any of the tutorials.– JordanCommented Jan 16, 2013 at 1:55
-
2Apple includes a sample fractal generator using OpenCL.– user4051Commented Jan 16, 2013 at 9:44
1 Answer
According to the answers on this StackOverflow question, the compiler included with Xcode 4.5 does not (yet) understand the OpenMP pragmas for parallel execution.
There are other ways to achieve what you want, though. Apple has sample code for a fractal generator written in OpenCL, or you could use Grand Central Dispatch. In any case your main problem is working out which parts of the application can run in parallel and how to synchronise with those that can't.