Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] [patch] MPI-2.2: Ordering of attribution deletion callbacks on MPI_COMM_SELF
From: KAWASHIMA Takahiro (rivis.kawashima_at_[hidden])
Date: 2013-01-16 10:37:28


Hi,

I've implemented ticket #3123 "MPI-2.2: Ordering of attribution deletion
callbacks on MPI_COMM_SELF".

  https://svn.open-mpi.org/trac/ompi/ticket/3123

As this ticket says, attributes had been stored in unordered hash.
So I've replaced opal_hash_table_t with opal_list_t and made necessary
modifications for it. And I've also fixed some multi-threaded concurrent
(get|set|delete)_attr call issues.

By this modification, following behavior changes are introduced.

  (A) MPI_(Comm|Type|Win)_(get|set|delete)_attr function may be slower
      for MPI objects that has many attributes attached.
  (B) When the user-defined delete callback function is called, the
      attribute is already removed from the list. In other words,
      if MPI_(Comm|Type|Win)_get_attr is called by the user-defined
      delete callback function for the same attribute key, it returns
      flag = false.
  (C) Even if the user-defined delete callback function returns non-
      MPI_SUCCESS value, the attribute is not reverted to the list.

(A) is due to a sequential list search instead of a hash. See find_value
function for its implementation.
(B) and (C) are due to an atomic deletion of the attribute to allow
multi-threaded concurrent (get|set|delete)_attr call in MPI_THREAD_MULTIPLE.
See ompi_attr_delete function for its implementation. I think this does
not matter because MPI standard doesn't specify behavior in such cases.

The patch for Open MPI trunk is attached. If you like it, take in
this patch.

Though I'm a employee of a company, this is my independent and private
work at my home. No intellectual property from my company. If needed,
I'll sign to Individual Contributor License Agreement.

Regards,
KAWASHIMA Takahiro