Blob Blame History Raw
diff -up mpich/configure.ac.avx mpich/configure.ac
--- mpich/configure.ac.avx	2015-05-05 11:06:33.132304515 +0200
+++ mpich/configure.ac	2015-05-05 11:06:33.137304689 +0200
@@ -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/configure.avx mpich/configure
--- mpich/configure.avx	2015-05-05 11:06:33.136304654 +0200
+++ mpich/configure	2015-05-05 11:20:57.544768442 +0200
@@ -638,6 +638,7 @@ LTLIBOBJS
 LIBOBJS
 PKG_CONFIG_FILE
 SUFFIX
+AVXCFLAGS
 OPENMP_LDFLAGS
 OPENMP_CFLAGS
 with_amd_bulldozer_kernel
@@ -6049,14 +6050,14 @@ $as_echo_n "checking whether we can comp
   }
 
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if test x"${can_compile_sse}" = x"yes" && ac_fn_c_try_compile "$LINENO" ; then
   can_compile_avx=yes
 else
   can_compile_avx=no
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test x"${can_compile_avx}" = x"no"; then
+ if test x"${can_compile_sse}" = x"yes" && test x"${can_compile_avx}" = x"no"; then
  CFLAGS="$CFLAGS -mavx"
  CXXFLAGS="$CXXFLAGS -mavx"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6076,6 +6077,11 @@ else
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test x"${can_compile_avx}" = x"yes" ; then
+  AVXCFLAGS="-mavx"
+ fi
+ CFLAGS=$save_CFLAGS
+ CXXFLAGS=$save_CXXFLAGS
  fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${can_compile_avx}" >&5
 $as_echo "${can_compile_avx}" >&6; }
diff -up mpich/Makefile.am.avx mpich/Makefile.am
--- mpich/Makefile.am.avx	2015-05-05 11:06:33.131304480 +0200
+++ mpich/Makefile.am	2015-05-05 11:06:33.141304828 +0200
@@ -8,6 +8,8 @@ AM_LDFLAGS = $(SCALAPACK_LDFLAGS)
 # libelpa
 lib_LTLIBRARIES = libelpa@SUFFIX@.la
 libelpa@SUFFIX@_la_LINK = $(FCLINK) $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) -lstdc++
+libelpa@SUFFIX@_la_CFLAGS = $(AVXCFLAGS) $(AM_CFLAGS)
+libelpa@SUFFIX@_la_CXXFLAGS = $(AVXCFLAGS) $(AM_CXXFLAGS)
 
 libelpa@SUFFIX@_la_SOURCES = src/elpa_utilities.F90 \
 	                     src/elpa1.F90 \
diff -up mpich/Makefile.in.avx mpich/Makefile.in
--- mpich/Makefile.in.avx	2015-05-05 11:06:33.131304480 +0200
+++ mpich/Makefile.in	2015-05-05 11:06:33.141304828 +0200
@@ -774,6 +774,7 @@ AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
+AVXCFLAGS = @AVXCFLAGS@
 AWK = @AWK@
 CC = @CC@
 CCAS = @CCAS@
@@ -918,6 +919,8 @@ AM_LDFLAGS = $(SCALAPACK_LDFLAGS)
 # libelpa
 lib_LTLIBRARIES = libelpa@SUFFIX@.la
 libelpa@SUFFIX@_la_LINK = $(FCLINK) $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) -lstdc++
+libelpa@SUFFIX@_la_CFLAGS = $(AVXCFLAGS) $(AM_CFLAGS)
+libelpa@SUFFIX@_la_CXXFLAGS = $(AVXCFLAGS) $(AM_CXXFLAGS)
 libelpa@SUFFIX@_la_SOURCES = src/elpa_utilities.F90 src/elpa1.F90 \
 	src/elpa2_utilities.F90 src/elpa2.F90 src/elpa_c_interface.F90 \
 	src/elpa_qr/qr_utils.f90 src/elpa_qr/elpa_qrkernels.f90 \