[gecode-users] Freeze with MSVC 2015 optimized build

Christian Schulte cschulte at kth.se
Fri Sep 18 12:22:02 CEST 2015


Your environment is fine, it is really MSVC 2015. I can re-produce your
problems with both x86 and x64... And it appears to be really bad.

But I think I found at least something: by default, MSVC uses SSE2
arithmetic (has been since quite some time, in particular for x64). If you
force the compiler to use x87 arithmetic instead (which is really bad as it
also has an impact on integer performance) by -ARCH:IA32 then at least the
tests seem to work (you can pass by make CXXUSR=-ARCH:IA32 when you build
Gecode).

However your test still does not work (terminates immediately with bringing
up Gist).

I think we will have to fix the Gecode build to use x87 for the float stuff.

Cheers
Christian

--
Christian Schulte, www.gecode.org/~schulte 
Professor of Computer Science, KTH, cschulte at kth.se
Expert Researcher, SICS, cschulte at sics.se

-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Filip Konvicka
Sent: Thursday, September 17, 2015 05:43 PM
To: users at gecode.org
Subject: Re: [gecode-users] Freeze with MSVC 2015 optimized build

...and "Float::Arithmetic::Div::Sol::A" seems to be failing fast with any
seed.

So it might really be my build setup - although I hope it's not as it is
basically the same as that I've been using for years :)

Cheers,
Filip

> It only happens with Gecode compiled in release mode with MSVC 2015.
> There are no such official Gecode binaries, so I wasn't sure whether 
> my build environment was set up correctly - but it probably is.
>
> This is an excerpt from my original post that explains what seems to 
> be triggering the problem:
>
>  > In the test case source code there is a constant  > 
> "8686.9666660000003". Changing it to "8686" seems to fix the problem  
> > - but even "8686.9" makes dfs freeze.  It also seems that it is the  
> > branching strategy 'FLOAT_VAL_SPLIT_MAX' that is causing problems.
>
> Regarding the build environment, I tried running some tests, and it 
> seems to fail "Float::Arithmetic::Div::C":
>
> ...
> Float::Arithmetic::Div::B +++++
> Float::Arithmetic::Div::C -
> Options: -seed 71643696 -test Float::Arithmetic::Div::C
>
> I wonder whether this passes in your environment.  The "Div" tests 
> seem to run slow.  The same test with the seed 71643693 seems to pass.
>
> Cheers,
> Filip
>
>
>> Uuups, gosh. That I did not know. Right now I cannot try MSV 2013 
>> easily as I am travelling. But maybe I'll check somehow.
>>
>> Cheers
>> Christian
>>
>> --
>> Christian Schulte, www.gecode.org/~schulte Professor of Computer 
>> Science, KTH, cschulte at kth.se Expert Researcher, SICS, 
>> cschulte at sics.se
>>
>> -----Original Message-----
>> From: users-bounces at gecode.org
>> [mailto:users-bounces at gecode.org] On Behalf Of Filip Konvicka
>> Sent: Thursday, September 17, 2015 05:02 PM
>> To: users at gecode.org
>> Subject: Re: [gecode-users] Freeze with MSVC 2015 optimized build
>>
>> Hi Christian,
>>
>> Thanks!  OK - I just know that the official Gecode 4.4.0 distribution 
>> (MSVC
>> 2013) works OK, and so does the debug (non-optimized) version built 
>> from trunk using MSVC 2015.
>>
>> Cheers,
>> Filip
>>
>>> Hi Filip,
>>>
>>> This seems to be an issue with Gecode and not the compiler... Guido 
>>> promised me that he will look into floats. Real soon, he said ;-)
>>>
>>> Cheers
>>> Christian
>>>
>>> --
>>> Christian Schulte, www.gecode.org/~schulte Professor of Computer 
>>> Science, KTH, cschulte at kth.se Expert Researcher, SICS, 
>>> cschulte at sics.se
>>>
>>> -----Original Message-----
>>> From: users-bounces at gecode.org
>>> [mailto:users-bounces at gecode.org] On Behalf Of Filip Konvicka
>>> Sent: Thursday, September 17, 2015 03:39 PM
>>> To: users at gecode.org
>>> Subject: Re: [gecode-users] Freeze with MSVC 2015 optimized build
>>>
>>> Sure, it's the script from my original post.  I'm re-attaching it now.
>>> I also used Gecode trunk (updated about September 1st) with Qt-5.5, 
>>> built in my Cygwin environment with MSVC 2015 RTM x64 compiler.
>>>
>>> Thanks,
>>> Filip
>>>
>>>> Hi Filip,
>>>>
>>>> If you tell me which script you tried, I can try here (even though 
>>>> Gist works for me with MSVC 2015 and Qt-5.5.0, using the trunk).
>>>>
>>>> Cheers
>>>> Christian
>>>>
>>>> --
>>>> Christian Schulte, www.gecode.org/~schulte Professor of Computer 
>>>> Science, KTH, cschulte at kth.se Expert Researcher, SICS, 
>>>> cschulte at sics.se
>>>>
>>>> -----Original Message-----
>>>> From: users-bounces at gecode.org
>>>> [mailto:users-bounces at gecode.org] On Behalf Of Filip Konvicka
>>>> Sent: Thursday, September 17, 2015 03:24 PM
>>>> To: users at gecode.org
>>>> Subject: Re: [gecode-users] Freeze with MSVC 2015 optimized build
>>>>
>>>>> I was trying to use the Qt installer but Qt does not seem to be 
>>>>> visible in the cygwin environment.  I'll try the source package as 
>>>>> you suggest, that sounds better to me.
>>>>
>>>> So in the end I finished using the pre-built version of Qt and I'm 
>>>> now able to run the script in Gist (Gist::dfs). The issue is still 
>>>> there.
>>>> I ran 'Next Solution' - this apparently runs the search in a 
>>>> separate thread but never finishes (and 'Stop' does not stop the 
>>>> search, you have to kill the program). Inspecting the nodes one by 
>>>> one freezes the program during the 3rd expansion, and in this case 
>>>> the program stops
>>> responding altogether.
>>>>
>>>> So my guess is this is really some tight loop somewhere in Gecode 
>>>> (maybe caused by a new optimization or bug in the new compiler?)
>>>>
>>>> Cheers,
>>>> Filip
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Gecode users mailing list
>>>> users at gecode.org
>>>> https://www.gecode.org/mailman/listinfo/gecode-users
>>>>
>>
>>
>>
>> _______________________________________________
>> Gecode users mailing list
>> users at gecode.org
>> https://www.gecode.org/mailman/listinfo/gecode-users
>>



_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list