On Tue, Nov 26, 2013 at 11:20:48AM +0100, Jan Blechta wrote:
> On Tue, 26 Nov 2013 09:37:01 +0000
> "Garth N. Wells" <[email protected]> wrote:
>
> > On 2013-11-26 09:22, Marco Morandini wrote:
> > > On 11/26/2013 10:22 AM, Garth N. Wells wrote:
> > >> A fix for the STL std::nth_element bug in gcc 4.8.1 has been
> > >> released for Ubuntu 13.10 as an update:
> > >>
> > >>      https://bugs.launchpad.net/ubuntu/+source/gcc-4.8/+bug/1246802
> > >>
> > >> I suggest that we now remove the ifdefs for using
> > >> boost::nth_element. The change was not made in a separate branch,
> > >> so undoing it will require
> > >> some digging. Anders: will you undo the change?
> > >>
> > >
> > > Don't assume that everyone out there is using Ubuntu.
> > > You could consider adding a check at configure time
> > > to detect the gcc bug.
> > >
> >
> > 1. Which distributions are using unpatched GCC 4.8.1?
> >
> > 2. The proposal to check for gcc bugs is not, in general, sensible.
> > GCC has had many bugs that are fixed in subsequent releases. We have
> > never checked for these.
> >
> > 3. std::nth_element is used in DOLFIN dependencies, and we cannot fix
> > this, so using boost::nth_element is not general fix.
>
> It seems that boost::nth_element calls std::nth_element according to
> Nico's observation https://bitbucket.org/fenics-project/dolfin/issue/156
>
> So it is probably no fix at all. The confusion possibly comes from
> another bugfix being done by Anders in BoundingBoxTree at the same time
> which solved some similar issues.

I don't think it was another bug that was the issue, but if that's
indeed the case (that boost::nth_element calls std::nth_element), then
the explanation is likely the following: I started out by making a
small test program that could reproduce the bug in std::nth_element,
then found the fix and patched my local version of std::nth_element to
verify that the bug was indeed in std::nth_element. Then after that
I compared the speed between std::nth_element and boost::nth_element
while still having the patched std::nth_element on my system, so I
never tested that the bug was not there with boost and an unpatched
version of std...

In that case, I agree we should remove that #ifdef now...

--
Anders
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to