This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp merge] Stage 2: OpenMP for the Fortran front end (take 2)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: Tobias dot Schlueter at Physik dot Uni-Muenchen dot DE, gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Tue, 7 Feb 2006 09:00:24 -0500
- Subject: Re: [gomp merge] Stage 2: OpenMP for the Fortran front end (take 2)
- References: <20060207133424.GV24295@devserv.devel.redhat.com> <200602071339.k17DdsGt020418@earth.phy.uc.edu>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Feb 07, 2006 at 08:39:54AM -0500, Andrew Pinski wrote:
> What about a link to the openmp homepage, that seems like a good idea
> since we are following their specifications?
Makes sense, updated patch (updated a few other things as well).
BTW, Diego, guess we want to remove the
"To generate the final exectuable, the runtime
library @code{libgomp} must be linked in using @option{-lgomp}."
snippet from doc/invoke.texi, as -lgomp isn't really needed.
2006-02-07 Jakub Jelinek <jakub@redhat.com>
* invoke.texi: Document -fopenmp.
* gfortran.texi (Extensions): Document OpenMP.
--- gcc/fortran/invoke.texi.jj 2006-02-07 07:42:57.000000000 +0100
+++ gcc/fortran/invoke.texi 2006-02-07 14:48:44.000000000 +0100
@@ -1,11 +1,11 @@
-@c Copyright (C) 2004, 2005
+@c Copyright (C) 2004, 2005, 2006
@c Free Software Foundation, Inc.
@c This is part of the GFORTRAN manual.
@c For copying conditions, see the file gfortran.texi.
@ignore
@c man begin COPYRIGHT
-Copyright @copyright{} 2004, 2005
+Copyright @copyright{} 2004, 2005, 2006
Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
@@ -122,7 +122,7 @@ by type. Explanations are in the follow
-ffixed-line-length-@var{n} -ffixed-line-length-none @gol
-ffree-line-length-@var{n} -ffree-line-length-none @gol
-fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 @gol
--fcray-pointer }
+-fcray-pointer -fopenmp }
@item Warning Options
@xref{Warning Options,,Options to Request or Suppress Warnings}.
@@ -291,6 +291,16 @@ Specify that no implicit typing is allow
@item -fcray-pointer
Enables the Cray pointer extension, which provides a C-like pointer.
+@cindex -fopenmp
+@cindex options, -fopenmp
+@item -fopenmp
+Enables handling of OpenMP @code{!$omp} directives in free form
+and @code{c$omp}, @code{*$omp} and @code{!$omp} directives in fixed form,
+enables @code{!$} conditional compilation sentinels in free form
+and @code{c$}, @code{*$} and @code{!$} sentinels in fixed form
+and when linking arranges for the OpenMP runtime library to be linked
+in.
+
@cindex -std=@var{std} option
@cindex option, -std=@var{std}
@item -std=@var{std}
--- gcc/fortran/gfortran.texi.jj 2006-02-07 07:42:57.000000000 +0100
+++ gcc/fortran/gfortran.texi 2006-02-07 14:54:25.000000000 +0100
@@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename gfortran.info
-@set copyrights-gfortran 1999-2005
+@set copyrights-gfortran 1999-2006
@include gcc-common.texi
@@ -493,10 +493,6 @@ Option to initialize otherwise uninitial
point variables.
@item
-Support for OpenMP directives. This also requires support from the runtime
-library and the rest of the compiler.
-
-@item
Support for Fortran 200x. This includes several new features including
floating point exceptions, extended use of allocatable arrays, C
interoperability, Parameterizer data types and function pointers.
@@ -658,6 +654,7 @@ of extensions, and @option{-std=legacy}
* Hollerith constants support::
* Cray pointers::
* CONVERT specifier::
+* OpenMP::
@end menu
@node Old-style kind specifications
@@ -1049,6 +1046,22 @@ carries a significant speed overhead. I
to you, it is best if you use this only for data that needs to be
portable.
+@node OpenMP
+@section OpenMP
+@cindex OpenMP
+
+gfortran attempts to be OpenMP Application Program Interface v2.5
+compatible when invoked with the @code{-fopenmp} option. gfortran
+then generates parallellized code according to the OpenMP directives
+used in the source. The OpenMP Fortran runtime library
+routines are provided both in a form of Fortran 90 module named
+@code{omp_lib} and in a form of a Fortran @code{include} file named
+@code{omp_lib.h}.
+
+For details refer to the actual
+@uref{http://www.openmp.org/drupal/mp-documents/spec25.pdf,
+OpenMP Application Program Interface v2.5} specification.
+
@c ---------------------------------------------------------------------
@include intrinsic.texi
@c ---------------------------------------------------------------------
Jakub