Thanks for your help. I though the number of process was set in the
code, not in the command line.
On 16-12-2011 14:06, Jeff Squyres wrote:
> 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