[Chicago] MPI in Python?
Massimo Di Pierro
mdipierro at cs.depaul.edu
Wed Feb 27 21:26:24 CET 2008
Sorry, sometimes I type fast and I do not understand myself.
MPI is a Message Passing Protocol (you send a string form one CPU and
you receive the string on another CPU). depending on the MPI
implementation (MPICH, LamMPI, MPI-Myranet, etc.) it may or many not
take advantage of your architecture/network. If some CPUs share RAM
memory MPI should take advantage of it but it doesn't.
1) case (1xCPU+RAM) x n -> You use MPI
2) case (m x CPU + RAM) x n -> You still use MPI but lose efficiency
3) case (m x CPU + RAM) x 1 -> you use threads, there is no need for
(n is the number of nodes, m is the number of CPUs per node)
In case 1) and 2) you can treat the n nodes as a shared memory
machine by using a program called OpenMP. I do not suggest it.
On Feb 27, 2008, at 2:15 PM, skip at pobox.com wrote:
> Massimo> Is the CPU don't share the same RAM threading is not
> an option
> Massimo> unless you use OpenMP, which emulates shared memory
> but it is
> Massimo> very slow compared with MPI. Nobody uses it anymore.
> Skip> So MPI means "Message Passing Interface" where the
> messages must
> Skip> be passed via shared memory? *sigh* If so, I'll look
> Skip> for solutions.
> Mike> MPI means "Message Passing Interface" where you shouldn't
> have to
> Mike> worry about the protocol used. MPI will transparently
> use shared
> Mike> memory, pthreads, some other ipc mechanism, or sockets
> based on
> Mike> the configuration when you built the MPI library and/or
> what is
> Mike> the best supported mechanism on your operating system.
> So I obviously misunderstood what Massimo wrote. What did he mean? I
> interpreted his statement as meaning you can't use MPI without a
> memory architecture unless you are using OpenMP which nobody uses
> Chicago mailing list
> Chicago at python.org
More information about the Chicago