Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] SGE and openmpi
From: Ralph Castain (rhc_at_[hidden])
Date: 2011-04-12 01:46:32


On Apr 11, 2011, at 11:33 PM, Kevin.Buckley_at_[hidden] wrote:

>
>>> #!/bin/bash
>>> #$ -cwd
>>> #$ -j y
>>> #$ -S /bin/bash
>>> #$ -q all.q
>>> #$ -pe orte 18
>>> MPI_DIR=/home/jason/openmpi-1.4.3-install/bin
>>> /home/jason/openmpi-1.4.3-install/bin/mpirun -np $NSLOTS myprog
>
>
>> If you have SGE integration, you should not specify the number
>> of slots requested on the command-line. Open MPI will speak
>> directly to SGE (or vice versa, to get this information.
>
> I've always thought that the tight integration merely removed the
> need for a hostfile, or equivalent, to be specified?

That is correct. -np specifies the number of processes to be run, not the number of slots in the allocation. The latter is determined by the SGE integration.

In this case, I believe the author's intent was that the two be the same, which is why I let it go without comment. However, if that was the intent, he could have left the "-np" argument off entirely - with no number of processes specified, mpirun will simply assign a process to each allocated slot.

>
> I've been basing this belief on the examples here:
>
> http://www.open-mpi.org/faq/?category=running#qsub-notify
>
> where, in all three examples, both the SGE submission script's
> #$ directives and the mpirun commands invoked, specify the
> number of processors but there's no hostfile/list.

To be precise, the mpirun commands specify the number of -processes- to be run, not the number of -processors- to be used.

Sounds technical, but one needs to remember that you can oversubscribe processes in MPI, so this distinction is critical.

>
>
> --
> Kevin M. Buckley Room: CO327
> School of Engineering and Phone: +64 4 463 5971
> Computer Science
> Victoria University of Wellington
> New Zealand
>
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users