-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented custom byte_vector for local storage #245
Conversation
…com/ryan-dozier/ygm into feature-vector-irecv
include/ygm/io/detail/csv.hpp
Outdated
@@ -18,6 +18,7 @@ class csv_field { | |||
|
|||
bool is_integer() const { | |||
int64_t test; | |||
std::cout << m_f << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a debugging statement was left in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, removed
include/ygm/detail/comm.ipp
Outdated
} | ||
|
||
if constexpr (!std::is_empty<Lambda>::value) { | ||
// oarchive.saveBinary(&l, sizeof(Lambda)); | ||
size_t size_before = packed.size(); | ||
packed.resize(size_before + sizeof(Lambda)); | ||
std::memcpy(packed.data() + size_before, &l, sizeof(Lambda)); | ||
//packed.push_bytes(&l, sizeof(lambda)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this line replace the lines above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there was a typo here having lambda instead of Lambda that I forgot to return to and fix.
} | ||
|
||
void reserve(size_t cap) { | ||
size_t new_capacity = get_page_aligned_size(cap); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be worth implementing an exponentially growing size to get the number of calls to mremap
to be logarithmic in the buffer size rather than linear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be experimented with before implementing.
…ter test coverage to the test_byte_vector
… 'ygm/v0.7-dev' into feature-vector-irecv
Merging this in after seeing results of scaling out to 128 nodes. |
This work aims unify YGM send and recv buffers to the same data type. Previously we were using both
std::vector<std::byte>
andstd::array<std::byte>
. The goal is to create a sparse, dynamically resizable array. This is needed when many YGM communicators are spawned. This is to avoid fully allocating each of the overly large recv buffers until they are utilized (an issue we found with std::vector).I tried to emulate most of the common std::vector API functions we were using, we should be able to add additional functionality on top of this approach when needed.
I did include a simple test file for CI and unit tests, it may not be fully exhaustive, so reviewing would be good.