Subject: [FFC-dev] Buildbot failing on winxp

From: Anders Logg <[email-masked]>
Date: Tue, 22 Sep 2009 14:46:36 +0200

Why is the buildbot failing for FFC on winxp-mingw32? Is this
something that could be fixed?

--
Anders

---

From: Johannes Ring <[email-masked]>
Date: Wed, 23 Sep 2009 09:40:05 +0200

> 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.

BTW: The buildbot failed the FFC checks last night. No report was sent
to the list because I have experimented with bug reports directly to
launchpad. Obviously it did not work (problems with GPG signing of the
mail).

Johannes

---

From: Anders Logg <[email-masked]>
Date: Wed, 23 Sep 2009 11:04:23 +0200

> while it is 1e-08 on Ubuntu.

I don't understand why this should matter. Where does this problem show up?

> launchpad. Obviously it did not work (problems with GPG signing of the

ok.

--
Anders

---

From: "Garth N. Wells" <[email-masked]>
Date: Wed, 23 Sep 2009 10:06:00 +0100

> I don't understand why this should matter. Where does this problem show up?

When performing a diff on the generated and reference files.

Garth

> ------------------------------------------------------------------------
> 
> _______________________________________________
> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/ffc-dev

---

From: Anders Logg <[email-masked]>
Date: Wed, 23 Sep 2009 11:11:44 +0200

> 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?

That should be easy to fix since all floats are formatted through a
common function in FFC. We could fix that function to produce the same
results.

--
Anders

---

From: "Garth N. Wells" <[email-masked]>
Date: Wed, 23 Sep 2009 10:12:43 +0100

> differently on the two platforms?

Yes.

Garth

---

From: Anders Logg <[email-masked]>
Date: Wed, 23 Sep 2009 11:17:34 +0200

> > differently on the two platforms?

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

--
Anders

---

From: Johannes Ring <[email-masked]>
Date: Wed, 23 Sep 2009 11:28:07 +0200

On Wed, Sep 23, 2009 at 11:17 AM, Anders Logg <[email-masked]> wrote:
> at it in detail?

Most of the tests fail with the same error. Have looked at the output
from the tests on Windows? You can find it here:

http://fenics.org:8080/builders/ffc-winxp-mingw32/builds/352/steps/ffc%20check/logs/stdio

> I won't be able to test myself on Windows, but

Yes, I will take a look.

Johannes

> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkq5564ACgkQTuwUCDsYZdHdsQCfaqS+MynsUBQeb3ijBT0+XLjN
> xUYAn12+mKEit0gqF1S1mxPPXBbdM3tF
> =XJsA
> -----END PGP SIGNATURE-----
>

---

From: Johannes Ring <[email-masked]>
Date: Wed, 23 Sep 2009 15:42:11 +0200

>  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.

Johannes

---

From: Anders Logg <[email-masked]>
Date: Wed, 23 Sep 2009 20:09:53 +0200

> so that you can try it out yourself.

Yes, that would be nice. How do I log in?

--
Anders

---

From: Johannes Ring <[email-masked]>
Date: Thu, 24 Sep 2009 08:08:30 +0200

> Yes, that would be nice. How do I log in?

I will tell you off list.

Johannes

---

From: Anders Logg <[email-masked]>
Date: Thu, 24 Sep 2009 10:44:26 +0200

> I will tell you off list.

Thanks, I'll take a look later today.

-- 
Anders