Page 1 of 1

Use of OpenMP

Posted: 2007-09-16T09:04:19-07:00
by mi
I was very excited to discover, that modern versions of ImageMagick use OpenMP pragmas in several places of the code.

My only concern lies with the clients of -lMagick -- don't they all have to be rebuilt with the same `-fopenmp' flag as well in order to be able to use the new library (with or without parallelization)?

Or will the parallelized routines inside the library "just work" regardless of whether the calling executable itself is OpenMP-aware?

Thanks!

Re: Use of OpenMP

Posted: 2007-09-16T11:41:33-07:00
by magick
If its a problem you can always add --disable-openmp on your configure script command line. We look for libgomp and include it with libMagick which should take care of any dependencies but we do include the -fopenmp flag in the ImageMagick.pc package configuration file as well as Magick-config and Wand-config scripts. Most modern builds will use one of these methods and automatically include the -fopenmp flag at build time.

Re: Use of OpenMP

Posted: 2007-09-16T12:39:51-07:00
by mi
Thanks, I know, I can disable it, if it is a problem. My question was, is it (a problem) -- on a typical Linux/BSD platform with gcc-compiled binaries?

For example, if my Perl is built by gcc-3.4.x (which did not support OpenMP at all), will it be able to use the OpenMP-enabled PerlMagick?

And if not, perhaps, the `--disable-openmp' should be default for the time being...

Re: Use of OpenMP

Posted: 2007-09-16T12:53:25-07:00
by magick
So far we have not encountered any problems enabling OpenMP on all the systems we test on (Fedora Core, Redhat Enterprise, Centos, Solaris, Mac OS X, Windows, and 64-bit Fedora Core). We also tested against some libraries that depend on ImageMagick such as RMagick, MagickWand for PHP, iMagick, PerlMagick, etc., and they all built/passed their regression tests without complaint.