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, "boute...@osl.iu.edu" <boute...@osl.iu.edu> 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
> s...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/svn


Reply via email to