From b648ec90a5724e441493185bbc9dfed8229a34e3 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 18 Jul 2023 01:54:00 -0400 Subject: [PATCH] Disable mpich, openmpi in RHEL builds These subpackages are not shipped in RHEL, so there is little value in building them. A few build fixes were needed for when both are disabled, since enviroment-modules isn't installed then either. --- fftw.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fftw.spec b/fftw.spec index 83ff5b4..07bc6b9 100644 --- a/fftw.spec +++ b/fftw.spec @@ -1,9 +1,14 @@ +%if %{defined rhel} +%bcond_with mpich +%bcond_with openmpi +%else %bcond_without mpich %ifarch s390 s390x %bcond_with openmpi %else %bcond_without openmpi %endif +%endif %if %{with mpich} %global mpi_list %{?mpi_list} mpich %endif @@ -277,9 +282,11 @@ library. %setup -q %build +%if %{with mpich} || %{with openmpi} # Explicitly load shell support for the environment-modules package, used # below via 'module' pseudo-command. . /etc/profile.d/modules.sh +%endif # Configure uses g77 by default, if present on system export F77=gfortran @@ -359,9 +366,11 @@ done %install %prec_names +%if %{with mpich} || %{with openmpi} # Explicitly load shell support for the environment-modules package, used # below via 'module' pseudo-command. source /etc/profile.d/modules.sh +%endif for((iprec=0;iprec<%{nprec};iprec++)) ; do %make_install -C ${prec_name[iprec]} @@ -384,9 +393,11 @@ find %{buildroot} -name \*.la -delete %check %prec_names +%if %{with mpich} || %{with openmpi} # Explicitly load shell support for the environment-modules package, used # below via 'module' pseudo-command. . /etc/profile.d/modules.sh +%endif bdir=$(pwd) for((iprec=0;iprec<%{nprec};iprec++)) ; do