Skip to content
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

Fix: Allocate memory for data frame padding #154

Merged
merged 1 commit into from
Jan 17, 2023
Merged

Conversation

fknorr
Copy link
Contributor

@fknorr fknorr commented Dec 12, 2022

We send data frames in "packets" of 64 bytes (#153) to work around MPI's 32-bit-size limitation. The necessary rounding operation was only applied to the argument to MPI_Isend, but not the frame allocation. As a result, MPI overran the buffer and sometimes read from unmapped memory.

This PR moves the padding computation to the unique_frame_ptr constructor through a packet_size parameter.

@fknorr fknorr requested review from psalz and PeterTh December 12, 2022 13:10
@fknorr fknorr self-assigned this Dec 12, 2022
Copy link
Member

@psalz psalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link

@BlackMark29A BlackMark29A left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@fknorr fknorr merged commit aa724fb into master Jan 17, 2023
@PeterTh PeterTh deleted the fix-frame-alloc branch July 18, 2023 14:09
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.

3 participants