Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] RFC: Add an __attribute__((destructor)) function to opal
From: Nathan Hjelm (hjelmn_at_[hidden])
Date: 2014-07-16 10:36:11


On Wed, Jul 16, 2014 at 08:26:44AM -0600, Nathan Hjelm wrote:
> A number of issues have been raised as part of this discussion. Here is
> what I have seen so far:
>
> - contructor/destructor order not garaunteed: From an opal perspective
> this should not be a problem. Most components are unloaded by
> opal_finalize () not opal_finalize_util (). So opal components
> opal should already be finalized by the time the destructor is called
> (or we can finalize them in the destructor if necessary).
>
> - portability: All the compilers most of us care about: gcc, intel,
> clang. The exceptions appear to be xlc and pgi. For these compilers
> we can fall back on Ralph's solution and just leak if
> MPI_Finalize () is not called after MPI_T_Finalize (). Attached is an
> implementation that does that (needs some adjustment).

Correction. xlc does support the destructor function attribute. The odd
one out is PGI.

-Nathan



  • application/pgp-signature attachment: stored