[Numpy-discussion] Python ctypes and OpenMP mystery
ecarlson at eng.ua.edu
Wed Feb 16 20:24:33 EST 2011
The problem appears to related to my lack of optimization in the
compilation. If I use
gcc -O3 -c my_lib.c -fPIC -fopenmp -ffast-math
the C executable and ctypes/python versions behave almost identically.
Getting decent behavior takes some thought, though, far from the
incredible almost-automatic behavior of numexpr.
Now I've got to figure out how to scale up a bunch of vector
adds/multiplies. Neither numexpr or openmp get you very far with a bunch
of "z=a*x+b*y"-type calcs.
More information about the NumPy-Discussion