nmoehrle / mvs-texturing

Algorithm to texture 3D reconstructions from multi-view stereo images
Other
974 stars 334 forks source link

Add num_threads flag to allow deterministic computation. #132

Closed chpatrick closed 4 years ago

chpatrick commented 4 years ago

It seems like the only way to get bit-identical output is to disable multithreading. This PR adds a command-line flag to set the number of threads for both OpenMP and TBB.

nh2 commented 4 years ago

Would very much appreciate this being upstreamed.

CI failure seems unrelated:

/tmp/ccilBvEP.s: Assembler messages:
/tmp/ccilBvEP.s:15569: Error: operand type mismatch for `vxorps'
nmoehrle commented 4 years ago

It pains me that I didn't manage to look into the cause of the undeterministic behavior. I would like to rephrase the description to clarify that setting the number of threads to one ensures deterministic behavior but that the algorithm itself is deterministic and that it is a bug in the implementation that causes the undeterministic behavior.