New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline::C and openmp #47
Comments
Normally you'd use (I think) |
I didn't use CFLAGS because it reports some error : 'CFLAGS' is not a valid config option for Inline::C use Inline C => Config => CCFLAGS => '-fopenmp', BUILD_NOISY => 1, LIBS => '-lgomp'; mandel(-2.0, 1.0, 256, -1.0, 1.0, 256, 100000); Now when I am testing the program (time ./perl mandelbrot_inline.pl) and I print the threads or use top to see how many threads are used I get only one thread. I tried to do |
Could you try going into the build directory and modifying the |
There is nothing in the _Inline/build directory, here is nevertheless the output of the compilation stage: Starting Build Compile Stage Starting "make" Stage chmod 755 blib/arch/auto/mandelbrot_inline_pl_8320/mandelbrot_inline_pl_8320.so Starting "make install" Stage Starting Cleaning Up Stage Finished Build Compile Stage |
Thanks. You'll need to specify This:
shows that |
Thank you very much for your help, I will continue to search for a solution ;-) I will post it here if I can find |
So I have tried the following solutions with OpenMP :
|
It seems I finally found the reason it is not working. I have by default a clang compiler installed and Inline::C is using it instead of gcc. So I have added in the configuration :
use Inline C => Config => CC => '/usr/bin/gcc', ...
and it works now ! |
Hi everybody,
I am new to perl and inline::C, anyway I could write some program to compute Mandelbrot set using a C function called from perl.
I would like to know if it is possible to compile this code with OpenMP ? I have tried to add this to the config section like
use Inline C => config => CCFLAGSEX => '-fopenmp';
but it does not seem to be taken into account when compiling.
So my question : is it possible and how to do it ?
Thank you for your help.
The text was updated successfully, but these errors were encountered: