From 54e895e4ead0cb4089dc3db205539ead2fe89175dd37f28673bbdb647ca6fd7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 12:29:19 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main fftw3 revision da9bab3a66204dc7b60daf7b72a82118 --- .gitattributes | 23 ++ _multibuild | 7 + fftw-3.3.10.tar.gz | 3 + fftw3-rpmlintrc | 12 + fftw3.changes | 535 ++++++++++++++++++++++++++++++++ fftw3.spec | 752 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1332 insertions(+) create mode 100644 .gitattributes create mode 100644 _multibuild create mode 100644 fftw-3.3.10.tar.gz create mode 100644 fftw3-rpmlintrc create mode 100644 fftw3.changes create mode 100644 fftw3.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..89a8fe3 --- /dev/null +++ b/_multibuild @@ -0,0 +1,7 @@ + + standard + gnu-hpc + gnu-openmpi4-hpc + gnu-mvapich2-hpc + gnu-mpich-hpc + diff --git a/fftw-3.3.10.tar.gz b/fftw-3.3.10.tar.gz new file mode 100644 index 0000000..ffd1731 --- /dev/null +++ b/fftw-3.3.10.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56c932549852cddcfafdab3820b0200c7742675be92179e59e6215b340e26467 +size 4144100 diff --git a/fftw3-rpmlintrc b/fftw3-rpmlintrc new file mode 100644 index 0000000..9b12032 --- /dev/null +++ b/fftw3-rpmlintrc @@ -0,0 +1,12 @@ +# This line is mandatory to access the configuration functions +from Config import * + +# guideline does not cover multibuild/flavor cases +addFilter("libfftw3\S+-gnu-\S+.x86_64: E: shlib-policy-name-error SONAME.*") + +# See spec file for the reason(s) +addFilter("libfftw3.* devel-file-in-non-devel-package") +addFilter("libfftw3.* hidden-file-or-dir") +addFilter('shlib-fixed-dependency') +addFilter('libfftw3.* shlib-policy-nonversioned-dir /usr/lib/hpc') +addFilter('libfftw3.* shlib-policy-nonversioned-dir /usr/share/lmod') diff --git a/fftw3.changes b/fftw3.changes new file mode 100644 index 0000000..7d1a55f --- /dev/null +++ b/fftw3.changes @@ -0,0 +1,535 @@ +------------------------------------------------------------------- +Wed Oct 25 11:53:29 UTC 2023 - Egbert Eich + +- Disable HPC flavors on %ix86 + +------------------------------------------------------------------- +Mon Oct 23 11:43:32 UTC 2023 - Nicolas Morey + +- Drop support for obsolete openmpi[123] +- Prepare support for openmpi5 + +------------------------------------------------------------------- +Wed Apr 27 08:41:39 UTC 2022 - Jan Engelhardt + +- Update rpmlintrc for shlib-policy-name-error + +------------------------------------------------------------------- +Tue Jan 18 17:01:55 CET 2022 - tiwai@suse.de + +- Don't install half-baked cmake files (bsc#1194728): + the files are incomplete and useless with the build using auto-tools + +------------------------------------------------------------------- +Sun Dec 5 20:52:00 UTC 2021 - Dirk Müller + +- update to 3.3.10: + * Fix bug that would cause 2-way SIMD (notably SSE2 in double precision) + to attempt unaligned accesses in certain obscure cases, causing + segfaults. + * This test computes a pair of length-4 real->complex transforms where + the second input is 5 real numbers away from the first input. That + is, there is a gap of one real number between the first and second + input array. The -oexhaustive level allow FFTW to attempt to + compute this transform by reducing it to a pair of complex + transforms of length 2, but now the second input is not aligned to a + complex-number boundary. The fact that 5 is odd is the problem. + * The bug cannot occur in complex->complex transforms because the + complex interface accepts strides in units of complex numbers, so + strides are aligned by construction. + +------------------------------------------------------------------- +Fri Apr 30 11:40:09 UTC 2021 - Dominique Leuenberger + +- Follow the distro default openmpi implementation: + + Eliminate the usage of the mpi_implem variable (obsolete) + + BuildRequire openmpi-macros-devel instead of %{mpi_implem}-devel + + Require openmpi-devel in the mpi-devel package + + Use %setup_openmpi to source mpivars.sh + +------------------------------------------------------------------- +Sat Feb 6 10:13:41 UTC 2021 - Egbert Eich + +- Add build support for gcc10 to HPC build (bsc#1174439). + +------------------------------------------------------------------- +Sun Jan 24 19:36:58 UTC 2021 - Dirk Müller + +- update to 3.3.9: + * New API fftw_planner_nthreads() returns the number of threads + currently being used by the planner. + * Fix incorrect math in 128-bit generic SIMD + * Fix wisdom for avx512. + The avx512 alignment requirement was set to 64 bytes, but this is + wrong. Alignment requirements are a property of the platform (e.g., + x86) and not of the instruction set (e.g., AVX). Among other + things, this broke wisdom with avx512. + Note that avx512 support is still experimental because the FFTW + authors have no avx512 hardware available for testing. + * fftw_threads_set_callback function to change the threading backend at runtime. + +------------------------------------------------------------------- +Fri Aug 21 13:00:52 UTC 2020 - Michel Normand + +- Remove specific mpi_implemen define for ppc/ppc64 (was openmpi) + to use same openmpi2 as other architectures. + +------------------------------------------------------------------- +Mon Jul 20 18:34:40 UTC 2020 - Egbert Eich + +- Add gnu compiler support up to gcc9. +- Fix typo which caused issus building openmpi HPC flavors + (bsc#1174329). +- Add support for openmpi4 (provided by Alin Marin Elena). + +------------------------------------------------------------------- +Sat Jun 6 22:20:41 UTC 2020 - Atri Bhattacharya + +- Fix BuildFailures for openSUSE >= 1550: + * Correct info dir. + * Fix ill-formatted comments. + +------------------------------------------------------------------- +Fri Nov 29 15:00:55 UTC 2019 - Egbert Eich + +- Disable openmpi1 builds for SLE/Leap > 15.1. +- Enable openmpi3 builds for Leap and SLE > 15.1 (jsc#SLE-7773). + +------------------------------------------------------------------- +Fri Sep 13 16:00:11 UTC 2019 - Michel Normand + +- Add -ffat-lto-objects to avoid build failure + +------------------------------------------------------------------- +Mon Mar 18 17:36:14 UTC 2019 - Rodrigo Lourenço + +- Update to 3.3.8: + * Fixed AVX, AVX2 for gcc-8. + +- Release notes for 3.3.7: + * Experimental support for CMake. + * Fixes for armv7a cycle counter. + * Official support for aarch64, now that we have hardware to test it. + * Tweak usage of FMA instructions in a way that favors newer processors + (Skylake and Ryzen) over older processors (Haswell). + * tests/bench: use 64-bit precision to compute mflops. + +------------------------------------------------------------------- +Mon Feb 18 17:22:34 UTC 2019 - Egbert Eich + +- Add FFTW_BIN to environment variable with module file (bsc#1125824). + +------------------------------------------------------------------- +Tue Sep 18 08:09:32 UTC 2018 - schwab@suse.de + +- Stay with openmpi also on ppc + +------------------------------------------------------------------- +Thu May 31 20:44:50 UTC 2018 - antoine.belvire@opensuse.org + +- Fix %install_info_delete usage. + +------------------------------------------------------------------- +Mon Feb 26 14:48:04 UTC 2018 - eich@suse.com + +- Add support for openmpi2 for the HPC build (FATE#325089). + +------------------------------------------------------------------- +Thu Feb 22 15:02:28 UTC 2018 - nmoreychaisemartin@suse.com + +- Switch to openmpi2 instead of openmpi (bsc#1082302), + apart from ppc64 as openmpi2 does not support it. + +------------------------------------------------------------------- +Mon Jan 22 16:14:42 UTC 2018 - eich@suse.com + +- Fix typo in flavor gnu7-hpc settings. + +------------------------------------------------------------------- +Fri Jan 19 06:47:04 UTC 2018 - eich@suse.com + +- Change the name of the MPI version of the module file directory + to pfftw3 to distinguish it from the 'serial' one (boo#1075933). + +------------------------------------------------------------------- +Fri Jan 12 15:33:40 UTC 2018 - eich@suse.com + +- Disable the openmpi3 flavor in some products. + +------------------------------------------------------------------- +Fri Jan 5 18:32:30 UTC 2018 - eich@suse.com + +- Add gcc7 as additional compiler flavor for HPC on SLES. +- Fix library package requires - use HPC macro (boo#1074890). +- Add support for mpich and openmpi3 for HPC. + +------------------------------------------------------------------- +Tue Nov 14 16:23:54 UTC 2017 - eich@suse.com + +- Fix library package dependencies - limit certain + dependencies to HPC packages. + +------------------------------------------------------------------- +Sun Nov 12 16:25:33 UTC 2017 - eich@suse.com + +- Fix HPC library requires package and modules file. + +------------------------------------------------------------------- +Tue Nov 7 11:33:09 UTC 2017 - eich@suse.com + +- update to 3.3.6-pl2 + * Bugfix: MPI Fortran-03 headers were missing in FFTW 3.3.6-pl1. + * Bugfix: FFTW 3.3.6 had the wrong libtool version number, and generated + shared libraries of the form libfftw3.so.2.6.6 instead of + libfftw3.so.3.*. + * The fftw_make_planner_thread_safe() API introduced in 3.3.5 didn't + work, and this 3.3.6 fixes it. Sorry about that. + * compilation fixes for IBM XLC + * compilation fixes for threads on Windows + * fix SIMD autodetection on amd64 when (_MSC_VER > 1500) + +------------------------------------------------------------------- +Mon Oct 23 11:51:13 UTC 2017 - eich@suse.com + +- Don't use openmpi-devel for HPC builds. + +------------------------------------------------------------------- +Thu Oct 19 11:39:08 UTC 2017 - eich@suse.com + +- Fix dependencies for the HPC devel package. + +------------------------------------------------------------------- +Tue Oct 17 13:23:12 UTC 2017 - eich@suse.com + +- Add magic to limit the number of flavors built in the + in the OBS ring. + +------------------------------------------------------------------- +Sat Oct 14 17:13:06 UTC 2017 - eich@suse.com + +- For HPC build package static libraries as well. + +------------------------------------------------------------------- +Thu Oct 12 05:46:35 UTC 2017 - eich@suse.com + +- Generate baselib.conf dynamically and only for the non-HPC + build: this avoids issues with the source validator. + +------------------------------------------------------------------- +Mon Sep 25 09:36:55 UTC 2017 - cgoll@suse.com + +- removed unnedded dependency packages + +------------------------------------------------------------------- +Thu Sep 7 07:46:53 UTC 2017 - cgoll@suse.com + +- rewrote for hpc library support + * added environment modules + * reduced number of hpc realted packages to two + (FATE#321716). + +------------------------------------------------------------------- +Mon Aug 1 22:03:49 UTC 2016 - mardnh@gmx.de + +- update to version 3.3.5 + * New SIMD support: + - Power8 VSX instructions in single and double precision. + To use, add --enable-vsx to configure. + - Support for AVX2 (256-bit FMA instructions). + To use, add --enable-avx2 to configure. + - Experimental support for AVX512 and KCVI. (--enable-avx512, --enable-kcvi) + This code is expected to work but the FFTW maintainers do not have + hardware to test it. + - Support for AVX128/FMA (for some AMD machines) (--enable-avx128-fma) + - Double precision Neon SIMD for aarch64. + This code is expected to work but the FFTW maintainers do not have + hardware to test it. + - generic SIMD support using gcc vector intrinsics + * Add fftw_make_planner_thread_safe() API + * fix #18 (disable float128 for CUDACC) + * fix #19: missing Fortran interface for fftwq_alloc_real + * fix #21 (don't use float128 on Portland compilers, which pretend to be gcc) + * fix: Avoid segfaults due to double free in MPI transpose + +------------------------------------------------------------------- +Sat Apr 19 19:16:23 UTC 2014 - mardnh@gmx.de + +- add support for long-double precision + +------------------------------------------------------------------- +Sat Apr 19 17:37:38 UTC 2014 - mardnh@gmx.de + +- update to version 3.3.4 + + * New functions fftw_alignment_of (to check whether two arrays are equally + aligned for the purposes of applying a plan) and fftw_sprint_plan + (to output a description of plan to a string). + + * Bugfix in fftw-wisdom-to-conf; thanks to Florian Oppermann for the bug report. + + * Fixed manual to work with texinfo-5. + + * Increased timing interval on x86_64 to reduce timing errors. + + * Default to Win32 threads, not pthreads, if both are present. + + * Various build-script fixes. + +- Drop obsoleted 1_man_macro.patch + +------------------------------------------------------------------- +Sun Dec 16 19:26:48 UTC 2012 - dhall@wustl.edu + +- update to version 3.3.3 + * Fix deadlock bug in MPI transforms (thanks to Michael Pippig for the bug + report and patch, and to Graham Dennis for the bug report). + + * Use 128-bit ARM NEON instructions instead of 64-bit instructions. This + change appears to speed up even ARM processors with a 64-bit NEON pipe. + + * Speed improvements for single-precision AVX. + + * Speed up planner on machines without "official" cycle counters, such as ARM. + +------------------------------------------------------------------- +Tue Jul 3 18:31:53 UTC 2012 - coolo@suse.com + +- update to 3.3.2 to fix crashes with gcc 4.7 + + * Removed an archaic stack-alignment hack that was failing with + gcc-4.7/i386. + + * Added stack-alignment hack necessary for gcc on Windows/i386. We + will regret this in ten years (see previous change). + + * Fix incompatibility with Intel icc which pretends to be gcc + but does not support quad precision. + + * make libfftw{threads,mpi} depend upon libfftw when using libtool; + this is consistent with most other libraries and simplifies the life + of various distributors of GNU/Linux. + +------------------------------------------------------------------- +Tue May 29 14:43:58 CEST 2012 - tiwai@suse.de + +- Enable AVX support (bnc#763657) + +------------------------------------------------------------------- +Thu Apr 26 04:26:02 UTC 2012 - adrian@suse.de + +- fix build on %arm + * disable neon it would require --enable-single (precision) +- enable openmpi for %arm + +------------------------------------------------------------------- +Fri Mar 16 01:17:58 UTC 2012 - alinm.elena@gmail.com + +- source the mpi environment + +------------------------------------------------------------------- +Tue Mar 6 14:16:22 UTC 2012 - dhall@wustl.edu + +- delete INSTALL file + +------------------------------------------------------------------- +Tue Mar 6 10:35:15 UTC 2012 - dhall@wustl.edu + +- patch macros in man files + +------------------------------------------------------------------- +Tue Mar 6 00:32:24 UTC 2012 - dhall@wustl.edu + +- add use of neon extensions on ARM + +------------------------------------------------------------------- +Tue Mar 6 00:12:32 UTC 2012 - dhall@wustl.edu + +- updated to version 3.3.1 + * Reduced planning time in estimate mode for sizes with large prime factors. + * Added AVX autodetection under Visual Studio. Thanks Carsten Steger for submitting + the necessary code. + * Modern Fortran interface now uses a separate fftw3l.f03 interface file for the + long double interface, which is not supported by some Fortran compilers. Provided + new fftw3q.f03 interface file to access the quadruple-precision FFTW routines + with recent versions of gcc/gfortran. + * Added support for the NEON extensions to the ARM ISA. + * MPI code now compiles even if mpicc is a C++ compiler; thanks to Kyle Spyksma for + the bug report. + +------------------------------------------------------------------- +Mon Nov 28 13:33:44 UTC 2011 - idoenmez@suse.de + +- Ignore rpmlint fixed dependency errors + +------------------------------------------------------------------- +Mon Nov 28 01:48:17 CET 2011 - ro@suse.de + +- fix build on s390/s390x without openmpi + +------------------------------------------------------------------- +Mon Nov 21 17:45:00 UTC 2011 - jengelh@medozas.de + +- Remove redundant/unwanted tags/section (cf. specfile guidelines) +- Employ shlib naming (fftw3 -> libfftw3) + +------------------------------------------------------------------- +Sun Oct 9 17:48:50 UTC 2011 - adrian@suse.de + +- enable sse only on supported architectures + +------------------------------------------------------------------- +Wed Sep 28 02:22:14 UTC 2011 - dhall@wustl.edu + +- enable sse2 and sse code generation + +------------------------------------------------------------------- +Fri Aug 5 22:44:51 UTC 2011 - dhall@wustl.edu + +- specfile cleanup + * Remove authors from description + * use %makeinstall +- fix devel and mpi-devel to include proper header files + +------------------------------------------------------------------- +Wed Aug 3 13:58:49 UTC 2011 - dhall@wustl.edu + +- updated to version 3.3: + * Compiling OpenMP support (--enable-openmp) now installs a fftw3_omp + library, instead of fftw3_threads, so that OpenMP and POSIX threads + (--enable-threads) libraries can be built and installed at the same time. + * Add support for the AVX extensions to x86 and x86-64 + * Added Fortran 2003 interface + * Added MPI distributed-memory transforms + * Add support for quad-precision __float128 in gcc 4.6 or later (on x86. + x86-64, and Itanium). The new routines use the fftwq_ prefix. + * New convenience functions fftw_alloc_real and fftw_alloc_complex to use + fftw_malloc for real and complex arrays without typecasts or sizeof. + * New convenience functions fftw_export_wisdom_to_filename and + fftw_import_wisdom_from_filename that export/import wisdom to a file, which + don't require you to open/close the file yourself. + * New function fftw_cost to return FFTW's internal cost metric for a given plan + * Remove --enable-portable-binary flag: we new produce portable binaries by default. + * Fixed build problem failure when srand48 declaration is missing + * Fixed bug in fftw_set_timelimit: ensure that a negative timelimit is equivalent + to no timelimit in all cases + * Fixed stack-overflow problem on OpenBSD caused by using alloca with too + large a buffer. +- added openmp library support +- added mpi library support + +------------------------------------------------------------------- +Sun Apr 24 12:59:34 UTC 2011 - toddrme2178@gmail.com + +- Add 32bit compatibility libraries +- Changed -devel package groups to Development/Libraries/C and C++ (fix for RPMLINT warning) + +------------------------------------------------------------------- +Thu Apr 22 18:59:44 UTC 2010 - davejplater@gmail.com + +- Added provides fftw-devel + +------------------------------------------------------------------- +Thu Jul 16 15:27:24 CEST 2009 - tiwai@suse.de + +- updated to version 3.2.2: + * Improve performance of some copy operations of complex arrays + * Add configure flag to disable alloca() + * Planning in FFTW_ESTIMATE mode for r2r transforms became slower + between fftw-3.1.3 and 3.2. This regression has now been fixed. + +------------------------------------------------------------------- +Thu Apr 23 17:36:12 CEST 2009 - tiwai@suse.de + +- remove obsolste fdupes check in spec file +- avoid unnecessary autoreconf + +------------------------------------------------------------------- +Mon Feb 16 12:24:16 CET 2009 - tiwai@suse.de + +- updated to version 3.2: + * major version up, performance improvements and SIMD support + * Worked around apparent glibc bug that leads to rare hangs + * Fixed segfault due to unaligned access + * MPI transforms not included, as they are still in alpha +- updated to version 3.2.1: + * Performance improvements for some multidimensional r2c/c2r + transforms + * Compile with icc on MacOS X, use better icc compiler flags. + * Compilation fixes for systems where snprintf is defined as a + macro + * Fortran documentation now recommends not using dfftw_execute, + because of reports of problems with various Fortran compilers + * Some documentation clarifications + * FAQ was accidentally omitted from 3.2 tarball. + * Remove some extraneous (harmless) files accidentally included + in a subdirectory of the 3.2 tarball. + +------------------------------------------------------------------- +Sat Aug 2 10:46:31 CEST 2008 - tiwai@suse.de + +- Reduce dependency without release number. + This allows to install packages on different media with + different release numbers. + +------------------------------------------------------------------- +Mon Apr 16 17:07:05 CEST 2007 - tiwai@suse.de + +- follow library packaging policy + * move docs to devel package + * remove static libraries + +------------------------------------------------------------------- +Sat Oct 21 15:50:52 CEST 2006 - schwab@suse.de + +- Fix broken macro. + +------------------------------------------------------------------- +Tue Aug 22 13:09:41 CEST 2006 - tiwai@suse.de + +- updated to version 3.1.2: + * correct bug in configure script + * updated FAQ + * use -maltivec when checking for altivec.h. +- clean up spec file, using %configure macro. + +------------------------------------------------------------------- +Thu May 18 16:33:14 CEST 2006 - tiwai@suse.de + +- major update to version 3.1.1: + * fixed texi files + * lots of configure fixes + * clean up and optimizations + see ChangeLog for details +- added missing glibc-devel to Requires of devel subpackages +- removed -fno-strict-aliasing option + +------------------------------------------------------------------- +Wed Jan 25 21:35:52 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Wed Apr 13 14:19:35 CEST 2005 - tiwai@suse.de + +- fixed neededforbuild. + +------------------------------------------------------------------- +Tue Apr 27 01:27:36 CEST 2004 - ro@suse.de + +- add -fno-strict-aliasing + +------------------------------------------------------------------- +Sat Jan 10 14:45:42 CET 2004 - adrian@suse.de + +- add missing %defattr and %run_ldconfig + +------------------------------------------------------------------- +Fri Aug 29 05:38:19 CEST 2003 - nashif@suse.de + +- #29586: info file installation in wrong post segment + +------------------------------------------------------------------- +Wed Jul 30 18:00:20 CEST 2003 - nashif@suse.de + +- Initial release + diff --git a/fftw3.spec b/fftw3.spec new file mode 100644 index 0000000..a553349 --- /dev/null +++ b/fftw3.spec @@ -0,0 +1,752 @@ +# +# spec file +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} + +%define bname fftw +%define BNAME FFTW +%define pname fftw3 +%define _ver 3_3_10 + +%bcond_with ringdisabled + +%if 0%{?sle_version} >= 150200 +%define DisOMPI1 ExclusiveArch: do_not_build +%endif +%if !0%{?is_opensuse:1} && 0%{?sle_version:1} && 0%{?sle_version} < 150200 +%define DisOMPI3 ExclusiveArch: do_not_build +%endif + +%if !0%{?is_opensuse:1} && 0%{?sle_version:1} && 0%{?sle_version} < 150300 +%define DisOMPI4 ExclusiveArch: do_not_build +%endif + +%if "%flavor" == "" +ExclusiveArch: do_not_build +%define package_name %pname +%endif + +# Magic for OBS Staging. Only build the flavors required by +# other packages in the ring. +%if %{with ringdisabled} + %if "%flavor" != "standard" +ExclusiveArch: do_not_build + %endif +%endif + +%if "%{flavor}" == "standard" +%define mpi_flavor standard +%bcond_without mpi +%bcond_with hpc +%bcond_without system_packages +%endif + +%if "%flavor" == "gnu-hpc" +%define compiler_family gnu +%undefine c_f_ver +%bcond_with mpi +%bcond_without hpc +%endif + +%if "%{flavor}" == "gnu-openmpi4-hpc" +%{?DisOMPI4} +%global compiler_family gnu +%undefine c_f_ver +%global mpi_flavor openmpi +%define mpi_vers 4 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu-openmpi5-hpc" +%{?DisOMPI5} +%global compiler_family gnu +%undefine c_f_ver +%global mpi_flavor openmpi +%define mpi_vers 5 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu-mvapich2-hpc" +%global compiler_family gnu +%undefine c_f_ver +%define mpi_flavor mvapich2 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu-mpich-hpc" +%global compiler_family gnu +%undefine c_f_ver +%define mpi_flavor mpich +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%flavor" == "gnu7-hpc" +%define compiler_family gnu +%define c_f_ver 7 +%bcond_with mpi +%bcond_without hpc +%endif + +%if "%{flavor}" == "gnu7-openmpi4-hpc" +%{?DisOMPI4} +%global compiler_family gnu +%define c_f_ver 7 +%global mpi_flavor openmpi +%define mpi_vers 4 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu7-openmpi5-hpc" +%{?DisOMPI5} +%global compiler_family gnu +%define c_f_ver 7 +%global mpi_flavor openmpi +%define mpi_vers 5 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu7-mvapich2-hpc" +%global compiler_family gnu +%define c_f_ver 7 +%define mpi_flavor mvapich2 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu7-mpich-hpc" +%global compiler_family gnu +%define c_f_ver 7 +%define mpi_flavor mpich +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%flavor" == "gnu8-hpc" +%define compiler_family gnu +%define c_f_ver 8 +%bcond_with mpi +%bcond_without hpc +%endif + +%if "%{flavor}" == "gnu8-openmpi4-hpc" +%{?DisOMPI4} +%global compiler_family gnu +%define c_f_ver 8 +%global mpi_flavor openmpi +%define mpi_vers 4 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu8-openmpi5-hpc" +%{?DisOMPI5} +%global compiler_family gnu +%define c_f_ver 8 +%global mpi_flavor openmpi +%define mpi_vers 5 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu8-mvapich2-hpc" +%global compiler_family gnu +%define c_f_ver 8 +%define mpi_flavor mvapich2 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu8-mpich-hpc" +%global compiler_family gnu +%define c_f_ver 8 +%define mpi_flavor mpich +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%flavor" == "gnu9-hpc" +%define compiler_family gnu +%define c_f_ver 9 +%bcond_with mpi +%bcond_without hpc +%endif + +%if "%{flavor}" == "gnu9-openmpi4-hpc" +%{?DisOMPI4} +%global compiler_family gnu +%define c_f_ver 9 +%global mpi_flavor openmpi +%define mpi_vers 4 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu9-openmpi5-hpc" +%{?DisOMPI5} +%global compiler_family gnu +%define c_f_ver 9 +%global mpi_flavor openmpi +%define mpi_vers 5 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu9-mvapich2-hpc" +%global compiler_family gnu +%define c_f_ver 9 +%define mpi_flavor mvapich2 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu9-mpich-hpc" +%global compiler_family gnu +%define c_f_ver 9 +%define mpi_flavor mpich +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%flavor" == "gnu10-hpc" +%define compiler_family gnu +%define c_f_ver 10 +%bcond_with mpi +%bcond_without hpc +%endif + +%if "%{flavor}" == "gnu10-openmpi4-hpc" +%{?DisOMPI4} +%global compiler_family gnu +%define c_f_ver 10 +%global mpi_flavor openmpi +%define mpi_vers 4 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu10-openmpi5-hpc" +%{?DisOMPI5} +%global compiler_family gnu +%define c_f_ver 10 +%global mpi_flavor openmpi +%define mpi_vers 5 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu10-mvapich2-hpc" +%global compiler_family gnu +%define c_f_ver 10 +%define mpi_flavor mvapich2 +%bcond_without hpc +%bcond_without mpi +%endif + +%if "%{flavor}" == "gnu10-mpich-hpc" +%global compiler_family gnu +%define c_f_ver 10 +%define mpi_flavor mpich +%bcond_without hpc +%bcond_without mpi +%endif + +# now exchange the paths +%if %{with hpc} +%{?mpi_flavor:%{bcond_without mpi}}%{!?mpi_flavor:%{bcond_with mpi}} +%{?with_hpc:%{!?compiler_family:%global compiler_family gnu}} +%{?with_mpi:%{!?mpi_flavor:%global mpi_flavor openmpi}} +%{?with_mpi:%global hpc_module_pname p%{pname}} +# needed by the hpc tools +ExcludeArch: %ix86 +%{hpc_init -c %compiler_family %{?c_f_ver:-v %{c_f_ver}} %{?with_mpi:-m {%mpi_flavor}} %{?mpi_vers:-V %{mpi_vers}} %{?ext:-e %{ext}}} +%define package_base %{hpc_install_path_base} +%define package_prefix %hpc_prefix +%define package_bindir %hpc_bindir +%define package_libdir %hpc_libdir +%define package_datadir %hpc_datadir +%define package_includedir %hpc_includedir +%define package_mandir %hpc_mandir +%define package_docdir %hpc_docdir +%define package_infodir %hpc_infodir +%define package_name %{hpc_package_name %_ver} +%define package_libname lib%{package_name} +%else +%define package_base %{_prefix} +%define package_prefix %{_prefix} +%define package_bindir %{_bindir} +%define package_libdir %{_libdir} +%define package_datadir %{_datadir} +%define package_includedir %{_includedir} +%define package_mandir %{_mandir} +%define package_docdir %{_docdir} +%define package_infodir %{_infodir} +%define package_name %pname%{?my_suffix} +%define package_libname lib%{pname}-3 +%endif + +Name: %package_name +BuildRequires: fdupes +BuildRequires: pkgconfig +Version: 3.3.10 +Release: 0 +Summary: Discrete Fourier Transform (DFT) C Subroutine Library +License: GPL-2.0-or-later +Group: Productivity/Scientific/Math +URL: http://www.fftw.org +Source: ftp://ftp.fftw.org/pub/fftw/fftw-%{version}%{?pl_ext:-%{pl_ext}}.tar.gz +Source1: %{pname}-rpmlintrc +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if %{with hpc} +BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel +BuildRequires: lua-lmod +BuildRequires: suse-hpc +%if %{with mpi} +BuildRequires: %{mpi_flavor}%{?mpi_vers}-%{compiler_family}%{?c_f_ver}-hpc-macros-devel +%endif +%else +BuildRequires: gcc-c++ +BuildRequires: gcc-fortran +Requires: %{package_name}-libs = %{version} +%ifnarch s390 s390x +BuildRequires: openmpi-macros-devel +%endif +%endif + +%description +FFTW is a C subroutine library for computing the Discrete Fourier +Transform (DFT) in one or more dimensions, of both real and complex +data, and of arbitrary input size. + +%if %{with hpc} +%%{hpc_master_package -L} +%{hpc_master_package -l} +%{hpc_master_package -a devel} +%endif + +%package devel +Summary: Include Files and Libraries mandatory for Development +Group: Development/Libraries/C and C++ +Requires: %package_libname = %{version}-%{release} +Requires: glibc-devel +Requires(post): %install_info_prereq +Requires(preun):%install_info_prereq +%if %{with hpc} +%hpc_requires_devel +%endif +Provides: fftw-devel + +%description devel +This package contains all necessary include files and libraries needed +to develop applications that require these. + +%package devel-static +Summary: Static libraries for %{pname} +Group: Development/Libraries/C and C++ +Requires: %{name}-devel + +%description devel-static +Libraries to build statically linked applications with fftw3. + +%package -n %package_libname +Summary: Discrete Fourier Transform (DFT) C Subroutine Library +# Remove Prov/Obs when appropriate; were added 2011-Nov-21 (post-openSUSE-12.1) +Group: System/Libraries +Provides: fftw3 = %{version}-%{release} +Obsoletes: fftw3 < 3.3 +%if %{with hpc} +%hpc_requires +%endif + +%description -n %package_libname +FFTW is a C subroutine library for computing the Discrete Fourier +Transform (DFT) in one or more dimensions, of both real and complex +data, and of arbitrary input size. + +%if %{without hpc} +%package -n libfftw3_threads3 +Summary: Discrete Fourier Transform (DFT) C subroutine library +Group: Productivity/Scientific/Math +Provides: fftw3-threads = %{version}-%{release} +Obsoletes: fftw3-threads < 3.3 +# libfftw3_threads.so does not have a DT_NEEDED entry for fftw symbols, since it +# may be used with either libfftw3.so or libfftw3f.so. Hence, manual Requires. +#Requires: libfftw3-3 = %%{version} + +%description -n libfftw3_threads3 +FFTW is a C subroutine library for computing the Discrete Fourier +Transform (DFT) in one or more dimensions, of both real and complex +data, and of arbitrary input size. + +%package threads-devel +Summary: Discrete Fourier Transform (DFT) C subroutine library +Group: Development/Libraries/C and C++ +Requires: fftw3-devel = %{version}-%{release} +Requires: glibc-devel +Requires: libfftw3_threads3 = %{version}-%{release} + +%description threads-devel +FFTW is a C subroutine library for computing the Discrete Fourier +Transform (DFT) in one or more dimensions, of both real and complex +data, and of arbitrary input size. + +%package -n libfftw3_omp3 +Summary: Discrete Fourier Transform (DFT) C subroutine library +Group: Productivity/Scientific/Math +Provides: fftw3-openmp = %{version}-%{release} +Obsoletes: fftw3-openmp < 3.3 +# Same as libfftw3_threads.so: manual Requires for fftw3 main lib +#Requires: libfftw3-3 = %%{version} + +%description -n libfftw3_omp3 +FFTW is a C subroutine library for computing the Discrete Fourier +Transform (DFT) in one or more dimensions, of both real and complex +data, and of arbitrary input size. + +%package openmp-devel +Summary: Discrete Fourier Transform (DFT) C subroutine library +Group: Development/Libraries/C and C++ +Requires: fftw3-devel = %{version}-%{release} +Requires: glibc-devel +Requires: libfftw3_omp3 = %{version}-%{release} + +%description openmp-devel +FFTW is a C subroutine library for computing the Discrete Fourier +Transform (DFT) in one or more dimensions, of both real and complex +data, and of arbitrary input size. +%endif + +%ifnarch s390 s390x +%package -n libfftw3_mpi3 +Summary: Discrete Fourier Transform (DFT) C subroutine library +Group: Productivity/Scientific/Math +Provides: fftw3-mpi = %{version}-%{release} +Obsoletes: fftw3-mpi < 3.3 +# Same as libfftw3_threads.so: manual Requires for fftw3 main lib +#Requires: libfftw3-3 = %%{version} +#Requires: openmpi + +%description -n libfftw3_mpi3 +FFTW is a C subroutine library for computing the Discrete Fourier +Transform (DFT) in one or more dimensions, of both real and complex +data, and of arbitrary input size. + +%package mpi-devel +Summary: Discrete Fourier Transform (DFT) C subroutine library +Group: Development/Libraries/C and C++ +Requires: fftw3-devel = %{version} +Requires: glibc-devel +Requires: libfftw3_mpi3 = %{version}-%{release} +Requires: openmpi-devel + +%description mpi-devel +FFTW is a C subroutine library for computing the Discrete Fourier +Transform (DFT) in one or more dimensions, of both real and complex +data, and of arbitrary input size. +%endif + +%prep +%setup -q -n %{bname}-%{version}%{?pl_ext:-%{pl_ext}} + +%if %{without hpc} +cat > %{_sourcedir}/baselibs.conf <