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

Memory Issues (BTB) #4

Open
AerysL opened this issue Sep 1, 2021 · 1 comment
Open

Memory Issues (BTB) #4

AerysL opened this issue Sep 1, 2021 · 1 comment

Comments

@AerysL
Copy link
Collaborator

AerysL commented Sep 1, 2021

Running the example_BTB.exe example reveals a number of memory issues

mpirun -np 4 valgrind --track-origins=yes --leak-check=full ./example_BTB.exe 10 10 10 0 0 1 10 2>&1 | tee CA3DMM_BTB_Mem.txt

Some of the errors seem to be because buffers of size (max_MAT_blk_size) are alloc'd, and the entire buffer is sent during the send, so if the buffer isn't entirely filled, uninitialized values can get sent.

https://github.com/huanghua1994/CA3DMM/blob/912005261c8dc5c6aa70b9749f9bb6d70c23f518/src/cannon.c#L91
https://github.com/huanghua1994/CA3DMM/blob/912005261c8dc5c6aa70b9749f9bb6d70c23f518/src/cannon.c#L116
https://github.com/huanghua1994/CA3DMM/blob/912005261c8dc5c6aa70b9749f9bb6d70c23f518/src/cannon.c#L268
CA3DMM_BTB_Mem.txt

@huanghua1994
Copy link
Collaborator

Sending max_A_blk_size is for convenience, so the code does not need to calculate the sizes for both the sender and the receiver. The receiver knows the correct size to use.

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

No branches or pull requests

2 participants