Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] [OMPI svn] svn:open-mpi r18303
From: Ralph Castain (rhc_at_[hidden])
Date: 2008-04-25 16:53:04


Hmmm...just to clarify, this wasn't a "bug". It was my understanding per the
MPI folks that a separate, unique port had to be created for every
invocation of Comm_accept. They didn't want a port hanging around open, and
their plan was to close the port immediately after the connection was
established.

So dpm_orte was written to that specification. When I reorganized the code,
I left the logic as it had been written - which was actually done by the MPI
side of the house, not me.

I have no problem with making the change. However, since the specification
was created on the MPI side, I just want to make sure that the MPI folks all
realize this has now been changed. Obviously, if this change in spec is
adopted, someone needs to make sure that the C and Fortran bindings -do not-
close that port any more!

Ralph

On 4/25/08 2:41 PM, "bouteill_at_[hidden]" <bouteill_at_[hidden]> wrote:

> Author: bouteill
> Date: 2008-04-25 16:41:44 EDT (Fri, 25 Apr 2008)
> New Revision: 18303
> URL: https://svn.open-mpi.org/trac/ompi/changeset/18303
>
> Log:
> Fix a bug that rpevented to use the same port (as returned by Open_port) for
> several Comm_accept)
>
>
> Text files modified:
> trunk/ompi/mca/dpm/orte/dpm_orte.c | 19 ++++++++++---------
> 1 files changed, 10 insertions(+), 9 deletions(-)
>
> Modified: trunk/ompi/mca/dpm/orte/dpm_orte.c
> ==============================================================================
> --- trunk/ompi/mca/dpm/orte/dpm_orte.c (original)
> +++ trunk/ompi/mca/dpm/orte/dpm_orte.c 2008-04-25 16:41:44 EDT (Fri, 25 Apr
> 2008)
> @@ -848,8 +848,14 @@
> {
> char *tmp_string, *ptr;
>
> + /* copy the RML uri so we can return a malloc'd value
> + * that can later be free'd
> + */
> + tmp_string = strdup(port_name);
> +
> /* find the ':' demarking the RML tag we added to the end */
> - if (NULL == (ptr = strrchr(port_name, ':'))) {
> + if (NULL == (ptr = strrchr(tmp_string, ':'))) {
> + free(tmp_string);
> return NULL;
> }
>
> @@ -863,15 +869,10 @@
> /* see if the length of the RML uri is too long - if so,
> * truncate it
> */
> - if (strlen(port_name) > MPI_MAX_PORT_NAME) {
> - port_name[MPI_MAX_PORT_NAME] = '\0';
> + if (strlen(tmp_string) > MPI_MAX_PORT_NAME) {
> + tmp_string[MPI_MAX_PORT_NAME] = '\0';
> }
> -
> - /* copy the RML uri so we can return a malloc'd value
> - * that can later be free'd
> - */
> - tmp_string = strdup(port_name);
> -
> +
> return tmp_string;
> }
>
> _______________________________________________
> svn mailing list
> svn_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/svn