-
Notifications
You must be signed in to change notification settings - Fork 407
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 pool aborts on zero allocation request, returns NULL for < minimum #939
Comments
@kyungjoo-kim I think what is happening here is your are asking for an allocation that is smaller than the minimum allocation size that you gave to the memory pool constructor, which is not allowed. Can you confirm what is the minimum allocation size passed to the constructor? |
@kyungjoo-kim also wrote in #786 Another bug... When it has 0 allocation, it aborts (it should return a NULL).
I believe this is the same problem, unless you passed in zero as the minimum allocation size to the memory pool constructor. |
|
@ibaned the minimum block size that I set in the constructor is "1". If it is modified, it is modified in kokkos. The minimum allocation size does not matter as far as I know. If the requested memory size is small, it should return it from the smallest block size. |
Hmm okay I thought previously it did matter and was a hard limit (seems like this is true due to the bug report), but as @hcedwar pointed out we can move to a more relaxed behavior where it chooses the smallest block size. We also need to document the behavior more clearly. |
So, this means that I can bypass the allocation failure of smallest block size with
Correct ? |
I think thats true... until we change the code to do this internally. |
Unfortunately no. If superblocks are all used by larger-than-minimum block size then the allocation will currently fail due to not searching. |
That sounds like a bug as well... worst case it could prevent any allocations smaller than the maximum value. |
I tested and it does not work. I query the min block size and it remains "1".
|
OK - let's call both of these cases functionality bugs that require enhancing implementation to fix. |
|
Another feature request. I have a situation that I repeatedly solve a problem with the same symbolic structure. I roughly allocate memory pool with loose estimation of tasks and memory requirement. Can I get some useful information from scheduler or memory pool ? so that in the next iteration, I can set more tight (optimal) bound of my memory pool. |
@kyungjoo-kim
Will fill the |
Thanks. I will try and test 'task-dag' branch. |
soon we also need to merge the branch to master and snapshotted to trilinos so that sierra can see the code fix. |
Moving this out of #786 for @kyungjoo-kim.
He wrote:
there is a bug in memory pool. The following is the error message. The code requested 9480 and the pool clearly has enough space but it returns a NULL pointer.
The text was updated successfully, but these errors were encountered: