Bug 231163 - math/fftw3: Make options OPENMP and OPENMPI default
Summary: math/fftw3: Make options OPENMP and OPENMPI default
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-04 20:59 UTC by Yuri Victorovich
Modified: 2022-01-03 18:02 UTC (History)
1 user (show)

See Also:
jhale: maintainer-feedback+


Attachments
patch (612 bytes, patch)
2018-09-04 20:59 UTC, Yuri Victorovich
no flags Details | Diff
science/cp2k openmp safeguard (1.13 KB, patch)
2018-09-14 07:46 UTC, Jason E. Hale
yuri: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2018-09-04 20:59:19 UTC
Created attachment 196873 [details]
patch

One port that I work on requires fftw3 with OPENMP=on and OPENMPI=on.

Ideally, OPENMP and OPENMPI should be sub-packages, but we don't have sub-packages yet.

For the time being, I suggest to make them default. Once sub-package functionality arrives, they could be converted to sub-packages.

Thank you,
Yuri
Comment 1 Jason E. Hale freebsd_committer freebsd_triage 2018-09-09 13:55:38 UTC
Unfortunately, that would burden all consumers of fftw3 with gcc and openmpi including heavily used consumers like pulseaudio and ImageMagick. I think that is just too much overhead for the sake of one port.

I'm not sure what the consequences would be on tier 2 archs either. Work is being done to improve OPENMP support in the llvm ports, and I may be open to enabling that for i386 and amd64 when the dust settles. If OPENMPI is required, that would still need gfortran.

I would think that people doing intensive computations that require these options are probably going to custom build to get the most out of their machines anyways. Given the toolchain burdens, I just don't think they are good default options for the average user at the moment.
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2018-09-13 21:07:56 UTC
(In reply to Jason E. Hale from comment #1)

Jason,

I think you meant to set feedback → maintainer-feedback- I agree, introducing large dependencies isn't a good thing.

There is the port science/cp2k that needs these libraries, so I'm thinking how to accommodate this.

My next idea is to create ports math/fftw3-openmp and math/fftw3-openmpi that would build only whatever OPENMP/OPENMPI options add to math/fftw3 now.

But there are other ports, like math/fftw3-float, that should be merged into math/fftw3. It appears that you have flavors ready in math/fftw3, but they aren't enabled. Are you planning to enable flavors?

Thanks,
Yuri
Comment 3 Jason E. Hale freebsd_committer freebsd_triage 2018-09-14 07:42:48 UTC
(In reply to Yuri Victorovich from comment #2)
> I think you meant to set feedback → maintainer-feedback- I agree, introducing large dependencies isn't a good thing.

I meant to set '+' in maintainer-feedback. If you read the tooltip for maintainer-feedback (hover over with mouse), it should be set to '+' if the maintainer provides feedback (which I have) and to avoid maintainer timeout.

> There is the port science/cp2k that needs these libraries, so I'm thinking how to accommodate this.

I looked at your port and openmp support is optional. Perhaps it is recommended, but still optional. I'll attach a patch you can use in cp2k to at least allow the user to build their own package with openmp in poudriere. Even if OPENMP was on by default in fftw3, you should add this safeguard anyways in case the user turned it off.

> My next idea is to create ports math/fftw3-openmp and math/fftw3-openmpi that would build only whatever OPENMP/OPENMPI options add to math/fftw3 now.

Honestly, I don't think it is worth the effort. These ports are hacked up enough to get them to do what they do now and we really don't need 11 fftw3 ports. Like I said, people running software like this would benefit more from compiling their own fftw3 package to get the SSE optimizations. It is trivial to just enable the wanted options.

> But there are other ports, like math/fftw3-float, that should be merged into math/fftw3. It appears that you have flavors ready in math/fftw3, but they aren't enabled. Are you planning to enable flavors?

In fftw3, "flavors" is a term that upstream uses for the various precision libraries (default, float, long, quad). It has been that way long before ports FLAVORS were introduced and they have nothing to do with each other. I have no current plans to turn the slave ports into FLAVORS since there is little to no benefit. All dependent ports would have to be adjusted. Some ports only depend on the headers from the default "flavor" (audio/liblastfm, for example) and they would have to be fixed.
Comment 4 Jason E. Hale freebsd_committer freebsd_triage 2018-09-14 07:46:13 UTC
Created attachment 197087 [details]
science/cp2k openmp safeguard
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2018-09-14 07:58:10 UTC
Committed.
Thanks, Jason!
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-09-14 07:59:07 UTC
A commit references this bug:

Author: yuri
Date: Fri Sep 14 07:58:06 UTC 2018
New revision: 479762
URL: https://svnweb.freebsd.org/changeset/ports/479762

Log:
  science/cp2k: Require the option OPENMP=on in fftw3 for options OPENMP and OPENMP_MPI

  PR:		231163
  Submitted by:	jhale

Changes:
  head/science/cp2k/Makefile
Comment 7 Yuri Victorovich freebsd_committer freebsd_triage 2022-01-03 18:02:11 UTC
Hi Jason,

Now I can't update science/cp2k to 9.1.0 because it requires libfftw3_omp.

What could be a solution?


Thank you,
Yuri