Skip to content

Conversation

simonbyrne
Copy link
Member

Fixes #643

@vchuravy
Copy link
Member

The buffer rooting was kinda nice, since it prevented accidental GC errors

@simonbyrne
Copy link
Member Author

Yeah, that's my main reluctance to change this. Not sure what the best option is.

@simonbyrne simonbyrne force-pushed the sb/request-immutable branch 5 times, most recently from 72a953a to b3bfd6a Compare September 29, 2022 15:50
@simonbyrne
Copy link
Member Author

I think the biggest problem is going to be where we allocate the actual send buffer inside the sender, e.g.:

Isend(data, dest::Integer, tag::Integer, comm::Comm) =
Isend(Buffer_send(data), dest, tag, comm)

and
function isend(obj, dest::Integer, tag::Integer, comm::Comm)
buf = MPI.serialize(obj)
Isend(buf, dest, tag, comm)
end

I'm not sure there is a good solution to this.

@vchuravy
Copy link
Member

vchuravy commented Sep 29, 2022

Yeah we could have an AbstractRequest and then two subtypes, one of it rooting the other one doesn't.

But generally speaking I prefer the safety of the current approach and I am less worried about the cost of memory allocations for these small objects.

@simonbyrne
Copy link
Member Author

Yeah, I don't see a great way around it, unfortunately.

It's not the cost of the small objects I'm worried about, it's the cost of the allocations inside the Waitall! (but RequestSet should hopefully help with that).

@simonbyrne
Copy link
Member Author

Closed in favor of #677.

@simonbyrne simonbyrne closed this Dec 24, 2022
@giordano giordano deleted the sb/request-immutable branch January 9, 2023 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request objects and Waitall! allocations
2 participants