[Clp] Abc problems under windows (Visual / Intel compiler)
John Forrest
john.forrest at fastercoin.com
Wed Jul 23 11:21:59 EDT 2014
Yann,
DetectFeature is never used at present - so I can take that part out.
The abort is not in trunk. I would suggest that you migrate to trunk to
make it easier for me to modify code to help you.
John Forrest
On 23/07/14 15:29, ycollette.nospam at free.fr wrote:
> Hello,
>
> I found a problem in AbcSimplex.cpp line 5997:
>
> } else {
> // HERE -> abort();
> // primal - change tolerance
> if (numberBadTimes_ > 3)
> model->setCurrentPrimalTolerance(model->currentPrimalTolerance() * 1.05);
> // if infeasible increase infeasibility cost
> //if (model->nonLinearCost()->numberInfeasibilities() &&
> // model->infeasibilityCost() < 1.0e17) {
> // model->setInfeasibilityCost(model->infeasibilityCost() * 1.1);
> //}
> }
> } else {
>
> There is an abort() which make the resolution hangs under windows when compiled using intel compiler.
> I use Cbc 2.8.9.
>
> I also need to modify another file: CoinAbcHelperFunctions.cpp - cpuid function was not defined when compiling using visual studio and then, the prototype of cpuid function is not the same under windows and linux:
>
> #ifdef _MSC_VER
> #include <intrin.h>
> #else
> // From Intel site
> // get AVX intrinsics
> #include <immintrin.h>
> // get CPUID capability
> //#include <intrin.h>
> #define cpuid(func,ax,bx,cx,dx)\
> __asm__ __volatile__ ("cpuid":\
> "=a" (ax), "=b" (bx), "=c" (cx), "=d" (dx) : "a" (func));
> #endif
> // written for clarity, not conciseness
> #define OSXSAVEFlag (1UL<<27)
> #define AVXFlag ((1UL<<28)|OSXSAVEFlag)
> #define VAESFlag ((1UL<<25)|AVXFlag|OSXSAVEFlag)
> #define FMAFlag ((1UL<<12)|AVXFlag|OSXSAVEFlag)
> #define CLMULFlag ((1UL<< 1)|AVXFlag|OSXSAVEFlag)
>
> bool DetectFeature(unsigned int feature)
> {
> int CPUInfo[4]; //, InfoType=1, ECX = 1;
> //__cpuidex(CPUInfo, 1, 1); // read the desired CPUID format
> #ifdef _MSC_VER
> __cpuid(CPUInfo, 1);
> #else
> cpuid(1,CPUInfo[0],CPUInfo[1],CPUInfo[2],CPUInfo[3]);
> #endif
> unsigned int ECX = CPUInfo[2]; // the output of CPUID in the ECX register.
> if ((ECX & feature) != feature) // Missing feature
> return false;
> #if 0
> long int val = _xgetbv(0); // read XFEATURE_ENABLED_MASK register
> if ((val&6) != 6) // check OS has enabled both XMM and YMM support.
> return false;
> #endif
> return true;
> }
>
>
> Best regards,
>
> YC
> _______________________________________________
> Clp mailing list
> Clp at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/clp
>
>
More information about the Clp
mailing list