[MacPorts] #54050: imagemagick - logic to enable or disable multiprocessing with openmp

MacPorts noreply at macports.org
Thu Apr 27 21:14:28 UTC 2017


#54050: imagemagick - logic to enable or disable multiprocessing with openmp
-------------------------+-------------------------
 Reporter:  kencu        |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:
 Keywords:               |       Port:  imagemagick
-------------------------+-------------------------
 Imagemagick has the capacity for multiprocessing, which can be desirable
 in some, but apparently not all, circumstances.

 Multiprocessing with OpenMP is automatically compiled into imagemagic,
 without specifically being requested, if the compiler supports this. As of
 this writing, the latest Xcode 8.3.2 does not appear to support OpenMP.

 {{{
 $ /usr/bin/clang --version
 Apple LLVM version 8.1.0 (clang-802.0.42)
 Target: x86_64-apple-darwin16.5.0
 Thread model: posix
 }}}
 during configuration of imagemagick:
 {{{
 checking for /usr/bin/clang++ option to support OpenMP... unsupported
 }}}

 As usual, it's not easy to figure out exactly what version of clang/llvm
 this corresponds to. Perhaps it is indeed a new enough version, but OpenMP
 support is not compiled into Apple's XCode version of clang?



 I confirm that both macports-clang-3.8.1 and macports-clang-3.9.1
 automatically enable and build in OpenMP support during the build of
 imagemagick.

 To disable multiprocessing during a build with these compilers, you must
 specifically pass the flag `--disable-openmp`.

 To achieve granular control over multiprocessing, it might desirable to
 have the default configure flags include `--disable-openmp`, and then have
 a specific `openmp` variant that either deletes or replaces this flag with
 `--enable-openmp` (both would accomplish the same end result, one is more
 obvious in it's intent though), and then passes in a requirement for
 clang-3.8.1 or newer.

 A brief read through the OpenMP clang info suggests that the OpenMP
 support is becoming more robust as clang versions progress, so perhaps the
 best idea would be to require the newest clang available to get the best
 OpenMP support.

 It is to be noted that even if OpenMP support is compiled in to
 Imagemagick, it appears that it can be controlled and essentially disabled
 by adjusting certain environment variables.

--
Ticket URL: <https://trac.macports.org/ticket/54050>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list