[Yt-dev] OpenMP HOP
Stephen Skory
stephenskory at yahoo.com
Fri May 8 16:21:48 PDT 2009
Matt,
> -DOPENMP should not be in the extra_args. It should be:
>
> define_macros=[("OPENMP",True)],
Thanks.
> Furthermore, are you sure you need to wrap OpenMP stuff in #defines?
> Pragmas should pass through the preprocessor without any adjustment.
The OpenMP version of HOP changes a fair bit of the code. It doesn't only put pragmas on for loops. In particular, it uses locks to parallelize the regrouping part of the code, so different threads don't write to the same part of the regroup hash table. Because I wanted to be able to switch back and forth, #ifdefs seemed like the way to go.
> 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?
If I compile a test program on the command line, 'gcc -fopenmp -o test test.c' works without -lgomp. Adding -lgomp doesn't break anything in that case. I agree that gcc is supposed to handle it itself, but the fact that the error message changes with and without it is suspicious.
_______________________________________________________
sskory at physics.ucsd.edu o__ Stephen Skory
http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student
________________________________(_)_\(_)_______________
More information about the yt-dev
mailing list