warp icon indicating copy to clipboard operation
warp copied to clipboard

[QUESTION] Very high memory usage in warp.sim.ModelBuilder.finalize()

Open knauth opened this issue 8 months ago • 6 comments

I'm running a simulation which involves thousands of bodies interacting. Each body has ~20 collision spheres. I can add these, albeit slowly, using add_body and add_shape_sphere. However, when calling builder.finalize(), memory usage is untenably high; more than 150 GB for ~2k bodies. I think this is because the list of contact pairs is very long.

Is there a way to optimize finalize() to avoid this quadratic growth? In libraries like Chrono the contact pairs are trimmed intelligently, does warp have similar features? I really like the syntax, docs, and native GPU support Warp provides, so it'd be great to be able to perform many-body sims efficiently.

knauth avatar Jun 19 '24 00:06 knauth