Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Ralph H Castain (rhc_at_[hidden])
Date: 2006-09-08 08:47:58


It occurred to me last night that this solves the homogeneous case, but
still leaves us with the problem of hetero systems. What we really need to
know is not only "what do I support", but "what does the recipient support".

Then it hit me that we may already have the solution for that problem in the
OOB, though we don't use it currently. If you check the OOB code, you will
find that we store the OOB contact info on the registry during startup, and
in return we obtain ALL of the OOB contact info for our peers. In that code,
we allow for multiple contact points to be passed for each peer process -
including what protocol is to be used for each contact point.

In other words, if we have an IPv6 socket, that information gets passed to
our peers (including the fact that it is an IPv6 address). Ditto if we have
an IPv4 socket. And we are covered even if we have both types.

What is missing in the code is the selection of which contact point to use
to communicate a given message, and the decision logic that uses the "right"
addressing protocol as specified for that recipient (current code assumes
only one is given).

So I think we can actually build a lot of the hetero support into the
existing OOB component. We just may need to add a little to take full
advantage of what is already there. For example, on a send, we may just need
to use the proper call that matches the specified protocol. The "if"
statement approach should be adequate for that level of separation.

Ralph

On 9/7/06 4:15 PM, "Jeff Squyres" <jsquyres_at_[hidden]> wrote:

> On 9/7/06 1:51 PM, "Adrian Knoth" <adi_at_[hidden]> wrote:
>
>>> (I'm willing to help with the configure.m4 mojo -- the
>>
>> That's good. Just check for struct sockaddr_in6 and add
>> -DIPV6 to the CFLAGS. This flag is currently needed by
>> opal/util/if.* and orte/mca/oob/tcp/*, so one might limit
>> it to the two corresponding makefiles.
>>
>> We can also set/define IPV6 in something_config.h.
>> It'd also be a good idea to have a --disable-ipv6 configure flag.
>
> Done. See the attached patch (apply it, then re-run autogen.sh and
> configure). It does three things:
>
> 1. Check if --disable-ipv6 was passed to configure.
> 2. Check to see if struct sockaddr_in6 exists.
> 3. Sets a macro OMPI_WANT_IPV6 to either 0 or 1 (i.e., it's always defined
> and is therefore suitable for #if, not #ifdef):
> - Set to 1 if --disable-ipv6 was not passed to configure *AND* struct
> sockaddr_in6 exists
> - Set to 0 otherwise
>
> So surround your code with:
>
> #if OMPI_WANT_IPV6
> ...ipv6 stuff...
> #endif
>
> All you have to do to get this define is #include "ompi_config.h", which all
> of the files should be doing already, anyway.
>
> Let me know if this works for you.