Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] "almost there" in getting MPI to run
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2011-12-16 09:06:39

On Dec 15, 2011, at 9:09 AM, Joao Amaral wrote:

> Strangely(?), in both my laptop and the cluster, the number of threads from the command
> call MPI_Comm_size ( MPI_COMM_WORLD, p, error )

Did you really mean "threads" there?

Open MPI is process-parallel, meaning that calling COMM_SIZE on a communicator will return the number of *processes* in that communicator, not threads.

See the man page for mpirun(1) for how to launch multiple processes in a single MPI job. Quick example:

    mpirun --hostfile your_host_file -np 8 your_mpi_program


your_host_file: a file listing the host names to launch on
8: number of copies of your_mpi_program to launch
your_mpi_program: your compiled executable MPI application

Jeff Squyres
For corporate legal information go to: