Add -no-avx patch to avoid use of AVX2 instructions.

This commit is contained in:
Jerry James 2019-06-27 20:14:21 -06:00
parent e443003589
commit 00aff45cbd
2 changed files with 57 additions and 2 deletions

51
coin-or-Clp-no-avx.patch Normal file
View File

@ -0,0 +1,51 @@
--- Clp-1.17.3/src/ClpPackedMatrix.cpp.orig 2019-05-02 22:31:14.000000000 -0600
+++ Clp-1.17.3/src/ClpPackedMatrix.cpp 2019-06-27 19:58:07.491096817 -0600
@@ -6751,7 +6751,7 @@ ClpPackedMatrix3::ClpPackedMatrix3()
#include <intrin.h>
#elif defined(__arm__)
#include <arm_neon.h>
-#else
+#elif defined(__x86_64__)
#include <immintrin.h>
//#include <fmaintrin.h>
#endif
@@ -6778,8 +6778,9 @@ ClpPackedMatrix3::ClpPackedMatrix3(ClpSi
//#undef COIN_AVX2
//#define COIN_AVX2 8
//#define NO_AVX_HARDWARE
-#ifndef COIN_AVX2
-#define COIN_AVX2 4
+#if 1
+#define COIN_AVX2 1
+#define NO_AVX_HARDWARE
#else
#if COIN_AVX2 == 4
#ifndef NO_AVX_HARDWARE
--- Clp-1.17.3/src/ClpSimplexDual.cpp.orig 2019-05-02 22:31:14.000000000 -0600
+++ Clp-1.17.3/src/ClpSimplexDual.cpp 2019-06-27 20:01:18.523941139 -0600
@@ -3554,11 +3554,12 @@ void moveAndZero(clpTempInfo *info, int
}
}
#endif
+#undef COIN_AVX2
#ifdef _MSC_VER
#include <intrin.h>
#elif defined(__arm__)
#include <arm_neon.h>
-#else
+#elif defined(__x86_64__)
#include <immintrin.h>
//#include <fmaintrin.h>
#endif
--- Clp-1.17.3/src/CoinAbcHelperFunctions.cpp.orig 2019-01-06 12:43:06.000000000 -0700
+++ Clp-1.17.3/src/CoinAbcHelperFunctions.cpp 2019-06-27 19:59:50.890012555 -0600
@@ -11,7 +11,8 @@
#include "CoinTypes.hpp"
#include "CoinFinite.hpp"
#include "CoinAbcCommon.hpp"
-//#define AVX2 1
+#undef AVX2
+#define AVX2 0
#if AVX2 == 1
#define set_const_v2df(bb, b) \
{ \

View File

@ -49,6 +49,9 @@ Patch6: %{name}-overflow.patch
# Fix mixed signed-unsigned comparisons
Patch7: %{name}-signed.patch
# Do not use the AVX2 instructions
Patch8: %{name}-no-avx.patch
%description
Clp (Coin-or linear programming) is an open-source linear programming
solver written in C++. It is primarily meant to be used as a callable
@ -88,6 +91,7 @@ This package contains the documentation for %{name}.
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%build
%if %{without bootstrap}
@ -165,8 +169,8 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test
- Eliminate unnecessary BRs and Rs
- Build with Cbc, MUMPS, nauty, and suitesparse
- Build in bootstrap mode
- Add -bad-cast, -badcolumn, -param, -catch, -sprintf, -overflow, and -signed
patches
- Add -bad-cast, -badcolumn, -param, -catch, -sprintf, -overflow, -signed,
and -no-avx patches
- Eliminate rpath from the library
- Force libtool to not defeat -Wl,--as-needed
- Be explicit about library versions as required by latest guidelines