8e30bc8
Name:           hpx
8e30bc8
Version:        1.2.0
8e30bc8
Release:        3%{?dist}
8e30bc8
Summary:        General Purpose C++ Runtime System
8e30bc8
License:        Boost
8e30bc8
URL:            http://stellar.cct.lsu.edu/tag/hpx/
8e30bc8
Source0:        http://stellar.cct.lsu.edu/files/%{name}_%{version}.tar.gz
8e30bc8
Patch0:         https://github.com/STEllAR-GROUP/hpx/pull/3551.patch
8e30bc8
#hpx has no support for
8e30bc8
# https://github.com/STEllAR-GROUP/hpx/issues/3511
8e30bc8
ExcludeArch: s390x
8e30bc8
# https://github.com/STEllAR-GROUP/hpx/issues/3509
8e30bc8
ExcludeArch: armv7hl
8e30bc8
8e30bc8
BuildRequires:  gcc-c++ >= 4.9
8e30bc8
BuildRequires:  gperftools-devel
8e30bc8
BuildRequires:  boost-devel
8e30bc8
BuildRequires:  hwloc-devel
8e30bc8
BuildRequires:  cmake
8e30bc8
BuildRequires:  fdupes
8e30bc8
8e30bc8
8e30bc8
%global hpx_desc \
8e30bc8
HPX is a general purpose C++ runtime system for parallel and distributed \
8e30bc8
applications of any scale. \
8e30bc8
\
8e30bc8
The goal of HPX is to create a high quality, freely available, \
8e30bc8
open source implementation of the ParalleX model for conventional systems, \
8e30bc8
such as classic Linux based Beowulf clusters or multi-socket highly parallel \
8e30bc8
SMP nodes. At the same time, we want to have a very modular and well designed \
8e30bc8
runtime system architecture which would allow us to port our implementation \
8e30bc8
onto new computer system architectures. We want to use real world applications\
8e30bc8
to drive the development of the runtime system, coining out required \
8e30bc8
functionality and converging onto a stable API which will provide a smooth \
8e30bc8
migration path for developers. The API exposed by HPX is modeled after the \
8e30bc8
interfaces defined by the C++11 ISO standard and adheres to the \
8e30bc8
programming guidelines used by the Boost collection of C++ libraries.
8e30bc8
8e30bc8
%description
8e30bc8
%{hpx_desc}
8e30bc8
8e30bc8
This package contains the libraries
8e30bc8
8e30bc8
%package examples
8e30bc8
Summary: HPX examples
8e30bc8
Requires:       hpx = %{version}-%{release}
8e30bc8
8e30bc8
%description examples
8e30bc8
%{hpx_desc}
8e30bc8
8e30bc8
This package contains the examples
8e30bc8
8e30bc8
%package devel
8e30bc8
Summary:    Development headers and libraries for hpx
8e30bc8
Group:      Development/Libraries/C and C++
8e30bc8
Requires:   hpx = %{version}-%{release}
8e30bc8
8e30bc8
%description devel
8e30bc8
%{hpx_desc}
8e30bc8
8e30bc8
This package contains development headers and libraries
8e30bc8
8e30bc8
%package mpich
8e30bc8
Summary:        HPX MPICH libraries
8e30bc8
Requires:       mpich
8e30bc8
BuildRequires:  mpich-devel
8e30bc8
8e30bc8
%description mpich
8e30bc8
%{hpx_desc}
8e30bc8
8e30bc8
This package contains the libraries
8e30bc8
8e30bc8
%package mpich-examples
8e30bc8
Summary: HPX MPICH examples
8e30bc8
Requires:       mpich
8e30bc8
Requires:       hpx-mpich = %{version}-%{release}
8e30bc8
BuildRequires:  mpich-devel
8e30bc8
8e30bc8
%description mpich-examples
8e30bc8
%{hpx_desc}
8e30bc8
8e30bc8
This package contains the examples
8e30bc8
8e30bc8
%package mpich-devel
8e30bc8
Summary:    Development headers and libraries for hpx
8e30bc8
Group:      Development/Libraries/C and C++
8e30bc8
Requires:   hpx-mpich = %{version}-%{release}
8e30bc8
8e30bc8
%description mpich-devel
8e30bc8
%{hpx_desc}.
8e30bc8
8e30bc8
This package contains development headers and libraries
8e30bc8
8e30bc8
8e30bc8
%package openmpi
8e30bc8
Summary:        HPX Open MPI libraries
8e30bc8
Requires:       openmpi
8e30bc8
BuildRequires:  openmpi-devel
8e30bc8
8e30bc8
%description openmpi
8e30bc8
%{hpx_desc}
8e30bc8
8e30bc8
This package contains the libraries
8e30bc8
8e30bc8
%package openmpi-examples
8e30bc8
Summary: HPX Open MPI examples
8e30bc8
Requires:       openmpi
8e30bc8
Requires:       hpx-openmpi = %{version}-%{release}
8e30bc8
BuildRequires:  openmpi-devel
8e30bc8
8e30bc8
%description openmpi-examples
8e30bc8
%{hpx_desc}.
8e30bc8
8e30bc8
This package contains the examples
8e30bc8
8e30bc8
8e30bc8
%package openmpi-devel
8e30bc8
Summary:    Development headers and libraries for hpx
8e30bc8
Group:      Development/Libraries/C and C++
8e30bc8
Requires:   hpx-openmpi = %{version}-%{release}
8e30bc8
8e30bc8
%description openmpi-devel
8e30bc8
%{hpx_desc}
8e30bc8
8e30bc8
This package contains development headers and libraries
8e30bc8
8e30bc8
%prep
8e30bc8
%setup -n %{name}_%{version} -q
8e30bc8
%patch0 -p1
8e30bc8
8e30bc8
%build
8e30bc8
# use generic context for these archs
8e30bc8
%ifarch aarch64 s390x armv7hl
8e30bc8
%define cmake_opts -DHPX_WITH_GENERIC_CONTEXT_COROUTINES=ON
8e30bc8
%endif
8e30bc8
8e30bc8
# ppc64 do not have enough memory
8e30bc8
%ifarch ppc64le aarch64
8e30bc8
%global _smp_mflags -j1
8e30bc8
%endif
8e30bc8
8e30bc8
. /etc/profile.d/modules.sh
8e30bc8
for mpi in '' openmpi mpich ; do
8e30bc8
  test -n "${mpi}" && module load mpi/${mpi}-%{_arch}
