[Yt-dev] OpenMP HOP

Matthew Turk matthewturk at gmail.com
Fri May 8 16:11:09 PDT 2009


Hi Stephen,

-DOPENMP should not be in the extra_args.  It should be:

define_macros=[("OPENMP",True)],

Furthermore, are you sure you need to wrap OpenMP stuff in #defines?
Pragmas should pass through the preprocessor without any adjustment.

As for the linkage issues, I'd say play with the output of ldd.  Do
you need to explicitly add "gomp" to the libraries, or is GCC supposed
to handle that itself?

-Matt

On Fri, May 8, 2009 at 4:08 PM, Stephen Skory <stephenskory at yahoo.com> wrote:
>
> Matt,
>
>>  You
>> should be able to modify the yt/lagos/hop/setup.py file to set up the
>> compiler options as necessary.
>
> That's actually not my problem right now. I have distutils building with the needed flags. I think I'm missing something else. Here's what I have right now:
>
>    config.add_extension("EnzoHop", sources=
>                                    ["EnzoHop.c",
>                                     "hop_hop.c",
>                                     "hop_kd.c",
>                                     "hop_regroup.c",
>                                     "hop_slice.c",
>                                     "hop_smooth.c",
>                                     "para_median.c",],
>                                     libraries=["m"],
>                                     extra_compile_args=["-fopenmp -DOPENMP"],)
>
> If I add "gomp" to libraries, instead of the omp_unset_lock error, I get:
>
> libgomp.so.1: cannot open shared object file: No such file or directory
>
> That file is in /usr/lib which is in my LD_LIBRARY_PATH (I'm running on a login node).
>
> I searched the numpy discussion list and all I can find about OpenMP are messsage threads on whether or not to use OMP, not how to build modules.
>
>  _______________________________________________________
> 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