public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* OpenMP on gcc
@ 2007-03-28 19:56 Dima Sorkin
  2007-03-28 22:14 ` Ferad Zyulkyarov
  0 siblings, 1 reply; 5+ messages in thread
From: Dima Sorkin @ 2007-03-28 19:56 UTC (permalink / raw)
  To: gcc-help

Hi.
 I have some c++ code that should compile both
under GCCs (starting from gcc 3.1 to 4.0) and other
compiler. I want to insert OpenMP pragmas
into code, to optimize it.

1) Starting from which version does GCC support OpenMP ?
2) Will old versions of GCC just ignore OpenMP pragmas, or these
    will cause errors ?

Thank you.
 Dima.

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

* Re: OpenMP on gcc
  2007-03-28 19:56 OpenMP on gcc Dima Sorkin
@ 2007-03-28 22:14 ` Ferad Zyulkyarov
  2007-03-28 22:38   ` Tim Prince
  0 siblings, 1 reply; 5+ messages in thread
From: Ferad Zyulkyarov @ 2007-03-28 22:14 UTC (permalink / raw)
  To: Dima Sorkin; +Cc: gcc-help

As I know, OpenMP is being implemented since version 4.2+ But these
gcc versions does not have official release. Based on my experience, I
compiled few simple OpenMP programs in gcc and I was satisfied.

> 1) Starting from which version does GCC support OpenMP ?

As I know 4.2

> 2) Will old versions of GCC just ignore OpenMP pragmas, or these
>     will cause errors ?

Based on the pragma specification unknown pragmas are ignored. But you
have to deal with the omp_* stuff (i.e. omp_set_lock function)

Regards,
Ferad

-- 
Ferad Zyulkyarov
Barcelona Supercomputing Center

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

* Re: OpenMP on gcc
  2007-03-28 22:14 ` Ferad Zyulkyarov
@ 2007-03-28 22:38   ` Tim Prince
  2007-03-28 23:10     ` Ferad Zyulkyarov
  2007-03-29  1:27     ` Steve Kargl
  0 siblings, 2 replies; 5+ messages in thread
From: Tim Prince @ 2007-03-28 22:38 UTC (permalink / raw)
  Cc: gcc-help, fortran

ferad.zyulkyarov@bsc.es wrote:
> As I know, OpenMP is being implemented since version 4.2+ But these
> gcc versions does not have official release. Based on my experience, I
> compiled few simple OpenMP programs in gcc and I was satisfied.
> 

The one problem I have had is that gfortran rejects EQUIVALENCE in 
threadprivate COMMON blocks, as used extensively in legacy applications. 
  I haven't investigated whether any standards bear on this (admittedly 
  undesirable) practice.

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

* Re: OpenMP on gcc
  2007-03-28 22:38   ` Tim Prince
@ 2007-03-28 23:10     ` Ferad Zyulkyarov
  2007-03-29  1:27     ` Steve Kargl
  1 sibling, 0 replies; 5+ messages in thread
From: Ferad Zyulkyarov @ 2007-03-28 23:10 UTC (permalink / raw)
  To: gcc-help

Hi,

My e-mail address appears on the previous message under this thread. I
would like to ask the admins if it is possible to delete it (because
of the spam).

Thanks in advance,
Ferad

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

* Re: OpenMP on gcc
  2007-03-28 22:38   ` Tim Prince
  2007-03-28 23:10     ` Ferad Zyulkyarov
@ 2007-03-29  1:27     ` Steve Kargl
  1 sibling, 0 replies; 5+ messages in thread
From: Steve Kargl @ 2007-03-29  1:27 UTC (permalink / raw)
  To: tprince; +Cc: gcc-help, fortran

On Wed, Mar 28, 2007 at 03:14:20PM -0700, Tim Prince wrote:
> ferad.zyulkyarov@bsc.es wrote:
> >As I know, OpenMP is being implemented since version 4.2+ But these
> >gcc versions does not have official release. Based on my experience, I
> >compiled few simple OpenMP programs in gcc and I was satisfied.
> >
> 
> The one problem I have had is that gfortran rejects EQUIVALENCE in 
> threadprivate COMMON blocks, as used extensively in legacy applications. 
>  I haven't investigated whether any standards bear on this (admittedly 
>  undesirable) practice.


The OpenMP vwrsion 2.5 spec is available on line.

   A variable can only appear in a threadprivate directive in the scope
   in which it is declared. It must not be an element of a common block
   or be declared in an EQUIVALENCE statement.

-- 
Steve

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

end of thread, other threads:[~2007-03-29  0:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-28 19:56 OpenMP on gcc Dima Sorkin
2007-03-28 22:14 ` Ferad Zyulkyarov
2007-03-28 22:38   ` Tim Prince
2007-03-28 23:10     ` Ferad Zyulkyarov
2007-03-29  1:27     ` Steve Kargl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).