Update to 5.2.1
- Resolves #1547494 - Use cmake Signed-off-by: Rafael dos Santos <rdossant@redhat.com>
This commit is contained in:
parent
a03544884e
commit
c064ebb380
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/superlu_4.3.tar.gz
|
||||
/superlu_5.1.1.tar.gz
|
||||
/superlu_5.2.0.tar.gz
|
||||
/superlu_5.2.1.tar.gz
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff -up SuperLU_4.3/MAKE_INC/make.linux.fpic SuperLU_4.3/MAKE_INC/make.linux
|
||||
--- SuperLU_4.3/MAKE_INC/make.linux.fpic 2012-01-06 10:39:58.474356562 +0530
|
||||
+++ SuperLU_4.3/MAKE_INC/make.linux 2012-01-06 10:40:59.933356590 +0530
|
||||
@@ -46,7 +46,8 @@ ARCHFLAGS = cr
|
||||
RANLIB = ranlib
|
||||
|
||||
CC = gcc
|
||||
-CFLAGS = -O3
|
||||
+FPIC = -fPIC
|
||||
+CFLAGS = -O3 $(FPIC)
|
||||
NOOPTS =
|
||||
FORTRAN = g77
|
||||
FFLAGS = -O2
|
@ -1,39 +0,0 @@
|
||||
diff -up SuperLU_4.3/SRC/Makefile.fix SuperLU_4.3/SRC/Makefile
|
||||
--- SuperLU_4.3/SRC/Makefile.fix 2012-02-01 17:15:17.711698876 +0530
|
||||
+++ SuperLU_4.3/SRC/Makefile 2012-02-01 17:17:07.794698927 +0530
|
||||
@@ -111,7 +111,7 @@ ZLUSRC = \
|
||||
ilu_zcolumn_dfs.o ilu_zpanel_dfs.o ilu_zcopy_to_ucol.o \
|
||||
ilu_zpivotL.o zdiagonal.o
|
||||
|
||||
-all: single double complex complex16
|
||||
+all: sharedlib
|
||||
|
||||
single: $(SLUSRC) $(ALLAUX) $(LAAUX) $(SLASRC) $(SCLAUX)
|
||||
$(ARCH) $(ARCHFLAGS) $(SUPERLULIB) \
|
||||
@@ -133,17 +133,22 @@ complex16: $(ZLUSRC) $(ALLAUX) $(LAAUX)
|
||||
$(ZLUSRC) $(ALLAUX) $(LAAUX) $(ZLASRC) $(DZLAUX)
|
||||
$(RANLIB) $(SUPERLULIB)
|
||||
|
||||
+sharedlib: $(ALLAUX) $(LAAUX) $(SLASRC) $(DLASRC) $(CLASRC) $(ZLASRC) $(SCLAUX) $(DZLAUX) $(SLUSRC) $(DLUSRC) $(CLUSRC) $(ZLUSRC)
|
||||
+ $(CC) $(CFLAGS) $(LIBS) -shared -Wl,-soname,libsuperlu.so.4.3 -o libsuperlu.so.4.3 \
|
||||
+ $(ALLAUX) $(LAAUX) $(SLASRC) $(DLASRC) $(CLASRC) $(ZLASRC) $(SCLAUX) \
|
||||
+ $(DZLAUX) $(SLUSRC) $(DLUSRC) $(CLUSRC) $(ZLUSRC)
|
||||
+ ln -sf libsuperlu.so.4.3 libsuperlu.so
|
||||
|
||||
##################################
|
||||
# Do not optimize these routines #
|
||||
##################################
|
||||
-slamch.o: slamch.c ; $(CC) -c $(NOOPTS) $(CDEFS) $<
|
||||
-dlamch.o: dlamch.c ; $(CC) -c $(NOOPTS) $(CDEFS) $<
|
||||
-superlu_timer.o: superlu_timer.c ; $(CC) -c $(NOOPTS) $<
|
||||
+slamch.o: slamch.c ; $(CC) $(FPIC) $(LIBS) -c $(NOOPTS) $(CDEFS) $<
|
||||
+dlamch.o: dlamch.c ; $(CC) $(FPIC) $(LIBS) -c $(NOOPTS) $(CDEFS) $<
|
||||
+superlu_timer.o: superlu_timer.c ; $(CC) $(FPIC) $(LIBS) -c $(NOOPTS) $<
|
||||
##################################
|
||||
|
||||
.c.o:
|
||||
- $(CC) $(CFLAGS) $(CDEFS) $(BLASDEF) -c $< $(VERBOSE)
|
||||
+ $(CC) $(CFLAGS) $(CDEFS) $(BLASDEF) $(LIBS) -c $< $(VERBOSE)
|
||||
|
||||
.f.o:
|
||||
$(FORTRAN) $(FFLAGS) -c $<
|
@ -1,13 +0,0 @@
|
||||
Index: SuperLU_4.3/SRC/util.c
|
||||
===================================================================
|
||||
--- SuperLU_4.3.orig/SRC/util.c
|
||||
+++ SuperLU_4.3/SRC/util.c
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
void superlu_abort_and_exit(char* msg)
|
||||
{
|
||||
- fprintf(stderr, msg);
|
||||
+ fputs(stderr, msg);
|
||||
exit (-1);
|
||||
}
|
||||
|
@ -1,52 +0,0 @@
|
||||
Index: SuperLU_4.3/TESTING/Makefile
|
||||
===================================================================
|
||||
--- SuperLU_4.3.orig/TESTING/Makefile
|
||||
+++ SuperLU_4.3/TESTING/Makefile
|
||||
@@ -52,9 +52,9 @@ testmat:
|
||||
|
||||
single: ./stest stest.out
|
||||
|
||||
-./stest: $(SLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
|
||||
+./stest: $(SLINTST) $(ALINTST) $(TMGLIB)
|
||||
$(LOADER) $(LOADOPTS) $(SLINTST) $(ALINTST) \
|
||||
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
|
||||
stest.out: stest stest.csh
|
||||
@echo Testing SINGLE PRECISION linear equation routines
|
||||
@@ -62,9 +62,9 @@ stest.out: stest stest.csh
|
||||
|
||||
double: ./dtest dtest.out
|
||||
|
||||
-./dtest: $(DLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
|
||||
+./dtest: $(DLINTST) $(ALINTST) $(TMGLIB)
|
||||
$(LOADER) $(LOADOPTS) $(DLINTST) $(ALINTST) \
|
||||
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
|
||||
dtest.out: dtest dtest.csh
|
||||
@echo Testing DOUBLE PRECISION linear equation routines
|
||||
@@ -72,9 +72,9 @@ dtest.out: dtest dtest.csh
|
||||
|
||||
complex: ./ctest ctest.out
|
||||
|
||||
-./ctest: $(CLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
|
||||
+./ctest: $(CLINTST) $(ALINTST) $(TMGLIB)
|
||||
$(LOADER) $(LOADOPTS) $(CLINTST) $(ALINTST) \
|
||||
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
|
||||
ctest.out: ctest ctest.csh
|
||||
@echo Testing SINGLE COMPLEX linear equation routines
|
||||
@@ -82,9 +82,9 @@ ctest.out: ctest ctest.csh
|
||||
|
||||
complex16: ./ztest ztest.out
|
||||
|
||||
-./ztest: $(ZLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
|
||||
+./ztest: $(ZLINTST) $(ALINTST) $(TMGLIB)
|
||||
$(LOADER) $(LOADOPTS) $(ZLINTST) $(ALINTST) \
|
||||
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
|
||||
ztest.out: ztest ztest.csh
|
||||
@echo Testing DOUBLE COMPLEX linear equation routines
|
65
SuperLU.spec
65
SuperLU.spec
@ -1,5 +1,5 @@
|
||||
%global genname superlu
|
||||
%global libver 5.1
|
||||
%global libver 5
|
||||
|
||||
## The RPM macro for the linker flags does not exist on EPEL
|
||||
%if 0%{?rhel} < 7
|
||||
@ -7,24 +7,18 @@
|
||||
%endif
|
||||
|
||||
Name: SuperLU
|
||||
Version: 5.2.0
|
||||
Release: 8%{?dist}
|
||||
Version: 5.2.1
|
||||
Release: 1%{?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
|
||||
# Build with -fPIC
|
||||
Patch0: %{genname}-5x-add-fpic.patch
|
||||
# Build shared library
|
||||
Patch1: %{genname}-5x-build-shared-lib3.patch
|
||||
# Fixes testsuite
|
||||
Patch3: %{genname}-5x-fix-testsuite.patch
|
||||
# remove non-free mc64 functionality
|
||||
# patch obtained from the debian package
|
||||
Patch4: %{genname}-removemc64.patch
|
||||
Patch0: %{genname}-cmake-includedir.patch
|
||||
Patch1: %{genname}-removemc64.patch
|
||||
|
||||
BuildRequires: atlas-devel, gcc
|
||||
BuildRequires: atlas-devel, gcc, cmake
|
||||
BuildRequires: gcc-gfortran
|
||||
BuildRequires: csh
|
||||
|
||||
%description
|
||||
@ -50,11 +44,7 @@ The %{name}-doc package contains all the help documentation along with C
|
||||
and FORTRAN examples.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}_%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
%patch4
|
||||
%autosetup -n %{name}_%{version} -p1
|
||||
|
||||
rm -fr SRC/mc64ad.f.bak
|
||||
find . -type f | sed -e "/TESTING/d" | xargs chmod a-x
|
||||
@ -63,46 +53,23 @@ find EXAMPLE -type f | while read file
|
||||
do
|
||||
[ "$(file $file | awk '{print $2}')" = ELF ] && rm $file || :
|
||||
done
|
||||
cp -p MAKE_INC/make.linux make.inc
|
||||
sed -i -e "s|-O3|$RPM_OPT_FLAGS|" \
|
||||
-e "s|\$(SUPERLULIB) ||" \
|
||||
-e "s|\$(HOME)/Dropbox/Codes/%{name}/%{name}|%{_builddir}/%{name}_%{version}|" \
|
||||
-e 's!lib/libsuperlu_5.1.a$!SRC/libsuperlu.so!' \
|
||||
-e 's!-shared!& %{__global_ldflags}!' \
|
||||
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||
-e "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lf77blas|" \
|
||||
%else
|
||||
-e "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lsatlas|" \
|
||||
%endif
|
||||
make.inc
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags} superlulib
|
||||
make -C TESTING
|
||||
%cmake .
|
||||
%make_build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_libdir}
|
||||
mkdir -p %{buildroot}%{_includedir}/%{name}
|
||||
install -p SRC/libsuperlu.so.%{libver} %{buildroot}%{_libdir}
|
||||
install -p SRC/*.h %{buildroot}%{_includedir}/%{name}
|
||||
chmod -x %{buildroot}%{_includedir}/%{name}/*.h
|
||||
cp -Pp SRC/libsuperlu.so %{buildroot}%{_libdir}
|
||||
%make_install
|
||||
|
||||
%check
|
||||
pushd TESTING
|
||||
for _test in c d s z
|
||||
do
|
||||
chmod +x ${_test}test.csh
|
||||
./${_test}test.csh
|
||||
done
|
||||
popd
|
||||
ctest -V %{?_smp_mflags}
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%doc README
|
||||
%license License.txt
|
||||
%{_libdir}/libsuperlu.so.%{libver}
|
||||
%{_libdir}/libsuperlu.so.%{libver}*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/%{name}/
|
||||
@ -112,6 +79,12 @@ popd
|
||||
%doc DOC EXAMPLE FORTRAN
|
||||
|
||||
%changelog
|
||||
* Fri Apr 13 2018 Rafael dos Santos <rdossant@redhat.com> - 5.2.1-1
|
||||
- Update to 5.2.1
|
||||
- Use cmake build system
|
||||
- Drop obsolete patches
|
||||
- Resolves #1547494 - build with standard Fedora flags
|
||||
|
||||
* Wed Feb 21 2018 Antonio Trande <sagitterATfedoraproject.org> - 5.2.0-8
|
||||
- Add gcc BR
|
||||
- Remove el5 bits
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
ba3cfc93a93a8caed90bcf6f9b804ac7 superlu_5.2.0.tar.gz
|
||||
SHA512 (superlu_5.2.1.tar.gz) = 30538b4c2809294b8f34646bce6445944f21a1dffaf3ec0a0f29a55d5261caa56e4279d7722bb95cc9d89450d36ded969617edc82ecce7d0f1dfb24040d80d07
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- SuperLU_5.1.1/MAKE_INC/make.linux.orig 2016-03-26 08:43:03.038994570 -0400
|
||||
+++ SuperLU_5.1.1/MAKE_INC/make.linux 2016-03-26 08:44:09.141092611 -0400
|
||||
@@ -46,7 +46,8 @@
|
||||
RANLIB = ranlib
|
||||
|
||||
CC = gcc
|
||||
-CFLAGS = -O3 -g
|
||||
+FPIC = -fPIC
|
||||
+CFLAGS = -O3 $(FPIC)
|
||||
NOOPTS =
|
||||
FORTRAN = gfortran #g77
|
||||
FFLAGS = -O2 -g -fopenmp
|
@ -1,39 +0,0 @@
|
||||
--- SuperLU_5.1.1/SRC/Makefile.orig 2016-03-26 08:47:18.885503561 -0400
|
||||
+++ SuperLU_5.1.1/SRC/Makefile 2016-03-26 08:52:10.512497969 -0400
|
||||
@@ -98,7 +98,7 @@
|
||||
ilu_zcolumn_dfs.o ilu_zpanel_dfs.o ilu_zcopy_to_ucol.o \
|
||||
ilu_zpivotL.o zdiagonal.o zlacon2.o dzsum1.o izmax1.o
|
||||
|
||||
-all: single double complex complex16
|
||||
+all: sharedlib
|
||||
|
||||
single: $(SLUSRC) $(ALLAUX) $(SCAUX)
|
||||
$(ARCH) $(ARCHFLAGS) $(SUPERLULIB) $(SLUSRC) $(ALLAUX) $(SCAUX)
|
||||
@@ -116,17 +116,23 @@
|
||||
$(ARCH) $(ARCHFLAGS) $(SUPERLULIB) $(ZLUSRC) $(ALLAUX) $(DZLAUX)
|
||||
$(RANLIB) $(SUPERLULIB)
|
||||
|
||||
+sharedlib: $(ALLAUX) $(LAAUX) $(SLASRC) $(DLASRC) $(CLASRC) $(ZLASRC) $(SCLAUX) $(DZLAUX) $(SLUSRC) $(DLUSRC) $(CLUSRC) $(ZLUSRC)
|
||||
+ $(CC) $(CFLAGS) $(LIBS) -shared -Wl,-soname,libsuperlu.so.5.1 -o libsuperlu.so.5.1 \
|
||||
+ $(ALLAUX) $(LAAUX) $(SLASRC) $(DLASRC) $(CLASRC) $(ZLASRC) $(SCLAUX) \
|
||||
+ $(DZLAUX) $(SLUSRC) $(DLUSRC) $(CLUSRC) $(ZLUSRC)
|
||||
+ ln -sf libsuperlu.so.5.1 libsuperlu.so
|
||||
+
|
||||
|
||||
##################################
|
||||
# Do not optimize these routines #
|
||||
##################################
|
||||
-smach.o: smach.c ; $(CC) -c $(NOOPTS) $(CDEFS) $<
|
||||
-dmach.o: dmach.c ; $(CC) -c $(NOOPTS) $(CDEFS) $<
|
||||
-superlu_timer.o: superlu_timer.c ; $(CC) -c $(NOOPTS) $<
|
||||
+slamch.o: slamch.c ; $(CC) $(FPIC) $(LIBS) -c $(NOOPTS) $(CDEFS) $<
|
||||
+dlamch.o: dlamch.c ; $(CC) $(FPIC) $(LIBS) -c $(NOOPTS) $(CDEFS) $<
|
||||
+superlu_timer.o: superlu_timer.c ; $(CC) $(FPIC) $(LIBS) -c $(NOOPTS) $<
|
||||
##################################
|
||||
|
||||
.c.o:
|
||||
- $(CC) $(CFLAGS) $(CDEFS) $(BLASDEF) -c $< $(VERBOSE)
|
||||
+ $(CC) $(CFLAGS) $(CDEFS) $(BLASDEF) $(LIBS) -c $< $(VERBOSE)
|
||||
|
||||
.f.o:
|
||||
$(FORTRAN) $(FFLAGS) -c $<
|
@ -1,50 +0,0 @@
|
||||
--- SuperLU_5.1.1/TESTING/Makefile.orig 2016-03-26 08:56:10.347188385 -0400
|
||||
+++ SuperLU_5.1.1/TESTING/Makefile 2016-03-26 08:58:39.763126530 -0400
|
||||
@@ -52,9 +52,9 @@
|
||||
|
||||
single: ./stest stest.out
|
||||
|
||||
-./stest: $(SLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
|
||||
+./stest: $(SLINTST) $(ALINTST) $(TMGLIB)
|
||||
$(LOADER) $(LOADOPTS) $(SLINTST) $(ALINTST) \
|
||||
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
|
||||
stest.out: stest stest.csh
|
||||
@echo Testing SINGLE PRECISION linear equation routines
|
||||
@@ -62,9 +62,9 @@
|
||||
|
||||
double: ./dtest dtest.out
|
||||
|
||||
-./dtest: $(DLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
|
||||
+./dtest: $(DLINTST) $(ALINTST) $(TMGLIB)
|
||||
$(LOADER) $(LOADOPTS) $(DLINTST) $(ALINTST) \
|
||||
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
|
||||
dtest.out: dtest dtest.csh
|
||||
@echo Testing DOUBLE PRECISION linear equation routines
|
||||
@@ -72,9 +72,9 @@
|
||||
|
||||
complex: ./ctest ctest.out
|
||||
|
||||
-./ctest: $(CLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
|
||||
+./ctest: $(CLINTST) $(ALINTST) $(TMGLIB)
|
||||
$(LOADER) $(LOADOPTS) $(CLINTST) $(ALINTST) \
|
||||
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
|
||||
ctest.out: ctest ctest.csh
|
||||
@echo Testing SINGLE COMPLEX linear equation routines
|
||||
@@ -82,9 +82,9 @@
|
||||
|
||||
complex16: ./ztest ztest.out
|
||||
|
||||
-./ztest: $(ZLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
|
||||
+./ztest: $(ZLINTST) $(ALINTST) $(TMGLIB)
|
||||
$(LOADER) $(LOADOPTS) $(ZLINTST) $(ALINTST) \
|
||||
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||
|
||||
ztest.out: ztest ztest.csh
|
||||
@echo Testing DOUBLE COMPLEX linear equation routines
|
9
superlu-cmake-includedir.patch
Normal file
9
superlu-cmake-includedir.patch
Normal file
@ -0,0 +1,9 @@
|
||||
--- SuperLU_5.2.1/SRC/CMakeLists.txt 2018-04-13 17:01:44.007761121 +0200
|
||||
+++ CMakeLists.txt 2018-04-13 17:01:30.573718261 +0200
|
||||
@@ -242,5 +242,5 @@
|
||||
|
||||
install(FILES ${headers}
|
||||
# DESTINATION ${CMAKE_INSTALL_PREFIX}/include
|
||||
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SuperLU
|
||||
)
|
14
superlu-cmake-setup.patch
Normal file
14
superlu-cmake-setup.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- /tmp/SuperLU_5.2.0/SRC/CMakeLists.txt 2016-04-09 03:53:17.000000000 +0200
|
||||
+++ SuperLU_5.2.0/SRC/CMakeLists.txt 2018-04-13 11:42:28.481583088 +0200
|
||||
@@ -233,9 +233,9 @@
|
||||
VERSION ${PROJECT_VERSION} SOVERSION ${VERSION_MAJOR}
|
||||
)
|
||||
install(TARGETS superlu
|
||||
- DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
|
||||
install(FILES ${headers}
|
||||
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user