Revert "Enable AVX2 on x86_64"

This reverts commit eed891dc9d.
This commit is contained in:
David Cantrell 2023-03-27 12:04:32 -04:00
parent eed891dc9d
commit 3bf4c36be9

102
fftw.spec
View File

@ -13,7 +13,7 @@
Name: fftw Name: fftw
Version: 3.3.10 Version: 3.3.10
Release: 6%{?dist} Release: 5%{?dist}
Summary: A Fast Fourier Transform library Summary: A Fast Fourier Transform library
License: GPLv2+ License: GPLv2+
URL: http://www.fftw.org URL: http://www.fftw.org
@ -28,16 +28,6 @@ BuildRequires: gcc-gfortran
%global quad 1 %global quad 1
%endif %endif
# Names of precisions to (maybe) build
%global prec_names prec_name[0]=single;prec_name[1]=double;prec_name[2]=long;prec_name[3]=quad
# Number of precisions to build; sometimes quad is not possible
%global nprec 3
%if %{quad}
%global nprec 4
%endif
# Number of precisions to build for MPI
%global nmpiprec 3
# For check phase # For check phase
BuildRequires: time BuildRequires: time
BuildRequires: perl-interpreter BuildRequires: perl-interpreter
@ -288,7 +278,10 @@ BASEFLAGS="--enable-shared --disable-dependency-tracking --enable-threads"
BASEFLAGS+=" --enable-openmp" BASEFLAGS+=" --enable-openmp"
# Precisions to build # Precisions to build
%prec_names prec_name[0]=single
prec_name[1]=double
prec_name[2]=long
prec_name[3]=quad
# Corresponding flags # Corresponding flags
prec_flags[0]=--enable-single prec_flags[0]=--enable-single
@ -299,27 +292,31 @@ prec_flags[3]=--enable-quad-precision
%ifarch x86_64 %ifarch x86_64
# Enable SSE2 and AVX support for x86_64 # Enable SSE2 and AVX support for x86_64
for ((i=0; i<2; i++)) ; do for ((i=0; i<2; i++)) ; do
prec_flags[i]+=" --enable-sse2 --enable-avx --enable-avx2" prec_flags[i]+=" --enable-sse2 --enable-avx"
done done
%endif %endif
%ifarch %{arm64} # No NEON run time detection, not all ARM SoCs have NEON
# Compile support for NEON instructions #%ifarch %{arm}
for ((i=0; i<2; i++)) ; do ## Compile support for NEON instructions
prec_flags[i]+=" --enable-neon" #for ((i=0; i<2; i++)) ; do
done # prec_flags[i]+=" --enable-neon"
BASEFLAGS+=" --enable-armv8-cntvct-el0" #done
%endif #%endif
%ifarch ppc ppc64 #%ifarch ppc ppc64
# Compile support for Altivec instructions; only supported for single precision ## Compile support for Altivec instructions
for ((i=0; i<1; i++)) ; do #for ((i=0; i<2; i++)) ; do
prec_flags[i]+=" --enable-altivec" # prec_flags[i]+=" --enable-altivec"
done #done
%endif #%endif
# Loop over precisions # Loop over precisions
for ((iprec=0; iprec<%{nprec}; iprec++)) ; do %if %{quad}
for ((iprec=0; iprec<4; iprec++)) ; do
%else
for ((iprec=0; iprec<3; iprec++)) ; do
%endif
mkdir ${prec_name[iprec]}${ver_name[iver]} mkdir ${prec_name[iprec]}${ver_name[iver]}
cd ${prec_name[iprec]}${ver_name[iver]} cd ${prec_name[iprec]}${ver_name[iver]}
ln -s ../configure . ln -s ../configure .
@ -331,19 +328,16 @@ for ((iprec=0; iprec<%{nprec}; iprec++)) ; do
done done
# MPI Builds - this duplicates the non-mpi builds, but oh well # MPI Builds - this duplicates the non-mpi builds, but oh well
for mpi in %{?mpi_list} ; do for mpi in %{mpi_list} ; do
module load mpi/${mpi}-%{_arch} module load mpi/${mpi}-%{_arch}
# Loop over precisions - no quad precision support with MPI # Loop over precisions - no quad precision support with MPI
for((iprec=0;iprec<%{nmpiprec};iprec++)) ; do for((iprec=0;iprec<3;iprec++)) ; do
mkdir ${mpi}-${prec_name[iprec]}${ver_name[iver]} mkdir ${mpi}-${prec_name[iprec]}${ver_name[iver]}
cd ${mpi}-${prec_name[iprec]}${ver_name[iver]} cd ${mpi}-${prec_name[iprec]}${ver_name[iver]}
ln -s ../configure . ln -s ../configure .
# Force linking the _mpi.so libraries with the mpi libs. This works because # Force linking the _mpi.so libraries with the mpi libs. This works because
# we get rid of all of the non-mpi components of these builds # we get rid of all of the non-mpi components of these builds
export CC=mpicc export CC=mpicc
if [ $mpi = "openmpi" ]; then
export MPIRUN="mpirun --oversubscribe"
fi
%{configure} ${BASEFLAGS} ${prec_flags[iprec]} \ %{configure} ${BASEFLAGS} ${prec_flags[iprec]} \
--enable-mpi \ --enable-mpi \
--libdir=%{_libdir}/$mpi/lib \ --libdir=%{_libdir}/$mpi/lib \
@ -358,21 +352,23 @@ for mpi in %{?mpi_list} ; do
done done
%install %install
%prec_names
# Explicitly load shell support for the environment-modules package, used # Explicitly load shell support for the environment-modules package, used
# below via 'module' pseudo-command. # below via 'module' pseudo-command.
source /etc/profile.d/modules.sh source /etc/profile.d/modules.sh
for((iprec=0;iprec<%{nprec};iprec++)) ; do %if %{quad}
%make_install -C ${prec_name[iprec]} for ver in single double long quad ; do
%else
for ver in single double long ; do
%endif
%make_install -C $ver
done done
# MPI # MPI
for mpi in %{?mpi_list} ; do for mpi in %{mpi_list} ; do
module load mpi/${mpi}-%{_arch} module load mpi/${mpi}-%{_arch}
for((iprec=0;iprec<%{nmpiprec};iprec++)) ; do for ver in single double long ; do
%make_install -C ${mpi}-${prec_name[iprec]} %make_install -C ${mpi}-${ver}
# Remove duplicated non-mpi libraries, binaries, and data # Remove duplicated non-mpi libraries, binaries, and data
find %{buildroot}%{_libdir}/${mpi}/lib -name libfftw\* -a \! -name \*_mpi.\* -delete find %{buildroot}%{_libdir}/${mpi}/lib -name libfftw\* -a \! -name \*_mpi.\* -delete
rm -r %{buildroot}%{_libdir}/${mpi}/{bin,share} rm -r %{buildroot}%{_libdir}/${mpi}/{bin,share}
@ -384,25 +380,28 @@ rm -f %{buildroot}%{_infodir}/dir
find %{buildroot} -name \*.la -delete find %{buildroot} -name \*.la -delete
%check %check
%prec_names
# Explicitly load shell support for the environment-modules package, used # Explicitly load shell support for the environment-modules package, used
# below via 'module' pseudo-command. # below via 'module' pseudo-command.
. /etc/profile.d/modules.sh . /etc/profile.d/modules.sh
bdir=$(pwd) bdir=$(pwd)
for((iprec=0;iprec<%{nprec};iprec++)) ; do %if %{quad}
export LD_LIBRARY_PATH=$bdir/${prec_name[iprec]}/.libs:$bdir/${prec_name[iprec]}/threads/.libs for ver in single double long quad ; do
%make_build -C ${prec_name[iprec]} check %else
for ver in single double long ; do
%endif
export LD_LIBRARY_PATH=$bdir/$ver/.libs:$bdir/$ver/threads/.libs
%make_build -C $ver check
done done
# MPI # MPI
# Allow oversubscription with openmpi # Allow oversubscription with openmpi
export OMPI_MCA_rmaps_base_oversubscribe=1 export OMPI_MCA_rmaps_base_oversubscribe=1
for mpi in %{?mpi_list} ; do for mpi in %{mpi_list} ; do
module load mpi/${mpi}-%{_arch} module load mpi/${mpi}-%{_arch}
for((iprec=0;iprec<%{nmpiprec};iprec++)) ; do for ver in single double long ; do
export LD_LIBRARY_PATH=$bdir/${prec_name[iprec]}/.libs:$bdir/${prec_name[iprec]}/threads/.libs export LD_LIBRARY_PATH=$bdir/$ver/.libs:$bdir/$ver/threads/.libs
%make_build -C ${mpi}-${prec_name[iprec]}/mpi check %make_build -C ${mpi}-${ver}/mpi check
done done
module unload mpi/${mpi}-%{_arch} module unload mpi/${mpi}-%{_arch}
done done
@ -526,15 +525,6 @@ done
%endif %endif
%changelog %changelog
* Mon Mar 27 2023 David cantrell <dcantrell@redhat.com> - 3.3.10-6
- Enable AVX2 on x86_64
- Enable NEON on aarch64
- Clean up precision list
- Fix for OpenMPI build with < 4 processors
- Fix building with no enabled MPI types
- Enable single precision Altivec on PPC
- Enable CNTVCT_EL0 cycle counter support on aarch64
* Thu Mar 02 2023 Orion Poplawski <orion@nwra.com> - 3.3.10-5 * Thu Mar 02 2023 Orion Poplawski <orion@nwra.com> - 3.3.10-5
- Use make macros - Use make macros
- Drop openmpi vader workaround - Drop openmpi vader workaround