octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Enabling OpenMP by default


From: Júlio Hoffimann
Subject: Enabling OpenMP by default
Date: Sun, 10 Mar 2013 17:50:05 -0300

Dear all,

Any complaints about enabling OpenMP by default? The current source tree is free of associated #pragma directives.

I'm trying to add some (very local) parallel regions to see if we gain any burst in performance. The first patch is almost done and it raises a question on warning handling i've asked John and Jordi for their opinion:

For every occurrence (239 so far) of a parallel region we ideally want the pragma to be wrapped by a #ifdef directive (e.g. #if defined(_OPENMP) ... #endif), but this would cause an unacceptable decrease in readability since 239*3 = 717 new lines of boilerplate. The number of regions is that high because the array classes don't satisfy the DRY principle, and probably can't.

OpenMP pragmas are simply ignored by the compiler when the `-fopenmp' flag is omitted and the code remains as if untouched. The only consequence is a warning (e.g. warning: ignored #pragma omp). If we enable OpenMP by default, people won't see these warnings unless they explicitly disable the flag through configure similar to what is done today (i.e. --enable-openmp).

Is it okay?

Best,
Júlio.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]