openmpi/openmpi.spec

274 lines
8.3 KiB
RPMSpec
Raw Normal View History

2019-12-14 21:07:47 +08:00
Name: openmpi
2023-04-21 09:38:55 +08:00
Version: 4.1.5
Release: 5
2019-12-14 21:07:47 +08:00
Summary: Open Source High Performance Computing
License: BSD-3-Clause
2019-12-14 21:07:47 +08:00
URL: http://www.open-mpi.org/
Source0: https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-%{version}.tar.bz2
2019-12-14 21:07:47 +08:00
Source1: openmpi.module.in
2020-10-29 11:40:02 +08:00
Source2: openmpi.pth.py3
Source3: macros.openmpi
2023-01-04 00:43:57 +08:00
Patch1000: add-riscv64-support.patch
2023-07-20 11:38:54 +08:00
%ifarch loongarch64
Patch1001: 0001-add-loongarch64-support-for-openmpi.patch
%endif
2019-12-14 21:07:47 +08:00
BuildRequires: gcc-c++, gcc-gfortran
%ifarch %{valgrind_arches}
BuildRequires: valgrind-devel
%endif
BuildRequires: hwloc-devel, java-devel, libfabric-devel, papi-devel
2019-12-14 21:07:47 +08:00
BuildRequires: libibverbs-devel >= 1.1.3, opensm-devel > 3.3.0
BuildRequires: librdmacm librdmacm-devel, rdma-core-devel, pmix-devel
2021-09-11 09:26:44 +08:00
BuildRequires: hwloc-gui chrpath
2019-12-14 21:07:47 +08:00
BuildRequires: perl-generators, perl(Getopt::Long)
BuildRequires: python3-devel libevent-devel
2023-01-04 00:43:57 +08:00
BuildRequires: automake libtool
2019-12-14 21:07:47 +08:00
%ifarch x86_64
2020-06-20 17:04:40 +08:00
BuildRequires: infinipath-psm-devel, libpsm2-devel zlib-devel
2019-12-14 21:07:47 +08:00
%endif
2023-07-20 11:38:54 +08:00
%ifarch loongarch64
BuildRequires: automake
%endif
2019-12-14 21:07:47 +08:00
Provides: mpi, %{name}-java
Requires: environment(modules), openssh-clients
Provides: bundled(libevent) = 2.0.22
Requires: java-headless
Obsoletes: %{name}-java
%description
The Open MPI Project is an open source Message Passing Interface
implementation that is developed and maintained by a consortium
of academic, research, and industry partners. Open MPI is
therefore able to combine the expertise, technologies, and
resources from all across the High Performance Computing
community in order to build the best MPI library available.
%ifarch aarch64
%global name_all openmpi-aarch64
2023-01-04 00:43:57 +08:00
%elifarch riscv64
%global name_all openmpi-riscv64
2024-01-16 17:56:41 +08:00
%elifarch ppc64le
%global name_all openmpi-ppc64le
2019-12-14 21:07:47 +08:00
%else
%global name_all openmpi-x86_64
%endif
#%global namearch openmpi-%{_arch}
%package devel
Summary: Development files for openmpi
Requires: %{name} = %{version}-%{release}, gcc-gfortran
Provides: mpi-devel
Requires: java-devel
2019-12-14 21:07:47 +08:00
Provides: %{name}-java-devel
Obsoletes: %{name}-java-devel
%description devel
This contains dynamic libraries and header files for the developing of openmpi.
%package -n python3-openmpi
Summary: openmpi python3 interface
Requires: %{name} = %{version}-%{release}
%description -n python3-openmpi
openmpi python3 interface
%package help
Summary: Including man files for openmpi
Requires: man
%description help
This contains man files for the using of openmpi.
%prep
%autosetup -n openmpi-%{version} -p1
2023-01-04 00:43:57 +08:00
./autogen.pl --force
2019-12-14 21:07:47 +08:00
%build
2023-04-21 09:38:55 +08:00
./configure \
--bindir=%{_bindir} \
--libdir=%{_libdir}/%{name}/lib \
--datadir=%{_libdir}/%{name}/share \
--docdir=%{_libdir}/%{name}/share/doc/openmpi \
2019-12-14 21:07:47 +08:00
--includedir=%{_includedir}/%{name_all} \
--sysconfdir=%{_sysconfdir}/%{name_all} \
--disable-silent-rules \
--enable-builtin-atomics \
--enable-mpi-thread-multiple \
--enable-mpi-cxx \
--enable-mpi-java \
2023-04-21 09:38:55 +08:00
--enable-mpi1-compatibility \
2019-12-14 21:07:47 +08:00
--with-sge \
%ifarch %{valgrind_arches}
2019-12-14 21:07:47 +08:00
--with-valgrind \
2023-04-21 09:38:55 +08:00
--enable-memchecker \
%endif
2019-12-14 21:07:47 +08:00
--with-hwloc=/usr \
--with-pmix=external \
--with-libevent=external \
2019-12-14 21:07:47 +08:00
--mandir=%{_mandir}/%{name_all} \
CFLAGS="$RPM_OPT_FLAGS" \
CXXFLAGS="$RPM_OPT_FLAGS" \
FC=gfortran \
2021-09-11 09:26:44 +08:00
FCFLAGS="$RPM_OPT_FLAGS" \
LDFLAGS="-Wl,-z,now"
2019-12-14 21:07:47 +08:00
%make_build
%install
%make_install
find %{buildroot}%{_libdir}/%{name}/lib -name \*.la -delete
find %{buildroot}%{_mandir}/%{name_all} -type f -exec gzip -9 {} \;
ln -s mpicc.1.gz %{buildroot}%{_mandir}/%{name_all}/man1/mpiCC.1.gz
rm %{buildroot}%{_mandir}/%{name_all}/man1/mpiCC.1
mkdir %{buildroot}%{_mandir}/%{name_all}/man{2,4,5,6,8,9,n}
mkdir -p %{buildroot}%{_datadir}/modulefiles/mpi
sed 's#@LIBDIR@#%{_libdir}/%{name}#;
s#@ETCDIR@#%{_sysconfdir}/%{name_all}#;
s#@FMODDIR@#%{_fmoddir}/%{name}#;
s#@INCDIR@#%{_includedir}/%{name_all}#;
s#@MANDIR@#%{_mandir}/%{name_all}#;
s#@PY3SITEARCH@#%{python3_sitearch}/%{name}#;
s#@COMPILER@#openmpi-%{_arch}#;
s#@SUFFIX@#_openmpi#' \
<%{SOURCE1} \
>%{buildroot}%{_datadir}/modulefiles/mpi/%{name_all}
2020-10-29 11:40:02 +08:00
install -Dpm 644 %{SOURCE3} %{buildroot}/%{rpmmacrodir}/macros.%{name_all}
2019-12-14 21:07:47 +08:00
install -d %{buildroot}%{_fmoddir}/%{name}
for mod in %{buildroot}%{_libdir}/%{name}/lib/*.mod
do
modname=$(basename $mod)
ln -s ../../../%{name}/lib/${modname} %{buildroot}/%{_fmoddir}/%{name}/
done
install -d %{buildroot}%{_libdir}/pkgconfig
pushd %{buildroot}%{_libdir}/pkgconfig
ln -s ../%{name}/lib/pkgconfig/*.pc .
popd
sed -i -e s/-ldl// -e s/-lhwloc// \
%{buildroot}%{_libdir}/%{name}/share/%{name}/*-wrapper-data.txt
install -d %{buildroot}/%{python3_sitearch}/%{name}
2020-10-29 11:40:02 +08:00
install -pDm0644 %{SOURCE2} %{buildroot}/%{python3_sitearch}/openmpi.pth
2021-09-11 09:26:44 +08:00
file `find %{buildroot}%{_libdir}/openmpi/bin -type f` | grep -w ELF | awk -F : '{print $1}' |xargs chrpath -d
file `find %{buildroot}%{_libdir}/openmpi/lib -type f` | grep -w ELF | awk -F : '{print $1}' |xargs chrpath -d
mkdir -p %{buildroot}/etc/ld.so.conf.d
echo "%{_libdir}/openmpi/lib" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
2019-12-14 21:07:47 +08:00
%check
make check
%files
%license LICENSE opal/mca/event/libevent2022/libevent/LICENSE
%dir %{_libdir}/%{name}
%dir %{_sysconfdir}/%{name_all}
%dir %{_libdir}/%{name}/lib
%dir %{_libdir}/%{name}/lib/openmpi
%dir %{_mandir}/%{name_all}
%dir %{_mandir}/%{name_all}/man*
%dir %{_libdir}/%{name}/share
%dir %{_libdir}/%{name}/share/openmpi
%config(noreplace) %{_sysconfdir}/%{name_all}/*
2021-09-11 09:26:44 +08:00
%config(noreplace) /etc/ld.so.conf.d/*
2019-12-14 21:07:47 +08:00
%{_datadir}/modulefiles/mpi/
2023-04-21 09:38:55 +08:00
%{_bindir}/mpiexec
%{_bindir}/mpirun
%{_bindir}/ompi*
%{_bindir}/orte-*
%{_bindir}/orted
%{_bindir}/orterun
2019-12-14 21:07:47 +08:00
%{_libdir}/%{name}/lib/*.so.*
%{_libdir}/%{name}/lib/openmpi/*
%{_libdir}/%{name}/lib/mpi.jar
%{_libdir}/%{name}/share/openmpi/help*.txt
%{_libdir}/%{name}/share/openmpi/amca-param-sets
%{_libdir}/%{name}/share/openmpi/mca-btl-openib-device-params.ini
%files devel
%dir %{_includedir}/%{name_all}
%{_includedir}/%{name_all}/*
%{_libdir}/%{name}/share/doc/
2023-04-21 09:38:55 +08:00
%{_bindir}/mpic*
%{_bindir}/mpiCC
%{_bindir}/mpif*
%{_bindir}/opal*
%{_bindir}/ortecc
%{_bindir}/aggregate_profile.pl
%{_bindir}/profile2mat.pl
%{_bindir}/mpijava*
2019-12-14 21:07:47 +08:00
%{_libdir}/%{name}/lib/*.so
%{_libdir}/%{name}/lib/*.mod
%{_libdir}/%{name}/lib/pkgconfig/
%{_libdir}/%{name}/share/openmpi/*-wrapper-data.txt
%{_libdir}/%{name}/share/openmpi/openmpi-valgrind.supp
%{_libdir}/pkgconfig/*.pc
%{_fmoddir}/%{name}/
%{rpmmacrodir}/macros.%{name_all}
%files -n python3-openmpi
%dir %{python3_sitearch}/%{name}
%{python3_sitearch}/openmpi.pth
%files help
%{_mandir}/%{name_all}/man*/*
%changelog
* Tue Mar 05 2024 laokz <zhangkai@iscas.ac.cn> - 4.1.5-5
- let BuildRequire valgrind depend on system %{valgrind_arches}
2024-01-16 17:56:41 +08:00
* Tue Jan 16 2024 peng.zou <peng.zou@shingroup.cn> - 4.1.5-4
- Add ppc64le support
* Wed Jan 10 2024 xu_ping<707078654@qq.com> - 4.1.5-3
- fix build error due to rdma-core separate some packages.
2023-07-20 11:38:54 +08:00
* Thu Jul 20 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 4.1.5-2
- fix build error that automake can not be found
2023-04-21 09:38:55 +08:00
* Fri Apr 21 2023 wulei <wu_lei@hoperun.com> - 4.1.5-1
- Upgrade package to version 4.1.5
2023-01-04 00:43:57 +08:00
* Tue Jan 03 2023 misaka00251 <liuxin@iscas.ac.cn> - 4.1.4-3
- Add riscv64 support, patch from lvxiaoqian@iscas
* Fri Jul 29 2022 wangkai <wangkai385@h-partners.com> - 4.1.4-2
- Reslove conflict with pmix-devel and update license
2022-06-20 17:45:44 +08:00
* Mon Jun 20 2022 wulei <wulei80@h-partners.com> - 4.1.4-1
- Upgrade to 4.1.1
2021-09-11 09:26:44 +08:00
* Thu Sep 9 2021 Pengju Jiang <jiangpengju2@huawei.com> - 2.1.1-20
- solve the strip and rpath problem of safe conversion
2020-11-02 14:30:47 +08:00
* Mon Nov 2 2020 wangxiao <wangxiao65@huawei.com> - 2.1.1-19
- delete unnessary file
2020-10-29 11:40:02 +08:00
* Wed Oct 21 2020 wangxiao <wangxiao65@huawei.com> - 2.1.1-18
- drop python2 subpackage
* Thu Sep 10 2020 Guoshuai Sun <sunguoshuai@huawei.com> - 2.1.1-17
- As rpm-mpi-hooks is not in buildrequire,we shouldn't pull it in devel packages
2020-06-20 14:40:38 +08:00
* Sat Jun 20 2020 Senlin Xia <xiasenlin1@huawei.com> - 2.1.1-16
- remove unnecessary buildrequire: rpm-mpi-hooks
2019-12-14 21:07:47 +08:00
* Tue Nov 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 2-1.1-15
- Package init