LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Bogdan Costescu (Bogdan.Costescu_at_[hidden])
Date: 2006-11-08 19:02:17


On Wed, 8 Nov 2006, Alastuey, Lucas wrote:

> LAM have using "mpirun -np 4 my_mpi_application" to test my program,
> but how its work this mode?

LAM/MPI starts 4 instances of "my_mpi_application" - that means 4
processes. Depending of the topology of the LAM universe (which you
defined previously with "lamboot"), this may mean 4 processes on the
same computer or 4 processes on 4 computers or something in between
(like 2 processes on each of 2 computers). If each of these processes
starts one or more threads, that doesn't really concern LAM/MPI.

> My application is multi-pthread, and using mutex for mutual
> exclusion.

That's fine, as long as each MPI call is also protected by a mutex.
LAM/MPI doesn't allow several threads to access MPI functions at the
same time; however what happens outside of the MPI calls doesn't
concern LAM/MPI at all.

> I think the mutex are sharing between nodes, is that possible?

Normally, threads are local to a computer. There were/are efforts to
make f.e. OpenMP programs be able to spread on a parallel machine or a
cluster, but there usually are trade-offs and a good performance can
be achieved only in certain cases (where often OpenMP might not
actually the best way to write the code...).

-- 
Bogdan Costescu
IWR - Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen
Universitaet Heidelberg, INF 368, D-69120 Heidelberg, GERMANY
Telephone: +49 6221 54 8869, Telefax: +49 6221 54 8868
E-mail: Bogdan.Costescu_at_[hidden]