So, I am considering to make a C extension of a python component that I’ve got. Then, I thought of using OMP to take as much advantage as I can from the machines that will, eventually, run the combined solution of Python+C.
Has anyone tried something similar at all? Are there any particular, unpropitious, details than could make such a solution fail?
Thanks in advance!
I have done this successfully for large data mining tasks in radio astronomy. See https://github.com/ewanbarr/sigpyproc.git for an example.
The thing to note is that the C libraries I built in these cases are accessed via ctypes and not as native Python extensions.
So, for example:
Python: test.py
C: test.c
Compile:
To answer your question, I have had no problems with this kind of setup and the speed improvements achievable have been impressive (although the above example wouldn’t really benefit from OMP)