# # spec file for package fftw3 # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # %global flavor standard%{nil} %define bname fftw %define BNAME FFTW %define pname fftw3 %define vers 3.3.8 %define _ver 3_3_8 #For non HPC builds only %ifarch ppc ppc64 %define mpi_implem openmpi %else %define mpi_implem openmpi %endif %bcond_with ringdisabled %if 0%{?is_opensuse} || 0%{?is_backports} %undefine DisOMPI3 %else %define DisOMPI3 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-openmpi-hpc" %{?DisOMPI1} %global compiler_family gnu %undefine c_f_ver %global mpi_flavor openmpi %define mpi_vers 1 %bcond_without hpc %bcond_without mpi %endif %if "%{flavor}" == "gnu-openmpi2-hpc" %{?DisOMPI2} %global compiler_family gnu %undefine c_f_ver %global mpi_flavor openmpi %define mpi_vers 2 %bcond_without hpc %bcond_without mpi %endif %if "%{flavor}" == "gnu-openmpi3-hpc" %{?DisOMPI3} %global compiler_family gnu %undefine c_f_ver %global mpi_flavor openmpi %define mpi_vers 3 %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-openmpi-hpc" %{?DisOMPI1} %global compiler_family gnu %define c_f_ver 7 %global mpi_flavor openmpi %define mpi_vers 1 %bcond_without hpc %bcond_without mpi %endif %if "%{flavor}" == "gnu7-openmpi3-hpc" %{?DisOMPI3} %global compiler_family gnu %define c_f_ver 7 %global mpi_flavor openmpi %define mpi_vers 3 %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 # 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 %{hpc_init -c %compiler_family %{?c_f_ver:-v %{c_f_ver}} %{?with_mpi:-m {%mpi_flavor}} %{?mpi_ver:-V %{mpi_ver}} %{?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: %vers Release: 1.1 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: %{mpi_implem}-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: %{mpi_implem}-devel Requires: fftw3-devel = %{version} Requires: glibc-devel Requires: libfftw3_mpi3 = %{version}-%{release} %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 < - 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 2019 Egbert Eich - Add FFTW_BIN to environment variable with module file (bsc#1125824). * Tue Sep 18 2018 schwab@suse.de - Stay with openmpi also on ppc * Thu May 31 2018 antoine.belvire@opensuse.org - Fix %%install_info_delete usage. * Mon Feb 26 2018 eich@suse.com - Add support for openmpi2 for the HPC build (FATE#325089). * Thu Feb 22 2018 nmoreychaisemartin@suse.com - Switch to openmpi2 instead of openmpi (bsc#1082302), apart from ppc64 as openmpi2 does not support it. * Mon Jan 22 2018 eich@suse.com - Fix typo in flavor gnu7-hpc settings. * Fri Jan 19 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 2018 eich@suse.com - Disable the openmpi3 flavor in some products. * Fri Jan 5 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 2017 eich@suse.com - Fix library package dependencies - limit certain dependencies to HPC packages. * Sun Nov 12 2017 eich@suse.com - Fix HPC library requires package and modules file. * Tue Nov 7 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 2017 eich@suse.com - Don't use openmpi-devel for HPC builds. * Thu Oct 19 2017 eich@suse.com - Fix dependencies for the HPC devel package. * Tue Oct 17 2017 eich@suse.com - Add magic to limit the number of flavors built in the in the OBS ring. * Sat Oct 14 2017 eich@suse.com - For HPC build package static libraries as well. * Thu Oct 12 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 2017 cgoll@suse.com - removed unnedded dependency packages * Thu Sep 7 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 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 2014 mardnh@gmx.de - add support for long-double precision * Sat Apr 19 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 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 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 2012 tiwai@suse.de - Enable AVX support (bnc#763657) * Thu Apr 26 2012 adrian@suse.de - fix build on %%arm * disable neon it would require --enable-single (precision) - enable openmpi for %%arm * Fri Mar 16 2012 alinm.elena@gmail.com - source the mpi environment * Tue Mar 6 2012 dhall@wustl.edu - delete INSTALL file * Tue Mar 6 2012 dhall@wustl.edu - patch macros in man files * Tue Mar 6 2012 dhall@wustl.edu - add use of neon extensions on ARM * Tue Mar 6 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 2011 idoenmez@suse.de - Ignore rpmlint fixed dependency errors * Mon Nov 28 2011 ro@suse.de - fix build on s390/s390x without openmpi * Mon Nov 21 2011 jengelh@medozas.de - Remove redundant/unwanted tags/section (cf. specfile guidelines) - Employ shlib naming (fftw3 -> libfftw3) * Sun Oct 9 2011 adrian@suse.de - enable sse only on supported architectures * Wed Sep 28 2011 dhall@wustl.edu - enable sse2 and sse code generation * Fri Aug 5 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 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 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 2010 davejplater@gmail.com - Added provides fftw-devel * Thu Jul 16 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 2009 tiwai@suse.de - remove obsolste fdupes check in spec file - avoid unnecessary autoreconf * Mon Feb 16 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 2008 tiwai@suse.de - Reduce dependency without release number. This allows to install packages on different media with different release numbers. * Mon Apr 16 2007 tiwai@suse.de - follow library packaging policy * move docs to devel package * remove static libraries * Sat Oct 21 2006 schwab@suse.de - Fix broken macro. * Tue Aug 22 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 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 2006 mls@suse.de - converted neededforbuild to BuildRequires * Wed Apr 13 2005 tiwai@suse.de - fixed neededforbuild. * Mon Apr 26 2004 ro@suse.de - add -fno-strict-aliasing * Sat Jan 10 2004 adrian@suse.de - add missing %%defattr and %%run_ldconfig * Fri Aug 29 2003 nashif@suse.de - #29586: info file installation in wrong post segment * Wed Jul 30 2003 nashif@suse.de - Initial release