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

Index exceeds size of array in gpukernelcore_p4.cu? #2

Open
helange23 opened this issue Jul 9, 2020 · 2 comments
Open

Index exceeds size of array in gpukernelcore_p4.cu? #2

helange23 opened this issue Jul 9, 2020 · 2 comments

Comments

@helange23
Copy link

I am trying to build a pytorch interface based on this implementation and might have found a possible bug?

Note that in order to get the code to work 10 years after it has been written, I have changed some things but mostly only removed the SDK dependent checks but most of the remaining code remains the same.

I have encountered the following problem:

In the function m2l_kernel (line 322) a variable "jnk" is declared on line 429.
jnk=(j+n)*(j+n)+j+n;

jnk is used to access an array of size numExpansion2 (10**2) but jnk oftentimes exceeds 100 which results in an illegal memory access.

Is this a bug or am I doing something wrong?

@rioyokota
Copy link

rioyokota commented Jul 9, 2020

I really don't remember, but I guess numExpansion2 should be 4 * numExpansion * numExpansion.
What exactly are you trying to do in PyTorch with FMM?

@zjin-lcf
Copy link

zjin-lcf commented May 1, 2022

Thank you for fixing the issues.

N = 100000 (iteration = 8)
level : 3
Cuda failure gpukernel_p3.cu:1419: 'an illegal memory access was encountered'

N = 100000 (iteration = 8)
level : 3
Cuda failure gpukernel_p4.cu:733: 'an illegal memory access was encountered'

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

3 participants