
MPI standard states a user MPI_Op and/or user MPI_Datatype can be free'd after a call to a non blocking collective and before the non-blocking collective completes. Retain user (only) MPI_Op and MPI_Datatype when the non blocking call is invoked, and set a request callback so they are free'd when the MPI_Request completes. Thanks Thomas Ponweiser for reporting this Fixes open-mpi/ompi#2151 Fixes open-mpi/ompi#1304 Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp> (cherry picked from commit open-mpi/ompi@0fe756d416)
Copyright (c) 2018 FUJITSU LIMITED. All rights reserved. $COPYRIGHT$ This extension provides the feature of persistent collective communication operations and persistent neighborhood collective communication operations, which is planned to be included in the next MPI Standard after MPI-3.1 as of Nov. 2018. See MPIX_Barrier_init(3) for more details. The code will be moved to the ompi/mpi directory and the MPIX_ prefix will be switch to the MPI_ prefix once the MPI Standard which includes this feature is published.