Use MPI variables
This commit is contained in:
parent
9af9a19adf
commit
722a325d89
120
petsc.spec
120
petsc.spec
@ -34,7 +34,7 @@
|
||||
%endif
|
||||
|
||||
## blas is not available on fedora 24
|
||||
%if 0%{?fedora} < 25
|
||||
%if 0%{?fedora} && 0%{?fedora} < 25
|
||||
ExcludeArch: aarch64
|
||||
%endif
|
||||
|
||||
@ -50,6 +50,11 @@ ExcludeArch: aarch64
|
||||
%endif
|
||||
#
|
||||
|
||||
## SuperLUDIST needs parmetis
|
||||
%bcond_with superludist
|
||||
%bcond_with superlumt
|
||||
#
|
||||
|
||||
# hdf5' is required by 'cgns'
|
||||
# hdf5 needs MPI
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
@ -130,7 +135,7 @@ ExcludeArch: aarch64
|
||||
Name: petsc
|
||||
Summary: Portable Extensible Toolkit for Scientific Computation
|
||||
Version: 3.7.6
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
License: BSD
|
||||
URL: https://www.mcs.anl.gov/petsc
|
||||
Source0: http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-%{version}.tar.gz
|
||||
@ -150,6 +155,9 @@ Patch3: %{name}-disable_petscnagupgrade.patch
|
||||
%if %{with superlu}
|
||||
BuildRequires: SuperLU-devel
|
||||
%endif
|
||||
%if %{with superlumt}
|
||||
BuildRequires: SuperLUMT-devel
|
||||
%endif
|
||||
%if %{with sundials}
|
||||
BuildRequires: sundials-devel
|
||||
%endif
|
||||
@ -257,6 +265,9 @@ BuildRequires: MUMPS-openmpi-devel
|
||||
%if %{with sundials}
|
||||
BuildRequires: sundials-openmpi-devel
|
||||
%endif
|
||||
%if %{with superludist}
|
||||
BuildRequires: superlu_dist-openmpi-devel
|
||||
%endif
|
||||
%if %{with fftw}
|
||||
BuildRequires: fftw-devel
|
||||
BuildRequires: fftw-openmpi-devel
|
||||
@ -312,6 +323,9 @@ BuildRequires: MUMPS-mpich-devel
|
||||
%if %{with sundials}
|
||||
BuildRequires: sundials-mpich-devel
|
||||
%endif
|
||||
%if %{with superludist}
|
||||
BuildRequires: superlu_dist-mpich-devel
|
||||
%endif
|
||||
%if %{with hypre}
|
||||
BuildRequires: hypre-mpich-devel
|
||||
%endif
|
||||
@ -531,9 +545,9 @@ pushd buildopenmpi_dir
|
||||
--with-64-bit-indices=0 \
|
||||
--with-fortran-interfaces=1 \
|
||||
--with-windows-graphics=0 \
|
||||
--CC=%{_libdir}/openmpi/bin/mpicc \
|
||||
--CXX=%{_libdir}/openmpi/bin/mpicxx \
|
||||
--FC=%{_libdir}/openmpi/bin/mpif77 \
|
||||
--CC=$MPI_BIN/mpicc \
|
||||
--CXX=$MPI_BIN/mpicxx \
|
||||
--FC=$MPI_BIN/mpif77 \
|
||||
--with-shared-ld=ld \
|
||||
--with-pic=1 \
|
||||
--with-clib-autodetect=0 \
|
||||
@ -559,39 +573,44 @@ pushd buildopenmpi_dir
|
||||
%endif
|
||||
%if %{with scalapack}
|
||||
--with-scalapack=1 \
|
||||
--with-scalapack-lib="-L%{_libmpidir} -lscalapack" \
|
||||
--with-scalapack-lib="-L$MPI_LIB -lscalapack" \
|
||||
--with-scalapck-include="" \
|
||||
%endif
|
||||
%if %{with mpi}
|
||||
--with-mpi=1 \
|
||||
--with-mpi-compilers=%{_libdir}/openmpi/bin/mpicc \
|
||||
--with-mpiexec=%{_libdir}/openmpi/bin/mpiexec \
|
||||
--with-mpi-compilers=$MPI_BIN/mpicc \
|
||||
--with-mpiexec=$MPI_BIN/mpiexec \
|
||||
--with-mpiuni-fortran-binding=0 \
|
||||
%endif
|
||||
%if %{with cgns}
|
||||
--with-cgns=1 \
|
||||
--with-cgns-include="" \
|
||||
--with-cgns-lib="-L%{_libmpidir} -lhdf5 -lcgns" \
|
||||
--with-cgns-lib="-L$MPI_LIB -lhdf5 -lcgns" \
|
||||
%endif
|
||||
%if %{with hdf5}
|
||||
--with-hdf5=1 \
|
||||
--with-hdf5-include="" \
|
||||
--with-hdf5-lib="-L%{_libmpidir} -lhdf5" \
|
||||
--with-hdf5-lib="-L$MPI_LIB -lhdf5" \
|
||||
%endif
|
||||
%if %{with ptscotch}
|
||||
--with-ptscotch=1 \
|
||||
--with-ptscotch-include="" \
|
||||
--with-ptscotch-lib="-L%{_libmpidir} -lptscotch -lscotch -lptscotcherr -lscotcherr" \
|
||||
--with-ptscotch-lib="-L$MPI_LIB -lptscotch -lscotch -lptscotcherr -lscotcherr" \
|
||||
%endif
|
||||
%if %{with mumps}
|
||||
--with-mumps=1 \
|
||||
--with-mumps-include="" \
|
||||
--with-mumps-lib="-L%{_libmpidir} -lmumps_common -ldmumps -lpord" \
|
||||
--with-mumps-lib="-L$MPI_LIB -lmumps_common -ldmumps -lpord" \
|
||||
%endif
|
||||
%if %{with sundials}
|
||||
--with-sundials=1 \
|
||||
--with-sundials-include="" \
|
||||
--with-sundials-lib="-L%{_libmpidir} -lsundials_nvecparallel -lsundials_cvode" \
|
||||
--with-sundials-lib="-L$MPI_LIB -lsundials_nvecparallel -lsundials_cvode" \
|
||||
%endif
|
||||
%if %{with superludist}
|
||||
--with-superlu_dist=1 \
|
||||
--with-superlu_dist-include=$MPI_INCLUDE/superlu_dist \
|
||||
--with-superlu_dist-lib=-lsuperlu_dist \
|
||||
%endif
|
||||
--with-x=1 \
|
||||
--with-openmp=0 \
|
||||
@ -600,13 +619,13 @@ pushd buildopenmpi_dir
|
||||
--with-ssl=0 \
|
||||
%if %{with hypre}
|
||||
--with-hypre=1 \
|
||||
--with-hypre-include=%{_incmpidir}/hypre \
|
||||
--with-hypre-lib="-L%{_libmpidir} -lHYPRE" \
|
||||
--with-hypre-include=$MPI_INCLUDE/hypre \
|
||||
--with-hypre-lib="-L$MPI_LIB -lHYPRE" \
|
||||
%endif
|
||||
%if %{with fftw}
|
||||
--with-fftw=1 \
|
||||
--with-fftw-include="" \
|
||||
--with-fftw-lib="-L%{_libmpidir} -lfftw3_mpi -lfftw3" \
|
||||
--with-fftw-lib="-L$MPI_LIB -lfftw3_mpi -lfftw3" \
|
||||
%endif
|
||||
--with-pthread=1 \
|
||||
--with-valgrind=1
|
||||
@ -632,9 +651,9 @@ pushd buildmpich_dir
|
||||
--with-64-bit-indices=0 \
|
||||
--with-fortran-interfaces=1 \
|
||||
--with-windows-graphics=0 \
|
||||
--CC=%{_libdir}/mpich/bin/mpicc \
|
||||
--CXX=%{_libdir}/mpich/bin/mpicxx \
|
||||
--FC=%{_libdir}/mpich/bin/mpif77 \
|
||||
--CC=$MPI_BIN/mpicc \
|
||||
--CXX=$MPI_BIN/mpicxx \
|
||||
--FC=$MPI_BIN/mpif77 \
|
||||
--with-shared-ld=ld \
|
||||
--with-pic=1 \
|
||||
--with-clib-autodetect=0 \
|
||||
@ -660,39 +679,44 @@ pushd buildmpich_dir
|
||||
%endif
|
||||
%if %{with scalapack}
|
||||
--with-scalapack=1 \
|
||||
--with-scalapack-lib="-L%{_libmpichdir} -lscalapack" \
|
||||
--with-scalapack-lib="-L$MPI_LIB -lscalapack" \
|
||||
--with-scalapck-include="" \
|
||||
%endif
|
||||
%if %{with mpi}
|
||||
--with-mpi=1 \
|
||||
--with-mpi-compilers=%{_libdir}/mpich/bin/mpicc \
|
||||
--with-mpiexec=%{_libdir}/mpich/bin/mpiexec \
|
||||
--with-mpi-compilers=$MPI_BIN/mpicc \
|
||||
--with-mpiexec=$MPI_BIN/mpiexec \
|
||||
--with-mpiuni-fortran-binding=0 \
|
||||
%endif
|
||||
%if %{with cgns}
|
||||
--with-cgns=1 \
|
||||
--with-cgns-include="" \
|
||||
--with-cgns-lib="-L%{_libmpichdir} -lhdf5 -lcgns" \
|
||||
--with-cgns-lib="-L$MPI_LIB -lhdf5 -lcgns" \
|
||||
%endif
|
||||
%if %{with hdf5}
|
||||
--with-hdf5=1 \
|
||||
--with-hdf5-include="" \
|
||||
--with-hdf5-lib="-L%{_libmpichdir} -lhdf5" \
|
||||
--with-hdf5-lib="-L$MPI_LIB -lhdf5" \
|
||||
%endif
|
||||
%if %{with ptscotch}
|
||||
--with-ptscotch=1 \
|
||||
--with-ptscotch-include="" \
|
||||
--with-ptscotch-lib="-L%{_libmpichdir} -lptscotch -lscotch -lptscotcherr -lscotcherr" \
|
||||
--with-ptscotch-lib="-L$MPI_LIB -lptscotch -lscotch -lptscotcherr -lscotcherr" \
|
||||
%endif
|
||||
%if %{with mumps}
|
||||
--with-mumps=1 \
|
||||
--with-mumps-include="" \
|
||||
--with-mumps-lib="-L%{_libmpichdir} -lmumps_common -ldmumps -lpord" \
|
||||
--with-mumps-lib="-L$MPI_LIB -lmumps_common -ldmumps -lpord" \
|
||||
%endif
|
||||
%if %{with sundials}
|
||||
--with-sundials=1 \
|
||||
--with-sundials-include="" \
|
||||
--with-sundials-lib="-L%{_libmpichdir} -lsundials_nvecparallel -lsundials_cvode" \
|
||||
--with-sundials-lib="-L$MPI_LIB -lsundials_nvecparallel -lsundials_cvode" \
|
||||
%endif
|
||||
%if %{with superludist}
|
||||
--with-superlu_dist=1 \
|
||||
--with-superlu_dist-include=$MPI_INCLUDE/superlu_dist \
|
||||
--with-superlu_dist-lib=-lsuperlu_dist \
|
||||
%endif
|
||||
--with-x=1 \
|
||||
--with-openmp=0 \
|
||||
@ -701,13 +725,13 @@ pushd buildmpich_dir
|
||||
--with-ssl=0 \
|
||||
%if %{with hypre}
|
||||
--with-hypre=1 \
|
||||
--with-hypre-include=%{_incmpichdir}/hypre \
|
||||
--with-hypre-lib="-L%{_libmpichdir} -lHYPRE" \
|
||||
--with-hypre-include=$MPI_INCLUDE/hypre \
|
||||
--with-hypre-lib="-L$MPI_LIB -lHYPRE" \
|
||||
%endif
|
||||
%if %{with fftw}
|
||||
--with-fftw=1 \
|
||||
--with-fftw-include="" \
|
||||
--with-fftw-lib="-L%{_libmpichdir} -lfftw3_mpi -lfftw3" \
|
||||
--with-fftw-lib="-L$MPI_LIB -lfftw3_mpi -lfftw3" \
|
||||
%endif
|
||||
--with-pthread=1 \
|
||||
--with-valgrind=1
|
||||
@ -808,27 +832,31 @@ EOF
|
||||
|
||||
%if %{with openmpi}
|
||||
pushd buildopenmpi_dir
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libmpidir} $RPM_BUILD_ROOT%{_incmpidir}/%{name}
|
||||
%{_openmpi_load}
|
||||
mkdir -p $RPM_BUILD_ROOT$MPI_LIB $RPM_BUILD_ROOT$MPI_INCLUDE/%{name}
|
||||
|
||||
install -pm 755 %{_arch}/lib/libpetsc.* $RPM_BUILD_ROOT%{_libmpidir}
|
||||
ln -sf libpetsc.so.%{version} $RPM_BUILD_ROOT%{_libmpidir}/libpetsc.so
|
||||
ln -sf libpetsc.so.%{version} $RPM_BUILD_ROOT%{_libmpidir}/libpetsc.so.3.7
|
||||
install -pm 755 %{_arch}/lib/libpetsc.* $RPM_BUILD_ROOT$MPI_LIB
|
||||
ln -sf libpetsc.so.%{version} $RPM_BUILD_ROOT$MPI_LIB/libpetsc.so
|
||||
ln -sf libpetsc.so.%{version} $RPM_BUILD_ROOT$MPI_LIB/libpetsc.so.3.7
|
||||
|
||||
install -pm 644 %{_arch}/include/*.h $RPM_BUILD_ROOT%{_incmpidir}/%{name}
|
||||
cp -a include/* $RPM_BUILD_ROOT%{_incmpidir}/%{name}
|
||||
install -pm 644 %{_arch}/include/*.h $RPM_BUILD_ROOT$MPI_INCLUDE/%{name}
|
||||
cp -a include/* $RPM_BUILD_ROOT$MPI_INCLUDE/%{name}
|
||||
%{_openmpi_unload}
|
||||
popd
|
||||
%endif
|
||||
|
||||
%if %{with mpich}
|
||||
pushd buildmpich_dir
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libmpichdir} $RPM_BUILD_ROOT%{_incmpichdir}/%{name}
|
||||
%{_mpich_load}
|
||||
mkdir -p $RPM_BUILD_ROOT$MPI_LIB $RPM_BUILD_ROOT$MPI_INCLUDE/%{name}
|
||||
|
||||
install -pm 755 %{_arch}/lib/libpetsc.* $RPM_BUILD_ROOT%{_libmpichdir}
|
||||
ln -sf libpetsc.so.%{version} $RPM_BUILD_ROOT%{_libmpichdir}/libpetsc.so
|
||||
ln -sf libpetsc.so.%{version} $RPM_BUILD_ROOT%{_libmpichdir}/libpetsc.so.3.7
|
||||
install -pm 755 %{_arch}/lib/libpetsc.* $RPM_BUILD_ROOT$MPI_LIB
|
||||
ln -sf libpetsc.so.%{version} $RPM_BUILD_ROOT$MPI_LIB/libpetsc.so
|
||||
ln -sf libpetsc.so.%{version} $RPM_BUILD_ROOT$MPI_LIB/libpetsc.so.3.7
|
||||
|
||||
install -pm 644 %{_arch}/include/*.h $RPM_BUILD_ROOT%{_incmpichdir}/%{name}
|
||||
cp -a include/* $RPM_BUILD_ROOT%{_incmpichdir}/%{name}
|
||||
install -pm 644 %{_arch}/include/*.h $RPM_BUILD_ROOT$MPI_INCLUDE/%{name}
|
||||
cp -a include/* $RPM_BUILD_ROOT$MPI_INCLUDE/%{name}
|
||||
%{_mpich_unload}
|
||||
popd
|
||||
%endif
|
||||
|
||||
@ -889,7 +917,7 @@ make -C build64 test
|
||||
|
||||
%if %{with openmpi}
|
||||
%{_openmpi_load}
|
||||
export LD_LIBRARY_PATH=%{_libmpidir}:%{_libdir}:%{_builddir}/%{name}-%{version}/buildopenmpi_dir/%{_arch}/lib
|
||||
export LD_LIBRARY_PATH=$MPI_LIB:%{_libdir}:%{_builddir}/%{name}-%{version}/buildopenmpi_dir/%{_arch}/lib
|
||||
export PETSC_DIR=%{_builddir}/%{name}-%{version}/buildopenmpi_dir
|
||||
export PETSC_ARCH=%{_arch}
|
||||
export MPI_INTERFACE_HOSTNAME=localhost
|
||||
@ -901,7 +929,7 @@ make -C buildopenmpi_dir test
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
%if %{with mpich}
|
||||
%{_mpich_load}
|
||||
export LD_LIBRARY_PATH=%{_libmpichdir}:%{_libdir}:%{_builddir}/%{name}-%{version}/buildmpich_dir/%{_arch}/lib
|
||||
export LD_LIBRARY_PATH=$MPI_LIB:%{_libdir}:%{_builddir}/%{name}-%{version}/buildmpich_dir/%{_arch}/lib
|
||||
export PETSC_DIR=%{_builddir}/%{name}-%{version}/buildmpich_dir
|
||||
export PETSC_ARCH=%{_arch}
|
||||
export MPI_INTERFACE_HOSTNAME=localhost
|
||||
@ -959,6 +987,10 @@ make -C buildmpich_dir test
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sun Aug 13 2017 Antonio Trande <sagitter@fedoraproject.org> - 3.7.6-7
|
||||
- Superlu_dist needs parmetis
|
||||
- Use MPI variables
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.6-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user