From patchwork Mon Sep 6 16:48:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1525019 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+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) 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 4H3Dr645dkz9sVw for ; Tue, 7 Sep 2021 02:48:49 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 310833839415 for ; Mon, 6 Sep 2021 16:48:45 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 562C53857C5B for ; Mon, 6 Sep 2021 16:48:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 562C53857C5B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: 3RbrB8cXYTeOSQ7DUlaxJlbpPMEu/TaJscmDVzLTNWsi2WNhtOR3GEG7DyhygR7O5i+nXWVKFz kf2nxZ6oc2H0rS+nFb8P1qRifgE30EnAkZmO4rYRn1Pa019fLNbEQz6nmykkqmfwqubnOMLt6o QpJFErxhajJazhFsXQYKpAVMK4LUNTSEZ74opCNEqkjNgMftWinDYi436BuzOxumg0GJ7CDKue YNN83U7jqhQsL5jfoD2KjgQnBqikogSimfmVE8G63dNZmcRzMah0oXCx+DSqx4OwdTwhn8EiCh UOk5m/2CmKA0747KR1IPasdL X-IronPort-AV: E=Sophos;i="5.85,272,1624348800"; d="diff'?scan'208";a="65550736" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 06 Sep 2021 08:48:31 -0800 IronPort-SDR: B5IlK672dr10fmAV0h7hM/U3QchRqnTNZ/HIBuX74EyRYyDhgVSkw+qCH0hnvobcfn6iHI8A2b oAzKLeKmPYJ0y/enF37/JqoN1tSLTJRxnCdaz9Vb++B1/Q1FL9JhF51JjFcFNTUYGV06PT+zgz Zk7Zb92aMvdXu1B9N0EzQiF4f36BzC0YJIZtcT8rmUTbpWEhbbHg5QHWh4e2FQndy7x4nRHTCP 1ZoOGdviPuoFDW10xgNmg8SE/qpd5LEyiAEm0KBXTdrLFDuK8fPf93kdRBc4fLMJ+cy4UCtdfQ LV0= To: Jakub Jelinek , gcc-patches From: Tobias Burnus Subject: [Patch] libgomp.texi: Add OpenMP Implementation Status Message-ID: Date: Mon, 6 Sep 2021 18:48:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-05.mgc.mentorg.com (139.181.222.5) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi Jakub, hi all, as the issue came up from time to time, I thought it makes sense to add an implementation status. I settled on putting it into libgomp.texi instead of a webpage or another location. The 5.1 section should be fine – except for additional items. OpenMP 5.0 has stub wordings and needs to be filled. The version in the patch should be sufficient for now but it would be nice to have it completed before GCC 12. (Or even before the BoF in two weeks or OpenMP Con in a week, hmm.) OK? Comments? Typo/wording fixes? Tobias PS: Besides the OpenMP implementation status, also: * implementation details/choices could be added. * some hints regarding tricks & tips related to OpenMP and in particular offloading (e.g. -foffload-options=-latomic might be needed for nvptx*) * user-friendlier documentation how to build the offload compiler. (The offloading wiki page has too many internals and lacks a step-by-step guide.) Not all should be in libgomp.texi, however. (* Side note: it is mentioned indirectly: as example in https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-foffload ) Currently, the OpenMP/offloading documentation is spread over: * libgomp: https://gcc.gnu.org/onlinedocs/libgomp/ * gcc: https://gcc.gnu.org/onlinedocs/gcc/ flags (-fopenmp(-simd), -foffload(-options=), ...) * gfortran: OpenMP + OpenMP Modules omp_lib and omp_lib_kinds (and likewise for OpenACC) https://gcc.gnu.org/onlinedocs/gfortran/ * Project page: https://gcc.gnu.org/projects/gomp/ * Wiki page: https://gcc.gnu.org/wiki/openmp (likewise: https://gcc.gnu.org/wiki/OpenACC and also: https://gcc.gnu.org/wiki/OpenACC/Implementation%20Status ) * Offloading: https://gcc.gnu.org/wiki/Offloading plus https://gcc.gnu.org/wiki/nvptx plus configure-time options at https://gcc.gnu.org/install/configure.html ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 libgomp.texi: Add OpenMP Implementation Status libgomp/ * libgomp.texi (Enabling OpenMP): Refer to OMP spec in general not to 4.5; link to new section. (OpenMP Implementation Status): New. diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi index 1bfa26ea497..94c8de07cb3 100644 --- a/libgomp/libgomp.texi +++ b/libgomp/libgomp.texi @@ -95,6 +95,7 @@ changed to GNU Offloading and Multi Processing Runtime Library. @comment @menu * Enabling OpenMP:: How to enable OpenMP for your applications. +* OpenMP Implementation Status:: List of implemented features by OpenMP version * OpenMP Runtime Library Routines: Runtime Library Routines. The OpenMP runtime application programming interface. @@ -141,9 +142,113 @@ flag @command{-fopenmp} must be specified. This enables the OpenMP directive arranges for automatic linking of the OpenMP runtime library (@ref{Runtime Library Routines}). -A complete description of all OpenMP directives accepted may be found in -the @uref{https://www.openmp.org, OpenMP Application Program Interface} manual, -version 4.5. +A complete description of all OpenMP directives may be found in the +@uref{https://www.openmp.org, OpenMP Application Program Interface} manuals. +See also @ref{OpenMP Implementation Status}. + + +@c --------------------------------------------------------------------- +@c OpenMP Implementation Status +@c --------------------------------------------------------------------- + +@node OpenMP Implementation Status +@chapter OpenMP Implementation Status + +@menu +* OpenMP 4.5:: Feature completion status to 4.5 specification +* OpenMP 5.0:: Feature completion status to 5.0 specification +* OpenMP 5.1:: Feature completion status to 5.1 specification +@end menu + +The @code{_OPENMP} preprocessor macro and Fortran's @code{openmp_version} +parameter, provided by @code{omp_lib.h} and the @code{omp_lib} module, have +the value @code{201511} (i.e. OpenMP 4.5). + +@node OpenMP 4.5 +@section OpenMP 4.5 + +The OpenMP 4.5 specification is fully supported. + +@node OpenMP 5.0 +@section OpenMP 5.0 + +Partial support of the OpenMP 5.0 specification. The OMPT and the OMPD +interfaces are unsupported. + +@node OpenMP 5.1 +@section OpenMP 5.1 + +@unnumberedsubsec New features listed in Appendix B of the OpenMP specification + +@multitable @columnfractions .60 .10 .25 +@headitem Description @tab Status @tab Comments +@item OpenMP directive as C++ attribute specifiers @tab Y @tab +@item @code{omp_all_memory} reserved locator @tab N @tab +@item @emph{target_device trait} in OpenMP Context @tab N @tab +@item @code{target_device} selector set in context selectors @tab N @tab +@item C/C++'s @code{declare variante} directive: elision support of + preprocessed code @tab N @tab +@item @code{declare variante}: new clauses @code{adjust_args} and + @code{append_args} @tab N @tab +@item @code{dispatch} construct @tab N @tab +@item device-specific ICV settings the environment variables @tab N @tab +@item assume directive @tab N @tab +@item @code{nothing} directive @tab Y @tab +@item @code{error} directive @tab Y @tab +@item @code{masked} construct @tab Y @tab +@item @code{scope} directive @tab Y @tab +@item Loop transformation constructs @tab N @tab +@item @code{strict} modifier in the @code{grainsize} and @code{num_tasks} + clauses of the taskloop construct @tab Y @tab +@item @code{align} clause/modifier in @code{allocate} directive/clause + and @code{allocator} directive @tab N @tab +@item @code{thread_limit} clause to @code{target} construct @tab N @tab +@item @code{has_device_addr} clause to @code{target} construct @tab N @tab +@item iterators in @code{target update} motion clauses and @code{map} + clauses @tab N @tab +@item indirect calls to the device version of a procedure or function in + @code{target} regions @tab N @tab +@item @code{interop} directive @tab N @tab +@item @code{omp_interop_t} object support in runtime routines @tab N @tab +@item @code{nowait} clause in @code{taskwait} directive @tab N @tab +@item Extensions to the @code{atomic} directive @tab N @tab +@item @code{seq_cst} clause on a @code{flush} construct @tab N @tab +@item @code{inoutset} argument to the @code{depend} clause @tab N @tab +@item @code{private} and @code{firstprivate} argument to @code{default} + clause in C and C++ @tab N @tab +@item @code{present} argument to @code{defaultmap} clause @tab N @tab +@item @code{omp_set_num_teams}, @code{omp_set_teams_thread_limit}, + @code{omp_get_max_teams}, @code{omp_get_teams_thread_limit} runtime + routines @tab N @tab +@item @code{omp_target_is_accessible} runtime routine @tab N @tab +@item @code{omp_target_memcpy_async} and @code{omp_target_memcpy_rect_async} + runtime routines @tab N @tab +@item @code{omp_get_mapped_ptr} runtime routine @tab N @tab +@item @code{omp_calloc}, @code{omp_realloc}, @code{omp_aligned_alloc} and + @code{omp_aligned_calloc} runtime routines @tab N @tab +@item @code{omp_alloctrait_key_t} enum: @code{omp_atv_serialized} added, + @code{omp_atv_default} changed @tab Y @tab +@item @code{omp_display_env} runtime routine @tab P + @tab Not inside @code{target} regions +@item @code{ompt_scope_endpoint_t} enum: @code{ompt_scope_beginend} @tab N @tab +@item @code{ompt_sync_region_t} enum additions @tab N @tab +@item @code{ompt_state_t} enum: @code{ompt_state_wait_barrier_implementation} + and @code{ompt_state_wait_barrier_teams} @tab N @tab +@item @code{ompt_callback_target_data_op_emi_t}, + @code{ompt_callback_target_emi_t}, @code{ompt_callback_target_map_emi_t} + and @code{ompt_callback_target_submit_emi_t} @tab N @tab +@item @code{ompt_callback_error_t} type @tab N @tab +@item @code{OMP_PLACES} syntax was extension @tab N @tab +@item @code{OMP_NUM_TEAMS} and @code{OMP_TEAMS_THREAD_LIMIT} environment + variables @tab N @tab +@end multitable + +@unnumberedsubsec Other new OpenMP 5.1 features + +@multitable @columnfractions .60 .10 .25 +@headitem Description @tab Status @tab Comments +@item Suppport of strictly structured blocks in Fortran @tab N @tab +@end multitable @c ---------------------------------------------------------------------