Skip to content

buffering updates to ygm::container types #117

@bwpriest

Description

@bwpriest

I am working with a usecase where I am creating a ygm container, e.g. ygm::container::map<std::size_t, std::vector<float>>, from a series of updates to the container. I might have many updates that affect the same key-value pair, which take the form of creating an std::vector<float> and adding it element-wise to the stored key-vector. I tried naïvely implementing this workflow using a separate message for each update, but this actually scales very poorly as the number of keys gets large. I found that buffering the updates locally to an std::unordered_map<std::size_t, std::vector<float>> and only sending one off-rank message per off-rank key resulted in much better scaling.

Would it be worthwhile for us to consider adding an async_buffered_visit method to our key-value store containers, such as ygm::container::map, and ygm::container::array? Such a method could be patterned off of async_visit while accepting an additional lambda function that "combines" two visits to the same key. It might be challenging to do this in a fully general way, however.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions