[gecode-users] Freeze with MSVC 2015 optimized build
Filip Konvička
filip.konvicka at logis.cz
Sun Apr 3 22:16:35 CEST 2016
Sorry...of course I forgot the attachment, here it is.
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
>>>
-------------- next part --------------
#pragma warning(push)
#pragma warning(disable : 4251 4355 4800)
#include <gecode/driver.hh>
#include <gecode/int.hh>
#include <gecode/minimodel.hh>
#pragma warning(pop)
//#include <gecode/gist.hh>
using namespace Gecode;
struct LayoutCalculator2 : public Space {
double min_edge_width;
double fit_to_width;
IntVar total_width;
IntVar scroll_area;
IntVarArray start_times;
IntVarArray widths;
FloatVar scaler;
/// Constructor for cloning \a s
LayoutCalculator2(bool share, LayoutCalculator2& s)
: Space(share,s)
, min_edge_width(s.min_edge_width)
, fit_to_width(s.fit_to_width)
{
total_width.update(*this, share, s.total_width);
scroll_area.update(*this, share, s.scroll_area);
start_times.update(*this, share, s.start_times);
widths.update(*this, share, s.widths);
scaler.update(*this, share, s.scaler);
}
/// Copy during cloning
virtual Space*
copy(bool share) {
return new LayoutCalculator2(share,*this);
}
/// Actual model
LayoutCalculator2(double min_edge_width, double fit_to_width)
: min_edge_width(min_edge_width)
, fit_to_width(fit_to_width)
{
const int num_nodes = 2;
total_width = IntVar(*this, 0, Gecode::Int::Limits::max);
scroll_area = IntVar(*this, 0, Gecode::Int::Limits::max);
start_times = IntVarArray(*this, num_nodes, 0, Gecode::Int::Limits::max);
widths = IntVarArray(*this, num_nodes, 0, Gecode::Int::Limits::max);
scaler = FloatVar(*this, 0, Gecode::Float::Limits::max);
{
FloatVar fl_width(*this, 0, Gecode::Float::Limits::max);
rel(*this, max(FloatVal(228.),
8686.9666660000003
* scaler) <= fl_width);
IntVar int_width(*this, 0, Gecode::Int::Limits::max);
channel(*this, fl_width, int_width);
rel(*this, int_width <= widths[0]);
}
{
FloatVar fl_width(*this, 0, Gecode::Float::Limits::max);
rel(*this, max(FloatVal(265.), 1. * scaler) <= fl_width);
IntVar int_width(*this, 0, Gecode::Int::Limits::max);
channel(*this, fl_width, int_width);
rel(*this, int_width <= widths[0]);
rel(*this, start_times[0] + widths[0] + (int)min_edge_width <= start_times[1]);
rel(*this, start_times[1] + widths[1] <= total_width);
}
rel(*this, max(0, total_width - (int)fit_to_width) == scroll_area);
// Minimize scroll area
branch(*this, scroll_area, INT_VAL_MIN());
// Maximize scaler
//branch(*this, scaler, FLOAT_VAL_SPLIT_MAX());
branch(*this, scaler, FLOAT_VAL_SPLIT_MAX());
/*
// Minimize total width (just assign)
branch(*this, total_width, INT_VAL_MIN());
// Maximize all start times (push right)
branch(*this, start_times, INT_VAR_MAX_MIN(), INT_VAL_MAX());
// Minimize widths
branch(*this, widths, INT_VAR_MAX_MIN(), INT_VAL_SPLIT_MIN());
*/
}
};
int main()
{
LayoutCalculator2 init(50, 893);
Gecode::Search::TimeStop t(1000);
Gecode::Search::Options o;
o.stop = &t;
Gecode::dfs(&init, o);
//Gist::dfs(&init);
return 0;
}
More information about the users
mailing list