Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Spawning processes through MPI::Intracomm::Spawn_multiple
From: Ralph Castain (rhc_at_[hidden])
Date: 2009-07-14 10:41:49


Hi Vipin

I have added support for these features to the OMPI trunk repository.
They are only accessible via MPI_Comm_spawn or
MPI_Comm_spawn_multiple, specified as MPI Info keys "add-host" and
"add-hostfile". Check the man pages for those functions to see how
they are used.

Quick summary: I add the hosts found in any add-host and add-hostfile
specifications to the list of hosts known to mpirun, and then use the
provided hosts to constrain the launch of the specified apps. So
spawning an app of "foo" with an info key of "add-host mike" will
result in foo being launched on mike, without mpirun having previous
knowledge of "mike".

You'll have to wait to try it, though, until another problem in
comm_spawn on the trunk gets fixed - hopefully, real soon (someone is
working on it).

HTH
Ralph

On Jul 2, 2009, at 1:28 AM, vipin kumar wrote:

> Hi Ralph,
>
> To add few more points to my queries, as you said earlier "addhost"
> and "addhostfile" features will come soon. So can you please tell
> how we are going to use those features, will there be any API for
> that to calll from inside the program or we have to execute command
> to use those features.
>
> Thanks,
>
> Regards,
> On Thu, Jul 2, 2009 at 12:46 PM, vipin kumar
> <vipinkumar41_at_[hidden]> wrote:
> Hi Ralph,
>
> I am thankful to your reply regarding the matter, however to carry
> forward with my activities it would be of great help if I can know
> where OpenMpi/mpirun holds the contents of "hostfile" so that I can
> dynamically add/alter the values till such a feature is officially
> included in OpenMpi in the form of "addhost" and "addhostfile".
>
> Thanks.
>
> Regards,
>
>
> On Thu, Jul 2, 2009 at 12:23 PM, Ralph Castain <rhc_at_[hidden]>
> wrote:
> At the moment, the answer is "no". :-/
>
> However, we do have a "ticket" in our plans to add a "addhost" and
> "addhostfile" capability to the system. I haven't implemented it yet
> because of other priorities and the fact that nobody has asked for
> it before now.
>
> Well...actually, people -did- ask for it a long time ago, but not
> for quite awhile now. ;-)
>
> Anyway, I can implement those features pretty easily. Could get to
> it in the next few days - otherwise, it will have to wait another
> week as I will be out.
>
> Either way, though, it would only be in the OMPI devel trunk until
> the next feature series (1.5) has its first release. Haven't set the
> date for that, though it will likely be this summer.
>
> Ralph
>
> On Jul 2, 2009, at 12:45 AM, vipin kumar wrote:
>
>> Hi all,
>>
>> I got the solution but its not flexible. I have to provide two host
>> files "chfile" and "dhfile". Contents of host files are as follows
>>
>> $ cat chfile
>> #This file contains all slaves as well as master node
>> localhost
>> 200.40.70.193
>>
>> $cat dhfile
>> #This file contains all slave nodes
>> 200.40.70.193
>>
>> and the command line I am using is
>>
>> $ mpirun -np 1 -hostfile chfile launcher -hostfile dhfile
>>
>> but this is not what I want.
>> I don't know in advance which and how many remote nodes can be
>> there. Dynamically nodes may be added and requested to serve the
>> master. So I am assuming that I have only local machine where I
>> will invoke launcher program. When one remote node gets added
>> launcher program will launch one "slave" in local machine and one
>> "rslave" in remote machine.
>>
>> Is there any other way to do this.
>>
>> Thanks.
>>
>> Regards,
>>
>> On Mon, Jun 29, 2009 at 10:49 AM, vipin kumar
>> <vipinkumar41_at_[hidden]> wrote:
>> Hi all,
>>
>> I am trying to spawn dynamically processes in remote as well as
>> local machine using MPI::Intracomm::Spawn_multiple. I am using
>> MPI::Info object to tell where to launch processes using "host" key
>> and "<ip_address>" as its value but but I am getting the error
>>
>> --------------------------------------------------------------------------
>> There are no allocated resources for the application
>> slaveprocess
>> that match the requested mapping:
>>
>>
>> Verify that you have mapped the allocated resources properly using
>> the
>> --host or --hostfile specification.
>> --------------------------------------------------------------------------
>>
>> I tried with "<hostname>" too.
>> but its not working.
>>
>> It works fine if I give the value "localhost" to "host:" key. It
>> launches successfully processes in local machine.
>>
>> any help will be greatly appreciated.
>>
>> Regards,
>> --
>> Vipin K.
>> Research Engineer,
>> C-Dot, Bangalore, India
>>
>>
>>
>> --
>> Vipin K.
>> Research Engineer,
>> C-DOTB, India
>> _______________________________________________
>> users mailing list
>> users_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>
>
>
> --
> Vipin K.
> Research Engineer,
> C-DOTB, India
>
>
>
> --
> Vipin K.
> Research Engineer,
> C-DOTB, India
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users