[SciPy-User] swig and OpenMP
Fri Feb 12 03:41:35 CST 2010
Sorry for being a bit off-topic, but I thought somebody here might have
the relevant info for me.
A while ago I already asked about integrating OpenMP-code in C/C++-code
to be wrapped for python on the swig mailing list. Unfortunately nobody
there knew an answer to my problem.
Please find a minimal example in this pastebin:
pi_test.h : http://paste.pocoo.org/show/174174/
and my setup.py: http://paste.pocoo.org/show/175890/
When I do
$ python setup.py build
I get no compiler warnings or error - except for the unused variables.
But when importing the module I get this as a Traceback:
ImportError: ./pi_test.so: undefined symbol: GOMP_parallel_end
So, apparently OpenMP did not make it correctly into the wrapped code.
Any pointers for me? What's going wrong here?
Does anyone know a working example for OpenMP-code with SWIG (or
For the record: I'm using python 2.6.4, swig 1.3.36, and gcc 4.4.1.
More information about the SciPy-User