On Wed, 10 Feb 2010, Derek Gaston wrote:

> So... I got tired of not being able to use threading with
> Hermites... so I finally went in there and fixed it.

I'd call this more of a "workaround" than a "fix", but it's still a
big improvement over my original status of "bug" or my recent upgrade
to "unsupported feature".  ;-)

> I fixed it by turning off the caching that Roy was doing when
> libMesh is compiled with thread support.  Note that this might slow
> things down if you happen to have compiled your library with thread
> support... but aren't actually using threads.
>
> But I think the trade off is nice... you can now use threads to
> solve fourth order problems... no nasty bugs to grab you... or
> asserts to hit.

I agree.  I'm curious, though - could you quantify the slowdown?
Recalculating all those conversion coefficients on every basis
function on every quadrature point sounds pretty ugly, but I'd be
happy to be told that I was just prematurely optimizing.

> Also... through this process I spotted a couple of other
> non-threadsafe operations going on in some of the constraint
> projection stuff (mostly having to do with PointLocator
> initialization).  I put proper locks around that using the "Double
> Checked Lock Pattern" for speed... so it's good to go now.

Thanks!  I need to pick your brain sometime about locking, BTW.  I've
got some more subtlely non-thread-safe code (the ALE stuff) that could
be made thread-safe in one of a few ways, but choosing which would
require me to know more about various lock/mutex costs than I do now.

> Roy: Take a look at what I did and let me know if you don't like it.

Will do ASAP, but it may take a few days.  I just got back from a
brief conference & vacation; 72 new emails...
---
Roy

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to