File pmix.spec of Package pmix

# spec file for package pmix
# Copyright (c) 2020 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via


Name:           pmix
Version:        3.1.5
Release:        0
Summary:        Process Management Interface for MPI
License:        BSD-3-Clause
Group:          Development/Libraries/Parallel
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  fdupes
BuildRequires:  flex
BuildRequires:  hwloc-devel
BuildRequires:  libevent-devel
%ifarch x86_64
BuildRequires:  libpsm2-devel
BuildRequires:  libtool
BuildRequires:  munge-devel
BuildRequires:  zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       pmix-runtime-config
Recommends:     pmix-mca-params

The Process Management Interface (PMI) has been used for quite some time as a
means of exchanging wireup information needed for interprocess communication. Two
versions (PMI-1 and PMI-2) have been released as part of the MPICH effort. While
PMI-2 demonstrates better scaling properties than its PMI-1 predecessor, attaining
rapid launch and wireup of the roughly 1M processes executing across 100k nodes
expected for exascale operations remains challenging.

This RPM contains all the tools necessary to compile and link against PMIx.

%package -n libpmix2
Summary:        PMI-X lib version 1
Group:          System/Libraries
Requires:       pmix-plugins

%description  -n libpmix2
This package contains the shared library used by the PMI-X standard

%package plugins
Summary:        PMI-X plugins version 1
Group:          System/Libraries
Requires:       libmca_common_dstore1
# explicit requires for package libmca_common_dstore1
# as other providers for exist

%description  plugins
This package contains plugins used by libpmix2.

%package -n libmca_common_dstore1
Summary:        Communication library used by PMI-X
Group:          System/Libraries

%description  -n libmca_common_dstore1
This package contains the communication library used by the PMI

%package devel
Summary:        Process Management Interface for MPI
Group:          Development/Libraries/C and C++
Requires:       %{name}-headers = %{version}
Requires:       libmca_common_dstore1 = %{version}
Requires:       libpmix2 = %{version}

%description devel
This Package contains necessary files for development and building PMI-X
aware applications.

%package headers
Summary:        Process Management Interface for MPI
Group:          Development/Libraries/C and C++
BuildArch:      noarch

%description headers
This Package contains necessary the headers for PMI-X.

%package -n pmix-mca-params
Summary:        Settings for the Module Component Architecure
Group:          Development/Libraries/C and C++
Provides:       pmix-runtime-config = %{version}
Conflicts:      otherproviders(pmix-runtime-config)
BuildArch:      noarch

%description -n pmix-mca-params
PMIX is part of the Module Component Architecure and needs so to have its
parameters configured.

%setup -q -n openpmix-%{version}

./ --force
%configure \
  --with-munge \
  --with-devel-headers \
  --disable-pmi-backward-compatibility \
  --enable-pmix-binaries \
  --with-tests-examples \
%ifarch x86_64
  --with-psm2 \
  --with-hwloc \

make %{?_smp_mflags}

# removed static libaries
rm -v %{buildroot}/%{_libdir}/*.la %{buildroot}/%{_libdir}/pmix/*.la
%fdupes %{buildroot}/%{_datadir} 

make check

%post -n libpmix2 -p /sbin/ldconfig
%postun -n libpmix2 -p /sbin/ldconfig

%post -n libmca_common_dstore1 -p /sbin/ldconfig
%postun -n libmca_common_dstore1 -p /sbin/ldconfig

%license LICENSE
%dir %{_libdir}/pmix

%files -n pmix-mca-params
%config %{_sysconfdir}/pmix-mca-params.conf

%files -n libpmix2

%files plugins

%files -n libmca_common_dstore1

%files devel

%files headers
%dir %{_includedir}/pmix