Blob Blame History 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 .spec data files and anything else common
#	 Check on ignored omp pragmas -- from newer openmp?

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

%global shortver %(echo %version|awk -F. '{print $1 "." $2}')

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

# ScoutPatternParser and SilasConfigParser are GPL
License:	BSD and GPLv3+
URL:		http://www.scalasca.org/
Source0:	http://apps.fz-juelich.de/scalasca/releases/scalasca/%shortver/dist/%name-%version.tar.gz
# Fix logic for finding scorep.spec
Patch1:		scalasca-square.patch
BuildRequires:	otf2-devel >= 2.0, cube-devel >= 4.3
BuildRequires:	zlib-devel openmpi-devel chrpath gcc-c++
%if %{with mpich}
BuildRequires:	mpich-devel
%endif
# Necessary to run tests in epel7
BuildRequires:	openssh-clients
# Needed by square, to be moved out of the scorep package.
# (The -instrument option is deprecated, so don't require/recommend scorep.)
Requires:	%_datadir/scorep/scorep.spec

%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.

%description
%desc

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


%description openmpi
%desc

This is the openmpi version.

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


%description mpich
%desc

This is the mpich version.
%endif

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

%description doc
Documentation for %name

%prep
%setup -q
mkdir openmpi mpich simple
rm -r vendor/cubew vendor/otf2	# bundled libraries
%patch1 -p1 -b .bak


%build
%global _configure ../configure
%global do_build \
%configure --with-otf2 --with-cube --enable-shared --libdir=$MPI_LIB \\\
	   --bindir=$MPI_BIN --datadir=$MPI_HOME/share LDFLAGS=-Wl,--as-needed \\\
	   --enable-backend-test-runs --disable-silent-rules \
	   %make_build
pushd openmpi
%_openmpi_load
%do_build
%_openmpi_unload
popd
%if %{with mpich}
pushd mpich
%_mpich_load
%do_build
%_mpich_unload
popd
%endif
pushd simple
%configure --with-otf2 --with-cube --enable-shared LDFLAGS=-Wl,--as-needed \
	   --enable-backend-test-runs --disable-silent-rules --without-mpi
%make_build
popd


%install
%make_install -C openmpi
%if %{with mpich}
%make_install -C mpich
%endif
%make_install -C simple

find $RPM_BUILD_ROOT%_libdir \( -name \*.la -o -name \*.a \) -exec rm -f {} \;
chrpath -d $RPM_BUILD_ROOT%_bindir/scout.{ser,omp}
chrpath -d $RPM_BUILD_ROOT%_libdir/{openmpi,mpich}/bin/scout.{ser,omp}


%check
%_openmpi_load
cd openmpi
OMPI_MCA_orte_allocation_required=0 OMPI_MCA_btl=sm,self \
make check VERBOSE=1


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

%{!?_licensedir:%global license %%doc}
%files
%doc README
%license COPYING
%_datadir/%name
%exclude %_libdir/*.so
%_libdir/*.so.*
%_bindir/*

%files openmpi
%doc README
%license COPYING
%_libdir/openmpi/share/%name
%exclude %_libdir/openmpi/lib/*.so
%_libdir/openmpi/lib/*.so.*
%_libdir/openmpi/bin/*

%if %{with mpich}
%files mpich
%doc README
%license COPYING
%_libdir/mpich/share/%name
%exclude %_libdir/mpich/lib/*.so
%_libdir/mpich/lib/*.so.*
%_libdir/mpich/bin/*
%endif

%files doc
%_docdir/%name


%changelog
* Sat Oct 27 2018 Dave Love <loveshack@fedoraproject.org> - 2.4-4
- Correct dependence on scorep.spec

* Wed Oct 24 2018 Dave Love <loveshack@fedoraproject.org> - 2.4-3
- Require scorep config [#1610849]
- Fix finding scorep.spec in square
- Some rpm spec cleanup

* Sat Jul 21 2018 Dave Love <loveshack@fedoraproject.org> - 2.4-2
- BR gcc-c++ (#1606306)
- Remove unnecessary -std=gnu++98

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Dave Love <loveshack@fedoraproject.org> - 2.4-1
- New version (#1578180)

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Fri Oct 21 2016 Orion Poplawski <orion@cora.nwra.com> - 2.3.1-2
- Rebuild for openmpi 2.0

* Fri May 20 2016 Orion Poplawski <orion@cora.nwra.com> - 2.3.1-1
- Update to 2.3.1
- Drop pearl patch applied upstream

* Thu May 12 2016 Dave Love <loveshack@fedoraproject.org> - 2.3-4
- Run ldconfig for main package too, and fix rpath

* Wed May 11 2016 Dave Love <loveshack@fedoraproject.org> - 2.3-3
- Build non-MPI version
  Resolves: rhbz#1334560
- Use separate datadirs; at least summary file is build-dependent

* Sat Apr 16 2016 Orion Poplawski <orion@cora.nwra.com> - 2.3-2
- Just fix test program linkage

* Fri Apr 15 2016 Orion Poplawski <orion@cora.nwra.com> - 2.3-1
- Update to 2.3
- Add patch to fix libpearl_base linkage

* Sun Feb 14 2016 Dave Love <loveshack@fedoraproject.org> - 2.2.2-6
- Set CXX flags to build with gcc6
- Disable silent make rules

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Sep 15 2015 Orion Poplawski <orion@cora.nwra.com> - 2.2.2-4
- Rebuild for openmpi 1.10.0

* Sat Aug 22 2015 Dave Love <d.love@liverpool.ac.uk> - 2.2.2-3
- BR openssh-clients so test works in koji epel7

* Tue Jul 7 2015 Dave Love <d.love@liverpool.ac.uk> - 2.2.2-2
- Various spec tidying
- Don't build devel package -- doesn't seem useful

* Thu Jun 25 2015 Dave Love <d.love@liverpool.ac.uk> - 2.2.2-1
- New version

* Thu May 28 2015 Dave Love <d.love@liverpool.ac.uk> - 2.2.1-1
- New version

* Sun Feb 22 2015 Dave Love <d.love@liverpool.ac.uk> - 2.2-1
- New version

* Sun Feb 22 2015 Dave Love <d.love@liverpool.ac.uk> - 2.1-6
- Configure and run tests
- Avoid mpich on el6 ppc64
- Remove defattr

* Wed Dec 24 2014 Dave Love <d.love@liverpool.ac.uk> - 2.1-5
- Don't install .a files

* Tue Dec 16 2014 Dave Love <d.love@liverpool.ac.uk> - 2.1-4
- Modify requires

* Sun Dec 14 2014 Dave Love <d.love@liverpool.ac.uk> - 2.1-4
- Fix copyright

* Thu Dec 11 2014 Dave Love <d.love@liverpool.ac.uk> - 2.1-3
- Add mpich

* Thu Nov 20 2014 Dave Love <d.love@liverpool.ac.uk> - 2.1-2
- Minor rpmlint fixes

* Mon Oct 13 2014 Dave Love <d.love@liverpool.ac.uk> - 2.1-2
- Initial packaging