Adding configure options when installing a port

Stephen Langer stephen.langer at nist.gov
Wed Jun 16 17:31:12 PDT 2010


On Jun 16, 2010, at 6:02 PM, Scott Webster wrote:

> On Wed, Jun 16, 2010 at 2:09 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
>> So what is OpenMP? It seems it is some kind of multiprocessing library that allows some ImageMagick operations to be faster on multi-processor/multi-core systems. That sounds good, but in #15945 it is implied that no benefit is achieved unless the user sets the OMP_NUM_THREADS environment variable to something useful. Is that still the case or have they now automated that?
>> 
> 
> The number of threads seems to be automated, so disabling openmp would
> slow down anyone using imagemagick on a multicore machine. 

That's true, and I assumed that that was the reason that openmp was enabled by default.  However, the ImageMagick port not only contains stand-alone programs (like 'convert') but also libraries for using ImageMagick algorithms within other programs.  If those programs use threads, they can't use  openmp.  (The interaction of threads and openmp is not defined by the openmp standard.  They can work together on some systems, but not on OS X.)  

Therefore it's a serious mistake for a packaging system to assume that it's ok to enable openmp in libraries.   A quick solution would be to provide both openmp and no-openmp variants, which would make users choose between fast stand-alone ImageMagick programs and libraries that can be linked by threaded apps.  A better solution might be for the openmp and non-openmp versions of the libraries to have different names, so that both could be installed on the same system.

The last time I looked, ImageMagick on fink had the same problem, but the maintainer there wasn't interested in fixing it when I contacted him.

 -- Steve



--
-- stephen.langer at nist.gov                    Tel: (301) 975-5423 --
-- http://math.nist.gov/mcsd/Staff/SLanger/   Fax: (301) 975-3553 --
-- NIST, 100 Bureau Drive, Stop 8910, Gaithersburg, Md 20899-8910 --

-- "I don't think this will work.  That's why it's science."      --
--                     Naomi Langer (age 6),  17 Feb 2003         --







More information about the macports-users mailing list