From 108e77d107bdbca1abbab0b087146f6a3ddf163f Mon Sep 17 00:00:00 2001 From: sagitter Date: Sat, 18 Apr 2020 21:56:47 +0200 Subject: [PATCH] Some minor fixes| Do not pack example's source code --- .gitignore | 1 + SuperLU.spec | 92 +++++++++++++++++++++++++++++++--------------------- sources | 2 +- 3 files changed, 57 insertions(+), 38 deletions(-) diff --git a/.gitignore b/.gitignore index 03dfd16..ee7c990 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /superlu_5.1.1.tar.gz /superlu_5.2.0.tar.gz /superlu_5.2.1.tar.gz +/superlu-5.2.1.tar.gz diff --git a/SuperLU.spec b/SuperLU.spec index 8576135..fb48926 100644 --- a/SuperLU.spec +++ b/SuperLU.spec @@ -1,36 +1,31 @@ %global genname superlu %global libver 5 -## The RPM macro for the linker flags does not exist on EPEL -%if 0%{?rhel} && 0%{?rhel} < 7 -%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro} -%endif - -Name: SuperLU -Version: 5.2.1 -Release: 8%{?dist} -Summary: Subroutines to solve sparse linear systems -License: BSD and GPLv2+ -URL: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/ -Source0: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/%{genname}_%{version}.tar.gz -Patch0: %{genname}-cmake-includedir.patch -Patch1: %{genname}-removemc64.patch +Name: SuperLU +Version: 5.2.1 +Release: 9%{?dist} +Summary: Subroutines to solve sparse linear systems +License: BSD and GPLv2+ +URL: https://portal.nersc.gov/project/sparse/superlu/ +Source0: https://github.com/xiaoyeli/superlu/archive/v%{version}/%{genname}-%{version}.tar.gz +Patch0: %{genname}-cmake-includedir.patch +Patch1: %{genname}-removemc64.patch # Patch soname (5 -> 5.2) of shared library -Patch2: %{name}-%{version}-set_soname.patch +Patch2: %{name}-%{version}-set_soname.patch %ifarch %{openblas_arches} -BuildRequires: openblas-devel, openblas-srpm-macros +BuildRequires: openblas-devel, openblas-srpm-macros %else -BuildRequires: blas-devel +BuildRequires: blas-devel %endif -BuildRequires: atlas-devel, gcc +BuildRequires: atlas-devel, gcc %if 0%{?rhel} -BuildRequires: epel-rpm-macros +BuildRequires: epel-rpm-macros %endif -BuildRequires: cmake3 -BuildRequires: gcc-gfortran -BuildRequires: csh +BuildRequires: cmake3 +BuildRequires: gcc-gfortran +BuildRequires: csh %description SuperLU contains a set of subroutines to solve a sparse linear system @@ -39,23 +34,21 @@ The columns of A may be preordered before factorization; the preordering for sparsity is completely separate from the factorization. %package devel -Summary: Header files and libraries for SuperLU development -Requires: %{name}%{?_isa} = %{version}-%{release} +Summary: Header files and libraries for SuperLU development +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains the header files and libraries for use with %{name} package. %package doc -Summary: Documentation and Examples for SuperLU -Requires: %{name}%{?_isa} = %{version}-%{release} - +Summary: Documentation and Examples for SuperLU +BuildArch: noarch %description doc -The %{name}-doc package contains all the help documentation along with C -and FORTRAN examples. +The %{name}-doc package contains all the help HTML documentation. %prep -%autosetup -n %{name}_%{version} -p1 +%autosetup -n %{genname}-%{version} -p1 rm -fr SRC/mc64ad.f.bak find . -type f | sed -e "/TESTING/d" | xargs chmod a-x @@ -70,11 +63,16 @@ sed -i.bak '/NOOPTS/d' make.inc.in sed -e 's|-O0|-O2|g' -i SRC/CMakeLists.txt %build -mkdir -p build; cd build +mkdir -p build; pushd build # Do not use bundled CBLAS code %cmake3 -Denable_blaslib:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING=Release .. %make_build +popd + +# Compile Fortran example interface to use the C routines in SuperLU +make -C FORTRAN +make -C EXAMPLE %install %make_install -C build @@ -84,6 +82,21 @@ pushd build ctest3 -V %{?_smp_mflags} popd +# Test Fortran example interface to use the C routines in SuperLU +pushd FORTRAN +export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +./df77exm < ../EXAMPLE/g20.rua +./zf77exm < ../EXAMPLE/cg20.cua +./test_omp < ../EXAMPLE/g20.rua +make clean +popd +# Test sample programs +pushd EXAMPLE +export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +./superlu +make clean +popd + %ldconfig_scriptlets %files @@ -95,9 +108,14 @@ popd %{_libdir}/libsuperlu.so %files doc -%doc DOC EXAMPLE FORTRAN +%doc DOC %changelog +* Sat Apr 18 2020 Antonio Trande - 5.2.1-9 +- Some minor fixes +- Compile/execute Fortran tests and examples +- Do not pack example's source code + * Tue Jan 28 2020 Fedora Release Engineering - 5.2.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild @@ -107,16 +125,16 @@ popd * Thu Jan 31 2019 Fedora Release Engineering - 5.2.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild -* Fri Sep 14 2018 Antonio Trande - 5.2.1-5 +* Fri Sep 14 2018 Antonio Trande - 5.2.1-5 - Remove gcc-gfortran as required package * Thu Jul 12 2018 Fedora Release Engineering - 5.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild -* Wed Apr 25 2018 Antonio Trande - 5.2.1-3 +* Wed Apr 25 2018 Antonio Trande - 5.2.1-3 - Patch soname (5 -> 5.2) of shared library -* Sun Apr 15 2018 Antonio Trande - 5.2.1-2 +* Sun Apr 15 2018 Antonio Trande - 5.2.1-2 - Use cmake3 on rhel - Use blas from system @@ -126,11 +144,11 @@ popd - Drop obsolete patches - Resolves #1547494 - build with standard Fedora flags -* Wed Feb 21 2018 Antonio Trande - 5.2.0-8 +* Wed Feb 21 2018 Antonio Trande - 5.2.0-8 - Add gcc BR - Remove el5 bits -* Thu Feb 15 2018 Antonio Trande - 5.2.0-7 +* Thu Feb 15 2018 Antonio Trande - 5.2.0-7 - Use %%ldconfig_scriptlets * Wed Feb 07 2018 Fedora Release Engineering - 5.2.0-6 diff --git a/sources b/sources index 835c930..b7e7d8b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (superlu_5.2.1.tar.gz) = 30538b4c2809294b8f34646bce6445944f21a1dffaf3ec0a0f29a55d5261caa56e4279d7722bb95cc9d89450d36ded969617edc82ecce7d0f1dfb24040d80d07 +SHA512 (superlu-5.2.1.tar.gz) = c5f9ca6055b6861dcc89e31c446c9f57a4e16333f9f24f109e8f375eded878005fa520ab39d2c1dd0ce12f289f9e251aef47da58c975bf5b1f09ca7539194e90