On Fri, 15 Jan 2010 20:03:12 +0100, Joa Ljungvall <[email protected]> wrote:
> Hi again,
> 
> thanks for all the answers, some swoshing by over my head. But, I think I got 
> the essiential:
> 
> 1) If I go for threads, I will have to write the assembly part myself (no 
> problems threads I know)
> 2) Threads only will not use all my cores for the matrix inversion, error 
> estimates etc. Sometimes
>    it will sometimes not.
> 3) MPI would be a nice solution since this will allow me to use all my cores 
> or many computers and theire cores etc.
>    This with or without threading... Up to me and my skills/taste
> 
> But, never having used MPI... If I want to use libmesh the way I do, as an 
> library used by a library that I can change
> during runtime (dlopen...) I would have to make all my code "understand" MPI 
> so I can start it using e.g. mpiexec. And 
> then???? To me it seems quite hard... Could I use MPI only in a library 
> called by my program? Without resorting to
> std::system("mpiexec ...") as a solution somewhere in the code (maybe not 
> bad???)

As you probably know, writing libmesh code that uses MPI is a non-issue.
As for calling distributed (MPI) code as a library from a single
process, this mostly depends on how tightly coupled these components
are.  You can use MPI-2 (MPI_Comm_spawn, etc) to spawn processes which
give you communicators that can move data between your original process
and the parallel processes.  Since these have separate memory spaces,
all information that you are moving must be transfered using MPI, but
the non-distributed part of your program would not need to know about
MPI.

If you have a very small well-defined interface by which you talk to the
distributed component, and you have some desire for scalability, then
MPI-2 would be a good choice.  If there is more coupling, or scalability
isn't a big deal for you, then threads are probably better.

Jed

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

Reply via email to