Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo User (http://www.linux-archive.org/gentoo-user/)
-   -   openmp flag (http://www.linux-archive.org/gentoo-user/707250-openmp-flag.html)

James 09-25-2012 02:42 PM

openmp flag
 
Hello,

background:
It seems there is a major push now to put openmp:
[1,2] into embedded systems [3].

So I looked at these [4] packages to find something
interesting to look deeper into related to openMP.

Blender immediately jumped out at me as a good example,
cause an old friend Ken Hughes is, imho, one of the
world's most amazing C programmers, and a stalwart at
the blender project.


OK, here's the question, I went to emerge blender
and found that the openmp flag is already set. {?}
Yet I looked everywhere and did not see the openmp flag
set (/etc/make.conf, /etc/portage/package.use)
so where is it getting set on my AMD workstation?

[ebuild N ] media-gfx/blender-2.49b-r2 USE="ffmpeg
nls ogg openmp -blender-game -openal -verse"

I feel like I should know (profiles etc) but, I'm a little
bit brain_dead this am, so any help is appreciated.

OH, anyone is encouraged to "chime in" about openmp
and your thoughts as to it's viability and usefulness.
Do you believe it will become a core technology,
embedded into GCC? Used widely?

James

[1] http://www.open-mpi.org/

[2] http://gcc.gnu.org/wiki/openmp

[3]
http://www.embedded.com/design/programming-languages-and-tools/4396218/What-the-new-OpenMP-standard-brings-to-embedded-multicore-software-design?cid=Newsletter+-+Whats+New+on+Embedded.com

[4] http://gentoobrowse.randomdan.homeip.net/use/openmp

Michael Mol 09-25-2012 03:01 PM

openmp flag
 
On Tue, Sep 25, 2012 at 10:42 AM, James <wireless@tampabay.rr.com> wrote:
> Hello,
>
> background:
> It seems there is a major push now to put openmp:
> [1,2] into embedded systems [3].
>
> So I looked at these [4] packages to find something
> interesting to look deeper into related to openMP.
>
> Blender immediately jumped out at me as a good example,
> cause an old friend Ken Hughes is, imho, one of the
> world's most amazing C programmers, and a stalwart at
> the blender project.
>
>
> OK, here's the question, I went to emerge blender
> and found that the openmp flag is already set. {?}
> Yet I looked everywhere and did not see the openmp flag
> set (/etc/make.conf, /etc/portage/package.use)
> so where is it getting set on my AMD workstation?
>
> [ebuild N ] media-gfx/blender-2.49b-r2 USE="ffmpeg
> nls ogg openmp -blender-game -openal -verse"
>
> I feel like I should know (profiles etc) but, I'm a little
> bit brain_dead this am, so any help is appreciated.

Packages can choose to have USE flags enabled or disabled for them by
default. So blender likely has openmp enabled by default, without that
affecting any other packages.

>
> OH, anyone is encouraged to "chime in" about openmp
> and your thoughts as to it's viability and usefulness.
> Do you believe it will become a core technology,
> embedded into GCC? Used widely?

If you can use it, use it. OpenMP is little more than a set of
extensions to C (and C++) which allows the normally-scalar language to
do some things in a parallel fashion without resorting to the costs of
multithreading. This is good, because vector instructions have been
available in x86 since MMX came out, and improvements to the vector
instructions available to x86 still goes on.

Related are CUDA and OpenCL, which are two other systems for
parallelizing code. CUDA assumes you have access to an nVidia GPU (and
have a CUDA-enabled driver installed). OpenCL is a big more generic,
and supports dispatching to CUDA, CPU vector instructions or even
thread pools.

Personally, my recommendation is to enable everything you can get
working (be it, OpenMP, CUDA or OpenCL); vector processing is going to
be generally more efficient than scalar processing. You don't need to
worry about which is better unless you're a software developer. (And
if you're a software developer, go study up on their differences;
tradeoffs happen.)

--
:wq


All times are GMT. The time now is 12:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.