1 |
On Tue, Sep 25, 2012 at 10:42 AM, James <wireless@×××××××××××.com> wrote: |
2 |
> Hello, |
3 |
> |
4 |
> background: |
5 |
> It seems there is a major push now to put openmp: |
6 |
> [1,2] into embedded systems [3]. |
7 |
> |
8 |
> So I looked at these [4] packages to find something |
9 |
> interesting to look deeper into related to openMP. |
10 |
> |
11 |
> Blender immediately jumped out at me as a good example, |
12 |
> cause an old friend Ken Hughes is, imho, one of the |
13 |
> world's most amazing C programmers, and a stalwart at |
14 |
> the blender project. |
15 |
> |
16 |
> |
17 |
> OK, here's the question, I went to emerge blender |
18 |
> and found that the openmp flag is already set. {?} |
19 |
> Yet I looked everywhere and did not see the openmp flag |
20 |
> set (/etc/make.conf, /etc/portage/package.use) |
21 |
> so where is it getting set on my AMD workstation? |
22 |
> |
23 |
> [ebuild N ] media-gfx/blender-2.49b-r2 USE="ffmpeg |
24 |
> nls ogg openmp -blender-game -openal -verse" |
25 |
> |
26 |
> I feel like I should know (profiles etc) but, I'm a little |
27 |
> bit brain_dead this am, so any help is appreciated. |
28 |
|
29 |
Packages can choose to have USE flags enabled or disabled for them by |
30 |
default. So blender likely has openmp enabled by default, without that |
31 |
affecting any other packages. |
32 |
|
33 |
> |
34 |
> OH, anyone is encouraged to "chime in" about openmp |
35 |
> and your thoughts as to it's viability and usefulness. |
36 |
> Do you believe it will become a core technology, |
37 |
> embedded into GCC? Used widely? |
38 |
|
39 |
If you can use it, use it. OpenMP is little more than a set of |
40 |
extensions to C (and C++) which allows the normally-scalar language to |
41 |
do some things in a parallel fashion without resorting to the costs of |
42 |
multithreading. This is good, because vector instructions have been |
43 |
available in x86 since MMX came out, and improvements to the vector |
44 |
instructions available to x86 still goes on. |
45 |
|
46 |
Related are CUDA and OpenCL, which are two other systems for |
47 |
parallelizing code. CUDA assumes you have access to an nVidia GPU (and |
48 |
have a CUDA-enabled driver installed). OpenCL is a big more generic, |
49 |
and supports dispatching to CUDA, CPU vector instructions or even |
50 |
thread pools. |
51 |
|
52 |
Personally, my recommendation is to enable everything you can get |
53 |
working (be it, OpenMP, CUDA or OpenCL); vector processing is going to |
54 |
be generally more efficient than scalar processing. You don't need to |
55 |
worry about which is better unless you're a software developer. (And |
56 |
if you're a software developer, go study up on their differences; |
57 |
tradeoffs happen.) |
58 |
|
59 |
-- |
60 |
:wq |