diff --git a/components/serial-libs/superlu/SOURCES/superlu-4.3-dont-opt-away.diff b/components/serial-libs/superlu/SOURCES/superlu-4.3-dont-opt-away.diff deleted file mode 100644 index 8e09510eda..0000000000 --- a/components/serial-libs/superlu/SOURCES/superlu-4.3-dont-opt-away.diff +++ /dev/null @@ -1,20 +0,0 @@ -diff -aruN SuperLU_4.3.orig/INSTALL/timertst.c SuperLU_4.3/INSTALL/timertst.c ---- SuperLU_4.3.orig/INSTALL/timertst.c 2011-10-27 21:49:47.000000000 +0200 -+++ SuperLU_4.3/INSTALL/timertst.c 2012-12-20 21:55:13.954437737 +0100 -@@ -6,6 +6,8 @@ - return; - } - -+volatile double _dummy; -+ - int main() - { - /* Parameters */ -@@ -32,6 +34,7 @@ - for (j = 0; j < iters; ++j) { - for (i = 0; i < NMAX; ++i) y[i] += alpha * x[i]; - alpha = -alpha; -+ _dummy = y[j%NMAX]; - } - t2 = SuperLU_timer_(); - tnotim = t2 - t1; diff --git a/components/serial-libs/superlu/SOURCES/superlu-4.3-include.patch b/components/serial-libs/superlu/SOURCES/superlu-4.3-include.patch index d1af0b78cc..727ccb3d52 100644 --- a/components/serial-libs/superlu/SOURCES/superlu-4.3-include.patch +++ b/components/serial-libs/superlu/SOURCES/superlu-4.3-include.patch @@ -1,22 +1,24 @@ -diff -aruN SuperLU_4.3.orig/TESTING/ddrive.c SuperLU_4.3/TESTING/ddrive.c ---- SuperLU_4.3.orig/TESTING/ddrive.c 2011-10-27 21:49:47.000000000 +0200 -+++ SuperLU_4.3/TESTING/ddrive.c 2012-12-20 22:14:43.026465899 +0100 -@@ -11,6 +11,7 @@ - * Purpose: MAIN test program +diff --git i/TESTING/ddrive.c w/TESTING/ddrive.c +index 9bb18db..30037f4 100644 +--- i/TESTING/ddrive.c ++++ w/TESTING/ddrive.c +@@ -29,6 +29,7 @@ at the top-level directory. */ + #include #include +#include #include "slu_ddefs.h" + #include "MATGEN/matgen.h" - #define NTESTS 5 /* Number of test types */ -diff -aruN SuperLU_4.3.orig/TESTING/sdrive.c SuperLU_4.3/TESTING/sdrive.c ---- SuperLU_4.3.orig/TESTING/sdrive.c 2011-10-27 21:49:47.000000000 +0200 -+++ SuperLU_4.3/TESTING/sdrive.c 2012-12-20 22:14:43.030465752 +0100 -@@ -11,6 +11,7 @@ - * Purpose: MAIN test program +diff --git i/TESTING/sdrive.c w/TESTING/sdrive.c +index e2623d8..90bc782 100644 +--- i/TESTING/sdrive.c ++++ w/TESTING/sdrive.c +@@ -29,6 +29,7 @@ at the top-level directory. */ + #include #include +#include #include "slu_sdefs.h" - - #define NTESTS 5 /* Number of test types */ + #include "MATGEN/matgen.h" + diff --git a/components/serial-libs/superlu/SOURCES/superlu-5.1-disable-hsl.patch b/components/serial-libs/superlu/SOURCES/superlu-5.1-disable-hsl.patch index a3c9ca8ace..dda2e3bf1f 100644 --- a/components/serial-libs/superlu/SOURCES/superlu-5.1-disable-hsl.patch +++ b/components/serial-libs/superlu/SOURCES/superlu-5.1-disable-hsl.patch @@ -1,34 +1,36 @@ ---- SuperLU_5.1/SRC/Makefile 2015-12-03 17:06:38.000000000 -0800 -+++ SuperLU_5.1.patch/SRC/Makefile 2016-02-25 10:10:26.123948600 -0800 -@@ -38,7 +38,7 @@ +diff --git i/SRC/Makefile w/SRC/Makefile +index 2dbd9e5..0214fa2 100644 +--- i/SRC/Makefile ++++ w/SRC/Makefile +@@ -33,7 +33,7 @@ sp_coletree.o sp_preorder.o sp_ienv.o relax_snode.o \ heap_relax_snode.o colamd.o \ ilu_relax_snode.o ilu_heap_relax_snode.o mark_relax.o \ -- mc64ad.o qselect.o input_error.o smach.o dmach.o -+ qselect.o input_error.o smach.o dmach.o - +- mc64ad.o qselect.o input_error.o dmach.o smach.o ++ qselect.o input_error.o dmach.o smach.o + SLUSRC = \ sgssv.o sgssvx.o \ -@@ -50,7 +50,7 @@ - sreadhb.o sreadrb.o sreadtriple.o \ +@@ -44,7 +44,7 @@ + spanel_dfs.o spanel_bmod.o \ + sreadhb.o sreadrb.o sreadtriple.o sreadMM.o \ scolumn_dfs.o scolumn_bmod.o spivotL.o spruneL.o \ - smemory.o sutil.o smyblas2.o \ -- sgsisx.o sgsitrf.o sldperm.o \ -+ sgsitrf.o \ +- smemory.o sutil.o smyblas2.o sgsisx.o sgsitrf.o sldperm.o \ ++ smemory.o sutil.o smyblas2.o sgsitrf.o \ ilu_sdrop_row.o ilu_ssnode_dfs.o \ ilu_scolumn_dfs.o ilu_spanel_dfs.o ilu_scopy_to_ucol.o \ ilu_spivotL.o sdiagonal.o slacon2.o -@@ -64,7 +64,7 @@ - dreadhb.o dreadrb.o dreadtriple.o \ +@@ -57,7 +57,7 @@ + dsnode_dfs.o dsnode_bmod.o dpanel_dfs.o dpanel_bmod.o \ + dreadhb.o dreadrb.o dreadtriple.o dreadMM.o \ dcolumn_dfs.o dcolumn_bmod.o dpivotL.o dpruneL.o \ - dmemory.o dutil.o dmyblas2.o \ -- dgsisx.o dgsitrf.o dldperm.o \ -+ dgsitrf.o \ +- dmemory.o dutil.o dmyblas2.o dgsisx.o dgsitrf.o dldperm.o \ ++ dmemory.o dutil.o dmyblas2.o dgsitrf.o \ ilu_ddrop_row.o ilu_dsnode_dfs.o \ ilu_dcolumn_dfs.o ilu_dpanel_dfs.o ilu_dcopy_to_ucol.o \ - ilu_dpivotL.o ddiagonal.o dlacon2.o -@@ -79,7 +79,7 @@ - creadhb.o creadrb.o creadtriple.o \ + ilu_dpivotL.o ddiagonal.o dlacon2.o dGetDiagU.o +@@ -72,7 +72,7 @@ + creadhb.o creadrb.o creadtriple.o creadMM.o \ ccolumn_dfs.o ccolumn_bmod.o cpivotL.o cpruneL.o \ cmemory.o cutil.o cmyblas2.o \ - cgsisx.o cgsitrf.o cldperm.o \ @@ -36,8 +38,8 @@ ilu_cdrop_row.o ilu_csnode_dfs.o \ ilu_ccolumn_dfs.o ilu_cpanel_dfs.o ilu_ccopy_to_ucol.o \ ilu_cpivotL.o cdiagonal.o clacon2.o scsum1.o icmax1.o -@@ -93,7 +93,7 @@ - zreadhb.o zreadrb.o zreadtriple.o \ +@@ -86,7 +86,7 @@ + zreadhb.o zreadrb.o zreadtriple.o zreadMM.o \ zcolumn_dfs.o zcolumn_bmod.o zpivotL.o zpruneL.o \ zmemory.o zutil.o zmyblas2.o \ - zgsisx.o zgsitrf.o zldperm.o \ diff --git a/components/serial-libs/superlu/SOURCES/superlu-5.2-make.patch b/components/serial-libs/superlu/SOURCES/superlu-5.2-make.patch deleted file mode 100644 index 700219a64f..0000000000 --- a/components/serial-libs/superlu/SOURCES/superlu-5.2-make.patch +++ /dev/null @@ -1,44 +0,0 @@ -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 = $(DEFAULT_OPTS) -fPIC -DPIC -+NOOPTS = $(DEFAULT_OPTS) -Os -fPIC -DPIC -+#FORTRAN = gfortran #g77 -+FFLAGS = $(DEFAULT_OPTS) -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 diff --git a/components/serial-libs/superlu/SPECS/superlu.spec b/components/serial-libs/superlu/SPECS/superlu.spec index cdb9b606fe..5ecc2308b5 100644 --- a/components/serial-libs/superlu/SPECS/superlu.spec +++ b/components/serial-libs/superlu/SPECS/superlu.spec @@ -19,20 +19,16 @@ Name: %{pname}-%{compiler_family}%{PROJ_DELIM} Summary: A general purpose library for the direct solution of linear equations License: BSD-3-Clause Group: %{PROJ_NAME}/serial-libs -Version: 5.2.1 +Version: 7.0.0 Release: 0%{?dist} -Source0: http://crd-legacy.lbl.gov/%7Exiaoye/SuperLU/%{pname}_%{version}.tar.gz -# PATCH-FEATURE-OPENSUSE superlu-5.1-make.patch : add compiler and build flags in make.inc -Patch: superlu-5.2-make.patch +Source0: https://github.com/xiaoyeli/%{pname}/archive/refs/tags/v%{version}.tar.gz # PATCH-FIX-UPSTREAM superlu-4.3-include.patch : avoid implicit declaration warnings -Patch1: superlu-4.3-include.patch -# PATCH-FIX-UPSTREAM superlu-4.3-dont-opt-away.diff -Patch2: superlu-4.3-dont-opt-away.diff +Patch: superlu-4.3-include.patch # PATCH-FIX-OPENSUSE superlu-5.1-remove-hsl.patch [bnc#796236] # The Harwell Subroutine Library (HSL) routine m64ad.c have been removed # from the original sources for legal reasons. This patch disables the inclusion of # this routine in the library which, however, remains fully functional -Patch3: superlu-5.1-disable-hsl.patch +Patch1: superlu-5.1-disable-hsl.patch Url: http://crd.lbl.gov/~xiaoye/SuperLU/ %if "%{compiler_family}" != "intel" && "%{compiler_family}" != "arm1" @@ -40,7 +36,7 @@ Requires: openblas-%{compiler_family}%{PROJ_DELIM} %endif Requires: lmod%{PROJ_DELIM} >= 7.6.1 -BuildRequires: make +BuildRequires: make cmake BuildRequires: tcsh # Default library install path @@ -54,25 +50,25 @@ linear systems that the author is aware of. Docu can be found on http://www.netlib.org. %prep -%setup -q -n SuperLU_%{version} +%setup -q -n superlu-%{version} %patch -p1 %patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build %ohpc_setup_compiler -export DEFAULT_OPTS="${CFLAGS} -Wno-implicit-int" -export DEFAULT_OPTS="${DEFAULT_OPTS} -Wno-implicit-function-declaration" +export DEFAULT_OPTS="${CFLAGS} -Wno-implicit-int -Wno-implicit-function-declaration -fPIC -DPIC" +export BLAS_LIB_EXPORT="-lopenblas" +export USE_VENDOR_BLAS=1 %if "%{compiler_family}" == "arm1" export DEFAULT_OPTS="${DEFAULT_OPTS} -fsimdmath" %endif -make lib +cmake -S . -B build -DCMAKE_INSTALL_PREFIX=./build -DCMAKE_C_FLAGS="${DEFAULT_OPTS}" +cmake --build build --target superlu -mkdir tmp -(cd tmp; ar -x ../SRC/libsuperlu.a) -$FC -shared -Wl,-soname,libsuperlu.so.4 -o lib/libsuperlu.so tmp/*.o +mkdir tmp lib +(cd tmp; ar -x ../build/SRC/libsuperlu.a) +$FC -shared -Wl,-soname,libsuperlu.so.7 -o lib/libsuperlu.so tmp/*.o %install mkdir -p %{buildroot}%{install_path}/lib @@ -80,8 +76,8 @@ mkdir -p %{buildroot}%{install_path}/include install -m644 SRC/*.h %{buildroot}%{install_path}/include install -m755 lib/libsuperlu.so %{buildroot}%{install_path}/lib/libsuperlu.so.%{version} pushd %{buildroot}%{install_path}/lib -ln -s libsuperlu.so.%{version} libsuperlu.so.4 -ln -s libsuperlu.so.4 libsuperlu.so +ln -s libsuperlu.so.%{version} libsuperlu.so.7 +ln -s libsuperlu.so.7 libsuperlu.so popd # OpenHPC module file