hkaiser changed the topic of #ste||ar to: STE||AR: Systems Technology, Emergent Parallelism, and Algorithm Research | stellar-group.org | HPX: A cure for performance impaired parallel applications | github.com/STEllAR-GROUP/hpx | This channel is logged: irclog.cct.lsu.edu
<hkaiser>
that's a wrapper function object that -- when invoked -- returns the value of the member data item it wraps
<hkaiser>
using the first argument as the this for the object to access
<hkaiser>
(first and only argument)
<satacker[m]>
hkaiser: gonidelis I was trying to implement sender_base, sender, and sender_to `concepts` as `tags`. For the sender requirements is it enough to query the completion signatures of the sender?
<satacker[m]>
> <@satacker:matrix.org> hkaiser: gonidelis I was trying to implement sender_base, sender, and sender_to `concepts` as `tags`. For the sender requirements is it enough to query the completion signatures of the sender?
<john98zakaria[m]>
I guess the question boils down to "should you use a future as a mutex?
<john98zakaria[m]>
* a mutex/barrier ?
<hkaiser>
john98zakaria[m]: first - channels support moving data
<hkaiser>
whether to use mutexes, futures, barriers or something else really depends on the use case
<john98zakaria[m]>
hkaiser: If I do std::move I loose my buffer object
<hkaiser>
use a barrier if you need to synchronize between several threads
<john98zakaria[m]>
And then I need to reallocate it
<hkaiser>
john98zakaria[m]: true
<hkaiser>
if everything is on one locality only you can pass a reference to your data
<john98zakaria[m]>
That's why I'll rebuild my own one message zero copy channel
<john98zakaria[m]>
hkaiser: It's distributed
<hkaiser>
we also have the serialize_buffer, that pass references locally and copies remotely
<john98zakaria[m]>
hkaiser: But then the receiver needs to allocate new memory each time
<hkaiser>
essentially an array wrapper that manages ownership properly depending on whether it is sent locally or remotely
<hkaiser>
it needs to allocate only in the remote case
<hkaiser>
but I see what you're saying, you want to put the data into an existing receive buffer
<john98zakaria[m]>
hkaiser: Which is exactly what I am doing
<john98zakaria[m]>
Exactly
<hkaiser>
that will work only if the sender has some kind of handle that identifies the receive buffer
<hkaiser>
John Biddiscombe (not here right now was working on integrating rdma with the network layer such that it places the received data directly where it should go
<john98zakaria[m]>
My plan was to make 2 zero copy servers, each on a different locality.
<john98zakaria[m]>
Each locality can write in its own server.
<john98zakaria[m]>
The other uses its serialize buffer to grab the data from the remote locality
<hkaiser>
and he wanted to use the channel API to hide all of this from the user
<john98zakaria[m]>
That's exactly what I am looking for 😍
<hkaiser>
if you really want to achieve zero-copy on the receiving end you'll need to drill a hole into the parcelport API or talk directly to the network
<john98zakaria[m]>
I don't think I am that capable in c++ yet 😅
<hkaiser>
now that I think about it, we might actually be able to do true zero copy without too many changes, just by using special types that have custom serialization support
<hkaiser>
well, maybe not - the receiver still would need to allocate the buffer were the network puts the data
<john98zakaria[m]>
If we have a way to "inject" the allocator, then it would work.
<hkaiser>
serialize_buffer supports that, you're right
<hkaiser>
and yes, the zerocopy_rdma example demostrates that - I had completely forgotten about it
<john98zakaria[m]>
hkaiser: I imagine the following
<john98zakaria[m]>
Each have to allocate memory on channel registration where they want their data to be put .
<john98zakaria[m]>
If locality a sends a message larger than the buffer of b, a resize is triggered, otherwise the reception will happen copy free.
<john98zakaria[m]>
That's how I would build my thing.
<john98zakaria[m]>
I will unfortunately have to do 2 round trips for that, but it's still better that allocating hundreds of mbs
K-ballo1 has joined #ste||ar
K-ballo has quit [Ping timeout: 248 seconds]
K-ballo1 is now known as K-ballo
<hkaiser>
john98zakaria[m]: if you do towo roundtrips, then you can use the first to request an allocator that can be used with the second roundtrip to identify the receive buffer