Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Open specific port TCP/IP in MPI
From: Ralph Castain (rhc_at_[hidden])
Date: 2009-06-26 18:25:45

Not sure I understand the problem. Your server will have the ability
to recv messages from multiple sources on the port it picks. Is there
some reason why you want to specify the port for each process?

Note that you can still do so - you just have to do it -before-
calling MPI_Init. MPI jobs exchange contact info during MPI_Init so
that the connections can be setup. Since you can only send messages
via communicator anyway, the port is completely hidden from your code
(as it should be).

However, if you -really- need to set the port of each individual rank,
you can do so by simply putting the MCA param into the environment
prior to calling MPI_Init. Something like this:

foo = "1234";

asprintf(&my_port, "OMPI_MCA_btl_tcp_port_min_v4=%s, foo);


This will set a minimum port number of 1234, and tells the TCP MPI
interconnect it can only use that port.


On Jun 26, 2009, at 10:48 AM, Nulik Nol wrote:

> On Fri, Jun 26, 2009 at 9:57 AM, Ralph Castain<rhc_at_[hidden]>
> wrote:
>> How are you trying to use this port? Are you expecting that to be
>> the port
>> used for MPI communications?
> i am thinking to use MPI_Send and MPI_Recv on this connection. One
> node
> will run in server mode to server data to others, only one process,
> multiple
> incoming connections. Just a simple (really really simple)
> client/server model so i would avoid writing my own socket library for
> messaging between nodes over TCP, never thought i am asking too much.
> --
> ==================================
> The power of zero is infinite
> _______________________________________________
> users mailing list
> users_at_[hidden]