Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] OpenMPI with SGE: "-np N" for mpirun needed?
From: Ricardo Reis (rreis_at_[hidden])
Date: 2012-05-09 18:00:39


On Wed, 9 May 2012, Jiri Polach wrote:

>> You might want to use a smaller number of processors than those made
>> available by SGE.
>
> Thanks for replying. I can imagine that in some special cases it might be
> useful to request N processors from SGE and than use M<N; in such cases I
> would specify "-np M" for mpirun, of course.
>
> But this does not answer the question - if I just want to use as many
> processors as I request from SGE - do I need to specify "-np N" for mpirun or
> not?

Openmpi can be compiled with SGE integration. If present, you don't need
to use the -np argument (I'm checking one of my submit scripts).

Otherwise I use

-np $NSLOTS

$NSLOTS is given transparently by SGE with the total number of slots

If sge integration is not available (check through ompi_info) you also
might have to build the hostfile.

(which could be achieved, for instance, with

HOSTFILE=hostfile
awk '{print $1" cpu="$2}' ${PE_HOSTFILE} > ${HOSTFILE}

mpirun -machinefile ${HOSTFILE} -np ${NSLOTS} ${EXEC}

)

best (sorry if I extended the answer)

  Ricardo Reis

  'Non Serviam'

  PhD/MSc Mechanical Engineering | Lic. Aerospace Engineering

  Computational Fluid Dynamics, High Performance Computing, Turbulence
  http://www.lasef.ist.utl.pt

  Cultural Instigator @ Rádio Zero
  http://www.radiozero.pt

  http://www.flickr.com/photos/rreis/

  contacts: gtalk: kyriusan_at_[hidden] skype: kyriusan

  Institutional Address:

  Ricardo J.N. dos Reis
  IDMEC, Instituto Superior Técnico, Technical University of Lisbon
  Av. Rovisco Pais
  1049-001 Lisboa
  Portugal

                       - email sent with alpine 2.00 -