Run OpenMPI with --oversubscribe option on riscv64
Otherwise OpenMPI complains there are not enough slots on SiFive HiFive Unmatched boards. Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
parent
b6ba4c02f7
commit
6b98ceb5c2
67
fftw-openmpi-oversubscribe.patch
Normal file
67
fftw-openmpi-oversubscribe.patch
Normal file
@ -0,0 +1,67 @@
|
||||
diff --git a/mpi/Makefile.am b/mpi/Makefile.am
|
||||
index 8e43fac..a44100e 100644
|
||||
--- a/mpi/Makefile.am
|
||||
+++ b/mpi/Makefile.am
|
||||
@@ -50,24 +50,24 @@ CHECKOPTS = --verbose --random --maxsize=$(CHECKSIZE) -c=$(NUMCHECK) $(CHECK_PL_
|
||||
if MPI
|
||||
|
||||
check-local: mpi-bench$(EXEEXT)
|
||||
- perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) -np 1 `pwd`/mpi-bench"
|
||||
+ perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) $(MPIARGS) -np 1 `pwd`/mpi-bench"
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " MPI FFTW transforms passed "$(NUMCHECK)" tests, 1 CPU"
|
||||
@echo "--------------------------------------------------------------"
|
||||
- perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) -np 2 `pwd`/mpi-bench"
|
||||
+ perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) $(MPIARGS) -np 2 `pwd`/mpi-bench"
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " MPI FFTW transforms passed "$(NUMCHECK)" tests, 2 CPUs"
|
||||
@echo "--------------------------------------------------------------"
|
||||
- perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) -np 3 `pwd`/mpi-bench"
|
||||
+ perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) $(MPIARGS) -np 3 `pwd`/mpi-bench"
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " MPI FFTW transforms passed "$(NUMCHECK)" tests, 3 CPUs"
|
||||
@echo "--------------------------------------------------------------"
|
||||
- perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) -np 4 `pwd`/mpi-bench"
|
||||
+ perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) $(MPIARGS) -np 4 `pwd`/mpi-bench"
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " MPI FFTW transforms passed "$(NUMCHECK)" tests, 4 CPUs"
|
||||
@echo "--------------------------------------------------------------"
|
||||
if SMP
|
||||
- perl -w $(CHECK) $(CHECKOPTS) --mpi --nthreads=2 "$(MPIRUN) -np 3 `pwd`/mpi-bench"
|
||||
+ perl -w $(CHECK) $(CHECKOPTS) --mpi --nthreads=2 "$(MPIRUN) $(MPIARGS) -np 3 `pwd`/mpi-bench"
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " MPI FFTW threaded transforms passed "$(NUMCHECK)" tests!"
|
||||
@echo "--------------------------------------------------------------"
|
||||
diff --git a/mpi/Makefile.in b/mpi/Makefile.in
|
||||
index 0041d0f..9f994b3 100644
|
||||
--- a/mpi/Makefile.in
|
||||
+++ b/mpi/Makefile.in
|
||||
@@ -990,23 +990,23 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
|
||||
|
||||
|
||||
@MPI_TRUE@check-local: mpi-bench$(EXEEXT)
|
||||
-@MPI_TRUE@ perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) -np 1 `pwd`/mpi-bench"
|
||||
+@MPI_TRUE@ perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) $(MPIARGS) -np 1 `pwd`/mpi-bench"
|
||||
@MPI_TRUE@ @echo "--------------------------------------------------------------"
|
||||
@MPI_TRUE@ @echo " MPI FFTW transforms passed "$(NUMCHECK)" tests, 1 CPU"
|
||||
@MPI_TRUE@ @echo "--------------------------------------------------------------"
|
||||
-@MPI_TRUE@ perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) -np 2 `pwd`/mpi-bench"
|
||||
+@MPI_TRUE@ perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) $(MPIARGS) -np 2 `pwd`/mpi-bench"
|
||||
@MPI_TRUE@ @echo "--------------------------------------------------------------"
|
||||
@MPI_TRUE@ @echo " MPI FFTW transforms passed "$(NUMCHECK)" tests, 2 CPUs"
|
||||
@MPI_TRUE@ @echo "--------------------------------------------------------------"
|
||||
-@MPI_TRUE@ perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) -np 3 `pwd`/mpi-bench"
|
||||
+@MPI_TRUE@ perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) $(MPIARGS) -np 3 `pwd`/mpi-bench"
|
||||
@MPI_TRUE@ @echo "--------------------------------------------------------------"
|
||||
@MPI_TRUE@ @echo " MPI FFTW transforms passed "$(NUMCHECK)" tests, 3 CPUs"
|
||||
@MPI_TRUE@ @echo "--------------------------------------------------------------"
|
||||
-@MPI_TRUE@ perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) -np 4 `pwd`/mpi-bench"
|
||||
+@MPI_TRUE@ perl -w $(CHECK) $(CHECKOPTS) --mpi "$(MPIRUN) $(MPIARGS) -np 4 `pwd`/mpi-bench"
|
||||
@MPI_TRUE@ @echo "--------------------------------------------------------------"
|
||||
@MPI_TRUE@ @echo " MPI FFTW transforms passed "$(NUMCHECK)" tests, 4 CPUs"
|
||||
@MPI_TRUE@ @echo "--------------------------------------------------------------"
|
||||
-@MPI_TRUE@@SMP_TRUE@ perl -w $(CHECK) $(CHECKOPTS) --mpi --nthreads=2 "$(MPIRUN) -np 3 `pwd`/mpi-bench"
|
||||
+@MPI_TRUE@@SMP_TRUE@ perl -w $(CHECK) $(CHECKOPTS) --mpi --nthreads=2 "$(MPIRUN) $(MPIARGS) -np 3 `pwd`/mpi-bench"
|
||||
@MPI_TRUE@@SMP_TRUE@ @echo "--------------------------------------------------------------"
|
||||
@MPI_TRUE@@SMP_TRUE@ @echo " MPI FFTW threaded transforms passed "$(NUMCHECK)" tests!"
|
||||
@MPI_TRUE@@SMP_TRUE@ @echo "--------------------------------------------------------------"
|
16
fftw.spec
16
fftw.spec
@ -13,12 +13,14 @@
|
||||
|
||||
Name: fftw
|
||||
Version: 3.3.10
|
||||
Release: 4%{?dist}
|
||||
Release: 4.0.riscv64%{?dist}
|
||||
Summary: A Fast Fourier Transform library
|
||||
License: GPLv2+
|
||||
URL: http://www.fftw.org
|
||||
Source0: http://www.fftw.org/fftw-%{version}.tar.gz
|
||||
|
||||
Patch0: fftw-openmpi-oversubscribe.patch
|
||||
|
||||
BuildRequires: gcc-gfortran
|
||||
|
||||
%global quad 0
|
||||
@ -266,6 +268,10 @@ library.
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%ifarch riscv64
|
||||
%patch0 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
# Explicitly load shell support for the environment-modules package, used
|
||||
# below via 'module' pseudo-command.
|
||||
@ -404,10 +410,15 @@ export OMPI_MCA_btl="^vader"
|
||||
%endif
|
||||
for mpi in %{mpi_list} ; do
|
||||
module load mpi/${mpi}-%{_arch}
|
||||
export MPIARGS=
|
||||
if [ "$mpi" = "openmpi" ]; then
|
||||
export MPIARGS=--oversubscribe
|
||||
fi
|
||||
for ver in single double long ; do
|
||||
export LD_LIBRARY_PATH=$bdir/$ver/.libs:$bdir/$ver/threads/.libs
|
||||
make %{?_smp_mflags} -C ${mpi}-${ver}/mpi check
|
||||
done
|
||||
unset MPIARGS
|
||||
module unload mpi/${mpi}-%{_arch}
|
||||
done
|
||||
|
||||
@ -530,6 +541,9 @@ done
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Mar 23 2023 David Abdurachmanov <davidlt@rivosinc.com> - 3.3.10-4.0.riscv64
|
||||
- Run OpenMPI with --oversubscribe option on riscv64
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.10-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user