On Jul 27, 2019, at 10:43 PM, Gilles Gouaillardet via users 
<users@lists.open-mpi.org> wrote:
> 
> MPI_Isend() does not automatically frees the buffer after it sends the 
> message.
> (it simply cannot do it since the buffer might be pointing to a global
> variable or to the stack).

Gilles is correct: MPI_Isend does not free the buffer.  I was wondering if you 
had somehow used that same buffer -- or some subset of that buffer -- in other 
non-blocking MPI API calls, and freeing it triggered Bad Things because MPI was 
still using (some of) that buffer because of other pending MPI requests.

> Can you please extract a reproducer from your program ?

Yes, please do this.

> Out of curiosity, what if you insert an (useless) MPI_Wait() like this ?
> 
> MPI_Test(req, &flag, &status);
> if (flag){
>    MPI_Wait(req, MPI_STATUS_IGNORE);
>    free(buffer);
> }

That should be a no-op, because "req" should have been turned into 
MPI_REQUEST_NULL if flag==true.

-- 
Jeff Squyres
jsquy...@cisco.com

_______________________________________________
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Reply via email to