[Yt-dev] OpenMP HOP

Matthew Turk matthewturk at gmail.com
Fri May 8 14:05:24 PDT 2009


There has been quite a bit of discussion of using OpenMP applications
inside python extensions, mostly on the numpy mailing list.  You
should be able to modify the yt/lagos/hop/setup.py file to set up the
compiler options as necessary.  Using a conditional you can modify the
Extension options.  The options are described in both the distutils
and numpy.distutils documentation.

-Matt

On Fri, May 8, 2009 at 2:01 PM, Stephen Skory <stephenskory at yahoo.com> wrote:
>
> Hi y'all,
>
> I've spent the morning trying to merge the copy of OpenMP HOP I have with the version in trunk. Although HOP is not the bottleneck when running it, OpenMP HOP does have a concrete speedup, at 8 processors it's better than 5x faster. I wrapped everything in #ifdefs OPENMP and it runs identically as before if it's not turned on. With OpenMP turned on, it compiles, but it gives me this error when I run it on Ranger:
>
>    from yt.mods import *
>  File "/share/home/00649/tg457850/yt/lib/python2.6/site-packages/yt-1.5dev-py2.6-linux-x86_64.egg/yt/mods.py", line 32, in <module>
>    import yt.lagos as lagos
>  File "/share/home/00649/tg457850/yt/lib/python2.6/site-packages/yt-1.5dev-py2.6-linux-x86_64.egg/yt/lagos/__init__.py", line 105, in <module>
>    from HaloFinding import *
>  File "/share/home/00649/tg457850/yt/lib/python2.6/site-packages/yt-1.5dev-py2.6-linux-x86_64.egg/yt/lagos/HaloFinding.py", line 29, in <module>
>    from yt.lagos.hop.EnzoHop import RunHOP
>  File "/share/home/00649/tg457850/yt/lib/python2.6/site-packages/yt-1.5dev-py2.6-linux-x86_64.egg/yt/lagos/hop/__init__.py", line 3, in <module>
>    from EnzoHop import *
> ImportError: /share/home/00649/tg457850/yt/lib/python2.6/site-packages/yt-1.5dev-py2.6-linux-x86_64.egg/yt/lagos/hop/EnzoHop.so: undefined symbol: omp_unset_lock
>
> I'm using gcc, and the relavent flags are "-fopenmp -DOPENMP". There are other omp calls that it isn't complaining about. I'm wondering if any of you have any thoughts. There's the very real chance this won't work, I can find nothing of substance online about doing this kind of thing.
>
>
> Thanks!
>
> _______________________________________________________
> sskory at physics.ucsd.edu           o__  Stephen Skory
> http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student
> ________________________________(_)_\(_)_______________
>
> _______________________________________________
> Yt-dev mailing list
> Yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>



More information about the yt-dev mailing list