From patchwork Thu Sep 20 16:37:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cesar Philippidis X-Patchwork-Id: 972557 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-486071-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="u6tki3P/"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42GMpb6stcz9s9h for ; Fri, 21 Sep 2018 02:37:43 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=oJZ5ioptHNmzzSoWzsgpKB7hiEiRPwyiUJN7JIoKMLkj27Ka+U zcL2MB0mQpaDbgYkEKz8WkMoovjyVHucktRR3N1Ox7l3Ms7+xkXqKzRtchywvEpg MWbnWGCgvb3bsuYT6SXX+W4Mh0Zi8LQNZpLBZr3CJJ060HJQKWCwb/ETk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=xz7woZdOB8C7u93KWhoz2GcDm1w=; b=u6tki3P/bQbiC1SN3w9s 5pEQ0D+/4XDDi8LfXFIPNO9qIDf7TPWaBx1+aD2uTJXVgIGvdCL46wj5urmx+97Z lQk1z52nhCe7eGw+oOgO9t51QVdSHq1PD7oc82XVyVA8PQFnEZBwr0DmSvrrX74H oYroxuleeF52wZbrpnJXfKs= Received: (qmail 27216 invoked by alias); 20 Sep 2018 16:37:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 27199 invoked by uid 89); 20 Sep 2018 16:37:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=sk:thomas, programming, Programming, LOC X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Sep 2018 16:37:33 +0000 Received: from svr-orw-mbx-04.mgc.mentorg.com ([147.34.90.204]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g31xL-00065Z-44 from Cesar_Philippidis@mentor.com for gcc-patches@gcc.gnu.org; Thu, 20 Sep 2018 09:37:31 -0700 Received: from [127.0.0.1] (147.34.91.1) by SVR-ORW-MBX-04.mgc.mentorg.com (147.34.90.204) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 20 Sep 2018 09:37:28 -0700 To: "gcc-patches@gcc.gnu.org" , "Schwinge, Thomas" From: Cesar Philippidis Subject: [patch, openacc] Better distinguish OpenACC and OpenMP sections in libgomp.texi Message-ID: <39cb66d7-f770-b7b8-b4af-deae2e356c67@codesourcery.com> Date: Thu, 20 Sep 2018 09:37:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 This patch updates the libgomp documentation to more clearly identify OpenMP-specific sections. Specifically, the sections "Runtime Library Routine" and "Environment Variables" are now prefixed by OpenMP, because those sections are applicable to OpenACC. Is this OK for trunk? I verified that libgomp.pdf looks ok. Thanks, Cesar [OpenACC] Update _OPENACC value and documentation for OpenACC 2.5 2018-XX-YY Thomas Schwinge Cesar Philippidis gcc/c-family/ * c-cppbuiltin.c (c_cpp_builtins): Update "_OPENACC" to "201510". gcc/fortran/ * cpp.c (cpp_define_builtins): Update "_OPENACC" to "201510". * gfortran.texi: Update for OpenACC 2.5. * Intrinsic.texi: Likewise. * invoke.texi: Likewise. gcc/testsuite/ * c-c++-common/cpp/openacc-define-3.c: Update. * gfortran.dg/openacc-define-3.f90: Likewise. gcc/ * doc/invoke.texi: Update for OpenACC 2.5. libgomp/ * libgomp.texi: Update for OpenACC 2.5. * openacc.f90 (openacc_version): Update to "201510". * openacc_lib.h (openacc_version): Likewise. * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Update. * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Update. (cherry picked from gomp-4_0-branch r248057, ccbbcb70569) --- gcc/c-family/c-cppbuiltin.c | 2 +- gcc/doc/invoke.texi | 4 +++- gcc/fortran/cpp.c | 2 +- gcc/fortran/gfortran.texi | 16 +++++--------- gcc/fortran/intrinsic.texi | 6 +++--- gcc/fortran/invoke.texi | 4 +--- .../c-c++-common/cpp/openacc-define-3.c | 2 +- .../gfortran.dg/openacc-define-3.f90 | 2 +- libgomp/libgomp.texi | 21 ++++++++++--------- libgomp/openacc.f90 | 2 +- libgomp/openacc_lib.h | 2 +- .../libgomp.oacc-fortran/openacc_version-1.f | 2 +- .../openacc_version-2.f90 | 2 +- 13 files changed, 31 insertions(+), 36 deletions(-) diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index 96a6b4dfd2b..f2a273b6ac7 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -1391,7 +1391,7 @@ c_cpp_builtins (cpp_reader *pfile) cpp_define (pfile, "__SSP__=1"); if (flag_openacc) - cpp_define (pfile, "_OPENACC=201306"); + cpp_define (pfile, "_OPENACC=201510"); if (flag_openmp) cpp_define (pfile, "_OPENMP=201511"); diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 94304c314cf..34d7ff71512 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -2161,10 +2161,12 @@ freestanding and hosted environments. Enable handling of OpenACC directives @code{#pragma acc} in C/C++ and @code{!$acc} in Fortran. When @option{-fopenacc} is specified, the compiler generates accelerated code according to the OpenACC Application -Programming Interface v2.0 @w{@uref{https://www.openacc.org}}. This option +Programming Interface v2.5 @w{@uref{https://www.openacc.org}}. This option implies @option{-pthread}, and thus is only supported on targets that have support for @option{-pthread}. +See @uref{https://gcc.gnu.org/wiki/OpenACC} for more information. + @item -fopenacc-dim=@var{geom} @opindex fopenacc-dim @cindex OpenACC accelerator programming diff --git a/gcc/fortran/cpp.c b/gcc/fortran/cpp.c index 0b3de42e832..14871129ff6 100644 --- a/gcc/fortran/cpp.c +++ b/gcc/fortran/cpp.c @@ -165,7 +165,7 @@ cpp_define_builtins (cpp_reader *pfile) cpp_define (pfile, "_LANGUAGE_FORTRAN=1"); if (flag_openacc) - cpp_define (pfile, "_OPENACC=201306"); + cpp_define (pfile, "_OPENACC=201510"); if (flag_openmp) cpp_define (pfile, "_OPENMP=201511"); diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index 30934046a49..59a69457fe0 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -476,9 +476,7 @@ used on real-world programs. In particular, the supported extensions include OpenMP, Cray-style pointers, some old vendor extensions, and several Fortran 2003 and Fortran 2008 features, including TR 15581. However, it is still under development and has a few remaining rough edges. -There also is initial support for OpenACC. -Note that this is an experimental feature, incomplete, and subject to -change in future versions of GCC. See +There also is support for OpenACC. See @uref{https://gcc.gnu.org/wiki/OpenACC} for more information. At present, the GNU Fortran compiler passes the @@ -538,10 +536,8 @@ status} and @ref{Fortran 2018 status} sections of the documentation. Additionally, the GNU Fortran compilers supports the OpenMP specification (version 4.0 and most of the features of the 4.5 version, @url{http://openmp.org/@/wp/@/openmp-specifications/}). -There also is initial support for the OpenACC specification (targeting -version 2.0, @uref{http://www.openacc.org/}). -Note that this is an experimental feature, incomplete, and subject to -change in future versions of GCC. See +There also is support for the OpenACC specification (targeting +version 2.5, @uref{http://www.openacc.org/}). See @uref{https://gcc.gnu.org/wiki/OpenACC} for more information. @node Varying Length Character Strings @@ -2178,7 +2174,7 @@ influence run-time behavior. GNU Fortran strives to be compatible to the @uref{http://www.openacc.org/, OpenACC Application Programming -Interface v2.0}. +Interface v2.5}. To enable the processing of the OpenACC directive @code{!$acc} in free-form source code; the @code{c$acc}, @code{*$acc} and @code{!$acc} @@ -2194,9 +2190,7 @@ The OpenACC Fortran runtime library routines are provided both in a form of a Fortran 90 module named @code{openacc} and in a form of a Fortran @code{include} file named @file{openacc_lib.h}. -Note that this is an experimental feature, incomplete, and subject to -change in future versions of GCC. See -@uref{https://gcc.gnu.org/wiki/OpenACC} for more information. +See @uref{https://gcc.gnu.org/wiki/OpenACC} for more information. @node Argument list functions @subsection Argument list functions @code{%VAL}, @code{%REF} and @code{%LOC} diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index ca006c96c5f..341ca9f9d99 100644 --- a/gcc/fortran/intrinsic.texi +++ b/gcc/fortran/intrinsic.texi @@ -14925,7 +14925,7 @@ kind @code{omp_proc_bind_kind}: @section OpenACC Module @code{OPENACC} @table @asis @item @emph{Standard}: -OpenACC Application Programming Interface v2.0 +OpenACC Application Programming Interface v2.5 @end table @@ -14939,9 +14939,9 @@ are listed below. For details refer to the actual @uref{http://www.openacc.org/, -OpenACC Application Programming Interface v2.0}. +OpenACC Application Programming Interface v2.5}. @code{OPENACC} provides the scalar default-integer named constant @code{openacc_version} with a value of the form @var{yyyymm}, where @code{yyyy} is the year and @var{mm} the month -of the OpenACC version; for OpenACC v2.0 the value is @code{201306}. +of the OpenACC version; for OpenACC v2.5 the value is @code{201510}. diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index ee84a0be8b1..9b59be7446d 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -362,9 +362,7 @@ compilation sentinels in free form and @code{c$}, @code{*$} and @code{!$} sentinels in fixed form, and when linking arranges for the OpenACC runtime library to be linked in. -Note that this is an experimental feature, incomplete, and subject to -change in future versions of GCC. See -@w{@uref{https://gcc.gnu.org/wiki/OpenACC}} for more information. +See @w{@uref{https://gcc.gnu.org/wiki/OpenACC}} for more information. @item -fopenmp @opindex @code{fopenmp} diff --git a/gcc/testsuite/c-c++-common/cpp/openacc-define-3.c b/gcc/testsuite/c-c++-common/cpp/openacc-define-3.c index ccedcd90782..21a735ac891 100644 --- a/gcc/testsuite/c-c++-common/cpp/openacc-define-3.c +++ b/gcc/testsuite/c-c++-common/cpp/openacc-define-3.c @@ -6,6 +6,6 @@ # error _OPENACC not defined #endif -#if _OPENACC != 201306 +#if _OPENACC != 201510 # error _OPENACC defined to wrong value #endif diff --git a/gcc/testsuite/gfortran.dg/openacc-define-3.f90 b/gcc/testsuite/gfortran.dg/openacc-define-3.f90 index b6c296e6b98..47cb1b08adb 100644 --- a/gcc/testsuite/gfortran.dg/openacc-define-3.f90 +++ b/gcc/testsuite/gfortran.dg/openacc-define-3.f90 @@ -6,6 +6,6 @@ # error _OPENACC not defined #endif -#if _OPENACC != 201306 +#if _OPENACC != 201510 # error _OPENACC defined to wrong value #endif diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi index 453b7fabb5a..3423899fd11 100644 --- a/libgomp/libgomp.texi +++ b/libgomp/libgomp.texi @@ -1819,11 +1819,9 @@ arranges for automatic linking of the OpenACC runtime library A complete description of all OpenACC directives accepted may be found in the @uref{https://www.openacc.org, OpenACC} Application Programming -Interface manual, version 2.0. +Interface manual, version 2.5. -Note that this is an experimental feature and subject to -change in future versions of GCC. See -@uref{https://gcc.gnu.org/wiki/OpenACC} for more information. +See @uref{https://gcc.gnu.org/wiki/OpenACC} for more information. @@ -1835,12 +1833,15 @@ change in future versions of GCC. See @chapter OpenACC Runtime Library Routines The runtime routines described here are defined by section 3 of the OpenACC -specifications in version 2.0. +specification in version 2.0. They have C linkage, and do not throw exceptions. Generally, they are available only for the host, with the exception of @code{acc_on_device}, which is available for both the host and the acceleration device. +This list has not yet been updated for the OpenACC specification in +version 2.5. + @menu * acc_get_num_devices:: Get number of devices for the given device type. @@ -2826,7 +2827,7 @@ A.2.1.4. @chapter OpenACC Environment Variables The variables @env{ACC_DEVICE_TYPE} and @env{ACC_DEVICE_NUM} -are defined by section 4 of the OpenACC specification in version 2.0. +are defined by section 4 of the OpenACC specification in version 2.5. The variable @env{GCC_ACC_NOTIFY} is used for diagnostic purposes. @menu @@ -2841,7 +2842,7 @@ The variable @env{GCC_ACC_NOTIFY} is used for diagnostic purposes. @section @code{ACC_DEVICE_TYPE} @table @asis @item @emph{Reference}: -@uref{https://www.openacc.org, OpenACC specification v2.0}, section +@uref{https://www.openacc.org, OpenACC specification v2.5}, section 4.1. @end table @@ -2851,7 +2852,7 @@ The variable @env{GCC_ACC_NOTIFY} is used for diagnostic purposes. @section @code{ACC_DEVICE_NUM} @table @asis @item @emph{Reference}: -@uref{https://www.openacc.org, OpenACC specification v2.0}, section +@uref{https://www.openacc.org, OpenACC specification v2.5}, section 4.2. @end table @@ -3067,8 +3068,8 @@ is called prior to a call to @code{cudaCreate()}. If @code{cudaCreate()} is called prior to a call to an OpenACC function, then you must call @code{acc_set_device_num()}@footnote{More complete information about @env{ACC_DEVICE_TYPE} and @env{ACC_DEVICE_NUM} can be found in -sections 4.1 and 4.2 of the @uref{https://www.openacc.org, OpenACC} -Application Programming Interfaceā€¯, Version 2.0.} +sections 4.1 and 4.2 of the @uref{https://www.openacc.org, OpenACC +Application Programming Interface}, version 2.5.} diff --git a/libgomp/openacc.f90 b/libgomp/openacc.f90 index 84a8700f072..f873bcb4469 100644 --- a/libgomp/openacc.f90 +++ b/libgomp/openacc.f90 @@ -530,7 +530,7 @@ module openacc public :: acc_present_or_create, acc_pcreate, acc_copyout, acc_delete public :: acc_update_device, acc_update_self, acc_is_present - integer, parameter :: openacc_version = 201306 + integer, parameter :: openacc_version = 201510 interface acc_get_num_devices procedure :: acc_get_num_devices_h diff --git a/libgomp/openacc_lib.h b/libgomp/openacc_lib.h index 737c582041d..39a112477d6 100644 --- a/libgomp/openacc_lib.h +++ b/libgomp/openacc_lib.h @@ -49,7 +49,7 @@ integer (acc_handle_kind), parameter :: acc_async_noval = -1 integer (acc_handle_kind), parameter :: acc_async_sync = -2 - integer, parameter :: openacc_version = 201306 + integer, parameter :: openacc_version = 201510 interface acc_get_num_devices function acc_get_num_devices_h (d) diff --git a/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-1.f b/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-1.f index 537212eb655..59dff6705ac 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-1.f +++ b/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-1.f @@ -4,6 +4,6 @@ implicit none include "openacc_lib.h" - if (openacc_version .ne. 201306) STOP 1 + if (openacc_version .ne. 201510) STOP 1 end program main diff --git a/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-2.f90 b/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-2.f90 index 54f301be79b..75afed9628c 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-2.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-2.f90 @@ -4,6 +4,6 @@ program main use openacc implicit none - if (openacc_version .ne. 201306) STOP 1 + if (openacc_version .ne. 201510) STOP 1 end program main -- 2.17.1