From 9c4cca7ca236db23ef8317be0578b3cac3eb1782 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Sun, 27 Nov 2022 12:30:23 -0800 Subject: [PATCH] Fix building with no MPI types enabled If both mpich and openmpi are not used (via --without options) the build fails. The list of mpi types is undefined in this case, and it is not referenced correctly to be treated as an empty list. Signed-off-by: Trent Piepho --- fftw.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fftw.spec b/fftw.spec index 7bb933d..f13434d 100644 --- a/fftw.spec +++ b/fftw.spec @@ -329,7 +329,7 @@ for ((iprec=0; iprec<%{nprec}; iprec++)) ; do done # 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} # Loop over precisions - no quad precision support with MPI for((iprec=0;iprec<%{nmpiprec};iprec++)) ; do @@ -367,7 +367,7 @@ for((iprec=0;iprec<%{nprec};iprec++)) ; do done # MPI -for mpi in %{mpi_list} ; do +for mpi in %{?mpi_list} ; do module load mpi/${mpi}-%{_arch} for((iprec=0;iprec<%{nmpiprec};iprec++)) ; do %make_install -C ${mpi}-${prec_name[iprec]} @@ -396,7 +396,7 @@ done # MPI # Allow oversubscription with openmpi export OMPI_MCA_rmaps_base_oversubscribe=1 -for mpi in %{mpi_list} ; do +for mpi in %{?mpi_list} ; do module load mpi/${mpi}-%{_arch} for((iprec=0;iprec<%{nmpiprec};iprec++)) ; do export LD_LIBRARY_PATH=$bdir/${prec_name[iprec]}/.libs:$bdir/${prec_name[iprec]}/threads/.libs @@ -529,6 +529,7 @@ done - Enable NEON on aarch64 - Clean up precision list - Fix for OpenMPI build with < 4 processors +- Fix building with no enabled MPI types * Thu Mar 02 2023 Orion Poplawski - 3.3.10-5 - Use make macros