From patchwork Thu Jul 23 09:51:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1334665 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BC70F4fmzz9sQt for ; Thu, 23 Jul 2020 19:51:56 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9639A386195F; Thu, 23 Jul 2020 09:51:50 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id E34293857C5F; Thu, 23 Jul 2020 09:51:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E34293857C5F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Tobias_Burnus@mentor.com IronPort-SDR: ulzjiM3clvlksPanmH49S+JpwDB6WaOSaFModcZevItZBdjgZHwvtZj2KLrPQ6i9VeyXbitV7p FX8XiA18OqwuEb59AgHRipHBfoLvYd3+3ktKT0LdG2mjV8K0oT3Ra8E2xVNTPtjrLz5nbId+4e 5qUsZ9nt+ZZl7L21MiO6zfZybHNEWkCYZpwltH77a/jkHdvq7hU4ok+OzLUZfEetOc4R2AwCIz pINL2kQbyExuEwKWh2T1N1NoE5Al1goFm8aqsmfN3uGP1BuOyDPoh07tMncTPIPy05wkcExZ6Z VJY= X-IronPort-AV: E=Sophos;i="5.75,386,1589270400"; d="diff'?scan'208";a="51218054" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 23 Jul 2020 01:51:44 -0800 IronPort-SDR: 9PBqMp/aB6CWl+24jB0SS5ZYhiFORLszV5BnF7biPWey2VumF5ONhedHeeGdb1iUmEw9TFnj6M VxB+DACrTvFMqTYMQTbP5lPNWztIbkXzp2bLJQR4CzZdMAjV3HyGrXBYKPf57LEy4DszTpilER OSioGKQM7j6LmQtxkVUhTus8U5KOY3hzsTfUNxi6w9vzYVgkCI9j+VZju6pay+yMnjdlxo82d4 KJP8YgqQLIvLrEMU7sozIjQI+Qyt6UjkIF5g5iK8LAuPY0WKSmEtljM8m2AGYo044/+1KfSLtD 3os= To: gcc-patches , fortran , Jakub Jelinek From: Tobias Burnus Subject: [Patch] OpenMP: Update gcc/fortran/*.texi Message-ID: Date: Thu, 23 Jul 2020 11:51:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Except for a few known bugs (and a bunch of unknown ones), I am not aware of any outstanding issues with OpenMP 4.5. Additionally, the openmp_version claims 201511 (= 4.5). Hence, state that 4.5 is supported – and OpenMP 5.0 is partially. I did update the .texi file to match the current content of OMP_LIB. However, compared to C/C++ I do note that the 'omp_depend_kind' is missing, which in C/C++ omp.h is a struct of size "char[2*sizeof(*void)]". I fear that using 'integer(kind=2*c_intptr_t)' will not work everywhere – hence, I did not add it with this patch. (→ back to the drawingboard?) Otherwise, C/C++'s omp.h only has some memory allocation functions which currently (in OpenMP 5.0.0) do not have a Fortran equivalent. OK for the trunk? Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter OpenMP: Update gcc/fortran/*.texi gcc/fortran/ChangeLog: * gfortran.texi (Standards): Update URL; state that OpenMP 4.5 is supported and 5.0 is partially. * intrinsic.texi (OpenMP Modules): Refer also to OpenMP 5.0; (OMP_LIB): Add missing derived type and new named constants. gcc/fortran/gfortran.texi | 4 +- gcc/fortran/intrinsic.texi | 96 +++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 92 insertions(+), 8 deletions(-) diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index 20fe38534d5..d927ebc4abc 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -541,8 +541,8 @@ can be found in the @ref{Fortran 2003 status}, @ref{Fortran 2008 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/}). +(version 4.5 and partial support of the features of the 5.0 version, +@url{http://openmp.org/@/openmp-specifications/}). There also is support for the OpenACC specification (targeting version 2.6, @uref{http://www.openacc.org/}). See @uref{https://gcc.gnu.org/wiki/OpenACC} for more information. diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index a1ecf5933ba..1b93d251509 100644 --- a/gcc/fortran/intrinsic.texi +++ b/gcc/fortran/intrinsic.texi @@ -15291,12 +15291,12 @@ with the following options: @code{-fno-unsafe-math-optimizations @section OpenMP Modules @code{OMP_LIB} and @code{OMP_LIB_KINDS} @table @asis @item @emph{Standard}: -OpenMP Application Program Interface v4.5 +OpenMP Application Program Interface v4.5 and +OpenMP Application Program Interface v5.0 (partially supported). @end table - The OpenMP Fortran runtime library routines are provided both in -a form of two Fortran 90 modules, named @code{OMP_LIB} and +a form of two Fortran modules, named @code{OMP_LIB} and @code{OMP_LIB_KINDS}, and in a form of a Fortran @code{include} file named @file{omp_lib.h}. The procedures provided by @code{OMP_LIB} can be found in the @ref{Top,,Introduction,libgomp,GNU Offloading and Multi @@ -15306,19 +15306,25 @@ below. For details refer to the actual @uref{http://www.openmp.org/wp-content/uploads/openmp-4.5.pdf, -OpenMP Application Program Interface v4.5}. -And for the @code{pause}-related constants to the OpenMP 5.0 specification. +OpenMP Application Program Interface v4.5} and +@uref{https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-5.0.pdf, +OpenMP Application Program Interface v5.0}. @code{OMP_LIB_KINDS} provides the following scalar default-integer named constants: @table @asis +@item @code{omp_allocator_handle_kind} +@item @code{omp_alloctrait_key_kind} +@item @code{omp_alloctrait_val_kind} @item @code{omp_lock_kind} @item @code{omp_lock_hint_kind} @item @code{omp_nest_lock_kind} @item @code{omp_pause_resource_kind} +@item @code{omp_memspace_handle_kind} @item @code{omp_proc_bind_kind} @item @code{omp_sched_kind} +@item @code{omp_sync_hint_kind} @end table @code{OMP_LIB} provides the scalar default-integer @@ -15326,6 +15332,12 @@ named constant @code{openmp_version} with a value of the form @var{yyyymm}, where @code{yyyy} is the year and @var{mm} the month of the OpenMP version; for OpenMP v4.5 the value is @code{201511}. +The following derived type: + +@table @asis +@item @code{omp_alloctrait} +@end table + The following scalar integer named constants of the kind @code{omp_sched_kind}: @@ -15336,7 +15348,7 @@ kind @code{omp_sched_kind}: @item @code{omp_sched_auto} @end table -And the following scalar integer named constants of the +And the following scalar integer named constants of the kind @code{omp_proc_bind_kind}: @table @asis @@ -15356,6 +15368,11 @@ kind @code{omp_lock_hint_kind}: @item @code{omp_lock_hint_contended} @item @code{omp_lock_hint_nonspeculative} @item @code{omp_lock_hint_speculative} +@item @code{omp_sync_hint_none} +@item @code{omp_sync_hint_uncontended} +@item @code{omp_sync_hint_contended} +@item @code{omp_sync_hint_nonspeculative} +@item @code{omp_sync_hint_speculative} @end table And the following two scalar integer named constants are of the @@ -15366,6 +15383,73 @@ kind @code{omp_pause_resource_kind}: @item @code{omp_pause_hard} @end table +The following scalar integer named constants are of the kind +@code{omp_alloctrait_key_kind}: + +@table @asis +@item @code{omp_atk_sync_hint} +@item @code{omp_atk_alignment} +@item @code{omp_atk_access} +@item @code{omp_atk_pool_size} +@item @code{omp_atk_fallback} +@item @code{omp_atk_fb_data} +@item @code{omp_atk_pinned} +@item @code{omp_atk_partition} +@end table + +The following scalar integer named constants are of the kind +@code{omp_alloctrait_val_kind}: + +@table @asis +@code{omp_alloctrait_key_kind}: +@item @code{omp_atv_default} +@item @code{omp_atv_false} +@item @code{omp_atv_true} +@item @code{omp_atv_contended} +@item @code{omp_atv_uncontended} +@item @code{omp_atv_serialized} +@item @code{omp_atv_sequential} +@item @code{omp_atv_private} +@item @code{omp_atv_all} +@item @code{omp_atv_thread} +@item @code{omp_atv_pteam} +@item @code{omp_atv_cgroup} +@item @code{omp_atv_default_mem_fb} +@item @code{omp_atv_null_fb} +@item @code{omp_atv_abort_fb} +@item @code{omp_atv_allocator_fb} +@item @code{omp_atv_environment} +@item @code{omp_atv_nearest} +@item @code{omp_atv_blocked} +@end table + +The following scalar integer named constants are of the kind +@code{omp_allocator_handle_kind}: + +@table @asis +@item @code{omp_null_allocator} +@item @code{omp_default_mem_alloc} +@item @code{omp_large_cap_mem_alloc} +@item @code{omp_const_mem_alloc} +@item @code{omp_high_bw_mem_alloc} +@item @code{omp_low_lat_mem_alloc} +@item @code{omp_cgroup_mem_alloc} +@item @code{omp_pteam_mem_alloc} +@item @code{omp_thread_mem_alloc} +@end table + +The following scalar integer named constants are of the kind +@code{omp_memspace_handle_kind}: + +@table @asis +@item @code{omp_default_mem_space} +@item @code{omp_large_cap_mem_space} +@item @code{omp_const_mem_space} +@item @code{omp_high_bw_mem_space} +@item @code{omp_low_lat_mem_space} +@end table + + @node OpenACC Module OPENACC @section OpenACC Module @code{OPENACC}