Indexing error when using CUDA arrays for custom Lagrangian particles #4682
Unanswered
sebasti4nmc
asked this question in
Computational science!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, this is related to the same simulation I'm working on with @amrapallig that I was running on my previous discussion post (#4655), implementing Lagrangian particles with interpolated temp/velocity fields. I was successfully able to run the code on my CPU without any issues using StructArrays.
I am now currently trying to run my code at higher resolution using an NVIDIA A100 GPU. So far, I have been able to run my simulation with particles without any custom properties or field tracking. However, when I try to use my custom particle StructArrays, I run into errors when I try to use CudaArrays. Specifically, I get a "scalar indexing disallowed error" when I try to store CudaArrays in my StructArrays, even though I am using @allowscalar in my global scope. I have also tried directly passing a StructArray with CPU arrays to LagrangianParticles(), but then I get an error in my model constructor because the arrays aren't isbits.
Any idea how to fix this? Is there a more suitable approach/command for handling this on GPU? Here is my current code:
Let me know if you have any solutions.
Beta Was this translation helpful? Give feedback.
All reactions