Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI devel] Violating standard in MPI_Close_port
From: Ralph Castain (rhc_at_[hidden])
Date: 2012-01-20 08:14:17


No reason for doing so comes to mind - I suspect the original author probably started out doing a "free", then discovered that the overlying MPI code was passing in an array and so just converted it to a memset. Either way, it really should be the responsibility of the user's code to deal with the memory.

I'll remove it. Thanks for pointing it out!

On Jan 20, 2012, at 1:28 AM, Y.MATSUMOTO wrote:

> Dear All,
>
> Next is question about "MPI_Close_port".
> According to the MPI-2.2 standard,
> the "port_name" argument of
> MPI_Close_port() is marked as 'IN'.
> But, in Open MPI (both trunk and 1.4.x), the content of
> "port_name" is updated in MPI_Close_port().
> It seems to violate the MPI standard.
>
> The following is the suspicious part.
> ---ompi/mca/dpm/orte/dpm_orte.c---
> 919 static int close_port(char *port_name)
> 920 {
> 921 /* the port name is a pointer to an array - DO NOT FREE IT! */
> 922 memset(port_name, 0, MPI_MAX_PORT_NAME);
> 923 return OMPI_SUCCESS;
> 924 }
> ---ompi/mca/dpm/orte/dpm_orte.c---
>
> This memset makes "port_name" "INOUT".
> Would you tell me why call this memset?
>
> Best regards,
> Yuki MATSUMOTO
> MPI development team,
> Fujitsu
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel