Accepting request 663854 from home:eeich:factory_staging
- Add environment module support for HPC. * create baselib.conf on the fly. - Add superlu-5.2-make.patch: add compiler and build flags in make.inc. - Separate off documentation and examples to separate packages. OBS-URL: https://build.opensuse.org/request/show/663854 OBS-URL: https://build.opensuse.org/package/show/science/superlu?expand=0&rev=3
This commit is contained in:
parent
f4d2dd3913
commit
1ed97302bc
4
_multibuild
Normal file
4
_multibuild
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>gnu-hpc</package>
|
||||||
|
<package>serial</package>
|
||||||
|
</multibuild>
|
@ -1 +0,0 @@
|
|||||||
libsuperlu5
|
|
44
superlu-5.2-make.patch
Normal file
44
superlu-5.2-make.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
diff -ruN SuperLU_5.2.1.old/make.inc SuperLU_5.2.1/make.inc
|
||||||
|
--- SuperLU_5.2.1.old/make.inc 2016-05-22 17:08:28.000000000 +0100
|
||||||
|
+++ SuperLU_5.2.1/make.inc 2016-09-29 21:04:09.000000000 +0100
|
||||||
|
@@ -18,14 +18,14 @@
|
||||||
|
#
|
||||||
|
# The name of the libraries to be created/linked to
|
||||||
|
#
|
||||||
|
-SuperLUroot = /home/xiaoye/Dropbox/Codes/SuperLU/SuperLU_5.2.1/build
|
||||||
|
+SuperLUroot = ../
|
||||||
|
SUPERLULIB = $(SuperLUroot)/SRC/libsuperlu.a
|
||||||
|
|
||||||
|
TMGLIB = libtmglib.a
|
||||||
|
|
||||||
|
-# BLASDEF = -DUSE_VENDOR_BLAS
|
||||||
|
-BLASLIB = /home/xiaoye/Dropbox/Codes/SuperLU/SuperLU_5.2.1/build/CBLAS/libblas.a
|
||||||
|
-LIBS = $(SUPERLULIB) /home/xiaoye/Dropbox/Codes/SuperLU/SuperLU_5.2.1/build/CBLAS/libblas.a
|
||||||
|
+BLASDEF = -DUSE_VENDOR_BLAS
|
||||||
|
+BLASLIB = -lopenblas
|
||||||
|
+LIBS = $(SUPERLULIB) $(BLASLIB)
|
||||||
|
|
||||||
|
#
|
||||||
|
# The archiver and the flag(s) to use when building archive (library)
|
||||||
|
@@ -35,10 +35,11 @@
|
||||||
|
ARCHFLAGS = cr
|
||||||
|
RANLIB = /usr/bin/ranlib
|
||||||
|
|
||||||
|
-CC = /usr/bin/cc
|
||||||
|
-CFLAGS = -O3 -DNDEBUG -DPRNTlevel=0 -DAdd_
|
||||||
|
-NOOPTS = -O0
|
||||||
|
-FORTRAN = /usr/bin/gfortran
|
||||||
|
+#CC = gcc
|
||||||
|
+CFLAGS = $(RPM_OPT_FLAGS) -fPIC -DPIC
|
||||||
|
+NOOPTS = $(RPM_OPT_FLAGS) -Os -fPIC -DPIC
|
||||||
|
+#FORTRAN = gfortran #g77
|
||||||
|
+FFLAGS = $(RPM_OPT_FLAGS) -fPIC
|
||||||
|
|
||||||
|
LOADER = $(CC)
|
||||||
|
LOADOPTS =
|
||||||
|
@@ -46,4 +47,4 @@
|
||||||
|
#
|
||||||
|
# The directory in which Matlab is installed
|
||||||
|
#
|
||||||
|
-MATLAB = /Applications/MATLAB_R2015b.app
|
||||||
|
+#MATLAB = /Applications/MATLAB_R2015b.app
|
6
superlu-rpmlintrc
Normal file
6
superlu-rpmlintrc
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# This line is mandatory to access the configuration functions
|
||||||
|
from Config import *
|
||||||
|
|
||||||
|
addFilter("superlu.* library-without-ldconfig-postin")
|
||||||
|
addFilter("superlu.* library-without-ldconfig-postun")
|
||||||
|
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 26 19:55:59 UTC 2018 - eich@suse.com
|
||||||
|
|
||||||
|
- Add environment module support for HPC.
|
||||||
|
* create baselib.conf on the fly.
|
||||||
|
- Add superlu-5.2-make.patch:
|
||||||
|
add compiler and build flags in make.inc.
|
||||||
|
- Separate off documentation and examples to separate packages.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 14 12:56:22 UTC 2016 - badshah400@gmail.com
|
Tue Jun 14 12:56:22 UTC 2016 - badshah400@gmail.com
|
||||||
|
|
||||||
|
207
superlu.spec
207
superlu.spec
@ -1,8 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package superlu
|
# spec file for package superlu
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
# Copyright (c) 2016 Christoph Grüninger foss@grueninger.de
|
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -15,20 +14,53 @@
|
|||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
# SuperLU library build that is dependent on compiler toolchain
|
||||||
|
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
|
||||||
Name: superlu
|
# Base package name
|
||||||
Summary: A general purpose library for the direct solution of sparse systems of linear equations
|
%define pname superlu
|
||||||
|
%define ver 5.2.1
|
||||||
|
|
||||||
|
%define _ver %(echo %{ver} | tr . _)
|
||||||
|
|
||||||
|
%if "%flavor" == ""
|
||||||
|
ExclusiveArch: do_not_build
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{flavor}" == "serial"
|
||||||
|
%bcond_with hpc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{flavor}" == "gnu-hpc"
|
||||||
|
%bcond_without hpc
|
||||||
|
%global compiler_family gnu
|
||||||
|
%undefine c_f_ver
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%define package_name %pname
|
||||||
|
%if %{without hpc}
|
||||||
|
%define p_includedir %_includedir
|
||||||
|
%define p_libdir %_libdir
|
||||||
|
%define _sover 5
|
||||||
|
%else
|
||||||
|
%{hpc_init -c %compiler_family %{?c_f_ver:-v %{c_f_ver}} %{?ext:-e %{ext}}}
|
||||||
|
%define package_name %{hpc_package_name %_ver}
|
||||||
|
%define p_includedir %hpc_includedir
|
||||||
|
%define p_libdir %hpc_libdir
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: %{package_name}
|
||||||
|
Summary: A general purpose library for the direct solution of linear equations
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Version: 5.2.1
|
Version: %{ver}
|
||||||
Release: 0
|
Release: 0
|
||||||
%define soname lib%{name}5
|
Source: http://crd-legacy.lbl.gov/%7Exiaoye/SuperLU/%{pname}_%{version}.tar.gz
|
||||||
#Source: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_5.2.1.tar.gz
|
|
||||||
Source: %{name}_%{version}-bsd.tar.gz
|
|
||||||
Source1: superlu_ug.pdf
|
Source1: superlu_ug.pdf
|
||||||
Source2: README.SUSE
|
Source2: README.SUSE
|
||||||
Source3: baselibs.conf
|
# PATCH-FEATURE-OPENSUSE superlu-5.2-make.patch : add compiler and build flags in make.inc
|
||||||
|
Patch0: superlu-5.2-make.patch
|
||||||
# PATCH-FIX-UPSTREAM superlu-4.3-include.patch : avoid implicit declaration warnings
|
# PATCH-FIX-UPSTREAM superlu-4.3-include.patch : avoid implicit declaration warnings
|
||||||
Patch1: superlu-4.3-include.patch
|
Patch1: superlu-4.3-include.patch
|
||||||
# PATCH-FIX-UPSTREAM superlu-4.3-dont-opt-away.diff
|
# PATCH-FIX-UPSTREAM superlu-4.3-dont-opt-away.diff
|
||||||
@ -36,95 +68,170 @@ Patch2: superlu-4.3-dont-opt-away.diff
|
|||||||
# PATCH-FIX-OPENSUSE superlu-5.2-remove-mc64ad.patch [bnc#796236]
|
# PATCH-FIX-OPENSUSE superlu-5.2-remove-mc64ad.patch [bnc#796236]
|
||||||
# The Harwell Subroutine Library (HSL) routine mc64ad.c have been removed
|
# The Harwell Subroutine Library (HSL) routine mc64ad.c have been removed
|
||||||
# from the original sources for legal reasons. This patch disables the inclusion of
|
# from the original sources for legal reasons. This patch disables the inclusion of
|
||||||
# this routine in the library which, however, remains fully functionnal
|
# this routine in the library which, however, remains fully functional
|
||||||
Patch3: superlu-5.2-remove-mc64ad.patch
|
Patch3: superlu-5.2-remove-mc64ad.patch
|
||||||
Url: http://crd.lbl.gov/~xiaoye/SuperLU/
|
URL: http://crd.lbl.gov/~xiaoye/SuperLU/
|
||||||
BuildRequires: blas-devel
|
|
||||||
BuildRequires: cmake >= 2.8.12
|
|
||||||
BuildRequires: fdupes
|
|
||||||
BuildRequires: gcc-fortran
|
|
||||||
BuildRequires: tcsh
|
BuildRequires: tcsh
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: cmake >= 2.8.12
|
||||||
|
%if %{without hpc}
|
||||||
|
BuildRequires: blas-devel
|
||||||
|
BuildRequires: gcc-fortran
|
||||||
|
%else
|
||||||
|
Requires: %{compiler_family}%{?c_f_ver}-compilers-hpc
|
||||||
|
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
|
||||||
|
BuildRequires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
|
||||||
|
BuildRequires: suse-hpc >= 0.3
|
||||||
|
%hpc_requires
|
||||||
|
%hpc_requires_devel
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
SuperLU is an algorithm that uses group theory to optimize LU
|
SuperLU is an algorithm that uses group theory to optimize LU
|
||||||
decomposition of sparse matrices.
|
decomposition of sparse matrices.
|
||||||
|
|
||||||
%package -n %soname
|
Docu can be found in the %{name}-doc package or on http://www.netlib.org.
|
||||||
|
|
||||||
|
%package -n lib%{name}%{?_sover}
|
||||||
Summary: SuperLU matrix solver
|
Summary: SuperLU matrix solver
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
|
|
||||||
%description -n %soname
|
%description -n lib%{name}%{?_sover}
|
||||||
SuperLU is an algorithm that uses group theory to optimize LU
|
SuperLU is an algorithm that uses group theory to optimize LU
|
||||||
decomposition of sparse matrices.
|
decomposition of sparse matrices.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for %{name}
|
Summary: Headers and development files
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %soname = %{version}
|
Requires: lib%{name}%{?_sover} = %version
|
||||||
# The standalone superlu RPM has been eliminated, and the relevant
|
Recommends: %name-doc
|
||||||
# files are now in superlu-devel
|
|
||||||
# The last standalone superlu RPM was was v3.0
|
|
||||||
Provides: superlu = %{version}
|
|
||||||
Obsoletes: superlu <= 3.0
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
The %{name}-devel package contains libraries and header files for
|
SuperLU headers and libraries files needed for development
|
||||||
developing applications that use %{name}.
|
|
||||||
|
%package doc
|
||||||
|
Summary: Documentation for %name
|
||||||
|
Group: Documentation/Other
|
||||||
|
|
||||||
|
%description doc
|
||||||
|
Documentation (HTML/PDF) for SuperLU.
|
||||||
|
SuperLU is an algorithm that uses group theory to optimize LU
|
||||||
|
decomposition of sparse matrices.
|
||||||
|
|
||||||
|
%package examples
|
||||||
|
Summary: Examples for %name
|
||||||
|
Group: Documentation/Other
|
||||||
|
Recommends: %name-devel
|
||||||
|
|
||||||
|
%description examples
|
||||||
|
Example programs for SuperLU.
|
||||||
|
SuperLU is an algorithm that uses group theory to optimize LU
|
||||||
|
decomposition of sparse matrices.
|
||||||
|
|
||||||
|
%if %{with hpc}
|
||||||
|
%{hpc_master_package -l -L}
|
||||||
|
%{hpc_master_package devel}
|
||||||
|
%{hpc_master_package doc}
|
||||||
|
%{hpc_master_package examples}
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n SuperLU_%{version}
|
%setup -q -n SuperLU_%{version}
|
||||||
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
# superlu_ug.pdf in %%doc
|
|
||||||
cp %SOURCE1 %SOURCE2 ./
|
cp %SOURCE1 %SOURCE2 ./
|
||||||
|
# Create baselib.conf dynamically (non-HPC build only).
|
||||||
|
%if %{without hpc}
|
||||||
|
cat > %{_sourcedir}/baselibs.conf <<EOF
|
||||||
|
lib%{name}%{?_sover}
|
||||||
|
EOF
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# FIXME: Drop the -Denable_tests=OFF flag when MATGEN linking issues are resolved
|
%{?hpc_setup}
|
||||||
|
%if %{without hpc}
|
||||||
%cmake \
|
%cmake \
|
||||||
|
%else
|
||||||
|
module load openblas
|
||||||
|
%hpc_cmake \
|
||||||
|
%endif
|
||||||
-DCMAKE_BUILD_TYPE=Release -DUSE_XSDK_DEFAULTS='TRUE' -Denable_tests=OFF
|
-DCMAKE_BUILD_TYPE=Release -DUSE_XSDK_DEFAULTS='TRUE' -Denable_tests=OFF
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
cd ..
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%cmake_install
|
%cmake_install
|
||||||
|
|
||||||
#fix permissions
|
#fix permissions
|
||||||
chmod 644 MATLAB/*
|
chmod 644 MATLAB/*
|
||||||
|
|
||||||
# remove all build examples
|
# remove all build examples
|
||||||
cd EXAMPLE
|
cd EXAMPLE
|
||||||
make clean
|
make clean
|
||||||
rm -rf *itersol*
|
rm -rf *itersol* .gitignore
|
||||||
cd ..
|
cd ..
|
||||||
mv EXAMPLE examples
|
mv EXAMPLE examples
|
||||||
|
rm -f examples/.gitignore
|
||||||
cp FORTRAN/README README.fortran
|
cp FORTRAN/README README.fortran
|
||||||
%fdupes -s examples
|
%fdupes -s examples
|
||||||
|
|
||||||
%check
|
%if %{with hpc}
|
||||||
ln -s examples/ EXAMPLE
|
# TODO: is there any path to add for Matlab files?
|
||||||
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
|
%hpc_write_modules_files
|
||||||
make testing
|
#%Module1.0#####################################################################
|
||||||
echo -ne "\nTest results\n"
|
|
||||||
for i in stest dtest ctest ztest; do
|
|
||||||
cat TESTING/$i.out
|
|
||||||
done
|
|
||||||
|
|
||||||
%post -n %soname -p /sbin/ldconfig
|
proc ModulesHelp { } {
|
||||||
|
|
||||||
%postun -n %soname -p /sbin/ldconfig
|
puts stderr " "
|
||||||
|
puts stderr "This module loads the SuperLU library built with the %{compiler_family} compiler"
|
||||||
|
puts stderr "toolchain."
|
||||||
|
puts stderr " "
|
||||||
|
puts stderr "Note that this build of SuperLU leverages the OpenBLAS linear algebra libraries."
|
||||||
|
puts stderr "Consequently, openblas is loaded automatically with this module."
|
||||||
|
|
||||||
%files -n %soname
|
puts stderr "\nVersion %{version}\n"
|
||||||
%defattr(-,root,root,-)
|
|
||||||
|
}
|
||||||
|
module-whatis "Name: %{pname} built with %{compiler_family} compiler"
|
||||||
|
module-whatis "Version: %{version}"
|
||||||
|
module-whatis "Category: runtime library"
|
||||||
|
module-whatis "%{url}"
|
||||||
|
|
||||||
|
set version %{version}
|
||||||
|
|
||||||
|
depends-on openblas
|
||||||
|
|
||||||
|
prepend-path INCLUDE %{hpc_includedir}
|
||||||
|
prepend-path LD_LIBRARY_PATH %{hpc_libdir}
|
||||||
|
|
||||||
|
setenv %{hpc_PNAME %pname}_DIR %{hpc_prefix}
|
||||||
|
setenv %{hpc_PNAME %pname}_INC %{hpc_includedir}
|
||||||
|
setenv %{hpc_PNAME %pname}_LIB %{hpc_libdir}
|
||||||
|
|
||||||
|
EOF
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{without hpc}
|
||||||
|
%post -n lib%{name}%{?_sover} -p /sbin/ldconfig
|
||||||
|
%postun -n lib%{name}%{?_sover} -p /sbin/ldconfig
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files -n lib%{name}%{?_sover}
|
||||||
%doc README MATLAB README.SUSE
|
%doc README MATLAB README.SUSE
|
||||||
%{_libdir}/*.so.*
|
%{?hpc_dirs}
|
||||||
|
%{p_libdir}/*.so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%doc README.fortran
|
||||||
%doc DOC/html examples README.fortran superlu_ug.pdf
|
%{?hpc_modules_files}
|
||||||
%{_includedir}/*.h
|
%{p_includedir}/%{!?with_hpc:*}
|
||||||
%{_libdir}/*.so
|
%{p_libdir}/*.so
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%doc DOC/html superlu_ug.pdf
|
||||||
|
|
||||||
|
%files examples
|
||||||
|
%doc examples
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:a69513a061432baaac93bfd60a258ad492b894a2f4025276e742d88251b8a82f
|
|
||||||
size 2540521
|
|
3
superlu_5.2.1.tar.gz
Normal file
3
superlu_5.2.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:28fb66d6107ee66248d5cf508c79de03d0621852a0ddeba7301801d3d859f463
|
||||||
|
size 2560875
|
Loading…
Reference in New Issue
Block a user