File spla.spec of Package spla

#
# spec file for package spla
#
# Copyright (c) 2024 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 https://bugs.opensuse.org/
#


Name: 	spla
Version:	0
Release:	0
%define         sover 1
Summary: Specialized Parallel Linear Algebra, providing distributed GEMM functionality for specific matrix distributions with optional GPU acceleration
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License:	BSD-3-Clause
URL:https://github.com/eth-cscs/spla
Source:	_service

BuildRequires:	openmpi5-macros-devel
BuildRequires:	cmake
BuildRequires:	gcc-c++
BuildRequires:	gcc-fortran

BuildRequires:	gsl-devel

BuildRequires:	libxc-devel

BuildRequires:	fftw3-openmp-devel

BuildRequires:	libopenblas_openmp-devel
BuildRequires:	blacs-openmpi5-devel
BuildRequires:	libscalapack2-openmpi5-devel


%openmpi_requires


%description
SPLA provides specialized functions for linear algebra computations with a C++ and C interface, which are inspired by requirements in computational material science codes.

Currently, SPLA provides functions for distributed matrix multiplications with specific matrix distributions, which cannot be used directly with a ScaLAPACK interface. All computations can optionally utilize GPUs through CUDA or ROCm, where matrices can be located either in host or device memory.

%package -n libspla-%sover
Summary:        Main libint library v2
Group:          System/Libraries

%description -n libspla-%sover
SPLA provides specialized functions for linear algebra computations with a C++ and C interface, which are inspired by requirements in computational material science codes.

Currently, SPLA provides functions for distributed matrix multiplications with specific matrix distributions, which cannot be used directly with a ScaLAPACK interface. All computations can optionally utilize GPUs through CUDA or ROCm, where matrices can be located either in host or device memory.

%package devel
Summary:        Development headers and libraries for libint
Group:          Development/Libraries/C and C++
Requires:       eigen3-devel
Requires:       libspla-%sover = %{version}

%description devel
SPLA provides specialized functions for linear algebra computations with a C++ and C interface, which are inspired by requirements in computational material science codes.

Currently, SPLA provides functions for distributed matrix multiplications with specific matrix distributions, which cannot be used directly with a ScaLAPACK interface. All computations can optionally utilize GPUs through CUDA or ROCm, where matrices can be located either in host or device memory.
%prep

%setup -q -n %_sourcedir/%name-%version -T -D
%__mkdir -p %_builddir/%_sourcedir
%__ln -rs %_sourcedir/%name-%version %_builddir/%_sourcedir

%build

%setup_openmpi
%cmake  -DSPLA_OMP=ON -DSPLA_MPI=ON \
-DSPLA_GPU_BACKEND=OFF \
-DSPLA_FORTRAN=ON \
-DCMAKE_INSTALL_PREFIX:PATH=%openmpi_prefix
%install
%cmake_install


%files
%license LICENSE
%doc README.md

%files -n libspla-%sover
%dir %openmpi_prefix
%openmpi_prefix/%{_lib}/libspla.so.*
%dir %openmpi_prefix/%{_lib}
%dir %openmpi_prefix
%files devel
%dir %openmpi_prefix/%{_lib}
%dir %openmpi_prefix/include

%dir %openmpi_prefix/%{_lib}/cmake/
%openmpi_prefix/%{_lib}/libspla.so
%openmpi_prefix/%{_lib}/cmake/SPLA/
%openmpi_prefix/include/spla
%openmpi_prefix/%{_lib}/pkgconfig/SPLA.pc
%changelog

openSUSE Build Service is sponsored by