[Gridflow-dev] [PD] OpenMP and Pd
Claude Heiland-Allen
claudiusmaximus at goto10.org
Mon Dec 6 05:34:05 EST 2010
Hi Pedro,
Somehow I thought this was a new message, but the date tells me it's
from quite some time ago. Replying anyway as it may be interesting to
you and all:
On Thu, May 20, 2010 at 4:46 PM, Pedro Lopes<pedro.lopes at ist.utl.pt>
wrote something roughly along the lines of:
> I was trying to include pragma comments of OpenMp in a PD external,
> but it does not seem to work for some reason.
> undefined symbol: GOMP_parallel_start
OpenMP has a run time system that is linked into the executable when you
compile with -fopenmp - if you compile a shared object (like a Pd
external) with -fopenmp it hopes that the executable that loads it will
have the OpenMP run time system inside it. So the fix is simple: just
compile Pd itself with -fopenmp, then compile your external with
-fopenmp too, and it should Just Work (TM). Attached patch against
pd-0.42-5 allowed me to load a slightly modified version of gridflow and
see Pd using more than one core:
http://claudiusmaximus.goto10.org/g/tech/pd-gridflow-openmp.png
(After applying the patch, run "autoreconf" to regenerate "./configure")
NB: while it does use more than one core, I just compared with the
single core version of gridflow without openmp and it uses only 25% of
my cpu (on one core) while the openmp version uses 145% of my cpu
(spread over two cores). So, it's no magic bullet...
Claude
--
http://claudiusmaximus.goto10.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pd-0.42-5-openmp.patch
Type: text/x-patch
Size: 1136 bytes
Desc: not available
URL: <http://lists.artengine.ca/pipermail/gridflow-dev/attachments/20101206/6f41a460/attachment.bin>
More information about the Gridflow-dev
mailing list