FLEX random gravity "bug"

Hello, I’m using NVIDIA FLEX library for soft body simulation(shape-matching / clusters) and when my program start, i can get, randomly, strange simulation behavior, looks like, gravity become to hard (about twice). All solver params and update subSteps are the same and not changed anywhere. This bug become randomly: some times simulation work fine (work as how it is configured), but some times, i think, with extra gravity. Periodicity of this is very randomly but I noticed that this “bug” more often occurs on more powerful graphics cards: I tested it at
GTX 660: “Bug” will appear about 1 times per 50 tets
GTX 980: 1 per 10-20 tests
GTX 1060: 50/50
I don’t know how to fix it and why/from what/where it comes. I have a suggestion that this may be due with cuda context because i also use some physx library that is is written and based at physX 2.8.3 version and also work at gpu. PhysX initialized before flex. is there a problem with that?
When i initialize flex there is no errors (i init whit deviceIndex=-1 at flexInit() method).
All solver parametrs, particles, rigids and othes params are the same with bug or not. I use just one solver. At NVIDIA panel PhysX settings set to “auto” and choosed video card. I use FLEX version 1.0.0(32-bit) at 64 bit version Windows 10 pro. Video driver version: 361.43.

The problem I have posted several days ago https://devtalk.nvidia.com/default/topic/977901/physx-and-physics-modeling/problems-positioning-rigid-flex-objects-/ could share the same error with the gravity than yours. I implemented a “particle-shape” wich was positioned some meters above the ground. When I start the simulation everything is ok and the shape drops, however depending on the shape position the movement is not right and the particle-shape moves in every direction. I think the problem should be caused by the gravity. I did some tests that prove this error (See my post).

I would very much appreciate if someone can give us some hints about how to resolve this problem.


Most likely it is connected with particle velocity. And why there are lines in the flex samples code?:
This lines are not working in default, g_warmup = false;
Can someone from the flex dev team answer/explain why these lines were in samles code or say about some velocity/gravity strange behavior?