[gecode-users] Freeze with MSVC 2015 optimized build

Filip Konvička filip.konvicka at logis.cz
Wed May 18 09:57:15 CEST 2016


Hi,

So, I've spent some time investigating.  Until now I haven't looked into 
the "new" FloatVar code contributed by Vincent and you guys, and it 
looks like it inherits some ideas, maybe even files from our initial 
implementation for Gecode 2.  So, I feel some blame for using Boost's 
Interval Arithmetic library without investigating enough first: if you 
look at the documentation homepage, you'll see a big red warning :)

http://www.boost.org/doc/libs/1_61_0/libs/numeric/interval/doc/interval.htm

which says that the library probably won't work with SSE2 (or at least 
not out of the box).  But SSE2 is the only option for x64.

On the other hand, I'm not aware of any good alternative to this Boost 
library.  I think the library is actually quite good (even though it 
would use some work on supporting SSE2 better).

So I thought I'd play with the library's policies to see if I could make 
it work with x64.  I looked into float.hh which defines what exact 
interval datatype is used.  It looks like changing from 
'rounded_arith_opp' to 'rounded_arith_std' fixes the issues that we're 
observing.  If you're interested the description of those types is 
available here:

http://www.boost.org/doc/libs/1_61_0/libs/numeric/interval/doc/rounding.htm

I've run the Float tests with this change and they all seem to pass. 
Compared to the _opp version the total runtime running the Float 
testsuite increased by 50%. This is still fine for me; I haven't 
compared this with the x86/x87 version.  Maybe Gecode could use some 
#ifdef to choose between _opp and _std based on whether the 
compiler/architecture setup is known to be safe for _opp or not.

Cheers,
Filip

> Hi Filip,
>
> Thanks for all the info and checking. I'll have a look a little later.
>
> Best
> 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: Monday, April 4, 2016 09:15
> To: users at gecode.org
> Subject: Re: [gecode-users] Freeze with MSVC 2015 optimized build
>
> Hi,
>
> You said that you have uploaded packages recently; I assume that it was
> Gecode-4.4.0-x64-2015.msi.  I compiled and linked using this with MSVC
> 2015 Update 2 and it also freezes on the testcase.  Replacing this with the
> MSVC 2013 package (Gecode-4.4.0-x64-2013.msi) works fine, even using the
> same toolset.
>
> Cheers,
> Filip
>
>> Hi,
>>
>> I have updated to MSVC 2015 update 2, compiled the current Gecode
>> trunk for x64, and my testcase from the beginning of this thread still
>> freezes (the one from Sep 3rd 2015 - I have attached it to this mail
>> for convenience).
>>
>> I also tried running Float::Arithmetic::Div::Sol::A and that test
>> still fails.  For some reason 'make check' only runs a small subset of
>> tests, so I ran this manually like this:
>>
>> $ test/test -test Float::Arithmetic::Div::Sol::A
>> Float::Arithmetic::Div::Sol::A -
>> Options: -seed 1 -test Float::Arithmetic::Div::Sol::A
>>
>> Another try failed with a different seed number:
>> $ test/test -test Float::Arithmetic::Div Float::Arithmetic::Div::A
>> +++++ Float::Arithmetic::Div::B +++++ Float::Arithmetic::Div::C +++++
>> Float::Arithmetic::Div::Sol::A -
>> Options: -seed 1975575111 -test Float::Arithmetic::Div::Sol::A
>>
>> Thanks,
>> Filip
>>
>>> Christian,
>>>
>>> Thanks.  I was referring to this September & October thread - there
>>> were issues with Gecode freezing on some FloatVar problems (my
>>> testcase and your "Float::Arithmetic::Div::C") with MSVC 2015, and
>>> you said then that it might be resolved by not using SSE2 (but that
>>> Guido would investigate more).  We also identified a number of float
>>> tests that were failing on GCC 5 (not with GCC 4.9).
>>>
>>> I can try re-running our tests here with the current trunk to see if
>>> something changed - I just thought that I would ask directly whether
>>> you did something specific to address these issues.  The failures
>>> seemed a bit non-deterministic...
>>>
>>> Thanks,
>>> Filip
>>>
>>>> MSVC2015 works for Gecode.4.4.0 since its initial release, I in fact
>>>> uploaded packages to the Gecode website last week. Since last week
>>>> (Mar 30) the update 2 to MSVC 2015 finally also compiles the trunk
>>>> and the upcoming Gecode 5.0.0.
>>>>
>>>> Don't know about GCC, though.
>>>>
>>>> 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: Friday, April 1, 2016 14:41
>>>> To: users at gecode.org
>>>> Subject: Re: [gecode-users] Freeze with MSVC 2015 optimized build
>>>>
>>>> Hi Christian,
>>>>
>>>> Have you had any chance to look into supporting gcc 5 and MSVC 2015?
>>>>
>>>> Thanks,
>>>> Filip
>>>>
>>>>> Hi Filip,
>>>>>
>>>>> Thanks for the information. This really looks like a gcc problem.
>>>>> Guido, can you reproduce this behavior?
>>>>>
>>>>> 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: Friday, October 2, 2015 09:58 AM
>>>>> To: users at gecode.org
>>>>> Subject: Re: [gecode-users] Freeze with MSVC 2015 optimized build
>>>>>
>>>>> Hi,
>>>>>
>>>>> We were looking a bit more into 4.4.0 on Linux where we've also hit
>>>>> some issues.
>>>>>
>>>>> All tests worked fine with gcc 4.9.3.  However, with gcc 5.2.0 many
>>>>> tests failed - see the attachements for details:
>>>>>      gecode-4.4.0-gcc-5.2.0-failed_tests.list
>>>>>      ... list of failed tests (except two memory fails below)
>>>>>      gecode-4.4.0-gcc-5.2.0-failed_tests.log
>>>>>      ... log from 'test' for failed tests
>>>>>
>>>>> Two tests ran out of memory (allocated several GBs of memory before
>>>>> getting killed by system):
>>>>>      Set::Branch::Sparse::3
>>>>>      Set::Channel::Sorted
>>>>>
>>>>> gcc details:
>>>>> target=x86_64-linux-gnu
>>>>> GCC_VER=5.2.0
>>>>> GMP_VER=6.0.0
>>>>> MPFR_VER=3.1.3
>>>>> MPC_VER=1.0.3
>>>>> BINUTILS_VER=2.25
>>>>>
>>>>> It could also be a gcc bug of course, hard to tell.
>>>>>
>>>>> Thanks,
>>>>> 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
>





More information about the users mailing list