8e30bc8
  mkdir -p ${mpi:-serial}
8e30bc8
  pushd ${mpi:-serial}
8e30bc8
  test -n "${mpi}" && export CC=mpicc && export CXX=mpicxx
8e30bc8
  %{cmake} ${mpi:+-DHPX_WITH_PARCELPORT_MPI=ON} -DLIB=${MPI_LIB:-%{_lib}} %{?cmake_opts:%{cmake_opts}} ..
8e30bc8
  %make_build
8e30bc8
  test -n "${mpi}" && unset CC CXX
8e30bc8
  popd
8e30bc8
  test -n "${mpi}" && module unload mpi/${mpi}-%{_arch}
8e30bc8
done
8e30bc8
8e30bc8
%install
8e30bc8
# do serial install last due to move of executables to _bindir
8e30bc8
. /etc/profile.d/modules.sh
8e30bc8
for mpi in openmpi mpich '' ; do
8e30bc8
  test -n "${mpi}" && module load mpi/${mpi}-%{_arch} && mkdir -p %{buildroot}/${MPI_BIN}
8e30bc8
  pushd ${mpi:-serial}
8e30bc8
  %make_install
8e30bc8
  sed -i '1s@env python@python2@' %{buildroot}/%{_bindir}/{hpx*.py,hpxcxx}  %{buildroot}${MPI_LIB:-%{_libdir}}/cmake/HPX/templates/hpx{cxx,run.py}.in
8e30bc8
  chmod +x  %{buildroot}${MPI_LIB:-%{_libdir}}/cmake/HPX/templates/hpx{cxx,run.py}.in
8e30bc8
  popd
8e30bc8
  pushd %{buildroot}/%{_bindir}
8e30bc8
  # rename executable with too generic names
8e30bc8
  for exe in  *; do
8e30bc8
    test -n '${exe##hpx*}' && mv "${exe}" "hpx_${exe}"
8e30bc8
  done
8e30bc8
  popd
8e30bc8
  test -n "${mpi}" && mv %{buildroot}/%{_bindir}/* %{buildroot}/${MPI_BIN}/
8e30bc8
  test -n "${mpi}" && module unload mpi/${mpi}-%{_arch}
8e30bc8
done
8e30bc8
8e30bc8
rm %{buildroot}/%{_datadir}/%{name}/LICENSE_1_0.txt
8e30bc8
%fdupes %{buildroot}%{_prefix}
8e30bc8
8e30bc8
%check
8e30bc8
. /etc/profile.d/modules.sh
8e30bc8
for mpi in '' openmpi mpich ; do
8e30bc8
  test -n "${mpi}" && module load mpi/${mpi}-%{_arch}
8e30bc8
  make -C ${mpi:-serial} tests.examples
8e30bc8
  test -n "${mpi}" && module unload mpi/${mpi}-%{_arch}
8e30bc8
done
8e30bc8
8e30bc8
%ldconfig_scriptlets
8e30bc8
8e30bc8
%files
8e30bc8
%doc README.rst
8e30bc8
%license LICENSE_1_0.txt
8e30bc8
%{_libdir}/%{name}/
8e30bc8
%{_libdir}/lib*.so.*
8e30bc8
8e30bc8
%files examples
8e30bc8
%doc README.rst
8e30bc8
%license LICENSE_1_0.txt
8e30bc8
%{_bindir}/*
8e30bc8
8e30bc8
%files openmpi
8e30bc8
%doc README.rst
8e30bc8
%license LICENSE_1_0.txt
8e30bc8
%{_libdir}/openmpi*/lib/lib*.so.*
8e30bc8
%{_libdir}/openmpi*/lib/%{name}
8e30bc8
8e30bc8
%files openmpi-examples
8e30bc8
%doc README.rst
8e30bc8
%license LICENSE_1_0.txt
8e30bc8
%{_libdir}/openmpi*/bin/*
8e30bc8
8e30bc8
%files openmpi-devel
8e30bc8
%{_includedir}/%{name}
8e30bc8
%{_libdir}/openmpi*/lib/pkgconfig/*.pc
8e30bc8
%{_libdir}/openmpi*/lib/cmake/HPX
8e30bc8
%{_libdir}/openmpi*/lib/bazel
8e30bc8
%{_libdir}/openmpi*/lib/lib*.a
8e30bc8
%{_libdir}/openmpi*/lib/lib*.so*
8e30bc8
8e30bc8
%files mpich
8e30bc8
%doc README.rst
8e30bc8
%license LICENSE_1_0.txt
8e30bc8
%{_libdir}/mpich*/lib/lib*.so.*
8e30bc8
%{_libdir}/mpich*/lib/%{name}
8e30bc8
8e30bc8
%files mpich-examples
8e30bc8
%doc README.rst
8e30bc8
%license LICENSE_1_0.txt
8e30bc8
%{_libdir}/mpich*/bin/*
8e30bc8
8e30bc8
%files mpich-devel
8e30bc8
%{_includedir}/%{name}
8e30bc8
%{_libdir}/mpich*/lib/pkgconfig/*.pc
8e30bc8
%{_libdir}/mpich*/lib/cmake/HPX
8e30bc8
%{_libdir}/mpich*/lib/bazel
8e30bc8
%{_libdir}/mpich*/lib/lib*.a
8e30bc8
%{_libdir}/mpich*/lib/lib*.so*
8e30bc8
8e30bc8
%files devel
8e30bc8
%{_includedir}/%{name}
8e30bc8
%{_libdir}/pkgconfig/*.pc
8e30bc8
%{_libdir}/cmake/HPX
8e30bc8
%{_libdir}/bazel
8e30bc8
%{_libdir}/lib*.a
8e30bc8
%{_libdir}/lib*.so*
8e30bc8
8e30bc8
%changelog
8e30bc8
* Fri Nov 16 2018 Christoph Junghans <junghans@votca.org> - 1.2.0-3
8e30bc8
- Disable parallel build for aarch64
8e30bc8
8e30bc8
* Thu Nov 15 2018 Christoph Junghans <junghans@votca.org> - 1.2.0-2
8e30bc8
- Added upstream patch 3551.patch to fix build on i686
8e30bc8
8e30bc8
* Wed Nov 14 2018 Christoph Junghans <junghans@votca.org> - 1.2.0-1
8e30bc8
- Version bump to hpx-1.2.0
8e30bc8
8e30bc8
* Fri Nov 09 2018 Patrick Diehl <patrickdiehl@lsu.edu> - 1.2-0.1.rc1
8e30bc8
- Initial Release of HPX 1.2_rc1