OpenMP InsertionSortCollider and 0 verletDist
There is this line if (chunksVerlet <= 0) LOG_ERROR("Parallel insertion sort needs verletDist>0"); // chunksVerlet = 4 * verletDist
which suggests OpenMP execution of isCollider with a 0 verletDist is impossible/to be avoided.
I'm saving here Bruno's (@bchareyre) thoughts that have been exposed elsewhere:
I suspect it would work to just remove the LOG_ERROR but I'll have to check. If it doesn't, it'll make more sense to fall back to non-parallel here.
Second thought: it would be simple to run insertionSortParallel for verlet=0 too. But it is even simpler to fall back to insertionSort.
The thing is using verlet=0 with
yade -jN
is a deliberate choice of collider inefficiency, so I guess it doesn't matter if the sort is parallel or not. I'll then fix with fallback.I tried to trigger [1] with -j3 and verlet=0 in the triaxial preprocessor but it didn't show any problem. Do you have an exampleof how to reproduce this LOG_ERROR?
[1] https://gitlab.com/yade-dev/trunk/-/blob/2020.01a/pkg/common/InsertionSortCollider.cpp#L472
No, no example to provide at the moment, I'll see if it can change in the future.. Please allow a couple of months before closing...