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

Release the limit of objects number #48

Open
Dongxueyang opened this issue Jan 26, 2019 · 4 comments
Open

Release the limit of objects number #48

Dongxueyang opened this issue Jan 26, 2019 · 4 comments

Comments

@Dongxueyang
Copy link

Hi guys:
Now the number of objects we can generate in our model is limted, which make it impossible to simulate a large scale model. So if you have some good idea for releasing the limit, you can make a comment any time.
All regards
Dongxueyang

@Dongxueyang
Copy link
Author

@Oblomov
I have tried modifying the MAX_BODIES in src/particledefine.h.
I set the MAX_BODIES to 517 and generate 517 spheres in a model by add_sphere() function.
The simulation can be run.
But when I set MAX_BODIES to 518 and gengerate 518 spheres (objects), I failed and the simulation can not be run.

@Oblomov
Copy link
Contributor

Oblomov commented Mar 1, 2019

@Dongxueyang

currently the device reserves space in constant memory to keep track of the rigid body properties. Constant memory regions are limited to 64KiB in size, which is why you cannot increase the limit that much.

@Dongxueyang
Copy link
Author

@Oblomov
I agree with you. And now I want to have a try to make some improvement, but where can I start from?
Is it possoble to change the place where store the rigid body properties?

Best wishes

@Oblomov
Copy link
Contributor

Oblomov commented Mar 2, 2019

To work around this limitation, object properties should be stored in buffers like just everything else. You would have to define new buffers (in src/define_buffers.h), determine when they are allocated (at this point, you can probably use the buffer mechanism both on host and on device), and then adapt the various setrb* functions to operate on the buffers instead of the constant-memory symbols.

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