On Thu, 14 Jan 2010, John Peterson wrote:
On Thu, Jan 14, 2010 at 10:32 AM, Roy Stogner <[email protected]> wrote:
On Thu, 14 Jan 2010, Joa Ljungvall wrote:
However, some threading would be nice... I tried to compile libmesh
with --enable-tbb and then running example 14, but no threads
around? Any ideas?
I'm afraid that some of the best threading examples are in Ben's
private application code, but there are some examples in the library
that you could examine. The simplest are probably the ones in
MeshTools. The remaining complication for assembly is that you need
to hold a mutex around the add_vector() and add_matrix() calls to make
sure they aren't called from two threads at once.
System::project_vector is threaded too, and that should actually be
used by ex14.
Ah, that's right. Alas, although Ben's original project_vector wasn't
super-efficient and my non-Lagrange code path is worse, it still
shouldn't be taking up enough of the runtime that threading it alone
is a big deal.
Besides, Ben's code (with an expensive assembly combined with
experimenting with a matrix-free solve) isn't typical. Jed was right
that, for most users, threading the assembly isn't going to help much
when you've got an un-threaded solve going on in the background.
Although, doesn't PETSc end up doing most of it's work in BLAS? So
even without PETSc itself being threads-aware, you ought to be able to
link it to a threaded MKL and still get most of the speedup, no?
---
Roy
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users