Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:badshah400:branches:science
petsc
petsc.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File petsc.spec of Package petsc
# # spec file for package petsc # # 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/ # %global flavor @BUILD_FLAVOR@%{nil} %define pname petsc ExcludeArch: s390 s390x # Fails to link during configure, as it omits SuperLU from the link libraries %bcond_with hypre # Only available as openmpi flavor, and not in Factory %bcond_with pastix %if "%flavor" == "" ExclusiveArch: do_not_build %endif %if "%flavor" == "serial" %{bcond_with hpc} %endif %if "%flavor" == "openmpi4" %{?DisOMPI4} %define mpi_family openmpi %define mpi_vers 4 %{bcond_with hpc} %endif %{?mpi_flavor:%{bcond_without mpi}}%{!?mpi_flavor:%{bcond_with mpi}} %{?with_mpi:%{!?mpi_flavor:error "No MPI family specified!"}} %if %{with mpi} %define pkg_prefix %{_libdir}/mpi/gcc/%{mpi_flavor}%{?mpi_vers} %define pkg_bindir %{pkg_prefix}/bin %define pkg_libdir %{pkg_prefix}/%{_lib} %define pkg_incdir %{pkg_prefix}/include %define pkg_datadir %{pkg_prefix}/share %define pkg_suffix -%{mpi_flavor}%{?mpi_vers} %else %define pkg_prefix %{_prefix} %define pkg_bindir %{_bindir} %define pkg_libdir %{_libdir} %define pkg_incdir %{_includedir} %define pkg_datadir %{_datadir} %endif Name: %{pname}%{?pkg_suffix} Summary: Portable Extensible Toolkit for Scientific Computation License: BSD-2-Clause Version: 3.21.0 Release: 0 Source: https://web.cels.anl.gov/projects/petsc/download/release-snapshots/%{pname}-%{version}.tar.gz Patch0: petsc-3.3-p2-no-rpath.patch Patch1: petsc-3.7-fix-pastix-detection.patch URL: https://petsc.org BuildRequires: fdupes BuildRequires: hwloc-devel BuildRequires: pkg-config BuildRequires: python3-base BuildRequires: blas-devel BuildRequires: gcc-c++ BuildRequires: gcc-fortran BuildRequires: lapack-devel BuildRequires: suitesparse-devel %if %{with mpi} BuildRequires: %{mpi_family}%{?mpi_vers}-devel BuildRequires: blacs-%{mpi_family}%{?mpi_vers}-devel BuildRequires: hdf5-%{mpi_family}%{?mpi_vers}-devel %if %{with hypre} BuildRequires: hypre-%{mpi_family}%{?mpi_vers}-devel BuildRequires: superlu-devel %endif BuildRequires: ptscotch-%{mpi_family}%{?mpi_vers}-devel BuildRequires: ptscotch-parmetis-%{mpi_family}%{?mpi_vers}-devel #!BuildIgnore: metis-devel %if %{with pastix} BuildRequires: pastix-%{mpi_family}%{?mpi_vers}-devel %endif BuildRequires: scalapack-%{mpi_family}%{?mpi_vers}-devel %else BuildRequires: metis-devel %endif BuildRequires: valgrind-devel BuildRequires: xz BuildRequires: zlib-devel %description PETSc is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations. %package -n %{libname %_vers} Summary: PETSc shared libraries Group: System/Libraries %if %{with hpc} %{hpc_requires} %{requires_eq libhdf5%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-%{mpi_family}%{?mpi_vers}-hpc} %{requires_eq libscalapack2%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-%{mpi_family}%{?mpi_vers}-hpc} %else # Fixup wrong package name Conflicts: libpetsc3%{?with_mpi:-%{mpi_family}%{?mpi_vers}} %endif %description -n %{libname %_vers} PETSc is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations. %{?with_hpc:%{hpc_master_package -n %{libname_plain} -l -L}} %package devel Summary: Devel files for petsc Group: Development/Libraries/C and C++ Requires: %{libname %_vers} = %{version} Requires: suitesparse-devel %if %{without mpi} Requires: metis-devel %else Requires: blacs-%{mpi_family}%{?mpi_vers}-devel Requires: hdf5-%{mpi_family}%{?mpi_vers}-devel Requires: hypre-%{mpi_family}%{?mpi_vers}-devel Requires: ptscotch-%{mpi_family}%{?mpi_vers}-devel Requires: ptscotch-parmetis-%{mpi_family}%{?mpi_vers}-devel Requires: scalapack-%{mpi_family}%{?mpi_vers}-devel %endif %description devel PETSc is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations. %package doc Summary: Documentation for petsc Group: Documentation/HTML %description doc This package contains the documentation for petsc. %prep %autosetup -p1 -n petsc-%{version} %if 0 && %{without hpc} cat > %{_sourcedir}/baselibs.conf <<EOF %{libname %_vers} %{name}-devel requires -blas-<targettype> requires -lapack-<targettype> requires " %{libname %_vers}-<targettype> = <version>" EOF %endif %build %{?with_mpi:export LD_LIBRARY_PATH=%{p_libdir}} python%{python3_ver} ./config/configure.py \ --CFLAGS="$RPM_OPT_FLAGS $ARCHCFLAGS" \ --FFLAGS="$RPM_OPT_FLAGS $ARCHCFLAGS" \ --CXXFLAGS="$RPM_OPT_FLAGS $ARCHCFLAGS" \ --prefix=%{pkg_prefix} \ --with-clanguage=C++ \ --with-c-support \ --with-fortran-interfaces=1 \ --with-debugging=no \ --with-python-exec=python%{python_ver} \ --with-shared-libraries \ --with-batch=0 \ --with-suitesparse=1 \ --with-suitesparse-lib=[%{_libdir}/libklu.so,%{_libdir}/libumfpack.so,%{_libdir}/libcholmod.so,%{_libdir}/libcolamd.so,%{_libdir}/libccolamd.so,%{_libdir}/libcamd.so,%{_libdir}/libamd.so,%{_libdir}/libspqr.so,%{_libdir}/libsuitesparseconfig.so] \ --with-suitesparse-include=%{_includedir}/suitesparse \ %if %{without mpi} --with-mpi=0 \ %else --with-mpi=1 \ --with-mpi-dir=%{p_base}\ --with-blacs=1 \ --with-blacs-include=%{p_base}/include \ --with-blacs-lib=[%{p_libdir}/libblacs.so] \ %if %{with pastix} --with-pastix=1 \ --with-pastix-pkg-config=%{p_libdir}/pkgconfig \ %endif --with-ptscotch=1 \ --with-ptscotch-include=%{p_base}/include \ --with-ptscotch-lib=[%{p_libdir}/libptscotch.so,%{p_libdir}/libptscotcherr.so,%{p_libdir}/libptscotcherrexit.so,%{p_libdir}/libptscotchparmetis.so] \ --with-scalapack=1 \ --with-scalapack-include=%{p_base}/include \ --with-scalapack-lib=[%{p_libdir}/libscalapack.so] \ %if %{with hypre} --with-superlu=1 \ --with-hypre=1 \ --with-hypre-include=%{p_base}/include/hypre \ --with-hypre-lib=[%{p_libdir}/libHYPRE.so] \ %endif --with-hdf5=1 \ --with-hdf5-lib=[%{p_libdir}/libhdf5.so] \ --with-hdf5-include=%{p_base}/include \ || cat configure.log %endif %make_build %install %make_install %fdupes %{buildroot}%{pkg_include} %fdupes %{buildroot}%{pkg_libdir} %fdupes %{buildroot}%{pkg_prefix}/share/petsc/examples ## %files -n %{libname %_vers} %dir %{pkg_prefix} %dir %{pkg_prefix}/lib %{p_libdir}/*.so.* %{pkg_prefix}/share %exclude %{pkg_prefix}/share/petsc/examples %exclude %{pkg_prefix}/share/petsc/saws %if %{without hpc} %dir %{p_libdir}/petsc %dir %{p_libdir}/petsc/%{version} %{pkg_prefix}/lib/*.so.* %else %hpc_dirs %hpc_modules_files %{dirname:%{hpc_python_sitearch_no_singlespec}} %endif %files %{?n_pre}devel %exclude %{pkg_prefix}/lib/petsc/bin/saws %{pkg_prefix}/include %{pkg_prefix}/lib/petsc %{pkg_prefix}/%{!?with_hpc:lib}%{?with_hpc:%_lib}/pkgconfig %{p_libdir}/*.so %{p_libdir}/pkgconfig/*.pc %if %{without hpc} %{pkg_prefix}/lib/*.so %dir %{_datadir}/modules/%{name}-%{petsc_arch} %{_datadir}/modules/%{name}-%{petsc_arch}/%version%{?with_mpi:-%{mpi_family}%{?mpi_vers}} %endif %doc %{pkg_prefix}/share/petsc/examples %if %{with hpc} %files saws %{pkg_prefix}/lib/petsc/bin/saws %{pkg_prefix}/share/petsc/saws %endif %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor