Skip to content

Fix single far nondeterminism

@andrewmichael.gozzard found an issue with our python and C memory interop.

When python postcoh_finalsink receives a buffer, it runs from_buffer in _postcohtable.c. That copies the buffer's triggers into new blocks of memory. Following Tom's changes, it also creates a bunch of NumPy arrays per IFO, to store values like far_sngl. However, these NumPy arrays were backed by buffer's memory, rather than the new memory block.

In addition to that, we had 2 ways of accessing the elements of far_sngl in finalsink. 1st, using the array itself, which jumped straight to the buffer's memory. 2nd, using getter/setter methods created per IFO in _postcohtable, such as far_sngl_H1, which used the new memory block.

That issue was fixed by backing the NumPy arrays onto the new memory blocks.

Finally, far_sngl could be redefined in python as we never wrote getter/setter methods for the array itself. So we added the READONLY flag.

Edited by Timothy Davies

Merge request reports

Loading