[elpa] don't use AVX instructions in test binaries

Dominik Mierzejewski rathann at fedoraproject.org
Fri Mar 20 14:39:22 UTC 2015


commit 4d73059e53a7685c9bc04aa3cd906ecd1da593c8
Author: Dominik 'Rathann' Mierzejewski <dominik at greysector.net>
Date:   Fri Mar 20 15:38:56 2015 +0100

    don't use AVX instructions in test binaries
    
    also, drop disable-tests.patch committed by mistake

 elpa-disable-tests.patch | 11 -----------
 elpa-no-avx.patch        | 35 +++++++++++++++++++++++++++++++++++
 elpa-rpm.patch           | 14 --------------
 elpa.spec                |  3 +++
 4 files changed, 38 insertions(+), 25 deletions(-)
---
diff --git a/elpa-no-avx.patch b/elpa-no-avx.patch
new file mode 100644
index 0000000..140c338
--- /dev/null
+++ b/elpa-no-avx.patch
@@ -0,0 +1,35 @@
+diff -up mpich/configure.ac.avx mpich/configure.ac
+--- mpich/configure.ac.avx	2015-03-20 15:26:06.535080683 +0100
++++ mpich/configure.ac	2015-03-20 15:26:06.536080688 +0100
+@@ -213,6 +213,11 @@ dnl first test failed: try again after u
+   [can_compile_avx=yes],
+   [can_compile_avx=no]
+  )
++ if test x"${can_compile_avx}" = x"yes" ; then
++  AVXCFLAGS="-mavx"
++ fi
++ CFLAGS=$save_CFLAGS
++ CXXFLAGS=$save_CXXFLAGS
+  fi
+ AC_MSG_RESULT([${can_compile_avx}])
+ 
+@@ -738,6 +743,7 @@ AC_SUBST([OPENMP_CFLAGS])
+ AC_SUBST([OPENMP_FCFLAGS])
+ AC_SUBST([OPENMP_LDFLAGS])
+ #AC_SUBST(OPT_FCFLAGS)
++AC_SUBST([AVXCFLAGS])
+ 
+ rm -rf modules/ .fortran_dependencies/
+ mkdir modules
+diff -up mpich/Makefile.am.avx mpich/Makefile.am
+--- mpich/Makefile.am.avx	2015-03-20 15:26:06.534080677 +0100
++++ mpich/Makefile.am	2015-03-20 15:31:55.590089898 +0100
+@@ -8,6 +8,8 @@ AM_LDFLAGS = $(SCALAPACK_LDFLAGS)
+ # libelpa
+ lib_LTLIBRARIES = libelpa at SUFFIX@.la
+ libelpa at SUFFIX@_la_LINK = $(FCLINK) $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) -lstdc++
++libelpa at SUFFIX@_la_CFLAGS = $(AVXCFLAGS) $(AM_CFLAGS)
++libelpa at SUFFIX@_la_CXXFLAGS = $(AVXCFLAGS) $(AM_CXXFLAGS)
+ 
+ libelpa at SUFFIX@_la_SOURCES = src/elpa_utilities.F90 \
+ 	                     src/elpa1.F90 \
diff --git a/elpa-rpm.patch b/elpa-rpm.patch
index 474ba11..6b0a017 100644
--- a/elpa-rpm.patch
+++ b/elpa-rpm.patch
@@ -1,17 +1,3 @@
-diff -up mpich/configure.ac.r mpich/configure.ac
---- mpich/configure.ac.r	2015-03-20 11:03:37.810818537 +0100
-+++ mpich/configure.ac	2015-03-20 11:03:41.003835548 +0100
-@@ -215,6 +215,10 @@ dnl first test failed: try again after u
-   [can_compile_avx=yes],
-   [can_compile_avx=no]
-  )
-+ if test x"${can_compile_avx}" = x"no" ; then
-+  CFLAGS=$save_CFLAGS
-+  CXXFLAGS=$save_CXXFLAGS
-+ fi
-  fi
- AC_MSG_RESULT([${can_compile_avx}])
- 
 diff -up mpich/elpa.pc.in.r mpich/elpa.pc.in
 --- mpich/elpa.pc.in.r	2015-03-16 11:39:51.000000000 +0100
 +++ mpich/elpa.pc.in	2015-03-20 10:59:37.966517510 +0100
diff --git a/elpa.spec b/elpa.spec
index c966e56..27e01e0 100644
--- a/elpa.spec
+++ b/elpa.spec
@@ -10,6 +10,8 @@ Source0: http://elpa.rzg.mpg.de/elpa-%{version}.tar.gz
 Patch1: elpa-rpm.patch
 # build against atlas instead of reference blas
 Patch2: elpa-atlas.patch
+# don't use AVX instructions in test binaries
+Patch3: elpa-no-avx.patch
 License: LGPLv3+
 BuildRequires: atlas-devel
 BuildRequires: gcc-gfortran
@@ -121,6 +123,7 @@ mv elpa-%{version} mpich
 pushd mpich
 %patch1 -p1 -b .r
 %patch2 -p1 -b .atlas
+%patch3 -p1 -b .avx
 autoreconf -vifs
 popd
 cp -pr mpich openmpi


More information about the scm-commits mailing list