Use of OpenMP

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Use of OpenMP

Post 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!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Use of OpenMP

Post 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.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: Use of OpenMP

Post 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...
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Use of OpenMP

Post 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.
Post Reply