All of lore.kernel.org
 help / color / mirror / Atom feed
* Building with OpenMP support in OE fails on #include <omp.h>
@ 2015-03-02 14:54 Mike Looijmans
  2015-03-02 15:45 ` Paul Eggleton
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Looijmans @ 2015-03-02 14:54 UTC (permalink / raw)
  To: OE Core mailing list

Here's the problem, running in a devshell:

# echo '#include <omp.h>' > /tmp/compileme.c
# $CC -c -fopenmp /tmp/compileme.c
/tmp/compileme.c:1:17: fatal error: omp.h: No such file or directory
  #include <omp.h>
                  ^
compilation terminated.


The #pragma's and linking of OpenMP work just fine, it's just the inclusion of 
omp.h that appears to fail.

What I was actually trying to do is to activate OpenMP in OpenCV to get decent 
performance on a multicore ARM system. But this is holding me back now.

Looking in the sysroots reveals that the include file is actually there:

$ find tmp-glibc/sysroots/topic-miami-florida-med-xc7z030 -name omp.h
tmp-glibc/sysroots/topic-miami-florida-med-xc7z030/usr/lib/gcc/arm-oe-linux-gnueabi/4.9.1/include/omp.h


Maybe something missing in the OE compiler options for the compiler?


Met vriendelijke groet / kind regards,

Mike Looijmans
System Expert


TOPIC Embedded Systems
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: (+31) (0) 499 33 69 79
Telefax:  (+31) (0) 499 33 69 70
E-mail: mike.looijmans@topic.nl
Website: www.topic.nl

Please consider the environment before printing this e-mail

Topic zoekt gedreven (embedded) software specialisten!
http://topic.nl/vacatures/topic-zoekt-software-engineers/



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Building with OpenMP support in OE fails on #include <omp.h>
  2015-03-02 14:54 Building with OpenMP support in OE fails on #include <omp.h> Mike Looijmans
@ 2015-03-02 15:45 ` Paul Eggleton
  2015-03-02 17:31   ` Mike Looijmans
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggleton @ 2015-03-02 15:45 UTC (permalink / raw)
  To: Mike Looijmans; +Cc: openembedded-core

Hi Mike,

On Monday 02 March 2015 15:54:04 Mike Looijmans wrote:
> Here's the problem, running in a devshell:
> 
> # echo '#include <omp.h>' > /tmp/compileme.c
> # $CC -c -fopenmp /tmp/compileme.c
> /tmp/compileme.c:1:17: fatal error: omp.h: No such file or directory
>   #include <omp.h>
>                   ^
> compilation terminated.
> 
> 
> The #pragma's and linking of OpenMP work just fine, it's just the inclusion
> of omp.h that appears to fail.
> 
> What I was actually trying to do is to activate OpenMP in OpenCV to get
> decent performance on a multicore ARM system. But this is holding me back
> now.
> 
> Looking in the sysroots reveals that the include file is actually there:
> 
> $ find tmp-glibc/sysroots/topic-miami-florida-med-xc7z030 -name omp.h
> tmp-glibc/sysroots/topic-miami-florida-med-xc7z030/usr/lib/gcc/arm-oe-linux-
> gnueabi/4.9.1/include/omp.h

Funnily enough this is an issue I fixed a few weeks ago - here's the bug which 
contains a link to the fix:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=7141

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Building with OpenMP support in OE fails on #include <omp.h>
  2015-03-02 15:45 ` Paul Eggleton
