Blob Blame Raw
# Copyright (c) 2014, 2015  Dave Love, University of Liverpool
# MIT licence, per Fedora policy.

# NB many rpm warnings, mostly undefined-non-weak-symbol, which I
# think are ignorable.

# fixme: Make common package for whatever can be shared between MPI versions.
#	 Check on ignored omp pragmas -- from newer openmp?

# In case we can support el6
%if 0%{?el6}
%ifarch ppc64
%bcond_with mpich
%bcond_without mpich
%bcond_without mpich

%global ver 2.2.2
%global shortver 2.2

Name:		scalasca
Version:	%ver
Release:	2%{?dist}
Summary:	Toolset for performance analysis of large-scale parallel applications

# ScoutPatternParser and SilasConfigParser are GPL
License:	BSD and GPLv3+

BuildRequires:	otf2-devel >= 1.5, cube-devel >= 4.3
BuildRequires:	zlib-devel openmpi-devel
%if %{with mpich}
BuildRequires:	mpich-devel

%global desc \
Scalasca is a software tool that supports the performance optimization\
of parallel programs by measuring and analyzing their runtime\
behavior. The analysis identifies potential performance bottlenecks –\
in particular those concerning communication and synchronization – and\
offers guidance in exploring their causes.\
Scalasca targets mainly scientific and engineering applications based\
on the programming interfaces MPI and OpenMP, including hybrid\
applications based on a combination of the two. The tool has been\
specifically designed for use on large-scale systems, but is also well\
suited for small- and medium-scale HPC platforms.


%package openmpi
Summary:	Toolset for performance analysis of large-scale parallel applications - openmpi
Requires:	openmpi%{?_isa}

%description openmpi

This is the openmpi version.

%if %{with mpich}
%package mpich
Summary:	Toolset for performance analysis of large-scale parallel applications - mpich
Requires:	mpich%{?_isa}

%description mpich

This is the mpich version.

%package doc
Summary: Documentation for %name
BuildArch: noarch

%description doc
Documentation for %name

%setup -q
mkdir openmpi mpich
rm -r vendor/cube vendor/otf2	# bundled libraries

%global _configure ../configure
%global do_build \
%configure --with-otf2 --with-cube --enable-shared --libdir=$MPI_LIB \\\
	   --bindir=$MPI_BIN LDFLAGS=-Wl,--as-needed \\\
	   make %{?_smp_mflags}
pushd openmpi
%if %{with mpich}
pushd mpich

make install -C openmpi DESTDIR=$RPM_BUILD_ROOT
%if %{with mpich}
make install -C mpich DESTDIR=$RPM_BUILD_ROOT

rm -f $RPM_BUILD_ROOT%_libdir/*/lib/*.{a,la}

%if x%{?copr_username} == x
cd openmpi
OMPI_MCA_orte_allocation_required=0 OMPI_MCA_btl=sm,self \
make check

%{!?_licensedir:%global license %%doc}
%files openmpi
%license COPYING
%exclude %_libdir/openmpi/lib/*.so

%if %{with mpich}
%files mpich
%license COPYING
%exclude %_libdir/mpich/lib/*.so

%files doc

* Tue Jul 7 2015 Dave Love <> - 2.2.2-2
- Various spec tidying
- Don't build devel package -- doesn't seem useful

* Thu Jun 25 2015 Dave Love <> - 2.2.2-1
- New version

* Thu May 28 2015 Dave Love <> - 2.2.1-1
- New version

* Sun Feb 22 2015 Dave Love <> - 2.2-1
- New version

* Sun Feb 22 2015 Dave Love <> - 2.1-6
- Configure and run tests
- Avoid mpich on el6 ppc64
- Remove defattr

* Wed Dec 24 2014 Dave Love <> - 2.1-5
- Don't install .a files

* Tue Dec 16 2014 Dave Love <> - 2.1-4
- Modify requires

* Sun Dec 14 2014 Dave Love <> - 2.1-4
- Fix copyright

* Thu Dec 11 2014 Dave Love <> - 2.1-3
- Add mpich

* Thu Nov 20 2014 Dave Love <> - 2.1-2
- Minor rpmlint fixes

* Mon Oct 13 2014 Dave Love <> - 2.1-2
- Initial packaging