Hi all, I'm curious if there would be any interest in adding support for OpenMP 4.5 array reduction in the cython compiler or alternatively detecting these cases and raising a cython compiler error.
Currently cython is generating code that will compile but might lead to race conditions. See: https://github.com/cython/cython/issues/2316 https://github.com/cython/cython/issues/1504 The trouble with fixing this in the cython compiler is that adding the appropriate OpenMP pragmas might generate code that will no longer compile on compilers that don't support OpenMP 4.5. However perhaps that's a better alternative than the status quo, which is generating code that might produce random results. I'd very much appreciate any feedback or advice here as this is currently blocking our ability to easily add OpenMP to our cython code in places where we'd like threads to do parallel reductions on large arrays. I would also not be surprised if there is code in the wild that is racy and silently producing incorrect results. -Nathan
_______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel