Bug 246564 - graphics/ImageMagick7 enable openmp by default
Summary: graphics/ImageMagick7 enable openmp by default
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Daniel Engberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-19 07:07 UTC by Arno de Vries
Modified: 2023-01-12 06:04 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (kwm)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arno de Vries 2020-05-19 07:07:43 UTC
Now that OpenMP is part of BASE, it could be enabled by default so packages will use it automatically. If gives a huge performance boost.
Comment 1 Mikael Urankar freebsd_committer freebsd_triage 2020-05-19 07:13:56 UTC
(In reply to devries.arno from comment #0)
Is it available on all arches?
Comment 2 Arno de Vries 2020-05-19 09:30:58 UTC
(In reply to Mikael Urankar from comment #1)
I didn't think of that. I am not sure if aarch64 is supported in OpenMP. It was not supported in the deprecated OpenMP port, but it IS supported in LLVM. Can't find anything about the current state in FreeBSD.

But either way, isn't it possible to make the Configuration Options architecture aware? I am not that familiar with the ports build system.

If this is a problem I will have to continue using the port.But that would be a pity because it really makes a lot of difference, not only for ImageMagick.
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2020-05-20 07:17:03 UTC
(In reply to devries.arno from comment #2)
Yes:

bsd.options.mk:# OPTIONS_DEFINE_${ARCH}       - List of options this ports accept and are
bsd.options.mk:# OPTIONS_DEFAULT_${ARCH}      - List of options activated by default for a
bsd.options.mk:# OPTIONS_EXCLUDE_${ARCH}      - List of options unsupported on a given ${ARCH}
Comment 4 Daniel Engberg freebsd_committer freebsd_triage 2023-01-12 06:04:05 UTC
I've looked at a few independent sources and all shows the same conclusion that OpenMP and threads scales badly / makes things worse. The issue appears to be that each job is usually too small to utilize many cores and/or algorithms doesn't scale well on modern systems so more time is spent on dispatching the workload rather than processing it so utilizing OpenMP uses more CPU time than it being disabled.

Please re-open and provide benchmarks if this is an incorrect conclusion.