diff --git a/superlu_dist-inst.patch b/superlu_dist-inst.patch new file mode 100644 index 0000000..395385c --- /dev/null +++ b/superlu_dist-inst.patch @@ -0,0 +1,15 @@ +--- SuperLU_DIST_6.0.0/INSTALL/Makefile~ 2018-09-22 17:56:51.000000000 +0100 ++++ SuperLU_DIST_6.0.0/INSTALL/Makefile 2018-11-23 11:57:07.731549805 +0000 +@@ -15,9 +15,9 @@ + @echo Testing machines parameters and timer + csh install.csh + +-smach_dist.o: ../SRC/smach_dist.c ; $(CC) -c $< +-dmach_dist.o: ../SRC/dmach_dist.c ; $(CC) -c $< +-superlu_timer.o: ../SRC/superlu_timer.c ; $(CC) -c $< ++smach_dist.o: ../SRC/smach_dist.c ; $(CC) $(CFLAGS) -c $< ++dmach_dist.o: ../SRC/dmach_dist.c ; $(CC) $(CFLAGS) -c $< ++superlu_timer.o: ../SRC/superlu_timer.c ; $(CC) $(CFLAGS) -c $< + + .c.o: + $(CC) $(CFLAGS) -c $< diff --git a/superlu_dist-parmetis.patch b/superlu_dist-parmetis.patch deleted file mode 100644 index ae46107..0000000 --- a/superlu_dist-parmetis.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- SuperLU_DIST_5.1.0/SRC/get_perm_c_parmetis.c~ 2016-05-16 06:16:44.000000000 +0100 -+++ SuperLU_DIST_5.1.0/SRC/get_perm_c_parmetis.c 2016-10-17 00:48:13.758797521 +0100 -@@ -24,6 +24,9 @@ - /* limits.h: the largest positive integer (INT_MAX) */ - #include - #include -+#include -+#include -+#include - #include "parmetis.h" - #include "superlu_ddefs.h" - diff --git a/superlu_dist.spec b/superlu_dist.spec index 73b8085..ab4b266 100644 --- a/superlu_dist.spec +++ b/superlu_dist.spec @@ -13,8 +13,7 @@ %bcond_with check %if 0%{?el6}%{?el7} -# For good enough C++. DTS6 is better (compatible libgfortran), but -# gets an ICE on an openmp pragma. +# For good enough C++ %global dts devtoolset-7- %endif @@ -26,8 +25,10 @@ License: BSD URL: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/ Source0: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_%version.tar.gz Source1: superlu_dist-make.inc +# Use CFLAGS in INSTALL/Makefile (was only failing on some targets) +Patch1: superlu_dist-inst.patch BuildRequires: scotch-devel -BuildRequires: %{?dts}gcc-gfortran %{?dts}gcc-c++ +BuildRequires: %{?dts}gcc-c++ %if %{with openblas} BuildRequires: openblas-devel # [else] Probably not worth a bundled provides for the bundled partial cblas. @@ -145,6 +146,8 @@ Development files for %name-mpich %prep %setup -q -n SuperLU_DIST_%version cp %SOURCE1 make.inc +%patch1 -p1 -b .orig + %build %{?dts:source /opt/rh/devtoolset-7/enable} @@ -212,7 +215,7 @@ done # can't debug it, so let's hope it doesn't deadlock in realistic # situations. %if %{with check} -%{?dts:source /opt/rh/devtoolset-6/enable} +%{?dts:source /opt/rh/devtoolset-7/enable} pushd EXAMPLE %if %{with openmpi} # just check that it runs