@ 2015-03-02 17:31   ` Mike Looijmans
  2015-03-05 10:32     ` Mike Looijmans
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Looijmans @ 2015-03-02 17:31 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On 02-03-15 16:45, Paul Eggleton wrote:
> Hi Mike,
>
> On Monday 02 March 2015 15:54:04 Mike Looijmans wrote:
>> Here's the problem, running in a devshell:
>>
>> # echo '#include <omp.h>' > /tmp/compileme.c
>> # $CC -c -fopenmp /tmp/compileme.c
>> /tmp/compileme.c:1:17: fatal error: omp.h: No such file or directory
>>    #include <omp.h>
>>                    ^
>> compilation terminated.
>>
>>
>> The #pragma's and linking of OpenMP work just fine, it's just the inclusion
>> of omp.h that appears to fail.
>>
>> What I was actually trying to do is to activate OpenMP in OpenCV to get
>> decent performance on a multicore ARM system. But this is holding me back
>> now.
>>
>> Looking in the sysroots reveals that the include file is actually there:
>>
>> $ find tmp-glibc/sysroots/topic-miami-florida-med-xc7z030 -name omp.h
>> tmp-glibc/sysroots/topic-miami-florida-med-xc7z030/usr/lib/gcc/arm-oe-linux-
>> gnueabi/4.9.1/include/omp.h
>
> Funnily enough this is an issue I fixed a few weeks ago - here's the bug which
> contains a link to the fix:
>
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=7141

Ah okay, I'll upgrade to current master and retest.

If it works, I'll post the patch to make opencv build with openmp.


-- 
Mike Looijmans


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Building with OpenMP support in OE fails on #include <omp.h>
  2015-03-02 17:31   ` Mike Looijmans
@ 2015-03-05 10:32     ` Mike Looijmans
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Looijmans @ 2015-03-05 10:32 UTC (permalink / raw)
  To: openembedded-core

On 02-03-15 18:31, Mike Looijmans wrote:
> On 02-03-15 16:45, Paul Eggleton wrote:
>> Hi Mike,
>>
>> On Monday 02 March 2015 15:54:04 Mike Looijmans wrote:
>>> Here's the problem, running in a devshell:
>>>
>>> # echo '#include <omp.h>' > /tmp/compileme.c
>>> # $CC -c -fopenmp /tmp/compileme.c
>>> /tmp/compileme.c:1:17: fatal error: omp.h: No such file or directory
>>>    #include <omp.h>
>>>                    ^
>>> compilation terminated.
>>>
>>>
>>> The #pragma's and linking of OpenMP work just fine, it's just the inclusion
>>> of omp.h that appears to fail.
>>>
>>> What I was actually trying to do is to activate OpenMP in OpenCV to get
>>> decent performance on a multicore ARM system. But this is holding me back
>>> now.
>>>
>>> Looking in the sysroots reveals that the include file is actually there:
>>>
>>> $ find tmp-glibc/sysroots/topic-miami-florida-med-xc7z030 -name omp.h
>>> tmp-glibc/sysroots/topic-miami-florida-med-xc7z030/usr/lib/gcc/arm-oe-linux-
>>> gnueabi/4.9.1/include/omp.h
>>
>> Funnily enough this is an issue I fixed a few weeks ago - here's the bug which
>> contains a link to the fix:
>>
>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=7141
>
> Ah okay, I'll upgrade to current master and retest.
>
> If it works, I'll post the patch to make opencv build with openmp.

Hmm, OpenCV now builds fine with OpenMP support for my dual-core ARM system, I 
can also see that it now links to libgomp, but apparently it doesn't actually 
use any OpenMP threading, as none of the filters I've tried ever uses more 
than one thread to process the image data. So I guess actually activating 
OpenMP is just a pointless waste. But for those willing to try, just add this 
line to the opencv recipe:

EXTRA_OECMAKE += "-DWITH_OPENMP=ON"




Met vriendelijke groet / kind regards,

Mike Looijmans
System Expert


TOPIC Embedded Systems
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: (+31) (0) 499 33 69 79
Telefax:  (+31) (0) 499 33 69 70
E-mail: mike.looijmans@topic.nl
Website: www.topic.nl

Please consider the environment before printing this e-mail

Topic zoekt gedreven (embedded) software specialisten!
http://topic.nl/vacatures/topic-zoekt-software-engineers/



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-05 10:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-02 14:54 Building with OpenMP support in OE fails on #include <omp.h> Mike Looijmans
2015-03-02 15:45 ` Paul Eggleton
2015-03-02 17:31   ` Mike Looijmans
2015-03-05 10:32     ` Mike Looijmans

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.