← Back to team overview

ffc team mailing list archive

Re: Buildbot failing on winxp

 

On Wed, Sep 23, 2009 at 8:09 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> On Wed, Sep 23, 2009 at 03:42:11PM +0200, Johannes Ring wrote:
>> On Wed, Sep 23, 2009 at 11:17 AM, Anders Logg <logg@xxxxxxxxx> wrote:
>> > On Wed, Sep 23, 2009 at 10:12:43AM +0100, Garth N. Wells wrote:
>> >>
>> >>
>> >> Anders Logg wrote:
>> >> > On Wed, Sep 23, 2009 at 10:06:00AM +0100, Garth N. Wells wrote:
>> >> >>
>> >> >> Anders Logg wrote:
>> >> >>> On Wed, Sep 23, 2009 at 09:40:05AM +0200, Johannes Ring wrote:
>> >> >>>> On Tue, Sep 22, 2009 at 2:46 PM, Anders Logg <logg@xxxxxxxxx> wrote:
>> >> >>>>> Why is the buildbot failing for FFC on winxp-mingw32? Is this
>> >> >>>>> something that could be fixed?
>> >> >>>> The problem is that floats are represented slightly differently
>> >> >>>> because of the underlying C library. On Windows, float(1e-8) is 1e-008
>> >> >>>> while it is 1e-08 on Ubuntu.
>> >> >>> I don't understand why this should matter. Where does this problem show up?
>> >> >>>
>> >> >> When performing a diff on the generated and reference files.
>> >> >
>> >> > You mean the regression test fail just because floats are formatted
>> >> > differently on the two platforms?
>> >> >
>> >>
>> >> Yes.
>> >
>> > Johannes, could you send an example of a test that fails so I can look
>> > at it in detail? I won't be able to test myself on Windows, but
>> > perhaps you can find some solution by modifying the following lines in
>> >
>> >  ffc/compiler/ufcformat.py:
>> >
>> >  # Set number of digits for floating point and machine precision
>> >  precision = int(options["precision"])
>> >  f1 = "%%.%dg" % precision
>> >  f2 = "%%.%de" % precision
>> >  def floating_point(v):
>> >      if abs(v) < 100.0:
>> >          return f1 % v
>> >      else:
>> >          return f2 % v
>> >  self.format["floating point"] = floating_point
>>
>> I guess it should work if "%%.%df" is used instead but that is
>> probably not a good solution. I can't think of anything else that will
>> make this work. At least FFC is working on Windows as the errors can
>> be ignored.
>>
>> Anders: If you like, I can give you access to the Windows buildslave
>> so that you can try it out yourself.
>
> Yes, that would be nice. How do I log in?

I will tell you off list.

Johannes


Follow ups

References